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
Dion Moult
2bede1cdf0
Fix #4340 . Indicate user needs to setup IFC2X3 user/app when using API directly.
2024-03-01 19:46:50 +11:00
Andrej730
56e00d059b
fix error removing pset from material or profile
2024-02-28 16:54:11 +05:00
Andrej730
e3a1c29593
Fix #4365
...
Allowing to add new properties with None values if should_purge is not set to True (and it's False by default)
2024-02-27 17:33:56 +05:00
Andrej730
c1cd228911
Fix #4342
2024-02-22 16:19:19 +05:00
Andrej730
a971860094
style.assign_representation_styles to replace previously assigned styles
...
as probably in the most cases user would want 1 style per 1 representation item
After this it's finally possible in BBIM to assign styles to representation items through the materials: https://imgur.com/a/cgiJ1KV
2024-02-22 13:41:34 +05:00
Andrej730
2e45d4a57e
unassign_material_style to handle constituents
2024-02-21 15:15:03 +05:00
Andrej730
0d8c86a0f6
api.unassign_representation_styles
2024-02-21 15:14:28 +05:00
Andrej730
7f0df72fec
assigning material styles to reuse existing styled item + tests
2024-02-21 15:14:28 +05:00
Andrej730
863a8248af
assign_representation_styles to reuse existing styled item + tests
2024-02-21 12:36:06 +05:00
Andrej730
bdc991856c
style.assign_material_style small optimization
2024-02-21 11:32:48 +05:00
Andrej730
91199308a9
descriptive error for missing user or application in ifc2x3 #4340
2024-02-20 15:21:48 +05:00
Andrej730
551f3b0d8d
Fix issues editing work time in ifc4x3 #4295
2024-02-20 12:38:29 +05:00
Andrej730
96a8c1e8ae
style.assign_material_style to assign style to related shape aspects
2024-02-19 18:08:18 +05:00
Andrej730
a2ff63f9ec
Fix issue editing object placement that shares it's axis placement with other placements
...
If multiple object placements were reusing the same IfcAxis2Placement then editing one of them would remove IfcAxis2Placement ignoring it's inverse references making all other object placements invalid.
2024-02-16 18:04:09 +05:00
Andrej730
a82b0f30b0
fix errors getting layer assignments in ifc2x3 #4330
2024-02-16 18:04:09 +05:00
Andrej730
4f3ba7ae22
some typing
2024-02-14 14:25:55 +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
Andrej730
5e5de0bbd8
root.remove_product - fix some cases producing invalid ifc #4313
...
always remove IfcRelNests
1) if product is RelatingObject
2) if product is the only RelatedObject
2024-02-12 11:40:25 +05:00
Andrej730
bd64f42a54
remove_representation to consider representation item's layers too
...
and purge layers if they are out of items as they become invalid
2024-01-30 14:36:35 +05:00
Andrej730
5351966430
access layer assignments from inverse attribute instead of going through representation inverses
2024-01-30 14:36:35 +05:00
Andrej730
fda6fc6c48
geometry.remove_representation documentation
2024-01-26 17:20:39 +05:00
Andrej730
b7a3dd4164
black format
2024-01-26 14:54:50 +05:00
Andrej730
352321364c
fix couple building docs errors / warnings
2024-01-24 16:38:53 +05:00
Dion Moult
ab80400e16
See #4240 . Guard against possible user creating invalid userdefined attribute values.
2024-01-21 21:56:45 +11:00
Dion Moult
c88496c6a6
See #4240 . Fix validation issue with perspective drawing pyramid booleans. Boolean clipping results can only be used on swept solids.
2024-01-21 19:13:40 +11:00
Dion Moult
0ee07fb8cc
See #4240 . Fix bug where 2D arbitrary profiles were invalid IFC (used 3D point lists not 2D)
2024-01-21 16:07:00 +11:00
Dion Moult
f077ebdc81
Fix #4211 . Minor documentation fix that clarifies upstream bug about whether qto can be assigned to types.
2024-01-16 10:56:35 +11:00
Dion Moult
40b6b3bf17
Fix #4224 . Fix sequencing lint bugs.
2024-01-16 10:47:50 +11:00
Dion Moult
8df40dc4a6
Fix #4203 . Fix bug where removing nested cost items left orphaned relationships.
2024-01-12 18:14:49 +11:00
Sigma Dimensions (Yass)
b260bd3877
Record formula and resource name for cost values when calculating resource cost
2024-01-04 09:32:31 +01:00
Sigma Dimensions (Yass)
cd6246c382
fix cost value calculation when using parent cost
2024-01-04 09:30:27 +01:00
Andrej730
0fbe4d80c7
Clean up IfcIndexedColourMap removing representation #4138
...
Because we wasn't removing colour map, remove_representation was producing orphaned IfcPolygonalFaceSet that were referred by colour map.
2023-12-26 11:33:20 +05:00
Andrej730
0b47fb5987
Fix typo in 92cf0d9
2023-12-22 21:53:31 +05:00
Andrej730
92cf0d9265
remove_representation not to leave brokens refs with batch_remove #4138
2023-12-22 16:04:52 +05:00
Sigma Dimensions (Yass)
46454c5c94
consider unit basis for calculating resource costs #4122
2023-12-20 14:19:16 +01:00
Andrej730
f8af28f12a
style.edit_surface_style to support editing IfcSurfaceStyleLighting
...
It was failing because api method wasn't supporting IfcColourRgb attributes edit in general but only for IfcSurfaceStyleShading.SurfaceColour
2023-12-13 16:53:58 +05:00
Andrej730
c4080626df
style.add_surface_texture to work without blender material provided
2023-12-13 14:07:48 +05:00
Andrej730
f773480917
style.edit_surface_style - fix crash setting attribute to None
...
Occured on setting IfcColourOrFactor attribute to None (e.g. DiffuseColour).
2023-12-07 18:09:17 +05:00
Andrej730
496e58418a
fixed typo
2023-12-01 16:53:50 +05:00
MicheleBenedetti
31a763fe12
mistype-fix
2023-12-01 10:34:11 +11:00
Dion Moult
e8bd272189
Fix #4057 . Data objects for the API are now in util.data instead of mixed into the shape builder utility and only depends on numpy.
2023-11-29 14:36:01 +11:00
Bruno Postle
25bd94e84a
minor documentation typo fix
2023-11-28 23:28:38 +00:00
Dion Moult
434a11a502
Fix #4057 . Move clipping info dataclass to util.shape_builder
2023-11-29 09:28:24 +11:00
Dion Moult
03809b3d5e
Fix #3996 . Reassigning occurrences or types now also reassigns the correlating occurrence or type.
2023-11-28 16:44:31 +11:00
Dion Moult
6e932ec2fb
Fix #3974 . Bug where orphaned histories would be left in API remove operations.
2023-11-28 10:46:03 +11:00
Dion Moult
14f1acadb7
See #3974 . WIP review to ensure history removal in API.
2023-11-27 18:31:55 +11:00
Bruno Postle
8f650c56e5
Revert 1d972a6 as no datetime.UTC on CI server
2023-11-23 21:59:23 +00:00
Bruno Postle
1d972a6a6f
fix python 3.12 utcnow() deprecation warning
...
Warning is:
/usr/lib64/python3.12/site-packages/ifcopenshell/api/project/create_file.py:61:
DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version.
Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
2023-11-23 21:16:24 +00:00