[Gmsh] Compound lines in STL

Bart Vermeulen bart.vermeulen at wur.nl
Wed Sep 10 13:07:23 CEST 2014


Hi Vincent,

I get the attached error messages when I remove the CreateTopology command.

I think it misses lines and points to build compund line from.

Bart

On 09/09/2014 05:27 PM, Vincent Libertiaux wrote:
> Hi Bart,
>
> Could you please check what happens if you remove the CreateTopology 
> command ?
>
> V.
>
> 2014-09-03 5:17 GMT-05:00 Bart Vermeulen <bart.vermeulen at wur.nl 
> <mailto:bart.vermeulen at wur.nl>>:
>
>     Dear all,
>
>     I am trying to create a mesh starting with a STL model. This model
>     consists of 6 different surfaces. I use the file included below
>     (quite similar to one of the tutorials). When I load this into
>     gmsh I can see the geometry with the different surfaces. At the
>     corners of each of the surfaces there is a point (4 points for
>     each surface). The Compound lines connect these points directly
>     instead of following the geometry (see attached screenshot).
>     Obviously the meshing fails.
>
>     Any idea how to properly define the compound lines? (The surfaces
>     ar OK)
>
>     Thanks in advance,
>     Bart Vermeulen
>
>
>
>     Merge "mmbendo.stl";
>     CreateTopology;
>
>     // We can now define a compound line (resp. surface) for each discrete
>     // line (resp. surface) in the model
>     ll[] = Line "*";
>     For j In {0 : #ll[]-1}
>       Compound Line(newl) = ll[j];
>     EndFor
>     ss[] = Surface "*";
>     s = news;
>     For i In {0 : #ss[]-1}
>       Compound Surface(s+i) = ss[i];
>     EndFor
>
>     // And we can create the volume based on the new compound entities
>     Surface Loop(1) = {s : s + #ss[]-1};
>     Volume(1) = {1};
>
>     Physical Surface(1) = {s : s + #ss[]-1};
>     Physical Volume(1) = 1;
>
>     uniform = 1;
>     If(uniform)
>       // uniform mesh size...
>       Mesh.CharacteristicLengthMin = 15;
>       Mesh.CharacteristicLengthMax = 15;
>     EndIf
>     If(!uniform)
>       // ... or apply a funny mesh size field, just because we can :-)
>       Field[1] = MathEval;
>       Field[1].F = "2*Sin((x+y)/5) + 3";
>       Background Field = 1;
>     EndIf
>
>     Mesh.RemeshAlgorithm = 0; // (0) no split (1) automatic (2)
>     automatic only with metis
>     Mesh.RemeshParametrization = 7; // (0) harmonic (1) conformal
>     spectral (7) conformal finite element
>     Geometry.HideCompounds = 0; // don't hide the compound entities
>     Mesh.Algorithm = 6; // Frontal
>
>     -- 
>     Bart Vermeulen
>     Wageningen University, Department of Environmental Sciences
>     Hydrology and Quantitative Water Management Group
>     Postal address: Postbus 47, 6700AA Wageningen,The Netherlands
>     Visiting address: Room 0.C027, Droevendaalsesteeg 3,6708PB
>     Wageningen, The Netherlands
>     Tel. +31-317-482765 <tel:%2B31-317-482765> Fax +31-317-419000
>     <tel:%2B31-317-419000>
>     email: bart.vermeulen at wur.nl <mailto:bart.vermeulen at wur.nl>
>
>
>     _______________________________________________
>     gmsh mailing list
>     gmsh at geuz.org <mailto:gmsh at geuz.org>
>     http://www.geuz.org/mailman/listinfo/gmsh
>
>


-- 
Bart Vermeulen
Wageningen University, Department of Environmental Sciences
Hydrology and Quantitative Water Management Group
Postal address: Postbus 47, 6700AA Wageningen,The Netherlands
Visiting address: Room 0.C027, Droevendaalsesteeg 3,6708PB Wageningen, The Netherlands
Tel. +31-317-482765 Fax +31-317-419000
email: bart.vermeulen at wur.nl

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20140910/834e7763/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gmsh_messages.log
Type: text/x-log
Size: 2136 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20140910/834e7763/attachment.log>