{{ message }}
Tags: IfcOpenShell/IfcOpenShell
Tags
Fix: commit pending parametric draft before extrusion-edit EnableEditingExtrusionAxis and EnableEditingExtrusionProfile both import a mesh from the IFC representation into obj.data as their first real action. That mesh-import overwrites any in-memory parametric (gizmo) draft on the object, silently discarding the user's pending dimension edits. Concrete reproduction: drag a wall's length gizmo (draft pending), then click "Edit Axis" before validating the draft. The axis-edit imports the wall axis mesh; the in-flight draft vanishes; on cancel the wall snaps back to its pre-drag length. Both call sites now commit the active draft via tool.Parametric.commit_object_draft before the mesh import, gated on tool.Parametric.is_object_editing so the guard is a no-op when no draft is in flight. Generated with the assistance of an AI coding tool.
Refactor: rename rel -> subject in disconnect_rel dispatch The "mep-pair-fitting" kind added in the previous commit carries an IfcFlowFitting (the entity whose deletion disconnects the pair), not a relationship entity, in the dispatch slot — but the slot was named ``rel`` across the function signature and every call site. Rename to ``subject`` so the parameter name reflects the uniform intent: "the entity whose teardown effects the disconnect", regardless of whether that's a rel or a fitting. Sweep covers: - core.connection.disconnect_rel signature + body - tool.Connection.find_rels / find_rels_for_element / find_rel docstrings - The cascade-on-delete call site in tool.Geometry.delete_ifc_object - DisconnectElements operator in bim.module.model.wall - All affected test kwargs and AST forward-compat docstring - Error message: "Unknown rel kind" -> "Unknown kind" No behaviour change. Generated with the assistance of an AI coding tool.
Clip box: include linked IFC geometry Add include_linked_ifc toggle on BIMSceneClipBoxProperties so the cap pipeline can also bisect meshes inside Project > Links collection-instance empties. Off by default - linked IFCs may carry the entire site or structural backbone, and capping them adds per-mesh bisect cost on every clip-box edit. The new iterator composes instance.matrix_world @ inner.matrix_world as the effective world placement so caps land in the active scene rather than at the linked library's local origin. Linked-mesh cache entries are namespaced with a 'link:' prefix to avoid collisions with top-level scene objects. Generated with the assistance of an AI coding tool.
Add network path overlay for walls and MEP Adds a viewport overlay that traces the connected element path from the selected wall or MEP element. Walls follow IfcRelConnectsPathElements and draw each connected wall's reference axis with endpoint dots; MEP elements follow IfcRelConnectsPorts and draw each segment's axis plus a port-to-port spider for each fitting. The new BIMModelProperties.show_paths toggle (Element Paths in the Bonsai Decorators group of Blender's viewport overlay popover) drives install / uninstall of both decorators on flip and on file load, mirroring the show_slab_direction wiring. The popover row also surfaces the pre-existing BIMSystemProperties.should_draw_decorations toggle (System Decorations) so both connectivity overlays sit together. Dot colors split free endpoints (decorator_color_special, blue by default) from junction nodes (decorator_color_selected, green by default) so dangling chain tips read apart from interior joins. Walls classify endpoints by IFC topology: rels expose RelatingConnectionType / RelatedConnectionType and ATPATH dots use tool.Wall.path_connection_location_world for the canonical T-meets join. MEP keeps the geometric classifier because port positions coincide exactly across fitting + segment. Generated with the assistance of an AI coding tool.
Fix clip-box edit-mode picker + rotation margin Edit-mode click-select rejected verts inside the clip volume because clip_bb stayed at the first-arm view; the depsgraph and PRE_VIEW handlers updated clip_planes but skipped the view3d.clip_border call that refreshes clip_bb. Schedule a full re-arm at transform-commit, IFC reload, and view drift. The empty's wireframe was clipped by its own planes when rotated at non-trivial scale because the 1e-6 absolute margin can't absorb float-precision drift that scales with the box's world half-extent. Add a 1e-5 relative expand. Generated with the assistance of an AI coding tool.
Fix clip-box edit-mode picker + rotation margin Edit-mode click-select rejected verts inside the clip volume because clip_bb stayed at the first-arm view; the depsgraph and PRE_VIEW handlers updated clip_planes but skipped the view3d.clip_border call that refreshes clip_bb. Schedule a full re-arm at transform-commit, IFC reload, and view drift. The empty's wireframe was clipped by its own planes when rotated at non-trivial scale because the 1e-6 absolute margin can't absorb float-precision drift that scales with the box's world half-extent. Add a 1e-5 relative expand. Generated with the assistance of an AI coding tool.
Fix loading project library without IfcProject Per IFC4+, IfcContext is the abstract supertype of IfcProject and IfcProjectLibrary; library-only files legitimately contain only IfcProjectLibrary as their root context. Bonsai assumed an IfcProject was always present at three crash sites: the parent-library enum (reported in #8183), RefreshLibrary's tree view, and AddProjectLibrary. Introduce tool.Project.get_root_context() that prefers IfcProject and falls back to IfcProjectLibrary, and route the three sites through it. get_parent_library() now returns None for a root IfcProjectLibrary; get_project_hierarchy() and the EditProjectLibrary parent-swap branch handle that. AddProjectLibrary creates the nested sub-library via IfcRelNests when the root is an IfcProjectLibrary, matching the existing convention for library-under-library nesting. For the separate "Open IFC Project" path, abort with a friendly error pointing users to Project Setup -> Project Library -> Select Library File instead of letting set_units() crash deep in the importer. Closes #8183. Partly generated with the assistance of an AI coding tool.
PreviousNext
