Subobjects Guide for RS

Using RhinoScript (Python). Is there a good guide somewhere on selecting sub objects and using component indexes? Is there also a guide on selecting other sub objects such as PointAtStart, PointAtEnd, etc?

None that I know of, which does not mean it is not out there someplace - but, if you use rs.GetObject() and allow subobjects, you do not get an id back, you get an objRef, and you can poke in there for more information, as I think you found. The index, if not -1, should allow you to get at the underlying geometry bits -
Here, I filtered for curves, and clicked on an edge - so the information available is for edges, in this case the parent brep’s edge #5

Which lets me get at that edge:

I could for instance use the nurbs curve and put it in the document like DupEdge.

But PointAtStart is not a subobject - it is a location for the point at the start of that edge, a Rhino.Geometry.Point3d() but not a thing that exists independently in the document. If what you want is a control point at the start, in the sense of a thing you can select in Rhino, that is a grip. You’d need to extract the nurbs curve from the edge, add it to the document and then enable the grips and select them by index, as I described in replying to your related post.


Thanks Pascal!

I found out it’s also possible to work with the curve directly. When doing a ToNurbsCurve() you can access the the point list by .Points and set the locations of those by .SetPoint(index, position, weight)