subtract#

Modeler3D.subtract(blank_list: str | int | list | Object3d, tool_list: str | int | list | Object3d, keep_originals: bool = True) → bool#

Subtract objects.

Parameters:
blank_liststr, Object3d, int or List of str, int and Object3d.

List of objects to subtract from. The list can be of either ansys.aedt.core.modeler.cad.object_3d.Object3d objects or object IDs.

tool_listlist, str

List of objects to subtract. The list can be of either Object3d objects or object IDs.

keep_originalsbool, optional

Whether to keep the original objects. The default is True.

Returns:
bool

True when successful, False when failed.

References

>>> oEditor.Subtract

Examples

>>> from ansys.aedt.core import Hfss
>>> from ansys.aedt.core.generic.constants import Axis
>>> app = Hfss()
>>> c1 = app.modeler.create_cylinder(Axis.X, [0, 0, 0], 10.0, 200)
>>> c2 = app.modeler.create_cylinder(Axis.X, [0, 0, 0], 3.0, 200)
>>> app.modeler.subtract(c1, c2, keep_originals=True)