Dion Moult
a6a27442fb
Add test case for bugfix 55e97fd1
2025-08-12 19:00:28 +10:00
Andrej730
b4740b6949
append_asset to also match material sets by the name #6762
2025-07-21 18:10:11 +05:00
Andrej730
381fca0812
black .
2025-05-09 19:26:27 +05:00
Dion Moult
6bf9b8b0c9
Fix bug where appending assets could accidentally create duplicate contexts
2025-05-09 15:24:17 +10:00
Andrej730
a49ccfcfc8
test_append_asset - fix skipped test
...
It wasn't appending library_material so test would never fail
2025-04-11 19:55:26 +05:00
Andrej730
7974d8a0d0
project.append_asset - test assume_asset_uniqueness_by_name=False
2025-04-11 19:55:26 +05:00
Andrej730
c58b84ddb5
append_asset - fix duplicated applications/organizations/pao
...
Noticed when starting new project with demo library it had 29 duplicated IfcApplications...
2025-03-28 17:59:07 +05:00
Andrej730
2987d38a31
append_asset - check unique styles based on their name #6269
2025-03-05 18:53:56 +05:00
Andrej730
56f0c19a85
append_asset to support IfcPresentationLayerAssignment #6023
2025-02-04 17:37:56 +05:00
Andrej730
c2ae3dcb08
append_asset - extend existing rels matching them by project guid
...
Mentioned in #6039
2025-01-31 17:12:31 +05:00
Andrej730
553872ced2
append_asset - fix issue appending elements that have as_entity() -> None #6037 #6039
2025-01-30 16:06:19 +05:00
Andrej730
f43e33b969
apped_asset - fix passed removed elements after 3ffc0bc #6044
...
Before 3ffc0bc checking identities were handled by file.add but now it's handled append_asset, therefore should be a way to clean removed entities.
2025-01-28 17:22:26 +05:00
Andrej730
7bfe844d53
Rename void to feature in code 03bfd828e2
2025-01-28 15:23:43 +05:00
Andrej730
42d01ac222
Fix append_asset conversion issue after 3ffc0bc #6012
...
Custom file.add wasn't considering IfcLengthMeasure attributes...
2025-01-23 18:14:16 +05:00
Andrej730
605a29786c
Fix tests after 7b62b03
...
Since calculate_unit_scale now requires a project.
def calculate_unit_scale(ifc_file: ifcopenshell.file, unit_type: str = "LENGTHUNIT") -> float:
"""Returns a unit scale factor to convert to and from IFC project units and SI units.
Example:
.. code:: python
ifc_project_length * unit_scale = si_meters
si_meters / unit_scale = ifc_project_length
:param ifc_file: The IFC file.
:param unit_type: The type of SI unit, defaults to "LENGTHUNIT"
:returns: The scale factor
"""
> if not (units := ifc_file.by_type("IfcProject")[0].UnitsInContext):
E IndexError: list index out of range
2025-01-22 18:24:52 +05:00
Andrej730
3ffc0bc39c
append_asset to use custom file.add to prevent duplicating profiles and materials #5925
2025-01-20 16:23:31 +05:00
Andrej730
74fe1b4eb9
append_asset - ensure to update existing rels appending second asset
...
E.g. in #5890 pset was shared by 2 elements and they it worked is
1) it appended first element and it's rel to pset
2) it appended second element and skipped updating it's rel as it was appended before. Now it's going to update it to ensure it encludes second element too.
I believe, issue occurred after 8c28f52 when we stopped duplicating inverses and started to reuse them.
2024-12-20 12:47:10 +05:00
Andrej730
7597b1b29c
bonsai, ifcopenshell - append IfcSurfaceStyles from other projects
...
And other IfcPresentationStyles, though they are not currently supported by bonsai.
Example - https://imgur.com/a/AHlvowp
2024-08-15 18:18:05 +05:00
Andrej730
644f32d11c
Fix errors appending assets when projects are using georeferencing #5110
2024-08-08 18:11:00 +05:00
Dion Moult
a6286293d8
Run black on IOS-Python
2024-07-26 12:00:57 +10:00
Dion Moult
07060fc769
Replace all ifcopenshell.api.run with ifcopenshell.api static functions.
2024-06-28 12:36:31 +10:00
Andrej730
a9cba30da6
ifc2x3 tests
...
removed part of test_append_two_type_products_sharing_the_same_material_indirectly_via_a_material_set for ifc2x3 compatibility and removed part is already tested in test_append_two_type_products_sharing_the_same_material_with_properties
2024-05-13 18:01:18 +05:00
Andrej730
ac29e152bb
project.unassign_declaration - support batching #4474
2024-05-03 16:28:10 +05:00
Andrej730
de690a385c
project.assign_declaration - support batching #4474
2024-05-03 16:28:10 +05:00
Andrej730
59cc9c0a16
material.assign_material - support batching #4474
2024-04-12 17:41:37 +05:00
Andrej730
df4943205a
type.assign_type - support batching #4474
2024-04-10 18:58:44 +05:00
Andrej730
e69597f72b
typing
2024-04-10 18:45:36 +05:00
Andrej730
8c28f52e6a
fix duplicated ifcstyleditems using append_asset
...
since we don't use `file.add` to add inverse items and we use `file.create_entity` it was duplicating new elements, added optional parameter that makes it possible to track already added relationships between `append_asset`s.
2024-03-05 14:18:18 +05:00
Andrej730
50648fd350
append_asset - keep preexisting contexts valid #4280
...
issue occurred with ifcpatch ExtractElements - it was adding project from other ifc file (with the contexts) and then adding some elements from it using `append_asset`. During `append_asset` it was considering existing context with the duplicated one and was partially purging it.
2024-03-04 18:04:24 +05:00
Andrej730
a33a1700dc
Fix bug in ExtractElements recipe adding a lot unrelated products
...
if you'd add a type product and it had material that were used in bunch of ther products
example - https://community.osarch.org/discussion/1965/error-extracting-ifcslab-or-ifccolumn
2024-02-14 14:23:50 +05:00
Dion Moult
346071185f
Fix bug where appending a product from a library which had relationships to types caused a bunch of types to be pulled in unintentionally
2023-03-24 20:53:55 +11:00
Dion Moult
00fc71dcbe
Fix #2837 . Shared subelements mistakenly caused the subelement append loop to break early. The solution is to traverse one level at a time.
2023-03-24 17:36:46 +11:00
Dion Moult
ae09adf854
Fix #2424 . Bug where indirect assets (e.g. importing a type using a material) with relationships had their relationships duplicated
2023-02-24 13:01:26 +11:00
Dion Moult
516bd37518
Fix #2550 . Bug where material styles weren't included when appending from a library
2022-11-07 16:20:23 +11:00
Dion Moult
a34c0cb35c
Fix a variety of IFC validation errors in entity creation and asset appending
2022-10-14 18:19:35 +11:00
Dion Moult
c7af6c4482
Fix #2420 . Bug where project library assets sharing relationships with other assets would pull in other assets
2022-09-18 23:19:23 +10:00
Dion Moult
917344ee1d
Fix bug where new instances may have a wrong Z coordinate
2022-09-05 11:13:31 +10:00
Dion Moult
68ef6458d7
Fix #2379 . Regressions where context adding never had any tests and failed.
2022-09-05 11:13:31 +10:00
Dion Moult
810c71dfa2
IfcOpenShell-python licensing and black. See #1082 .
2022-01-19 12:18:33 +11:00
Dion Moult
1bbbc82b72
Fix #1962 . You can now easily append product assets using the API.
2022-01-18 17:44:50 +11:00