Commit Graph

1727 Commits

Author SHA1 Message Date
Andrej730 5197e27b13 typing 2024-04-17 14:48:55 +02:00
Andrej730 886467dfd6 typing 2024-04-17 14:46:06 +02:00
Andrej730 edce320756 utils.filter_elements docs and tests 2024-04-17 14:46:06 +02:00
Andrej730 96cc24c820 typing 2024-04-17 14:46:06 +02:00
Andrej730 8d1559b486 small fixes after d209cc9ff, added a test 2024-04-17 14:46:06 +02:00
Andrej730 38bbaa0a8f util.unit.py - black format 2024-04-17 14:46:06 +02:00
Andrej730 a4a965e7ab more typing 2024-04-17 14:46:06 +02:00
Geert Hesselink 15dd93b9fb Redundant closing symbol ' (#4413)
* scale placeangleunit

* add radian si_conversions

* return conversion value of planeangleunit

* Update unit.py

* redundant closing

* redundant closing
2024-04-17 14:46:06 +02:00
Geert Hesselink 6db45c0965 Scale placeangelunit unit type (#4406)
* scale placeangleunit

* add radian si_conversions

* return conversion value of planeangleunit

* Update unit.py
2024-04-17 14:46:06 +02:00
Andrej730 036a88de54 commented out apil.run settings serialization as it's not used currently 2024-04-17 14:46:06 +02:00
Andrej730 6cbc0e0564 small fixes 2024-04-17 14:46:06 +02:00
Andrej730 e5d1c8cfb9 add test for util.unit.calculate_unit_scale 2024-04-17 14:46:06 +02:00
Andrej730 0abea81e6b fix error in typing 2024-04-17 14:46:06 +02:00
Andrej730 ad87d31e6a shape_builder.create_axis2_placement_3d utility method and docs 2024-04-17 14:45:15 +02:00
Andrej730 ac4669f841 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-04-17 14:42:55 +02:00
Andrej730 5d370e8e2f fix typing loading issues 2024-04-17 14:42:55 +02:00
Andrej730 1d7c882231 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-04-17 14:42:55 +02:00
Andrej730 cbf95b2080 typing 2024-04-17 14:42:55 +02:00
Dion Moult 25b73fc35a Minor fixes to IfcCSV documentation 2024-04-17 14:42:54 +02:00
Dion Moult b70b285c03 See #4380. Remove support for EOL Python 3.6 2024-04-17 14:42:54 +02:00
Dion Moult 9de06fbd6e Fix #4300. You can now select spatial elements by their location too. 2024-04-17 14:42:54 +02:00
Dion Moult 0c5a173de7 Fix #4340. Indicate user needs to setup IFC2X3 user/app when using API directly. 2024-04-17 14:42:54 +02:00
Dion Moult 525279d4b7 Add Python3.12 to installation docs 2024-04-17 14:42:54 +02:00
Dion Moult dcc81eb6e9 See #4380. Bump IOS. 2024-04-17 14:42:54 +02:00
Andrej730 69767a7045 type.py - some typing 2024-04-17 14:41:52 +02:00
Andrej730 a99fbbfdd8 reassign_class - cover with tests 2024-04-17 14:41:52 +02:00
Andrej730 1f532491ec fix pass-valid-selected-enumeration.ifc after 5270045
.ifc was failing during test_validate.py
1) Changed schema to rc2 as rc3-4 doesn't have IfcBridgePart
2) PredefinedType and UsageType were mixed up
3) With just `.DECK.` it was failing with error below
```
With attribute:
    <attribute PredefinedType: <select IfcFacilityPartTypeSelect: (<enumeration IfcBridgePartTypeEnum: (ABUTMENT, DECK, DECK_SEGMENT, FOUNDATION, NOTDEFINED, PIER, PIER_SEGMENT, PYLON, SUBSTRUCTURE, SUPERSTRUCTURE, SURFACESTRUCTURE, USERDEFINED)> | <enumeration IfcFacilityPartCommonTypeEnum: (ABOVEGROUND, BELOWGROUND, JUNCTION, LEVELCROSSING, NOTDEFINED, SEGMENT, SUBSTRUCTURE, SUPERSTRUCTURE, TERMINAL, USERDEFINED)> | <enumeration IfcMarinePartTypeEnum: (ABOVEWATERLINE, ANCHORAGE, APPROACHCHANNEL, BELOWWATERLINE, BERTHINGSTRUCTURE, CHAMBER, CILL_LEVEL, COPELEVEL, CORE, CREST, GATEHEAD, GUDINGSTRUCTURE, HIGHWATERLINE, LANDFIELD, LEEWARDSIDE, LOWWATERLINE, MANUFACTURING, NAVIGATIONALAREA, NOTDEFINED, PROTECTION, SHIPTRANSFER, STORAGE, USERDEFINED, VEHICLESERVICING, WATERFIELD, WEATHERSIDE)> | <enumeration IfcRailwayPartTypeEnum: (DILATATIONSUPERSTRUCTURE, LINESIDESTRUCTURE, LINESIDESTRUCTUREPART, NOTDEFINED, PLAINTRACKSUPESTRUCTURE, SUPERSTRUCTURE, TRACKSTRUCTURE, TRACKSTRUCTUREPART, TURNOUTSUPERSTRUCTURE, USERDEFINED)> | <enumeration IfcRoadPartTypeEnum: (BICYCLECROSSING, BUS_STOP, CARRIAGEWAY, CENTRALISLAND, CENTRALRESERVE, HARDSHOULDER, INTERSECTION, LAYBY, NOTDEFINED, PARKINGBAY, PASSINGBAY, PEDESTRIAN_CROSSING, RAILWAYCROSSING, REFUGEISLAND, ROADSEGMENT, ROADSIDE, ROADSIDEPART, ROADWAYPLATEAU, ROUNDABOUT, SHOULDER, SIDEWALK, SOFTSHOULDER, TOLLPLAZA, TRAFFICISLAND, TRAFFICLANE, USERDEFINED)>)>>
Value:
    DECK
Not valid
```
2024-04-17 14:41:52 +02:00
Andrej730 a03f62c97e fix error removing pset from material or profile 2024-04-17 14:41:52 +02:00
Andrej730 f381dce64d fix tests after a971860 2024-04-17 14:41:52 +02:00
Andrej730 a86ac68e0c 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-04-17 13:41:18 +02:00
Andrej730 4ac771a214 Fix #4342 2024-04-16 13:28:46 +02:00
Andrej730 dd27107be8 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-04-16 13:28:46 +02:00
Andrej730 17da72232d unassign_material_style to handle constituents 2024-04-16 13:28:46 +02:00
Andrej730 c7ca87f9c4 api.unassign_representation_styles 2024-04-16 13:28:46 +02:00
Andrej730 f22369b960 assigning material styles to reuse existing styled item + tests 2024-04-16 13:28:46 +02:00
Andrej730 46eae7a7d2 assign_representation_styles to reuse existing styled item + tests 2024-04-16 13:28:46 +02:00
Andrej730 cb51b8da49 style.assign_material_style small optimization 2024-04-16 13:28:46 +02:00
Andrej730 ad33794945 descriptive error for missing user or application in ifc2x3 #4340 2024-04-16 13:28:45 +02:00
Andrej730 ec107d2f7f fixed bug migrating attributes to older ifc version (after 8728fa3) 2024-04-16 13:28:45 +02:00
Andrej730 356c81e80f black format 2024-04-16 13:28:45 +02:00
Andrej730 0077036716 Fix issues editing work time in ifc4x3 #4295 2024-04-16 13:28:45 +02:00
Andrej730 89da2b3b7d IFC4.3 test bootstrap 2024-04-16 13:28:45 +02:00
Andrej730 45a23d9371 style.assign_material_style to assign style to related shape aspects 2024-04-16 13:28:45 +02:00
Andrej730 c76a5a7ee7 promote get_shape_aspects to util.element method 2024-04-16 13:28:45 +02: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 16eba637f1 fix errors getting layer assignments in ifc2x3 #4330 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 e2ef636209 add fallback to the previous schema versions for docs and mappings
before it was breaking part of BlenderBIM UI if we would open IFC4X1 file
2024-04-16 11:35:31 +02:00