Replace segment empty objects with actual curve geometry so that selecting
a segment in the Outliner highlights the corresponding line/curve in the
viewport.
Changes:
- Add get_segment_vertices() using IfcOpenShell's evaluate_segment() to
sample points along individual segments via the geometry engine
- Replace _create_segment_empty with _create_segment_curve that creates
Blender CURVE objects with actual geometry
- Remove single HorizontalCurve in favor of per-segment curves
- Supports all segment types (LINE, CIRCULARARC, CLOTHOID, spirals, etc.)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Zero-length segments are required by IFC to mark alignment ends but should
be invisible to users. This change:
- Adds helper methods to detect zero-length and empty layouts
- Silently skips geometry generation for empty alignments (no error messages)
- Excludes zero-length segments from Outliner display
- Uses separate visible segment counter for consistent naming
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix modal operator to use absolute mouse coordinates converted to 3D
viewport region space, instead of event.mouse_region_x/y which are
relative to whichever region received the event
- Store 3D viewport area, region, and region_data references in invoke()
for consistent raycasting throughout modal operation
- Add coordinate transformation methods (blender_to_ifc_coordinates and
ifc_to_blender_coordinates) for projects with geospatial Blender offsets
- Transform alignment curve vertices from IFC global to Blender local
coordinates when has_blender_offset is enabled
- Add try/except for piecewise-step-size geometry setting in util.py
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Simplifies the Horizontal Alignment panel by removing the Import
Alignment CSV button and the PI Details submenu that displayed
when selecting rows in the PI Editor list.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add RuntimeError handling for IfcOpenShell versions that don't support
the piecewise-step-type setting in geometry generation.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Git checkout with glob patterns (*.ifc) doesn't work on Windows.
This change:
- Expands glob via git ls-files and checks out files individually
- Skips symlink recreation if they already exist and are valid
- Refreshes git index before checkout to recognize deleted files
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace manual per-segment geometry creation with IfcOpenShell's
built-in generate_vertices() utility. This provides automatic support
for all curve types (CLOTHOID, spirals, etc.) and removes ~75 lines
of manual geometry code.
Changes:
- Add create_curve_from_representation() using IfcOpenShell geometry engine
- Add _create_segment_empty() for segment selection without geometry
- Update create_objects_for_layout_segments() to use new methods
- Delete manual geometry methods: create_object_for_segment(),
_create_line_segment(), _create_arc_segment()
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Operators removed (not called in any UI):
- SAIKEI_OT_create_alignment_polyline
- SAIKEI_OT_create_alignment_offset
- SAIKEI_OT_add_vertical_layout
- SAIKEI_OT_add_layout_segment
- SAIKEI_OT_layout_horizontal_by_pi
- SAIKEI_OT_layout_vertical_by_pi
- SAIKEI_OT_create_representation
- SAIKEI_OT_create_segment_representations
- SAIKEI_OT_update_fallback_position
- SAIKEI_OT_validate_segments
- SAIKEI_OT_refresh_alignment_data
Also fixed poll_ifc4x3() and replaced all tool.Alignment.get_ifc_file()
calls with tool.Ifc.get() after previous refactoring removed that method.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Although it is a very cool trick, I feel this essentially duplicates the
UI in two spots, and is an outlier in UX. I'd prefer for all IFC data
and relationships to be in one location only (the panels). I think there
are a better unified solutions (e.g. favourite bookmark panels) for
quick access for things like this.
To be consistent with all other settings, I've moved the visibility
config UI from inline into the add-on settings. This restores the
previous tab layout and no longer needs the "settings" icons to be
there. This also removes the need for a "enable UI config" checkbox.
Most of the code previously had dedicated operators to toggle booleans.
This has been removed. This new approach also means helpers aren't
needed.
Previously calculation of visibility was done on every draw (3x 10tabs x
10 collection items). The data class is intended to calculate UI data
once only which is more efficient. This also removes all helper calls
from the UI.
When assigning a container to an aggregated element, automatically promote
the operation to the root aggregate and move all nested parts to the
container's collection in the Blender outliner.
Changes:
- AssignContainer now traverses the aggregate hierarchy to find the root
aggregate when a user selects any nested part
- All parts and sub-aggregates are moved to the container's collection in
the outliner while preserving IFC aggregate relationships
- Parts remain aggregated in IFC (not directly contained), only their
Blender collection membership changes
- RefreshLinkedAggregate now also moves all parts to the correct container
collection when restoring original data
This provides a more intuitive UX - users can select any part and the entire
assembly moves together, properly organized under the spatial container.
Fixes the previous behavior where:
- Aggregated elements were skipped with a warning
- Parts weren't organized under the container in the outliner
- Aggregate nesting was broken after container assignment