Skip to content

Use Perastage SVG symbols for 2D layout fixtures with mesh fallback#1101

Merged
PeramatoG merged 1 commit intomainfrom
codex/add-svg-support-to-2d-viewer-elements
Feb 23, 2026
Merged

Use Perastage SVG symbols for 2D layout fixtures with mesh fallback#1101
PeramatoG merged 1 commit intomainfrom
codex/add-svg-support-to-2d-viewer-elements

Conversation

@PeramatoG
Copy link
Copy Markdown
Owner

Motivation

  • Make layout editor 2D view elements behave like legends by reusing Perastage/GDTF SVG symbols when available so identical models instantiate the same 2D symbol; keep the existing mesh/cube capture flow as a fallback when no SVG exists or is invalid.

Description

  • Add a small helper perastage_svg_symbol_builder (viewer3d/render/perastage_svg_symbol_builder.{h,cpp}) that loads Perastage SVG from a GDTF, converts fills and strokes to CommandBuffer commands, applies model offsets and computes symbol bounds.
  • Update the fixture capture path in viewer3d/render/opaque_fixture_pass.cpp to try building an SVG-backed SymbolDefinition first and return it to the bottom-symbol cache when successful.
  • Register the new source file in viewer3d/CMakeLists.txt to keep explicit source ownership and module boundaries intact.

Testing

  • Ran tests/check_perastage_tree_modules.sh and it passed.
  • Ran tests/check_no_configmanager_get_in_gui.sh and it passed.

Codex Task

@PeramatoG PeramatoG merged commit 5f03d86 into main Feb 23, 2026
@PeramatoG PeramatoG deleted the codex/add-svg-support-to-2d-viewer-elements branch February 24, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant