Feat: Nest ifcAnnotation inside drawing group (Fix #7903)#7922
Draft
dipayansardar73-decode wants to merge 1 commit intoIfcOpenShell:v0.8.0from
Draft
Feat: Nest ifcAnnotation inside drawing group (Fix #7903)#7922dipayansardar73-decode wants to merge 1 commit intoIfcOpenShell:v0.8.0from
dipayansardar73-decode wants to merge 1 commit intoIfcOpenShell:v0.8.0from
Conversation
Replaces the string-concatenation SVG merge with an lxml structural merge in combine_svgs. This moves the ifcAnnotation elements inside the main linework drawing group, allowing them to properly inherit CSS styles and scales assigned to the view.
Member
|
Got the following error when trying Converting this to a 'draft' so it doesn't get pushed to the BleedingEdge build. |
Member
|
If you want to test with the same 'assets' see the following... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7903.
This PR replaces the existing string-based SVG combination logic in
combine_svgswith an XML-aware approach usinglxml.etree.Changes
linework.svgto identify the main drawing group (e.g.,<g class="section target-view-SECTIONVIEW scale-50">).annotation.svgdirectly inside this group.ifcAnnotationelements (like linework, text, labels, and measures) properly inherit the scale and view-specific CSS classes applied to the root drawing group.<defs>boilerplate parsing.This provides a much more robust SVG hierarchy and immediately unlocks advanced CSS styling capabilities as requested in Would be nice to be nest ifcAnnoation like lines/text/etc inside the drawing group. #7903.