mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
de389bdce3
Drawings are styled with CSS. Every element already gets a generated class list (IFC class, material, predefined type, drawing metadata keys), and annotations could additionally carry hand written classes in EPset_Annotation.Classes, read by SvgWriter. Regular building elements had no such channel, so there was no way to make one slab dash and another fill grey without hand editing the property set and the stylesheet. CreateDrawing.get_svg_classes now reads the same EPset_Annotation.Classes property, so custom classes reach cut, projection, surface and space geometry too. SvgWriter reuses the shared tool.Drawing helper instead of its own lookup. A Drawing Classes panel on the object tab assigns and unassigns those classes across the selection, offering the line weight, line style and fill classes that default.css ships, plus free text for stylesheet authors. default.css gains matching element level rules, declared last so they override the class, material and predefined type rules above them. No new rendering path is introduced. The classes land in the same class attribute and are resolved by the same stylesheet, so existing custom CSS keeps working and can select on the new classes. Generated with the assistance of an AI coding tool.