[Gmsh] How can I classify faces of an imported OPEN CASCADE geometry by color?

2019-11-05 Thread Wesley Ranger
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

Re: [Gmsh] How can I classify faces of an imported OPEN CASCADE geometry by color?

2019-11-05 Thread Christophe Geuzaine
> On 5 Nov 2019, at 15:32, Wesley Ranger 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

Re: [Gmsh] How can I classify faces of an imported OPEN CASCADE geometry by color?

2019-12-09 Thread Wesley Ranger
Thank you, Christophe. I had implemented the function this weekend. My python code is like below: ```python ens = gmsh.model.getEntities() G_INIT_Tags = [] G_SYM_Tags = [] G_HIL_Tags = [] VOLUME_G_Tags = [] for crtEntity in ens: crtDim = crtEntity[0] crtTag = crtEntity[1] crtColor = g