René's URL Explorer Experiment


Title: Bonsai: uniquify referenced SVG ids on a sheet so text does not garble (#7289) by petruconduraru · Pull Request #8437 · IfcOpenShell/IfcOpenShell · GitHub

Open Graph Title: Bonsai: uniquify referenced SVG ids on a sheet so text does not garble (#7289) by petruconduraru · Pull Request #8437 · IfcOpenShell/IfcOpenShell

X Title: Bonsai: uniquify referenced SVG ids on a sheet so text does not garble (#7289) by petruconduraru · Pull Request #8437 · IfcOpenShell/IfcOpenShell

Description: Closes #7289. A sheet that references two or more SVGs garbled the text of all but the first. The referenced SVGs (markdown converted to SVG) define text glyphs as reusable symbols with generic ids like glyph-0-0 and render every character via , and both files, generated independently, use the identical id numbering. SheetBuilder.build_documents embedded each referenced SVG inline without namespacing the ids, unlike build_drawings, so the sheet had many duplicate ids. Per the SVG spec resolves to the first element with that id in document order, so the second reference's characters all rendered with the first reference's glyphs. This generalizes ensure_drawing_unique_styles to ensure_unique_ids and applies it to embedded referenced documents as well, prefixing ids, classes, url(...) and hrefs per view by the reference's IFC id, exactly as build_drawings already does. The