Message 1 of 4
Bug? createRational and createNonRational NurbsCurve2D
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Has anyone tried creating a rational or non-rational 2D nurbs curve? It keeps throwing an "invalid argument controlPoints" runtime error: 3.
If I'm doing something wrong I just can't see it. As far as I can determine I'm passing the appropriate Point2DVector for the controlPoints argument.
createNonRational and createRational functions are supposed to be static functions (according the the API ref manual), and aren't tied to any specific F360 object. I'm using Pandas to manage the data, but I can't see that being too relevant.
Any suggestions? Is this a bug?
Peter
data = self.data.to_dict('records')
points = [adsk.core.Point2D.create(row['dist'], row['offset']) for row in data] #convert data points to 2D points
knots = [0.0 for x in range(4)] + [x/len(points) for x in range(len(data))] + [1.0 for x in range(5)]
weights = [ 20 for x in range(len(data))]
scribeCurveNR = adsk.core.NurbsCurve2D.createNonRational(points, 1, knots, False)
scribeCurveR = adsk.core.NurbsCurve2D.createRational(controlPoints = points,
degree = 1,
knots = knots,
weights = weights,
isPeriodic = False)
I'm not an expert, but I know enough to be very, very dangerous.
Life long R&D Engineer (retired after 30+ years in Military Communications, Aerospace Robotics and Transport Automation).
Life long R&D Engineer (retired after 30+ years in Military Communications, Aerospace Robotics and Transport Automation).