HiddenLineDrawing - how to get ObjectID of the HiddenLineDrawingSegment

Hello,

when I use HiddenLineDrawing to create 2D drawing of multiple objects, is there a way to find out which line is from which object? - preferably to get object guid

I use python and rhinocommon

thanks in advance

Aleksandar

Hi @AleksandarSM,

When adding objects to a HiddenLineDrawingParameters object, do so like this:

hld_params.AddGeometry(obj.Geometry, Transform.Identity, obj.Id);

where obj.Id is the id of the RhinoObject.

After computing the soluation, iterate through the HiddenLineDrawing.Segments collection to process each HiddenLineDrawingSegment object. A HiddenLineDrawingSegment should have a “parent curve”, or HiddenLineDrawingObjectCurve. This object will a source object, or HiddenLineDrawingObject. On this object you will find the id “tag” you added above.

– Dale

2 Likes