12.08.2026 - 08:53
*
Hello,
I am trying to geometrically subtract one PythonPart from another.
Everything works fine until the final step.
Note: This involves a ScriptObject.
Behavior – functional:
1. Subtraction of the other PythonPart from the geometry of the executing ScriptObject
2. Creation of the object:
return CreateElementResult(
elements=model_element_list,
handles=handle_list,
connect_to_ele=connect_to_elements
)Result: The bodies are separated, and the geometric subtraction is retained.
Behavior – wrong:
1. Subtraction of the other PythonPart from the geometry of the executing ScriptObject
2. Creation of the object:
pyp_util = PythonPartUtil()
pyp_util.add_pythonpart_view_2d3d(model_element_list)
pythonpart = pyp_util.create_pythonpart(self.build_element)
return CreateElementResult(
elements=pythonpart,
handles=handle_list,
connect_to_ele=connect_to_elements
)Result: The PythonPart is present as an element, but the geometric subtractions are not performed.
Note: The subtraction is visible during the preview while editing, but it disappears after exiting with the Esc key.
What is causing this behavior?
Thanks!