haplokuon / netDxf

.net dxf Reader-Writer
MIT License
981 stars 400 forks source link

How to add hierarchical data structure. #363

Open RodionNikolaev opened 2 years ago

RodionNikolaev commented 2 years ago

I have a hierarchical data structure from the SVG file. The root group contains a line and the second child group with circle and polyline

I can't use the AddEntity method because the Group class is inherited from TableObject instead of EntityObject. Also, I can't set the Owner property for elements.

Please, could you explain how to map this structure to the DXF document?

haplokuon commented 2 years ago

You cannot. Groups can only contain entities and not other groups. On the other hand an entity can belong to multiple groups.