Commit Graph

653 Commits

Author SHA1 Message Date
Andrej730 f1f8b3da6b spatial.dereference_structure - support batching #4474 2024-04-16 15:17:48 +05:00
Andrej730 8ac0d22a95 spatial.reference_structure - support batching #4474 2024-04-16 15:17:48 +05:00
Andrej730 3a9c023d33 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-04-16 11:38:49 +02:00
Andrej730 f522e2beb7 some typing 2024-04-16 11:38:20 +02:00
Andrej730 075b9e4775 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-04-16 11:38:20 +02:00
Andrej730 e289f23c40 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-04-16 11:35:31 +02:00
Andrej730 e8055ec396 remove_representation to consider representation item's layers too
and purge layers if they are out of items as they become invalid
2024-04-16 11:28:59 +02:00
Andrej730 6d8de6425f shape builder polyline example and tests 2024-04-16 11:28:59 +02:00
Dion Moult 65c00f75dd Minor test fix 2024-04-16 11:26:36 +02:00
Dion Moult 608147c245 Fix #4195. Fix regressions from f840da3 and add support for "contains string" comparisons. 2024-04-16 11:26:36 +02:00
Dion Moult 33051c0139 Fix #4203. Fix bug where removing nested cost items left orphaned relationships. 2024-04-16 11:26:36 +02:00
Andrej730 3008599eec 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.
2024-04-16 11:17:07 +02:00
krande f73a438d38 add test and update ci 2024-04-16 11:16:40 +02:00
Andrej730 eb30b30186 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
2024-04-16 11:16:07 +02:00
Andrej730 b6b0e958b5 style.add_surface_texture to work without blender material provided 2024-04-16 11:16:07 +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
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 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 142968559d Minor fix 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
Thomas Krijnen a7e925b942 Update test file for case insensitivity. Thanks Igor. 2024-04-16 11:05:23 +02:00
Andrej730 bc9fc0b462 Forgot to fix test after 35d66f5 2024-04-16 11:04:29 +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
Dion Moult 6f42c71e88 New verbose option in util get_pset(s) which lets you get ID and class for complex processing. 2024-04-16 10:56:22 +02:00
Dion Moult 00239234ff Manual booleans are now tracked via a Pset instead of arbitrary class conventions which should fix a bunch of issues. 2024-04-16 10:55:57 +02:00
Andrej730 739b793cd7 test for model.get_manual_booleans() #3709
added test that model.get_manual_booleans will ignore IfcBooleanClippings until we find some other solution to distinguish automatic and manual clippings. And some refactor along the way.
2024-04-16 10:55:56 +02:00
Dion Moult af9ce9d8fd Fix crash where IFCTester read directly from IFC in the UI 2024-04-16 10:37:16 +02:00
Andrej730 34a881da3a Remove orphaned IfcPropertyEnumeration
Noticed a couple hundreds of orphaned IfcPropertyEnumeration in my .ifc like below 😁

IFCPROPERTYENUMERATION('Status',(IFCLABEL('NEW'),IFCLABEL('EXISTING'),IFCLABEL('DEMOLISH'),IFCLABEL('TEMPORARY'),IFCLABEL('OTHER'),IFCLABEL('NOTKNOWN'),IFCLABEL('UNSET')),$);
2024-04-16 10:37:16 +02:00
Dion Moult b792fff98c New substr formatting function. 2024-04-16 10:34:29 +02:00
Dion Moult e7a90b5597 You can now choose both input and output units for imperial formatting 2024-04-16 10:34:29 +02:00
Dion Moult fbad0eeac2 Fix #3705. Fix ambiguity in using commas in unquoted strings in facet selector. 2024-04-16 10:34:28 +02:00
Dion Moult 628005333d Minor fixes, and IfcCSV now uses pandas to import ODS/XLSX for more robust importing. 2024-04-16 10:25:02 +02:00
Dion Moult a30b2dff31 Fix #3587. IfcCSV now supports custom formatting functions. 2024-04-16 10:25:02 +02:00
Dion Moult 1fc4b921e6 Fix failing tests and optimise brick tests. 2024-04-16 10:25:02 +02:00
Dion Moult 1c016c4212 See #3581. Fix failing IOS tests. 2024-04-16 10:25:01 +02:00
Andrej730 8bb1a129dd fixed bug in mep transitions
it wasn't taking into account that offset can be too big to sustain the angle
2024-04-16 10:25:00 +02:00
Andrej730 4e47827b86 added tests for shape builder transition length calculator 2024-04-16 10:25:00 +02:00
Andrej730 c2013a172f geometry.edit_object_placement was producing orphaned placements
It was producing orphaned IfcLocalPlacement if placement was parent to some other one. During edit_object_placement we were replacing all parent references with the new placement but wasn't removing the old one.
2024-04-16 10:24:57 +02:00
Andrej730 4fe03230c5 root.copy_class to remove connections from previously connected ports 2024-04-16 10:24:55 +02:00
Dion Moult 7038eb887f Fix #3584. Support matching enumerated properties in new facet selector. 2024-04-16 10:24:55 +02:00
Andrej730 ce91e04166 Remove empty IfcDocumentInformationRelationship #3581 2024-04-16 10:24:55 +02:00
Dion Moult faa5a78b39 Fix #3578. Support querying surface styles in tools like IfcCSV. 2024-04-16 10:24:55 +02:00