How to change start point of closed curve

I want to change start point of curve by rhino python but not. Please help me solution
I try make code

import rhinoscriptsyntax as rs
#Get Curve
cur=rs.GetObject("Select Cur:",4)
sp=rs.CurveStartPoint(cur)
rs.AddPoint(sp)
point =rs.GetPointOnCurve(cur)
point =rs.coerce3dpoint(point)
cur=rs.coercecurve(cur,-1,True)
cur.SetStartPoint(point)
#cur.SetStartPoint(point)
sp=rs.CurveStartPoint(cur)
rs.AddPoint(sp)

Help me!

I don’t know script, but manually use ‘crvseam’

1 Like

Curve.ChangeClosedCurveSeam

1 Like

You first need to understand the difference between using RhinoCommon “virtual geometry”, and using rhinoscriptsyntax methods, which generally creates/modifies objects that exist in the Rhino file.

The two are not interchangeable. In your script above you are mixing the two without really knowing what you are doing.

RhinoCommon “virtual geometry” does not exist in the document and is not automatically added to the document, you need to specifically do that in another step.

rhinoscriptsyntax generally references objects already in the document and also adds new ones automatically to the document.

I would suggest you stick to rhinoscriptsyntax for now (until such time as RhinoCommon becomes clearer via experience, manuals, tutorials, etc).

import rhinoscriptsyntax as rs

#get Curve
curveID=rs.GetObject("Select Curve",4)
sp=rs.CurveStartPoint(curveID)
rs.AddPoint(sp)
#get new point to change seam to
point=rs.GetPointOnCurve(curveID)
#point=rs.coerce3dpoint(point) - you do not need this

#you need to get the *parameter* of the point on the curve to adjust the seam
param=rs.CurveClosestPoint(curveID,point)
#now change the curve seam
rs.CurveSeam(curveID,param)
#check the result by adding a point
rs.AddPoint(rs.CurveStartPoint(curveID))
1 Like

Thank you! i will learn more

There’s that for RhinoCommon? Where?

There’s mainly a documentation here.

Yeah, I was looking more for tutorials and some form of organized code samples.

This is not nearly enough: