Hello,
I am trying to intersect two 3D shapes to get a common face and assign it to a group.
When I employ MakeSection (or MakeBoolean with parameter 4) like
section_intersect_lens_air = geompy.MakeSection(lens, air)
or
section_intersect_lens_air = geompy.MakeBoolean(lens, air, 4)
I can add the result to the study
However, the result doesn’t seem to be a shape (contrastingly to what the docs mention).
Instead if check it type using the command below I get a BOOLEAN
print( section_intersect_lens_air )
print( type(section_intersect_lens_air) )
print( geompy.ShapeIdToType(section_intersect_lens_air.GetType()) )
<GEOM._objref_GEOM_Object object at 0x000001A800041320>
<class 'GEOM._objref_GEOM_Object'>
BOOLEAN
How can I get a shape/face from the intersection to assign it to a meshing group, which requires a shape as argument type?
*** EDIT ***
I found that it is possible to create a face from result of the intersection in the GUI with the ‘build Face’ command
However, I can’t seem to be able to create the face programmaticaly with any of the methods suggested in the docs
# section_intersect_lens_air = geompy.MakeFaceFromSurface(geompy.MakeBoolean(lens, air, 4), True)
# section_intersect_lens_air = geompy.MakeFaceWires([geompy.MakeBoolean(lens, air, 4)], 1)
# section_intersect_lens_air = geompy.MakeFace(geompy.MakeBoolean(lens, air, 4), True)
Many thanks,
Francisco