Commit Graph

61 Commits

Author SHA1 Message Date
Dion Moult 19a1d88970 Fix all ty diagnostics on ifcviewer-wgpu (ci-lint ty-ios + ty-bonsai)
This branch carried v0.8.0's strict `[tool.ty.rules] all = "error"` config but
not the source fixes that were made upstream to satisfy it, so both ci-lint ty
gates were failing: `poe ty-ios` reported 256 diagnostics and `poe ty-bonsai`
258. Both are now clean.

Most fixes are ported from v0.8.0 and follow two idioms: initialise a name
before a conditional that may not bind it (plus an `assert` where the invariant
is real but not provable), and close an exhaustive `if`/`elif` chain with
`else: assert False, <discriminant>`.

The branch's own newer accessors are preserved throughout - `.file`,
`.declaration`, `file.types()`, `get_max_id()` are kept rather than reverted to
`wrapped_data.*`, and non-ty upstream changes (notably the in-progress geometry
cache removal) are deliberately not pulled in.

Notable fixes that are not straight ports:

* ifcopenshell_wrapper.pyi: `entity_instance.file` was declared as
  `def file(self) -> file`, where the property name shadows the `class file`
  below it, so the annotation resolved to `Unknown`. Every `element.file` in
  the codebase was therefore unchecked. Qualifying it to `ifcopenshell.file`
  restores `.schema` to its Literal union and surfaces no new diagnostics.

* model/wall.py: a duplicated merge fragment in the void-straddle path ran an
  always-true `if void_straddles:` that read `new_opening` from the mutually
  exclusive branch (stale value, or NameError on the first iteration), followed
  by an unreachable duplicate `elif`. Removing it makes the file match v0.8.0.

* light/operator.py: upstream's own fix unpacks three targets from two values
  and raises ValueError unconditionally; corrected to `None, None, None`.

* assign_system.py, validate.py, geom/main.py: walrus-in-genexp is valid at
  runtime (PEP 572 binds in the containing scope) but ty does not model it;
  rewritten as explicit loops, matching upstream.

Verified: poe ty-ios, poe ty-bonsai, ruff check src/ nix/, black --check .,
and compileall -W error at py3.10 (ifcopenshell-python) and py3.11 (bonsai).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 19:14:39 +10:00
Andrej730 4f429f60f9 ifcclash: fix use of undefined clash["position"]
It's an artifact from the old hppfcl clasher dropped in 18c38b312

