I have written the following code that unroll all lines which are selected but does it individually.
import rhinoscriptsyntax as rs
import Rhino.Geometry.Line as Line
curves = rs.GetObjects("Pick some curves", rs.filter.curve)
expanded_crvs = 
for curve in curves:
crv_length = rs.CurveLength(curve)
start_point = rs.CurveStartPoint(curve)
end_point = rs.CurveEndPoint(curve)
#expanded point and projected on xz plane
start_point_new = [start_point,0,start_point]
end_point_new = [start_point,0,start_point-crv_length]
#add all new curves in list
Furthermore, suggestions and advices on the code above are more than welcome.
Does anyone know how to sort the expanded_crvs based on the Z-coordinate?
Furthermore, how can I maintain the layer and the name for each segment?