> On 5 Nov 2019, at 15:32, Wesley Ranger <met...@outlook.com> wrote:
> 
> Say we have an uncertain polyhedron, which is built via CAD software. Some of 
> its faces contact with other objects and are thus painted red, and the other 
> faces are painted blue.
> 
> Naturally, I want to *Merge* the shape into Gmsh, and assign the faces into 
> different physical groups by color. I am glad to see that the OpenCASCADE CAD 
> kernel is now able to read "color & label information" from step files. But I 
> haven't managed to find any clue on utilizing such information to set meshing 
> options.
> 
> Can someone please show me an example to do this? Either script or API is OK.
> 

See e.g. 
https://gitlab.onelab.info/gmsh/gmsh/blob/master/demos/api/step_assembly.py, 
which shows how to exploit labels. Colors can be accessed in a similar way 
(using getColor instead of getName).

Christophe




> Best Regards
> 
> Ran Wei
> _______________________________________________
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine




_______________________________________________
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh

Reply via email to