[Gmsh] Line of multiple segments

Geordie McBain gdmcbain at freeshell.org
Fri Sep 25 08:53:41 CEST 2009


On Tue, Sep 22, 2009 at 1:49 AM, Christophe Geuzaine
<cgeuzaine at ulg.ac.be> wrote:
> You can fairly safely use lines with multiple segments in 2D, but they are
> not supported in 3D (e.g. extruding a "multi-line" will lead to unexpected
> results). We chose not to document the feature for this reason...

I'm not sure what `unexpected results' means.  I see that extruding an
apparently closed polygonal Line fails (segfaults) when we try to 2-D
mesh.  But exactly the same thing happens with an apparently closed
Spline.  The unexpectedness appears to be associated with the closing
of the Line/Spline, not with defining a Line with more than two
points.
   If instead of joining {1, 2, ..., n, 1}, I join only 1 through n
and then have a second Line/Spline to join Point (n) back to Point
(1), and then put the two Lines/Splines into the Line Loop, everything
works fine when 2-D or 3-D meshing the extruded Plane Surface.  I
demonstrate with four attached .geo files.

1. triangle_Line.geo (closed polygonal line, segfaults on 2-D mesh
after extrusion).
2. triangle_Line1.geo (differs from 1 by closing polygon with a second
Line, meshes O.K.)
3. triangle_Spline.geo (differs from 1 by using Spline instead of
Line, segfaults like 1)
4. triangle_Spline1.geo (differs from 3 as 2 from 1, meshes O.K.)

Given that the Line defined by more than two points in 2 works O.K.,
even in three dimensions, is it reasonable to rely on (and document?)
Lines of multiple segments?  Should there perhaps be rather a note in
the Line Loop documentation to say that the Line Loop should not
consist of a single closed line?  Is that why Circle `creates a circle
arc (strictly) smaller than Pi'?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: triangle_Line.geo
Type: application/octet-stream
Size: 172 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20090925/ffb2ae07/attachment.geo>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: triangle_Line1.geo
Type: application/octet-stream
Size: 191 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20090925/ffb2ae07/attachment-0001.geo>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: triangle_Spline.geo
Type: application/octet-stream
Size: 174 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20090925/ffb2ae07/attachment-0002.geo>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: triangle_Spline1.geo
Type: application/octet-stream
Size: 195 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20090925/ffb2ae07/attachment-0003.geo>