Petru Conduraru
4776bd7639
Atomic IFC file writes to prevent corruption on interrupted save ( #4797 )
...
file.write() streamed directly onto the target path, so a crash mid-write
left a truncated file with dangling STEP references. Serialize to a temp
file in the same directory, then atomically rename it onto the target.
- New IfcUtil::path::atomic_rename_file: std::rename on POSIX, MoveFileExW
with MOVEFILE_REPLACE_EXISTING on Windows. Unlike rename_file it never
unlinks the destination first, so there is no window where it goes missing.
- Fully in C++/swig (per aothms), so the FILE_NAME header is untouched: it
comes from the model header, not the output path (verified empirically).
- Temp lives next to the target so the rename stays on one filesystem.
- Stream is closed before the rename (Windows cannot move an open file).
- On any write error the temp is removed and the original target is intact.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com >
2026-07-07 14:22:44 +02:00
Thomas Krijnen
ca99ef3af7
More changes to pass around logger to parse-related calls
2026-06-14 14:49:14 +02:00
Thomas Krijnen
a7738eeb64
Pass around non-static logger instances and programmatic access to messages in-memory
2026-06-10 18:40:17 +02:00
Thomas Krijnen
69863ce4a9
Try and fix stub test
2025-10-26 10:03:43 +01:00
Thomas Krijnen
80066ba9e7
Different hack for allowing f.header.file_description.file.header.file_description.file
2025-10-25 21:54:42 +02:00
Thomas Krijnen
ea9e0c9ab4
readInstancePy() option to obtain type decls instead of strings
2025-10-25 13:55:55 +02:00
Thomas Krijnen
a6d20c0cc4
Follow up after 4d688170e0
2025-10-22 21:42:37 +02:00
Thomas Krijnen
e4877e8246
Ignore steal_instances() in python
2025-10-08 14:55:28 +02:00
Thomas Krijnen
ab59173135
Add a stream2_from_string() (mostly for wasm)
2025-09-23 11:32:52 +02:00
Thomas Krijnen
b1b95ec2db
Conditional compilation in wrapper
2025-09-14 19:15:31 +02:00
Thomas Krijnen
5f50e6fcf1
Conditional compilation in wrapper
2025-09-14 19:15:25 +02:00
Thomas Krijnen
49bbf0cb9e
Free memory
2025-09-09 13:26:37 +02:00
Thomas Krijnen
6ac95e1ed3
Access to underlying storage model in python
2025-09-04 16:47:56 +02:00
Thomas Krijnen
59a5bf2344
RocksDB zstd encryption; cache tuning; readonly open mode
2025-09-03 11:11:55 +02:00
Thomas Krijnen
453949ee01
Correctly wire up get_info2
2025-08-31 15:53:01 +02:00
Thomas Krijnen
dfaa8d510c
authorisation -> authorization in header schema for compatibility
2025-08-29 16:08:42 +02:00
Thomas Krijnen
a219d335ea
to_string() default to True
2025-08-28 11:15:53 +02:00
Thomas Krijnen
47f7afb33b
Help SWIG understand header entities
2025-08-28 11:15:36 +02:00
Thomas Krijnen
ea53c96134
Allow inspection of rocskdb keys in python
2025-08-26 12:53:35 +02:00
Thomas Krijnen
722e819e11
Support propsetdefset in python streaming mode
2025-08-26 10:20:36 +02:00
Thomas Krijnen
862aa71a77
Left-overs after merge
2025-08-26 10:20:08 +02:00
Thomas Krijnen
9d9e9ed4cb
Merge remote-tracking branch 'origin/v0.8.0' into tfk-rocksdb-storage
2025-08-26 10:17:57 +02:00
Thomas Krijnen
d2c7c1532c
Implement streaming scan through file and use in rocksdb serializer and python
2025-08-25 12:45:10 +02:00
Andrej730
0132edd774
Sync stub with the wrapper #6976
2025-08-07 21:02:34 +05:00
Andrej730
2e3c733c0d
IfcParseWrapper - exclude instances_by_reference
...
As it does exactly the same as get_inverse()
2025-06-17 18:41:19 +05:00
Andrej730
ff09cd0a56
IfcParseWrapper - instance_by_guid -> by_guid
...
It seems they have exactly the same signatures and it makes sense to just rename instance_by_guid to by_guid, instead of implementing it separately.
2025-06-17 18:41:19 +05:00
Andrej
d0f4dd00c7
getInverse -> get_inverses_by_declaration
...
Similar to getTotalInverses rename, to prevent confusing with get_inverse.
2025-06-11 19:39:46 +05:00
Andrej
eee94f53a4
get_inverse, get_inverse_indices, get_total_inverses - prevent possible crashes
...
When passing entity without an id (e.g. IfcBaseType)
2025-06-11 19:39:46 +05:00
Andrej
6bb028696d
getTotalInverses -> get_total_inverses_by_id
...
Rename method to avoid confusion with get_total_inverses
2025-06-11 19:39:46 +05:00
Thomas Krijnen
c935b2fc12
Merge branch 'v0.8.0' into tfk-rocksdb-storage
2025-03-25 13:05:45 +01:00
Sayan J. Das
cf3a554b15
Fix #5809 : Add safety check during file.write ( #6292 )
...
Co-authored-by: theseyan <sayanjyotidasworkmail@gmai.com >
2025-03-17 16:17:42 +05:00
Thomas Krijnen
10682fb226
Fix python binding
2025-03-14 10:20:22 +01:00
Thomas Krijnen
aa9b2d7428
populate_derived() upon instance creation, don't only rely on serialization 'hack' #5364
2024-10-07 20:41:34 +02:00
Andrej730
8ae951d27a
get_info_2 to support excluding identifier
2024-10-03 17:15:33 +05:00
Thomas Krijnen
2554280e50
triangulation-type setting for non-triangulated polyhedral from iterator
2024-09-18 19:28:07 +02:00
Andrej730
76ba3947f5
Expose header properties with invalid values #5246
2024-08-31 14:31:41 +02:00
Andrej730
afd5a5b23e
Fix get_info_2 #5248 after d80bcd1
2024-08-29 18:57:47 +05:00
Thomas Krijnen
d80bcd1a94
Unify variant storage ( #5118 )
2024-08-23 20:29:07 +02:00
Thomas Krijnen
7fa3cd45ca
#4452 release gil in ifcopenshell.open() and read()
2024-04-17 14:54:42 +02:00
Thomas Krijnen
d6250aaf2a
#3189 proposal ( #3190 )
2024-04-16 10:05:07 +02:00
Thomas Krijnen
ff2b79a41f
Distinguish between nil and derived in validate.py
2022-11-23 13:45:44 +01:00
Thomas Krijnen
f012286eda
#2408 ifcopenshell.file.get_inverse(with_attribute_indices)
2022-10-20 13:35:02 +02:00
Thomas Krijnen
cd27d48701
#2482 entity_instance.to_string()
2022-10-08 17:18:47 +02:00
Thomas Krijnen
d16f92a445
Option to set log format from python
2022-02-26 14:53:09 +01:00
Thomas Krijnen
531805fefb
#1692 get_info_2() logical
2022-01-17 11:19:30 +01:00
Thomas Krijnen
dbc6f521fe
#1912 apply also on types
2021-12-14 09:57:31 +01:00
Thomas Krijnen
c52f851d79
#1807 method mapping proposal
2021-12-14 09:57:31 +01:00
Thomas Krijnen
3380158f55
#1692 memory leak in get_info_2()
2021-12-13 10:32:05 +01:00
Dion Moult
5ad6d455f9
get_total_inverses now efficiently gets the full number of references to an entity
2021-12-02 09:28:04 +01:00
Dion Moult
cef1c86f6d
Experimental get_inverse_cardinality proposal. See #1904 .
2021-12-02 09:28:04 +01:00