Commit Graph

46 Commits

Author SHA1 Message Date
Petru Conduraru fbe36532a0 ifcdiff: fix crash when exporting property diffs to JSON
DeepDiff's dictionary_item_added/set_item_added results are a
deepdiff.helper.SetOrdered instance, which subclasses orderly_set's
StableSetEq rather than the OrderedSet class json_dump_default checked
for, so the property relationship check always crashed export() with
"Object of type SetOrdered is not JSON serializable". Check against
StableSet, the common base class shared by every orderly_set set
flavour, instead.

Fixes #8905

Generated with the assistance of an AI coding tool.
2026-07-25 07:47:13 +10:00
Petru Conduraru 0a8ae14789 fix(ifcdiff): check attributes by default so PredefinedType changes are caught (#8214)
IfcDiff defaulted to relationships=["geometry"], so a plain diff only ever
compared geometry. Attribute-only edits on an element that kept its GlobalId
(a modified or removed PredefinedType, a renamed element, etc.) were silently
missed. The CLI made this worse: --relationships did not list "attributes" or
"geometry" as valid values, so there was no documented way to enable it.

The default is now ["attributes", "geometry"], so a plain `ifcdiff old new`
reports attribute changes alongside geometry changes. The CLI help and the
IfcDiff docstring now document all valid relationship values.

Added a regression test covering a PredefinedType change detected with the
default configuration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 22:29:31 +10: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
Andrej 8b4683aef1 replace api.run with static methods 2025-06-09 18:03:19 +05:00
Andrej730 ea6df7f617 Use latest syntax for setting geometry settings #5299
Also fixed:
- old include_curves use
- missing use of 'include_curves' in ifcopenshell.draw
2024-09-05 15:08:35 +05:00
Andrej730 1b49515d9f Replace ordered_set with orderly_set
deepdiff deprecated use of ordered_set and switched to orderly_set (ordered_set fork), so we switch too
see https://github.com/seperman/deepdiff/releases/tag/8.0.0
2024-08-28 11:14:52 +05:00
Andrej730 ffbd3e50c5 typing 2024-08-07 20:27:21 +05:00
Andrej730 98c4a1d110 ifcdiff - add simple tests 2024-08-07 17:33:10 +05:00
Andrej730 7e60b6888e ifcopenshell v0.8 fixes #5156 #4832 2024-08-07 17:33:10 +05: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
Johannes Schorr b674b8ca58 Fix typo in doctring in ifcdiff.py 2024-07-12 15:01:07 +10:00
Dion Moult 2d5be6cf89 Search replace 0.7.0 with 0.8.0 2024-06-27 11:49:12 +10:00
Dion Moult 4976074b18 Distribute IfcDiff on PyPI 2024-06-26 12:03:08 +10:00
Andrej730 cd2e33721e Remove deprecated STRICT_TOLERANCE setting #4832
Mentioned in #4565, it's now "set" by default
2024-06-08 00:33:17 +05:00
Dion Moult 7742e4da45 IfcDiff now uses the new selector syntax with the new UI 2024-04-18 10:48:21 +02:00
Jordan McManus aec751b762 changed type comparison to GlobalId 2024-04-17 14:46:07 +02:00
Jordan McManus 3066404b40 changed comparison for type relationships 2024-04-17 14:46:07 +02:00
Andrej730 182e428452 Fixed #4259
Result of DeepDiff contain ordered sets. Also added fallback for usual sets to lists just in case, should be safe.
2024-04-16 11:28:59 +02:00
Martin15135215 bb0feeab01 add cff for ifcdiff 2024-04-16 11:10:59 +02:00
Dion Moult 4131e595bd Make IfcDiff more forgiving when invalid geometry occurs. See #3755. 2024-04-16 10:37:15 +02:00
Dion Moult 4845242769 Fix #3366. Fix crash in IfcDiff if you are comparing a model with no geometry. 2024-04-15 13:30:40 +02:00
Dion Moult 2f7643424d IfcDiff now uses the iterator to compare geometry, which seems significantly faster. 2022-10-24 13:06:03 +11:00
Dion Moult 226c94381b IfcDiff now supports file objects as inputs instead of filepaths 2022-10-23 23:33:52 +11:00
Dion Moult 97cf1da4ff #2339 Read directly from raw data instead of using strings for IfcDiff output 2022-08-18 17:57:11 +10:00
Dion Moult 09a6f56f47 #2319 Add documentation for IfcDiff 2022-08-18 16:12:10 +10:00
Vukas Pajic 0b16c07e3a return result when calling diff() 2022-08-04 16:45:10 +02:00
Vukas Pajic a44d7e997a typo 2022-08-04 10:25:30 +02:00
Vukas Pajic 1df8908689 fix commit mistake 2022-08-04 10:24:13 +02:00
Vukas Pajic fd6f2f3fc4 Diff can be restricted by elements that match Selector query 2022-08-04 09:54:11 +02:00
Dion Moult a4d0378405 More IfcDiff optimisations (461s->247s), bump DeepDiff version, less false positives with more accurate number comparisons 2022-08-04 17:49:18 +10:00
Dion Moult 1629205c3f Some optimisations to IfcDiff for a 50% speed up (461s down to 300s on sample data) 2022-08-04 11:47:34 +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
htlcnn 4a6ec11f6f black ifccsv, ifcdiff 2020-11-01 23:50:02 +11:00
Dion Moult 55a54098dd Fix #961. Reloading is now more robust, and detects opening and projection changes to geometry 2020-09-01 12:18:48 +10:00
Dion Moult 6c7ddcca9c Fix #940 2020-07-31 16:12:14 +10:00
Bruno Postle 0cc816922c Fix shebang in command-line scripts 2020-07-30 10:11:32 +10:00
Dion Moult 048966bda2 Read from model precision to determine tolerance when doing diffs 2020-04-21 17:29:47 +10:00
Dion Moult f3590f2b7b Allow people to check all inverse relationships without filters 2020-04-03 11:15:29 +11:00
Dion Moult 22e4eb4570 Allow to diff inverse relationships 2020-04-03 11:10:14 +11:00
Dion Moult 5beb3dc755 Show percentage results in BIMTester, add tests for element existance, attributes from a list, and more generic attribute checking 2020-02-18 14:03:32 +11:00
Dion Moult 6d6f7af3d7 Create UI to run IFCDiff tool from Blender 2020-01-07 14:27:34 +11:00
Dion Moult dfe8149b17 Package IFC diff utility for Windows 2020-01-06 17:39:04 +11:00
Dion Moult e9418bfb0b Allow IFC diff utility to read from command line input 2019-12-04 21:58:59 +11:00
Dion Moult 55717756e6 Create IFC Diff tool, showing added, removed, and modified.
It produces a JSON output of exactly what changed. It requires a patched version of the DeepDiff library, which I will provide.
2019-10-25 16:42:49 +11:00