Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modeler's boolean operations don't return object #5720

Open
jvela018 opened this issue Feb 3, 2025 · 0 comments
Open

Modeler's boolean operations don't return object #5720

jvela018 opened this issue Feb 3, 2025 · 0 comments
Assignees
Labels
enhancement New features or code improvements

Comments

@jvela018
Copy link
Contributor

jvela018 commented Feb 3, 2025

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

@jvela018 jvela018 added the enhancement New features or code improvements label Feb 3, 2025
@jvela018 jvela018 self-assigned this Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or code improvements
Projects
None yet
Development

No branches or pull requests

1 participant