Commit Graph

20016 Commits

Author SHA1 Message Date
DesertSpringsCivil a3038528bb Add PI Edit Mode for moving alignment points with G key
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>
2026-02-02 20:26:41 -07:00
DesertSpringsCivil eea060b72d Local: Document git workflow for local-only files in CLAUDE.md
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 19:09:58 -07:00
DesertSpringsCivil 862697baae Local: Add CLAUDE.md project context
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>
2026-02-02 19:00:58 -07:00
DesertSpringsCivil 9a3ae628aa Add rubber band visualization to PI picker modal
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>
2026-02-02 18:19:58 -07:00
DesertSpringsCivil 46da629c8b Create selectable curve geometry for alignment segments
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>
2026-02-02 16:41:04 -07:00
DesertSpringsCivil fd85b29777 Hide zero-length terminator segments from UI and suppress empty alignment warnings
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>
2026-02-02 15:34:07 -07:00
DesertSpringsCivil 95952d03f8 Fix PI picker viewport coordinate calculation and add georeference support
- 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>
2026-02-02 10:19:02 -07:00
DesertSpringsCivil 5ad40612fb Remove Import CSV button and PI Details panel from alignment UI
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>
2026-02-02 10:17:44 -07:00
DesertSpringsCivil 6294c35a11 Handle RuntimeError in alignment geometry generation
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>
2026-02-01 18:40:49 -07:00
DesertSpringsCivil de2a7c9527 Add CIVIL tab to Bonsai Properties sidebar for alignment tools
- Add new CIVIL tab (4th position) with CURVE_DATA icon
- Create BIM_PT_tab_horizontal_alignment panel container
- Move alignment UI from N-panel to Properties sidebar
- Remove old "Saikei Civil" N-panel tab

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 18:39:38 -07:00
DesertSpringsCivil a37de44a24 Fix dev_environment.py Windows compatibility for symlink handling
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>
2026-01-31 14:43:13 -07:00
DesertSpringsCivil c0b7256832 Use IfcOpenShell geometry engine for alignment visualization
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>
2026-01-31 13:35:20 -07:00
DesertSpringsCivil 42db172827 Clean up unused imports in alignment operator module
Removed leftover imports from sequence module template:
- isodate, dateutil, calendar, datetime
- bonsai.bim.module.sequence.helper
- ifcopenshell.util.sequence, ifcopenshell.geom, ifcopenshell.util.selector
- Duplicate imports (os, json, ImportHelper, ifcopenshell.api.alignment)

These unused imports were causing silent module registration failures.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:18:35 +11:00
DesertSpringsCivil f52e95a05a Remove 11 unused operators from Saikei alignment module
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>
2026-01-28 11:18:35 +11:00
DesertSpringsCivil 04ad0b92bd Refactor Saikei alignment module to follow Bonsai architecture
- Move math/calculation functions from core to tool layer
  (calculate_pi_geometry, calculate_deflection_angle, etc.)
