Commit Graph

1659 Commits

Author SHA1 Message Date
Bruno Postle a2a7d56691 minor documentation typo fix 2024-04-16 11:09:32 +02:00
Dion Moult b4bfc6e979 Fix #4057. Move clipping info dataclass to util.shape_builder 2024-04-16 11:09:32 +02:00
Dion Moult d6142d90a9 Fix #3996. Reassigning occurrences or types now also reassigns the correlating occurrence or type. 2024-04-16 11:09:28 +02:00
Dion Moult 4f8a6c47a1 Fix #4052. Bug where invalid plane was generated due to missing X axis. 2024-04-16 11:09:28 +02:00
Dion Moult ac42318a64 Fix #3974. Bug where orphaned histories would be left in API remove operations. 2024-04-16 11:09:28 +02:00
Kristoffer Andersen 4f655870b3 Update installation.rst
add more information about conda package installation
2024-04-16 11:09:28 +02:00
Dion Moult d0cab0821d See #3974. WIP review to ensure history removal in API. 2024-04-16 11:09:28 +02:00
Dion Moult 267505bd99 Fix #4034. Bug where abstract pset template applicabilities didn't apply to occurrences as well as types. 2024-04-16 11:09:24 +02:00
Bruno Postle c846edd896 Revert 1d972a6 as no datetime.UTC on CI server 2024-04-16 11:09:24 +02:00
Bruno Postle 98cba98f7d 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).
2024-04-16 11:09:24 +02:00
Bruno Postle 4b074fc79e python api documentation fix 2024-04-16 11:09:24 +02:00
Andrej730 518f054cbd edit_object_placement optimization for objects with subchildren #4035
1) We were iterating over same subchildren 2 or more times.
2) There is no need to change subchildren position at all since their parent position is already adjusted.

Explained here in detail - https://github.com/IfcOpenShell/IfcOpenShell/issues/4035#issuecomment-1822824352
2024-04-16 11:05:27 +02:00
Andrej730 6fd629f707 Fixed issue reassigning class to type class with userdefined type #4018
When PredefinedType is not found in the related enum reassign_class is considering it USERDEFINED and trying to set .ObjectType. The problem was it was doing for type classes also, when it should have set .ElementType instead.

