Create and loft NURBS curves through API

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi. I am working on a script for Autodesk Fusion in which I am attempting to read a csv file containing NURBS curve information (wing profiles with open trailing edge), create these curves, close off the open end by a curve between the end points and loft the resulting closed profiles into a solid body. Everything works well except the last step, where Fusion in what is seemingly a random selection of the created curves, refuses to acknowledge the combination of two open splines with common end points as a closed-off profile. This naturally makes it impossible to add the profile to a list of loft section objects, and leads to an error message.
As a test I attempted to manually repeat the behavior of the script in the GUI, creating a sketch in the plane of the open spline, projecting the open spline into the sketch and closing it off with a spline between the two end points. Also in this case Fusion does not recognize the resulting two-part curve as a closed profile.
If anyone has experienced similar behavior when attempting to close off spline curves in sketches in Fusion, and have any idea on how to fix this issue, it would be great to get to know about it.
As a backup plan I migth go to the Patch environment, loft the imported open curves manually, loft the open end and stitch the surfaces together, but this involves an unpleasant amount of manual clicking on lines as the geometry in question consists of some 50 cross-section lines. I have attempted to find information on how to implement this procedure in a script, but I cannot seem to find any way of lofting open curves through the API. If anyone has tips on this part that would also be great!
I am attaching my script and a sample file of NURBS control points, in case that might clarify my issue (I had to change the file extension on the python script in order to be allowed to upload it). On line 39 of the script a variable is defined, dictating the number of curves from the input file that shall be included in the import. The first 8 work well, but after this some of the curves are seemingly not possible to use in a closed profile. Increasing the variable to a number larger than 8 and running the script gives an error message.