Change curve degree in python

Dear All,
I am trying in my python script to select some curves, then for every curve in the selected list I change it to a first degree curve. I have tried the rs.ChangeCurveDegree(i, 1) function, however it didn’t change anything in my case (please look at the attached pic)
Thanks in advance & Stay Safe !

Hi @kareem2292,

the method rs.ChangeCurveDegree only allows to increase a curve’s degree. Since your curves obviously have a degree larger than 1 and you try to change it to 1, nothing changes.

_
c.

Moved to Scripting category

1 Like

Maybe you need something like rs.ConvertCurveToPolyline ?

Or rs.CurvePoints then rs.AddPolyline ?

1 Like

hi @clement, thanks for your reply, the thing is that in normal Rhino the command change degree works easily to decrease or increase a curve’s degree, I am even trying to find it in the Rhino library but didn’t succeed !

Thanks @Jonathan_Hutchinson rs.ConvertCurveToPolyline finally worked :slight_smile: