Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Patch with Splines

3 REPLIES 3
Reply
Message 1 of 4
darinAZY43
522 Views, 3 Replies

Patch with Splines

I am trying to create a surface from a connected spline.  This works in the UI using the patch tool, but fails using the API.  Any ideas?  Here is an example:

points = adsk.core.ObjectCollection.create()

points.add(adsk.core.Point3D.create(0, 0, 0))

points.add(adsk.core.Point3D.create(5, 1, 0))

points.add(adsk.core.Point3D.create(7, 6, 6))

points.add(adsk.core.Point3D.create(2, 3, 0))

points.add(adsk.core.Point3D.create(0, 0, 0))

testSpline = sketchFront.sketchCurves.sketchFittedSplines.add(points)

 

patches = rootComp.features.patchFeatures

patchInput = patches.createInput(testSpline, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

patches.add(patchInput)

 

This fails with:

"Input curves are not on the same plane."

 

 

3 REPLIES 3
Message 2 of 4
ekinsb
in reply to: darinAZY43

I've reproduced the problem and have filed a defect.  Thanks for reporting this.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 3 of 4
darinAZY43
in reply to: ekinsb

Dang it!  I was hoping you would tell me I was doing something wrong.

 

Thanks for the quick reply.  Merry Christmas!

Message 4 of 4
dahousecat
in reply to: darinAZY43

I just ran your code and worked fine for me and producted this:

 

test-patch.png

I guess this has been fixed now.

 

Anyway, thankyou for proving an example of how to use multiple points to create a patch.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report