[Gmsh] Compound lines in STL
Vincent Libertiaux
vincent.libertiaux at gmail.com
Wed Sep 10 18:58:43 CEST 2014
Hi Bart,
Is it possible for you to send the STL file so that I can play with it ?
Thanks,
V.
2014-09-10 6:07 GMT-05:00 Bart Vermeulen <bart.vermeulen at wur.nl>:
> 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>:
>
>> 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 Fax +31-317-419000
>> email: bart.vermeulen at wur.nl
>>
>>
>> _______________________________________________
>> gmsh mailing list
>> 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/b9568725/attachment.html>