Commit Graph

20434 Commits

Author SHA1 Message Date
Ryan Schultz 03b3d3f627 Make Type Attributes panel values select_similar buttons
Each attribute value in BIM_PT_type_attributes is now a
bim.select_similar button with key "type.<Attribute>" (the selector
walks type. natively), mirroring the object Attributes panel pattern.
This gives type attributes the full modifier scheme - select, SHIFT
remove, CTRL filter, CTRL+SHIFT sum, ALT unhide, CTRL+ALT regex
dialog - with no operator changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 09:30:59 -05:00
Ryan Schultz e6697d0956 Replace select_products flags with a mode enum and consolidate loops
Spatial.select_products now takes mode="ADD"|"REMOVE"|"FILTER" instead
of the mutually exclusive remove / filter_selection booleans, matching
the regex dialog's action enum; helper.selection_mode() maps each
operator's two flag properties to it. core.select_by_material updated
accordingly. Upstream callers pass only products/unhide and are
unaffected.

select_ifc_class, select_similar_type, select_aggregate and
select_linked_aggregates now collect elements and delegate to
select_products instead of hand-rolling unhide/select/filter loops;
select_aggregate's manual IsDecomposedBy recursion is replaced with
get_parts/get_decomposition. Only select_similar keeps a bespoke loop
(tolerance-based value matching).

Intentional behavior deltas (also in the dev note): remove mode uses
plain select_set(False), so select_ifc_class no longer re-anchors the
active object; select_similar_type drops its O(n^2) visible_objects
gate and can latently select hidden occurrences like the other
operators; select_ifc_class and select_similar_type write the
clipboard query in every mode.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 09:09:52 -05:00
Ryan Schultz 69486b7d1d Refactor select operators onto shared scaffolding in bim.helper
- RegexSelectMixin owns the CTRL+ALT+Click regex dialog (properties,
  draw, pattern compilation, verb/clipboard/report tail) with two
  strategies: apply_regex_by_value for per-object matching and
  select_regex_products for union-of-products operators. The five
  regex operators now implement only apply_regex, get_regex_prefill
  and their clipboard key / count noun.
- decode_select_click(event) centralizes the modifier scheme (unhide /
  remove / filter / legacy / regex_dialog); all nine select operators
  use it. Per-operator LEFTMOUSE type guards were dropped, so keyboard
  invocation now honors modifiers uniformly.
- Tooltips compose from shared constants, fixing casing drift;
  SelectIfcClass and SelectSimilarType switch from docstrings to
  bl_description to allow composition.
- Delete core.select_similar_container, dead since the #7940 merge
  made SelectSimilarContainer call Spatial.select_products directly.

No behavior changes besides the keyboard-invocation and tooltip-text
normalization noted above.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 08:52:58 -05:00
Ryan Schultz 7a7bc75cba Add CTRL+ALT+Click regex-search dialog to five select operators
Opens a props dialog prefilled with the active object's value (key
value, type name, material name, group name, or aggregate name), then
matches it as an unanchored Python regex (entering foo behaves like
.*foo.*) with an Add / Remove / Filter action dropdown and an "Also
Unhide Hidden Objects" checkbox. Applied to select_similar,
select_similar_type, select_by_material, select_group_elements and
select_aggregate.

Multi-match operators (groups, aggregates) union their matches before
a single Spatial.select_products call so Filter cannot wrongly
intersect per-match. select_aggregate matches only IfcElement
aggregates, excluding spatial decomposition, and exposes Also Select
Parts / One Level Deep in the dialog. The equivalent selector query
(e.g. material = /.*foo.*/) is copied to the clipboard.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 08:21:27 -05:00
Ryan Schultz be8595e9a3 Merge PR #7940 (Concatenate_selections) to resolve build conflicts
Both branches grew from Unhide_with_alt_click and rewrote the same
select operators. This merge makes #7940 an ancestor so both PRs can
coexist in BonsaiPR builds, reconciling intents:

- select_aggregate: #7940 aggregate dedup dict + #8241
  keep_current_selection/active-object seeds
