[Gmsh] How to know the elementary entities list created when merging a step file

Christophe Geuzaine cgeuzaine at ulg.ac.be
Fri Mar 15 18:52:18 CET 2013


On 15 Mar 2013, at 15:25, NENNIG Benoit <benoit.nennig at supmeca.fr> wrote:

> Dear gmsh team,
> 
> I would like to put some "complex" 3D part in a cube, then to mesh the complementary volume (cube - the part), to set Physical groups and to save it automatically.
> 
>> the complex 3D shape comes from FreeCAD using step format for instance
>> the reminder of the tasks are performed in gmsh geo-script
> 
> Everything works fine, I can do what I need at hands, but I need to make it automatically.
> To do that, I didn't know how to
> - find the boundary surfaces list of an "opencascade" volume, the command boundary seems limited to native gmsh geometrical instances:
> Vol2Suf[] = Boundary { Volume{1 };};    // Volume 1 is the step part.
> Error   : Impossible to take boundary of entity 1 (of type 402)
> 

Hi Benoit - This should be fixed in version 2.7: can you give it a try? (Note that you probably want to use "CombinedBoundary" instead of Boundary)

> OR
> - How to get the list of all elementary existing surfaces and volumes in a script, If think it is possible because the menu "visibility" provides this list !
> 

ss[] = Surface "*";
vv[] = Volume "*";

should do the trick.

Hope this helps,

Christophe


> If I get such information I think my problem will be solved ;-)
> 
> If it is not possible, perhaps, I can simply count the volume and surface creation keywords in the .step file but if there is some more elegant way, it would be nice ;-)
> 
> Thank for your suggestions,
> 
> Regards,
> 
> Benoit
> 
> 
> 
> _______________________________________________
> 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