@cloudsvisitor77,
what i meant to say was that the script was not using the line but the point + plane to rotate
As long as the lines maintain their original orientation (parallel to the Y axis or parallel to the Z axis), it does not matter. If you want each line to have its own rotation, then, yes, we must use the whole line as the axis of rotation, this can be done, I’m sure. But it will be more complicated.
whats the reason for using ghpythonlib.components rather than rhinoscriptsyntax ?
( is it correct to say that the first allow using GH methods inside the written code while the latter allow using python ? )
Both are simply libraries that python can use. ghpythonlib.components gives python access to grasshopper components. rhinoscriptsyntax gives python access to most (all?) of the Rhino Common library, which you can access by the line import Rhino
rhinoscriptsyntax is usually easier to use than Rhino Common.
You can use whichever you want. Many of the grasshopper components do the same things that regular Rhino commands do (rotate, move, scale, etc). rhinoscriptsyntax seems easier to use to me, so I generally choose that one unless there is a specific grasshopper function that rhinoscriptsyntax can’t do.
In this case, I was getting an error with rhinoscriptsyntax and I don’t know why. So I switched to the grasshopper library and it worked. However, later I did it with rhinoscriptsyntax and it worked, too. So I was probably doing something wrong the first time.
does calling rhinoscriptsyntax inside PY2 component automatically imply that i have to use python2.7 while importing same library in to PY3 component imply the use of Python 3…
I’m not 100% certain, but I think so.
…thus meaning that the same library work either on python 2 and python 3?
Python3 stuff will not work in the python2 component. And there might be some iron python 2 stuff that doesn’t work in a python 3 component, but I’m not 100% certain about that.
could you explain what’s the utility of the “.ToNurbsCurve”
Yes, the rs.CurveStartPoint() function was expecting a Curve object. ToNurbsCurve() converts the Line object to a Curve object. You often need to do that to Arcs and Circles, too, as they are not considered Curve objects either.