- SelectByMaterial: #7940 selection-derived materials + #8241
  remove/filter threading (active object only in those modes)
- SelectIfcClass: #7940 concatenated clipboard query + #8241 filter
  branch and deselect path
- SelectSimilarContainer: #7940 multi-container derivation and
  clipboard + #8241 remove/filter threading (active object only in
  those modes)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 14:33:19 -05:00
Ryan Schultz 6c97b6fa5e Add dev-notes doc for Additional_Selection_and_Deselection_Tools
Generated with the assistance of an AI coding tool.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 21:38:58 -05:00
Ryan Schultz 11be7e2b62 Add CTRL+Click filter-selection mode to select operators
CTRL+Click keeps only the already selected objects that match the
criteria (from the active object, or the clicked UI item), selecting
nothing new. Applied to the same operators as SHIFT+Click remove:
select_similar, select_ifc_class, select_similar_type,
select_by_material, select_similar_container,
select_decomposed_elements, select_group_elements, select_aggregate
and select_linked_aggregates, threaded through
Spatial.select_products(filter_selection=...).

Modifier scheme is now uniform: Click selects, SHIFT removes,
CTRL filters, ALT unhides. Legacy plain-CTRL functions moved to
CTRL+SHIFT (one-level-deep, exclude-children, calculate-sum).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 21:25:29 -05:00
Ryan Schultz 3c6d08fabf Add SHIFT+Click remove-from-selection to select operators
Follows the bim.select_similar precedent: SHIFT+Click deselects the
matched objects instead of selecting them, with criteria taken from
the active object only. Applied to select_ifc_class,
select_similar_type, select_by_material, select_similar_container,
select_decomposed_elements, select_group_elements, select_aggregate
and select_linked_aggregates, threaded through
Spatial.select_products(remove=...).

SHIFT bindings this overwrites (to be reworked later):
- select_ifc_class: match Predefined Type
- select_decomposed_elements: select all listed elements

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 20:47:18 -05:00
Ryan Schultz 60ccd3ab7e Add ALT+Click unhide to select_group_elements
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 20:16:04 -05:00
Ryan Schultz 7e3a9e4a75 Derive materials from selected objects in select_by_material
Previously only the explicit material prop was used. Now all
selected objects' materials are collected, with layer set usages
resolved to the specific layer index matching the clicked material.
Results are joined with " + " in the clipboard query.

Generated with the assistance of an AI coding tool.
2026-04-19 06:53:46 -05:00
Ryan Schultz 2a91d212b3 Deduplicate aggregates in select_aggregate clipboard query
All selected objects sharing the same aggregate would produce
duplicate entries in the clipboard query. Aggregates are now
collected into a dict keyed by id before selection and query
generation.

Generated with the assistance of an AI coding tool.
2026-04-19 06:53:46 -05:00
Ryan Schultz a14b02d32f Select from multiple containers in select_similar_container
Previously only the active object's container was used.
Now all selected objects' containers are collected and their
decomposed elements selected, with the query copied to the
clipboard as location = "A" + location = "B".

Generated with the assistance of an AI coding tool.
2026-04-19 06:53:46 -05:00
Ryan Schultz 20aa3ff94e Fix select_ifc_class clipboard query output
Previously the clipboard was set inside the class loop,
overwriting on each iteration and reporting multiple times.
Now all classes are joined with " + " and the clipboard is
set once after selection completes.

Generated with the assistance of an AI coding tool.
2026-04-19 06:53:46 -05:00
Ryan Schultz a2ec575618 Concatenate all selected values in select_similar
When multiple objects are selected, _generate_clipboard_query
previously only used the first reference value. Now all values
are joined with " + " so the clipboard query reflects every
selected object (e.g. GlobalId = "A" + GlobalId = "B").

Generated with the assistance of an AI coding tool.
2026-04-19 06:53:46 -05:00
Ryan Schultz f0d8a6f4f4 Add ALT+Click unhide to select_aggregate
When ALT is held, BIM_OT_select_aggregate now clears
hide_viewport and hide_set on matched objects before
selecting, consistent with the pattern used across other
selection operators on this branch.

