RebuildCrvNonUniform has different behaviours if works over one curve or several curves... weird!

Hi there folks!

Hi have Rhino 6.29 and I use everyday RebuildCrvNonUniform hundreads of times.
I found that it has different behaviours if selected to rebuild one curve (works as expected) or if I have several curves… sometimes it works well in 2 or 3 selected curves, just as if you do it one by one selected.

Rhino version:

I’ve uploaded a video so it can be easily understood.
I see this as a bug, but maybe there is a workaround… could i do some script to repeat RebuildCrvNonUniform over each of the selected curves?

Video:

Thanks ahead :wink:

Hello - thanks, please post a file that has multiple curves that do not work as expected.
-Pascal

Hi @pascal,

while i was trying to report a bug about this topic this thread was suggested to me by discourse.

Attached are some example curves which i’m trying to rebuild non uniformly. The results are different if you try to rebuild all curves at once or only the blue ones. Using only the blue curves the results are acceptable but if all curves are rebuild with below settings, the blue curves get way too much points.

RequestedTolerance=0.01
MaxPointCount=1024
Quarters=No
DeleteInput=Yes

RebuildCurveNonUniform.3dm (177.6 KB)

PS: Is there a RhinoCommon command to do this despite FitCrv ?

thanks,
c.

Hi Clement, I see that, thanks. I guess anytime you rebuild curves together the output curves will always have the same structure and that will always be the more complex one.
I do not know of a RhinoCommon method for this, no.

-Pascal

Thanks @pascal,

i guess i need to write something on my own. There is this request for an equivalent C++ method but it’s 4 years old.

Since the command does not treat curves individually i guess RebuildCrvNonUniform is probably not the right thing. Initially those polylines are all joined. So i started with some angle based breaking first in order to process the segments individually…

edit: this is actually pretty close.
_
c.