Nurbs Curve To Certain Number Of Arcs

I have a curve and need to split this curve to a certain number of arcs, i used 2 ways but no one of them give me the target results. The first way created the desired arcs but with some gap (attached photo) and the second track (attached photo using ShiftLists) not completed yet.

Attached Grasshopper file with the 2 ways scripts.





CurveToArcs.gh (13.4 KB)

Curves to Arcs.gh (8.4 KB)
Hello Ahmed,

Attached a python script that I wrote 5 years ago, it should work fine with Rhino 8 I guess

1 Like

A standard divide component won’t give you the desired results. You need to deconstruct it according to the curvature. and you can get the division point using the Logarithm of the Curvatures.

#deconstruct SPline
Curvature = ghc.Curvature(c,ghc.Range(1,Samples))
Circles = ghc.DeconstructArc(Curvature[2])
#Math to Obtain Division Points
Logarithm = ghc.Logarithm(Circles[1])
Maddition = ghc.MassAddition(Logarithm)
Radiuses = ghc.Division(Logarithm,Maddition[0])
ConDomain = ghc.ConsecutiveDomains(Radiuses,True)
dedomain = ghc.DeconstructDomain(ConDomain)
#Get Points
Shatter = ghc.Shatter(c,dedomain[0])
ptA=[]
ptB=[]
ptC=[]
1 Like

Thank you Tay for your kind and prompt response .
I got it but it seems like there is a problem in my side as attached below


since you have polylines, you can explode them and keep the lines, while rationalizing the splines with it. like the below:


Rationalize Polycurves.gh (10.5 KB)

3 Likes

Eventually it worked :smiley:
Thank you so much for your kind help.

1 Like

You’re welcome

1 Like