Generated with the assistance of an AI coding tool.
2026-04-19 06:49:12 -05:00
Ryan Schultz 2ad30a00d7 Add container tools to spatial decomposition panel
- Add bim.select_similar_container button to the spatial
  decomposition panel, gated behind the new
  show_container_tools preference (renamed from
  container_hide_show_isolate)
- Fix select_similar_container to resolve container from
  the active list item rather than the active object
- Unhide individual objects when showing container
  visibility (set_container_visibility SHOW/ISOLATE)

Generated with the assistance of an AI coding tool.
2026-03-20 20:06:53 -05:00
Ryan Schultz e3d5e1d1fe Unhide objects when showing container visibility
When mode is SHOW or ISOLATE, also unhide individual
objects (hide_viewport and hide_set) within each
container, not just the collection-level visibility.

Generated with the assistance of an AI coding tool.
2026-03-20 19:38:57 -05:00
Ryan Schultz 15228ac8b5 Add ALT+Click unhide to select_decomposed_elements
Moves "select all listed elements" from ALT to SHIFT,
freeing ALT+Click to unhide hidden objects (viewport
and local hide) before selecting.

Generated with the assistance of an AI coding tool.
2026-03-20 19:20:43 -05:00
Ryan Schultz 011fb6660a Add ALT+Click unhide to select_linked_aggregates
ALT+Click now unhides hidden objects (viewport and local
hide) before selecting, matching the behavior added to
other select operators.

Generated with the assistance of an AI coding tool.
2026-03-20 19:06:04 -05:00
Ryan Schultz cd458780e6 Add ALT+Click unhide to select_by_material
ALT+Click now unhides hidden objects (viewport and local
hide) before selecting, matching the behavior added to
other select operators.

Generated with the assistance of an AI coding tool.
2026-03-20 19:00:47 -05:00
Ryan Schultz 873f9f061f Add ALT+Click unhide to select_similar_container
ALT+Click now unhides hidden objects (viewport and local
hide) before selecting. Also fixes select_products to set
hide_viewport in addition to hide_set when unhiding.

Generated with the assistance of an AI coding tool.
2026-03-20 18:54:43 -05:00
Ryan Schultz ea27b4f3ae Add ALT+Click unhide to select_similar_type
ALT+Click now unhides hidden objects (viewport and local
hide) before selecting, matching the behavior added to
select_ifc_class and select_similar.

Generated with the assistance of an AI coding tool.
2026-03-20 12:33:51 -05:00
Ryan Schultz 1ce62c948c Add ALT+Click unhide to select_similar
ALT+Click now unhides hidden objects (viewport and local
hide) before selecting, matching the same behavior added
to select_ifc_class.

Generated with the assistance of an AI coding tool.
2026-03-20 12:30:11 -05:00
Ryan Schultz f327a999d0 Closes #7780 - Add ALT+Click unhide to select_ifc_class
Clear hide_viewport and hide_set on matched objects
when the operator is invoked with Alt held, so hidden
objects of the target IFC class are revealed and selected.

