Message 1 of 4
Patch with Splines

Not applicable
12-18-2016
09:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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."