Hi guys, I am trying to make a “flow along cuve” tool but I am hitting walls…
The only tool I found was the “Rhino.Geometry.Curve.FlowSpaceMorph()” but I can’t seem to get it right.
Thanks for any help!
(This is a small part of a project curved curve onto geometry and then make a straight line with the length of the projected curve and then flow the projection onto the straight line)
Here’s what I have tried:
import rhinoscriptsyntax as rs import Rhino import scriptcontext as sc def flowObject(): rc, crv_id = Rhino.Input.RhinoGet.GetOneObject("Select curve", False, Rhino.DocObjects.ObjectType.Curve) if rc!=Rhino.Commands.Result.Success: return curve = crv_id.Curve() flow_id = rs.GetObject("Backbone") if not flow_id: return flow = rs.coercecurve(flow_id) length = flow.GetLength() print length # .GetCurveParameterFromNurbsFormParameter line=Rhino.Geometry.NurbsCurve(1,2) #line.Degree=1 line.SetStartPoint(rs.coerce3dpoint((0,0,0))) line.SetEndPoint(rs.coerce3dpoint((length,0,0))) newCrv = curve.FlowSpaceMorph(flow, line, False) sc.doc.Objects.Replace(crv_id, newCrv) flowObject() #Rhino.Geometry.Morphs.FlowSpaceMorph()