-
-
July 28, 2023 at 1:36 pm
Jake
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.
-
- The topic ‘SpaceClaim Scripting Get Edge Type’ is closed to new replies.
- FSAE CFD – Lesson 1 Preparation question (Using Discovery)
- Script for subtracting models
- Project lines/edges into a face with the direction normal to the face
- Multiple Instances of SpaceClaim taking multiple licenses
- No preview in explorer with scdox file
- Spaceclaim file reference error
- Issues after installing new service pack 2024R1 (sp5)
- Add-in Error Excel
- Problems with loading my Discovery Mesh into Fluent
- Missing SubDivWrapper.dll
-
3862
-
1414
-
1231
-
1118
-
1015
© 2025 Copyright ANSYS, Inc. All rights reserved.