Commit Graph

22786 Commits

Author SHA1 Message Date
Bruno Perdigão d227f45663 snap: add snap dicts creation for GPU object detection 2026-09-14 20:47:55 -03:00
Bruno Perdigão 2912df5147 snap: add GPU object detection
Initial implementation of GPU object detection. It uses an offscreen
buffer with object ID enconded as colors, then reads the pixel(s) under
the cursor to find which object is hit.
It has two modes, one to detect faces and other the detect boundary edges and isolated vertices.
2026-09-14 20:47:55 -03:00
CyrilWaechter 243f0f32dc Handle null Styles when loading surface styles
An IfcSurfaceStyle with a NULL Styles set raised a TypeError when
loading a project. Guard the iterations, matching the existing
defensive pattern in import_presentation_styles.

Generated with the assistance of an AI coding tool.
bonsai-0.9.0-alpha2609141631
2026-09-14 18:31:38 +02:00
dependabot[bot] ff2b57d152 build(deps): bump hendrikmuhs/ccache-action from 1.2.23 to 1.2.24
Bumps [hendrikmuhs/ccache-action](https://github.com/hendrikmuhs/ccache-action) from 1.2.23 to 1.2.24.
- [Release notes](https://github.com/hendrikmuhs/ccache-action/releases)
- [Commits](https://github.com/hendrikmuhs/ccache-action/compare/v1.2.23...v1.2.24)

---
updated-dependencies:
- dependency-name: hendrikmuhs/ccache-action
  dependency-version: 1.2.24
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
bonsai-0.9.0-alpha2609141223
2026-09-14 17:23:35 +05:00
Andrej730 f9d606e13a build-all-win: add script metadata 2026-09-14 17:23:21 +05:00
Andrej730 c8ece3ddb3 pyproject: add win to ty check 2026-09-14 17:23:21 +05:00
Andrej730 34e01b3cf8 build_win: fix wrong env var bug introduced in bfce5b94
In bfce5b94 by accident I removed `TARGET_ARCH` env variable to `VS_PLATFORM` in `build-all-win.py`, while it wasn't related to build-deps really - this was the variable coming from CI matrix.
2026-09-14 17:23:21 +05:00
Andrej730 1cadd711f1 build-deps: remove unnecessary mark installation for qt6 2026-09-14 17:23:21 +05:00
Andrej730 b59dc01019 build: run aqtinstall in deps directory to avoid stray log file 2026-09-14 17:23:21 +05:00
Andrej730 04ded95045 build-deps.py: use uv for running aqtinstall if possible, warn about possible global Python pollution
Using `uv` allows to run dependency in an ephemeral environment instead of polluting either local/global Python.
2026-09-14 17:23:21 +05:00
Andrej730 b93cd182fd build-deps: drop unnecessarypython.exe check
If `IFCOS_INSTALL_PYTHON` is enabled, then it's guaranteed that `PYTHONHOME` is set to nuget Python installation, so it will have python.exe.
2026-09-14 17:23:21 +05:00
Andrej730 3c8d8b2fda run-cmake.py: dont set any env variables
And pass needed values as cmake args instead
2026-09-14 17:23:21 +05:00
Andrej730 1b97857b60 build-deps.py: relax default logging to INFO 2026-09-14 17:23:21 +05:00
Andrej730 e7ae2097a4 run-cmake.py: cli args for using ninja and adding commit sha 2026-09-14 17:23:21 +05:00
Andrej730 e76b6bb9d7 build-all-win: use cli args instead of env vars 2026-09-14 17:23:21 +05:00
Andrej730 befc031ec5 build-deps.py: cli args to provide qt6 and Python version 2026-09-14 17:23:21 +05:00
Andrej730 a0e0516795 build-deps.py: add -y to skip initial confirmation prompt 2026-09-14 17:23:21 +05:00
Andrej730 73d24a50d0 build-all.cmd: keep using build-deps.cmd`until its removed 2026-09-14 17:23:21 +05:00
Andrej730 1ea95b9580 check-whitespace: add a note about Rust files 2026-09-14 17:23:21 +05:00
Andrej730 32b408c3d5 check-whitespace: fix idempotency issue
See the comment, if there was couple whitespaces at the end of the file without newline, it would take running `check-whitespace` twice to finally fix it.
2026-09-14 17:23:21 +05:00
Andrej730 f3013f29df check-whitespace: normalize css files 2026-09-14 17:23:21 +05:00
Andrej730 3e88479277 check-whitespace: normalize json files 2026-09-14 17:23:21 +05:00
Andrej730 0c12d2334b check-whitespace: normalize javascript files 2026-09-14 17:23:21 +05:00
Andrej730 032a361d16 check-whitespace: normalize .yaml files 2026-09-14 17:23:21 +05:00
Andrej730 3ae023bffc check-whitespace: normalize batch, shell scripts 2026-09-14 17:23:21 +05:00
Andrej730 62259da3af bonsai/docs: drop duplicated dev_environment scripts
Scripts were outdated now, redirecting to general `dev_environment.py` instructions.
2026-09-14 17:23:21 +05:00
Andrej730 1bb36cc1d4 gitignore: remove stray dev_environment.bat, .code-workspace entries
Seems to be a sneak-in from local environment in 2912580
2026-09-14 17:23:21 +05:00
Dion Moult ec210a87db ifcparse: use std::filesystem in guess_file_type()
The stat()-based path helpers were added in 573e53ebf as a speculative
workaround for #7131 ("Ugly workarounds to not depend on
std::filesystem"). That issue turned out to be a hardcoded schema list
missing HEADER_SECTION_SCHEMA and was fixed separately.

Since the plug-in architecture landed, libIfcParse already depends on
std::filesystem: schema.h exports schema_plugin_directory() returning a
std::filesystem::path, and plugin.cpp uses it throughout. The build also
mandates C++17. The workaround therefore no longer avoids anything and
its comment is misleading.

Restore the std::filesystem version, using the error_code overloads so
inaccessible paths are still reported as "not there" rather than
throwing, and route the path through ifcopenshell::path::from_utf8 so
non-ASCII paths work on Windows, as file_reader.cpp already does.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WcUNL8YygRrNC5KpxELMHs
2026-09-14 09:18:14 +02:00
Andrej730 23f3874de1 run-cmake.py: pass Python args as cmake args instead of env vars
Keeping it more explicit and to avoid reconfiguration issues.
bonsai-0.8.6-alpha2609131404
2026-09-11 19:12:01 +05:00
Andrej730 3ccfda1911 win/readme: hide remaining deprecated .cmd scripts 2026-09-11 19:12:01 +05:00
Andrej730 71cc22d795 Add win/build-all.py, deprecate build-all.cmd 2026-09-11 19:12:01 +05:00
Andrej730 d5fd959e6c Add run-cmake.py, deprecate run-cmake.bat
Also drop-in replacement mostly, except extra cmake args need to be provided now after `--` - `python run-cmake.py vs2022-x64 -- -DGLTF_SUPPORT=ON`.

Internally, script relies on env variables much much less.
2026-09-11 19:12:01 +05:00
Andrej730 e7b33a909d cmake: remove CGAL_LIBRARY_DIR
It's an artifact from times when CGAL wasn't a header-only library.
2026-09-11 19:12:01 +05:00
Andrej730 6317451a9e run-cmake: drop BOOST_INSTALL_DIR fallback value (2af7470)
`BOOST_INSTALL_DIR` is set in cache since 2af7470
2026-09-11 19:12:01 +05:00
Andrej730 8aa2f4e208 run-cmake: drop OCC_INCLUDE_DIR / OCC_LIBRARY_DIR (ce7fdcc)
They were not set by `build-deps.cmd` since ce7fdcc
2026-09-11 19:12:01 +05:00
Andrej730 51a86cdd86 Add install-/build-ifcopenshell.py, deprecate corresponding .bat files
Mainly drop-in replacement for `build-ifcopenshell.bat` with `--help`, kw args and args validation, but there's a small caveat.

Previously it was possible to pass args to the underlying build tool as simple positionals - e.g. `build-ifcopenshell vs2022-x64 Release /p:Foo=bar`.
This behaviour is disabled now, because it doesn't allow validating provided args - it's impossible to tell whether `--config Release` is meant to be passed to msbuild or was meant as `--build-cfg Release` for `build-ifcopenshell`.

But it's still possible to pass args to msbuild by using `--` - `python build-ifcopenshell.py vs2022-x64 Release -- /p:Foo=bar`

`install-ifcopenshell.py` is now just a small wrapper passing `--target INSTALL` arg.
2026-09-11 19:12:01 +05:00
Andrej730 322de0b56b build-deps.py: allow providing env vars as kw args
To include them in `--help` and make them more explicit.
2026-09-11 19:12:01 +05:00
Andrej730 ad77798921 cmake: avoid imported debug config only on MSVC 2026-09-11 19:12:01 +05:00
Andrej730 c54de35120 cmake: add fallback configs for opencollada (similar to 05ba93ab6)
add
2026-09-11 19:12:01 +05:00
Andrej730 65547a8694 build-deps.py: add todos to include version strings to installation paths 2026-09-11 19:12:01 +05:00
Andrej730 0da17c6515 build-deps: manifold to support co-existing Release/Debug builds 2026-09-11 19:12:01 +05:00
Andrej730 81df7982bc build-deps: --reuse-boost to support co-existing Release/Debug builds 2026-09-11 19:12:01 +05:00
Andrej730 c3b1c49157 ci: test building with manifold
As it's part of the default build in build-all.py.
2026-09-11 19:12:01 +05:00
Andrej730 7f9423daa6 build-deps.py: shortcut for getting active toolset 2026-09-11 19:12:01 +05:00
Andrej730 fb0a826ac9 build-deps.py: add kw args
So now user doesn't have to provide positional args they don't need if they're fine with the defaults - e.g. `python build-deps.py --build-cfg Debug`.
2026-09-11 19:12:01 +05:00
Andrej730 3be454447f build-deps.py: rename build_type_cfg to build_cfg (more concise) 2026-09-11 19:12:01 +05:00
Andrej730 8b571913ed api.h: format consistently for readibility 2026-09-11 19:12:01 +05:00
Thomas Krijnen 148ff02859 Fix to_string() on eof marker token (#9463)
* Rewrite to_string() to use switch{} and handle Token_NONE and identifier without as_string()

* Add regression tests for to_string() on tokens without a string form

Cover both halves of the recursion that made a whitespace-only file
segfault: token::to_string() on the EOF marker and on an instance name,
and a parse of input that lexes to zero tokens, which is how the header
parser reaches token::as_string() on the EOF marker.

Generated with the assistance of an AI coding tool.

---------

Co-authored-by: Bruno Postle <bruno@postle.net>
2026-09-10 11:02:00 +02:00
Dion Moult e1be433207 ifcparse: unregister a deleted instance's inverse records via its attributes (#9467)
process_deletion_inverse() called inverse_index::remove_source(), which
walked every record in the file's inverse index to find the ones whose
source is the deleted instance: O(R) per deletion, the dominant cost of
file.remove() on large files now that the lookup side no longer re-sorts.

The records a deleted instance contributed are exactly the entity
references in its own attributes, so walk those with the same visitor
build_inverses_() uses for registration and remove each record with a
targeted binary search instead. remove_source() has no callers left and
is deleted.

Also use the ordered view of batch_deletion_ids_ (a boost multi_index
that already had one) for the is-this-referencer-also-being-deleted
check in process_deletion_(), which was a linear std::find over the
sequenced view: O(b) per referencing instance made batch deletion of b
instances quadratic.

file.remove on 300 IfcPropertySet of a 155 MB IFC4 model (201k IfcRoot)
drops from 3.15 ms to 0.17 ms per call, batched removal of 2000 from
3.34 ms to 0.17 ms per call, root.remove_product on 100 walls from
332 ms to 131 ms per call.


Claude-Session: https://claude.ai/code/session_01HNrXDmR88wKPCYwGE21SyH
(cherry picked from commit 938442303f)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-09-10 08:04:58 +10:00
Bruno Postle 41390dad92 Accept an unquoted decimal in a selector value
Requiring quotes around a decimal was a surprise with no way to predict it:
Foobar.Baz>1 works, Foobar.Baz>1.5 is a syntax error, and > >= < <= are
almost always used on numbers. Writing Width>"0.2" also reads like a text
comparison even though it is not.

The "." is excluded from unquoted_string because it separates a pset from a
property, but that separator has already been consumed by the time a value is
read, so a number is unambiguous in value position. Add a decimal_string
alternative to the value rule only. Signed and leading dot forms are accepted,
1. is not, and pset, prop and query keys are unchanged - they still need
quoting for a ".".

The transformer returns the same string a quoted value would, so =1.5 and
="1.5" are the same query and compare() does the existing type coercion.
Nothing that parses today changes meaning; only inputs that used to be a
syntax error now work.

Update the quoting docs accordingly, and assert the Bay property that the
filter test set up but never checked.

Generated with the assistance of an AI coding tool.
bonsai-0.9.0-alpha2609092144
2026-09-10 07:44:17 +10:00