- Remove duplicate get_ifc_file() wrappers, use tool.Ifc.get() directly
- Remove redundant ifc_definition_id manual settings (tool.Ifc.link handles this)
- Remove fallback object lookup methods (_find_object_by_ifc_id, _find_object_by_name_pattern)
- Simplify remove methods to use tool.Ifc.get_object() directly
- Clean up defensive try/except ImportError blocks
- Update is_ifc4x3() to use tool.Ifc.get_schema()
- Update license headers to Bonsai standard

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 11:18:35 +11:00
Dion Moult 8416ca46a7 More forgotten files 2026-01-22 11:23:26 +11:00
Dion Moult 10ce30b2ac Forgot to commit these files 2026-01-21 18:59:31 +11:00
Dion Moult 00c971fa2d Purge unnecessary Saikei boilerplate 2026-01-21 12:46:58 +11:00
Dion Moult b86bf45167 Remove claude 2026-01-21 12:32:11 +11:00
Dion Moult 22fd318d21 Initial commit of sakei code prior to any refactoring 2026-01-21 12:17:36 +11:00
dependabot[bot] 4c1b3221ce Bump gersemi from 0.24 to 0.25.1
Bumps [gersemi](https://github.com/BlankSpruce/gersemi) from 0.24 to 0.25.1.
- [Release notes](https://github.com/BlankSpruce/gersemi/releases)
- [Changelog](https://github.com/BlankSpruce/gersemi/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BlankSpruce/gersemi/compare/0.24.0...0.25.1)

---
updated-dependencies:
- dependency-name: gersemi
  dependency-version: 0.25.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-19 12:40:44 +11:00
dependabot[bot] 9e2b7ba7c8 Bump tar from 7.4.3 to 7.5.3 in /src/ifctester/webapp
Bumps [tar](https://github.com/isaacs/node-tar) from 7.4.3 to 7.5.3.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.4.3...v7.5.3)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-19 12:39:38 +11:00
falken10vdl 1576ade147 Merge pull request #7576 from falken10vdl/support-enum-for-search-suggestions
Enhance filter value suggestions to support enumerated properties in search
bonsai-0.8.5-alpha2601172314 bonsai-0.8.5-alpha2601172312
2026-01-18 00:13:44 +01:00
falken10vdl db8a1b9262 Merge pull request #7575 from falken10vdl/simplify-new-filter-mode-with-just-chained-filters-with-set-operations
Refactor filter mode handling to simplify chained filters with set operations
2026-01-18 00:12:40 +01:00
falken10vdl 09d193045a Enhance filter value suggestions to support enumerated properties in search 2026-01-18 00:05:07 +01:00
falken10vdl f3295e2663 Refactor filter mode handling to simplify chained filters with set operations 2026-01-17 20:02:09 +01:00
Dion Moult 16a90cadb5 Cap product decorator at 500 triangles to prevent unresponsive UI during dense product placement bonsai-0.8.5-alpha2601170657 2026-01-17 17:57:07 +11:00
Dion Moult 2065d4ce78 Minor optimisation to prevent looping through all verts twice in decorator draw 2026-01-17 17:55:11 +11:00
dependabot[bot] 5cadfd693f Bump ruff from 0.14.10 to 0.14.13
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.14.10 to 0.14.13.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.14.10...0.14.13)

---
updated-dependencies:
- dependency-name: ruff
  dependency-version: 0.14.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-17 15:39:57 +11:00
Andrej730 9d1dcf9034 external parametric geometry - integrate with ifcsverchok
Still very experimental, but here's a short demo - https://files.catbox.moe/u6vnhj.mp4
Sverchok graph I've used - https://files.catbox.moe/1x7b7q.png
bonsai-0.8.5-alpha2601161257 ifcsverchok-0.8.5.260116
2026-01-16 17:16:29 +05:00
Andrej730 ed38d2347c ifcsverchok - check for unused imports 2026-01-16 17:16:29 +05:00
Andrej730 47e259ff2f ifcsverchok - operator to apply graph to Bonsai file 2026-01-16 17:16:29 +05:00
Andrej730 413530bb0a ifcsverchok - shape output node 2026-01-16 17:16:29 +05:00
Andrej730 a3bcea008a util.shape - move typing stuff to TYPE_CHECKING block 2026-01-16 17:16:29 +05:00
Andrej730 d93363b9bb ifcsverchok - specify extrusion axis 2026-01-16 17:16:29 +05:00
Andrej730 77a912c756 shape_builder.rectangle - clarify 3d size use 2026-01-16 17:16:28 +05:00
Andrej730 668b63a323 shape_builder - clean up redundant default values from doc-strings 2026-01-16 17:16:28 +05:00
Andrej730 dbc0cca36e ifcsverchok - experimenting with shape builder nodes 2026-01-16 17:16:28 +05:00
Andrej730 009652f97d ifcsverchok - fix by query node 2026-01-16 17:16:28 +05:00
Andrej730 c77c4ce968 model.ui - more specific typing from props 2026-01-16 17:16:28 +05:00
Andrej730 a0b81e333e black . 2026-01-16 17:16:25 +05:00
Andrej730 dfc91e6639 ifcopenshell-python - clean up unused imports 2026-01-16 17:16:24 +05:00
Dion Moult 233ad63bca Remove document menu for UI consistency
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.
bonsai-0.8.5-alpha2601160912
2026-01-16 20:11:43 +11:00
Dion Moult 242f1aab35 Fix #7563. Regression in normalising document URIs. bonsai-0.8.5-alpha2601152326 2026-01-16 10:26:23 +11:00
Ryan Schultz d79524b087 fix #7559: DirectionSense works again. bonsai-0.8.5-alpha2601152022 bonsai-0.8.5-alpha2601152021 2026-01-15 14:21:39 -06:00
Dion Moult 8060c790ed Black bonsai-0.8.5-alpha2601151100 bonsai-0.8.5-alpha2601151101 2026-01-15 22:00:51 +11:00
Dion Moult 47a2c1d21a Refactor panel visibility to not use any helpers, operators, and shift config UI into add-on settings
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.
2026-01-15 21:59:53 +11:00
Christoph Mellüh ed81a0a4b3 update api to V5 (#7409) 2026-01-15 20:52:06 +11:00
Dion Moult 26fb6ebd3c Refactor tab visibility to use data cache
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.
bonsai-0.8.5-alpha2601150031 bonsai-0.8.5-alpha2601150030
2026-01-15 11:30:28 +11:00
Dion Moult bb50be389e Refactor should_show_panel into tool.Blender (avoid helper.py) and merge into is_tab
This moves the logic from ui.py into tool.Blender. In general, helper.py
is a bit generic (and historic) and we should use tool instead.
bonsai-0.8.5-alpha2601142215
2026-01-15 09:15:13 +11:00