Generated with the assistance of an AI coding tool.
2026-03-20 12:20:15 -05:00
Parag Debnath c026dd3b6e IsVentilated now defaults to False (#7819)
* IsVantillated now defaults to false

* IsVentilated now defaults to False

---------

Co-authored-by: Parag Debnath <paragforwork@gmail.com>
bonsai-0.8.5-alpha2603201233
2026-03-20 23:33:40 +11:00
Dion Moult d0f20371bd Add feature to get parent of a particular IFC class bonsai-0.8.5-alpha2603201210 2026-03-20 23:10:00 +11:00
Dion Moult 7b6e82a9cc Fix stair calculated params test to set custom_tread_lock=False
Tests using custom first/last tread runs were not setting
custom_tread_lock=False, so the custom values were silently ignored
since 8f7cf76d9 introduced the lock gate in the calculation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 23:09:15 +11:00
Andrej730 286c69429d gitignore bonsai external_dependencies 2026-03-20 15:49:08 +05:00
dependabot[bot] 9c22dc6013 Bump socket.io-parser from 4.2.4 to 4.2.6 in /src/ifctester/webapp
Bumps [socket.io-parser](https://github.com/socketio/socket.io) from 4.2.4 to 4.2.6.
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/socket.io-parser@4.2.4...socket.io-parser@4.2.6)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-version: 4.2.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
bonsai-0.8.5-alpha2603201045
2026-03-20 11:47:01 +01:00
Andrej730 0acbd5ffad black . 2026-03-20 15:45:24 +05:00
Andrej730 77f0c43314 ids_doc_generator - fix invalid escape sequence SyntaxWarning
SyntaxWarning: invalid escape sequence '\/' at line 312.
`\/` in a plain string is treated as `/` by accident; replaced with raw string r"..." to be explicit.
2026-03-20 15:43:13 +05:00
Andrej730 c1a9708504 ci.yml - build ifctester docs
to ensure script doesn't break
2026-03-20 15:43:13 +05:00
Andrej730 bcf6f6197d ifctester - move build-ids-docs target to ifctester Makefile
Also added a note why it lives in test folder and added it's output to gitignore.
2026-03-20 15:43:13 +05:00
Andrej730 1778656bd5 ids_doc_generator - fix Property args missed (ed8eb75)
TypeError: Property.__init__() got an unexpected keyword argument 'name'
2026-03-20 15:43:12 +05:00
Andrej730 54f450129c ids_doc_generator - fix failed_entities removed (bd92c043)
AttributeError: 'Attribute' object has no attribute 'failed_entities'
2026-03-20 15:43:12 +05:00
Andrej730 9fad1569c7 ids_doc_generator - fix error due to stale cache (f40281e97)
AssertionError: bool(facet(inst)) is expected
2026-03-20 15:43:12 +05:00
Andrej730 722c374fa6 ids_doc_generator - handle invalid entities coming from a test (1ed770d)
Exception: About to emit invalid example data: IfcMaterial.Name not optional
2026-03-20 15:43:12 +05:00
Andrej730 91b6c3e256 bcf v3 tests - fix wrong args, add dead code TODOs 2026-03-20 15:43:12 +05:00
Andrej730 ea3f71b4e0 rename test files to test_* prefix for pytest discovery and fix missing add_pset name arg 2026-03-20 15:43:12 +05:00
Andrej730 1a8b17e235 ifcfm cobie24 - remove unused ifc_file param from get_unit_name 2026-03-20 15:43:12 +05:00
Andrej730 2bad861122 ifcopenshell_wrapper.pyi - support varargs and kwargs in constructors 2026-03-20 15:43:11 +05:00
Andrej730 6c1fb3b01a Remove stale mass_time_units_in_wizard references (5c31ae4c3) 2026-03-20 15:36:18 +05:00
Andrej730 f5be64af6c Remove redundant __init__ from BaseLinesShader 2026-03-20 15:36:18 +05:00
Andrej730 b043dd4d04 Fix unknown-argument error in BaseLinesShader.__init__ 2026-03-20 15:36:18 +05:00
Andrej730 ffd2466321 Fix missing prop name in bim.mep_add_bend 2026-03-20 15:36:17 +05:00
Andrej730 e9241fd812 Fix error in bim.fit_flow_segments 2026-03-20 15:36:17 +05:00
Andrej730 48d45451ac Remove dead code join_walls_TZ, join_T, join_Z superseded in acdc40fb4 2026-03-20 15:36:17 +05:00
Andrej730 3b7cf6e865 Fix error displaying bsdd description after API update (ed81a0a4b) 2026-03-20 15:36:17 +05:00
Andrej730 6038373ee5 ifcopenshell_wrapper.pyi - sync default values, validate_stub - suggest default values 2026-03-20 15:36:16 +05:00
Andrej730 3d7de87b46 ifcopenshell_wrapper.pyi - add temp MakeVolume stub 2026-03-20 15:36:16 +05:00