Message 1 of 4
NurbsCurve3D.extract always throws exception
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
When I try to call the extract method on a NurbsCurve3D object, I get a RuntimeError with the message "RuntimeError: 3 : invalid argument startParam".
For example:
import adsk.core
import adsk.fusion
import traceback
def run(_):
try:
brep = adsk.fusion.TemporaryBRepManager.get()
cylinder = brep.createCylinderOrCone(
adsk.core.Point3D.create(0, 0, 0),
1,
adsk.core.Point3D.create(0, 0, 1),
1)
for face in cylinder.faces:
if isinstance(face.geometry, adsk.core.Plane):
nurbs = face.edges[0].geometry.asNurbsCurve
print(nurbs.evaluator.getParameterExtents())
extracted = nurbs.extract(1.0, 2.0)
print(extracted)
except Exception as ex:
print(traceback.format_exc())
which results in:
[True, 0.0, 6.283185307179586]
Traceback (most recent call last):
File "[...]\test.py", line 36, in run
extracted = nurbs.extract(1.0, 2.0)
File "[...]/AppData/Local/Autodesk/webdeploy/production/c23c4c7ff2652eaacfec153295bbc3d6e4b9657f/Api/Python/packages\adsk\core.py", line 24329, in extract
return _core.NurbsCurve3D_extract(self, *args)
RuntimeError: 3 : invalid argument startParam
The above exception was the direct cause of the following exception:
SystemError: <built-in function delete_BRepFaces> returned a result with an error set
Seems like a bug in the API?