I’m working in a script that uses HiddenLineDrawing to create a Make2d procedure for a collection of geometries I set. I realized in the RhinoCommon API that when using AddGeometry method, it have an option to assign a tag to the geometry.
I wonder how I can retrieve the tag for the segments resulted of the computation of the HiddenLineDrawing. I realized using Visual Studio metadata that HiddenLineDrawing contain a FullCurves property which contains a list of HiddenLineDrawingObjectCurve, from which I could retrieve the referred object tag and its specific generated segments. However this property is internal and I cannot access it.
import Rhino
import scriptcontext as sc
hld_param = Rhino.Geometry.HiddenLineDrawingParameters()
# Set viewport
# Add curve geometry with tags
hld = Rhino.Geometry.HiddenLineDrawing.Compute(hld_param, True)
if hld:
for hld_segment in hld.Segments:
hld_object = hld_segment.ParentCurve.SourceObject
if hld_object and hld_object.Tag:
print(hld_object.Tag)