Why it crashed BlenderBIM - in IfcClassData.data["has_entity"] we store currently active IFC entity which is recreated during `ifcopenshell.util.schema.reassign_class` making old entity invalid. Since `root.reassign_class` was failing in the process, related BBIM operator was failing too, IfcClassData wasn't updated and removed entity was accessed from UI leading to crash.
2024-04-16 11:05:27 +02:00
Dion Moult 990611c160 Add support for loading nested elements and consider nesting for indirect spatial containment. 2024-04-16 11:05:26 +02:00
Andrej730 e17a6c326f minor fix to support union typing before python 3.10 #3774 2024-04-16 11:05:26 +02:00
Andrej730 8dc9376844 ClippingInfo util class to pass and apply plane clippings #3774
Co-Authored-By: Carlos Villagrasa <carvillasil@gmail.com>
2024-04-16 11:05:26 +02:00
Andrej730 1c002c6845 minor fixes
- error in settings poll message for bim.assign_selected_as_product
- test that drawing.assign_product won't create new assignments for the same product
2024-04-16 11:05:26 +02:00
Andrej730 0cc337fa88 fixed issue adding bend between segments located at the same point
also added some tests
2024-04-16 11:05:26 +02:00
VDobranov 8dfd122430 Update reference_structure.py
A mistype in docs: should be IfcRelReferencedInSpatialStructure instead of IfcRelContainedInSpatialStructure
2024-04-16 11:05:26 +02:00
Andrej730 944f8695c7 root.remove_product to remove IfcRelFlowControlElements 2024-04-16 11:05:25 +02:00
Andrej730 72b3f1e967 api for assigning/unassigning flow controls #3981 2024-04-16 11:05:25 +02:00
Andrej730 1bb5a14b65 Fixed typo in control.assign_control, added tests 2024-04-16 11:05:25 +02:00
Igor.Sokolov 4404470d91 bf: IfcBSplineCurve is an isntance of abstract entity 2024-04-16 11:05:24 +02:00
Igor.Sokolov fe4dc87cd1 bf: pass-valid-selected-enumeration.ifc 2024-04-16 11:05:24 +02:00
Igor.Sokolov 0f774a675d bf: pass-group-1-rels-IFC2X3.ifc failed 2024-04-16 11:05:24 +02:00
Igor.Sokolov 27458cc079 bf: pass-attr-count-ok.ifc failed 2024-04-16 11:05:24 +02:00
Dion Moult 26d6fdb1bc Docs now mention historic builds 2024-04-16 11:05:24 +02:00
Dion Moult 142968559d Minor fix 2024-04-16 11:05:24 +02:00
ceegartner 4336b9c1ae Update unit.py - convert function, case issue
Hi,
I noticed an issue and suggest a fix:
Unit names from <si_conversions> are all lowercase, whereas project units extracted from the IFC files with <get_project_unit(...).Name> are uppercase. So the convert function didn't seem to work properly.
Hope this helps!
2024-04-16 11:05:24 +02:00
Dion Moult 9571146065 Fix #3951. mats selector now supports IfcMaterialList. 2024-04-16 11:05:24 +02:00
Dion Moult e2b132ba51 See #3951. IfcCSV now supports list concatenation. 2024-04-16 11:05:24 +02:00
Dion Moult 7f1a500445 Fix #3957. Fix bug where shared properties were not edited independently. 2024-04-16 11:05:24 +02:00
Dion Moult 2bd7ce5996 Fix #3958. Bug where reassigning type class would incorrectly assign occurrence classes. 2024-04-16 11:05:24 +02:00
Dion Moult f4f227ffe7 Fix regressions in mapped native swept disk handling 2024-04-16 11:05:24 +02:00
Ryan Schultz bb5fccf6fe More IFC class suggestions 2024-04-16 11:05:23 +02:00
Dion Moult cd5b54e240 Disable batching for removal as it doesn't seem to help mostly from experience. Still testing. 2024-04-16 11:05:23 +02:00
Dion Moult cbac393855 See #3955. PyPI release now specifies compatible Python versions. 2024-04-16 11:05:23 +02:00
Thomas Krijnen a7e925b942 Update test file for case insensitivity. Thanks Igor. 2024-04-16 11:05:23 +02:00
Dion Moult b07f7bcc58 get_footprint_area now unions 2D polygons to prevent double counting 2024-04-16 11:05:23 +02:00
Andrej730 1647acf0ca ifc2x3 pset library - fix bunch of unit related vlaidation errors #3929 2024-04-16 11:05:23 +02:00
Sigma Dimensions (Yass) aa0d1cc230 fix displaying undefined or userdefined units in cost schedules 2024-04-16 11:05:23 +02:00
Dion Moult f9236f8b42 You can now assign and unassign styles to materials 2024-04-16 11:04:29 +02:00
Andrej730 bc9fc0b462 Forgot to fix test after 35d66f5 2024-04-16 11:04:29 +02:00
Andrej730 0a309e191d Bump build version to fix #3889 2024-04-16 11:04:28 +02:00
Andrej730 6a7f8f65c7 move to tools methods for working with manual booleans #3709
Also fixed a bug adding boolean when pset is already added and representation type in add_boolean

```
  File "\addons\blenderbim\tool\ifc.py", line 201, in execute
    IfcStore.execute_ifc_operator(self, context)
  File "\addons\blenderbim\bim\ifc.py", line 336, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
  File "\addons\blenderbim\bim\module\model\opening.py", line 534, in _execute
    data = json.loads(pset["Data"])
  File "\addons\blenderbim\libs\site\packages\ifcopenshell\entity_instance.py", line 248, in __getitem__
    if key < 0 or key >= len(self):
TypeError: '<' not supported between instances of 'str' and 'int'
```
2024-04-16 11:04:28 +02:00
Andrej730 3c49dd15f7 localize mathutils dependency in tests #3895
replaced shapebuilder with general ifcopenshell code in `test_add_boolean` (the only place besides `test_shape_builder` where it was used), that way mathutils dependency in tests is localized only to `test_shape_builder.py`.

added test-safe option to makefile, so github workflow would ignore `test_shape_builder` tests for now and it wouldn't interrupt the entire workflow
2024-04-16 11:04:28 +02:00
Andrej730 f8a2946355 Support other voiding IfcFeatureElementSubtraction elements #3889
Support other voiding IfcFeatureElementSubtraction besides IfcOpeningElement.
2024-04-16 11:03:55 +02:00
Andrej730 4cf6d65e1a Fixed issue after 19345ff
It wasn't considering that EnumerationReference could be None
2024-04-16 11:03:55 +02:00
Andrej730 e1b64fba00 Keep placement axes recalculating profiles #3879 2024-04-16 10:56:22 +02:00
Andrej730 e2077c27dd small fix add_profile_representation - use of undefined variables 2024-04-16 10:56:22 +02:00