Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Extract curve from IGES and test if it's Linear or circular

Hi I would like to know if it is possible to select one or multiple edges of an IGES or STEP file and then extract the curves via Python.
Is it also possible to test individual edges and know if they are arcs or lines or splines?
Sincerely Stefano Branca
Hi Stefano,

Yes, this is possible. I recommend you to take a look at the example attached. It shows how to extract curves from objects.

You can iteratively extract curves inside an object by using GetPoints()

# Turn Off rendering (faster)

# Iteratively look for curves
curve_id = 0
while True:
   # Retrieve the curve points
  curve_points, name_feature = object_features.GetPoints(FEATURE_CURVE, curve_id)
   curve_id = curve_id + 1
   npoints = len(curve_points)
   if npoints == 0:
# No more curves found

  curve_points # holds the points in the curve

Attached Files
.py (Size: 3.47 KB / Downloads: 545)

Users browsing this thread:
1 Guest(s)