Commit Graph

1388 Commits

Author SHA1 Message Date
Thomas Krijnen 3d13b6468d Use schema_identifier for schema and express rule validation. See #3126 2024-04-16 10:55:58 +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
Dion Moult 49e27788da Write documentation for placement utility 2024-04-16 10:55:57 +02:00
Dion Moult 7170d9f06f See #3817. WARNING: fundamental change. Standardise prioritisation of all context permutations when loading occurrences and types. 2024-04-16 10:55:57 +02:00
Dion Moult 83b5494c81 New documentation for shape utility 2024-04-16 10:55:57 +02:00
Dion Moult 9f23f49ecd Implement projected surface area calculation function in util.shape 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
taylor c88b3a3ad8 Fixed model reference 2024-04-16 10:55:56 +02:00
Dion Moult 8119b3199a Document geolocation util and add support for ePSet IFC2X3 fallbacks. 2024-04-16 10:55:56 +02:00
Andrej730 984dca6408 Fixed #3832 2024-04-16 10:37:19 +02:00
Andrej730 1f815619b6 copy_deep to always pass exclude_callback to the recursion
It wasn't passing the exclude_callback if attribute of the copied element wasn't a tuple, resulting in duplicated named profiles in case if you'd copy a IfcBooleanClippingResult #3810

For example, how copy_deep of IfcProductDefinitionShape with boolean clipping previously would work:
V IfcShapeRepresentation - copied with exlude_callback (part of .Representations[])
V IfcBooleanClippingResult - copied with exlude_callback (part of .Items[])
X IfcExtrudedAreaSolid - copied without exlude_callback becuase it's part of .FirstOperand (not an array) and we have IfcIShapeProfileDef duplicated

Case without booleanclippings:
V IfcShapeRepresentation - copied with exlude_callback (part of .Representations[])
V IfcExtrudedAreaSolid - copied with exlude_callback, since it's part of .Items[], IfcIShapeProfileDef not duplicated
2024-04-16 10:37:19 +02:00
Dion Moult 30495f2688 You can now interact with IfcFM via CLI 2024-04-16 10:37:18 +02:00
Sigma Dimensions (Yass) 070439fa07 run black and forgotten calender utils 2024-04-16 10:37:18 +02:00
Sigma Dimensions (Yass) 6b25a64976 fix typo 2024-04-16 10:37:18 +02:00
Dion Moult 9ef5dc9f8e Fix #3791. Add isodate as an optional dependency to ifcopenshell-python. 2024-04-16 10:37:17 +02:00
Sigma Dimensions (Yass) e9ed850b78 Proposal to use resource's parent cost, reducing manual insertions 2024-04-16 10:37:17 +02:00
A. R. S 2691e8a082 Try to get unit from EnumerationReference for IfcPropertyEnumeratedValue 2024-04-16 10:37:17 +02:00
Andrej730 1ae1e4c4f9 fixed error in api.system.disconnect_port
Error was:
TypeError: can only concatenate tuple (not "list") to tuple
2024-04-16 10:37:17 +02:00
Sigma Dimensions (Yass) f79e6ada9b cascade schedule when adding a sequence relationship 2024-04-16 10:37:16 +02:00
Sigma Dimensions (Yass) a96e7d97ac fix count_working_days when the start and finish are the same same hours 2024-04-16 10:37:16 +02:00
Sigma Dimensions (Yass) 8549debdc9 fix calculating critical path to consider:
- parent tasks with sequence assignments #3772
- tasks that are constrained by a schedule start
2024-04-16 10:37:16 +02:00
Sigma Dimensions (Yass) 46c775c585 fix cascading schedule when parent tasks have sequence relationships #3772 2024-04-16 10:37:16 +02:00
Sigma Dimensions (Yass) 145f601a2e purge cost schedules 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
Andrej730 ecf3da1d86 fixed bug creating transition shapes
it was accidentally assigning extrusion vector instead of an offset
2024-04-16 10:37:16 +02:00
Andrej730 37f1f6d125 MEP bends - fixed bunch of bugs related to adjusting already existing bends types 2024-04-16 10:37:15 +02:00
Andrej730 5f94e2b251 bends - support for zero radius bends 2024-04-16 10:37:15 +02:00
Andrej730 4b48b30c3b bends - consider profile dimensions searching for compatible fitting
So basically now it won't reuse a bend fitting created for the same profile but with different dimension.
2024-04-16 10:37:15 +02:00
Andrej730 37eb1751b4 bends - adjusting compatible fitting rotation to match the segments
Demo - https://imgur.com/a/cYdWy9X (note that no bend types created in the process - it's just adjusting the type created for the first two segments).
2024-04-16 10:37:15 +02:00
Andrej730 5715a14b17 bends - use IfcArcIndex to define bends curves
instead of manually generating polylines of segments
2024-04-16 10:37:15 +02:00
Andrej730 e7b6fad348 bends - support for start and end segments 2024-04-16 10:37:15 +02:00
Andrej730 959f05d154 shapebuilder - replace y extrusion args with shortcut for readibility 2024-04-16 10:37:15 +02:00
Andrej730 7cef9ffe0e Bends - replace faceset with simple extrusion 2024-04-16 10:37:15 +02:00
Andrej730 5180f40245 MEP bends - support for circular profiles
Demo - https://imgur.com/a/XQBOvGz
2024-04-16 10:37:15 +02:00
Dion Moult b25fae8ca8 Don't strip selector query keys to allow for explicit "mistakes" in key names. 2024-04-16 10:37:15 +02:00
Dion Moult d27e0bdf10 New util.system.get_port_element function. 2024-04-16 10:37:15 +02:00
Dion Moult cc1a2db3ff Allow optional second arguments to substr formatting. 2024-04-16 10:37:15 +02:00
Andrej730 315e8a436a MEP bends - more robust start/end points detection
also support for bends with angles > 90 degrees and some other bugs fixed
2024-04-16 10:34:30 +02:00
Dion Moult 913ccd9289 Improve usability of pset template UI by removing save button and using new explicit applicable entity defaults to mitigate possible invalid pset templates. 2024-04-16 10:34:30 +02:00
Andrej730 602ec57cba Considering parametric data for fitting #3695
Search for compatible fitting wasn't taking into account that maybe fitting used for the same segments but fitting's parameters are not the same (such as start_length, end_length, angle and offset between profiles).

I also forgot to promote transition angle to operator's property😬
2024-04-16 10:34:29 +02:00
Andrej730 a1bca1bb4a Fixed issue creating slabs in IFC2X3 #3696
Error traceback is below - it was trying to set IfcExtrudedAreaSolid.Position to None when in IFC2x3 Position wasn't optional, so now in IFC2X3 it's going to have some default position

RuntimeError: Error: Python: Traceback (most recent call last):
  File "\bim\module\model\product.py", line 123, in execute
    return IfcStore.execute_ifc_operator(self, context)
  File "\bim\ifc.py", line 336, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
  File "\bim\module\model\product.py", line 148, in _execute
    if self.generate_layered_element(ifc_class, relating_type):
  File "\bim\module\model\product.py", line 274, in generate_layered_element
    obj = slab.DumbSlabGenerator(relating_type).generate()
  File "\bim\module\model\slab.py", line 143, in generate
    return self.derive_from_cursor()
  File "\bim\module\model\slab.py", line 147, in derive_from_cursor
    return self.create_slab()
  File "\bim\module\model\slab.py", line 179, in create_slab
    representation = ifcopenshell.api.run(
  File "\libs\site\packages\ifcopenshell\api\__init__.py", line 66, in run
    result = usecase_class(ifc_file, **settings).execute()
  File "\libs\site\packages\ifcopenshell\api\geometry\add_slab_representation.py", line 42, in execute
    [self.create_item()],
  File "\libs\site\packages\ifcopenshell\api\geometry\add_slab_representation.py", line 58, in create_item
    extrusion = self.file.createIfcExtrudedAreaSolid(
  File "\libs\site\packages\ifcopenshell\file.py", line 337, in create_entity
    e[idx] = arg
  File "\libs\site\packages\ifcopenshell\entity_instance.py", line 260, in __setitem__
    self.wrapped_data.setArgumentAsNull(idx)
  File "\libs\site\packages\ifcopenshell\ifcopenshell_wrapper.py", line 4929, in setArgumentAsNull
    return _ifcopenshell_wrapper.entity_instance_setArgumentAsNull(self, i)
RuntimeError: Attribute not set
2024-04-16 10:34:29 +02:00
Dion Moult 2762d9c47f Fix #3733. Fix round function precision error. 2024-04-16 10:34:29 +02:00
Dion Moult 073491a78a For convenience, rounding to an integer value now also casts to integer. 2024-04-16 10:34:29 +02:00
Dion Moult 678dce8fc0 Fix bug where unedited mesh objects were still tagged as edited which led to unnecessary processing prior to drawing generation or saving. 2024-04-16 10:34:29 +02:00
Dion Moult 62b2b9983f Fix #3682. You can now tag setout points with dynamic xyz / enh values. 2024-04-16 10:34:29 +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
Ryan Schultz 41c6830ee0 Update ifc_classes_suggestions.json 2024-04-16 10:34:29 +02:00
Dion Moult ee2f5fc646 Revert "Spreadsheet Import/Export: Fix feet and inch formatting"
This reverts commit 921d412fc7.
2024-04-16 10:34:29 +02:00
Dion Moult fbe52287fc Revert "Small fix for feet and inch formatting on Spreadsheet Import/Export"
This reverts commit 7935bd22c2.
2024-04-16 10:34:29 +02:00