Commit Graph

1703 Commits

Author SHA1 Message Date
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
Andrej730 3dd94889fa ifcopenshell installation notion about compiling only specific schemas 2024-04-16 11:33:53 +02:00
Andrej730 c4bf4d7d92 bump required cmake version to remove deprecation warning
deprecation warning:
CMake Deprecation Warning at CMakeLists.txt:20 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
2024-04-16 11:32:04 +02:00
Andrej730 7fc8119956 add a note on get_info_2() #4270 2024-04-16 11:28:59 +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 8091b25fcd access layer assignments from inverse attribute instead of going through representation inverses 2024-04-16 11:28:59 +02:00
Andrej730 90a77d3453 geometry.remove_representation documentation 2024-04-16 11:28:59 +02:00
Andrej730 947ae02ab9 black format 2024-04-16 11:28:59 +02:00
Andrej730 5b0528cdbc shape builder docs 2024-04-16 11:28:59 +02:00
Andrej730 6d8de6425f shape builder polyline example and tests 2024-04-16 11:28:59 +02:00
Andrej730 c3ddfbdae2 fix couple building docs errors / warnings 2024-04-16 11:28:59 +02:00
Andrej730 d344923a3c shape builder docs fixes 2024-04-16 11:28:59 +02:00
Andrej730 a28e24d2f5 IFC4 Landscape Library
Created IFC library with simple trees, shrubs and hedges - with both 2d and 3d representations. Example - https://i.imgur.com/pOjh1si.png
Now it's available along with the furniture library when creating new project - https://i.imgur.com/Ho0B5Gn.png
2024-04-16 11:28:59 +02:00
Andrej730 8ba68d0f0b static ifcopenshell.geom.serializers and some typing for IDE code hints
code itself should work exactly the same way
2024-04-16 11:28:58 +02:00
Dion Moult 7b7dece5e7 See #4240. Guard against possible user creating invalid userdefined attribute values. 2024-04-16 11:28:58 +02:00
Dion Moult 0d3901336b See #4240. Fix validation issue with perspective drawing pyramid booleans. Boolean clipping results can only be used on swept solids. 2024-04-16 11:28:58 +02:00
Dion Moult 34c6be0f02 See #4240. Fix bug where 2D arbitrary profiles were invalid IFC (used 3D point lists not 2D) 2024-04-16 11:28:58 +02:00
Dion Moult 3d19d4d319 See #4216. Document using OpenCASCADE geometry serialisation to create geometry. 2024-04-16 11:26:47 +02:00
Dion Moult 4ee0930e05 Fix #4109. Write docs about geometry serialiser. 2024-04-16 11:26:47 +02:00
Dion Moult 881f38e163 Fix #4227. Add shapely as an optional dependency for IOS-Python 2024-04-16 11:26:45 +02:00
Thomas Krijnen 1764741027 #4220 weakref to file 2024-04-16 11:26:37 +02:00
Thomas Krijnen eb35b88a1e #4220 Update file.py 2024-04-16 11:26:37 +02:00
Dion Moult f2fab06438 Fix #4089. Document support for Linux AArch64 on Conda. 2024-04-16 11:26:37 +02:00
Dion Moult 1fbc770775 Fix #4211. Minor documentation fix that clarifies upstream bug about whether qto can be assigned to types. 2024-04-16 11:26:37 +02:00
Dion Moult aafda4e787 Fix #4224. Fix sequencing lint bugs. 2024-04-16 11:26:36 +02:00