split_body command issue #2132
harikrushna171
started this conversation in
General
Replies: 2 comments
-
Hi @harikrushna171! Thanks for reaching out! This is a very good catch. This is definitely a bug in our API definition which we will try to solve ASAP but the good thing is that there is a temporary workaround. Try calling your API with the following inputs: modeler.geometry_commands.split_body(slice_body, plane=plane_slice, slicers=None, faces=None, extendfaces=***) Make sure to adapt the input to |
Beta Was this translation helpful? Give feedback.
0 replies
-
Dear Roberto,
Thank you for your support.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Dear community,
I have installed ANSYS 25R2 and would like to use the split command, which requires bodies and a plane. I used one plane and two bodies as needed, but I received the following error: "GeometryCommands.split_body() missing 3 required positional arguments: 'slicers', 'faces', and 'extendfaces'".
`from ansys.geometry.core import launch_modeler
from ansys.geometry.core.math import Point2D, Plane, Point2D, Point3D, Vector3D
from ansys.geometry.core.misc import UNITS, DEFAULT_UNITS
from ansys.geometry.core.sketch import Sketch
DEFAULT_UNITS.LENGTH = UNITS.mm
modeler = launch_modeler()
print(modeler)
sketch_box = Sketch().box(Point2D([0, 0]), width=300, height=400)
design = modeler.create_design("example_design")
body_1 = design.extrude_sketch("body_1", sketch_box, 500)
plane_1 = Plane(origin=Point3D([0,150,0]), direction_x=Vector3D([0,1,0]), direction_y=Vector3D([0,0,1]))
sketch = Sketch(plane_1)
sketch.box(Point2D([0,0]), 300, 300)
body_2 = design.extrude_sketch("body_2", sketch, 1000)
slice_body = [body_1, body_2]
plane_slice = Plane(origin=Point3D([0,180,0]), direction_x=Vector3D([0,1,0]), direction_y=Vector3D([0,0,1]))
modeler.geometry_commands.split_body(slice_body, plane = plane_slice)
design.plot()`
Beta Was this translation helpful? Give feedback.
All reactions