-
I got an error when using the revolving command when the sketch length is over 500 or so, I can build the model normally when the sketch length is less than 500. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
Hi @XiongHuyu! Thanks for opening this discussion. Would it be possible for you to share the script so that I can debug it on my side as well? We have seen some space limitations from time to time. Especially when the domain space is too big. But this is a limitation of the CAD products (SpaceClaim/Discovery/Geometry Service) rather than PyAnsys Geometry. Also, can you share as well which CAD product you are using it with? |
Beta Was this translation helpful? Give feedback.
-
Hello @RobPasMue ! I am using SCDM and here is my script. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the inputs @XiongHuyu! I'll take a look at it ASAP. In the meantime, what version of SCDM are you using? 24R1, 24R2? |
Beta Was this translation helpful? Give feedback.
-
Hi @XiongHuyu! I just verified (sorry for the delay) and it seems that the issue is related to the modeling space available in SpaceClaim. Being the default units millimeters in SCDM, you are trying to create an object that is too big in terms of size. The following script is assuming that you are changing the default units on the client side to millimeters as well: from ansys.geometry.core import launch_modeler_with_spaceclaim
from ansys.geometry.core.sketch import Sketch
from ansys.geometry.core.misc import UNITS, Angle, DEFAULT_UNITS
from ansys.geometry.core.math import Plane, Point2D, Point3D, UNITVECTOR3D_X, UNITVECTOR3D_Y
DEFAULT_UNITS.LENGTH = UNITS.mm
m = launch_modeler_with_spaceclaim()
design = m.create_design("test")
path_radius = 5
profile_radius = 2
plane_profile = Plane(
origin=Point3D([0, 0, 0]),
direction_x=UNITVECTOR3D_X,
direction_y=UNITVECTOR3D_Y,
)
profile = Sketch(plane=plane_profile)
profile.box(Point2D([250, 250]), 500, 500)
profile.plot()
design.revolve_sketch(
"test-body",
sketch=profile,
axis=UNITVECTOR3D_Y,
angle=Angle(90, UNITS.degrees),
rotation_origin=Point3D([0, 0, 0]),
)
design.plot()
m.close() The critical part that changes is the following: Another option is that you change the default units used in SCDM to meters instead of millimeters. Once you change that in the settings, you can also do the following so that the changes are taken into account on the client side: from ansys.geometry.core.misc import DEFAULT_UNITS
DEFAULT_UNITS.SERVER_LENGTH = UNITS.m |
Beta Was this translation helpful? Give feedback.
Hi @XiongHuyu! I just verified (sorry for the delay) and it seems that the issue is related to the modeling space available in SpaceClaim. Being the default units millimeters in SCDM, you are trying to create an object that is too big in terms of size. The following script is assuming that you are changing the default units on the client side to millimeters as well: