[Gmsh] newp incorrect after Merging IGES?
Geordie McBain
gdmcbain at freeshell.org
Thu May 27 03:11:59 CEST 2010
Hello. I noticed an anomaly in Gmsh when trying to add geometry after
Merging an IGES file: the counters for the identifiers don't seem to
reflect the merged geometry and so remain at one. Thus when I add a
new Point in the GUI (or using "Point (newp) = {x, y, z};" in a
script), it's Point (1) but there's already a Point (1) and so my new
Point doesn't exist.
To demonstrate the problem, I took M. G.'s script from
http://www.femcfd.com/gmsh-netzverdichtung.html, which I found on
reading the `IGES import and mesh refinement' thread
<http://geuz.org/pipermail/gmsh/2008/003292.html> from June 2008 while
researching this anomaly. (Thank you to M. G. for writing up this
nice example.) Then I appended the line "Printf ("newp = %g.",
newp);" and indeed it tells me newp = 1. I think newp should be 43,
since Tools/Statistics tells me there are already 42 points.
And indeed, If I append the line "Point (101) = {2591, 2540, 508};" to
the script, that point is created correctly, and after that everything
continues to be fine for points, but then the counters for new Lines
etc. are wrong. Thus I do have a workaround, but it is tedious (I
have to work out how many of each entity there are already and then
manually type a script command creating one of each type with a higher
unused identifier) and I think this is a bug in the GUI and in newp?
Is there a way to automatically update newp etc. after Merging geometry?