How to prevent zigzags during curve rebuild? This is WIP but v7 looks same.
Why are you using degree 11?
because I wanted to divide it into two curves which have 6 control points (each). This curve comes from a 3d scan (overdrawn 3d scan in mesh2surface).
I wanted to convert it to two single-span curves. Because one single span curve is not enough to describe that shape.
Hello- can you post the input curve in a Rhino file?
-Pascal
I believe that it can be done with the “Split and rebuild” tool, which hopefully will be available before the release of Rhino 12.
CurveTest.3dm (39.6 KB)
I wanted to take out long curve from 3d scan. I take them quite exact. That’s why It has more control points. During making that in m2s I have splines which are converted to nurbs curve. In m2s I have different control point count. In m2s I have 12 after coming to Rhino I have 13. I planned to have it as two single-span surfaces. So that`s why I want to split that curve and rebuild. During rebuild, I loose also continuity which is not nice either because during matching average later my curve is off the scan.
You will ask me why I built that curve in m2s plugin instead of Rhino. The answer is that there is a tolerance feature and I can see how far is my curve from original mesh. But in M2S I can`t steer how much CP has my curve because there I create splines, not nurbs curve.
I know that many of you doing that somehow but for now, I feel stupid because I can`t convert long curves into shorter ones with nice CP distribution. If my curve will have zigzags then my surface created from those curves also will have zigzags and won’t be nice.
Where can I find that? Is it a sci-fi tool?
For now -
! _SelNone _Rebuild SubCrv _Pause _Pause _Pause
_SubCrv _Pause _Pause _Pause _Enter _SelLast
-Pascal
It’s a fictional tool that hopefully will be made some day in the bright future.
Sorry, but I don`t get it. Could you say something more about why this should work? Why SubCrv is here?
Is that because Subcrv also reduces control point count and that improves rebuild working (because rebuild has a problem to rebuild more than 6CP without zigzags)? Am I right?
Another pros is that tool wont destroy continuity during split.
Splitting a single span degree 11 curve with 12 control points results in two single span degree 11 curves each with 12 control points. (NOT two two single span degree 5 curves each with 6 control points.) This is how NURBS work.
You could Rebuild the curve as degree 5 with 7 control points which results in curve with 2 spans. Then Split the curve at the internal knot to obtain two degree 5 curves, each with 6 control points.The two single span curves will have C4 continuity.
What do you mean by a spline not being a NURBS curve? Rhino uses NURBS for all curves (except for some special cases such as arcs).
Hello- I don’t know if it should “work” if you dont want to split a curve in two and rebuild each bit, which is what I understood - If you don’t want to do that then the macro is useless.
If it is helpful then this may be a little cleaner and more flexible - it just automates some of the splitting.
SplitAndRebuild.py (1.9 KB)
To use the Python script use RunPythonScript
, or a macro:
_-RunPythonScript "Full path to py file inside double-quotes"
-Pascal
Yes, it worked. Thanks.
Splitting a single span degree 11 curve with 12 control points results in two single span degree 11 curves each with 12 control points.
I know that but when I would rebuild that 13CP curve which describes my scan shape to 6CP then I would loose that shape. That’s why I wanted to split 13CP into 2x13CP and rebuild after that to 2x6CP. But rebuilding destroyed my continuity so I thought that I simply delete 6CP(2x6CP) and I would have what I needed. That’s why I wanted to rebuild 13CP to 12CP. I didn`t know SubCrv.
I’ve tried it. Nice I haven`t known that trick. Could you tell me how that happened?
ConvertToBeziers
will get there as well on the 2 span curve.
-Pascal
Thanks. I haven`t known that too.