SketchFittedSpline, add fitPoints

SketchFittedSpline, add fitPoints

Anonymous
Not applicable
817 Views
2 Replies
Message 1 of 3

SketchFittedSpline, add fitPoints

Anonymous
Not applicable

In the API, I'm trying to edit a fittedSpline to add/edit/remove points pragmatically.  While editing/removing sketchFittedSpline.fitPoints works fine, via the SketchPoint.deleteMe() and SketchPoint.move() methods. SketchPointList offers no way to add a new SketchPoint.

 

Any attempts to do it via any python List.* methods usually result in crashing Fusion360, entirely.  This includes list.insert, list.append, etc.  It would also seem that SketchPoints cannot be deleted in this fashion, either.

 

In the GUI, there's clearly an "Insert Spline Fit Point" that can add a new, editable fit point to an existing spline.  Since the fitPoints SketchPointList is readonly, there is no way to simply generate/replace the list itself - that would mean I can only delete/replace to add detail to a curve. This seems like an oversight...I just need to insert a new fit point! Is there another way?

Accepted solutions (1)
818 Views
2 Replies
Replies (2)
Message 2 of 3

BrianEkins
Mentor
Mentor
Accepted solution

This capability is missing from the API.  The only workaround that I can think of is to capture the needed information from the existing spline, delete it, and then create a new one with the additional point.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 3 of 3

Anonymous
Not applicable

@BrianEkinsThanks.  Additionally, it would seem that SketchFittedSpline.extend doesn't function the way I expect, either - in that it won't connect to another spine, or point.  Build from scratch, it is.