[Gmsh] simple question

Geordie McBain gdmcbain at freeshell.org
Thu Feb 24 01:46:39 CET 2011


2011/2/24 Cristóbal Bertoglio B. <cristobal.bertoglio at inria.fr>:
> Hello,
>
> we processed an stl file (with 3matic) where we have at the end
> different surfaces (differenciated by colors at the moment of
> exporting). Then, when opening them with Gmsh it we're not able to get
> back the surfaces separated.
>
> It is possible to get the surfaces separated at the moment of
> importing the stl file to Gmsh ?

I don't think 'color' is part of the STL file format.  Perhaps this is
a `3matic' extension?

What I do in such circumstances is export the different parts of the
surface as separate STL files, e.g. inlet.stl, wall.stl, and
outlet.stl.  Then merge them separately in Gmsh, as shown in this
domain.geo:

%<---domain.geo---
Merge "inlet.stl";
Merge "outlet.stl";
Merge "wall.stl";

CreateTopology;

Compound Surface (100) = {1};
Compound Surface (200) = {2};
Compound Surface (300) = {3};

Physical Surface (1) = {100};
Physical Surface (2) = {200};
Physical Surface (3) = {300};
Surface Loop (1) = {100, 200, 300};
Volume (1) = {1};
Physical Volume (4) = {1};
%<---end of domain.geo

Can you export the `colors' as separate STL surfaces?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inlet.stl
Type: application/vnd.ms-pki.stl
Size: 25210 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20110224/e1dbb011/attachment.stl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wall.stl
Type: application/vnd.ms-pki.stl
Size: 48961 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20110224/e1dbb011/attachment-0001.stl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: outlet.stl
Type: application/vnd.ms-pki.stl
Size: 25601 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20110224/e1dbb011/attachment-0002.stl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: domain.geo
Type: application/octet-stream
Size: 338 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20110224/e1dbb011/attachment.geo>