(cherry picked from commit 71c6950a59)
2026-07-25 23:15:23 +10:00
Andrej730 90db564b4b ifcclash - add advanced package type that supports smart group clashes 2026-03-13 20:26:23 +05:00
Andrej730 13be6ccd45 Sort imports 2025-12-19 18:53:14 +05:00
Bruno Postle ad62c75f4f ifcclash ifccsv ifcdiff ifcpatch: README.md stubs
The pyproject.toml files were referencing these missing files
2025-11-09 20:52:12 +00:00
Andrej730 29bd89324a ifcopenshell.geom.tree.get_clash_type 2025-05-23 18:42:55 +05:00
Andrej730 bc5a291321 ifcclash - remove 'objects' dict item
It seems to be part of legacy code that's no longer used since 18c38b3
2025-05-23 18:42:55 +05:00
Andrej730 88befea174 typing 2025-05-23 18:42:55 +05:00
Andrej730 cc73143ac1 clash - typing fixes and some refactor 2025-05-21 18:43:02 +05:00
Andrej730 09df81ab15 typing 2024-10-31 18:40:13 +05:00
Andrej730 fb5d37b04b Fix support for python 3.10 #5662 2024-10-31 18:28:24 +05:00
Andrej730 5d83c49fe0 fix saving clash results to bcf #5377 2024-09-30 16:02:52 +05:00
Andrej730 3ad58aba7a ifcclash typing 2024-09-30 16:02:52 +05:00
Dion Moult e7b791f4a2 Run black on utils 2024-07-26 12:16:36 +10:00
Dion Moult 0ecc3d3e2a Share common makefile instructions, use venv for running build, and separate dist/build dirs 2024-07-18 23:43:12 +10:00
Dion Moult 2d5be6cf89 Search replace 0.7.0 with 0.8.0 2024-06-27 11:49:12 +10:00
Dion Moult 6474552649 IfcClash workflow now uses VERSION 2024-06-12 18:25:05 +10:00
Dion Moult ef1a92a9ee Publish IfcClash to PyPI 2024-04-18 10:48:23 +02:00
Dion Moult 619f461829 Fix #4060. The colour by property panel now shows the number of results in the legend. 2024-04-18 10:48:21 +02:00
Dion Moult 94bad4c4cb Switch over clash to latest add_element signature 2024-04-18 10:43:02 +02:00
Dion Moult 18c38b312d Upgrade IfcClash to use new clash capabilities (currently unmerged from feature-clash2) 2024-04-17 14:58:13 +02:00
Martin15135215 76ec22d85c add cff for ifcclash 2024-04-16 11:10:59 +02:00
Dion Moult 99e2598c00 Fix #3355. Reimplement graphical clash snapshots in BCF from IfcClash in the BlenderBIM Add-on. 2024-04-15 13:30:40 +02:00
Andrea Ghensi a4566797fe fix: ifcclash bcfxml export 2023-01-15 07:23:42 +11:00
Dion Moult 9d39760f6f Add IfcClash to docs 2023-01-10 06:38:53 +11:00
Dion Moult 18a52fd5f8 IfcClash now has logging and fix bug where exclude clash filters on large files was very slow 2021-08-08 16:54:48 +10:00
Dion Moult 70f6857325 Fix #1357. Remove temporary workaround for broadphase tree creation. Thanks aothms! 2021-08-08 14:02:24 +10:00
Dion Moult 94f0612752 WIP copyright statements. See #1082. Also IFCP6 is now IFC4D as we will expand into more 4D apps and widen the scope. 2021-08-05 13:21:55 +10:00
Dion Moult 5cf07a910e Include licenses on IfcOpenShell sub-utilities. See #1082. 2021-08-04 10:51:31 +10:00
Dion Moult ecfe8c3799 IfcClash is now able to be built as an isolated Python binary. Hooray! 2021-08-03 22:44:46 +10:00
Dion Moult 7403d14001 Fix IfcPatch pyinstaller script to make it easier to distribute ifcpatch. 2021-08-03 22:35:40 +10:00
Dion Moult e0cd74d0ad Fix #1338. Add documentation for how to use IfcClash. 2021-08-03 17:46:26 +10:00
Dion Moult 4fe427558f Minor fix. 2021-08-03 16:55:30 +10:00
Dion Moult f25fb0db51 New hppfcl IfcClash packaged for the BlenderBIM Add-on. New MacOS support. See #1357. 2021-08-03 13:29:40 +10:00
Dion Moult 557f8e6d69 New ifcopenshell.geom.tree based broadphase collision for IfcClash instead of aabbtree. Also, upgrades for new bcf.v2 namespace implemented. See #1357. 2021-08-02 20:32:31 +10:00
Dion Moult 86a44c21ac WIP experimental hpp-fcl and aabbtree-based IfcClash 2021-08-01 10:51:11 +10:00
Dion Moult cd6c258687 IFC Clash in the BlenderBIM Add-on now generates snapshots of clashes in BCF 2020-12-30 12:18:41 +11:00
Dion Moult c502d39aaf Add support for BCFXML export of IFC Clash results 2020-12-29 22:49:22 +11:00
Vincent Cadoret f3269b732f More sensible names for the Smart Clash Groups 2020-12-12 13:04:28 +11:00
Vincent Cadoret 14c726008d Split out clashes that were not grouped so they so up individually. 2020-12-12 13:04:28 +11:00
Vincent Cadoret 50d7efa99b move import statements to make dependencies optional
so regular clashing doesn't break if the dependencies are not present.
2020-12-01 14:06:57 +11:00
Vincent Cadoret 957c719224 Skip clash_set if it has 0 clashes 2020-12-01 14:06:57 +11:00
Vincent Cadoret b407b815e2 Allow selection of max grouping distance in UI 2020-12-01 14:06:57 +11:00
Vincent Cadoret 5a06bd5a57 Minimum viable protoype for Smart Clash Grouping completed 2020-12-01 14:06:57 +11:00
htlcnn 892be5444c black ifcclash 2020-11-01 23:50:02 +11:00
Dion Moult 4013a7e8b7 IFC Clash now uses iterator filters for faster clashing when using filters 2020-10-22 13:01:04 +11:00
Dion Moult 1a09658ec9 Fix IfcClash bug where spatial elements wouldn't get affected by user filters 2020-10-21 23:14:42 +11:00
Dion Moult 982166ac62 Increase maximum contacts threshold default so that it works out of the box for larger projects 2020-10-21 23:14:09 +11:00
Dion Moult 44d6060924 IFC clash now optimistically skips clashes that are likely to be merely coincident, thus resulting in less false positives 2020-10-21 23:13:43 +11:00
Dion Moult 6c7ddcca9c Fix #940 2020-07-31 16:12:14 +10:00