[Gmsh] newp incorrect after Merging IGES?

Christophe Geuzaine cgeuzaine at ulg.ac.be
Thu Aug 5 11:23:17 CEST 2010


On 27/05/10 03:11, Geordie McBain wrote:
> 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?
>

No, but this is indeed a bit anoying. The problem comes from the fact 
that newp, etc., only deal with the old ".geo" database.

We could modify their behaviour to take the new abstract db into 
account, but that might break some existing scripts. I think the safest 
is just to leave it like this: the problem will be fixed automatically 
when we move to lua for the scripts.



> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
>


-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine