You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using boolean operations (subtract/unite etc.) on a geometry using the native CAD utilities, we get a boolean return value (True/False). If further operations on the given object are needed, you'll need to know at least the name/id of the object.
For example if we create two boxes box1 = m3d.modeler.create_box(origin=["0.5*aMx", "-0.5*aMy+(aMy-tCy)/2", "-0.5*aMz"], sizes=["lCx","lCy","tCz"], material=ucore_mat.name, name="Box1") box2 = m3d.modeler.create_box(origin=["0.5*aMx" ,"0.5*tCy" ,"-0.5*aMz"], sizes=["lCx-tCx","lCy-2*tCy","tCz"], name="Box2")
And apply a subtraction between both of them m3d.modeler.subtract(blank_list=[box1],tool_list=[box2], keep_originals=False)
This last operation returns True/False depending. If I want to perform further operations on the object that last operation created, I'd have to know the default name created on AEDT, which is normally the combination of the name of the original geometry and some prefix and/or some index.
Code sample expected
Ideally, the return value should be modified so that when you perform the boolean operation of your choice it returns an object so that
Description of the current limitations
When using boolean operations (subtract/unite etc.) on a geometry using the native CAD utilities, we get a boolean return value (True/False). If further operations on the given object are needed, you'll need to know at least the name/id of the object.
For example if we create two boxes
box1 = m3d.modeler.create_box(origin=["0.5*aMx", "-0.5*aMy+(aMy-tCy)/2", "-0.5*aMz"], sizes=["lCx","lCy","tCz"], material=ucore_mat.name, name="Box1")
box2 = m3d.modeler.create_box(origin=["0.5*aMx" ,"0.5*tCy" ,"-0.5*aMz"], sizes=["lCx-tCx","lCy-2*tCy","tCz"], name="Box2")
And apply a subtraction between both of them
m3d.modeler.subtract(blank_list=[box1],tool_list=[box2], keep_originals=False)
This last operation returns True/False depending. If I want to perform further operations on the object that last operation created, I'd have to know the default name created on AEDT, which is normally the combination of the name of the original geometry and some prefix and/or some index.
Code sample expected
Ideally, the return value should be modified so that when you perform the boolean operation of your choice it returns an object so that
final_box = m3d.modeler.subtract(blank_list=[box1],tool_list=[box2], keep_originals=False)
Useful links and references
No response
The text was updated successfully, but these errors were encountered: