Integrate CAD Sketcher module#8098
Draft
falken10vdl wants to merge 13 commits into
Draft
Conversation
Keep only CAD Sketcher integration changes, including Plan/Elevation role alignment.\n\nGenerated with the assistance of an AI coding tool.
Replace all per-entity .tag / .guid attribute access with the new
sketch.groups (SketchGroup / SketchGroupMember) data model:
- Add module-level helpers: _entity_guid, _set_entity_guid,
_entities_with_ifc_tag, _ensure_entity_in_group, _entity_ifc_tag
- invoke(): entity discovery and GUID pre-population use helpers
- execute(): wall/profile/point element discovery + seg-group propagation
- _create_or_update_wall(): GUID ops guarded by isinstance(_FakeWallLine)
- _create_or_update_profile_element(): add sketch= param, derive ifc_tag
- _create_or_update_point_element(): add sketch= param, derive ifc_tag
- _create_or_update_{slab,covering,plate,opening,fill}: use helpers
- _get_*_polylines(): use _entities_with_ifc_tag instead of .tag filter
- _resolve_elevation_wall_guid(): use _entity_guid via src sketch lookup
- _find_orth_sketch_for_point(): position-only match, remove debug prints
- _ensure_column_height_line(): use _ensure_entity_in_group, no guid prop
- _create_wall_from_elevation_polyline(): group-aware GUID resolution and
back-propagation to source plan line
- _auto_fetch_sketch(): all entity discovery and GUID ops use helpers
…i-tag The SketchGroup.tag single StringProperty has been replaced by a tags CollectionProperty on the CAD_Sketcher side. Update the five module-level helper functions in operator.py to use the new API: - group.tag != ifc_tag → not group.has_tag(ifc_tag) - group.tag = ifc_tag → group.add_tag(ifc_tag) - return group.tag → vals = group.tag_values(); return vals[0] if vals else '' Affected helpers: _entity_guid, _set_entity_guid, _entities_with_ifc_tag, _ensure_entity_in_group, _entity_ifc_tag
… proper GUID handling
…for various entities
…revent scene mutation
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.
This PR integrates CAD Sketcher-driven authoring into Bonsai, so IFC elements can be created/updated directly from tagged CAD Sketcher entities.
It adds a dedicated cadsketcher module, exposes the fetch workflow in Bonsai UI, and supports both Plan and Elevation sketch roles (aligned with CAD Sketcher’s simplified role model).
Supported CAD Sketcher tags and output
Sketch role model are now explicitly:
Dependency / requirement
This integration requires CAD Sketcher addon changes from PR #550 to be present:
hlorus/CAD_Sketcher#550
Cheers!