I have a simple python script that returns the curve degree from the input curves.
I am primarily passing geometry as “Model Objects” throughout the script.
If I use the G output of the Model Objects node and feed that into python or put a geometry type node such as “Curve” between the Model Object O output and the Python input, the script functions as expected.
I am stuck on how to, inside python, extract the geometry from a Model Object so that I don’t need an intermediary node between the Model Object and the Python script.
Please see the snip below noting that the G output of the MO node, or a Curve node after the O, solves the input needs of the python component. (I would like to skip this step and feed the O straight into python)
Thanks for your help!
import rhinoscriptsyntax as rs
if C is None:
D = C
degree = rs.CurveDegree(C)
print "Curve degree:", degree
D = degree