Please check out attached file. How to get curves unrolled easiest from the complex shape to simple z-axis layered curves.
I made that rotating every single curves to z axis. It took some time and this was just a simple sample. In real life I have hundreds or even thousands curves to get to z-layer. Dimensions should stay equal.
do you need each point to be an interruption of the lines? either way the only idea i can contribute is to use remap cplane for the orthogonal lines from each appropriate view, and the others you have to manually rotate or read out the length and recreate. maybe it has sense writing a little python script if you are dealing with a lot of curves. reading into python may still be faster then.
but why would you need that, maybe there is another solution which suits your needs even better?
Hi!
Thank you everybody trying to help me! I appreciate it.
Pascal that is great python! Not Perfect but great! Saves a lot of my time, Thank You!
How to run python script without “RunPythonScript” and then go to downloaded folder and choose the script from there?
If it is easy to tune script, it would be great to have same coloured result like the original. If it is big job, I can live with this
Hi!
Thank you very much Pascal! I admire your skills
One more thing I noticed about the script.
It works only with straight curves. It does not work with rounded/curved curves.
I made an other same kind of sample, maybe it is too difficult to get in to real life. It’s ok if too difficult, but awesome if possible to make without using days/weeks… unroll curves sample 2.3dm (649.9 KB)
Is it possible to make a button for python script? Just press the button and it works without “RunPythonScript”-> choose folder, choose downloaded script etc…
Hi Wagner - yeah, I made it work on polylines, since that is what you had in your file I’ll see about making it work on polycurves in general.
Looking at your file, though, it looks like you’re not even dealing with polycurves but randomly self-intersecting curves - that is not really what you mean is it?
See my description above for how to run a python script from a button.
Here is a version that will straighten more curve types:StraightenCurves.py (1.2 KB)
Thank you very much! Now it works well for me
Great customer support!
Yes I did my sample fast and tried to use couple different line/curve types. Electric cable is never straight so that’s exact enough… I think we will draw electric harnesses with Interpolate Curves…
It will not straighten single straight curve, because it asks “polycurve”. (cyan)
But it straigtens single curved curve. (green)
Is there some Rhino command to straighten single straight ones?
If 2 straight curves added to be polycurve, it will make it.
In white polycurve, there was straight line inside the polycurve and it made it great.
Does it has to be 2 or several scripts or is it possible to include to the one script?
I mean no matter, what kind of (single/poly/curved/straight) curve/line, it still makes it…
Hi Pascal. Sorry to bother you with this again I made a curve on a mesh (a route I walked in a landscape). Your Python can unroll it in a straight line. But is it possible to unroll it to a 2D Curve with the length in the x direktion and then (in my case) the height i the terrain in the z direction. So that I have a section through the route I walked.
I hop eyou understand my question And that you can help me.
Thanks in advance
Maybe this will work for you? It takes a polyline, uses the projected XY distance between polyline points plus the correct Z height of each point to make a new polyline along the X-Axis - like a profile of your ‘walk’.
I assumed this was the case - a “curve on a mesh” is normally a polyline. It’s certainly possible to do the same with a smooth NURBS curve, it would just require sampling the curve at various points. The finer the sampling, the better the reproduction would be.
You can test if the script would do what you want by using the Convert command to convert your smooth curve into a polyline (just for the test). there are sampling options in that command to produce finer or coarser results. Then try that with the script and see if the result resembles what you want.