Is there documentation somewhere that shows what you can do with subobjects? Specifically, if I have a curve and use coercerhinoobject, I can further select the subcurve by using SelectSubObjects. What other methods are available regarding subobjects such as extracting or copying the subcurve, moving it, etc?
You can for instance get a point on a curve, (Say by using rs.GetCurveObject() )and if it is a polycurve, you can find which segment is at that parmameter,
I understand what you are saying. What I’m trying to do is manipulate a segment, i.e. move the segment, move the endpoint of a segment, etc. If I use PolyCurve.SegmentCurve to get the segment curve, what I see are the curve properties but I don’t see a way to manipulate that specific segment by using something like rs.MoveObject. Is the only way manipulate the polycurve segment is to explode it, change the segment and then join it back together?
Hi Mike - I think I’d duplicate the segments as curves, move them where you’d like in code, then Join (Rhino.Geometry.Curve.JoinCurves() I think) and put the result back into the document (sc.doc.Objects.Replace(id, geo))
Hi Pascal - Thanks for the suggestion. I didn’t even realize there was a DuplicateSegments method. In the link you sent me the main body seems to show all the methods, but the index of the PolyCurve methods only list 13 methods while the body lists probably over 100 methods. Can you talk to who ever is responsible for the website and have them update the index on the left? I think that would help reduce support requests for polycurve issues in the future.
This is because there many properties and methods on the Curve base class, including DuplicateSegments. The “stuff” you see on the left is specially implemented by that class.