Replace custom SAIKEI_OT_pick_pi_from_viewport modal with a
PolylineOperator subclass, reusing Bonsai's proven polyline
infrastructure (same base class as wall/slab/profile drawing).
Gains: snapping, numeric D/A/X/Y input, axis locking, angle
locking, measurement display, undo-last-point, status bar hints.
Remove PIPickerDecorator (replaced by PolylineDecorator).
Fix EN string formatting in UI list display rows.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add clear_layout_segments API to remove segments while preserving alignment ID
- Modify exit_pi_edit_mode to edit segments in-place instead of delete+recreate
- Fix curve visualization by using create_shape for segment vertices
- Fix evaluate_segment validation to handle negative-length curve segments
This prevents "Active alignment no longer exists" errors when editing PIs
and properly renders circular arcs regardless of turn direction.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When using G key to move PIs, Blender's transform modal consumes
the Enter key. Adding Space as an alternative lets users apply
changes more easily. Also adds Numpad Enter support.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements the ability to edit alignment PI (Point of Intersection)
positions after creation using Blender's standard transform tools:
- Back-calculate PI positions from existing IFC alignment segments
- Create temporary EMPTY objects at PI locations for editing
- Visual feedback via PIEditDecorator (yellow tangent lines, HUD)
- Modal operator handles G key movement, Enter to apply, Escape to cancel
- Regenerates alignment with new PI positions on apply
- Handles edge cases: single-segment, tangent-only, undo during edit
Architecture follows Bonsai patterns:
- Core layer: Business logic orchestration (enter/exit_pi_edit_mode)
- Tool layer: Math, IFC, and Blender implementations
- UI layer: Modal operator with PASS_THROUGH for standard transforms
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains project-specific context for Claude Code sessions.
It should NOT be pushed to origin (protected by pre-push hook).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add visual feedback during PI placement with PIPickerDecorator:
- Yellow tangent lines connecting placed PIs
- Rubber band line from last PI to cursor position
- Green circle markers at each PI location
- HUD text showing instructions and PI count
Follows Bonsai's established decorator pattern with GPU draw handlers.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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>