-
-
July 28, 2023 at 1:36 pm
Jake Garrison
SubscriberHello,
I have two questions:
1. How can I tell the difference in SpaceClaim scripting between a circle, arc or stright line?2. Given a face on a body, how does SpaceClaim decide which edge on the body is zero indexed?
Thanks.
-
August 1, 2023 at 5:25 pm
mjmiddle
Ansys EmployeeGiven that "curve" variable below is DesignCurve or DesignEdge type such as retrieved by curve = GetRootPart().Bodies[0].Edges[0]:
curveType = curve.Shape.Geometry.GetType()
if curveType == Circle:
# Arc
elif curveType == Line:
# Line
elif curveType == NurbsCurve:
# Spline
elif curveType == PointCurve:
# PointSorry, but there is no logic I can report on how the index designation is given for curves/edges.
In scripting, you need to decide your own logic on how you will determine how to retrieve an intended curve/edge. If your script operates on a pre-existing geometry you can place curves/edges into named selection groups first and then have the script get the entities in the named selection for the names of your choice. If your script creates everything, you can use a sortof bottom-up approach (create curves then surfaces from curves, then bodies from surfaces) to creating geometry so you still have the curves (saved to variable) used in creating faces/bodies. And get the returned entities from creation functions. Or maybe you can get certain curves/edges by a simple logic of max/min XYZ for its endpoints. Or maybe you can get certain curves/edges by their connections to other known curves/edges. You need to get a little creative with your logic on how to retrieve intended geometry when scripting.
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- How to work with STL file?
- Rotate tool in ANSYS Design Modeler
- section plane
- Using Symmetry in DesignModeler and Expanding the Results
- ANSYS FLUENT – Operation would result in non manifold bodies
- drawing a geometry by importing a table of points
- material properties
- Coordinates orientation
- “contact pair has no element in it.” how to resolve this problem
- Parameters not imported into Workbench 18.2 from Solidworks/Inventor
-
7592
-
4440
-
2953
-
1427
-
1322
© 2023 Copyright ANSYS, Inc. All rights reserved.