Unable to get a result from Curve.Fit

I have been unable to get any result from calls to Curve.Fit

The server response is None if anything goes wrong with no indication of what the error is.
Just wondering if anyone has been able to use the Curve.Fit function successfully?
Perhaps an example?

rhino/geometry/curve/fit-curve_int_double_double

Thanks!

Hi @josh8,

If you ran an equivalent script locally, would it work?

– Dale

Hi @dale,

@josh8 has now tried it with a curve that has been successfully used with rhinoscriptsyntax.FitCurve(…) but output from compute_rhino3d.Curve.Fit(…) is still just None.

You should share a minimal code example. Just to make sure you call it correctly.

Hi, there is not much to it

import rhino3dm as r
import compute_rhino3d as rc

model = r.File3dm.Read("curve.3dm")
crv = model.Objects[0]
geom = crv.Geometry
result = rc.Curve.Fit(geom, geom.degree, 1.0,1.0)

the result always = None
the curve object is a nurbscurve

curve.3dm (31.6 KB)

I can confirm that the result is null through Rhino.Compute, but works fine with RhinoCommon. I filed a bug: https://github.com/mcneel/compute.rhino3d/issues/144

1 Like

Thanks @fraguada!