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

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

#1
Lightbulb 
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
#2
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()

Code:
# Turn Off rendering (faster)
RDK.Render(False)

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

  curve_points # holds the points in the curve


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




Users browsing this thread:
1 Guest(s)