Open
Conversation
Introduces a boolean pset property that marks an ELEVATION or SECTION annotation as manually placed, exempting it from automatic deletion or regeneration during drawing sync. Generated with the assistance of an AI coding tool.
Adds operator to place manual elevation/section drawing reference tags that survive drawing regeneration. Includes core function, tool methods, type-selection dialog, default horizontal rotation for elevation tags, and SVG null guard for unassigned references. Generated with the assistance of an AI coding tool.
Adds operator to link a manual drawing reference tag to a target drawing via IfcRelAssignsToProduct, with a pre-populated dialog and immediate Properties panel refresh on confirm. Generated with the assistance of an AI coding tool.
Adds MANUAL_DRAWING_REFERENCE to the annotation type dropdown. Selecting it shows a dialog to choose elevation or section and optionally assign a target drawing before placement. Tags are protected from regeneration via EPset_Annotation.IsManualDrawingReference. Generated with the assistance of an AI coding tool.
The elevation tag's local -Z axis is intentionally parallel to its drawing camera's view direction, making screen-space projection of that axis always degenerate (zero XY delta). Fall through to the tag's local +X axis, which lies in the camera plane and rotates correctly as the user adjusts the tag's orientation. Also fix a zero-length vector crash in svgwriter when the same degenerate case occurs during SVG export.
Use get_default_annotation_matrix() for manual SECTION annotations so the object is placed in the camera's annotation plane with the correct rotation, matching how auto-generated section annotations are created. Without this, annotations placed in elevation or section camera views had identity rotation, causing the IFC representation to be in the wrong coordinate system and failing to tessellate. Also guard draw_edit_object_interface against non-IFC active objects to prevent AssertionError during toolbar redraws, and skip IFC item edit mode for ELEVATION/SECTION annotation types on placement.
Replace plain enum dropdowns with prop_with_search in the AddAnnotation and AssignManualDrawingReference operator dialogs, making it easier to locate a target drawing when many drawings exist in the project. Generated with the assistance of an AI coding tool.
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.
Addresses #7790:
Manual Drawing Reference Tags
What & Why
Elevation and section reference tags are normally generated automatically by Bonsai. But there are cases where a manually placed, persistent reference is needed — one that survives drawing regeneration without being moved or deleted. This PR adds a Manual Drawing Reference annotation type for exactly that.
Changes
AssignManualDrawingReferenceoperator — reassign an existing manual tag to a different drawing via the Properties panel, using a searchable dropdown.IsManualDrawingReferencepset flag — marks a tag as manually placed;is_auto_annotationnow respects this flag so manual tags are never touched during regeneration.-Zis parallel to the camera view; no crash when no drawing is assigned.Bug Fixes
ElevationDecoratorarrow — triangle failed to render in non-plan views because the tag's local-Zalways projects to near-zero XY in camera space. Now cascades through local axes to find a non-degenerate screen projection.get_default_annotation_matrix(camera), matching how auto annotations are created.get_text_datawas called without checking for an IFC entity on the active object; guarded withtool.Ifc.get_entity(obj).20260315_1533.mp4