Patch with Splines

Patch with Splines

Anonymous
Not applicable
830 Views
3 Replies
Message 1 of 4

Patch with Splines

Anonymous
Not applicable

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."

 

 

0 Likes
831 Views
3 Replies
Replies (3)
Message 2 of 4

ekinsb
Alumni
Alumni

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
0 Likes
Message 3 of 4

Anonymous
Not applicable

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

 

Thanks for the quick reply.  Merry Christmas!

0 Likes
Message 4 of 4

Anonymous
Not applicable

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.

0 Likes