Compare commits

...

2231 Commits

Author SHA1 Message Date
Ryan Schultz 0f835ca739 removed unnecessary code 2024-05-28 18:43:13 -05:00
Ryan Schultz 87442f549f Update src/blenderbim/blenderbim/bim/module/model/prop.py
Co-authored-by: Bruno Perdigão <57102715+brunoperdigao@users.noreply.github.com>
2024-05-28 11:02:23 -05:00
Ryan Schultz bf27e41275 Update src/blenderbim/blenderbim/bim/module/model/array.py
Co-authored-by: Bruno Perdigão <57102715+brunoperdigao@users.noreply.github.com>
2024-05-28 11:02:09 -05:00
Ryan Schultz 66cf06c990 Update src/blenderbim/blenderbim/bim/module/model/array.py
Co-authored-by: Bruno Perdigão <57102715+brunoperdigao@users.noreply.github.com>
2024-05-27 16:10:20 -05:00
Ryan Schultz 5757a62b6f Update src/blenderbim/blenderbim/bim/module/model/prop.py
Co-authored-by: Bruno Perdigão <57102715+brunoperdigao@users.noreply.github.com>
2024-05-27 16:09:28 -05:00
Ryan Schultz e2552e3d46 Update src/blenderbim/blenderbim/bim/module/model/prop.py
Co-authored-by: Bruno Perdigão <57102715+brunoperdigao@users.noreply.github.com>
2024-05-27 16:09:22 -05:00
Ryan Schultz 1b91540c96 Update src/blenderbim/blenderbim/bim/module/model/prop.py
Co-authored-by: Bruno Perdigão <57102715+brunoperdigao@users.noreply.github.com>
2024-05-27 16:09:15 -05:00
Ryan Schultz 274b12e5a0 Update src/blenderbim/blenderbim/bim/module/model/prop.py
Co-authored-by: Bruno Perdigão <57102715+brunoperdigao@users.noreply.github.com>
2024-05-27 16:09:01 -05:00
Ryan Schultz 496ba6f22d fix #3802 - Copy array attributes from another array 2024-05-26 13:56:52 -05:00
Dion Moult b7737cb6d3 Fix #4655. profiles is now available as a keyword in the selector syntax. 2024-05-11 22:57:16 +10:00
Dion Moult 55026ca996 Fix #4616. You can now create a new representation based off any other object. This makes it easy to custom model whatever you want as a starting point. 2024-05-11 22:29:39 +10:00
Dion Moult 3fa573e3c1 Fix #4615. Report to user if they are attempting to create an incompatible context-representation combination. 2024-05-11 20:48:38 +10:00
Dion Moult 00ae6809a9 See #4657. Fallback to copying cache if moving cache fails due to permission error. 2024-05-11 19:59:39 +10:00
Dion Moult c3fbb11093 See #4657. Restrict annotation psets to their particular predefined type. 2024-05-11 19:38:22 +10:00
Kurt Battisti a0d27c3f1c Make Whole status UI message clearer (#4658)
Replace UI text "No Aggregate" with "No Whole relation defined" to avoid misinterpretation when instance is a whole with parts.
2024-05-11 19:04:35 +10:00
Dion Moult 811a908cc3 More segfault fixes in test suite (maybe order matters only on Linux?) 2024-05-11 19:01:57 +10:00
Dion Moult 94e5baf48a Fix #4647. Better error reporting if the user tries to activate a drawing that isn't available. 2024-05-11 19:01:21 +10:00
Dion Moult cd2570cdbb Fix #4649. Bug where editing property set template enumerations didn't clean up properly. 2024-05-11 15:18:18 +10:00
Dion Moult 6df6553935 Notify user if duration parsing not available in util.date 2024-05-11 15:14:39 +10:00
Dion Moult 8e6c372a4f Fix ability to run tests and segfaulting test 2024-05-11 15:00:30 +10:00
Andrej730 371e11de9b root.remove_product to consider IfcRelConnectsPortToElement 2024-05-10 19:18:09 +05:00
Andrej730 d2a708fcc4 fix bug in ifc2x3 tests bootstrap
it was creating new applications and users every time `ifcopenshell.api.owner.settings.get_user` or `ifcopenshell.api.owner.settings.get_application` was called
2024-05-10 19:18:09 +05:00
Andrej730 845d772a08 move sequence.get_related_products to util module 2024-05-10 19:18:09 +05:00
Andrej730 1e630ede08 ifc2x3 tests 2024-05-10 19:18:09 +05:00
Andrej730 c50d1ea2fe typing 2024-05-10 19:18:08 +05:00
Dion Moult e7eb00eaa3 See #4652. Fix bug where auto-detection of a false origin could be incorrect
We were incorrectly multiplying a shape matrix in SI units with a vertex in project units. We also didn't do a final check whether or not that final resultant coordinate was far away or not (for example, origin and vertex can cancel each other out)
2024-05-10 23:28:37 +10:00
Dion Moult cd6eac3c8f See #4652. Fix bug where using create_mesh won't work if you pass it a triangulation. 2024-05-10 22:39:56 +10:00
Dion Moult 69e21da60c Minor naming changes in IfcFM to be more true to IFC jargon 2024-05-10 22:13:39 +10:00
Dion Moult 57b905862a Fix #4650. When the bbim build hotfixes the bot build, it should replace, not copy over. 2024-05-10 18:20:41 +10:00
Dion Moult 51d3a2b77b Whoops 2024-05-10 16:16:43 +10:00
Andrej730 b2920996be remove deprecated api method type.get_related_objects 2024-05-09 18:15:49 +05:00
Andrej730 bdc5a7a01b more descriptive errors creating entities - setting incorrect attributes
example:

```
ifc_file = ifcopenshell.file(schema="IFC4")

entity = ifc_file.create_entity("IfcRoot", "xxx", None, None, None, None)
entity = ifc_file.create_entity("IfcRoot", Location=None)
```
2024-05-09 18:15:49 +05:00
Andrej730 1c6a9e2c49 more descriptive errors settings incorrect data type to attributes
Example:
```
ifc_file = ifcopenshell.file(schema="IFC2X3")
entity = ifc_file.create_entity("IfcCostSchedule")

entity.UpdateDate = ifcopenshell.util.date.datetime2ifc(datetime.now(), "IfcDateTime")
```
2024-05-09 18:15:49 +05:00
Andrej730 8ffb77551f more tests for ifc2x3 2024-05-09 18:15:49 +05:00
Andrej730 2d35869c41 typing 2024-05-09 18:00:17 +05:00
Andrej730 359dab573b document.remove_information to support ifc2x3 #4636 2024-05-09 14:02:10 +05:00
Andrej730 6e2edbf101 explicitly specify available imported symbols
Fix LSP warnings like ""entity_instance" is not exported from module "ifcopenshell"PylancereportPrivateImportUsage" for `ifcopenshell.file`, `ifcopenshell.entity_instance` etc.

After adding py.typed in 722201a1a it's now a typed library and all imported symbols in modules are considered private by default and should be added to `__all__` if they are supposed to be generally available from imported module.

See https://github.com/microsoft/pyright/blob/main/docs/typed-libraries.md#library-interface
2024-05-09 13:35:29 +05:00
Dion Moult 4c8f93d737 Add error catching to model loading and let users hide error dialog 2024-05-09 16:33:05 +10:00
Dion Moult 2789bc565a Write troubleshooting documentation 2024-05-09 16:21:24 +10:00
Dion Moult a1e0b8858e Track last actions and friendlier error reporting when something breaks 2024-05-09 13:37:57 +10:00
Dion Moult f075a6178b Experimental code for serialising API settings 2024-05-09 13:29:26 +10:00
Dion Moult 5fa385e1e0 Allow for having wildcard listeners in the api 2024-05-09 13:27:08 +10:00
Dion Moult b57141a80c New type of IfcTester report which doesn't require audit to be run to see a spreadsheet view of requirements 2024-05-09 10:46:57 +10:00
Dion Moult d453adb7cf Forgot to commit IfcTester fix for missing failed entities 2024-05-09 10:36:39 +10:00
Andrej730 c5a7a8680e fix removing references in ifc2x3 #4636 2024-05-08 18:18:03 +05:00
Andrej730 d4ccadb832 fix circular import after 10d30b0de 2024-05-08 18:18:03 +05:00
Andrej730 cbf04546b8 fix many implicit ifcopenshell.guid imports
a bit related to 10d30b0de
2024-05-08 18:18:02 +05:00
Dion Moult 37c0084874 Friendlier error reporting if bbim fails to install 2024-05-08 22:26:54 +10:00
Andrej730 875afd69d5 skip objects without placements importing containers
It seems that IFC doesn't specify that IfcRelAggregates.RelatedObjects should necessary have a placement. E.g. FreeCAD is using IfcGroups in RelatedObjects to store hierarchy in IFC.

Example - https://community.osarch.org/discussion/2144/object-information-spatial-container
2024-05-08 13:47:11 +05:00
Andrej730 67f4ed00d0 fix couple silent bugs importing containers
1) we were setting OwnerHistory to the "elevation" attribute of SpatialElement (in BIMSpatialProperties.containers)
2) we were setting "elevation" attribute at all when SpatialElement doesn't have "elevation" attribute

Though those bugs were silent since PropertyGroup doesn't alarm when we add a completely new attribute to it.
2024-05-08 13:47:11 +05:00
Dion Moult 10d30b0de7 Document api modules and require explicit imports of API submodules 2024-05-08 17:00:35 +10:00
Dion Moult 984b1212a6 Whoops 2024-05-08 09:45:12 +10:00
Andrej730 bc72c927c1 replace deprecated api call
noticed fixing #4632
2024-05-07 21:41:01 +05:00
Andrej730 b8275f2802 fix errors using deprecated api after ab696b9 #4632 2024-05-07 21:39:09 +05:00
Andrej730 267527f3fc fix issue after removing ifcopenshell.main in d76462ca4 2024-05-07 21:26:48 +05:00
Ryan Schultz c5b4513f65 fix #4622 - can now reassign IfcWindowStyle and IfcDoorStyle 2024-05-07 09:46:55 -05:00
Dion Moult 5da4fbb39c Fix #4631. Fix packaging problem on PyPI for IfcPatch. 2024-05-07 23:36:56 +10:00
Dion Moult 93639e9e50 Even more cleaning of documentation references 2024-05-07 19:08:13 +10:00
Dion Moult d76462ca42 Write more documentation
Sphinx autoapi also now only shows subpackages 1 level deep. This prevents us having a huge long list. Also don't show private or special members. Also show imported members so ifcopenshell.file and ifcopenshell.entity_instance works in docs too.
2024-05-07 17:32:47 +10:00
Dion Moult 722201a1af Add py.typed for static analysis with mypy 2024-05-07 17:15:58 +10:00
Dion Moult 0a3dddef2f More Python 2 to Python 3 upgrades 2024-05-07 16:03:07 +10:00
Dion Moult 26434f0331 Fix #4589. Symlink entire ifcopenshell dir for dev setups. 2024-05-07 15:51:48 +10:00
Dion Moult f6c2e2c20d Fix #4530. Fix various styling issues on docs. 2024-05-07 15:44:06 +10:00
Dion Moult 424a06f6c8 More cleaning up of forward type hints to fix import errors 2024-05-07 14:58:12 +10:00
Dion Moult 89c4cbeb05 Drop support for Python 2. 2024-05-07 12:17:46 +10:00
Dion Moult 7e13ed746e Don't rely on util for basic ifcopenshell module capabilities. Keep util as an optional module for users to load. 2024-05-07 10:32:02 +10:00
Andrej730 28d205b4a3 show info message on saving/loading csv from bbim 2024-05-06 18:56:20 +05:00
Andrej730 dcc52fc4e4 pset.edit_pset not to fail silently on invalid enum values #4608 2024-05-06 18:22:52 +05:00
Andrej730 a9d785c28f typing 2024-05-06 18:22:52 +05:00
Bruno Postle 54a3730c20 fix d11ec67 mathutils dependency regression
mathutils is a blender module, wrap imports in try/except
2024-05-06 13:55:20 +01:00
Andrej730 31d322a28c descriptions for operators removing classifications/contexts #4614 2024-05-06 17:29:30 +05:00
Andrej730 3b90086109 Fix loading search queries with exclusion #4609
It was failing to load queries like "!IfcWall" or "!2Mg7PHubX0xxOfF0DdA9Wd"
2024-05-06 17:06:10 +05:00
Gorgious56 30b870b98d Fix #4617 : Switching representation in edit mode is no longer possible 2024-05-06 13:20:33 +02:00
Thomas Krijnen b3e7975b83 Consider material profile set in single material determination 2024-05-06 13:18:05 +02:00
Andrej730 8f7f6223de unlink pasted blender objects if there is no active ifc file #4619 2024-05-06 15:03:27 +05:00
Dion Moult 6c313dd25c Fix for static analysis of ifcopenshell.api submodules. See #2693. 2024-05-06 18:39:13 +10:00
Bruno Postle b718bd19bd fix TypeError
File "/usr/lib64/python3.12/site-packages/ifcopenshell/api/project/assign_declaration.py", line 126, in execute
    related_definitions = set(has_context.RelatedDefinitions) - objects_with_contexts
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for -: 'set' and 'list'
2024-05-06 09:05:56 +01:00
Dion Moult ab5ea4c853 Implement listener wrapper for new API functions. See #2693. 2024-05-06 14:43:43 +10:00
Dion Moult d11ec67129 Generate functions for all API usecases for better static code features. See #2693. 2024-05-06 14:43:43 +10:00
Ryan Schultz 10f894e2ea Find the "Types" Collection regardless of the IfcProject.Name 2024-05-05 20:46:07 -05:00
Ryan Schultz 34bbc8f1ea for 'Add Fitting' changed the hot key from Shift+F to Shift+Y. per https://community.osarch.org/discussion/2124/ui-discussion-around-add-fitting-and-add-bend
Also added Shift+F (bim.flip_object) to all profile-based objects
2024-05-05 19:20:13 -05:00
Dion Moult a213ab6760 Fix docstrings to reference datatype as it would be used for users 2024-05-06 08:39:48 +10:00
Ryan Schultz d694d8fcc2 fix #4610: bim.select_type() from type launcher throws error 2024-05-05 13:16:30 -05:00
ppaawweeuu 5f2d451c5e Update selector_syntax.rst (#4618)
info about 'Must contain..' and 'Must not contain..' comparisons added
2024-05-05 23:40:32 +10:00
Dion Moult ab696b980a See #2693. Expose static functions of IfcOpenShell API. 2024-05-05 16:26:41 +10:00
Andrej730 9f2df7fb9d preview external shading style as material is selected from other .blend file
previously it required to save external style attributes to preview the changes, now it's couple clicks saved if you want to preview different blender materials for your styles
2024-05-03 17:55:30 +05:00
Andrej730 9e5c3ff675 fix bug appending blender material when style.Location isn't .blend
it wasn't considering that .Location could be either None or not a .blend file and was failing in those cases
2024-05-03 17:38:04 +05:00
Andrej730 a67108e6c1 Reload current shading style after editing it #4567
Examples:
1) active shading type = EXTERNAL, now after changing it's SHADING attributes and accepting the changes, it will reload EXTERNAL shading back since it's the one that's active.
2) active shading type = SHADING, after adding EXTERNAL shader will reload SHADING style to the material.
2024-05-03 17:36:14 +05:00
Andrej730 b1706f2eac fix error launching type manager in empty project 2024-05-03 16:28:10 +05:00
Andrej730 ac29e152bb project.unassign_declaration - support batching #4474 2024-05-03 16:28:10 +05:00
Andrej730 de690a385c project.assign_declaration - support batching #4474 2024-05-03 16:28:10 +05:00
Andrej730 a973b62918 small comment fix 2024-05-03 16:28:10 +05:00
Andrej730 92426a640a bim.active_model not to unhide all types and drawings elements 2024-05-03 16:23:55 +05:00
Andrej730 93f8638a94 Use active camera drawing id for bim.create_drawing #4581
There was inconsistency between .poll and .execute on what use as active drawing.
2024-05-03 16:23:55 +05:00
Andrej730 16b0b1c3a5 Fix UI error #4575 2024-05-03 15:43:42 +05:00
Dion Moult 25fff3fdd0 Consolidate duplicate operators "Convert to Blender file" and "Purge IFC Links" 2024-05-03 17:02:05 +10:00
dependabot[bot] 0384de46a4 Bump pydantic from 1.10.7 to 1.10.13 in /src/opencdeserver/api/app (#4585)
Bumps [pydantic](https://github.com/pydantic/pydantic) from 1.10.7 to 1.10.13.
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
- [Commits](https://github.com/pydantic/pydantic/compare/v1.10.7...v1.10.13)

---
updated-dependencies:
- dependency-name: pydantic
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-03 16:21:08 +10:00
Ryan Schultz 080f325557 extends bim.select_type by selecting multiple types from a selection of objects.
Also when the type is selected and turned on, all other types are automatically turned off.
https://imgur.com/a/DQUF0ai
2024-05-03 00:59:33 -05:00
Andrej730 86cc2bf39a fix bug using "trace outlines" for reprsentation in ifc2x3
Mentioned in #4593

The error message was (it was trying to access curves from the original mesh instead of dummy curve object):
```
Error: Python: Traceback (most recent call last):
  File "\blenderbim\bim\module\geometry\operator.py", line 46, in execute
    IfcStore.execute_ifc_operator(self, context)
  File "\blenderbim\bim\ifc.py", line 349, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\blenderbim\bim\module\geometry\operator.py", line 169, in _execute
    core.add_representation(
  File "\blenderbim\core\geometry.py", line 52, in add_representation
    representation = ifc.run(
                     ^^^^^^^^
  File "\blenderbim\tool\ifc.py", line 34, in run
    return ifcopenshell.api.run(command, IfcStore.get_file(), **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\blenderbim\libs\site\packages\ifcopenshell\api\__init__.py", line 172, in run
    result = usecase_class(ifc_file, **settings).execute()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\blenderbim\libs\site\packages\ifcopenshell\api\geometry\add_representation.py", line 73, in execute
    return self.create_plan_representation()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\blenderbim\libs\site\packages\ifcopenshell\api\geometry\add_representation.py", line 170, in create_plan_representation
    return self.create_annotation2d_representation()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\blenderbim\libs\site\packages\ifcopenshell\api\geometry\add_representation.py", line 833, in create_annotation2d_representation
    items = [self.file.createIfcGeometricCurveSet(self.create_curves(is_2d=True))]
                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\blenderbim\libs\site\packages\ifcopenshell\api\geometry\add_representation.py", line 492, in create_curves
    curves = self.create_curves_from_curve_ifc2x3(is_2d=is_2d, curve_object_data=dummy.data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\blenderbim\libs\site\packages\ifcopenshell\api\geometry\add_representation.py", line 575, in create_curves_from_curve_ifc2x3
    for spline in self.settings["geometry"].splines:
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Mesh' object has no attribute 'splines'
```
2024-05-02 16:48:52 +05:00
Andrej730 c7effa3f25 More descriptive errors linking ifc files 2024-05-02 12:13:44 +05:00
Andrej730 be262eaef2 fix errors linking ifc2x3 projects
it was failing with something very verbose:

```
  File "\blenderbim\bim\module\project\operator.py", line 1239, in execute
    db = ifcpatch.execute(
         ^^^^^^^^^^^^^^^^^
  File "\blenderbim\libs\site\packages\ifcpatch\__init__.py", line 80, in execute
    patcher.patch()
  File "\blenderbim\libs\site\packages\ifcpatch\recipes\ExtractPropertiesToSQLite.py", line 137, in patch
    properties.append([i, "IFC Material", f"Layer {idx + 1} Name", item.Name])
                                                                   ^^^^^^^^^
  File "\blenderbim\libs\site\packages\ifcopenshell\entity_instance.py", line 197, in __getattr__
    raise AttributeError(
AttributeError: entity instance of type 'IFC2X3.IfcMaterialLayer' has no attribute 'Name'
Error: Python: Traceback (most recent call last):
  File "\blenderbim\bim\module\project\operator.py", line 1239, in execute
    db = ifcpatch.execute(
         ^^^^^^^^^^^^^^^^^
  File "\blenderbim\libs\site\packages\ifcpatch\__init__.py", line 80, in execute
    patcher.patch()
  File "\blenderbim\libs\site\packages\ifcpatch\recipes\ExtractPropertiesToSQLite.py", line 137, in patch
    properties.append([i, "IFC Material", f"Layer {idx + 1} Name", item.Name])
                                                                   ^^^^^^^^^
  File "\blenderbim\libs\site\packages\ifcopenshell\entity_instance.py", line 197, in __getattr__
    raise AttributeError(
AttributeError: entity inTraceback (most recent call last):
  File "\Temp\tmpdggt3syt.py", line 9, in <module>
    run()
  File "\Temp\tmpdggt3syt.py", line 5, in run
    bpy.ops.bim.load_linked_project(filepath="/Dormitory-ARC.ifc", false_origin="0,0,0")
  File "\Blender\4.1\scripts\modules\bpy\ops.py", line 109, in __call__
    ret = _op_call(self.idname_py(), kw)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Error: Python: Traceback (most recent call last):
  File "\blenderbim\bim\module\project\operator.py", line 1239, in execute
    db = ifcpatch.execute(
         ^^^^^^^^^^^^^^^^^
  File "\blenderbim\libs\site\packages\ifcpatch\__init__.py", line 80, in execute
    patcher.patch()
  File "\blenderbim\libs\site\packages\ifcpatch\recipes\ExtractPropertiesToSQLite.py", line 137, in patch
    properties.append([i, "IFC Material", f"Layer {idx + 1} Name", item.Name])
                                                                   ^^^^^^^^^
  File "\blenderbim\libs\site\packages\ifcopenshell\entity_instance.py", line 197, in __getattr__
    raise AttributeError(
AttributeError: entity instance of type 'IFC2X3.IfcMaterialLayer' has no attribute 'Name'
Location: \Blender\4.1\scripts\modules\bpy\ops.py:109

... truncatedUnregistered Snippets Library
BMAX Connector - UnRegistred!
An error occurred while processing your IFC.
Traceback (most recent call last):
  File "\blenderbim\bim\module\project\operator.py", line 949, in execute
    self.link_ifc()
  File "\blenderbim\bim\module\project\operator.py", line 991, in link_ifc
    self.link_blend(blend_filepath)
  File "\blenderbim\bim\module\project\operator.py", line 953, in link_blend
    with bpy.data.libraries.load(filepath, link=True) as (data_from, data_to):
OSError: load: \Dormitory-ARC.ifc.cache.blend failed to open blend file
Error: Python: Traceback (most recent call last):
  File "\blenderbim\bim\module\project\operator.py", line 949, in execute
    self.link_ifc()
  File "\blenderbim\bim\module\project\operator.py", line 991, in link_ifc
    self.link_blend(blend_filepath)
  File "\blenderbim\bim\module\project\operator.py", line 953, in link_blend
    with bpy.data.libraries.load(filepath, link=True) as (data_from, data_to):
OSError: load: \Dormitory-ARC.ifc.cache.blend failed to open blend file
Location: \Blender\4.1\scripts\modules\bpy\ops.py:109
Traceback (most recent call last):
  File "\blenderbim\bim\module\project\operator.py", line 870, in execute
    bpy.ops.bim.load_link(filepath=filepath, false_origin=self.false_origin)
  File "\Blender\4.1\scripts\modules\bpy\ops.py", line 109, in __call__
    ret = _op_call(self.idname_py(), kw)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Error: Python: Traceback (most recent call last):
  File "\blenderbim\bim\module\project\operator.py", line 949, in execute
    self.link_ifc()
  File "\blenderbim\bim\module\project\operator.py", line 991, in link_ifc
    self.link_blend(blend_filepath)
  File "\blenderbim\bim\module\project\operator.py", line 953, in link_blend
    with bpy.data.libraries.load(filepath, link=True) as (data_from, data_to):
OSError: load: \Dormitory-ARC.ifc.cache.blend failed to open blend file
Location: \Blender\4.1\scripts\modules\bpy\ops.py:109
```
2024-05-01 18:26:58 +05:00
Andrej730 523e51c775 use json serialization for #4599
changed my mind about 5410f14aa, probably better to use `json.dumps` to keep it consistent with how we serialize other attributes
2024-05-01 18:26:58 +05:00
Andrej730 5410f14aa1 ifc2sql - stringify psets list values #4599 2024-05-01 18:03:25 +05:00
Andrej730 45b2411c2b Fix #4598 after 229c7285c 2024-05-01 17:43:31 +05:00
Andrej730 9f12091c7f fix bug assigning materials
it was clearing all other blender materials - e.g. blender materials associated with representation items styles. Also had the same issue with affecting extra elements as with unassigning materials
2024-05-01 16:42:20 +05:00
Andrej730 bef5d3cca5 blenderbim - fix bug with unassigning material
When you would unassign material (e.g. implicitly by removing the object), it might have also removed materials slots from other occurrences of the same type.

Which may had some unexpected sideffects later on - as unassigned styles saving IFC project (BBIM unassigned styles based on a assumption that it was the user decision to remove the materials and related styles).
2024-05-01 16:42:20 +05:00
Andrej730 0f548eb93e Indicate in UI if type material was overridden by occurrence material
Example - https://i.imgur.com/T1hidJg.png

+small optimization in material_name
2024-05-01 16:42:20 +05:00
Andrej730 374348bb81 IfcImporter small optimization 2024-05-01 16:42:20 +05:00
Andrej730 b42f6b1827 ifc delete to show time it took if it was more than 10 secs 2024-05-01 16:42:20 +05:00
Andrej730 addcf531f0 owner.update_owner_history - optimization
as it may be used very often
2024-05-01 16:42:20 +05:00
Andrej730 0ef683013a RegenerateGlobalIds - more informative fixing duplicates 2024-05-01 16:42:20 +05:00
Andrej730 137a306269 typing 2024-05-01 16:42:20 +05:00
Andrej730 fc0ffd1c02 fix a typo #4596 😬 2024-05-01 15:40:45 +05:00
Bruno Perdigão 97e0c43702 Merge pull request #4440 from brunoperdigao/fix-normal-duplication-of-linked-aggregate
Fix normal duplication of linked aggregate
2024-04-30 17:01:44 -03:00
Andrej730 8dde98f543 fix #4592 (after 0da3270)
Before IFC4 Shape Aspects counldn't be part of IfcRepresentationMap
2024-04-29 15:22:26 +05:00
Ryan Schultz 9962a0c905 small fix to previous commit. Solves https://github.com/IfcOpenShell/IfcOpenShell/commit/4b56b341243d6b0eed82e8533848b124e82e1344#commitcomment-141442796 2024-04-28 18:57:42 -05:00
Ryan Schultz 4b56b34124 Tweaked UI for Linked Aggregates https://imgur.com/a/rExISKO 2024-04-28 10:34:52 -05:00
Thomas Krijnen f857c513c5 submodule 2024-04-28 10:17:57 +02:00
Kaare Hansen 41df6410bd Comment std::cout causing console spam 2024-04-28 10:11:32 +02:00
Ryan Schultz dcbd6a925d small fix for #4361. remove IfcProject for class iterator. See https://github.com/IfcOpenShell/IfcOpenShell/issues/4361#issuecomment-2081223615 2024-04-27 18:13:38 -05:00
Ryan Schultz 3848a21136 fix #4361: Have the aggregate empty turn on too, if at least one object in the aggregate, is turned on as well 2024-04-27 11:31:39 -05:00
Andrej730 8af37cb4ec Fix #4586 occurred after e14d96e6e 2024-04-27 12:03:56 +05:00
Ryan Schultz 44c28e9a4c fix #4327: reorder format as well 2024-04-26 20:48:59 -05:00
Ryan Schultz 677324927c fix #4431: prompt for name, when creating aggregate 2024-04-26 20:09:20 -05:00
Massimo Fabbro d212344c54 Covering tool more user friendly UI ... 2024-04-26 17:19:28 +02:00
Massimo Fabbro 74da327803 Fix create space from cursor bug where spaces were created always in zero elevation 2024-04-26 17:19:28 +02:00
Massimo Fabbro f021041b31 Remove the (maybe) unnecessary poll functions for spatial tool and cleaner error messages 2024-04-26 17:19:28 +02:00
Massimo Fabbro c05d2df116 now spaces created with spatial tool have relative zero elevation origin point 2024-04-26 17:19:28 +02:00
Andrej730 2b926f7906 more descriptive error setting non-optional attributes with None
Example:

```
import ifcopenshell
import ifcopenshell.api.owner.settings

ifc_file = ifcopenshell.file(schema="IFC2X3")
ifc_file.createIfcOwnerHistory(OwningUser=None)

# Before:
# Traceback (most recent call last):
#   File "\test.py", line 16, in <module>
#     ifcopenshell.api.run("owner.create_owner_history", ifc_file)
#   File "\ifcopenshell\api\__init__.py", line 172, in run
#     result = usecase_class(ifc_file, **settings).execute()
#              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   File "\ifcopenshell\api\owner\create_owner_history.py", line 111, in execute
#     return self.file.create_entity(
#            ^^^^^^^^^^^^^^^^^^^^^^^^
#   File "\ifcopenshell\file.py", line 350, in create_entity
#     e[idx] = arg
#     ~^^^^^
#   File "\ifcopenshell\entity_instance.py", line 305, in __setitem__
#     self.wrapped_data.setArgumentAsNull(idx)
#   File "\ifcopenshell\ifcopenshell_wrapper.py", line 5285, in setArgumentAsNull
#     return _ifcopenshell_wrapper.entity_instance_setArgumentAsNull(self, i)
#            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# RuntimeError: Attribute not set

# After:
# Traceback (most recent call last):
#   File "\test.py", line 16, in <module>
#     ifcopenshell.api.run("owner.create_owner_history", ifc_file)
#   File "\ifcopenshell\api\__init__.py", line 172, in run
#     result = usecase_class(ifc_file, **settings).execute()
#              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#   File "\ifcopenshell\api\owner\create_owner_history.py", line 111, in execute
#     return self.file.create_entity(
#            ^^^^^^^^^^^^^^^^^^^^^^^^
#   File "\ifcopenshell\file.py", line 350, in create_entity
#     e[idx] = arg
#     ~^^^^^
#   File "\ifcopenshell\entity_instance.py", line 316, in __setitem__
#     raise ValueError(
# ValueError: attribute 'OwningUser' is not optional for entity instance of type 'IFC2X3.IfcOwnerHistory'
```
2024-04-26 18:23:19 +05:00
Andrej730 3ac69043d6 bbim to provide default user and organisation in ifc2x3 #4574
previously every operation that would try to create owner history would fail with the error below if there wasn't IfcPersonAndOrganisation in the project.
2024-04-26 18:23:19 +05:00
Andrej730 f726708815 edit_object_placement - small optimizations 2024-04-26 18:23:19 +05:00
Andrej730 21e153087a edit_object_placement - adherence support
Update edit_object_placement.py
2024-04-26 18:23:18 +05:00
Andrej730 31d85b715a typing 2024-04-26 18:23:18 +05:00
Andrej730 344cc1fb7d file.by_type docs note 2024-04-26 11:49:44 +05:00
Andrej730 1cea3d21e8 BBIM support importing IfcRelAdheresToElement #4565 2024-04-26 11:44:32 +05:00
Andrej730 640320f70d shape_builder - create non-optional position for profiles in ifc2x3 2024-04-25 18:05:47 +05:00
Andrej730 29352092aa fix issue creating 3d location for 2d placement in ifc2x3 2024-04-25 18:05:47 +05:00
Andrej730 5b877b549a fix numpy typing #4579
On older numpy versions, np.ndarray was less forgiving and wasn't allowing passing 1 argument instead of required 2.

And turned out numpy doesn't yet have typing for shapes (https://github.com/numpy/numpy/issues/16544), so all matrices and other shapes specified as `npt.NDArray[np.float64]`.

Fixed type discrepancies for `get_edges` and `get_faces` and also had to fix `import_ifc` as Blender apparently has problems with storing np.int32 in custom attributes (https://projects.blender.org/blender/blender/issues/121072), tested that Blender is okay with np.int32 in other cases we had (addressing BMesh.verts[i] where `i` is np.int32).
2024-04-25 18:05:47 +05:00
Andrej730 721466c429 typing 2024-04-25 18:05:47 +05:00
Andrej730 cce2fee1fa More descriptive error setting non-present attributes
Example:

```
import ifcopenshell

ifc_file = ifcopenshell.file(schema="IFC2X3")
# ifc_file.begin_transaction()

wall = ifc_file.createIfcWall()
wall.Identification = "25"

# Before:
# Traceback (most recent call last):
#   File "test.py", line 4, in <module>
#     wall.Identification = "25"
#     ^^^^^^^^^^^^^^^^^^^
#   File "\ifcopenshell\entity_instance.py", line 279, in __setattr__
#     self[index] = value
#     ~~~~^^^^^^^
#   File "\ifcopenshell\entity_instance.py", line 293, in __setitem__
#     method = self.method_list[idx]
#              ~~~~~~~~~~~~~~~~^^^^^
# IndexError: list index out of range

# or this (if file had a transaction going)
#   File "\ifcopenshell\entity_instance.py", line 279, in __setattr__
#     self[index] = value
#     ~~~~^^^^^^^
#   File "\ifcopenshell\entity_instance.py", line 288, in __setitem__
#     self.wrapped_data.file.transaction.store_edit(self, idx, value)
#   File "\ifcopenshell\file.py", line 101, in store_edit
#     "old": self.serialise_value(element, element[index]),
#                                          ~~~~~~~^^^^^^^
#   File "\ifcopenshell\entity_instance.py", line 283, in __getitem__
#     raise IndexError("Attribute index {} out of range for instance of type {}".format(key, self.is_a()))
# IndexError: Attribute index 4294967295 out of range for instance of type IfcWall

# After:
# Traceback (most recent call last):
#   File "test.py", line 4, in <module>
#     wall.Identification = "25"
#     ^^^^^^^^^^^^^^^^^^^
#   File "ifcopenshell\entity_instance.py", line 283, in __setattr__
#     raise AttributeError(
# AttributeError: entity instance of type 'IFC2X3.IfcWall' has no attribute 'Identification'

```
2024-04-25 18:05:47 +05:00
Andrej730 087d55f02a fix editing sheets in ifc2x3 #4576 2024-04-25 18:05:47 +05:00
Andrej730 f1037de14d small fix for 60a70f523 2024-04-25 18:05:46 +05:00
Ryan Schultz 4711672170 small tweak to 3ff31b577c and cd013079f4 - duplicate material and duplicate style have '_copy' suffix. 2024-04-24 21:48:26 -05:00
Bruno Postle c0b4e099af fix sheet regeneration missing drawing Identifier
Was passing LAYOUT document reference to sheeter instead of
DRAWING document reference
2024-04-24 23:05:44 +01:00
Andrej730 f41fbf24c3 small fix for e14d96e6e 2024-04-24 18:19:20 +05:00
Andrej730 e14d96e6ee Use .Name instead of .Description if IFC2X3 for sheets #4576
As Description was added only in IFC4
2024-04-24 18:17:37 +05:00
Andrej730 716a33f347 convert_file_length_units - fix issue converting to imperial units
ifcpatch ConvertLengthUnit - change used units from plural to singular names, to make it consistent across the api

more test coverage - test converting to more units and back from them
2024-04-24 15:15:30 +05:00
Andrej730 c5f084a4af ConvertLengthUnit test 2024-04-24 14:12:13 +05:00
Andrej730 606a0b46f2 MergeProject - support merging projects with different units 2024-04-24 14:12:13 +05:00
Andrej730 1c729a74d1 util.unit to support converting aggregate of aggregates 2024-04-24 14:12:13 +05:00
Andrej730 db31574103 typing 2024-04-24 14:12:13 +05:00
stefkeB d03b47e1e6 Fix HDF5 conditional inclusion in GeomTree
IfcGeomTree uses HDF5, but this is an optional module, so we have to wrap it with #ifdef WITH_HDF5
2024-04-23 18:46:10 +02:00
Ryan Schultz ae62ac2777 small tweak to b8a9674483 - duplicate profile has '_copy' suffix. 2024-04-23 07:42:02 -05:00
Andrej730 998f9c6a1e make styles ui more similar to profiles and materials ui
before - https://i.imgur.com/bTbyt2t.png
after - https://i.imgur.com/U53h8Yh.png
2024-04-23 16:39:49 +05:00
Andrej730 3ff31b577c bim.duplicate_style 2024-04-23 16:39:49 +05:00
Andrej730 cd013079f4 bim.duplicate_material 2024-04-23 16:39:49 +05:00
Andrej730 b8a9674483 bim.duplicate_profile
simple operator for profile duplication
example - https://imgur.com/a/dsP78iV
2024-04-23 16:39:49 +05:00
Andrej730 8beb1bef98 preserve selected profile index removing profiles 2024-04-23 16:39:38 +05:00
Andrej730 377676f881 dev environment - add libs/desktop and bsdd 2024-04-23 15:23:16 +05:00
Andrej730 4efe284338 use IFC4X3_ADD2 for ifcopenshell.schema_by_name
as it is the main IFC4X3 schema
2024-04-22 17:30:25 +05:00
Andrej730 34a4e3f37a util.doc - use release schema version for IFC4X3
As it will be more like to be available in the ifcopenshell package. Related to #4565
2024-04-22 17:30:25 +05:00
Andrej730 889c9a9e9f typing 2024-04-22 17:30:25 +05:00
Andrej730 9e79499532 small optimization 2024-04-22 17:30:24 +05:00
Kristof Semjen 589b98053e Fixes #4261
SWIG_Python_str_AsChar and SWIG_Python_str_DelForPy3 are no longer available in swig 4.2 (see : https://github.com/swig/swig/commit/f89dd59d4b82ece899087682fdb86e94d2611513 ),
this commit fixes the build for swig versions > 4.2.
2024-04-21 16:22:56 +02:00
Bruno Postle fc5bb230a9 Abandon SVG layout generation on missing drawings
Drawings need to be generated before layout can be generated, so
remove a partial failed layout caused by missing drawings.
2024-04-21 11:12:24 +01:00
Bruno Postle 3ef823db23 Regenerate missing sheets #4462
BlenderBIM will regenerate missing SVG drawings from the IFC on demand,
now it attempts to regenerate missing SVG sheets too. ie. you can open a
bare IFC file with configured drawings and sheets and continue working.

Only drawings are recognised, spreadsheet and other SVG refs are not
regenerated, all drawings are placed at the 30,30 pixel location.
2024-04-20 11:56:22 +01:00
Andrej730 60a70f5236 support IfcAxis1Placement and warn on IfcAxis2PlacementLinear #4565 2024-04-19 17:11:56 +05:00
Andrej730 757a010172 typing 2024-04-19 16:18:57 +05:00
Andrej730 447625bffd fix failing test in util.selector.format with imperial_length
the error is below, not sure how I haven't noticed it before 🤔

assert subject.format('imperial_length(1, 1)') == "1'"

>               raise VisitError(tree.data, tree, e)
E               lark.exceptions.VisitError: Error trying to process rule "imperial_length":
E
E               cannot access local variable 'output_unit' where it is not associated with a value
2024-04-19 16:18:46 +05:00
Andrej730 25edaa9b89 update broken url for ladybug tools
temporarily use fork repo
2024-04-19 16:07:29 +05:00
Andrej730 9da4215bac ifcopenshell.util.selector.filter_elements - inherited predefined types
mentioned by @theoryshaw on osarch - https://community.osarch.org/discussion/comment/20126/#Comment_20126
2024-04-19 16:05:33 +05:00
Ryan Schultz 6ddf91fb52 bim.select_aggregate(select_parts=True) - selects all the host aggreg… (#4552)
- bim.select_aggregate(select_parts=True) - selects all the host aggregates and all the parts and subaggregates within these host aggregates
- bim.select_linked_aggregates(select_parts=False) - selects all the host aggregates that are linked
- bim.select_linked_aggregates(select_parts=True) - selects all the host aggregates that are linked and all the parts and subaggregates within these host aggregates
2024-04-18 21:08:46 -05:00
Bruno Perdigão 01361cc8f2 Merge branch 'v0.7.0' into fix-normal-duplication-of-linked-aggregate 2024-04-18 21:00:39 -03:00
Dion Moult 28eb2cd628 Fix dateutil dependency 2024-04-19 08:51:55 +10:00
Dion Moult fa4239159d Fix incorrect dateutil dependency 2024-04-18 23:39:25 +10:00
Ryan Schultz ea6f0b054a fixes: #4563 2024-04-17 21:42:51 -05:00
Andrej730 3b637a0234 ifcsverchok - autogenerate node categories from index 2024-04-17 15:24:47 +05:00
Andrej730 45dacc3612 migrate docs urls 2024-04-17 15:18:45 +05:00
Andrej730 f93d79dce0 entity_instance.is_a overload typing 2024-04-17 15:18:45 +05:00
Gorgious56 6f8dcc637f #4532 : You can now store clipping planes to a json file and restore them
The file is stored along the ifc file
2024-04-17 11:52:00 +02:00
Andrej730 a748dda378 mention IfcSverchok in docs 2024-04-17 12:33:03 +05:00
Andrej730 b158a83644 update ifcsverchok builds 2024-04-17 12:32:42 +05:00
Andrej730 31cd20c61b more user-friendly errors enabling ifcsverchok 2024-04-17 12:10:18 +05:00
Andrej 0a542e6957 ci-ifcsverchok-build.yml 2024-04-17 11:38:18 +05:00
Andrej730 89d29cf133 ifctester.reporter.Ods - option for safe excel export #4427
The issue was related to the sheet names - Excel prohibits some symbols in the names and it doesn't allow sheet name to be longer than 31 symbols. If sheet names doesn't match this criteria then Excel says file appears to be corrupted - when file open data itself is not really corrupted besides the spreadsheet names that failed the criteria.
2024-04-16 16:40:05 +05:00
Andrej730 6ee7502920 ifctester.reporter.Txt small fix 2024-04-16 16:39:55 +05:00
Andrej730 708ee7350b ifctester - fix bug adding second .ods extension 2024-04-16 16:39:55 +05:00
Andrej730 836293504c ifctester typing 2024-04-16 16:39:55 +05:00
Andrej730 b458aea6b9 ifctester docs for command line use 2024-04-16 15:17:49 +05:00
Andrej730 e1e169ece8 fix bug in d6e69bd6e 2024-04-16 15:17:49 +05:00
Andrej730 aeea9dfb5e fix test after ac64d0c40 2024-04-16 15:17:49 +05:00
Andrej730 9a9be821d1 constraint.unassign_constraint - support batching #4474 2024-04-16 15:17:49 +05:00
Andrej730 c808382154 constraint.assign_constraint - support batching #4474 2024-04-16 15:17:49 +05:00
Andrej730 81608b0cee ifcopenshell.util.get_constrained_elements 2024-04-16 15:17:49 +05:00
Andrej730 02ae838c45 util.constraint - typing and docs 2024-04-16 15:17:49 +05:00
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 3b6f79cc75 black format 2024-04-16 12:18:05 +05:00
Dion Moult 1e41561fe8 Fix #4345. Removing grid axes are now handled specially. 2024-04-16 16:43:02 +10:00
Dion Moult 23abf674f3 Minor fix 2024-04-16 14:54:36 +10:00
Dion Moult ac64d0c400 Fix #3581. Invalid new document references. 2024-04-16 08:06:10 +10:00
Dion Moult 0983f9e66d Fix bug where saved drawing filters didn't load in the UI. 2024-04-15 23:33:10 +10:00
Dion Moult 5725ed867f Don't unnecessarily update NTS or scale pset data 2024-04-15 23:33:10 +10:00
Dion Moult 4174a78bb5 #4553 2024-04-15 23:33:10 +10:00
Andrej730 96b0a241d9 add tests for get_referenced_structures 2024-04-15 17:24:31 +05:00
Andrej730 ff76850a54 ifcopenshell.util.element.get_structure_referenced_elements 2024-04-15 17:24:31 +05:00
Andrej730 9954e073fa constraint.assign_constraint to handle owner history 2024-04-15 17:24:31 +05:00
Andrej730 5da68721d6 document.unassign_document - support batching #4474 2024-04-15 17:24:31 +05:00
Andrej730 097f44284f document.assign_document - support batching #4474 2024-04-15 17:24:31 +05:00
Andrej730 1f605484d9 library.unassign_reference - support batching #4474 2024-04-15 17:24:31 +05:00
Andrej730 81dcad6a14 library.assign_reference - support batching #4474 2024-04-15 17:24:31 +05:00
Andrej730 03af1013a0 add tests for util.element.get_referenced_elements 2024-04-15 17:23:25 +05:00
Andrej730 144831f9ee classification.remove_reference - support batching #4474 2024-04-15 17:23:24 +05:00
Andrej730 d6e69bd6e9 classification.add_reference - support batching #4474 2024-04-15 17:23:14 +05:00
Andrej730 7d6fd03eb4 rename tests for consistency with api 2024-04-15 17:21:10 +05:00
Andrej730 75c854da01 ifcopenshell.util.get_referenced_elements 2024-04-15 17:21:10 +05:00
Andrej730 01ddf8e769 util.classification small optimization 2024-04-15 14:47:32 +05:00
Andrej730 0a9c9f2a28 typing 2024-04-15 14:47:32 +05:00
Andrej730 919dcbe2d9 black format 2024-04-15 14:47:32 +05:00
Dion Moult 5e237a1670 Fix #4553. 2024-04-15 17:22:12 +10:00
Dion Moult acf6628f23 Fix #4547. Handle both null inherited predefined types and disable editing predefined types on occurrences which inherit from a type. 2024-04-15 11:53:37 +10:00
Dion Moult 8a62558575 Fix #4484. Clarify inheritance rules of predefined types. 2024-04-15 09:27:58 +10:00
Dion Moult 0e0861c84b Further clarification of type vs occurrence psets/qtos.
Previously even if you had a type selected it would still say occurrence.
2024-04-15 09:27:00 +10:00
Dion Moult 5a8209e2ad Fix #4549. Drawing decorators are now refreshed like the rest of the UI after operations. 2024-04-15 00:01:42 +10:00
Dion Moult 50b41f5af6 Fix #4486. Sync camera properties from IFC on both drawing load as well as drawing activation.
Also there are now defaults in case pset values don't exist.
2024-04-14 15:18:23 +10:00
Dion Moult fc6678f5ce Fix #3402. 2024-04-14 14:41:37 +10:00
Dion Moult ee1183481f Fix #4525. Fix #4546. Specify dependencies for ifcopenshell and ifcpatch.
No longer optional for a better first experience. They aren't huge deps.
2024-04-14 08:52:19 +10:00
Dion Moult 6ddf7dae01 See #4546. Fix docs link to filtering elements query syntax. 2024-04-14 08:34:49 +10:00
Dion Moult 8232c9fa24 See #4541. Clarify how to use include args for IfcConvert 2024-04-14 08:33:23 +10:00
Dion Moult 07b6c95f54 Fix #4550. Update doc urls. 2024-04-14 08:11:57 +10:00
Andrej730 ca2f683af3 Update BBIM version in docs 2024-04-13 10:59:56 +05:00
Andrej730 eb46de9658 material.unassign_material - support batching #4474 2024-04-12 17:41:37 +05:00
Andrej730 59cc9c0a16 material.assign_material - support batching #4474 2024-04-12 17:41:37 +05:00
Andrej730 32d2f1d629 material.assign_material - update owner history 2024-04-12 17:41:37 +05:00
Andrej730 38a73d6510 ifcpatch - add ifc2x3 tests and test for MergeDuplicateTypes 2024-04-12 17:41:36 +05:00
Andrej730 59b496d4b5 typing 2024-04-12 17:41:36 +05:00
Dion Moult e56aa45a82 Fix #4526. Bug when exporting IfcTester results to BCF due to new "failures" attribute. 2024-04-12 10:09:52 +10:00
Dion Moult a3c99b8362 See #4541. Add documentation examples on how to use include filters in IfcConvert. 2024-04-12 10:09:52 +10:00
Andrej730 e66ac3d7db system.unassign_system - support batching #4474 2024-04-11 17:50:31 +05:00
Andrej730 6b48e8b4b9 system.assign_system - support batching #4474 2024-04-11 17:50:31 +05:00
Andrej730 3d243b5eee system.add_system - fix failing default agrument in ifc2x3 2024-04-11 17:50:31 +05:00
Andrej730 fa0dbac914 new util method ifcopenshell.util.element.get_groups 2024-04-11 17:50:30 +05:00
Andrej730 49e7abb4dc type.unassign_type - support batching #4474 2024-04-11 17:09:41 +05:00
Andrej730 5098550399 assign_type not to remap if it's type was assigned previously 2024-04-11 17:09:41 +05:00
Andrej730 e12c05eea0 typing 2024-04-11 17:09:41 +05:00
Andrej730 39433fb5a5 remove unused lines from tests 2024-04-11 17:09:41 +05:00
Andrej730 1ea80016cd fix bug generating profiles on assign_type after df4943205 2024-04-11 17:09:41 +05:00
Vukas Pajic 58b39d3926 fix: address test fails 2024-04-11 13:03:13 +02:00
Vukas Pajic 946c868388 fix: cascade_schedule correctly handles timelag with IfcRatioMeasure 2024-04-11 11:35:34 +02:00
Andrej730 df4943205a type.assign_type - support batching #4474 2024-04-10 18:58:44 +05:00
Andrej730 ba4eb2a891 fix bug in nest.assign_object 2024-04-10 18:58:44 +05:00
Andrej730 90bb2f0e16 unify tests for ifc4 and ifc2x3 2024-04-10 18:45:37 +05:00
Andrej730 c2840d92c2 fix test files names 2024-04-10 18:45:37 +05:00
Andrej730 81ff9c168e nest.assign_object to support ifc2x3 2024-04-10 18:45:37 +05:00
Andrej730 239ab5b587 get_pset() fix bug getting inherited psets with psets_only/qtos_only = True 2024-04-10 18:45:37 +05:00
Andrej730 37a33d62d5 further ifcopenshell.util.element optimization
and readibility for props addressed by the index
2024-04-10 18:45:37 +05:00
Andrej730 13c6fdd3c6 maintain verbosity getting complex property subproperties 2024-04-10 18:45:36 +05:00
Andrej730 e69597f72b typing 2024-04-10 18:45:36 +05:00
Andrej730 9c633c8b6c black format 2024-04-10 18:17:19 +05:00
Alper Kantarci 4d906578c7 Use "gltf" instead of "gtlf" (#4538)
- Fix "gtlf" typo
2024-04-10 21:02:56 +10:00
Dion Moult de744dddda Fix #4290. You can now format custom thousands separators and decimal separators in IfcCSV. 2024-04-10 17:32:39 +10:00
Dion Moult 0a04b88a52 Document how MacOS users using Blender from Steam should still use Mac Intel 2024-04-10 14:30:38 +10:00
Dion Moult bee1e21f0e Fix #4490. Fix fundamental bug where get_pset would return none for inherited props with a boolean False value. 2024-04-10 12:57:52 +10:00
Dion Moult f5c5fba151 Fix issue where the underlay cache option was not yet implemented and ignored. 2024-04-10 11:09:58 +10:00
Dion Moult 4f9badc063 Fix issue where reloading the drawing list would cause drawing names to be synced
It would run useless sync / API calls to edit psets on potentially hundreds of drawings.
2024-04-10 11:07:17 +10:00
Dion Moult b61d870922 See #4481. Defer setting render visibility to drawing generation to speed up switching between drawings.
Doing obj.hide_render = True/False in a loop is slow and there is no bulk set command.
2024-04-10 10:37:33 +10:00
Andrej730 153389fe4a ifcopenshell.util.element optimization
Tried to reduce amount of IFC attributes retrieved by reusing already retrieved values.

E.g. previously get_nest() was retrieving same attribute 3 times on each call, now it does it only once and it's 2 times faster (2.4 ms -> 1.2 ms).
2024-04-09 18:36:55 +05:00
Andrej730 965a45d65b ifcopenshell.util.element.get_nest test 2024-04-09 18:33:26 +05:00
Andrej730 06b84cfa24 nest.unassign_object - support batching #4474 2024-04-09 18:33:25 +05:00
Andrej730 97db95085a nest.assign_object - support batching #4474 2024-04-09 18:33:25 +05:00
Andrej730 d1bcec7a6a typing 2024-04-09 18:33:25 +05:00
Andrej730 7b46c6a443 black format 2024-04-09 17:05:36 +05:00
Andrej730 6db0c14fa8 ifcopenshell.api.run optimization
cache usecase classes instead of importing their modules and getting them each time, makes empty api call twice as fast
2024-04-09 16:18:11 +05:00
Andrej730 d03f9237e2 deprecate spatial.remove_container in favor of spatial.assign_container
added temporary support for old version with warnings:

WARNING. `spatial.remove_container` api method is deprecated and should be replaced with spatial.unassign_container
WARNING. `product` argument is deprecated for API method "spatial.remove_container" and should be replaced with `products`.
2024-04-09 16:09:04 +05:00
Dion Moult 24716a0089 See #4481. Faster implementation of object hiding and toggline viewport visibility. 2024-04-09 18:39:41 +10:00
Andrej730 437d19e1f5 normalize line endings in CCI(EN).ifc (was commited as CRLF, not LF) 2024-04-09 12:43:50 +05:00
Dion Moult bd5fd3539a Fix #4497. Drawing text annotations are now based on actual line breaks. 2024-04-09 15:56:16 +10:00
Dion Moult bcc67ecb31 See #4497. Show invisible newlines and allow newline editing in attributes. 2024-04-09 15:25:10 +10:00
Dion Moult c50810a24a Fix #4533. Add convenience link to launch type manager when no types exist. 2024-04-09 14:10:01 +10:00
Benoit DAMAY 7f9ce37a98 Inline help feature (#4409)
* Help operator in grouping and filtering Panel

Opens up a webbrowser on click

* Help button on the right of filtering panel header

* replacing os.rename() by shutil.move in ifcpatch

* removing debug print from previous commit

* Removing extra operator
Using bim.open_uri to open help page

* Update docs url

* Clean up whitespace

---------

Co-authored-by: Dion Moult <dion@thinkmoult.com>
2024-04-09 11:50:08 +10:00
ppaawweeuu ac23d08717 Update CCI(EN).ifc
added last two rows with ending markers
2024-04-09 11:45:34 +10:00
ppaawweeuu a8211ed592 Add CCI Classification schema
I'd like to add CCI classification to BBIM. It is very similar to CSS, developed by CCI-C and licensed under CC BY 4.0
More details here: https://cci-collaboration.org/the-standard/

This is my first commit, I used CCS(EN).ifc file as reference. Any feedback welcomed.
2024-04-09 11:45:34 +10:00
Gorgious e38f3beb91 New UI List in Sandbox panel to access, flip, remove, add, edit clipping planes
and some tweaks :
- Disable possibility to edit clipping plane quad geometry
- Add select and delete operators
- Remove polls from CreateClippingPlane that prevented from using it in the Properties editor. The clipping plane is added near the origin when using the Add button in the panel
2024-04-08 21:31:23 +02:00
Andrej730 f14bf8557a aggregate.unassign_object - support batching #4474 2024-04-08 17:49:48 +05:00
Andrej730 cd11d2de27 aggregate.assign_object - support batching #4474 2024-04-08 17:49:48 +05:00
Andrej730 d764c0af23 temporary support for deprecated api arguments #4531 2024-04-08 17:49:48 +05:00
Andrej730 d24e5df7c1 typing 2024-04-08 17:27:41 +05:00
Andrej730 de5075aafe black format 2024-04-08 17:27:36 +05:00
Andrej730 9474d17867 fix test after 7dd0d7601 2024-04-08 16:28:05 +05:00
Andrej730 abe6dbdfc9 layer.unassign_layer - support batching #4474 2024-04-08 16:28:05 +05:00
Andrej730 7ecec973dd layer.assign_layer - support batching #4474 2024-04-08 14:51:07 +05:00
Andrej730 f34aef1ebf validate - add examples 2024-04-08 13:56:52 +05:00
Andrej730 3253bdf7aa fix possible infinite recursion in bim.debug_active_drawing #4500
also fixed the issue with mixed up results at the end of the operator execution
2024-04-08 12:19:57 +05:00
Dion Moult 8e2f9d2bb5 Fix #4509. Don't show scary error message if you haven't specified a filter query. 2024-04-08 17:19:17 +10:00
Dion Moult 7dd0d7601a Fix #3759. IFC4X3 files should use ADD2 identifier. 2024-04-08 12:34:59 +10:00
Dion Moult 5bd53b973f Fix #4303. Declare dependencies for ifctester. 2024-04-08 11:57:21 +10:00
Dion Moult 911cfe010e Publish IfcClash to PyPI 2024-04-08 11:19:13 +10:00
Dion Moult 35dd03664a Publish IfcCSV to PyPI 2024-04-08 10:55:59 +10:00
Dion Moult c89b84ff57 Whoops again 2024-04-08 10:31:37 +10:00
Dion Moult cda13af7a3 See #4529. Publish IfcPatch to PyPI. 2024-04-08 10:24:04 +10:00
Dion Moult 6e84eb0acc Add bSDD makefile 2024-04-08 10:09:58 +10:00
Dion Moult b9ede5c739 Whoops 2024-04-08 10:08:01 +10:00
Dion Moult 44b980c1e0 Publish bSDD to PyPI 2024-04-08 10:06:28 +10:00
Dion Moult 08f4dea47f Materials with no style colours now default to Blender's default colour when linking models 2024-04-08 08:33:18 +10:00
Dion Moult 8f2a7be903 Fix #4521. 2024-04-08 08:32:28 +10:00
Dion Moult 63b541917e Minor fix in doc utility for entities which have no predefined types 2024-04-06 23:48:14 +11:00
Dion Moult c8706bddc9 Fix bug where drawing psets were needlessly updated and random objects would get drawing psets added on them
The prop update callbacks on has_underlay, has_linework, and has_annotation would edit the active object, which is not necessarily the camera. Yikes! Also, this means that when activating the drawing, it would sync references and every time it synced a reference it would attempt to sync these properties too which was slow and wasteful.
2024-04-06 23:37:42 +11:00
Dion Moult e969d407d3 Fix #4524. Update README.md 2024-04-06 22:21:16 +11:00
Dion Moult 066b198ac9 Fix #4492. Refix bug where there was an extra equal sign when loading saved queries. 2024-04-06 21:42:49 +11:00
sebphi 5d6119e542 Fix import of ifcopenshell.util.unit in Python <3.10 #4520 2024-04-05 17:46:55 +02:00
Andrej730 845e229a9c group.unassign_group - support batching #4474 2024-04-05 17:31:13 +05:00
Andrej730 cefa088b59 spatial.unassign_container - support batching #4474 2024-04-05 17:31:13 +05:00
Andrej730 109787d869 spatial.assign_container - support batching #4474 2024-04-05 17:28:30 +05:00
Andrej730 78abca16e6 black format 2024-04-05 16:47:14 +05:00
Andrej730 02aaf1b409 typing 2024-04-05 16:47:13 +05:00
Andrej730 02e102f2d2 Collector.sync skip_unlinking option #4500
To speed up the drawing process in large projects and reduce time on syncing stage I've found that if object is already assigned to it's parent collection (both as part of blender collection and in IFC) we can skip assigning stage significantly reducing time on syncing in general (from 20-25 secs -> 9 secs).

The only thing we'll be missing in that case that object won't be unlinked from other unrelated blender collections which shouldn't break anything in the case of drawing generation.
2024-04-05 16:30:44 +05:00
Andrej730 ec0dcb7f8c documentation and small refactor 2024-04-05 16:30:43 +05:00
Andrej730 ba63ed81a1 small optimizations
1) stop on first parent collection
2) ensure object's own collection's parent has BIMCollectionProperties.obj during the loop
3) collector._get_collections - returns project's own collection for consistency
4) couple tweaks skipping unnecessary iterations in loops
2024-04-05 15:55:01 +05:00
Dion Moult fb6660361d See #4518. Fix pypi python version requirements. 2024-04-05 21:13:24 +11:00
Dion Moult ecae9943e2 Add missing build dep 2024-04-05 21:12:27 +11:00
Thomas Krijnen 104e896531 #4278 Update cd.yml bump ubuntu version 2024-04-05 09:27:33 +02:00
Dion Moult 6555e56647 Fix evil hacks in ifcopenshell pip dist packaging and support py312 on PyPI 2024-04-05 16:54:29 +11:00
Dion Moult f9a590a22c Ship py39 to py312 for PyPI 2024-04-05 16:49:14 +11:00
Dion Moult ad4a1576d3 Allow manual workflow dispatch of ci-ifcopenshell-pypi.yml 2024-04-05 16:44:53 +11:00
Dion Moult c35c3f06b5 Fix #4504. Extract CAD layers when linking in models. 2024-04-05 15:03:47 +11:00
Dion Moult fada808a2f See #4504. Extract material data for linked models. 2024-04-05 14:53:11 +11:00
Dion Moult e221e6fa6a See #4508. Update example code to serialise to obj. 2024-04-05 08:25:59 +11:00
jaymeandretta 725dac04d0 Updates links to BlenderBIM and IfcOpenShell documentation in README 2024-04-05 08:12:43 +11:00
Andrej730 5c365990b9 bim.debug_active_drawing debug operator #4500
Operator can help narrow down failing elements when drawing is failing with "RuntimeError: An unknown error occurred".

it's located in debug section - https://i.imgur.com/b03jmkZ.png

The output is noisy but the results are highlighted:
https://i.imgur.com/0ZA0u60.png
https://i.imgur.com/oXzqIXU.png
https://i.imgur.com/Y0nMRMz.png
2024-04-04 16:42:00 +05:00
Andrej730 797e2e41a5 bim.create_drawing to sync only once if printing multiple drawings
Turned out syncing process takes too much time on large projects, so we can speed up the printing process by syncing just once. Also exposed option not to sync to operator's properties to allow debugging failing elements.

A bit related to #4500
2024-04-04 16:41:59 +05:00
Andrej730 57fe40839b black format, cleanup, notes
bim.generate_global_id - forgot to remove it previously, this operator isn't intended for debug section
2024-04-04 16:21:10 +05:00
Andrej730 b4c5ad1e35 typing 2024-04-04 16:07:31 +05:00
Dion Moult 635ddce93d Autodetect CSG representation types in shape builder 2024-04-04 18:28:26 +11:00
Dion Moult 24e807cac7 Detect binary data types in util.attribute 2024-04-04 18:28:26 +11:00
Massimo Fabbro 33ceba38a8 Qto_Calculator more consistent calculation about the PredefinedType 2024-04-03 22:26:50 +02:00
Massimo Fabbro 90ed1f9b28 improve the flooring height object quantity calculation 2024-04-03 22:26:50 +02:00
Massimo Fabbro e431cb205c improve the ceiling height object quantity calculation 2024-04-03 22:26:50 +02:00
Massimo Fabbro 09bb45f5bc fix add ceiling from walls elevation bug 2024-04-03 22:15:11 +02:00
Andrej730 7087452cde log external styles names when they fail to load 2024-04-03 17:37:38 +05:00
Andrej730 af4b58444d typing 2024-04-03 17:37:38 +05:00
Andrej730 711423cae5 use default shading_styles.json in case if project's file is missing
to make it consistent with how we use in similar cases default styles, symbols, etc
2024-04-03 17:37:38 +05:00
Andrej730 eb8b6062b4 move override panel methods to tool.Blender
to keep them close, so it will be easier to keep them in sync
2024-04-03 17:37:38 +05:00
Andrej730 5ac96cb5b9 change .poll for overridden panels instead of creating new classes
Needed to avoid errors disabling addons that have overridden panels
2024-04-03 17:37:38 +05:00
Andrej730 c462fc9337 move scene panels from different addons to "Blender Properties"
now we also automatically get list of default blender scene panels instead of hardcoding them
2024-04-03 17:37:38 +05:00
Andrej730 95f7a2bcde override blender ui panels when should_setup_workspace = False
Previously with should_setup_workspace = False it wouldn't override Blender UI scene panels and they would get mixed up with BBIM panels. After fix Blender panels are always moved to "Blender Properties" tab

before - https://i.imgur.com/bPvcAEe.png
now - https://i.imgur.com/lRUox29.png
2024-04-03 17:37:38 +05:00
Dion Moult 04cf9c870b Fix bug when linking in models with no chunks 2024-04-03 21:24:03 +11:00
Andrej730 bf9bddc867 ifcopenshell.validate to check unique guids (IfcRoot.UR1) 2024-04-02 17:17:23 +05:00
Andrej730 20a2fda066 typing 2024-04-02 15:45:42 +05:00
Andrej730 f03afb20f3 validate.py - black format 2024-04-02 15:45:42 +05:00
Gorgious56 e0df22ffec The button to remove an inherited pset is no longer enabled on instances
Previously it would fail silently if clicked
2024-04-02 09:52:43 +02:00
Andrej730 96302a5c07 Return of the missing button for regenerating global id
Was about to implement to find that we already have "bim.generate_global_id" and it just was lost at some point. Returned it to the attributes UI. It also allows Updating guids for all selected elements on Shift+Click.

This also can be useful to solve MergeProject and other guids conflicts, see example issue in https://community.osarch.org/discussion/2062/bbim-mergeproject-patch-not-separating-elements-in-different-buildings

Example - https://imgur.com/a/mvRtyER
2024-04-02 12:44:06 +05:00
Andrej730 38afce1628 RegenerateGlobalIds - tests 2024-04-02 12:32:36 +05:00
Andrej730 cd5afacc97 Fix test after cf9a94a79 2024-04-01 17:22:49 +05:00
Andrej730 c2623e5dce prevent reloading reference annotations on loading .ifc #4478
1) if reference annotation was changed, it would reload discarding the changes
2) even if reference annotation wasn't changed it would still reload them producing noise in .ifc changes
2024-04-01 17:06:20 +05:00
Andrej730 42ecd7e127 typing 2024-04-01 17:04:00 +05:00
Andrej730 c80a7cfcc9 fix typo 2024-04-01 16:00:18 +05:00
Andrej730 6d8f1a3980 experimental svg to dxf conversion for drawings
Example - https://imgur.com/a/AkvLlbZ
2024-04-01 15:50:43 +05:00
Andrej730 5c4c61bb15 fix issue with prohibited facets in 0065c5f, add a test 2024-04-01 13:49:42 +05:00
Andrej730 d8af8b58bb ifctester.Specification.set_usage convenience method
sets minOccurs and maxOccurs according to the agreement mentioned in the latest ids.xsd
https://github.com/buildingSMART/IDS/blob/6d71cdf3547a0383c6cfbbead81a7cef7521ac3a/Development/ids.xsd#L67-L72
2024-04-01 12:26:07 +05:00
Andrej730 3c0405249b typing 2024-04-01 12:26:07 +05:00
Dion Moult 7f57649d10 Whoops. 2024-04-01 17:49:44 +11:00
Dion Moult fbde23870e Fix #4321. The PurgeData recipe now also works on IFC2X3. 2024-04-01 17:00:47 +11:00
Dion Moult 7b968030ca Fix #4060. The colour by property panel now shows the number of results in the legend. 2024-04-01 15:45:34 +11:00
Dion Moult b5d672ba42 Fix #4069. IfcClash Blender interface now uses the new filter UI. 2024-04-01 15:28:34 +11:00
Dion Moult efa8da83ba Bump IOS. 2024-04-01 10:19:40 +11:00
Dion Moult 64cf7237db IfcDiff now uses the new selector syntax with the new UI 2024-04-01 10:16:30 +11:00
Dion Moult cf9a94a799 Fix #4306. Remove superseded selector UI. 2024-04-01 09:44:50 +11:00
Ryan Schultz 46c1a8c8ff added search for styles - in BIM_PT_representation_items 2024-03-31 11:57:55 -05:00
Thomas Krijnen ac7f2aeb62 #4450 todo note 2024-03-31 15:16:30 +02:00
Dion Moult 9378a763f3 Fix #4328. Fix incorrect documentation about how to use the imperial_length formatting function. 2024-03-31 22:32:07 +11:00
Dion Moult 0bc83fedae Use indices instead of WorkTimeDatesInterface
Checking start/end dates are done very, very often in date calculations (often looping through every day in a date range). So I'd prefer more opaque code but less overhead.
2024-03-31 22:11:17 +11:00
Thomas Krijnen f7c03db752 #4450 don't fail on empty bbox in prefiltering 2024-03-31 11:25:56 +02:00
Dion Moult b6b8c21741 See #4484. Editing predefined type attributes now enforces valid combinations of userdefined and object/element type 2024-03-31 15:50:31 +11:00
Dion Moult c8af51cfd2 Fix #4323. Bug where running a filter could fail if you tried to compare values which had incompatible types. 2024-03-30 23:07:06 +11:00
Dion Moult 77de3820e7 More minor doc changes and polish 2024-03-30 23:06:07 +11:00
Dion Moult adc5bea4e9 Fix #4265. Bug where when loading a saved filter it showed an unnecessary = comparison (which is by default). 2024-03-30 23:05:37 +11:00
Dion Moult 1eddcb9ee0 Minor doc fixes 2024-03-30 17:37:50 +11:00
Dion Moult eae542f90f Fix #4461. Write documentation on how to build and edit documentation. 2024-03-30 17:37:14 +11:00
Dion Moult fab0d05279 Fix #4483. 2024-03-30 17:14:13 +11:00
Dion Moult d2e495a69f Fix #4318. Theme docs to match website branding and add edit button, footer links, and icons. 2024-03-30 16:47:56 +11:00
Dion Moult 02058efa4d Fix #4286. IfcCSV summaries are now formatted the same as the rows. 2024-03-30 15:40:02 +11:00
Dion Moult ed79cbb1cc Fix bug where loading drawings didn't correctly link shared meshes (e.g. from a type of an annotation) 2024-03-30 15:05:49 +11:00
Dion Moult 0065c5fba8 Fix incorrect handling of prohibited specifications 2024-03-30 00:13:02 +11:00
Andrej730 1ab24e8362 import referenced drawings activating the current drawing #4478 2024-03-29 15:13:40 +05:00
Andrej730 232b4ec34d typing 2024-03-29 15:11:47 +05:00
Thomas Krijnen 75e6147dbc #4474 Commented out code perhaps for future use 2024-03-29 10:46:25 +01:00
Dion Moult 8d7b293381 Fix #4305. Bug where importing spreadsheets into IFC didn't intelligently cast attribute data types 2024-03-29 20:37:34 +11:00
Andrej730 19c8afb652 Fix #4477 2024-03-29 11:51:14 +05:00
Dion Moult 84dcee6b36 Fix #4368. Update to latest Brickschema alpha to cut dep size 2024-03-29 15:48:52 +11:00
Dion Moult dadcf03f55 See #4473. Cull entourage library.
We haven't confirmed the legality of the other assets.
2024-03-29 15:33:47 +11:00
Dion Moult 413886ac6b Fix #4411. Fallback to absolute paths if relative paths fail. 2024-03-29 15:29:19 +11:00
Dion Moult 377f68c020 Run black on IfcTester 2024-03-29 15:28:33 +11:00
Dion Moult b718a37db2 Fix #4427. Failures are now stored in single dictionary.
There was a missing clear() call to failed_reasons which could lead to incorrect reporting. It also makes no sense to store them separately.
2024-03-29 15:06:59 +11:00
Dion Moult e21043b038 Fix #4465. Update IfcTester to IDS 0.9.7 2024-03-28 22:47:48 +11:00
Andrej730 395598d8e3 Fix invalid profiles after subdividing edges near arcs #4471 2024-03-28 14:02:03 +05:00
Andrej730 813518bcb5 use blender units subtype for cad props 2024-03-28 14:02:03 +05:00
Andrej730 4ce7a898c9 typing, format 2024-03-28 14:02:02 +05:00
Thomas Krijnen 78f235ea7c #4273 ignore degenerate triangles in mesher output 2024-03-28 09:06:41 +01:00
Vukas Pajic bda2f50f9d sync with latest 2024-03-28 17:15:58 +11:00
Vukas Pajic 5e5ba5b3d4 Additional metadata as property set #4425
https://github.com/IfcOpenShell/IfcOpenShell/issues/4425
2024-03-28 17:15:58 +11:00
Dion Moult 22b0e9dcc5 Minor doc fixes to refer to Mac intel and silicon 2024-03-28 17:13:50 +11:00
Dion Moult 68420d43ea Clash results now are sorted and show text overlays of clash type and distance 2024-03-28 17:11:46 +11:00
Dion Moult 924e337c90 Don't consider borderline points to be inside a shape for more robust protrusion results 2024-03-28 16:57:54 +11:00
Dion Moult 04599a10d2 Change precision check of "is point on line" to be 0.01mm
Precision::Confusion() is 1e-7 which is too small apparently when doing this math. There are plenty of results which are things like 5e-7.
2024-03-28 16:57:54 +11:00
Dion Moult 84c931bb5f Fix bug where hidden elements weren't selected sometimes 2024-03-28 16:52:30 +11:00
Dion Moult 572aedb3eb Fix #4269. Include dateutil for ifcopenshell on pypi 2024-03-28 10:48:19 +11:00
Dion Moult 1db86c24e3 Bump IfcOpenShell and remove py37 py38 from installation docs 2024-03-28 10:47:44 +11:00
Andrej730 74adde3030 ExtractElemenets - add some tests 2024-03-27 17:52:18 +05:00
Andrej730 f68e8f0e00 ExtractElements - fix bug where IfcElementAssembly elements wasn't added to the spatial tree
Example issue - https://community.osarch.org/discussion/2054/bbim-extractelements-patch-and-missing-elements-in-ifcelementassembly
2024-03-27 16:59:10 +05:00
Andrej730 98386984f3 Fix tests involving changes in Blender 4.1 (will fail on Blender <4.1)
Basically in Blender 4.1 they've changed a way renaming IDs works if name already existed before and those tests will stop working on Blender <4.1, see https://projects.blender.org/blender/blender/issues/119955
2024-03-27 15:23:46 +05:00
Andrej730 7b35ed97ca tests - reduce precision to our usual Cad tool precision to fix some tests 2024-03-27 15:07:49 +05:00
Andrej730 b3302ed679 Fix test in 1c1035e
tag @brunoperdigao for information
2024-03-27 15:07:49 +05:00
Andrej730 e12f060af8 black format 2024-03-27 15:07:49 +05:00
Dion Moult 6d4f47a2ca New entourage library including people and cars 2024-03-27 20:23:44 +11:00
Thomas Krijnen e49ab7e0cc #4070 don't increment aggregate length on invalid members 2024-03-27 09:36:05 +01:00
Dion Moult ccfe7ab80a Optimise property / quantity checks for IDS and other purposes 2024-03-27 16:09:13 +11:00
Dion Moult 7b95358975 Forgot to commit clash tool 2024-03-27 16:06:47 +11:00
Dion Moult bcc50aaadc Switch over clash to latest add_element signature 2024-03-27 16:06:15 +11:00
Dion Moult 30f63b7d67 Minor note about which OCCT version is currently supported 2024-03-27 15:59:25 +11:00
Dion Moult ead13e23bc Write docs about new geometry tree clash functions 2024-03-27 15:59:25 +11:00
Thomas Krijnen 24257d2a85 checkout v0.7.0 -- src/ifcgeom_schema_agnostic/IfcGeomRepresentation.cpp 2024-03-26 15:13:36 +01:00
Dion Moult 5c4dbb924d Reinclude missing max_protrusions_ 2024-03-26 15:13:36 +01:00
Thomas Krijnen 88e1b3d2f9 Fix is_manifold(), sorry :( 2024-03-26 15:13:36 +01:00
Thomas Krijnen f67b80c6a6 Integrate @Moult's add_element(TriangulationElement*) 2024-03-26 15:13:36 +01:00
Dion Moult c7fd42f2cf Clash detection features 2024-03-26 15:13:36 +01:00
Thomas Krijnen bed03bf83c #4307 2024-03-26 12:27:05 +01:00
Andrej730 1e49400e93 fix styles tests 2024-03-26 16:12:13 +05:00
Andrej730 608c0dc05d Fix tests, clean up file creating empty project
To fix tests changed bim.unlink_object not to unlink original blender materials as they might be used elsewhere.
2024-03-26 15:59:23 +05:00
Andrej730 921dbe9dae restore accidentally unregistered operator in 9be7d95 (caused issue in tests) 2024-03-26 15:54:46 +05:00
Andrej730 a7e0837f96 small optimization
not to calculate each quantity twice
2024-03-26 15:54:46 +05:00
Andrej730 071c80f845 fix tests 2024-03-26 15:54:46 +05:00
Andrej730 06d823b9d8 typing 2024-03-26 15:54:45 +05:00
Andrej730 b15e33e5e9 fix test after 7634e71 2024-03-26 14:32:16 +05:00
Thomas Krijnen 55885f7a24 #4329 Don't accept non-finite floats 2024-03-26 10:23:14 +01:00
Ian e5fd6d9152 Update build-deps.cmd 2024-03-26 19:32:56 +11:00
Gorgious56 4dda7e84a0 You can now select only the aggregate or the aggregate and all its part using the interface 2024-03-26 08:33:18 +01:00
Dion Moult bb6be4d52d Blender IfcClash interface now supports new IfcClash modes
The dumb clash manager has been merged in with the main clash sets window. Loading and saving clashes now also bring in clash results, so the dumb clash manager's load/save is being deprecated. New decorator highlights clash result visually.
2024-03-26 15:24:47 +11:00
Dion Moult 01d487f585 Upgrade IfcClash to use new clash capabilities (currently unmerged from feature-clash2) 2024-03-26 15:22:56 +11:00
Andrej730 67a17ddd1b Fix hiding annotation objects without repr on drawing activation 2024-03-25 14:44:51 +05:00
Andrej730 f916edce1e typing 2024-03-25 14:43:53 +05:00
Andrej730 b0d810199b fix duplicated function names in test_feature 2024-03-25 14:18:35 +05:00
Andrej730 515a72cec9 fix linked ifc selectability toggle 2024-03-25 14:01:08 +05:00
Andrej730 7464f7519f fix load/unload linked ifc tests 2024-03-25 14:01:08 +05:00
Andrej730 f0dde4f825 fix linked ifc visibility toggle tests 2024-03-25 14:01:08 +05:00
Andrej730 54fefb3684 fix linked ifc wireframe mode toggle 2024-03-25 14:01:08 +05:00
tim 628fcb2999 Remove object text from subheadings (#4445)
https://github.com/IfcOpenShell/IfcOpenShell/issues/4312
2024-03-25 13:37:11 +05:00
Thomas Krijnen 22f830b053 #4130 setOnlyValid() option that skips and logs invalid topology 2024-03-24 16:45:31 +01:00
Bruno Postle 579c72fc69 Drawings panel: fix select_all_drawings operator
Previously it always deselected all drawings, now works as advertised
2024-03-24 10:31:47 +00:00
Andrej730 642a0f7084 black format 2024-03-22 17:46:21 +05:00
Andrej730 7cd5aab1c5 Fix ifc linking tests 2024-03-22 17:44:38 +05:00
Andrej730 4b15535c9c Fix issue removing material set
1) core.remove_material_set were removing material set and calling material_tool.get_active_material_type()
2) material_tool.get_active_material_type() called MaterialsData which failed with the traceback below since props.materias[current_index] had ifc id that were just removed

Traceback (most recent call last):
  File "\prop.py", line 96, in get_material_types
    MaterialsData.load()
  File "\data.py", line 43, in load
    "active_styles": cls.active_styles(),
                     ^^^^^^^^^^^^^^^^^^^
  File "\data.py", line 119, in active_styles
    material = tool.Ifc.get().by_id(material)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \blenderbim\libs\site\packages\ifcopenshell\file.py", line 411, in by_id
    return self[id]
           ~~~~^^^^
  File \blenderbim\libs\site\packages\ifcopenshell\file.py", line 396, in __getitem__
    return entity_instance(self.wrapped_data.by_id(key), self)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \blenderbim\libs\site\packages\ifcopenshell\ifcopenshell_wrapper.py", line 4619, in by_id
    return _ifcopenshell_wrapper.file_by_id(self, id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Instance # 66 not found
File "\prop.py", line 94, in get_material_types
WARN (bpy.rna): C:\Users\blender\git\blender-v410\blender.git\source\blender\python\intern\bpy_rna.cc:1366 pyrna_enum_to_py: current value '2' matches no enum in 'BIMMaterialProperties', '', 'material_type'
2024-03-22 16:54:42 +05:00
Andrej730 b978da24d9 fix ui error getting active styles for non IfcMaterial materials
Error was:

```
Traceback (most recent call last):
  File "\blenderbim\bim\module\material\ui.py", line 43, in draw
    MaterialsData.load()
  File "\blenderbim\bim\module\material\data.py", line 43, in load
    "active_styles": cls.active_styles(),
                     ^^^^^^^^^^^^^^^^^^^
  File "\blenderbim\bim\module\material\data.py", line 117, in active_styles
    return results

  File "\blenderbim\libs\site\packages\ifcopenshell\entity_instance.py", line 194, in __getattr__
    raise AttributeError(
AttributeError: entity instance of type 'IFC4.IfcMaterialLayerSet' has no attribute 'HasRepresentation'
```
2024-03-22 16:54:42 +05:00
Andrej730 7132c4e9bf typing and small refactor 2024-03-22 16:54:42 +05:00
Andrej730 5aa6123806 Blender 4.1 - fix errors due to renamed type manager icon 2024-03-22 15:58:45 +05:00
FabioPiccinini e48299cb3f Update sample.css (#4459)
Changed unescaped ; with , because it may cause problems if the style is included in svg
2024-03-22 11:51:57 +01:00
FabioPiccinini c65088a7a7 Unescaped ; was causing problems in Inkscape (#4456)
* Update default.css

An unescaped ; was causing problems when opening svgs that included this style with Inkscape

* Update default.css
2024-03-22 10:06:57 +01:00
Thomas Krijnen 4f53d8c5f1 #4452 release gil in ifcopenshell.open() and read() 2024-03-21 14:11:34 +01:00
Andrej730 424b2589d9 add macos py3.11-3.12 to docs 2024-03-21 16:59:53 +05:00
Andrej730 05f6ed1084 bump ifc version #4174 2024-03-21 15:10:57 +05:00
Andrej730 9ec80cee0d TesselateElements - avoid processing queries that affect no elements
Previously it was failing with

 File "\ifcopenshell\geom\main.py", line 119, in __init__
    self.this = initializer(
  File "\ifcopenshell\ifcopenshell_wrapper.py", line 2467, in construct_iterator_with_include_exclude
    return _ifcopenshell_wrapper.construct_iterator_with_include_exclude(settings, file, elems, include, num_threads)
TypeError: Attribute of type AGGREGATE OF STRING needs a python sequence of strs
2024-03-21 15:06:32 +05:00
Andrej730 a5daf4177a add_mesh_representation - option to force faceted breps 2024-03-21 15:06:32 +05:00
Andrej730 1b1eccb0c1 typing 2024-03-21 15:06:32 +05:00
Andrej730 ece9e5c834 grammar 😬 2024-03-21 11:57:42 +05:00
Andrej730 6005ff641b Clarifying info message saving guids to the text inside .blend #4446
Example - https://i.imgur.com/YtuQ9YA.png
2024-03-21 11:55:28 +05:00
Andrej730 fa603244b9 black format 2024-03-21 11:55:20 +05:00
Andrej730 6d6010be3b typing 2024-03-21 11:32:53 +05:00
Andrej730 3691052f06 bim.select_similar_type optimization
1) avoid selecting elements of the same type multiple times
2) iterate over occurrences of the type rather than visible objects, as it's usually smaller amount of objects
2024-03-21 11:23:45 +05:00
Thomas Krijnen e38eafd034 #4447 build-all.py 2024-03-20 14:58:06 +01:00
Andrej730 976eeaef20 make spatial elements unselectable from viewport by default
It seems most of the time they only get in the way trying to select some objects at scene origin.

fyi @theoryshaw
2024-03-20 17:30:58 +05:00
Andrej730 09da42d649 typing 2024-03-20 17:30:58 +05:00
Andrej730 97b23a9ac6 unload decorations on unlinking ifc file 2024-03-20 17:30:58 +05:00
Andrej730 5e8a57f089 fix issue with removing collections and scenes unlinking .ifc
it couldn't find linked collections and scenes since it was comparing `filepath` from `props.links` (.ifc file) and collection.library.filepath (which is .blend file)
2024-03-20 17:30:58 +05:00
Andrej730 7f34d18bbf hide "no object selected" label when there are no linked ifc files 2024-03-20 17:30:58 +05:00
Andrej730 97cc19ed43 Remove appending occurrences from library in favor of fcaac6b 2024-03-20 17:30:57 +05:00
aothms d49faf7412 #4174 debug osx install of py311 and 312 2024-03-20 06:22:33 -04:00
Andrej730 fcaac6bd98 Append IfcElements from linked IFC files
Example - https://imgur.com/a/phPcKSo

Appending ifc elements from library files will be deprecated as it's much more limited than appending it from linked files (in library you can only see object's name).
2024-03-19 17:45:48 +05:00
Andrej730 c35cdcfcad util.selector.set_element_value to work w/o preassigned placement #4439 2024-03-19 17:45:21 +05:00
Andrej730 205da63d8e util.selector.set_element_value ignore values within tolerance #4439 2024-03-19 17:45:21 +05:00
Andrej730 3f529ae21b collector.sync note 2024-03-19 17:45:21 +05:00
Andrej730 89f7105e9c typing 2024-03-19 17:45:20 +05:00
Andrej730 e5dd06c461 Fix for loading IFC files with non-IfcElement based IfcRelNests
Example is below, it was using IfcAlignment to aggregate IfcAnnotations and IfcReferents.

I've added support loading collections for IfcPositioningElements besides IfcGrid (grids already handled separately).

https://community.osarch.org/discussion/2034/ifc-not-visible-after-loaded-in-blender-bim
2024-03-19 15:25:38 +05:00
Andrej730 ec7af4e719 typing 2024-03-19 15:24:14 +05:00
Bruno Perdigão e6bef16c45 small deletions 2024-03-18 23:39:06 -03:00
Andrej730 a755ec99f9 small fix 2024-03-18 17:08:39 +05:00
Andrej730 812389bce2 ifccsv - support for assigning x/y/z coordinates from csv 2024-03-18 17:06:00 +05:00
Andrej730 b67b5e8d9f typing 2024-03-18 17:05:55 +05:00
M!l!nd e2a06e10b6 fixed qsets to display separately (#4423)
* fixed qsets to display separately

Signed-off-by: milinddethe15 <milinddethe15@gmail.com>

* updated data.py and run black formattor

---------

Signed-off-by: milinddethe15 <milinddethe15@gmail.com>
2024-03-18 15:14:15 +05:00
Ryan Schultz 7fa26b2d60 small fix to cdd332d1ee, for clarity 2024-03-17 14:37:38 -05:00
Ryan Schultz cdd332d1ee fixes #4434 2024-03-17 14:20:27 -05:00
Bruno Perdigão 4829c4c02b fix: when subaggregate that is a linked aggregate is unassinged from the main aggregate, it remains a linked aggregate. 2024-03-16 15:27:04 -03:00
Bruno Perdigão 3bf4a8ef52 small refactor 2024-03-16 12:44:26 -03:00
Bruno Perdigão c95a47ca97 fix #4430. Shift+D whem selecting all the objects of a linked aggregate creates a normal copy that is not linked 2024-03-15 21:34:27 -03:00
Thomas Krijnen 22f21a3f0b Wait for threads in iterator destructor 2024-03-15 13:57:44 +01:00
Andrej730 ee27bc3b74 fix error loading representation without styles
If current representation didn't had any styles, only a material and it was failing during `assign_material_slots_to_faces` since it was looking for blender material only in self.styles and not in self.materials.

Note: `assign_material_slots_to_faces` is not skipped since `parse_representations` returns `True` because other representation has a style and it's added to the materials.
2024-03-15 15:55:23 +05:00
Andrej730 8307bf5877 typing 2024-03-15 15:50:38 +05:00
Andrej730 09e473a0dc python code style docs 2024-03-15 12:02:43 +05:00
Benoit DAMAY abeefeeee7 removing debug print from previous commit 2024-03-15 14:05:09 +11:00
Benoit DAMAY d949180461 replacing os.rename() by shutil.move in ifcpatch 2024-03-15 14:05:09 +11:00
Jordan McManus 708bd3207e changed type comparison to GlobalId 2024-03-15 14:04:53 +11:00
Jordan McManus 68d9d04e5b changed comparison for type relationships 2024-03-15 14:04:53 +11:00
jgunstone 7c7bd3dc53 add get_properties test validating that offset and limit are correctly applied 2024-03-15 14:03:58 +11:00
jgunstone 24d2b59a2e add limit and offset to client functions 2024-03-15 14:03:58 +11:00
Andrej730 ac2684af8d fix bug after 8291a0ca6 2024-03-14 20:21:52 +05:00
Andrej730 8291a0ca6a viewport decorations for IfcAnnotation/MULTI_SYMBOL 2024-03-14 16:50:17 +05:00
Andrej730 b72b23741e common method for getting annotation symbol 2024-03-14 16:46:22 +05:00
Andrej730 858692f3f5 Indicate rotated/scaled symbols in viewport 2024-03-14 16:46:22 +05:00
Andrej730 c74bfa24d2 Support for rotated and scaled symbols with IfcAnnotation/SYMBOL
See: https://community.osarch.org/discussion/2027/bbim-rotation-of-ifcsymbol
2024-03-14 15:33:19 +05:00
Andrej730 66c29f0da1 black format 2024-03-14 15:07:11 +05:00
Andrej730 f20fd3357f typing 2024-03-14 14:50:34 +05:00
Andrej730 e4eb76d4e0 indicate IfcText symbol rotation in viewport 2024-03-13 17:21:10 +05:00
Andrej730 22c95828ce BBIM IfcTester - option to generate ODS report
https://i.imgur.com/0JyXVK6.png
2024-03-13 16:16:50 +05:00
Andrej730 e87ca960e8 Fix #4421
1) Excluded annotations from other drawings that user might accidentally include in IfcAnnotation
2) Excluded from EPset_Drawing.Include to avoid getting there other element types besides spaces
2024-03-13 15:32:42 +05:00
Andrej730 6881e7d220 utils.filter_elements docs and tests 2024-03-13 15:32:42 +05:00
Andrej730 28b54c869a typing 2024-03-13 15:32:42 +05:00
Andrej730 9596117953 small fixes 2024-03-13 15:32:42 +05:00
Sigma Dimensions (Yass) 8dbeb928e3 fix construction schedule import without IfcProject #4412 2024-03-13 03:15:27 +00:00
Andrej730 4fdb78aebc spatial.workspace - add hotkeys using add_layout_hotkey 2024-03-12 15:04:49 +05:00
Andrej730 01724913e1 bim.decorate_boundaries to decorate all boundaries in the scene
It's added as alt+v hotkey in Spatial Tool
Now it's possible to combine it with bim.load_project_space_boundaries to show decorations for all the boundaries or to keep the boundaries after Alt+B and just disable the decorations.

example - https://imgur.com/a/ecbPz13
2024-03-12 15:04:49 +05:00
Andrej730 44dd07547e Fix issue with drawing same boundaries multiple times
If you'd hit alt+b in space tool multiple times it would redraw them again and again instead of switching between hiding and showing.
2024-03-12 12:12:12 +05:00
Andrej730 cc157239a2 model.space.py - small fixes 2024-03-12 12:10:56 +05:00
Andrej730 0576914e07 small fixes after d209cc9ff, added a test 2024-03-11 15:15:17 +05:00
Andrej730 a064173ffe BBIM - option to append occurrences from the other ifc files
Example - https://imgur.com/a/yASjbs8
2024-03-11 15:15:17 +05:00
Andrej730 8e502c9bb7 util.unit.py - black format 2024-03-11 15:15:17 +05:00
Andrej730 4d23706145 more typing 2024-03-11 15:15:17 +05:00
Geert Hesselink 6e8de292c6 Redundant closing symbol ' (#4413)
* scale placeangleunit

* add radian si_conversions

* return conversion value of planeangleunit

* Update unit.py

* redundant closing

* redundant closing
2024-03-11 11:12:23 +01:00
Geert Hesselink d209cc9ff4 Scale placeangelunit unit type (#4406)
* scale placeangleunit

* add radian si_conversions

* return conversion value of planeangleunit

* Update unit.py
2024-03-11 08:54:20 +01:00
Andrej730 ddfaf3308b fix error reloading representation for objects without representation 2024-03-11 11:39:18 +05:00
Andrej730 301ddab1ee commented out apil.run settings serialization as it's not used currently 2024-03-11 11:39:18 +05:00
Andrej730 1160d20d33 small fixes 2024-03-11 11:39:18 +05:00
Ryan Schultz 28099ddc8f Add parameter for angle tolerance, and change 'deg' to '°' 2024-03-09 09:53:21 +11:00
Andrej730 c1bca22638 add test for util.unit.calculate_unit_scale 2024-03-08 16:40:43 +05:00
Andrej730 3d5d868812 fix error in typing 2024-03-08 16:40:30 +05:00
fescale b015647543 Replace the specific "libpython3.8" debian package dependency for the generic "libpython3-dev". 2024-03-07 09:59:58 +01:00
Ryan Schultz c54f2131af added python version for Blender 4.1 2024-03-07 09:34:13 +11:00
Andrej730 2a832202fa Fix bug joining multiple extruded profiles in non-meters projects
Demo if someone missed that feature - https://imgur.com/a/JywJHyc
2024-03-06 17:30:55 +05:00
Andrej730 a3d970e014 shape_builder.create_axis2_placement_3d utility method and docs 2024-03-06 17:30:55 +05:00
Andrej730 24912bb827 Fix bug resetting rotations after editing profile axis
Before - https://imgur.com/a/czjAoSb
After - https://imgur.com/a/ajiNcdK
2024-03-06 16:22:15 +05:00
Adrian Insaurralde Avalos 1cd0bc9e7d occt 7.8 compatibility 2024-03-06 09:01:01 +01:00
Dion Moult 8880ab0fe9 Aggressively remove pandas test files 2024-03-06 17:11:33 +11:00
Andrej730 1c052d1417 fix demo library references after 7a7c89e 2024-03-06 10:53:19 +05:00
Dion Moult 20cb6ab007 See #4368. Don't ship with mostly unused and bloaty boto3 dep. Augin users can install boto3 with new debug tool. 2024-03-06 16:46:26 +11:00
Dion Moult e854447714 Little debug tool for people to easily install pip packages graphically
BBIM is being used in companies as ways to automate various BIM processes, and it ends up being such that Blender Python becomes their dev environment.
2024-03-06 16:44:32 +11:00
Dion Moult 7f394a5807 Purge hppfcl in preparation for new clash features 2024-03-05 23:16:47 +11:00
Andrej730 c80b437682 load clipping planes decorator reopening .blend file 2024-03-05 15:01:23 +05:00
Andrej730 b793ab63cc fix poll errors for clipping plane gizmo #4392 2024-03-05 14:37:30 +05:00
Andrej730 8c28f52e6a 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-03-05 14:18:18 +05:00
Benoit DAMAY 9d71b7483f Merge pull request #4397 from bdamay/v0.7.0
Fix proposal for # 3515 
OK I've deleted the unnecessary commented lines and left the option that feed only the description tooltip. 

BTW, I have 2 questions i would like to ask you
1. about comment, i noticed there are not many comments in the code. I understand it is deliberate choice of design, is it ? 
I usually comment a lot inside  the code sometimes simply to order my thoughts and remember what the code is intending to do when i come to it later on. 
I understand it is better not to leave unneccessary  lines like here, but in general, do you prefer me to avoid comments when writing in blenderbim ?    

2. As i'm in a discovering phase, I would like to feed some other bl_description operators to provide some additionnal inline information instead (undocumented operator) , is it something you planned or can i go for it. I could simply add the bl_description in each one i find while reading code and testing app.    

Thank you for your kind help. and G'day !
2024-03-05 09:14:06 +01:00
Benoit DAMAY e6e71adba7 Removing unnecessary comment lines 2024-03-05 08:53:56 +01:00
Benoit DAMAY 7ab8a5921b Merge branch 'v0.7.0' of https://github.com/bdamay/IfcOpenShell into v0.7.0 2024-03-04 17:11:54 +01:00
Benoit DAMAY d68d4d54a9 Replaced panel row with operator descriptor 2024-03-04 17:10:19 +01:00
Andrej730 bce0f0d8d4 fix typing loading issues 2024-03-04 18:14:50 +05:00
Andrej730 50648fd350 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-03-04 18:04:24 +05:00
Andrej730 b7e26bacea typing 2024-03-04 18:02:49 +05:00
Andrej730 a2fdd93e6b Optimise patch - lazy import toposort
to fix empty Optimise patch description in BlenderBIM
2024-03-04 18:02:49 +05:00
Dion Moult aef00a4dfc See #4389. Accommodate null pset values when serializing to SVG. 2024-03-04 17:53:53 +11:00
Dion Moult efae8ebdcd Add tree species to tree library 2024-03-04 17:51:48 +11:00
Dion Moult 61403fcf42 See #4389. Accommodate null metadata. 2024-03-04 17:51:07 +11:00
Benoit DAMAY badee8fdc5 Fix proposition to 3515 - extra empty lines removed from previous commit 2024-03-03 19:29:02 +01:00
Benoit DAMAY 36e779e32f Fix proposition to 3515 2024-03-03 19:23:51 +01:00
M!l!nd c50ac3db4f Update Makefile 2024-03-03 23:10:27 +11:00
Dion Moult b17c261344 Minor fix to shape aspects because not everything has a mesh (e.g. text annotations) 2024-03-03 23:09:40 +11:00
Dion Moult 956aae37a8 Fix #4377. Add support for adding filled elements in AXIS3 layered elements. 2024-03-03 23:09:17 +11:00
Dion Moult 48d6cc8a28 Fix #4383. Demo library should use Model/Annotation/MODEL_VIEW for text annotations so that they can be used anywhere, not just on plans. 2024-03-03 16:12:18 +11:00
Dion Moult cf9d3026f4 Fix #4384. Accommodate null values when getting data from pset. 2024-03-03 15:46:55 +11:00
Dion Moult e2f0b1ed5c Fix #4336. Close #4337. Remove rounding for more accurate fills. 2024-03-03 15:36:19 +11:00
Dion Moult b833cffbd3 Minor fixes to IfcCSV documentation 2024-03-03 15:25:15 +11:00
Dion Moult 7a7c89e475 Separate project templates and libraries and provide dropdown to built-in libraries to aid discoverability. 2024-03-03 15:24:46 +11:00
Dion Moult 01b0164e0d Fix #4385. Probably a mistake in the bool argument for removing datablocks. 2024-03-03 14:25:55 +11:00
Dion Moult 13f26d9b70 Tweak generated tree parameters and add manual trees to landscape library thanks to SavyGust27 2024-03-02 22:59:12 +11:00
jgunstone 8a88b0b3a1 🔧update pip install command assuming that this branch will be merged back 2024-03-02 10:56:20 +11:00
jgunstone a15e293db5 update license and version 2024-03-02 10:56:20 +11:00
jgunstone 9509f07da8 📝add docs about so to install and develop this package standalone 2024-03-02 10:56:20 +11:00
jgunstone 37b15de3e4 add simple tests to ensure the package is working as expected 2024-03-02 10:56:20 +11:00
jgunstone 66b4509b06 🐛 add limit and offset kwargs to get_classes. TODO- I think this needs doing throughout... 2024-03-02 10:56:20 +11:00
jgunstone 41dcb83bdb add version 2024-03-02 10:56:20 +11:00
jgunstone 0bda41710c 🔧 add pyproject.toml and __init__.py 2024-03-02 10:56:20 +11:00
Dion Moult cbd85fafda Fix #889. Write docs for how to do translations. 2024-03-01 23:16:05 +11:00
Andrej730 dc7ebab0d1 Clipping planes with cappings
Added new experimental section that allows you to cut objects based on current clipping planes in the scene. The difference from other clipping plane methods - it actually (temporarily) edits meshes geometry and adds cappings at the cut. So, the clipped meshes can be seen both on render and cutted parts won't get in the way as they do with temporary section cutaways (shader based method)

Example - https://imgur.com/a/SOqovOM
2024-03-01 16:22:58 +05:00
Andrej730 0c2a3ff400 remove_data_block - option to skip some checks to speed it up 2024-03-01 16:22:58 +05:00
Dion Moult 6af6fda799 See #4380. Remove support for EOL Python 3.6 2024-03-01 21:04:09 +11:00
Dion Moult 2c9e443425 Fix #4300. You can now select spatial elements by their location too. 2024-03-01 20:02:15 +11:00
Dion Moult 2bede1cdf0 Fix #4340. Indicate user needs to setup IFC2X3 user/app when using API directly. 2024-03-01 19:46:50 +11:00
Dion Moult 4f3397a04e Fix #4333. Ensure order of info is correct for valid IDSes. 2024-03-01 16:42:38 +11:00
Dion Moult 9b8adad8c8 See #4380. Standardise filepaths when linking in IFCs. 2024-03-01 16:32:41 +11:00
Dion Moult c48bccf727 You can now specify a false origin when linking in a model 2024-03-01 15:02:01 +11:00
Dion Moult 5d41336342 Add Python3.12 to installation docs 2024-03-01 12:39:39 +11:00
Dion Moult b8628cc9df See #4380. Bump IOS. 2024-03-01 12:23:42 +11:00
Dion Moult 519cb86163 New cable carrier and cable tool grouped into MEP tool submenu 2024-03-01 12:12:35 +11:00
Dion Moult 0008d8bd2a Add icon and convenience functions for walk and set orbit center in explore tool 2024-03-01 12:12:35 +11:00
Andrej730 bc7946091a bump svgfill 2024-02-29 16:22:08 +05:00
ChristophMellueh ac2db7b4c9 add missing Props request 2024-02-29 21:23:23 +11:00
Dion Moult 0b57d5fc5f You can now flip clipping planes 2024-02-29 20:39:29 +11:00
Dion Moult 82af25d09a New clipping planes feature. 2024-02-29 16:49:23 +11:00
Dion Moult 4a82525bdb You can now query data about a linked object from a SQLite cache. 2024-02-29 16:48:46 +11:00
Dion Moult 002112dd50 Fix #4279. You can now link in IFCs directly with efficient chunking instead of having to first create blend files 2024-02-29 16:42:54 +11:00
Dion Moult 844a9842cf See #4279. Viewport object culling feature to increase FPS when navigating large models. 2024-02-29 16:40:48 +11:00
Dion Moult 3a098e55c4 New IfcPatch recipe to extract flattened properties and relationships to SQLite for simple queries 2024-02-29 16:23:21 +11:00
Dion Moult e186b81f0c Fix #4335. Fix compilation error. 2024-02-29 16:22:39 +11:00
patrick.joerg 527d16c5f0 Small doc change to direct readers to advanced mode 2024-02-28 23:54:05 +11:00
Andrej730 8c1b33e1d5 Fix issues with accessing invalid entities in bim.reassign_class #4371
bim.reassign_class wasn't considering that root.reassign_class will also reassign class for occurrences of the same type and was reaccessing invalid elements
2024-02-28 16:54:11 +05:00
Andrej730 e46f18f686 type.py - some typing 2024-02-28 16:54:11 +05:00
Andrej730 931fd9cc9f reassign_class - cover with tests 2024-02-28 16:54:11 +05:00
Andrej730 aebc073416 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-02-28 16:54:11 +05:00
Andrej730 56e00d059b fix error removing pset from material or profile 2024-02-28 16:54:11 +05:00
Andrej730 8a6b4aa5fb fix tests after a971860 2024-02-28 16:54:11 +05:00
Andrej730 46bee8aed9 fix errors in tests
they were failing because import_reference_attributes were failing to get docs for unset schema version since ifc file wasn't attached to Blender
2024-02-28 16:54:11 +05:00
Thomas Krijnen eaa2aa05a4 Add buffer (bytestring) accessors to material colors - plus small fixes 2024-02-28 11:12:17 +01:00
Thomas Krijnen abfa6edc5c Add buffer (bytestring) accessors to geometry data 2024-02-27 16:18:40 +01:00
Andrej730 e3a1c29593 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-02-27 17:33:56 +05:00
Thomas Krijnen e6691989dc #4283 convert closed wires to faces prior to processing in svg serializer 2024-02-26 13:27:36 +01:00
Thomas Krijnen 83845bdd6d Disable building 3.6.x - due to from __future__ import annotations 2024-02-26 13:20:19 +01:00
Andrej730 0f4c19fd2d black format 2024-02-26 11:51:52 +05:00
Andrej730 ce8bdffe57 show occurrence name function in prefs only for custom name style 2024-02-26 11:35:28 +05:00
Andrej730 53e052eb77 Fix #4363 2024-02-26 11:35:21 +05:00
Dion Moult f21b472cfe Update Makefile 2024-02-26 17:10:36 +11:00
Dion Moult 324b440f5c Create blender_manifest.toml 2024-02-26 17:09:31 +11:00
Bruno Perdigão 37a7049a61 UI for linked aggregate (#4271)
* initial ui

* changed the group name

* groups counter in ui

* added operators for selection and breaking link in the ui

* small removal

* changed IFC operators to _execute
2024-02-23 14:56:28 -06:00
Bruno Perdigão 1c1035e251 Linked aggregate preserve names (#4135)
* added simples linked aggregate test

* small fix in remove_old_connections function

* added test for refresh linked aggregate

* refresh linked aggregates now preserves the objects original name

* small fix in recreate_connections function

* tests for Refresh Linked Aggregate

* test for Refresh Linked Aggregate after copying an object

* small deletion

* added custom incremental naming

* small fix in tests

* small fix on the number for renaming
2024-02-23 14:55:18 -06:00
Ryan Schultz d83924b73e Selects all the instances from selected instances that have different types 2024-02-23 12:51:16 -06:00
Massimo Fabbro a04542dfd1 New button hide all spaces in spatial tool 2024-02-23 18:16:15 +01:00
Massimo Fabbro 066616707a Now generate space and generate spaces from walls are always visible in the UI so users understand better that are different procedures 2024-02-23 18:16:15 +01:00
Andrej730 c1cd228911 Fix #4342 2024-02-22 16:19:19 +05:00
Andrej730 515830e52d update representation item style on editing/removing shape aspect
Example - https://imgur.com/a/2SxgSRH
2024-02-22 15:24:09 +05:00
Andrej730 a971860094 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-02-22 13:41:34 +05:00
Andrej730 f872906e0c MaterialCreator - minor refactor for code readibility 2024-02-22 12:26:12 +05:00
Andrej730 0597100356 fix error in data.py occurring if object has no material 2024-02-21 16:13:56 +05:00
Andrej730 d5feaaa1af show error message removing material that is used in material sets
previously it wasn't showing anything when you would try to remove a material
2024-02-21 15:58:17 +05:00
Andrej730 caca209c8f BBIM - update related representations on assigning style to material 2024-02-21 15:58:17 +05:00
Andrej730 2e45d4a57e unassign_material_style to handle constituents 2024-02-21 15:15:03 +05:00
Andrej730 0d8c86a0f6 api.unassign_representation_styles 2024-02-21 15:14:28 +05:00
Andrej730 7f0df72fec assigning material styles to reuse existing styled item + tests 2024-02-21 15:14:28 +05:00
Andrej730 863a8248af assign_representation_styles to reuse existing styled item + tests 2024-02-21 12:36:06 +05:00
Andrej730 bdc991856c style.assign_material_style small optimization 2024-02-21 11:32:48 +05:00
Andrej730 1a38b7f5c6 set previous active style and context values editing material's style 2024-02-20 16:02:50 +05:00
Andrej730 91199308a9 descriptive error for missing user or application in ifc2x3 #4340 2024-02-20 15:21:48 +05:00
Andrej730 1f7930c5c8 fixed bug migrating attributes to older ifc version (after 8728fa3) 2024-02-20 14:19:10 +05:00
Andrej730 54c7f355ff black format 2024-02-20 12:38:29 +05:00
Andrej730 551f3b0d8d Fix issues editing work time in ifc4x3 #4295 2024-02-20 12:38:29 +05:00
Andrej730 049c796629 IFC4.3 test bootstrap 2024-02-20 12:38:29 +05:00
Andrej730 412700c8fd Default Blender filepath hotkeys for .ifc filepath
Example - https://i.imgur.com/Mk6mkuP.png

E.g. alt-click now opens .ifc directory and shift-click opens .ifc with default software associated with .ifc files.

Should be cross-platform but tested only on Windows

Added this code to tool.Blender so it can be reused for other operators invoking file browsing window.
2024-02-20 12:01:43 +05:00
Andrej730 96a8c1e8ae style.assign_material_style to assign style to related shape aspects 2024-02-19 18:08:18 +05:00
Andrej730 602e18a262 promote get_shape_aspects to util.element method 2024-02-19 18:08:18 +05:00
Andrej730 9e30e1ad31 get material constituents from cache and filter active element material 2024-02-19 18:08:18 +05:00
Andrej730 b6f939f1b1 disable editing rep item style if it comes from material constituent through shape aspect 2024-02-19 18:08:18 +05:00
Thomas Krijnen d964f924d7 CMakeLists.txt pre 2.37 compat 2024-02-19 09:26:18 +01:00
Ryan Schultz 36b702630d Merge pull request #4291 from IfcOpenShell/Assign_Product_In_Any_Order
Select in any order, when assigning relating_product
2024-02-18 13:02:45 -06:00
Thomas Krijnen ccf70c7aad #4012 #2138 #2044 #4032 IfcConvert --keep-bounding-boxes option, default is now exluded. 2024-02-18 14:02:07 +01:00
Andrej730 a2ff63f9ec 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-02-16 18:04:09 +05:00
Andrej730 a82b0f30b0 fix errors getting layer assignments in ifc2x3 #4330 2024-02-16 18:04:09 +05:00
Andrej730 bc2fd232d0 sort representation items in ui based on shape aspect
- display shape aspect along with the repsentation type
- sort representation items based on shape aspects name, items without shape aspects come last
2024-02-15 16:05:14 +05:00
Andrej730 5d7b6ad998 Fix #4319
StringProperty search keyword was introduced only in Blender 3.3
2024-02-15 14:53:11 +05:00
Gorgious56 0e0678b926 Fix section cut planes not working anymore on Blender < 4.0.0 2024-02-15 08:41:42 +01:00
krande 1d4dfd0eb3 add missing typename 2024-02-14 21:49:43 +01:00
Gorgious56 65179db444 #4308 : Fix section cutaway shader links incorrectly linking when removing a section 2024-02-14 14:15:07 +01:00
Gorgious56 5457ee3a40 Fix #4308 : Section cutaway shader : Update API for 4.0 breaking changes + draw line decorator for more than one section cutaway 2024-02-14 13:43:27 +01:00
Andrej730 4f3ba7ae22 some typing 2024-02-14 14:25:55 +05:00
Andrej730 a33a1700dc 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-02-14 14:23:50 +05:00
Massimo Fabbro 8a48769760 Minor fix 2024-02-13 17:15:25 +01:00
Andrej730 7e55872ca8 fix bugs in c5c7363a9 2024-02-13 17:58:12 +05:00
Andrej730 edbe1d80bf fix project name for IfcAdvancedHouse 2024-02-13 13:50:29 +05:00
Andrej730 bd093303c4 UI info message when patch execution was finished 2024-02-13 12:33:36 +05:00
Andrej730 c5c7363a93 ifctester Attribute.filter not to check subtypes attributes
if attribute is already found in the super type
2024-02-13 12:25:32 +05:00
Andrej730 5014fef129 Fix #4314
It was looking for IFC entities with the attribute from Attribute.name but wasn't considering ifc subclasses that inherit from that entity.
2024-02-13 12:24:58 +05:00
Andrej730 d710a01df5 ifctester - some typing 2024-02-13 12:24:58 +05:00
Andrej730 23c65742e1 CMake - disable optimization for RelWithDebInfo with ENABLE_BUILD_OPTIMIZATIONS=Off 2024-02-12 14:23:21 +05:00
Andrej730 d8f52afa6c Fixed #4310 2024-02-12 12:15:27 +05:00
Andrej730 29ce8d5d80 Fix bug removing relating object of IfcRelNests
it was unlinking current collection of the related object and related objects were missing after
2024-02-12 12:01:04 +05:00
Andrej730 5e5de0bbd8 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-02-12 11:40:25 +05:00
Ryan Schultz b9b58f5726 proposed fix for #4311 2024-02-11 13:36:23 -06:00
Massimo Fabbro 5c7271ddc8 See #4007. Now clone opening works also when a opening hosts a window or a door 2024-02-11 14:43:12 +01:00
Massimo Fabbro 2db35556e9 Clone opening now deletes also old opening placement 2024-02-11 14:43:12 +01:00
Massimo Fabbro 2449656311 Small refactor clone opening operator in order to better understand and reuse it rebase 2024-02-11 14:43:12 +01:00
Gorgious56 c66cf0a22b Assigning an ifc class to an object now displays a message if the object is not in OBJECT mode 2024-02-09 17:26:48 +01:00
Andrej730 e1a1ba62c5 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-02-09 12:12:02 +05:00
Andrej730 6489f4dc1d bump py version in run-cmake.bat after c0d84713b 2024-02-08 16:39:27 +05:00
Andrej730 beab99bb0d Fix issue building IfcOpenHouse for IFC4 2024-02-07 13:34:19 +01:00
Andrej730 8b50f1bcd6 Fix bug in IfcHierarchyHelper.addRelatedObject
Noticed that `file.addRelatedObject<IfcSchema::IfcRelDefinesByType>(door_style, door);` was resulting in list with `door` assigned as RelatingObject and `door_style` assigned as RelatedObjects.
2024-02-07 17:10:16 +05:00
Andrej730 4617834578 MergeDuplicateTypes - fix error occuring if ifcopenshell.api is not imported
error was:
File "\site-packages\ifcpatch\__init__.py", line 78, in execute
    patcher.patch()
  File "\site-packages\ifcpatch\recipes\MergeDuplicateTypes.py", line 73, in patch
    self.assign_type(element, original_type)
  File "\site-packages\ifcpatch\recipes\MergeDuplicateTypes.py", line 114, in assign_type
    ifcopenshell.api.run("owner.update_owner_history", self.file, **{"element": types[0]})
    ^^^^^^^^^^^^^^^^
AttributeError: module 'ifcopenshell' has no attribute 'api'
2024-02-07 12:20:11 +05:00
Andrej730 426dcbee43 ifcopenshell installation notion about compiling only specific schemas 2024-02-07 12:20:11 +05:00
Andrej730 2a12151c07 cmake - clean up trailing spaces 2024-02-07 12:16:55 +05:00
Andrej730 c08958c1bd fix cmake warning with CMP0144 policy
The warning was:
```
CMake Warning (dev) at CMakeLists.txt:299 (find_package):
  Policy CMP0144 is not set: find_package uses upper-case <PACKAGENAME>_ROOT
  variables.  Run "cmake --help-policy CMP0144" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  CMake variable BOOST_ROOT is set to:

    \IfcOpenShell\_deps\boost_1_74_0

  For compatibility, find_package is ignoring the variable, but code in a
  .cmake module might still use it.
```
2024-02-07 12:16:55 +05:00
Andrej730 e355a33d48 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-02-07 12:16:55 +05:00
Andrej730 ece9e2fdd1 build-deps - bump boost version to avoid "missing .b2 issue"
issue was mentioned in #2524 and resulted in error below trying to build boost dependency
```
'.\b2' is not recognized as an internal or external command,
operable program or batch file.
```
2024-02-07 12:16:54 +05:00
Andrej730 c0d84713bc bump python version in windows build dependencies
they seem to switch to .exe from .msi starting from 3.5+, changed amd prefix. Also fixed version parsing line for two digits minor versions
2024-02-07 12:16:54 +05:00
Andrej730 ca9f165b6a ifcpatch.execute - make input attribute optional
e.g. MergeDuplicateTypes  doesn't use it in the code either way
2024-02-07 12:16:54 +05:00
dependabot[bot] 8f9c97a663 Bump fastapi from 0.101.0 to 0.109.1 in /src/opencdeserver/api/app
Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.101.0 to 0.109.1.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](https://github.com/tiangolo/fastapi/compare/0.101.0...0.109.1)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 09:31:38 +11:00
marwiss 4ed8310b93 Correct protocol to encrypted HTTPS 2024-02-06 09:55:11 +11:00
marwiss 31be899dc9 Replace existing code in src/opencdeserver with code from the "Kontroll OpenCDE API:s server" POC project on https://github.com/marwiss/Kontroll 2024-02-06 09:55:11 +11:00
Ryan Schultz 4463dd8af9 deleted extraneous variables 2024-02-04 17:35:40 -06:00
Ryan Schultz 95c0ac901f Select in any order, when assigning relating_product 2024-02-04 15:28:18 -06:00
Andrej730 6d7a6eeda7 fixed bug removing representation item
if you'd click on "remove item" button for some item it wouldn't remove the corresponding item but would go for removing active item instead
2024-02-02 14:53:10 +05:00
Andrej730 c520e0eeb5 some refactor for bbim drawings svg serialization
Made some changes to svg serialization code by moving chunks of code so `.generate_linework()` will be easier to read
- moved gathering linework contexts to a separate method
- moved common code for elements serialization to a function
- replaced self.yield_from_iterator(it) with it.__iter__

Functionally code is exactly the same.
2024-02-02 12:56:06 +05:00
Andrej730 73817acdff add a note on get_info_2() #4270 2024-02-01 17:19:35 +05:00
Andrej730 3d7e8d7c6c Fixed #4259
Result of DeepDiff contain ordered sets. Also added fallback for usual sets to lists just in case, should be safe.
2024-01-30 15:41:08 +05:00
Andrej730 a701840826 Fixed error adding a boolean
It occured if active object was IFC object and second selected object was just Blender object.
2024-01-30 14:40:07 +05:00
Andrej730 5de2ac9042 black format 2024-01-30 14:36:35 +05:00
Andrej730 573e2626ad Fix test Model.get_manual_booleans after we added pset to store them 2024-01-30 14:36:35 +05:00
Andrej730 9de59afd49 Fix #4267 and add tests
Crash was caused by unmark_manual_booleans accessing boolean element after they were deleted from IFC
2024-01-30 14:36:35 +05:00
Andrej730 74a9671075 Update ui.py 2024-01-30 14:36:35 +05:00
Andrej730 799658ff41 display active representation presentation layer in UI
example - https://i.imgur.com/mpnoqPH.png
2024-01-30 14:36:35 +05:00
Andrej730 bd64f42a54 remove_representation to consider representation item's layers too
and purge layers if they are out of items as they become invalid
2024-01-30 14:36:35 +05:00
Andrej730 8eab7f155e Small presentation layers UI fixes 2024-01-30 14:36:35 +05:00
Andrej730 5351966430 access layer assignments from inverse attribute instead of going through representation inverses 2024-01-30 14:36:35 +05:00
Andrej730 2663c079f4 test for removing representation items 2024-01-29 16:47:17 +05:00
Andrej730 6747bd9c8f UI to remove representation items
example - https://i.imgur.com/jJDpIQP.png
2024-01-29 16:47:16 +05:00
Andrej730 6ece295be4 tests for creating shape aspects and adding items 2024-01-29 15:52:40 +05:00
Andrej730 64a9f85f25 create new shape aspects from UI
example - https://i.imgur.com/BJJZWrC.png
2024-01-29 15:52:39 +05:00
Andrej730 d8fa853308 edit shape aspect attributes from UI
example - https://i.imgur.com/SzUEn6r.png
2024-01-29 15:52:39 +05:00
Andrej730 ce37c49624 Fix #4262 after 0da3270c7 2024-01-29 11:13:22 +05:00
Andrej730 0da3270c7f UI for changing representation item's shape aspect
Example - https://imgur.com/a/tN7hCYz
2024-01-26 17:32:46 +05:00
Andrej730 fda6fc6c48 geometry.remove_representation documentation 2024-01-26 17:20:39 +05:00
Andrej730 3865f01df9 operator to remove representation item from shape aspect 2024-01-26 17:20:39 +05:00
Andrej730 6bf61d7163 Simple UI to display repr item shape aspect
Example - https://i.imgur.com/YEAE9zU.png
2024-01-26 15:27:05 +05:00
Andrej730 b8ad73668f BBIM to print console errors in case IFC file is failed to load 2024-01-26 14:54:51 +05:00
Andrej730 b7a3dd4164 black format 2024-01-26 14:54:50 +05:00
Bruno Postle 566fd443db IfcGit avoid leaving stray .git/config.lock files 2024-01-25 23:30:00 +00:00
Andrej730 51b5a507cf shape builder docs 2024-01-25 16:46:38 +05:00
Andrej730 a44357dad5 shape builder polyline example and tests 2024-01-25 16:46:34 +05:00
Andrej730 8e792ebb50 UI for changing styles for representation items
Example - https://imgur.com/a/SQh6rR2
2024-01-25 15:17:44 +05:00
Andrej730 352321364c fix couple building docs errors / warnings 2024-01-24 16:38:53 +05:00
Andrej730 2ab32e41b2 shape builder docs fixes 2024-01-24 16:38:53 +05:00
Andrej730 3fbd9d7cdf 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-01-24 16:38:52 +05:00
Dion Moult 7a7fde0a2a See #4247. Loading models now skips excessively voided objects for performance. 2024-01-24 10:39:31 +11:00
Ryan Schultz 7992bd9902 Give user additional feedback when trying to duplicate an IFCproject and Drawing. Also deselects the object to prevent inadvertently moving it. 2024-01-23 08:04:12 -06:00
Dion Moult 3182fe9c15 Fix bug where merging by type when loading broke if a type didn't have a name 2024-01-23 19:45:31 +11:00
Dion Moult e8858aeeb3 Fix bug where loading filtered IFC2X3 models didn't work. 2024-01-23 17:39:13 +11:00
Dion Moult ec79d61095 Fix #2719. Indicator whether or not IFC is dirty to help users know when to save. 2024-01-23 16:29:42 +11:00
Dion Moult 266236ee49 See #4241. Only use shapely to repolygonise if IfcOpenShell returns unclosed paths. Hollow cuts typically are closed paths. 2024-01-23 16:06:54 +11:00
Dion Moult 192e4e43a4 Fix #4239. Stop users from duplicating IfcProject. 2024-01-23 12:30:25 +11:00
Dion Moult b22c92e951 Fix regression where you couldn't unlink an object that already had a broken element link, and bug where you couldn't unlink a spatial element or similar with its own collection. 2024-01-23 12:27:09 +11:00
Dion Moult 7634e71434 See #4239. Ensure that all copy pasted objects are unlinked. Use duplicate if you want to copy. 2024-01-23 12:25:46 +11:00
Dion Moult dda803df2e See 0028fd3. Fix regression when duplicating objects without connections. 2024-01-23 09:05:40 +11:00
Andrej730 c3ded31a6a static ifcopenshell.geom.serializers and some typing for IDE code hints
code itself should work exactly the same way
2024-01-22 14:24:24 +05:00
Thomas Krijnen f2d19ab2c3 #4216 todo note 2024-01-22 09:38:05 +01:00
Dion Moult ab80400e16 See #4240. Guard against possible user creating invalid userdefined attribute values. 2024-01-21 21:56:45 +11:00
Dion Moult c88496c6a6 See #4240. Fix validation issue with perspective drawing pyramid booleans. Boolean clipping results can only be used on swept solids. 2024-01-21 19:13:40 +11:00
Dion Moult 0ee07fb8cc See #4240. Fix bug where 2D arbitrary profiles were invalid IFC (used 3D point lists not 2D) 2024-01-21 16:07:00 +11:00
Dirk Olbrich 36cf458498 docs: include doxygen-awesome as git submodule 2024-01-20 14:05:50 +01:00
Dirk Olbrich e7c25bf99f docs: add README with instructions 2024-01-20 14:05:50 +01:00
Dirk Olbrich 50a3c8c2f3 docs: modify doxygen config to new folder 2024-01-20 14:05:50 +01:00
Dirk Olbrich f18298d1fd git: clean up gitignore 2024-01-20 14:05:50 +01:00
Dirk Olbrich d4770bdee3 docs: move C++ API docs to subfolder 2024-01-20 14:05:50 +01:00
Dirk Olbrich 1fb107c361 docs: include doxygen-awesome theme 2024-01-20 14:05:50 +01:00
Dirk Olbrich 0fa1e2d585 docs: remove duplicate cmake for Sphinx setup 2024-01-20 14:05:50 +01:00
Dirk Olbrich dc13f4c5cc docs: remove geom setting docs and images
- these are duplicated in /src/ifcopenshell-python/docs/ifcopenshell/
2024-01-20 14:05:50 +01:00
Dirk Olbrich d197c3f49a docs: update doxygen file to 1.9.8 2024-01-20 14:05:50 +01:00
Dirk Olbrich c05200a5c6 docs: set LOOKUP_CACHE_SIZE 2024-01-20 14:05:50 +01:00
Dirk Olbrich 235bb198da docs: update Doxyfile to v1.9.4
- specify ./output/doxygen as main path for output
- use relative paths for subfolder output
2024-01-20 14:05:50 +01:00
Dion Moult 40f332d674 Fix #3947. Do slight 2mm offset to account for Z-fighting on 2D plan views and RCPs. 2024-01-20 21:53:34 +11:00
Dion Moult e8a272dc97 Fix #4213. Allow having separate windows to trigger drawing operators. 2024-01-20 15:06:47 +11:00
Dion Moult 0b308770a6 See #4216. Document using OpenCASCADE geometry serialisation to create geometry. 2024-01-20 14:35:52 +11:00
Dion Moult 96c8323a06 Fix #4221. Only load leaf rows with cost values. Createing a monetary measure with None results in a segfault on Windows. 2024-01-20 14:17:19 +11:00
Dion Moult 25573cd0e0 Fix #4236. Consolidate revert, reload IFC, and reload selected IFC operations.
Reload IFC incrementally (via diff) is moved to the debug panel since it is a dangerous advanced user command.
2024-01-20 13:15:59 +11:00
Dion Moult ff3c7786f6 Fix #4109. Write docs about geometry serialiser. 2024-01-19 23:18:38 +11:00
Dion Moult 5f4dfcf215 Fix #4231. Bug where you couldn't add a door to an element assembly. 2024-01-19 22:47:53 +11:00
Andrej730 9a89555a53 bbim_translations.py - remove operator context from operator tooltips
noticed editing translations from ui that operator tooltip doesn't appear in ui if tooltips has `msgctxt "Operator"`
2024-01-19 16:31:34 +05:00
Dion Moult fc69a2acbe Fix #4127. Bug where IfcTester couldn't save ODS report. 2024-01-19 22:25:03 +11:00
Andrej730 85a2a5ad12 fix build error 2024-01-19 15:11:59 +05:00
Andrej730 49c3d28a0b Merge branch 'localization' into v0.7.0 2024-01-19 15:02:01 +05:00
Andrej730 a8f20b2c6b drop bpy related translations.py<->.po stuff as we won't be using it 2024-01-19 15:00:41 +05:00
Andrej730 66fa1cedd9 run bbim_translations.py without bpy 2024-01-19 15:00:41 +05:00
Andrej730 eb971d3d73 save just a final dictionary to translations.py instead of tuples
We can do that since In our workflow we won't be converting translations.py to .po files, that way it will be much shorter as it's containing only translated strings and doesn't have strings sources.
2024-01-19 13:58:49 +05:00
Andrej730 a30a796c07 generate translations.py without bpy 2024-01-19 13:58:49 +05:00
Andrej730 9e46bacc12 gettext bug fix 2024-01-19 12:06:11 +05:00
Ioannis P. Christovasilis b33378e135 ifc2ca major update - todo: update readme file 2024-01-18 12:53:31 +01:00
Vukas Pajic d42e19f491 Fix #4226 2024-01-18 08:54:24 +01:00
Eduardo Schilling 2597827ab3 Roof slope as percentage property 2024-01-18 09:40:33 +11:00
Dion Moult 3f71efea6d Fix #4227. Add shapely as an optional dependency for IOS-Python 2024-01-18 09:22:35 +11:00
Andrej730 2d279b7a7f update blenderbim build to include translation data 2024-01-17 17:18:04 +05:00
Andrej730 e5fe039fd0 expose current blender locale in bbim translations ui 2024-01-17 17:18:04 +05:00
Andrej730 9e14829cc1 bbim messages parser to also parse gettext 2024-01-17 17:10:26 +05:00
Andrej730 e867602d9d keep order of strings in .pot as they were parsed and store source filepaths 2024-01-17 17:10:26 +05:00
Andrej730 aecc3d56b8 switch to our own string parser instead of blender's 2024-01-17 17:10:26 +05:00
Andrej730 e3f5d3d2b7 rename BlenderBIM translation script/addon 2024-01-17 17:10:26 +05:00
Thomas Krijnen 65f8b1a532 #4222 template kw 2024-01-17 11:10:06 +01:00
Thomas Krijnen 96b4df10ba #4222 typename keywords 2024-01-17 11:02:02 +01:00
Andrej730 98b56aea42 allow missing translations.py as not everyone will need translations for BBIM 2024-01-17 12:07:02 +05:00
Andrej730 ba6ba29da8 auto enable "Manage UI Translations" addon if it's not enabled 2024-01-16 17:34:24 +05:00
Andrej730 1112b102f7 add without-blender-way to generate translations module from po files
though it does require `bpy` module which is available only for python 3.10.
Actually, `bpy` module by itself is not necessary - we just need `bl_i18n_utils` that becomes available after `import `bpy`. So alternatively we can just download that module from Blender https://projects.blender.org/blender/blender/src/branch/main/scripts/modules/bl_i18n_utils
2024-01-16 17:06:43 +05:00
Andrej730 04b8172ea9 black format 2024-01-16 15:28:55 +05:00
Andrej730 f5f3edbc79 check if translation ui is loaded by current Blender session instead of current Blender file
as it's more reliable and thing could change after Blender restart
2024-01-16 15:27:43 +05:00
Andrej730 30029e3dc7 expose i18n path in translator UI
removed bim.open_po_directory operator as it's now available just from alt-clicking on the path browsing button
2024-01-16 15:24:03 +05:00
Andrej730 ed836f5b4a Update bbim_setup_translations.py 2024-01-16 15:18:05 +05:00
Andrej730 a88b708442 fix issues with empty paths accepted as valid paths 2024-01-16 15:15:11 +05:00
Andrej730 764c3bbb85 separate developer/translator ui 2024-01-16 15:08:55 +05:00
Andrej730 382d3f1f9f generate pot file too converting translations.py 2024-01-16 15:04:02 +05:00
Thomas Krijnen c92f607a15 #4222 sprinkle with template keywords 2024-01-16 09:56:50 +01:00
Thomas Krijnen b57b7080fd #4220 weakref to file 2024-01-16 09:44:04 +01:00
Thomas Krijnen 860ff4e513 #4220 Update file.py 2024-01-16 09:31:35 +01:00
Andrej730 3546f13593 change test addon name from localization_test 2024-01-16 11:42:34 +05:00
Dion Moult 663966e08d Fix #4089. Document support for Linux AArch64 on Conda. 2024-01-16 11:19:17 +11:00
Dion Moult f077ebdc81 Fix #4211. Minor documentation fix that clarifies upstream bug about whether qto can be assigned to types. 2024-01-16 10:56:35 +11:00
Dion Moult eb888fd116 Fix #4223. Basic lint error. 2024-01-16 10:50:43 +11:00
Dion Moult 40b6b3bf17 Fix #4224. Fix sequencing lint bugs. 2024-01-16 10:47:50 +11:00
Dion Moult 2ef2f923d0 Fix #4219. Update documentation for creating a new model. 2024-01-16 10:45:13 +11:00
Bruno Postle 75fab58831 IfcGit fixes suggested by ruff 2024-01-15 22:16:19 +00:00
Andrej730 ce26c6e19b BBIM - upgrade to IFC4X3 on loading projects
Added "Upgrate to IFC4X3" button on loading new projects to migrate them to IFC4x3 as Ifc4x3 got approved now will be used more widely.

https://i.imgur.com/mHSIV7T.png
2024-01-15 17:39:49 +05:00
Andrej730 8728fa38b9 Migrator - basic support for migrating attributes ifc4 -> ifc4x3
And added one of the IfcProperty renamed attribute as an example
2024-01-15 17:39:49 +05:00
Dion Moult 3037795199 Fix #4139. Bulk purge orphaned classes and move advanced operators to debug panel. 2024-01-15 23:16:42 +11:00
Andrej730 39ee9cd8b1 Migrator - display some error message for unhandled schemas
Noticed it was resulting in error below migrating to IFC4X3 in some cases as we don't have a mapping for IFC4X3 yet.
```
    if value is None and not attribute.optional():
UnboundLocalError: local variable 'value' referenced before assignment
```
2024-01-15 16:16:29 +05:00
Andrej730 b375bbf558 black format 2024-01-15 16:16:29 +05:00
Thomas Krijnen f2cae79dea #4220 Update entity_instance.py 2024-01-15 12:01:18 +01:00
Andrej730 aadc77f6b6 minor fix for bim.create_all_shapes printed messages 2024-01-15 14:44:40 +05:00
Andrej730 35223d968c semi-automatic setup for necessary directories 2024-01-15 14:43:23 +05:00
Andrej730 e106dc4502 register translations dict only if addon is already loaded 2024-01-15 13:39:27 +05:00
Andrej730 2995b73c2d open .po directory operator 2024-01-15 13:39:27 +05:00
Andrej730 770bc6ea61 Operator to disable BBIM and restart Blender
as it's needed to reload the translations

Update bbim_setup_translations.py

Update bbim_setup_translations.py
2024-01-15 13:38:34 +05:00
Andrej730 f5736a7144 convert setup_translations to blender addon for UI 2024-01-15 12:18:53 +05:00
Dion Moult b4120b1cab Fix #4173. Don't recreate boundaries of building elements that already exist.
Inline opening processing. Minor improvement to detecting attributes for int/ext and physical/virtual.
2024-01-15 15:28:52 +11:00
Dirk Olbrich f44ca67ab9 readme: fix listed ifc version, add link to IFC4x3 docs 2024-01-15 09:20:15 +11:00
Dion Moult 77eae1c8e8 Fix #4195. Forgot to add UI for contains selector. 2024-01-14 23:20:06 +11:00
Dion Moult 02d79f0687 See #4173. Prototype new approach to generating 1st level space boundaries. 2024-01-14 23:12:14 +11:00
mohamadalbaaj 83d364574a Fixing Dimension Mismatch in Matrix Multiplication 2024-01-14 15:08:08 +11:00
Dion Moult 688d2b7bd1 Minor test fix 2024-01-13 16:49:27 +11:00
Dion Moult bf35239979 Fix bug where UI didn't show applicable psets to specific predefined types 2024-01-13 16:49:02 +11:00
Dion Moult ca8e014647 Fix #4195. Fix regressions from f840da3 and add support for "contains string" comparisons. 2024-01-13 15:58:57 +11:00
Dion Moult b5f63ec4f3 Fix #4196. Settings are now saved when you save Spreadsheet export JSON files. Also a new setting to generate an SVG alongside the spreadsheet (intended to be used as a schedule placed on a sheet). 2024-01-13 15:03:51 +11:00
Dion Moult aec2141128 Minor fix 2024-01-13 00:00:58 +11:00
Dion Moult 778344c804 Fix #4197. URLs in SVG schedules are now clickable. 2024-01-12 23:44:45 +11:00
Dion Moult 3ede9b254f Fix #4199. Bug where external references on sheets weren't properly referenced leading to no names. 2024-01-12 19:48:32 +11:00
Dion Moult 8df40dc4a6 Fix #4203. Fix bug where removing nested cost items left orphaned relationships. 2024-01-12 18:14:49 +11:00
Dion Moult 75dd4f3132 Fix #4204. Add support for XLSX schedules on sheets. 2024-01-12 17:26:04 +11:00
Christoph Mellueh be11df3dc1 sort code alphabetically 2024-01-12 08:43:50 +11:00
Christoph Mellueh 09ac212aa9 improve core file for better zen 2024-01-12 08:43:50 +11:00
Christoph Mellueh e159151b44 update BsDD to match new API
+ move Functions from operator to core/tool
2024-01-11 12:00:44 +11:00
Dion Moult 27f6ac0575 Fix #4198. Minor regression in updating text literals. 2024-01-11 09:53:48 +11:00
c4rlosdias f840da3ffd Added more comparisons in search 2024-01-10 23:21:18 +11:00
sennhvi 034df852b2 Update geometry_processing.rst
Add an usage example of the parameter include  for the Geometry Iterator
2024-01-10 23:19:46 +11:00
Christoph Mellueh f242071ebb add pset view to groups 2024-01-10 23:14:33 +11:00
Sigma Dimensions (Yass) b6663e9189 fix counting elements when importing cost schedules ( and run black) 2024-01-10 09:30:03 +01:00
Dion Moult 39d143668c Fix #4186. Support different RL insertion modes when adding occurrences of a type. 2024-01-10 18:53:05 +11:00
Dion Moult 6ea1e378c5 Fix bug where updating type text literals didn't propagate and formatting rounding null values wasn't handled. 2024-01-10 14:42:14 +11:00
Dion Moult a33f30e8ce Fix #4189. Hidden or non-isolated objects now don't show annotations. 2024-01-10 12:29:56 +11:00
Christoph Mellueh e79fb2ff0b add typing to BsDD 2024-01-10 09:10:38 +11:00
Christoph Mellueh 054b4d0ee2 add deprecation warnings 2024-01-10 09:10:38 +11:00
Christoph Mellueh 43bebf4eee update new api to BsDD 2024-01-10 09:10:38 +11:00
Thomas Krijnen 532869a48a #4182 Properly initialize filename in stream_or_filename class 2024-01-09 13:41:38 +01:00
Andrej730 6569d0031f monkey patch blender's dump_addon_messages
The way blender gather messages to translate is:
1) disable the addon
2) parse all available strings
3) enable the addon
4) parse all strings available strings again and subtract the ones gathered at step 2.

But due Blender bug (https://projects.blender.org/blender/blender/issues/116579) not all addon parts unregistered at step 1, so some addon's strings left out and gathered at step 2 and then subtracted at step 4. At the end, we loose them and they will be missing from resulting translations files.

I've monkey patched dump_addon_messages so it now works a bit more safe:
0) It expects addon to be disabled and Blender restarted after
1) Gather all Blender strings
2) Enable addon
3) Gather all Blender strings again and subtract strings from step 1.
2024-01-09 16:54:58 +05:00
Andrej730 bfaa61e592 setup_translations - original dump_addon_messages
same as with dump_py_messages - this commit is needed to track monkey patch changes later on
2024-01-09 16:46:22 +05:00
Andrej730 1a09ce40e9 fix error converting translations to .po if .po files already exist 2024-01-09 16:00:21 +05:00
Dion Moult 6f1b40fc86 Fix #4162. Reduce minimum area requirement for auto space generation down to 0.1sqm. 2024-01-09 18:20:51 +11:00
Dion Moult 734eec7715 See #4162. Fix bug with generating space from cursor due to numerical inaccuracies and colinear lines for shapely. 2024-01-09 18:13:29 +11:00
Dion Moult bfabc0db0f Add support for groups in selection queries 2024-01-09 16:44:40 +11:00
Dion Moult e71aac84dc Fix #4175. Add new UI for managing IFC object and edit modes. 2024-01-09 12:57:31 +11:00
Andrej730 c156100be2 Fix breaking spatial containers UI when spatial container is deleted
E.g. if you had some container selected in `active_container_id` and then it got deleted UI would break and won't allow to reload the spatial manger until you reload .ifc completely
2024-01-08 15:53:10 +05:00
Andrej 48c2b43a58 Merge pull request #4171 from c-mellueh/fix-SurfaceStyle-loader-bug
Fix Surface Style Loader Bug
2024-01-08 12:31:14 +05:00
Dion Moult 2f8cfb5a95 Fix #4161. Deprecate unmaintained barebones LCA module. 2024-01-08 16:59:31 +11:00
Eduardo Schilling 1c4cc34c1b Add degrees format display 2024-01-08 16:54:58 +11:00
Eduardo Schilling b81e03d9c2 Add stair calculated parameter Pitch 2024-01-08 16:54:58 +11:00
Dion Moult eb96858460 Fix #4167. Bug where pset template module didn't allow creating qto template types. 2024-01-08 16:52:59 +11:00
Dion Moult 5c7e70e987 Minor fix to loading nested ports 2024-01-08 16:03:57 +11:00
Dion Moult 9093c9d419 Fix #4176. Bug where tabbed interface didn't work on new or temporary screens. 2024-01-08 16:03:34 +11:00
Dion Moult 02a5b8d997 Fix #4178. Bug when removing the wrong classification reference. 2024-01-08 13:48:35 +11:00
Sigma Dimensions (Yass) f1b5f7d558 add conversion based unit symbols 2024-01-05 18:45:54 +01:00
Thomas Krijnen 742a9ecd81 IfcParseExamples requires C++17 now 2024-01-05 09:04:34 +01:00
Thomas Krijnen 77a497cdf7 Generalize shortened file.schema attribute 2024-01-04 15:05:40 +01:00
CyrilWaechter 00576ef574 IfcRelSpaceBoundary: Add error handling and better error message for user 2024-01-04 10:22:51 +01:00
Sigma Dimensions (Yass) c26caaa58d fix resource cost calculation 2024-01-04 09:33:55 +01:00
Sigma Dimensions (Yass) b260bd3877 Record formula and resource name for cost values when calculating resource cost 2024-01-04 09:32:31 +01:00
Sigma Dimensions (Yass) cd6246c382 fix cost value calculation when using parent cost 2024-01-04 09:30:27 +01:00
Sigma Dimensions (Yass) a96d6dacc7 Display cost value names, and add import operator for cost schedule panel 2024-01-04 09:29:50 +01:00
CyrilWaechter 64c711a02a IfcRelSpaceBoundary: Create almost all boundaries for a selected space
* Refactor boundary creation to allow usage in a loop.
* Loop through all building element in building storey instead of stopping to the first one
* Enforce checking to prevent creation of invalid boundary geometries
2024-01-03 16:37:10 +01:00
Christoph Mellueh 68a2480a66 turn list into tuple 2024-01-03 13:42:14 +01:00
CyrilWaechter d5e2fd5d3c Fix some url and add missing ones 2024-01-03 01:11:05 +01:00
CyrilWaechter bb445663f8 Bump IOS and use more update friendly url 2024-01-03 00:22:50 +01:00
CyrilWaechter 1f7db75572 Add python 3.11 to blenderbim build matrix 2024-01-02 20:59:04 +01:00
CyrilWaechter f478ec8d6b black boundary operator.py 2024-01-02 18:49:50 +01:00
CyrilWaechter cf3ba334b7 IfcRelSpaceBoundary: make sure parent boundary is whole 2024-01-02 18:49:05 +01:00
CyrilWaechter c36af110c4 IfcRelSpaceBoundary: Improve inner boundary generation workflow and boundary names
# Inner boundaries
Some software or workflow generates many opening for the same element (eg. window) so it is not relevant to create inner boundaries for opening with no filling.

# Boundary name
Apply convention for 1st and 2nd Level boundaries
2024-01-02 17:52:23 +01:00
Kristoffer Andersen 91eac7085b Update meta.yaml
pin swig version for conda
2024-01-02 15:46:48 +01:00
Thomas Krijnen 239d1d6fd2 C++ get_psets() with extensive preprocessor trickery 2023-12-30 16:14:10 +01:00
Thomas Krijnen 831709d514 Update src/ifcopenshell-python/docs/ifcopenshell-python/geometry_processing.rst 2023-12-30 10:03:10 +01:00
wangsenhui 5925476ed9 add geometry processing with multiple representations example 2023-12-30 10:03:10 +01:00
wangsenhui 3edb3c8df3 add geometry processing with multiple representations example 2023-12-30 10:03:10 +01:00
wangsenhui 72badd8427 add geometry processing with multiple representations example 2023-12-30 10:03:10 +01:00
Andrej730 ff251b7a6a monkey patch dump_py_messages to ignore blenderbim dependencies 2023-12-29 17:36:12 +05:00
Andrej730 dbce57ffc5 setup_translations - original dump_py_messages
as we're going to monkey patch it and this commit is needed to keep the history of changes
2023-12-29 17:36:12 +05:00
Andrej730 8ff9bcef32 update translations in current blender session 2023-12-29 17:13:43 +05:00
Andrej730 82b2006686 setup_translations.py - use just 1 directory to store .po files
and use temp directory to store .po files for ui_translate.export/import
2023-12-29 17:13:43 +05:00
Andrej730 ca4181c714 fixed typo 2023-12-29 16:58:31 +05:00
Andrej730 3928dd7c9c BBIM - register translation strings #889 2023-12-29 15:33:38 +05:00
Andrej730 925964ee2a BBIM script to reload/export/import translation strings #889 2023-12-29 15:33:30 +05:00
Thomas Krijnen 7201df8d22 p21 binary should be uppercase 2023-12-26 14:28:45 +01:00
Andrej730 7b65108a76 ifctester - added some typing for IDE type hints 2023-12-26 16:18:08 +05:00
Andrej730 0fbe4d80c7 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.
2023-12-26 11:33:20 +05:00
Ryan Schultz 54c689d615 Applying multiple opening objects in bulk
Merry Christmas.
2023-12-25 10:33:49 -06:00
Andrej730 ab828b1a8b ifcpixeltexture tests to reflect actual order of data 2023-12-25 16:22:08 +05:00
Andrej730 8ddd349f8b Fixed issue with flipped ifcblobtexture loaded to blender 2023-12-25 16:21:05 +05:00
Andrej730 3221219f4a save ifcblobtexture and ifcpixeltexture to .blend file 2023-12-25 14:36:58 +05:00
Andrej730 36387f348e Fixed issue changing type of object creating opening in an aggregate
More: https://community.osarch.org/discussion/1888/error-after-trying-to-change-a-window-type-whose-opening-is-applied-to-an-aggregate#latest

A bit related to #3973 in case if it will be resolved
2023-12-25 11:49:06 +05:00
Andrej730 c39c6d81e3 Note on not allowing aggregates with representation #3973 2023-12-25 11:47:58 +05:00
Andrej730 e8042de1ed expose assign/unassign aggregation hotkey to bim tool ui 2023-12-25 11:03:10 +05:00
Andrej730 78fd999c53 Fix a few uses of assigning/unassigning agregation after 165262933 2023-12-25 10:38:51 +05:00
dushyant basson 91d1cb79c2 Using transformation-matrix data; Turned off world-coords; Re-using geometry of repeating IDs 2023-12-24 11:57:14 +01:00
dushyant basson 832618b84a initial camera-orientation; multiple materials in a single element; default material used from IfcGeom; improved triangle node data generation for OSG 2023-12-24 11:57:14 +01:00
dushyant basson e4ce53d548 update 2023-12-24 11:57:14 +01:00
dushyant basson 7b92b5c7e2 IFC file successfully parsed and loaded in Qt OpenGL widget 2023-12-24 11:57:14 +01:00
dushyant basson c8c08439b2 added header-guard 2023-12-24 11:57:14 +01:00
dushyant basson 3476ee8fd5 debug messages 2023-12-24 11:57:14 +01:00
dushyant basson d2f331c813 update 2023-12-24 11:57:14 +01:00
dushyant basson 9e9b294f44 Implemented: Application icons; OpenSceneGraph to handle OpenGL with Qt; devicePixelRatio() for handing render on highDPI displays; Sample 3D with handler; MouseHandler not yet working as expected (WIP) 2023-12-24 11:57:14 +01:00
Dushyant Basson f824ee8ca4 updated .ico file 2023-12-24 11:57:14 +01:00
dushyant basson 919f673108 add application file icon for macos 2023-12-24 11:57:14 +01:00
Dushyant Basson b034b40b09 application file-icon and window-icon set on ms-windows 2023-12-24 11:57:14 +01:00
dushyant basson 34f038530f Removed .clangd file from tracking and added it to .gitignore 2023-12-24 11:57:14 +01:00
dushyant basson 1c70990b06 Removed .clangd file from tracking and added it to .gitignore 2023-12-24 11:57:14 +01:00
dushyant basson 07eecad433 adding qt resources 2023-12-24 11:57:14 +01:00
Sigma Dimensions (Yass) ef87f0fe74 New Clash management panel to load IFCClash collision results 2023-12-23 09:14:08 +01:00
Sigma Dimensions (Yass) 23c2d73e8e fix smart clash group selection 2023-12-23 09:11:20 +01:00
Andrej730 0b47fb5987 Fix typo in 92cf0d9 2023-12-22 21:53:31 +05:00
Andrej730 8a1dee532b Support loading styles with IfcPixelTexture 2023-12-22 19:22:14 +05:00
Andrej730 f0c6c4ca59 Allow copying node graphs for external shaders on Blender 4.1+ #3876 2023-12-22 16:40:48 +05:00
Andrej730 92cf0d9265 remove_representation not to leave brokens refs with batch_remove #4138 2023-12-22 16:04:52 +05:00
Andrej730 7c438b6b9b Purge IfcWindow/DoorStyle/IfcTypeProduct #4137 2023-12-21 14:26:43 +05:00
Sigma Dimensions (Yass) 46454c5c94 consider unit basis for calculating resource costs #4122 2023-12-20 14:19:16 +01:00
Andrej730 73aeafb063 Fix issue renaming objects first time project was loaded after 962b8fa
E.g. if you load a project and try to rename some element to "test" it will renamed to "test" instead of "IfcWindow/test" e.g.

Since we relid on `obj.name` handler to set `.is_renaming` back to `False`, it didn't set it back to False when project was just loaded and renamed object was not yet linked to ifc element and name handler is not yet setup.

Another option was to check whether object is linked before changing `is_renaming` but just setting it to False should be more more explicit.
2023-12-20 16:51:02 +05:00
Kristoffer Andersen e06297940f Update ci.yml
Hopefully this fixes ccache
2023-12-20 12:28:24 +01:00
Andrej730 1652629332 prefix bim.assign/unassign_object to avoid operator override #4099
Co-Authored-By: Bruno Perdigão <57102715+brunoperdigao@users.noreply.github.com>
2023-12-20 13:51:26 +05:00
Andrej730 3d8de40407 Fix for 308457300
Co-Authored-By: Bruno Postle <bruno@postle.net>
2023-12-20 11:00:24 +05:00
ay-ex 308457300e fix cmake regex for used blender python version 2023-12-19 15:46:32 +05:00
Andrej730 6ef96841ac Temp disable setting paint_active_slot from external materials #4129 2023-12-19 14:38:23 +05:00
Andrej730 289b2d1e9d Less console errors if failed to find external styles library
Now:
```
Error: Error loading external style - cannot find file: 'D:\Dropbox\GitHub\OD_Textures\Closed (Encrypted)\Materials.blend'
```

Before:
```
File "\blenderbim\bim\module\style\prop.py", line 250, in update_shading_style
Error: Error loading external style - cannot find file: 'D:\Dropbox\GitHub\OD_Textures\Closed (Encrypted)\Materials.blend'
Traceback (most recent call last):
  File "\blenderbim\bim\module\style\prop.py", line 255, in update_shading_style
    bpy.ops.bim.activate_external_style(material_name=blender_material.name)
  File "L:\Games\SteamLibrary\steamapps\common\Blender\4.0\scripts\modules\bpy\ops.py", line 109, in __call__
    ret = _op_call(self.idname_py(), kw)
RuntimeError: Error: Error loading external style - cannot find file: 'D:\Dropbox\GitHub\OD_Textures\Closed (Encrypted)\Materials.blend'
```
2023-12-19 14:38:23 +05:00
Kristoffer Andersen 96db699ad2 Merge pull request #4125 from Krande/fix/convert-units
Proposal for updating IfcPatch ConvertLengthUnit.py for compatibility with boost>=1.82
2023-12-19 06:43:01 +01:00
Andrej730 6b7eec0db6 Fix #4124 2023-12-18 12:28:19 +05:00
Sigma Dimensions (Yass) 80f35d0bda Fix CSV workschedule import - handle date-related attributes more gracefully 2023-12-17 20:25:23 +01:00
Sigma Dimensions (Yass) df390a655d fix displaying derived task durations 2023-12-17 20:20:52 +01:00
krande 593fca7c3d remove ci-py-only.yml as ci.yml already does this 2023-12-17 18:42:15 +01:00
krande 9335c8a0c8 add test and update ci 2023-12-17 18:09:28 +01:00
krande eccc21277d update ci 2023-12-17 15:42:38 +01:00
krande 2ce7e16537 add fix for ci tests 2023-12-17 15:33:35 +01:00
Thomas Krijnen 49835ee303 nix build-all: don't strip non-release wrapper builds 2023-12-17 13:18:34 +01:00
krande f5500da0af remove ifc2x3 conditional in conversion utility 2023-12-16 14:18:13 +01:00
krande c9552fac29 update name of function to make its purpose more clear 2023-12-16 14:01:36 +01:00
krande b11b3b7fa8 update unit_assignment 2023-12-16 13:47:18 +01:00
krande 8aecee5836 initial proposal for updating units conversion 2023-12-16 13:37:38 +01:00
Bruno Postle 2f3b3011ec BlenderBIM IFC Git set push.autoSetupRemote
When pushing to a remote repository set tracking for the current branch
so that a locally created repository behaves the same (on the
command-line) as a cloned repository
2023-12-15 23:26:52 +00:00
Andrej730 491c9203b0 test for loading ifc with blob textures 2023-12-15 18:19:59 +05:00
Andrej730 7f2b996d23 test for loading ifc style to blender material 2023-12-15 18:19:59 +05:00
Andrej730 d2ea6f6656 BBIM to support loading IfcBlobTexture 2023-12-15 18:19:59 +05:00
Andrej730 25128e8aa8 support to add all surface style types creating new IfcSurfaceStyle
Previously it was working only for shading styles, for other styles it worked but then produced errors as IfcSurfaceStyle.Styles end up being None.
2023-12-15 18:19:59 +05:00
Dion Moult 30fa917e69 Patch recipes can now be performed in-place and are sorted in the UI. 2023-12-15 23:09:34 +11:00
Dion Moult 40e494996d Add support for manual classifications and references 2023-12-15 23:09:34 +11:00
Andrej730 cfdc54064e disable rel paths for adding ref images and textures with unsaved .ifc 2023-12-14 18:53:54 +05:00
Andrej730 6daead6b61 Fixed issues using relative paths for external styles
- removed redundant notion about saving .blend file
- relative paths were saved incorrectly
- fix issue using "bim.browse_external_style" if IfcSurfaceStyle already has external style and it's either .blend file or material in it is missing (it was failing opening file browser)
2023-12-14 18:47:55 +05:00
Andrej730 241d52f0ad small error message fix
as it appears as one of the messages during .ifc load, that way it will be more clear that it's related to external styles
2023-12-14 18:43:17 +05:00
Andrej730 68dd93da1d Fix issue BrowseExternalStyle not selecting current external style in file manager 2023-12-14 17:43:12 +05:00
Andrej730 82703670f0 Pull all shading related material attributes from external styles #4053 2023-12-14 17:42:17 +05:00
Dion Moult cb8462a0d0 New SetWorldCoordinateSystem patch. Autodesk software is starting to pay attention to this attribute which I find really confusing. 2023-12-14 17:02:00 +11:00
Dion Moult 000245c26c Nesting collections only generate for element nesting, not port nesting 2023-12-14 16:50:56 +11:00
Andrej730 d97ee8eed4 Support editing IfcSurfaceStyleLighting in UI 2023-12-13 16:57:23 +05:00
Andrej730 f8af28f12a 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
2023-12-13 16:53:58 +05:00
Andrej730 f6fab30d0a Support editing IfcSurfaceStyleRefraction in UI 2023-12-13 15:16:52 +05:00
Andrej730 f1a4ed702b Hide IfcStyledItem from bim.print_unused_elements_stats
as IfcStyledItem can be not referred by any other element and it doesn't mean it's not used in the project
2023-12-13 14:29:10 +05:00
Andrej730 c4080626df style.add_surface_texture to work without blender material provided 2023-12-13 14:07:48 +05:00
Bruno Postle a8078e38d2 Fix Clipping divide error (reported in #4057) 2023-12-12 22:15:59 +00:00
Andrej730 c52fe8abf9 data.py rename for consistency 2023-12-12 16:14:19 +05:00
Andrej730 b310b5aaba Remove old external styles UI from material in favor of general styles UI
Adding external styles from other styles now also moved to general styles UI - https://i.imgur.com/uEyjKVY.png
2023-12-12 16:12:55 +05:00
Andrej730 7246e75085 Fix after 2520a9305 2023-12-12 15:32:40 +05:00
Andrej730 48c0378bff Fixed #4105 2023-12-12 14:48:04 +05:00
Andrej 91c90e7b86 Merge pull request #4095 from c4rlosdias/v0.7.0 2023-12-12 14:09:14 +05:00
Thomas Krijnen 72abdb0569 Update build-all.py - py vers 2023-12-11 16:00:36 +01:00
Andrej730 7947ba4aaf Override some more blender scene panels #3842 2023-12-11 16:35:21 +05:00
Andrej730 2520a93055 Fix issues unregistering overridden panels
Previously overridden scene panels were removed but original panels were not restored.
Also added condition check for Blender version to generate list of panels to override, so we won't miss any errors using `try - except`.
2023-12-11 16:35:21 +05:00
Andrej730 fa480d99a2 Procedural override for default blender panels, hide keying panels #3842
also fixed the issue with default scene panels that were parented to other panels - because we didn't change `bl_parent_id` the panel structure for them was broken.
2023-12-11 16:35:21 +05:00
Bruno Postle 72c057e7a0 BlenderBIM user docs update after 6452872 2023-12-10 22:13:05 +00:00
Carlos Dias 61cfb361fa Update __init__.py
Fix bug
2023-12-08 11:09:28 -03:00
Andrej730 3786cfa666 Fixed issues with linked elements from linked blend files #4081
In #4081 reported the case when during redo (changing param in operator's popup) `Ifc.rebuild_element_maps` was relinking elements without discarding possible linked blender libraries. It end up accidentally linking some library's objects to the current Ifc file leading to errors.

Also fixed possible similar issue in couple other places.
2023-12-08 18:38:09 +05:00
Andrej730 cabc06821f test for tool.Blender.copy_node_graph #3876 2023-12-08 16:58:11 +05:00
Dion Moult f9fef4f5f6 Fix #4085. Classification reference URIs now have a button you can jump to that link. 2023-12-08 16:35:46 +11:00
Dion Moult 7c89d072e2 Fix #4086. Add support for non predefined bSDD pset and qto values. 2023-12-08 15:07:46 +11:00
Dion Moult dbb9e8c907 Fix #4092. Minor bug with bad detection of text literals when switching geometry. 2023-12-08 14:03:46 +11:00
Dion Moult 2df5b4c70e Fix #4090. Bug where profile set generator didn't accommodate optional axes. 2023-12-08 12:17:48 +11:00
Andrej730 a5aa608240 Fix reference images import after styles ui change 2023-12-07 18:09:17 +05:00
Andrej730 f7454366cc Representation Items UI - replace icon for active style
Now it's more consistent because we use the same icon is Styles UI
2023-12-07 18:09:17 +05:00
Andrej730 f773480917 style.edit_surface_style - fix crash setting attribute to None
Occured on setting IfcColourOrFactor attribute to None (e.g. DiffuseColour).
2023-12-07 18:09:17 +05:00
Andrej730 89f9cd0403 Styles UI - moved UI from shader graph N-panel to Styles UI #3912
Moved all shading style and textures parameters from shader-graph N-panel to general Styles UI. Shader graph now also update in real time on any prop changes in Styles UI.

Now there is practically no need to switch to shader graph to edit styles shaders - all parameters are available from the Styles UI. That also allows you to edit styles and see the results in viewport even if the edited style is not the one that's currently active.

small demo - https://imgur.com/a/i2suoZw
2023-12-07 18:09:16 +05:00
Martin15135215 b21159c6b3 add cff for ifcsverchok 2023-12-07 13:42:32 +11:00
Martin15135215 227f556669 add cff for serializers 2023-12-07 13:42:32 +11:00
Martin15135215 42bd69929c add cff for qtviewer 2023-12-07 13:42:32 +11:00
Martin15135215 a3532b24b3 add cff for ifcwrap 2023-12-07 13:42:32 +11:00
Martin15135215 5486c4c8e9 add cff for ifctester 2023-12-07 13:42:32 +11:00
Martin15135215 0259d4c0cd add cff for ifcpatch 2023-12-07 13:42:32 +11:00
Martin15135215 66c4c61dc2 add cff for ifcparse 2023-12-07 13:42:32 +11:00
Martin15135215 0f32ffe232 add cff for ifcopenshell-python 2023-12-07 13:42:32 +11:00
Martin15135215 72630de77a add cff for ifcmax 2023-12-07 13:42:32 +11:00
Martin15135215 9395bed72b add cff for ifcjni 2023-12-07 13:42:32 +11:00
Martin15135215 507a5cab83 add cff for ifcgeom_schema_agnostic 2023-12-07 13:42:32 +11:00
Martin15135215 a46a60996d add cff for ifcgeom 2023-12-07 13:42:32 +11:00
Martin15135215 3106168889 add cff for ifcfm 2023-12-07 13:42:32 +11:00
Martin15135215 7e0c0c5c83 add cff for ifcdiff 2023-12-07 13:42:32 +11:00
Martin15135215 19205c8774 add cff for ifccsv 2023-12-07 13:42:32 +11:00
Martin15135215 62b5f1d728 add cff for ifcconvert 2023-12-07 13:42:32 +11:00
Martin15135215 299df62758 add cff for ifcclash 2023-12-07 13:42:32 +11:00
Martin15135215 e58bfde500 Add cff for ifccityjson 2023-12-07 13:42:32 +11:00
Martin15135215 b60306cdbd add cff for ifcblender 2023-12-07 13:42:32 +11:00
Bruno Perdigão 61e0549e65 add_aggregate now add the empty using the 3d cursor location 2023-12-07 13:40:16 +11:00
Ryan Schultz 52ae759218 Added classification to selector 2023-12-07 13:39:42 +11:00
c4rlosdias 9b41614eff Update Load bSDD domains 2023-12-07 13:38:25 +11:00
Dirk Olbrich 58e01751c1 bbim-docs: add interface property editor section
- add stubs for each sub-tab
2023-12-07 13:19:46 +11:00
Dirk Olbrich 624134d033 bbim-docs: use figure with caption instead of plain image 2023-12-07 13:19:46 +11:00
Dirk Olbrich 22f83b68e4 bbim-docs: update workspace doc for sidebar panels 2023-12-07 13:19:46 +11:00
Dion Moult 1b35ea122e Implement support for managing nest hosts and components. 2023-12-07 13:19:29 +11:00
Ryan Schultz f1deefbcb3 Merge pull request #3969 from brunoperdigao/refactor-duplicate-aggregate
Refactor duplicate aggregate
2023-12-06 14:39:43 -06:00
Dion Moult d6c020b5ee Fix #4076. Fix bug where drawing activation priorities didn't match drawing generation priorities, and switching to a text literal representation failed. 2023-12-06 23:04:21 +11:00
Dion Moult ff4eddf38a Fix #4078. Bug in IfcTester that didn't allow certain facets to be used as applicabilities. Also canonicalise facet ordering for convenience. 2023-12-06 15:06:11 +11:00
Dion Moult 2b34dc4ce7 Fix bug in TessellateElements patch recipe where sometimes the patch would run forever. 2023-12-06 14:16:18 +11:00
Dion Moult 530260ebe7 Run black on cityjson2ifc 2023-12-05 09:54:38 +11:00
Dion Moult 594268c860 Fix two minor bugs in cityjson2ifc 2023-12-05 09:54:38 +11:00
Andrej730 e5fa8a01b4 fixed couple styles ui bugs
1) it was failing adding a new IfcSurfaceStyle if surface_style_class != Shading/Render as surface_style was not defined

2) It was never creating render material as IfcSurfaceStyleRendering class is a child of IfcSurfaceStyleShading and if statement never got to the is_a("IfcSurfaceStyleRendering") check
2023-12-04 17:38:22 +05:00
Andrej730 ad934cd9a6 Use paths relative to .ifc instead of .blend choosing texture paths
Texture path file dialog is also filtering image files now.

Removed subtype from `FILE_PATH` from all related props since `layout.prop()` for those props starts file dialog that cannot return path relative to .ifc. It can return path relative to .blend - though it can be processed in props update to convert to relative to .ifc, this doesn't allow setting relative paths if .blend is not saved. Therefore, I've created a separate operator.

add
2023-12-04 16:42:31 +05:00
Andrej730 92fe325816 Store reference images by relative paths #3447 2023-12-04 16:42:31 +05:00
Andrej730 818bb9c823 Fix normals for generic parametric stairs #4020
Also made concrete stair normals defined more explicitly.
2023-12-04 16:42:30 +05:00
Andrej d71fad988d Merge pull request #4071 from maxfb87/fix_clone_opening 2023-12-04 16:39:34 +05:00
Dion Moult ff0d6c810f Fix #4072. IDS reports now include filename. 2023-12-04 17:26:57 +11:00
Dion Moult 8b72929d22 Fix #4073. Objects with no applicable context for the drawing view are now hidden. 2023-12-04 12:47:07 +11:00
Bruno Postle 6452872e83 BlenderBIM IFC Git allow branch creation from HEAD
Previously you could only create branches by checking out an older
revision, making changes and committing it. This was an annoyance as
typically you are making changes to the HEAD of a branch, then you
realise this should have been a branch - now you can create the branch
on commit (#3096)
2023-12-03 16:15:09 +00:00
Ryan Schultz 88d2c61453 Merge pull request #3906 from IfcOpenShell/si_unit_w_cad_tools
allow SI with CAD tools.
2023-12-03 09:59:14 -06:00
Bruno Postle f777be6403 BlenderBIM IFC Git fix typo in function name 2023-12-02 23:59:07 +00:00
Massimo Fabbro 9aad249586 fix #3834. Now clone opening produces valid IFC files 2023-12-02 17:38:28 +01:00
Thomas Krijnen 7168f8eeff #2796 don't fail on null guid for rooted element deletion 2023-12-01 15:49:31 +01:00
Andrej730 da306c6141 Reference images attached to the drawings #3447
You can also save them as annotation types.
Example - https://imgur.com/a/6trT7SZ
2023-12-01 17:05:02 +05:00
Andrej730 e53c0b74b1 bim.update_representation to save non-body representations styles #3447 2023-12-01 16:53:50 +05:00
Andrej730 cb2f58ba0f Fixed issue importing drawing's IfcAnnotations with styles #3447 2023-12-01 16:53:50 +05:00
Andrej730 c0c7727f36 fix poll errors 2023-12-01 16:53:50 +05:00
Andrej730 60526e62b4 Revert "Minor fix - remove redundant code"
This reverts commit 7828508179.

Turned out when I was assuming `bim.add_style` is assigning the style but it wasn't, it was `bim.update_representation` on the file save. So basically during the session style wasn't assigned, therefore I added back explicit style assignment. 😬
2023-12-01 16:53:50 +05:00
Andrej730 496e58418a fixed typo 2023-12-01 16:53:50 +05:00
Thomas Krijnen b976ad3880 occ_utils.py - #1037 2023-12-01 12:42:09 +01:00
MicheleBenedetti 31a763fe12 mistype-fix 2023-12-01 10:34:11 +11:00
Andrej730 93ef2d0349 Fixed issues applying arrays
because pset wasn't removed BBIM was recognizing those elements as parts of an array resulting in issues during deletion and duplication. This issue is a regression after ec4f0e5, the root problem was that `keep_objs` wasn't working with `sync_children`.

Since `keep_objs` was used only for applying array layers I've replaced it with `array_layers_to_apply` that works for both `sync_children` = True and False.

https://community.osarch.org/discussion/1831/duplicating-failed-for-array-items-after-apply-array
2023-11-30 16:24:39 +05:00
Andrej730 7828508179 Minor fix - remove redundant code
style assignment was already done by `bim.add_style`
2023-11-30 10:41:57 +05:00
Dion Moult 7aa6be8e8a FixRevitTINs patch now also flips normals for surface TINs instead of solid TINs.
Minor fixes to use view_layer.object.active etc instead of context.active_object when running via Blender UI (it seems when you run the patch recipe from the Blender UI at least in later versions, context does not have an "active_object" property.
2023-11-30 14:58:32 +11:00
Andrej730 0679956add bim.add_reference_image #3447
Added operator to load image references as planes that will be stored in IFC.

Button location - https://i.imgur.com/L87BPyX.png
Example - https://imgur.com/a/JJXyU6C
2023-11-29 17:23:27 +05:00
Andrej730 b86f924543 move all operators added to "add mesh" menu to common method in ui.py 2023-11-29 15:12:33 +05:00
Dion Moult 962b8fac67 Fix #4049. New basic "regenerate occurrence name" operator. 2023-11-29 17:36:59 +11:00
Dion Moult fdcb705551 Fix #4054. You can now select objects based on diff results. 2023-11-29 16:27:20 +11:00
Dion Moult b80ca3c167 See #4054. Diffing now allows partial loading of changed elements to make it easier to visualise without loading and linking two models. 2023-11-29 15:57:59 +11:00
Dion Moult e8bd272189 Fix #4057. Data objects for the API are now in util.data instead of mixed into the shape builder utility and only depends on numpy. 2023-11-29 14:36:01 +11:00
Bruno Postle 25bd94e84a minor documentation typo fix 2023-11-28 23:28:38 +00:00
Bruno Postle 5face7170f Fix python 3.12 SyntaxWarning (#4045)
Regular expressions now need to be double-escaped:
https://docs.python.org/3/whatsnew/3.12.html#other-language-changes
2023-11-28 22:51:58 +00:00
Dion Moult 434a11a502 Fix #4057. Move clipping info dataclass to util.shape_builder 2023-11-29 09:28:24 +11:00
krande eb91f5179b suggested change of ifcwrap pythoninterpreter function to no longer rely on distutil (which is deprecated in python 3.12). 2023-11-28 15:03:31 +01:00
Andrej730 c6643da4ba created uv map to have constistent name with Blender uvs
Previously it was named "Float2"
2023-11-28 16:01:10 +05:00
Andrej730 18c93a13ec moved load_texture_map to tool.Loader, added a test 2023-11-28 15:53:40 +05:00
Andrej730 7cb582de5d bim.save_uv_to_style - experimental operator to save current uv to ifc
it's very limited and covering very little cases now. It works only for IfcPolygonalFaceSets representations that consists of triangles.

Short example - https://imgur.com/a/1AxunSN
2023-11-28 15:53:40 +05:00
Andrej730 a5bb458d3d fixed issue importing uv failing for some IfcPolygonalFaceSets
It was failing with IfcIndexedTriangleTextureMap + IfcPolygonalFaceSet
2023-11-28 15:34:21 +05:00
Andrej730 c7f6a5e621 fixed issue importing uv on non meters projects 2023-11-28 12:17:31 +05:00
Andrej730 141e0240d4 fixed issue settings style blender props if there are not texture style 2023-11-28 12:17:30 +05:00
Andrej730 15cd2b6075 fixed issue with importing ifc objects with uv after 03a6ee912 2023-11-28 12:17:30 +05:00
Dion Moult fab8b5b702 Fix #3059. Implement IfcTester prohibited string templates (taking into account double negatives) 2023-11-28 17:20:20 +11:00
c4rlosdias 844f4c4944 Update IfcTester and Tester module of Blenderbim 2023-11-28 16:48:19 +11:00
Dion Moult 03809b3d5e Fix #3996. Reassigning occurrences or types now also reassigns the correlating occurrence or type. 2023-11-28 16:44:31 +11:00
Dion Moult 3e268be5c7 Fix #4052. Bug where invalid plane was generated due to missing X axis. 2023-11-28 11:52:56 +11:00
Dion Moult 6e932ec2fb Fix #3974. Bug where orphaned histories would be left in API remove operations. 2023-11-28 10:46:03 +11:00
Kristoffer Andersen 58414777be Update installation.rst
add more information about conda package installation
2023-11-27 10:25:11 +01:00
Dion Moult 14f1acadb7 See #3974. WIP review to ensure history removal in API. 2023-11-27 18:31:55 +11:00
Andrej730 f215670381 Small styles UI tweaks
- fixed a typo in bim.select_by_style
- added note to clarify what Shade/Render/Texture/Lighting/etc buttons do and moved style selection block at the beggining (maybe it's just me but when edit buttons are above selection ui it seemed like they affect all the styles somehow, not just the currently active one), so it will be more intuitive

Before:
https://i.imgur.com/jRSTLGI.png

After:
https://i.imgur.com/8ih4qSX.png
2023-11-27 12:29:28 +05:00
Andrej730 11df5065e4 bim.validate_ifc_file to detect if there where no validation errors 2023-11-27 11:18:38 +05:00
Dion Moult ed47b6b227 Fix #4044. Bug where object in camera view algorithm was wrong. Simplied to simple AABB test. 2023-11-25 16:02:51 +11:00
Andrej730 6216ee9a98 Fixed issue duplicating IfcRelSpaceBoundary #4043 2023-11-24 20:37:23 +05:00
Andrej730 848d6b294e Fixed console errors with BIM Tool when boundary object is selected 2023-11-24 20:24:25 +05:00
Andrej730 795a372ac9 test creating surface style without IFC entities 2023-11-24 16:49:02 +05:00
Andrej730 03a6ee9121 BBIM Shader Graph Settings - setting uv mode for the textures
Now you can set UV mode that will be used to sample textures (previously it was always using UV data on geometry or breaking if it was otherwise). Basically now you can use autogenerated UV for the objects without UV.

https://i.imgur.com/WtYdpmU.png

Removed BIMMaterialProperties.ifc_coordinate_id as it was only used during the ifc_import and maintained by the `Loader.create_surface_style_with_textures` which is also used to update live shader graph that not always have specific IFC id for the UV.
2023-11-24 15:52:31 +05:00
Andrej730 5299a9d8a2 Fixed issue updating texture style for non-faceset representations 2023-11-24 15:24:56 +05:00
Kristoffer Andersen a5d5d72064 Update meta.yaml
add python version to conda build string
2023-11-24 09:29:34 +01:00
Kristoffer Andersen b6f2a76385 Update ci-ifcopenshell-conda-daily.yml
add anaconda-client to the mamba env dependencies
2023-11-24 08:30:05 +01:00
Dion Moult ea6c8fe2f8 Fix #4027. Fix regression where S-D or A-D hotkeys didn't follow vanilla Blender behaviour from 81a1bd9 2023-11-24 15:09:29 +11:00
Dion Moult c7268b6f42 Fix #4037. IfcTester reports now also include an element type column. 2023-11-24 14:44:28 +11:00
Dion Moult 5937ed4b63 Fix #4034. Bug where abstract pset template applicabilities didn't apply to occurrences as well as types. 2023-11-24 14:02:27 +11:00
Bruno Postle 8f650c56e5 Revert 1d972a6 as no datetime.UTC on CI server 2023-11-23 21:59:23 +00:00
Bruno Postle 1d972a6a6f 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).
2023-11-23 21:16:24 +00:00
Bruno Postle 70a1d7d345 python api documentation fix 2023-11-23 21:15:24 +00:00
Kristoffer Andersen 519d59effe Update ci-ifcopenshell-conda-daily.yml 2023-11-23 20:38:11 +01:00
Kristoffer Andersen 7f5f67b131 Update meta.yaml 2023-11-23 20:35:28 +01:00
Kristoffer Andersen 8c64d9ddcc Update ci-ifcopenshell-conda-daily.yml
Update repo activation
2023-11-23 17:23:01 +01:00
Kristoffer Andersen 397f333db0 Merge pull request #4041 from Krande/v0.7.0-conda/update
V0.7.0 conda/daily-builds-update
2023-11-23 17:17:16 +01:00
krande b01bd8afb3 only modify windows in CMakeLists.txt 2023-11-23 16:05:00 +01:00
krande 1dd8624825 need to use a push trigger on fork (dispatch is not allowed on PR from forks it seems). 2023-11-23 15:55:23 +01:00
krande bc0c2e641b make modifications to support conda hdf5 1.14 in CMakeLists.txt 2023-11-23 15:51:41 +01:00
krande f5f68ea150 add a workflow dispatch trigger (lets you click a button in the github actions workflow panel to start a new build) 2023-11-23 15:39:24 +01:00
krande 76ce117b46 test one more time on my fork before merging 2023-11-23 15:37:41 +01:00
krande 52cad9d11c pin windows hdf5 to 1.12
windows hdf5 1.14 results in ninja: error: 'libhdf5_cpp.lib', needed by 'IfcConvert.exe', missing and no known rule to make it
2023-11-23 15:30:41 +01:00
krande 58af81e256 drop "all" variant for now. Will include if people request it. 2023-11-23 15:17:59 +01:00
krande fc2da4ee8f add conda-forge as a channel 2023-11-23 15:11:46 +01:00
krande c04fa12051 add mamba env name 2023-11-23 15:09:24 +01:00
krande 623d2b5be1 add matrix variant to workflow name and do not use conda env yml file 2023-11-23 15:06:56 +01:00
krande 46319634fb run it once on fork 2023-11-23 15:05:17 +01:00
krande 91d2e5ccd1 add novtk/all variants to daily builds 2023-11-23 14:58:34 +01:00
Bruno Perdigão d23e32c64a added report messages 2023-11-23 10:57:17 -03:00
Kristoffer Andersen 764efa1fed Update ci-ifcopenshell-conda-daily.yml
add missing multiline flag for condarc setup
2023-11-23 14:33:10 +01:00
Kristoffer Andersen b051adcc6c Update ci-ifcopenshell-conda-daily.yml
change from deprecated mamba provisioner and move to python 3.11 and 3.12
2023-11-23 14:31:53 +01:00
Bruno Perdigão b815719477 added the option to refresh different groups of linked aggregate 2023-11-23 10:27:54 -03:00
Gorgious56 0612d2b615 You can now select the same ifc classes and match predefined types with SHIFT + Clicking the "Select Ifc Class" button 2023-11-23 09:52:37 +01:00
Andrej730 0da210b732 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
2023-11-23 13:43:39 +05:00
Dion Moult 9429e478fe Fix #3691. Add toggle for power users to disable the BIM toolbar if an IFC isn't loaded. 2023-11-23 14:59:26 +11:00
Dion Moult 2f6c50d9c2 New style manager supports basic editing of externally defined surface styles 2023-11-23 13:17:33 +11:00
Dion Moult 640341715c Minor IfcPatch doc fix where examples had a missing argument 2023-11-23 12:07:29 +11:00
Dion Moult 42878e325e Minor fix to "select multiple IFC class" implementation 2023-11-23 11:18:04 +11:00
Dion Moult ac5cf95f9e IfcFM panel now autodetects available engines with names and descriptions 2023-11-23 11:00:10 +11:00
Ryan Schultz c9189055c7 Select all objects from multiple selected classes 2023-11-22 10:47:04 -06:00
Andrej730 6a08993f5e fill userdefined type field during reassigning IFC class #4034
to avoid confusion
2023-11-22 15:01:36 +05:00
Andrej730 df2a50b335 store path to bcf in Blender file to reaccess it on Blender restart
Previously it was throwing errors if load .bcf and then restart Blender, since it was just trying to reaccess file in BcfStore.bcfxml which is gone after Blender restart. Now we store filepath to bcf in Blender properties to reload it after Blender restart.

Removed BCFProperties.is_loaded as it won't be possible to rely on it after Blender restart - after restart it will still indicate that file is loaded and it won't be possible to change it from .poll and .draw if file is gone.
2023-11-22 11:55:07 +05:00
Dion Moult c7543ff48d New graphical element filtering UI for drawing filters that lets you also use saved searches. 2023-11-22 15:33:30 +11:00
Dion Moult 1f75fa09ae If there is a Blender offset, show the non-offset placement in the placement panel 2023-11-22 11:32:14 +11:00
Dion Moult 94ce8e2c9c Fix bug when loading IFC with unsupported reflectance method (even though we don't fully support them yet) 2023-11-22 11:00:47 +11:00
Dion Moult 85e94d2cfc Move georeferencing calculator panel until scene georeferencing panel.
Slowly all the N sidebar panels should be moved away.
2023-11-22 11:00:47 +11:00
Andrej730 c2b332da48 BCF Viewpoint - clear selection before hiding IfcSpaces #4031 2023-11-21 22:12:26 +05:00
Andrej730 6ee4edd0a0 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.
2023-11-21 12:35:35 +05:00
Dion Moult 0d757027e3 Fix critical georeferencing autodetection regression due to refactor of new context filters. 2023-11-21 15:10:01 +11:00
Dion Moult 9ffe56e64d Improve geometry guessing to also check placements of random sample of elements (not just site and building), not just geometry 2023-11-21 14:21:09 +11:00
Dion Moult 37a9a1b5d9 New IfcPatch recipe to tessellate elements to account for bugs in other vendors. 2023-11-21 14:21:09 +11:00
Dion Moult c30c9d50c9 Fix missing LGPL license blocks in IfcPatch 2023-11-21 14:21:09 +11:00
Bruno Perdigão 8e64b55290 bugfix in recreate_aggregate 2023-11-20 22:05:41 -03:00
Bruno Perdigão b45001a95a fix conflicts 2023-11-20 18:40:17 -03:00
Bruno Perdigão fd65009f5a Refresh Linked Aggregate now handles multiple selection 2023-11-20 18:34:46 -03:00
Bruno Perdigão 52036e9bd4 merged the branch 'improvements-on-override-duplicat' 2023-11-20 16:38:10 -03:00
Bruno Perdigão 5399767898 Merge branch 'improvements-on-override-duplicate' into refactor-duplicate-aggregate 2023-11-20 16:24:16 -03:00
Bruno Perdigão f96d477d2b Groups are only added to the parent. Parts now have a pset with index 2023-11-20 16:23:34 -03:00
Andrej730 d5f3991d06 Fixed more overlooked context overrides... #3876 2023-11-20 15:13:54 +05:00
Andrej730 2f2e81f585 Fixed #4026 related to #3876 2023-11-20 14:47:06 +05:00
Andrej730 0b7442b288 Move code using ui index from data to ui #4028
As UI indices changes doesn't trigger data.py updates and information on screen is not synced with the active item anymore.
2023-11-20 12:24:06 +05:00
Dion Moult 229c7285c2 Add support for loading nested elements and consider nesting for indirect spatial containment. 2023-11-20 16:57:38 +11:00
Dion Moult 4fb99d2eed Don't unnecessarily merge materials which can be very computationally consuming on file loads (e.g. from software like Solidworks) which will be made redundant now that a new materials/style management system is WIP. 2023-11-20 16:57:38 +11:00
Dion Moult 123557939f New ConvertNestToAggregate patch recipe 2023-11-20 16:57:38 +11:00
Bruno Postle 3c396d3180 IfcGit.load_project() can be used to refresh scene
If no file path is given, clear blender objects and regenerate
the scene from the current ifc project in IfcStore
2023-11-19 10:49:58 +00:00
Massimo Fabbro 5d39603308 fix #4011. More precise IfcRoof qto calculator 2023-11-17 16:39:29 +01:00
Massimo Fabbro b792673f88 Minor fix 2023-11-17 16:14:08 +01:00
Massimo Fabbro cf65612a96 Covering Tool: fixed bug if the project is defined in units different from SI units 2023-11-17 16:14:08 +01:00
Andrej730 50bbe849ff minor fix to support union typing before python 3.10 #3774 2023-11-17 18:57:51 +05:00
Andrej730 dc438b2560 ClippingInfo util class to pass and apply plane clippings #3774
Co-Authored-By: Carlos Villagrasa <carvillasil@gmail.com>
2023-11-17 16:52:59 +05:00
Andrej730 6750dd927c 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
2023-11-17 12:30:34 +05:00
Andrej730 9fb1986cad minor fix - clean up after debug 2023-11-16 19:26:12 +05:00
Andrej730 60f8d30fc1 Tests for connecting mep elements and regenerating them
Also:
- fixed bug with bim.mep_connect_elements not considering actual blender blender object's position
- moved syncing ifc position with blender object position to tools (sync_object_ifc_position)
- fixed a bug in adding a bend that occured if either any of the start/end points of the start/end segments matched - in that case one of the segments end up not connected to the bend
2023-11-16 19:15:56 +05:00
Ryan Schultz 67be2e8ce8 Refresh different types of aggregates at one time 2023-11-15 21:40:15 -06:00
Andrej730 2557580500 Fixed error importing .ifc that has element aggregated by ifcproject
In case if some element (not another aggregate) was aggregated by IfcProject directly, importing IFC was resulting in error below since the project's collection was never added to `self.collections`.

Traceback:
```
  File "\scripts\addons\blenderbim\bim\module\project\operator.py", line 732, in execute
    ifc_importer.execute()
  File "\scripts\addons\blenderbim\bim\import_ifc.py", line 292, in execute
    self.place_objects_in_collections()
  File "\scripts\addons\blenderbim\bim\import_ifc.py", line 1668, in place_objects_in_collections
    self.place_object_in_collection(self.file.by_id(ifc_definition_id), obj)
  File "\scripts\addons\blenderbim\bim\import_ifc.py", line 1672, in place_object_in_collection
    self.place_object_in_decomposition_collection(element, obj)
  File "\scripts\addons\blenderbim\bim\import_ifc.py", line 1689, in place_object_in_decomposition_collection
    return self.collections[aggregate.GlobalId].objects.link(obj)
KeyError: '2bKVb8E7L6e89EQYJUk8BM'
```
2023-11-15 18:33:20 +05:00
Andrej730 c0d2ac6ff9 Assigning product from selected objects #4015 2023-11-15 17:12:08 +05:00
Dion Moult 52c168051e Revert "You can now override custom category element functions in IfcFM"
This reverts commit 8a63275db0.
2023-11-15 17:19:10 +11:00
Dion Moult e072da8d65 Minor alignment of Basic FM preset to IFC property naming 2023-11-15 16:47:42 +11:00
Dion Moult 8a63275db0 You can now override custom category element functions in IfcFM 2023-11-15 16:35:46 +11:00
Dion Moult 69be3a005c Minor bug fix to COBie 2.4 space descriptions 2023-11-15 15:59:24 +11:00
Dion Moult ad9ad3f060 Purge data recipe now also purges shape aspect names and layers. 2023-11-15 14:22:21 +11:00
Bruno Perdigão f0e5304b8e fix conflicts merging with v0.7.0 2023-11-14 11:58:35 -03:00
Andrej730 c6454803ee fixed issue adding bend between segments located at the same point
also added some tests
2023-11-14 17:18:57 +05:00
Andrej730 e8aa8c44e5 Fixed issue with UI for types withotu PredefinedType after 1621449
Noticed the issue adding IfcFurnitureType in IFC2x3

```
Traceback (most recent call last):
  File "\Blender\4.0\scripts\addons\blenderbim\bim\module\model\workspace.py", line 71, in draw_settings
    BimToolUI.draw(context, layout, ifc_element_type="all")
  File "\Blender\4.0\scripts\addons\blenderbim\bim\module\model\workspace.py", line 230, in draw
    AuthoringData.load(ifc_element_type)
  File "\Blender\4.0\scripts\addons\blenderbim\bim\module\model\data.py", line 56, in load
    cls.data["predefined_type"] = cls.predefined_type()
  File "\Blender\4.0\scripts\addons\blenderbim\bim\module\model\data.py", line 258, in predefined_type
    predefined_type = relating_type.PredefinedType
  File "\Blender\4.0\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\entity_instance.py", line 191, in __getattr__
    raise AttributeError(
AttributeError: entity instance of type 'IFC2X3.IfcFurnitureType' has no attribute 'PredefinedType'
```
2023-11-13 16:56:58 +05:00
Andrej730 48b237ab54 New context override method for setting viewport tools #3876 2023-11-13 15:51:50 +05:00
Andrej730 608b3e5401 DumpSlabPlaner.change_thickness to use si units #4004
It was providing project units to `geometry.add_slab_representation` resulting and then they were converted to project units once again during `geometry.add_slab_representation`.
2023-11-13 15:38:08 +05:00
Andrej730 c5d38227fc black format 2023-11-13 14:25:34 +05:00
Andrej730 e98ff136c2 Merge two Services sections in Services and Systems tab #4001
Two similar sections were needed in the old ui before we added tabs
2023-11-13 14:25:09 +05:00
Ryan Schultz 02ebc80525 closes #4006: automatically update the geometry of all the objects that have 'similar openings'. 2023-11-12 12:39:44 -06:00
Ryan Schultz 66431158b5 fixes #3908: Close the opening (bim.edit_openings) while having the opening selected 2023-11-12 10:11:13 -06:00
VDobranov dd044c8516 Update reference_structure.py
A mistype in docs: should be IfcRelReferencedInSpatialStructure instead of IfcRelContainedInSpatialStructure
2023-11-11 12:56:26 +01:00
Massimo Fabbro 55763ea7df Covering Tool now it is possible to add ceiling coverings from selected walls 2023-11-10 22:19:47 +01:00
Andrej730 8fe92e810f show mep regenerate and connecte elements for non-profile based elements 2023-11-10 16:28:44 +05:00
Andrej730 c26988b292 root.remove_product to remove IfcRelFlowControlElements 2023-11-10 12:10:22 +05:00
Andrej730 46e70c92c5 fixed issues with ports ui on undo
data.py doesn't update on every undo, so passed blender objects got invalidated on undo resulting in errors. changed blender objects to blender object names
2023-11-10 11:39:49 +05:00
Andrej730 325c3665d9 UI for assigning controls to flow elements #3981
Example - https://imgur.com/a/CZQIoHp
2023-11-10 11:18:52 +05:00
Andrej730 9a80dc14e9 api for assigning/unassigning flow controls #3981 2023-11-09 17:34:26 +05:00
Andrej730 6bda066e1b Fixed typo in control.assign_control, added tests 2023-11-09 15:33:31 +05:00
Andrej730 912b01587b tool.System.add_ports tests 2023-11-08 18:01:30 +05:00
Andrej730 5d4d953320 fixed issue placing ports on a bend if start segment is bending using Z- 2023-11-08 16:54:05 +05:00
Andrej730 11ed8cc787 fixed issue in add_ports mutating object's matrix
inherently modifying ports positions in some cases
2023-11-08 16:49:31 +05:00
Dirk Olbrich d1a7b99eda bbim docs: add user interface subsection, general workspace 2023-11-08 22:12:40 +11:00
Dirk Olbrich 85bdeaeef4 bbimdocs: reorder images folder in users section 2023-11-08 22:12:40 +11:00
Dirk Olbrich a5f0de4d19 bbim docs: reorder images folder in dev section 2023-11-08 22:12:40 +11:00
Dirk Olbrich cb3392ec70 bbim docs: use absolute path for icon images 2023-11-08 22:12:40 +11:00
Dirk Olbrich 1dbe42061d bbim doc: fix list indentation 2023-11-08 22:12:40 +11:00
Dirk Olbrich a024d5c07f bbim docs: fix minor warning in ux-guidelines 2023-11-08 22:12:40 +11:00
Dirk Olbrich ea5e3c30b6 bbim docs: update bbim version, copyright year 2023-11-08 22:12:40 +11:00
Andrej730 ebfc8ef619 remove BIMGroupProperties.is_adding attribute to avoid confusion
The problem with that attribute was that object's and project's group ui section were both using groups loaded to BIMGroupProperties.groups.

So you could run into situation when you try to load object's groups ui and it would show empty list because user never loaded the groups from the project's ui...

So it was either caching groups twice or just using same `is_editing` flag to check whether groups were previously loaded and I went with the single flag.
2023-11-08 15:13:49 +05:00
Andrej730 c0d8467154 define inherited ports attributes in bim.add_constr_type_instance 2023-11-08 14:19:36 +05:00
Andrej730 d0adbab9c2 fixed issue finding finding compatible fitting
it occured sometimes when segment's or fitting's PredefinedType/System were not defined
2023-11-08 12:21:50 +05:00
Andrej730 8e80f456cb fixed bug with system decoration data if no system were selected 2023-11-08 11:50:05 +05:00
Bruno Perdigão 61bd98e7db moved 'recreate_assembly' to tool/root.py 2023-11-07 18:28:43 -03:00
Bruno Perdigão 4bf0d9ccff added more tests 2023-11-07 18:19:42 -03:00
Bruno Perdigão 1e36ac8740 removed the pset and added group to all elements 2023-11-06 21:38:06 -03:00
Bruno Perdigão af864e8556 added test scenario for duplicating an aggregate 2023-11-06 12:15:31 -03:00
Andrej730 8cd9fb9015 test stairs calculated params 2023-11-06 15:56:33 +05:00
Andrej730 d9fdc0908a Nosing Lengths / Tread Gap for parametric stairs #3422
Example - https://imgur.com/d8PxLV4
2023-11-06 15:35:14 +05:00
Ryan Schultz a218ce5160 Select multiple arrays at one time, from various parts. Deselect non-compliant objects. 2023-11-04 11:35:30 -05:00
Igor.Sokolov b3a6b8e07f bf: IfcBSplineCurve is an isntance of abstract entity 2023-11-04 15:41:38 +01:00
Igor.Sokolov 52700452d9 bf: pass-valid-selected-enumeration.ifc 2023-11-04 15:41:38 +01:00
Igor.Sokolov aab011f7bf bf: pass-group-1-rels-IFC2X3.ifc failed 2023-11-04 15:41:38 +01:00
Igor.Sokolov 5f129e2357 bf: pass-attr-count-ok.ifc failed 2023-11-04 15:41:38 +01:00
Dion Moult 4e76f36af1 Black 2023-11-04 16:07:40 +11:00
Dion Moult 6f3ff51d91 Docs now mention historic builds 2023-11-03 22:45:42 +11:00
Dion Moult 0de0422c2e Minor fix 2023-11-03 22:45:42 +11:00
Andrej730 98de86e0ba Customize tread width for the first and last treads #3419
Available on all types of stairs, shouldn't break stairs previously created with BBIM.
Example - https://imgur.com/a/2wSueTM
2023-11-03 16:32:14 +05:00
Andrej730 142e41b3ad minor refactor 2023-11-03 16:32:14 +05:00
Andrej730 1e0dc7749d add force depsgraph update method 2023-11-03 16:32:14 +05:00
Andrej730 0f29de0391 skip black format on type manager template description for readibility 2023-11-03 16:32:14 +05:00
Andrej730 9933cc1b20 stair profile generation code refactor
hopefully it's now a bit more readable
2023-11-03 16:32:14 +05:00
Andrej730 fa6192e9bc Fixed stair calculated params not updating during edit (after 8b23c615c)
.data doesn't update on props change, so need to take data from props explicitly when BIMStairProperties.is_editing
2023-11-03 16:32:14 +05:00
Andrej730 bfd4559da8 move generate_stair_2d_profile to tool, add tests 2023-11-03 16:32:14 +05:00
ceegartner 01f52e069e 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!
2023-11-03 11:47:44 +01:00
Dion Moult 2fbc9e4424 Forgot rabbit branding. 2023-11-02 15:15:04 +11:00
Dion Moult ba97da20eb New data purging IfcPatch recipe 2023-11-02 14:59:18 +11:00
Dion Moult 44f5be142f Fix #3963. Bind IFC separate to P hotkey and prevent separation on non-IFC meshes. 2023-11-02 13:03:56 +11:00
Dion Moult 2f951d352b Fix #3948. Bug where IfcTester PartOf facet didn't correctly read entity XML. 2023-11-02 12:29:05 +11:00
Andrej730 8b23c615c3 Fix issue with calculated params in stair ui
it was displaying incorrect data when stair was just loaded because it was relying on BIMStairProperties in ui.py
2023-11-01 17:33:38 +05:00
Dion Moult 7c694e5b3e Fix #3951. mats selector now supports IfcMaterialList. 2023-11-01 22:48:31 +11:00
Dion Moult 8eeb212003 See #3951. IfcCSV now supports list concatenation. 2023-11-01 22:47:30 +11:00
Dion Moult 7bf8d58cde Improve data type error reporting 2023-11-01 22:23:55 +11:00
Dion Moult b6e24559e5 Fix #3961. Improve UI so setting null now clears the value. 2023-11-01 18:04:44 +11:00
Andrej730 0d87d5927e bim.select_all_array_objects not to clear previous selection #3960 2023-11-01 10:53:25 +05:00
Dion Moult dfd5cc4728 See #3953. Fix bug where IDSes with a single enumeration value didn't validate. 2023-11-01 16:28:42 +11:00
Dion Moult 20b7ee009d Fix #3957. Fix bug where shared properties were not edited independently. 2023-11-01 15:18:57 +11:00
Dion Moult 19a3f56941 Fix #3958. Bug where reassigning type class would incorrectly assign occurrence classes. 2023-11-01 14:41:25 +11:00
Dion Moult 3b298d44c1 Fix regressions in mapped native swept disk handling 2023-11-01 14:16:12 +11:00
Andrej730 038d3bc41c fix future warning for xml.etree
The warning was: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
2023-10-31 16:24:41 +05:00
Andrej730 235e89ae14 remove blf.size deprecated dpi argument #3876
turn out it wasn't working for awhile now and in Blender 4.0 was completely removed
2023-10-31 16:19:42 +05:00
Andrej730 e2de9efc33 Move new Blender 4.0 Simulation section to Scene/Blender tab #3876 2023-10-31 15:57:54 +05:00
Andrej730 8126085037 Warning message on copying node graph on Blender 4.0+ #3876
As we're still looking for a workaround
2023-10-31 15:38:57 +05:00
Andrej730 bbe14834e4 Remove 3D shaders prefix #3876
In Blender 4.0 3D_* shaders are called without "3D_" prefix, otherwise it throws an error. Tested on Blender 3.6 - they work without "3D_" prefix too.
2023-10-31 15:27:43 +05:00
Andrej730 45f2d301b3 More context override fixes #3876 2023-10-31 15:18:33 +05:00
Andrej730 2ecd11d71f fixing test after 0d0b91e 2023-10-31 15:18:33 +05:00
Gorgious56 b42f072bd5 You can now eyedrop an object in the viewport to copy container when editing container 2023-10-31 11:14:54 +01:00
Ryan Schultz 3b3668eedf More IFC class suggestions 2023-10-30 22:51:55 -05:00
Dion Moult 7f7f353131 Disable batching for removal as it doesn't seem to help mostly from experience. Still testing. 2023-10-31 12:31:05 +11:00
Dion Moult 53594de1ff See #3955. PyPI release now specifies compatible Python versions. 2023-10-31 08:32:51 +11:00
Gorgious56 4fbbfb5191 You can now eyedrop an object in the viewport to copy class and predefined type when reassigning class 2023-10-30 15:04:37 +01:00
Gorgious56 4e1daea838 Clicking on an entry in the search field popup automatically validates and closes the popup
No need to click on "OK" anymore.
This is not a hacky workaround using the mouse position, it uses a signal sent to Blender to close the active popup
See https://blenderartists.org/t/programatically-close-pie-menu-2-79/1488807/2
re-committing since it seems I commited to the wrong branch last week
2023-10-30 14:19:01 +01:00
Andrej730 d8ff83da73 Replacing old context override method #3876 2023-10-30 15:14:34 +05:00
Andrej730 a7712a923f setup_pytest to find site-packages folder near sys.executable
Used to get errors running setup_pytest.py having python 3.10 installed on my pc (`sys_paths[-1]` was the system's python folder, not the blender's python).
2023-10-30 15:14:34 +05:00
Andrej730 01b5f8f237 Fixed #3949 2023-10-30 11:27:55 +05:00
Dion Moult b9ad15c50f Minor fix to Uniclass classification 2023-10-30 09:31:00 +11:00
Thomas Krijnen db06cff997 Update test file for case insensitivity. Thanks Igor. 2023-10-29 14:35:14 +01:00
Dion Moult f0028c0094 get_footprint_area now unions 2D polygons to prevent double counting 2023-10-28 15:54:45 +11:00
Dion Moult 1c954801b0 Fix #3939. Bug where IfcLabel data type was incorrectly used for longer text data. 2023-10-28 14:44:41 +11:00
Ryan Schultz 973e4f0064 Updated default JoinCriteria to accommodate new facet selector for statuses. 2023-10-27 11:24:49 -05:00
Andrej730 be5d291bd9 test creating mep transition 2023-10-26 17:21:42 +05:00
Andrej730 cbec56c2f0 ifc2x3 pset library - fix bunch of unit related vlaidation errors #3929 2023-10-26 15:54:34 +05:00
Dion Moult 880d0ba753 Minor fixes 2023-10-26 13:08:30 +11:00
Dion Moult db85689364 Add support for latest uniclass and add Uniclass July 2023 2023-10-26 13:08:30 +11:00
Sigma Dimensions (Yass) 48a0d8c508 fix displaying undefined or userdefined units in cost schedules 2023-10-25 15:01:52 +01:00
Sigma Dimensions (Yass) df4cd493ee fix displaying cost item totals 2023-10-25 13:54:13 +01:00
Massimo Fabbro 74132dcd49 New operator that creates a ceiling from cursor position in covering tool 2023-10-23 20:58:59 +02:00
Bruno Perdigão ef72cd3250 recreates assembly for array children objects 2023-10-23 15:46:14 -03:00
Andrej730 5cf1dd4249 fixed core tests after switch_representation changes 2023-10-23 17:25:07 +05:00
Andrej730 29bd30d3bf "Edit Profile" in BIM Tool for mapped representations
basically now "edit profile" will be shown in BIM Tool UI and will work from shift+e hotkey if the active element's representation is mapped (for example, if it has openings)
2023-10-23 16:50:05 +05:00
Andrej730 3f8a0a91b3 switch_representation to automatically switch to unresolved mapped representation
The cool thing about it now that it will automatically create a new mesh for "unresolved" representation if element has openings, otherwise it'll stick to the same mesh representation as the type object.

This fixed a few bugs:
- similar to b9a9abd but during extrusion profile edit
- applying void to the occurence used to remove the type and other occurences. Apparently it occured after 744c08e - previously we seems to rely on `ifcopenshell.geom.create_shape(settings, element)` to unresolve the representations. Though before 744c08e there still was an issue - it would apply the same opening to the all occurences and the type meshes but wasn't removing them.

Probably fixed a few other similar issues.
2023-10-23 16:49:56 +05:00
Andrej730 416a572664 switch_representation not to break with temporary mesh representations
I've found a bug that if you have some object that consists of extrusion and can be edited in profile edit mode, when you finish editing, it would remove the type object (and I guess the other occurences objects).

It happened because during edit mode it's using temporary mesh data and `switch_representation` would replace this temp mesh data with new representation and remove the old mesh data that might still used by the other occurences and the type.

The issue also was leading to a crash during `box.template_icon(icon_value=AuthoringData.data["type_thumbnail"], scale=5)` if you had BIM Tool thumbnail preview opened in the process - removing type object would make thumbnail icon become invalid leading to the crash.

Crash mentioned here: https://community.osarch.org/discussion/1753/bbim-two-door-types-with-connected-properties
2023-10-23 15:24:43 +05:00
Thomas Krijnen 388c72360d Use --start/end-group on linux to fix ld geomserver 2023-10-21 22:26:16 +02:00
Dion Moult b841afc2e4 Update beginners tutorial documentation with images from new UI. 2023-10-21 22:46:15 +11:00
Dion Moult f10d340254 You can now assign and unassign styles to materials 2023-10-21 15:23:55 +11:00
Dion Moult 0d0b91ee9b You can now specify a name when adding materials 2023-10-21 15:23:55 +11:00
Bruno Perdigão 4f1e59a613 improvements on dealing with sub-aggregates 2023-10-20 21:26:56 -03:00
Bruno Perdigão 5960e4153c wip: RefreshLinkedAggregate is working with IfcGroup 2023-10-20 14:34:03 -03:00
Ryan Schultz 8032333a17 Additional clarification on save and save as 2023-10-20 09:53:29 -05:00
Dion Moult 712ec6def3 Reorganise new stakeholders panel, move profiles into geometry tab. General UI polish. 2023-10-20 22:18:32 +11:00
Andrej730 0d43ef0736 option to set active system
Now it's possible to set in UI active system (currently it's done "select" button next to the system).

Also changed the elements that are going to be decorated with system decorator. Previously it was decorating all the mep elements in the projects which was very performance heavy on large projects.
2023-10-20 15:59:24 +05:00
Andrej730 b318509cba Merge systems UI into one
We had two very similar systems panels that were part of the old UI.
2023-10-20 14:00:32 +05:00
Dion Moult f3b541f00a Fix #3095. Very basic implementation of a new zones panel. 2023-10-20 17:51:48 +11:00
Andrej730 4f64dcdbd4 Fixed tests after selector syntax update 2023-10-20 11:06:10 +05:00
Dion Moult 68acf84e26 Fix #3901. Add configurable list concatenation support in IfcFM. 2023-10-20 13:38:17 +11:00
Dion Moult aaceb923ad Fix #3903. Bug where stairs started off with an empty mesh and had a representation added, resulting in an invalid empty point cloud.
Now stairs have should_add_representation=False when creating the IfcStairFlight, and the representation is updated explicitly, similar to how parametric doors and windows etc have their representations updated.
2023-10-20 12:28:18 +11:00
Dion Moult 074de2741a Fix regression from 744c08e where type products cannot have an instance specified in create_shape 2023-10-20 12:24:57 +11:00
Dion Moult 0e4bc320cb Adding / editing shading / rendering styles in the style manager now updates Blender materials 2023-10-20 10:26:35 +11:00
Andrej730 9e9412bec0 Forgot to fix test after 35d66f5 2023-10-19 18:10:31 +05:00
Andrej730 7e92471ac9 Fixed issue unlinking mesh objects
After d67eae5 delete_ifc_object is removing the meshes and it end up invalidating the unlinked object. Now mesh is copied before running delete_ifc_object
2023-10-19 17:05:14 +05:00
Andrej730 078a7eb290 Fix tests after 808ff54 2023-10-19 16:42:20 +05:00
Andrej730 df3876b438 Minor fix after a47c57c 2023-10-19 16:11:57 +05:00
Andrej730 d414de450b Fixed test after c34a9c5
Also fixed bug in the sheeter
2023-10-19 16:11:56 +05:00
Andrej730 9e89bb5044 Fixed test after 418444a 2023-10-19 13:22:06 +05:00
Andrej730 aa0c42e1ec Fixed test after 90b40ff 2023-10-19 13:05:25 +05:00
Andrej730 a4daa0e3d9 Fixed test after 88d96f7 2023-10-19 11:03:27 +05:00
Andrej730 162ac39570 Fixed test after 6e9639446 2023-10-19 11:03:27 +05:00
Andrej730 8c73fa69a1 Fixed #3907 after dd7a6a80e 2023-10-19 10:49:47 +05:00
Dion Moult 159eeeb3a4 You can now edit rendering styles in the style manager 2023-10-19 16:38:42 +11:00
Bruno Perdigão 66f735fde9 wip: refactor of RefreshLinkedAggregate. The operator triggers all the other linked aggregates deletion. 2023-10-18 21:36:04 -03:00
Bruno Perdigão 1a3aa7f031 IfcElementAssembly share a group instead of a pset 2023-10-18 20:43:41 -03:00
Ryan Schultz ac41a9e63a allow SI with CAD tools. 2023-10-18 17:07:29 -05:00
Andrej730 eb0873996f Added IfcZone to systems UI in IFC2X3 #3905
In IFC2X3 IfcZone is a subtype of IfcGroup but not subtype of IfcSystem (it become one after IFC4), therefore IfcZone wasn't presented anywhere in BBIM UI.
It's a bit confusing though to include IfcZone in systems when it's not actually a IfcSystem but having it in IfcGroups would be confusing too.
2023-10-18 17:13:22 +05:00
Andrej730 c85826ef2e Fixed #3901
It was throwing an error because was failing to write a list to an excel cell, now it's explicitly converting the value to string.

Python: Traceback (most recent call last):
  File "\blenderbim\bim\module\fm\operator.py", line 102, in execute
    writer.write_xlsx(filepath)
  File "\blenderbim\libs\site\packages\ifcfm\__init__.py", line 259, in write_xlsx
    cell = worksheet.cell(row=r, column=c, value=col)
  File "\blenderbim\libs\site\packages\openpyxl\worksheet\worksheet.py", line 247, in cell
    cell.value = value
  File "\blenderbim\libs\site\packages\openpyxl\cell\cell.py", line 218, in value
    self._bind_value(value)
  File "\blenderbim\libs\site\packages\openpyxl\cell\cell.py", line 187, in _bind_value
    raise ValueError("Cannot convert {0!r} to Excel".format(value))
ValueError: Cannot convert ['USE TYPE CATALOG'] to Excel
2023-10-18 16:40:07 +05:00
Andrej730 627cf63a4c ifcfm symlink to dev environment setup script 2023-10-18 16:07:27 +05:00
Andrej730 744c08e13e bim.switch_representation to switch to exact representation
previously it was switching to the first representation that matches the context, so it wasn't possible to switch to the second one if you had more than 1 representation in the same context

using always both element and representation in `geometry.import_representation` so it will import the exact representation and not the first one found by `ifcopenshell.geom.create_shape`
2023-10-18 15:48:08 +05:00
Andrej730 dd7a6a80eb activate_drawing to prioritize already active representation
If there are multiple representations in the same subcontext, when it was searching for the representation for some specific subcontext, it would previously always switch to the first representation from the list, now it's going to prioritize the one that's already active.
2023-10-18 15:48:01 +05:00
Andrej730 ab807e3b9b bim.create_all_shapes info message 2023-10-18 12:21:41 +05:00
Andrej730 c35be50c83 Bump build version to fix #3889 2023-10-18 11:10:04 +05:00
Bruno Perdigão 37ab9c80e3 Duplication now recreates connections path #3770 2023-10-17 18:45:14 -03:00
Andrej730 7ff98d2918 Some UI to mark booleans as manual #3709
Currently it allows only to either set all object's booleans to be marked as manual or all of them marked as automatic, can't change some specific boolean.

Short demo - https://imgur.com/a/bczv35N
2023-10-17 18:19:45 +05:00
Andrej730 35d66f5d8c 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'
```
2023-10-17 18:13:54 +05:00
Andrej730 3f018a4195 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
2023-10-17 15:53:26 +05:00
Andrej730 578e15adb2 refresh_aggregate to show time it took
since this can get very time consuming on large projects
2023-10-17 15:07:43 +05:00
Andrej730 c4474455e9 Fix poll error after 3de9915
The error was
Traceback (most recent call last):
  File "\blenderbim\bim\module\model\covering.py", line 64, in poll
    return element.is_a("IfcCovering")
AttributeError: 'NoneType' object has no attribute 'is_a'
2023-10-17 15:07:43 +05:00
Dion Moult 8f43854cbf Minor fix 2023-10-17 20:47:39 +11:00
Thomas Krijnen 787149da13 Regen express rule code: lowercase str comparison in express rule generated code 2023-10-17 11:04:46 +02:00
Thomas Krijnen 3b31f6932a Compile IFC4X3_ADD2 express rules 2023-10-17 09:50:39 +02:00
Andrej730 6c9e130ca8 small fix f38952dc5 #3898 😬 2023-10-17 10:47:52 +05:00
Bruno Perdigão 86a234d17e Changed operator name 2023-10-16 22:32:09 -03:00
Bruno Perdigão f68baee5c3 small deletions 2023-10-16 22:17:22 -03:00
Bruno Perdigão 0028fd3e9c ifc_duplicate_operator now remove the connections with old objects. Similar solutions presented in PR #3789 2023-10-16 15:39:38 -03:00
Bruno Perdigão f5f9862b78 Fix #2187. ifc_duplicate_operator now recreates the IfcElementAssembly structure into a new Assembly 2023-10-16 15:31:56 -03:00
Andrej730 f38952dc51 small refactor 2023-10-16 16:23:48 +05:00
Andrej730 24eb149221 Support other voiding IfcFeatureElementSubtraction elements #3889
Support other voiding IfcFeatureElementSubtraction besides IfcOpeningElement.
2023-10-16 15:31:53 +05:00
Andrej730 ce8598a0b4 Fixed issue after 19345ff
It wasn't considering that EnumerationReference could be None
2023-10-16 15:31:53 +05:00
Thomas Krijnen fb9cf75412 #3889 Apply handling of openings on IfcFeatureElementSubtraction generically 2023-10-16 11:02:40 +02:00
Andrej730 68f5df73b9 black formatting 2023-10-16 12:21:20 +05:00
Andrej730 e068c523ec Keep placement axes recalculating profiles #3879 2023-10-16 12:19:18 +05:00
Andrej730 aa182bf047 small fix add_profile_representation - use of undefined variables 2023-10-16 11:59:33 +05:00
Ryan Schultz 6e9639446d Add a preference for particular app to open sheet layout 2023-10-15 20:04:53 -05:00
Bruno Postle c48c1c3b32 BlenderBIM minor fix after 7107a91 2023-10-15 21:15:32 +01:00
Dion Moult 14224ac538 Fix #3870. Bug where element filtering wasn't initialised properly when loading a camera for the first time.
Raster_x/y would only be set after the handler triggers. This is no longer necessary with the new explicit width / height properties.
2023-10-15 22:23:10 +11:00
Dion Moult 58be92d3fc New verbose option in util get_pset(s) which lets you get ID and class for complex processing. 2023-10-15 08:57:37 +11:00
Bruno Postle 7107a91f6f BlenderBIM keep camera position on git switch
New 'zoom extents' behaviour on IFC load is unwanted when switching
between git revisions
2023-10-14 21:54:16 +01:00
Thomas Krijnen 438ed22f8f Merge pull request #3888 from isma3lMB/v0.7.0
Adding support for non ascii characters when reporting
2023-10-14 16:00:18 +02:00
isma3lMB a9dfc9a9fd Adding support for non ascii characters when reporting 2023-10-14 15:31:33 +02:00
Thomas Krijnen f8b09b3525 Update build-deps.cmd: proj compilation 2023-10-13 22:34:35 +02:00
Massimo Fabbro f1ab02b311 Fix bug in covering/space tool with matrix global and local 2023-10-13 22:03:43 +02:00
Bruno Perdigão 4e833e26ca wip: DuplicateMoveAggregate now calls DuplicateMove function and removes code duplication 2023-10-13 14:41:21 -03:00
Dion Moult 25df2f6414 See #3884. Rewrite native geometry handling with a much more robust approach fixing a number of invalid coordinates and simplifying things. 2023-10-13 23:40:23 +11:00
Dion Moult 42719d3fe3 Fix bug where native meshes had normal smoothing enabled by default 2023-10-13 23:40:23 +11:00
Dion Moult 1f6d23c19c Minor fixes to placement utilities for getting mapped item matrixes 2023-10-13 23:40:23 +11:00
Thomas Krijnen 94db9ec522 Add IFC4X3_ADD2 schema 2023-10-13 11:51:05 +02:00
Dion Moult a47c57c22c First draft of style manager panel 2023-10-13 17:38:55 +11:00
Dion Moult 8f4bc0ea00 Material manager panel now moved to geometry tab 2023-10-13 17:37:24 +11:00
Dion Moult dd70b09fb1 Representation items panel now shows styles and layers 2023-10-12 22:56:36 +11:00
Dion Moult c930050da6 Accommodate bug in Revit where mapped representations were missing... well, a representation map. 2023-10-12 22:56:36 +11:00
Dion Moult 55a7a72e61 Minor bug fixes with error message when selecting objects in layers without objects 2023-10-12 22:56:36 +11:00
Dion Moult ca2ae36d41 Modernize zone and type table mappings for COBie 2.4 with Emma Hooper 2023-10-12 22:56:36 +11:00
Thomas Krijnen 81b4e42ca2 Use schema_identifier for schema and express rule validation. See #3126 2023-10-12 10:37:44 +02:00
Massimo Fabbro 55e61b55d8 better UI for covering tool 2023-10-12 05:58:52 +02:00
Massimo Fabbro a99529cb1e fix generate space and covering where objects weren't created in the right location 2023-10-12 05:58:52 +02:00
Dion Moult bf43efe509 Begin drafting out a new representation items panel for managing styles and layers properly 2023-10-11 23:26:48 +11:00
Vukas Pajic da7f5b015b add missing attributes in ids.parse 2023-10-11 10:06:54 +02:00
Massimo Fabbro 3de9915389 Add generate flooring from cursor and regen (#3874) 2023-10-11 09:15:36 +11:00
Dion Moult 418444a196 Fix #3873. Regression due to new importing logic. 2023-10-11 09:12:00 +11:00
Dion Moult 171251b27d See #1619. Fix issue where copying non-templated properties didn't work. 2023-10-11 08:53:53 +11:00
Ryan Schultz 9fef920a6f Further clarify the bim.link_ifc command 2023-10-10 13:43:56 -05:00
Dion Moult 5bff837a61 Minor fix 2023-10-10 22:21:32 +11:00
Dion Moult 05f6f4efab Manual booleans are now tracked via a Pset instead of arbitrary class conventions which should fix a bunch of issues. 2023-10-10 17:33:00 +11:00
Dion Moult e4f5b0e3d8 Write documentation for placement utility 2023-10-10 10:56:28 +11:00
Dion Moult 49b733f660 See #3817. WARNING: fundamental change. Standardise prioritisation of all context permutations when loading occurrences and types. 2023-10-09 23:21:09 +11:00
Dion Moult 36ed618adf You can now federate FM spreadsheets using the Blender UI 2023-10-09 17:26:45 +11:00
Dion Moult 48042011e2 Merge pull request #3860 from IfcOpenShell/Representation_Utilities_more_functions
Adding "Manually Save Representation" and bim.get_representation_ifc_…
2023-10-09 09:58:58 +11:00
Andrej730 0e1939a871 Minor fix #3862 2023-10-08 21:32:34 +05:00
Ryan Schultz bea1e61739 Adding "Manually Save Representation" and bim.get_representation_ifc_parameters back to Representation Utilities panel
from: https://github.com/IfcOpenShell/IfcOpenShell/commit/3a812a9ec156818061c01bd5b2ac2c2bee09faf1#r123820129
2023-10-08 09:24:18 -05:00
Ryan Schultz 72cd82f450 fixed error when creating new walltype in IFC2x3 2023-10-07 10:25:22 -05:00
Massimo Fabbro befa059591 Merge pull request #3838 from maxfb87/covering_tool
Covering tool (see #3754)
2023-10-07 14:20:27 +02:00
Bruno Postle 7229f7271c BlenderBIM make fca90e9 optional
setup_viewport_camera() does a 'zoom extents' on IFC import.
Create a should_setup_viewport_camera option (default True)
2023-10-06 22:34:43 +01:00
Andrej730 9c5970e757 fixed issue with placing end port for a bend 2023-10-06 17:30:01 +05:00
Andrej730 2fe3f0a9df system decorations - indicate both directions flow 2023-10-06 17:30:01 +05:00
Dion Moult 3929f02e94 Fix #3843. Regression where IfcMaterialList UI didn't show list of materials. 2023-10-06 22:43:56 +11:00
Andrej730 1abf80c310 Minor fix after b9a9abd30 2023-10-06 16:03:40 +05:00
Andrej730 2c18c89807 revert flow directions icons to arrows 2023-10-06 16:01:46 +05:00
Andrej730 1b81fa5aa1 Minor fix after 78c748df5
RuntimeError: Error: Registering panel class: parent 'BIM_PT_tab_placement' for 'BIM_PT_placement' not found
2023-10-06 15:31:41 +05:00
Hilko baa08b3221 Update build-deps.cmd 2023-10-06 12:16:51 +02:00
Andrej730 b9a9abd30d Fixed adding opening to meshes of all occurences for non material based representations
Mentioned in #3817
2023-10-06 15:11:14 +05:00
Andrej730 33536957d8 Moving some code to tool.Geometry 2023-10-06 15:11:14 +05:00
Dion Moult d092fd45ba You can now select coloured objects in a colourscheme. 2023-10-06 16:51:50 +11:00
Dion Moult 78c748df5d New placement panel to consolidate placement data in geometry tab 2023-10-06 15:25:51 +11:00
Dion Moult 3d76de3041 New geometry tree documentation picture and minor documentation improvements including mention of COBie 2.4 legacy mode in IfcFM. 2023-10-06 13:05:38 +11:00
Dion Moult ed3e9f3347 New documentation for shape utility 2023-10-06 13:04:54 +11:00
Dion Moult eb836436b9 Implement projected surface area calculation function in util.shape 2023-10-06 13:04:34 +11:00
Dion Moult c34a9c52d0 New drawing width / height / depth / raster DPI controls 2023-10-06 10:45:54 +11:00
Dion Moult 88d96f7d57 You can now easily create orthographic and perspective model drawings from a preset 2023-10-06 10:44:51 +11:00
Dion Moult 69e447be1c Active drawing panel moved from camera properties to drawing tab. 2023-10-06 08:17:03 +11:00
Massimo Fabbro df09acfa31 Merge branch 'v0.7.0' into covering_tool 2023-10-05 21:23:11 +02:00
Massimo Fabbro 6343f77c0d Minor spatial refactor 2023-10-05 21:17:25 +02:00
Thomas Krijnen 285fc2269e #3852 Update pyproject.toml 2023-10-05 15:52:59 +02:00
Andrej730 68a1da9190 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.
2023-10-05 18:38:46 +05:00
Andrej730 ceae7d4fdb DumbWallJoiner to work with IfcBooleanResult correctly #3831
It wasn't detecting extrusion as part of IfcBooleanResult and was using default wall data as fallback.

Occured after 0044ef5
Solves #3831
Related to #3709
2023-10-05 17:31:24 +05:00
Dion Moult 371daa6c80 Revise COBie 2.4 mappings for facility, floor, and some of space worksheet in collaboration with Emma Hooper 2023-10-05 22:49:52 +11:00
Dion Moult 948993e066 Fix #3845. Select similar for predefined type now takes into account inheritance. 2023-10-05 22:47:12 +11:00
Andrej730 ec4f0e5ad6 Fixed issue applying array with Sync Children #3822 2023-10-05 15:32:45 +05:00
taylor ef56c6ce7e Fixed model reference 2023-10-05 10:17:03 +02:00
Dion Moult 3c02da416e Georeference module now supports IFC2X3 georeferencing / conversion utilities. 2023-10-05 16:15:28 +11:00
Dion Moult 6660bf7618 Document geolocation util and add support for ePSet IFC2X3 fallbacks. 2023-10-05 16:15:28 +11:00
Dion Moult 000e5ec29a Merge pull request #3835 from c4rlosdias/v0.7.0
Fix problem in facets.py (IfcTester)
2023-10-05 11:39:47 +11:00
Dion Moult ef8f4df4ab Fix #3841. Bump IOS. 2023-10-05 09:57:03 +11:00
Andrej730 dff70f2608 bim.flip_object #3803
Added new operator bim.flip_object that flips the object by flipping two of its axes and keeps the original placement.

Currently it can be found either from F3 search or from Shift-F hotkey for IfcBeam and IfcColumn in BIM tools.
2023-10-04 18:20:17 +05:00
Andrej730 0d7967ff62 .reg file for #3778
Forgot to commit the .reg file...
2023-10-04 15:13:57 +05:00
Andrej730 4fe459dab6 Fixed typo 2023-10-04 09:47:38 +05:00
Thomas Krijnen 0e5e1f7873 Option to write Earth-Centered Earth-Fixed glTF 2023-10-03 21:26:11 +02:00
Dion Moult 82d4829c83 Clean up IfcFM's Basic preset to be more true to IFC rather than follow naming schemes from stuff like COBie 2023-10-03 21:21:28 +11:00
Dion Moult a24fab6d92 You can now select and bulk process multiple models using IfcFM in Blender. 2023-10-03 21:21:28 +11:00
Dion Moult 748055dcf1 New IfcPatch recipe to fix Revit bug with occurrence based classifications 2023-10-03 21:21:28 +11:00
Dion Moult 3904162360 New IfcPatch recipe to fix Revit bug with hardcoded Uniformat classification 2023-10-03 21:21:28 +11:00
Andrej730 7ca24ede4c IfcSverchok docs update urls 2023-10-03 10:50:56 +05:00
Ryan Schultz 1e59b10479 Merge pull request #3820 from brunoperdigao/fix-duplicate-agg-pset-for-new-objs
Fixed a bug where the refresh aggregate operator was not working afte…
2023-10-02 15:14:05 -05:00
Massimo Fabbro cda61bff5b Refactor create_space operator and better UI for covering tool 2023-10-02 22:13:03 +02:00
Massimo Fabbro 09a9753ca7 refactor create spaces from walls 2023-10-02 22:13:03 +02:00
Massimo Fabbro 1621449143 Add predefined type to AuthoringData 2023-10-02 22:13:02 +02:00
Ryan Schultz d0ef7f69b1 fix #3792 2023-10-02 14:56:17 -05:00
c4rlosdias 3df95b8970 Merge branch 'v0.7.0' of https://github.com/c4rlosdias/IfcOpenShell into v0.7.0 2023-10-02 13:49:32 -03:00
c4rlosdias ddd4b0e262 Fix problem in getpsets(facet.py) and added descriptions to specifications (IfcTester) 2023-10-02 13:49:27 -03:00
Carlos Dias 6b05b6e7fb Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0 2023-10-02 12:58:10 -03:00
Andrej730 9dd728ce7e Fixed error creating a door type / window types after 8f6be60c6 2023-10-02 17:32:56 +05:00
Andrej730 90b40ff0dc Getting drawing group more precisely
Previously it was conflicting with other possible groups assigned to the object. It's now even more important since we're actively using groups to save search queries.

Example error caused by this issue - during drawing activation if you had 2 IfcGroups on the drawing element:
draiwng's IfcGroup RelatedObjects attribute was updated, then inverse attrtibute `drawing.HasAssignments` order was updated too (DRAWING IfcGroup now would be positioned second after IfcGroup for search query) and it was leading to errors during filtering current drawing annotations
2023-10-02 16:55:38 +05:00
Andrej730 3c27c52c9f Small fix for 05d4dc566 2023-10-02 15:38:26 +05:00
Andrej730 05d4dc5666 Rever IFC Project
https://i.imgur.com/ajQiK8D.png
2023-10-02 15:30:32 +05:00
Andrej730 edaabf5bd2 Fixed #3829 occured after ae45e6b
similar_openings wasn't reset on each iteration causing moving unrelated openings
2023-10-02 11:44:31 +05:00
Andrej730 ad79c63a37 Fixed #3832 2023-10-02 10:57:24 +05:00
Sigma Dimensions (Yass) 9461bf2129 fix f2097c0 2023-09-29 17:30:33 +01:00
Sigma Dimensions (Yass) f2097c0c5f importing csv cost schedules now allows using selector queries for effortless product assignments to cost items, and add new ods and csv format templates (in french) 2023-09-29 16:10:16 +01:00
Dion Moult d838e1808d IfcFM can now be used to federate multiple spreadsheets together 2023-09-29 23:03:58 +10:00
Dion Moult 5ed54d9e7c Revise COBie 2.4 contact table mapping in collaboration with Emma Hooper 2023-09-29 23:03:58 +10:00
Andrej730 78aba1c7e4 Workaround for #3778 2023-09-29 15:28:11 +05:00
Andrej730 3faaee80ec 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
2023-09-29 09:29:25 +05:00
Andrej730 a847b8f4e4 bim.remove_opening not to force Model/Body/Model_view
Now it won't be forcing Model/Body/Model_view representation on the objects if some other context is active for the object.

Indirectly solves #3817
2023-09-28 18:51:27 +05:00
Dion Moult 24170a8a16 Ship with fallback IFC2X3 georeferencing pset 2023-09-28 23:07:43 +10:00
Massimo Fabbro 5438331fe1 fix generate spaces from walls bug 2023-09-27 18:52:49 +02:00
Carlos Dias 3c957e0cbe Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0 2023-09-27 10:55:52 -03:00
Andrej730 10672f3e1a Print unused elements stats / purge unused elements
Added to Purge Data section in Quality Control some tools - https://i.imgur.com/Nz3YoiH.png

1) Print unused elements - useful to investigate how much unused data you have in IFC file.
https://i.imgur.com/9Fkn0JD.png

2) purge unused elements by ifc class, it's doing it in pretty naive way and can be dangerous, so maybe it should be moved to debug section.
2023-09-27 15:42:31 +05:00
Andrej730 fa90e420eb info message for amount of purged elements 2023-09-27 13:55:56 +05:00
Dion Moult 347bb2df4b Introductory docs written for IfcFM 2023-09-27 18:22:02 +10:00
Dion Moult 986ffe66f8 New introduction section in IOS docs 2023-09-27 18:22:02 +10:00
Andrej730 c1bedec354 Minor fix after 22edbdd
Error was:

TypeError: EnumProperty(..., default='cobie'): not found in enum members
Exception in module register(): \3.6\scripts\addons\blenderbim\__init__.py
Traceback (most recent call last):
  File "\Blender\3.6\scripts\modules\addon_utils.py", line 369, in enable
    mod.register()
  File "\3.6\scripts\addons\blenderbim\__init__.py", line 42, in register
    blenderbim.bim.register()
  File "\3.6\scripts\addons\blenderbim\bim\__init__.py", line 190, in register
    bpy.utils.register_class(cls)
ValueError: bpy_struct "BIMFMProperties" registration error: 'engine' EnumProperty could not register (see previous error)
2023-09-27 12:09:44 +05:00
Dion Moult 182b6c7b07 IfcFM now supports writing to Pandas Dataframes 2023-09-27 14:18:48 +10:00
Dion Moult 22edbddd84 You can now interact with IfcFM via CLI 2023-09-27 14:17:46 +10:00
Dion Moult 50f6f44d26 You can now specify empty formatting for IfcCSV via CLI 2023-09-27 14:16:43 +10:00
Dion Moult e93a697179 Fix #3788. Fix crash when opening drawing SVGs using webbrowser module which is not recommended and the file is on a Dropbox synced external drive. Now replaced with generic os.startfile / xdg-open / open commands. 2023-09-27 11:50:52 +10:00
Sigma Dimensions (Yass) f1a5805b1c fix loading animation color scheme 2023-09-26 18:33:52 +01:00
Sigma Dimensions (Yass) 126f530af1 run black and forgotten calender utils 2023-09-26 16:44:35 +01:00
Sigma Dimensions (Yass) 5dfbbb8d96 maintain tasks bar visual property state when tasks properties are reloaded 2023-09-26 16:42:35 +01:00
Sigma Dimensions (Yass) 6962e505f9 hide spaces when creating an animation 2023-09-26 16:38:33 +01:00
Sigma Dimensions (Yass) 5c2523e752 fix warning statement when there are no saved animation color schemes 2023-09-26 16:36:48 +01:00
Sigma Dimensions (Yass) 635dff73b4 fix typo 2023-09-26 16:35:31 +01:00
Sigma Dimensions (Yass) c85e4e7ceb fix missing task types for animations color scheme 2023-09-26 16:35:00 +01:00
Sigma Dimensions (Yass) 7ed4301c6c fix tasks not displaying derived calendar 2023-09-26 16:29:53 +01:00
Andrej730 1193e7025a system decorations - live time update
Decoration data is now updating in live time, caching some parts in Data for performance. Real time update is needed because Data doesn't allow update on objects positions change and later will need real time update for viewport orientation data.
2023-09-26 17:08:39 +05:00
Andrej730 cc1ee19115 Add ports to MEP bends/transitions types instead of occurences 2023-09-26 15:19:49 +05:00
Andrej730 e975eac4a7 system decorations to show flow direction 2023-09-26 11:47:10 +05:00
Andrej730 779fc35228 settings flow direction without jumping to ports
https://imgur.com/a/F00tG7g
2023-09-26 11:47:10 +05:00
Dion Moult 8e59282fe0 Possible optimisation by caching in IfcTester property checks 2023-09-26 16:03:10 +10:00
Bruno Perdigão 11c8d47909 fixed a bug where the refresh aggregate operator was not working after adding new objects to the parent aggregate 2023-09-25 22:55:56 -03:00
Claudio Benghi 2661999f3e Fixed most issues with IDS auditing 2023-09-26 11:06:58 +10:00
Ryan Schultz e4bfb05875 proposed fix for #3792 2023-09-25 10:32:06 -05:00
Massimo Fabbro fe14988d50 Merge pull request #3790 from maxfb87/new_covering_tools
New covering tools (see #3754)
2023-09-25 16:03:56 +02:00
Massimo Fabbro d45bef5e70 Merge branch 'v0.7.0' into new_covering_tools 2023-09-25 15:01:03 +02:00
Andrej730 82d03b98c6 Descriptions for add_representation conversion methods 2023-09-25 16:32:48 +05:00
Andrej730 9c1ecf3f2c draw calculate_all_quantities hotkey in bim tool ui
hotkey was already there, it just wasn't added to UI

https://i.imgur.com/nar5WYI.png
2023-09-25 16:32:48 +05:00
Andrej730 8f6be60c6e recalculate fills on applying changes to ifc windows / ifc doors
previously if you'd move the window and then change it's parametric data and try to apply it, opening's position wouldn't be updated
2023-09-25 16:32:48 +05:00
Andrej730 81a1bd9206 Moved common duplication operators code to DuplicateMove
Now OverrideDuplicateMoveLinked allways will be in sync with OverrideDuplicateMove.

Also fixed the issue when DuplicateMoveLinked for non ifc elements worked the same was DuplicateMove (it was copying mesh data when it's not suppose to).
2023-09-25 16:32:48 +05:00
Andrej730 9f7dffb29d replace Drawing.remove_object_data with more general method 2023-09-25 16:32:47 +05:00
Dion Moult eee799bfc4 Purge IfcCOBie deps from build 2023-09-25 19:24:01 +10:00
Dion Moult 9665adb61d Fix #3793. Bug where flipping a wall with generic connection relationships would fail. 2023-09-25 08:34:48 +10:00
Sigma Dimensions (Yass) e40019f3cb resources code cleanup 2023-09-24 19:02:35 +01:00
Sigma Dimensions (Yass) b2f95bfa60 change tests due to new class assignment workflow ref commit 808ff54 2023-09-24 18:45:12 +01:00
Bruno Perdigão be2c7a62fd remove connections with old objects when duplicating aggregates 2023-09-24 22:23:55 +10:00
Dion Moult 38f5468f19 We now support separating IFC meshes. 2023-09-24 15:45:22 +10:00
Dion Moult 31dcbc0159 Splitting by edge now resolved mapped representations, voided, and non-mesh geometries 2023-09-24 15:45:22 +10:00
Sigma Dimensions (Yass) bd81320c08 fix parametric duration/ resource update 2023-09-24 04:39:30 +01:00
Dion Moult 0707f37247 Minor fix during loading arrays 2023-09-24 13:18:32 +10:00
Dion Moult 0993736cea Fix #3791. Add isodate as an optional dependency to ifcopenshell-python. 2023-09-24 13:14:56 +10:00
Sigma Dimensions (Yass) cc3e2204e2 improved template for resource csv imports 2023-09-24 03:17:39 +01:00
Sigma Dimensions (Yass) 8ac5f0318b fix location search filter 2023-09-23 23:35:17 +01:00
Sigma Dimensions (Yass) 270a61e73a bring back filter operators into new Filter subpanel and change filter by storey to filter by container 2023-09-23 21:26:58 +01:00
Massimo Fabbro 1c057b1ce1 Add new covering tool. Mock up and initial functions 2023-09-23 18:09:59 +02:00
Sigma Dimensions (Yass) e74e824417 Proposal to use resource's parent cost, reducing manual insertions 2023-09-23 16:04:01 +01:00
Dion Moult 73d1de5dcf New debug feature to override the display type. 2023-09-23 14:51:27 +10:00
Dion Moult 4549be0d05 Autodetect dense meshes to make it faster when loading so users don't need to go into advanced mode. 2023-09-23 14:51:27 +10:00
Andrej730 e3f2f2175d Moving common code for duplication operators 2023-09-22 16:37:50 +05:00
Andrej730 a604cf2b2a Duplicate the array if all it's elements are selected #3763
Demo - https://imgur.com/a/0wYZOPl
2023-09-22 16:37:49 +05:00
Andrej730 d6b4c1f454 Setup arrays constraints on loading .ifc #3753 2023-09-22 13:56:55 +05:00
Andrej730 d3258693b2 Clear constraint and transform lock on duplicating array child object
Previously it was locked even though it's not part of an array anymore.
2023-09-22 13:56:55 +05:00
A. R. S 9eba3b6eaa Try to get unit from EnumerationReference for IfcPropertyEnumeratedValue 2023-09-22 17:41:05 +10:00
Dion Moult 7b75364feb Refactor IfcFM to make it easier to exclude things 2023-09-22 17:17:15 +10:00
Dion Moult 4a4a0f09ef Finally purge IfcCOBie to be superseded by IfcFM 2023-09-22 17:04:22 +10:00
Andrej730 6d14c2d448 removing arrays if all array elements are selected #3781
I think there is still some space to improve but it should cover the main problem with need going to array section to remove it
Demo - https://imgur.com/a/9Z3t5Q8
2023-09-22 11:25:56 +05:00
Andrej730 57edd47ed7 Fixed error editing pset with prop with empty prop.NominalValue
Traceback:
```
Error: Python: Traceback (most recent call last):
  File "\blenderbim\bim\module\pset\operator.py", line 103, in execute
    self.load_from_pset_data(pset)
  File "\blenderbim\bim\module\pset\operator.py", line 226, in load_from_pset_data
    value = prop.NominalValue.wrappedValue
AttributeError: 'NoneType' object has no attribute 'wrappedValue'
```
2023-09-22 10:25:51 +05:00
Massimo Fabbro aefcedf754 Add model test about manual booleans 2023-09-21 23:19:47 +02:00
Massimo Fabbro 2c685c846f Added calculating quantities function for Qto_DuctSegmentBaseQuantities and Qto_DuctFittingBaseQuantities 2023-09-21 23:19:24 +02:00
Ryan Schultz 6536f7b56b small fix for 9e67565 2023-09-21 12:58:16 -05:00
Vukas Pajic 9d3881b00e typo 2023-09-21 16:14:37 +02:00
Vukas Pajic baffbd6a32 Update ids validation
see https://github.com/IfcOpenShell/IfcOpenShell/issues/2933
2023-09-21 13:27:38 +02:00
Sigma Dimensions (Yass) 9e4702c102 small fix when calculating resource work 2023-09-21 06:04:24 +01:00
Dion Moult b63f3f335c Autogenerate API docs for more modules. 2023-09-21 13:33:26 +10:00
Dion Moult 29b0bcb6b9 Forgot to commit BCF docs 2023-09-21 13:23:43 +10:00
Dion Moult 62fa0bb218 Migrate more documentation to the official Sphinx docs and mention IfcOpenShell-WASM as an installation option 2023-09-21 13:21:43 +10:00
Ryan Schultz 9e67565c71 Refresh aggregate from selecting a part 2023-09-20 08:54:04 -05:00
Andrej730 dee4cf591e mep system decorators - basic implementation
All it does currently it draws all MEP elements connections in viewport. It also highlights with green color all elements connected to the active object

Demo - https://imgur.com/a/haAQeWt
2023-09-20 15:28:06 +05:00
Andrej730 bc5d6ee113 fixed error in api.system.disconnect_port
Error was:
TypeError: can only concatenate tuple (not "list") to tuple
2023-09-20 15:28:05 +05:00
Andrej730 5af3b537da get_viewport_context to also return space 2023-09-20 15:28:05 +05:00
Andrej730 4b159d400c bim.draw_system_arrows updated for ifc4 2023-09-20 15:28:05 +05:00
Sigma Dimensions (Yass) f3c012660a improve pset editing workflow and use refactored core and tool functions 2023-09-20 01:22:18 +01:00
Sigma Dimensions (Yass) b5b8b5df26 cascade schedule when adding a sequence relationship 2023-09-20 01:15:06 +01:00
Sigma Dimensions (Yass) 6d38d9b538 fix count_working_days when the start and finish are the same same hours 2023-09-20 01:11:42 +01:00
Sigma Dimensions (Yass) ef11ae6540 fix calculating critical path to consider:
- parent tasks with sequence assignments #3772
- tasks that are constrained by a schedule start
2023-09-20 01:10:34 +01:00
Sigma Dimensions (Yass) a3802c25c0 fix cascading schedule when parent tasks have sequence relationships #3772 2023-09-20 01:05:19 +01:00
Andrej 377bcfe6da Merge pull request #3732 from brunoperdigao/fix-refresh-aggregate-rotation 2023-09-19 23:57:52 +05:00
Dion Moult 63a5c0986f Datatype checks in IfcTester are now case insensitive 2023-09-19 23:56:04 +10:00
Andrej730 8320623210 Exposed some MEP operators in BIM Tool UI
https://i.imgur.com/U61QqlQ.png
2023-09-19 17:00:14 +05:00
Andrej730 90c4a2fd41 bim.mep_connect_elements to connect elements by the closest ports
Previously it was looking for exact match. Now operator also adjusts connected ports
2023-09-19 17:00:14 +05:00
Andrej730 4ee66caaf9 override_outliner_delete poll error fix 2023-09-19 16:59:15 +05:00
Andrej730 23251de6f1 info message for refresh_aggregate 2023-09-19 16:59:15 +05:00
Dion Moult 37287bac7e You can now add bSDD properties when assigning bSDD classifications 2023-09-19 20:30:56 +10:00
Vukas Pajic 43a7340f5d Fix case when ids_dict has key but value is None 2023-09-19 12:28:09 +02:00
Dion Moult 2363b5e167 Minor fix 2023-09-19 19:13:21 +10:00
Dion Moult 62bf8c2287 Fix crash where IFCTester read directly from IFC in the UI 2023-09-19 18:17:24 +10:00
Dion Moult a5a958d6e2 Basic integration of bSDD with BlenderBIM Add-on: you can now assign classification references from the bSDD and set the active bSDD domain. 2023-09-19 18:17:24 +10:00
Dion Moult 812d8508f4 Implement classification searching in bSDD library 2023-09-19 18:17:24 +10:00
Andrej730 c40cc3f740 select array parent / all array objects to work without parent guid argument
now it's getting parent guid from the currently active object, not from provided guid argument - so now it's possible to add those operators to quick favorites
2023-09-19 11:48:06 +05:00
Ryan Schultz 56040951f1 Have bim.select_aggregate make the aggregate empty the active object, as well. 2023-09-18 20:21:19 -05:00
Dion Moult 39b1a65dc5 IfcTester now includes percentages per requirement 2023-09-19 09:03:53 +10:00
Sigma Dimensions (Yass) 438f35fe88 purge cost schedules 2023-09-18 20:20:23 +01:00
Dion Moult 9240518066 Accommodate potential manual deletion of EPset drawing. 2023-09-18 23:41:13 +10:00
Dion Moult 27b71a9d07 Fix #3752. Accommodate situations where layouts don't match IFC. 2023-09-18 23:15:05 +10:00
Andrej730 0f1d675bef Associate IFC files with BlenderBIM on Windows
Buttons located in addon preferences - https://i.imgur.com/Unp4P9L.png

Just waiting for this to break somehow...

It's not completely automatic now and it doesn't create assign special icon for IFC files yet.
2023-09-18 18:01:20 +05:00
Andrej730 19345ff538 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')),$);
2023-09-18 12:08:16 +05:00
Andrej730 7b28bc9c68 fixed bug creating transition shapes
it was accidentally assigning extrusion vector instead of an offset
2023-09-18 11:30:36 +05:00
Andrej730 d67eae55df Clean up orphaned meshes
- delete_ifc_project
- bim.add_constr_type_instance
- adding transitions and bends
- add profile / slab / wall
2023-09-18 10:58:26 +05:00
Andrej730 8e375dcf73 Save last active context editing doors/windows, solves #3735
previously - https://imgur.com/a/gri6zMk
now - https://imgur.com/a/GIwZP6c
2023-09-18 10:04:45 +05:00
Sigma Dimensions (Yass) a34d0cabfc MSP calendar exceptions are now also imported #3766 2023-09-17 03:10:31 +01:00
Sigma Dimensions (Yass) a668743d10 fix msp .xml import: exception days for a standard working week #3766 2023-09-16 19:29:48 +01:00
Massimo Fabbro b13cbbb244 Partial spatial tool refactor 2023-09-15 22:47:35 +02:00
Andrej730 b6ae5fd344 For parametric doors and windows remove "Edit Profile" button from BIM Tool UI to avoid confusion 2023-09-15 15:55:15 +05:00
Andrej730 1c85034e19 Add starting/saving IFC project to Blender F4 file context menu
https://i.imgur.com/FDvZZwc.png
2023-09-15 15:36:33 +05:00
Andrej730 b0d1823968 MEP bends - fixed bunch of bugs related to adjusting already existing bends types 2023-09-15 15:36:33 +05:00
Dion Moult f0e03c79df Project advanced mode filtering now uses new filter syntax 2023-09-15 11:25:08 +10:00
Andrej730 6109cdf41b Ooops, forgot to remove debug shape creation 2023-09-14 18:19:03 +05:00
Andrej730 ec0873d527 transitions - fixed bug finding compatible fitting
For example, there was a fitting from segment of type A to the segment of type B with start/end transition lengths equal a/b respectively.
And then if you'd try to create a transition from B to A and start/end transition lengths being equal to b/a, previously BBIM wouldn't be able to find that already existing fitting is still compatible.
2023-09-14 18:19:03 +05:00
Andrej730 63223172b4 mep operators - clamp properties below zero 2023-09-14 18:19:03 +05:00
Andrej730 9778253d21 bends - support for zero radius bends 2023-09-14 18:19:03 +05:00
Dion Moult 0140b4ded1 IfcDiff can now visualise across linked IFCs 2023-09-14 22:50:57 +10:00
Dion Moult dca60b83a9 Make IfcDiff more forgiving when invalid geometry occurs. See #3755. 2023-09-14 22:28:03 +10:00
Andrej730 42e683375c Fixed bug using tab editing arbitrary profile
It was assuming we were editing extrusion profile and therefore was giving errors.
2023-09-14 11:06:42 +05:00
Dion Moult 66e07c2f69 Include buildingSMART psets in IfcFM Basic preset 2023-09-14 15:17:52 +10:00
Dion Moult 2b067b9dec Minor fix 2023-09-14 14:27:07 +10:00
Dion Moult c22d7d2f41 More minor fixes to IfcFM basic preset 2023-09-14 14:24:06 +10:00
Dion Moult ea3d489c24 Minor fixes to IfcFM 2023-09-14 12:10:36 +10:00
Andrej730 97683a14ef Revert "Replace currently selected objects with occurences of type"
This reverts commit 58199ef7c9.
2023-09-13 18:44:00 +05:00
Andrej730 d79b912e0e 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.
2023-09-13 16:30:20 +05:00
Andrej730 7ec8f8b03e 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).
2023-09-13 16:30:20 +05:00
Andrej730 58199ef7c9 Replace currently selected objects with occurences of type
Added operator to replace currently selected objects with occurences of the chosen type. I kept doing this from the code and thought it could be generally useful.

It's working pretty naive now and just replacing objects with occurences preserving the original transform (location/rotation/scale), nothing else is preserved.

Demo - https://imgur.com/a/qm8a6Ns

PS Hopefully I'm not reinventing the wheel and not missed some other similar operator
2023-09-13 16:30:20 +05:00
Andrej730 d5c46514d3 bends - considering parametric data searching for compatible fitting 2023-09-13 16:30:20 +05:00
Thomas Krijnen f400973557 Correct xsi:schemaLocation 2023-09-13 12:47:33 +02:00
Thomas Krijnen 148d6e7b1b Update IDS.xsd 2023-09-13 10:11:01 +02:00
Dion Moult 74dec650a7 New FM module in BlenderBIM Add-on for interacting with IfcFM. 2023-09-13 17:08:33 +10:00
Dion Moult 5f6e003e4e Implement COBie documents and attributes 2023-09-13 17:08:33 +10:00
Andrej730 d3df22b44b bends - use IfcArcIndex to define bends curves
instead of manually generating polylines of segments
2023-09-12 16:29:33 +05:00
Andrej730 257208d55b bends - support for start and end segments 2023-09-12 16:00:02 +05:00
Andrej730 d8b9b09d14 shapebuilder - replace y extrusion args with shortcut for readibility 2023-09-12 16:00:02 +05:00
Andrej730 6f9e14ceb0 Bends - replace faceset with simple extrusion 2023-09-12 16:00:02 +05:00
Andrej730 d854984dda MEP bends - support for circular profiles
Demo - https://imgur.com/a/XQBOvGz
2023-09-12 16:00:01 +05:00
Dion Moult 2951721886 Don't strip selector query keys to allow for explicit "mistakes" in key names. 2023-09-12 20:45:24 +10:00
Dion Moult 02801b32a6 Minor fix in IfcCSV where strings didn't get auto quoted. 2023-09-12 17:48:23 +10:00
Dion Moult b243e04fd2 New util.system.get_port_element function. 2023-09-12 17:48:23 +10:00
Dion Moult 02902d9a41 Allow optional second arguments to substr formatting. 2023-09-12 17:48:23 +10:00
Dion Moult 5c33034455 Implement COBie assemblies, connections, spares, resources, and jobs. 2023-09-12 17:48:23 +10:00
Thomas Krijnen 7541293a3c Case sensitivity on entity str comparison from cmd line https://sourceforge.net/p/ifcopenshell/discussion/1782717/thread/2bf3324a7f 2023-09-11 21:27:54 +02:00
Dion Moult da7d4dac7a Implement COBie systems 2023-09-11 23:24:34 +10:00
Andrej730 507ab8ec11 Fixed top and center alignment in the schedule
Solves #3599

Before - https://i.imgur.com/9s7MxH5.png
After - https://i.imgur.com/ojDj09G.png
Inkscape - https://i.imgur.com/pWF4Ouy.png
2023-09-11 17:30:59 +05:00
Andrej730 e93ff7a6b1 MEP bends - more robust start/end points detection
also support for bends with angles > 90 degrees and some other bugs fixed
2023-09-11 16:28:14 +05:00
Dion Moult 098ae2b69f Implement COBie type and component tables 2023-09-11 18:31:37 +10:00
Dion Moult a58a10e93d Deprecate purge_module_data in favour of newer refresh_ui_data function. 2023-09-10 18:27:05 +10:00
Dion Moult 9be7d951c3 Improve usability of pset template UI by removing save button and using new explicit applicable entity defaults to mitigate possible invalid pset templates. 2023-09-10 17:38:07 +10:00
Dion Moult 6cf482dc63 Minor UI bugfix where pset template files sometimes displayed with truncated filenames 2023-09-10 17:36:07 +10:00
Dion Moult aaa4683462 Fix bug where you couldn't add psets that were inherited. 2023-09-10 17:35:33 +10:00
Dion Moult 0b5535b6d4 Implement COBie zones 2023-09-10 09:04:19 +10:00
Andrej730 45feaeaec4 Spatial Manager - try to preserve the selection on loading the manager
Also noticed in Sigma Dimensions video that every time user deletes a storey or applies new elevation the selection was jumping to the first storey. Now it's going to be more natural.

Before - https://imgur.com/a/gbn7ryQ
After - https://imgur.com/a/QX2RulF
2023-09-09 18:04:35 +05:00
Andrej730 90f92cd139 Units formatting for Spatial Manager
Noticed in Sigma Dimensions video that we have some floating point garbage displayed in the Spatial Manager UI and I've added some simple formatting.

Now - https://i.imgur.com/eM1rDDu.png
Before - https://i.imgur.com/ySln5uU.png
2023-09-09 17:55:58 +05:00
Dion Moult 0285d97e3f Reimplement IfcCOBie contacts, facilities, floors, and spaces in IfcFM. 2023-09-09 21:27:10 +10:00
Andrej730 bf80e4b5e1 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😬
2023-09-08 19:40:18 +05:00
Andrej730 d4e4717857 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
2023-09-08 17:46:58 +05:00
Andrej730 fca90e9b0f automatically adjust viewport camera on loading ifc
It will make sure you'll be able to see the project's elements in viewport when it's loaded (same way as if you'd select all objects and hit "Numpad .").

Couldn't find any way to make it work without enablging / disabling selection - https://projects.blender.org/blender/blender/issues/112141
2023-09-08 17:10:52 +05:00
Andrej730 ffbb91216f Fixed issue using mitre with small angles between walls (#3721)
Normalization is unrelated, just added to be safe.
2023-09-08 15:47:20 +05:00
Andrej730 09620e060f some DumbWallJoiner.join() refactor 2023-09-08 15:47:20 +05:00
Dion Moult 0ea38384cc Minor fix after 6887210 2023-09-08 17:44:33 +10:00
Dion Moult aae659c5fd Fix bug when casting to tessellation for invalid IFCs which don't use material sets properly. 2023-09-08 15:52:44 +10:00
Dion Moult b7a481ec79 IfcFM now uses Openpyxl and supports xlsx. Reorder columns to be more logical and group similar data types together (at least for me). 2023-09-08 13:16:17 +10:00
Dion Moult 763eaf83da Fix #3733. Fix round function precision error. 2023-09-08 12:20:52 +10:00
Dion Moult 2843d1e13e Enable Sphinx auto section labels. Minor doc link fix. 2023-09-08 12:06:59 +10:00
Dion Moult e897797955 For convenience, rounding to an integer value now also casts to integer. 2023-09-08 11:17:28 +10:00
Bruno Perdigão cc8f103465 fix rotation from refresh aggregate operator 2023-09-07 21:06:08 -03:00
Ryan Schultz f1c3a90bc5 Update installation.rst 2023-09-07 14:23:37 -05:00
Dion Moult c90c438324 ResetAbsoluteCoordinates IfcPatch recipe can now choose whether to reset placements, geometry, or both points. 2023-09-07 22:15:44 +10:00
Dion Moult ae1ff3f6f7 Fix bug where unedited mesh objects were still tagged as edited which led to unnecessary processing prior to drawing generation or saving. 2023-09-07 22:09:26 +10:00
Dion Moult e2224386bf You can now customise the display of empty strings in IfcCSV. 2023-09-07 18:15:12 +10:00
Dion Moult 6ad51ebd18 Update documentation with new selector keys. 2023-09-07 18:11:55 +10:00
Dion Moult 0fb9f584cb Big clean up to IfcFM. It's almost usable! 2023-09-07 17:38:33 +10:00
Dion Moult 9a34b94568 Fix #3682. You can now tag setout points with dynamic xyz / enh values. 2023-09-07 13:47:54 +10:00
Dion Moult 7bca3bcac3 Drawing text annotation now use the new format functions instead of executing arbitrary code. 2023-09-07 13:05:03 +10:00
Dion Moult de27554043 New substr formatting function. 2023-09-07 13:02:45 +10:00
Dion Moult 306ee3dfa4 You can now choose both input and output units for imperial formatting 2023-09-07 12:18:43 +10:00
Ryan Schultz 3593b6b5c2 Update ifc_classes_suggestions.json 2023-09-06 20:13:55 -05:00
Dion Moult e06acab39b Revert "Spreadsheet Import/Export: Fix feet and inch formatting"
This reverts commit 921d412fc7.
2023-09-07 10:13:00 +10:00
Dion Moult 6dd4e0f53a Revert "Small fix for feet and inch formatting on Spreadsheet Import/Export"
This reverts commit 7935bd22c2.
2023-09-07 10:12:50 +10:00
Dion Moult 2c2a37cacb Fix #3722. Fix ifcopenshell pypi distribution to use modern manylinux tag for glibc 2.31. 2023-09-07 09:57:58 +10:00
Ryan Schultz 7935bd22c2 Small fix for feet and inch formatting on Spreadsheet Import/Export 2023-09-06 13:49:32 -05:00
Andrej730 6887210a1a remove the orphaned data created on object duplicate
orphaned mesh still had ifc_definition_id of the original object and could have caused issues in theory
2023-09-06 17:28:37 +05:00
Andrej730 33dc3a4b06 Update status visibility automatically #3721 2023-09-06 15:57:39 +05:00
Dion Moult ba4610155f Fix #3705. Fix ambiguity in using commas in unquoted strings in facet selector. 2023-09-06 16:34:39 +10:00
Dion Moult 28eeba49ba Fix #3712. Fix bug where grid axes couldn't be duplicated. 2023-09-06 15:11:07 +10:00
Dion Moult 0a00e529c3 Improve hello world documentation to be more beginner friendly 2023-09-05 23:42:31 +10:00
Dirk Olbrich c5024cf6be cmake: ifcconvert is build in minimal 2023-09-05 13:00:39 +02:00
Dirk Olbrich 0f3b416c3f cmake: reorder build options 2023-09-05 13:00:39 +02:00
Dirk Olbrich addacd9ce5 cmake: move check fo 3ds max sdk to external file 2023-09-04 15:01:12 +02:00
Dirk Olbrich 5582bb2d4c ifcmax: format and unify cmake 2023-09-04 15:01:12 +02:00
Andrej730 8b27c0e755 hotfix for ca4efa6e5 2023-09-04 16:33:02 +05:00
Andrej730 ca4efa6e50 Remove operator's name from set_tab tooltip #3704 2023-09-04 16:14:56 +05:00
Andrej730 cfac835607 bim.mep_add_bend
Added operator to create bend fittings between objects, it's still work in progress and now it only supports rectangular profiles.

Small demo - https://imgur.com/a/vM7hnJa
2023-09-04 15:42:45 +05:00
Andrej730 3aa72ae74a notify about unsupported transition case 2023-09-04 15:42:45 +05:00
Dion Moult 07579ee9a1 See #3700. Fix issue in drawing include filter where "addition" selections like GlobalIds and classes didn't have any impact. 2023-09-04 15:59:13 +10:00
Dirk Olbrich fe4823681f ifcgeom: fix compiler warning -Wunused-but-set-variable 2023-09-03 20:02:20 +02:00
Dirk Olbrich 6816ad5c0f ifcparse: fix compiler warning -Wignored-qualifiers 2023-09-03 20:02:20 +02:00
Dirk Olbrich aace987149 ifcgeom: fix compiler warning -Wreorder-ctor 2023-09-03 20:02:20 +02:00
Carlos Dias 339ab9eeab Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0 2023-09-03 12:33:20 -03:00
Thomas Krijnen eee844e204 Express rules: Workaround str case in IfcBlobTexture 2023-09-02 15:58:05 +02:00
Dion Moult 46cfe70181 You can now load 2D point clouds. 2023-09-02 16:31:08 +10:00
Dion Moult 294935ceed See #3682. You can now add symbols and multisymbols (i.e. one vertex per symbol) annotations. New default symbols for setout points in demo library. 2023-09-02 16:31:08 +10:00
Dirk Olbrich f2097b9036 cmake: fix PATHS syntax error closes #2632 2023-09-01 17:35:02 +02:00
Andrej730 e48a3a06c0 Fixed bug with adding obstruction fittings 2023-09-01 18:24:02 +05:00
Andrej730 c07371cb76 couple descriptions for setting north 2023-09-01 18:05:22 +05:00
Dion Moult 8d450aa500 Fix #3470. Fix bug where hppfcl for IfcClash was incorrectly bundled for Windows. 2023-09-01 22:14:09 +10:00
Dirk Olbrich 726c792fbe cmake: remove unused CONVERT_PRECISION closes #3672 2023-09-01 11:56:11 +02:00
Dirk Olbrich 83dda3e73f cmake: fix QT version number from merge conflict 2023-09-01 11:56:11 +02:00
Dirk Olbrich 5c78e29849 cmake: fix target versions closes #3671 2023-09-01 11:56:11 +02:00
Dirk Olbrich e6d48cd37f cmake: fix reset to ROOT_PATH back in 2023-09-01 11:56:11 +02:00
Dirk Olbrich a3ecde3ad9 cmake: reset wrong fix on merge conflict 2023-09-01 11:56:11 +02:00
Dirk Olbrich 2bb64a6cae cmake: fix order to set boost components 2023-09-01 11:56:11 +02:00
Dirk Olbrich 764c818d10 cmake: fix inline variable error 2023-09-01 11:56:11 +02:00
Dirk Olbrich 2d18185928 cmake: fix lowercase and duplicates from rebase 2023-09-01 11:56:11 +02:00
Dirk Olbrich 43468166d2 fix format of license block 2023-09-01 11:56:11 +02:00
Dirk Olbrich fbfd6bc485 refactor order of unify envvars 2023-09-01 11:56:11 +02:00
Dirk Olbrich 1578efe366 refactor conditional for 3ds Max SDK 2023-09-01 11:56:11 +02:00
Dirk Olbrich 76948c5156 add uninstall target 2023-09-01 11:56:11 +02:00
Dirk Olbrich 562ed5908d fix IFC_MAX check 2023-09-01 11:56:11 +02:00
Dirk Olbrich 9caac14014 make 3ds SDK search optional, order cmake options
# Conflicts:
#	cmake/CMakeLists.txt
2023-09-01 11:56:11 +02:00
Dirk Olbrich 695f75f3a7 fix missing capitalization 2023-09-01 11:56:11 +02:00
Dirk Olbrich 7d7c04ddc0 cmake format and unify file 2023-09-01 11:56:11 +02:00
Dion Moult 863bf8ebbe Fix bug where models that might have invalid shapes or 2D far shapes might break georeferencing and model loading. 2023-09-01 17:39:53 +10:00
Dion Moult 0fcc28f50c Minor fix 2023-09-01 17:33:33 +10:00
Dion Moult 04e9a08f3d IfcTester BCFs now include viewpoints for occurrences 2023-09-01 17:29:06 +10:00
Dion Moult 837c401116 Add filepath popup when saving IDS reports to BCF 2023-09-01 17:28:19 +10:00
Dion Moult b087d5125f Bump IOS 2023-09-01 16:55:18 +10:00
Dion Moult a6bff09c78 Update BBIM tester module UI to be compatible with new IfcTester upgrades 2023-09-01 16:47:55 +10:00
Dion Moult 4716c0b7b7 IfcTester now supports much more granular statistic reports and more detailed / beautiful HTML reports. 2023-09-01 16:46:49 +10:00
Dion Moult 1d040a170e Fix #3649. Increase profile threshold. 2023-08-31 23:04:55 +10:00
Dion Moult 951026a95c Fix #3667. Allow removing drawings if the sheet hasn't yet been generated or manually removed. 2023-08-31 22:36:18 +10:00
Dion Moult c6b82bfa56 Fix #3647. Fix bug where Windows .exe suffix needed to be explicit in commands. No more eval, and commands must now be provided in json form, and variables should be given as simple strings. 2023-08-31 22:28:33 +10:00
Sigma Dimensions (Yass) 01b6d90432 fix failed context for hotkey Shitf+C #3676 2023-08-31 11:14:53 +01:00
dushyant basson 504a116ebf Update src/qtviewer/ParseIfcFile.cpp
Co-authored-by: Thomas Krijnen <t.krijnen@gmail.com>
2023-08-31 10:17:30 +02:00
dushyant basson be785a878c Update src/qtviewer/ParseIfcFile.cpp
Co-authored-by: Thomas Krijnen <t.krijnen@gmail.com>
2023-08-31 10:17:30 +02:00
dushyant basson 5c2b7404d2 Revert "Updated included header files"
This reverts commit 65f86d929e.
2023-08-31 10:17:30 +02:00
dushyant basson 84e9e2396a Updated included header files 2023-08-31 10:17:30 +02:00
Dushyant Basson 7687d5e26e Added output panel (for debug info, etc.) 2023-08-31 10:17:30 +02:00
Dushyant Basson 25ce3b039e added IFCOS libraries; Qt include dir 2023-08-31 10:17:30 +02:00
Dushyant Basson 9c4c42e27e comment edit: Qt5 to Qt6 2023-08-31 10:17:30 +02:00
dushyant basson 26dd850ac1 added .cache to .gitignore 2023-08-31 10:17:30 +02:00
dushyant basson 0380c286a5 Rename files - fixing case change 2023-08-31 10:17:30 +02:00
dushyant basson 10aca77de4 Updated to use Qt6; Created initial structure of the viewer with OpenGL widget 2023-08-31 10:17:30 +02:00
Dion Moult b6f2fdef77 Fix #3531. See #3660. Exclude 2D elements from generating shapely surface polygons in drawings. 2023-08-31 18:14:06 +10:00
Thomas Krijnen 9cc1f5f0e3 #3660 Oops... propagate setting 2023-08-31 08:27:45 +02:00
Dion Moult adcf22f281 Fix #3002. You can now have metadata classes on projection lines. 2023-08-31 12:40:39 +10:00
Dion Moult ad0c49ac37 Bump IOS to take advantage of setSegmentProjection 2023-08-31 12:40:39 +10:00
Thomas Krijnen 73d77b8382 Update rule_executor.py - catch some runtime errors 2023-08-30 14:56:35 +02:00
Andrej730 3e45f39ea2 Fixed #3666 after 101972f 2023-08-30 17:43:11 +05:00
Thomas Krijnen a2bb015c79 Update validate.py - catch some runtime errors 2023-08-30 13:48:31 +02:00
Thomas Krijnen b231f43fc7 Update ci.yml 2023-08-30 11:38:28 +02:00
Thomas Krijnen 383038fdb4 Update ci-py-only.yml 2023-08-30 11:38:20 +02:00
Thomas Krijnen fbd8ea1edb #3660 setSegmentProjection() / --svg-segment-projection options 2023-08-30 10:57:33 +02:00
Dirk Olbrich 26e292dd34 docs: fix backslash in cmake command 2023-08-30 10:31:41 +02:00
Dion Moult c520e16031 Fix #3644. Annotation matrixes properly calculated now for RCPs. 2023-08-30 18:16:08 +10:00
Bruno Postle 101972fbad BlenderBIM keep view when switching git revision 2023-08-29 22:28:02 +01:00
Sigma Dimensions (Yass) f23ebc4031 fix issue where add materials operator would only show when a material is selected 2023-08-29 17:00:24 +01:00
Sigma Dimensions (Yass) 44431db092 fix toggle link selectability and visibility when linked IFCs use a relative path 2023-08-29 16:32:18 +01:00
Sigma Dimensions (Yass) d1b6c1ffe4 fix loading and unloading linked IFCs with a relative path 2023-08-29 16:30:29 +01:00
Sigma Dimensions (Yass) 4d98151b62 fix various issues by preventing data from linked IFCs to be saved in current project 2023-08-29 16:28:40 +01:00
Sigma Dimensions (Yass) 5e8e18e3b5 Maintain active status filters override when activating 3D model during drawing worfklows 2023-08-29 10:29:03 +01:00
Andrej730 808ff548ec IfcElementType now appears first in Object Metadata
Because it's seems more general workflow to create types than just assign classes.
Example - https://i.imgur.com/DD8twX3.png
2023-08-29 13:58:14 +05:00
Andrej730 bc9b482373 Rename IFC AU Library to IFC Furniture library
Just thought watching BIM Voice last video that some people may overlook it like something Australia specific with "IFC AU Library" name.
2023-08-29 13:58:14 +05:00
Sigma Dimensions (Yass) 4506eb0df9 fix removing drawings from sheets when deleting drawings #3645 2023-08-29 00:45:01 +01:00
Ryan Schultz 921d412fc7 Spreadsheet Import/Export: Fix feet and inch formatting 2023-08-28 10:11:24 -05:00
Andrej730 6089d3af78 shape_builder docs test 2023-08-28 16:14:05 +05:00
Christoph Mellueh b8168ca606 add build to Makefile and use it in bcf-pypi Workflow 2023-08-28 11:24:19 +02:00
Andrej730 61a7325bc0 fill-bg for text instead of the entire symbol by default #3594
Before - https://i.imgur.com/OsQycgW.png
After - https://i.imgur.com/rZvXIoT.png
2023-08-28 11:58:17 +05:00
Chetan c483116b32 Create constants ELEMENT_ARRAY_BUFFER and ARRAY_BUFFER to allow for more descriptive bufferview construction. Change the bufferViewId variable from a static variable to a member variable because python instances of IfcOpenShell can have multiple serializers open at any given time. This commit also includes some minor code reformatting and code comments explaining the changes done. Finally integer constants GLB_FILE_HEAER, GLB_JSON_HEADER, GLB_BINARY_CHUNK_HEADER were added to make the glb file header creation more descriptive 2023-08-28 08:46:11 +02:00
Chetan 55a623dc97 Give each accessor its own buffer view to improve the memory and rendering efficiency of the glb file 2023-08-28 08:46:11 +02:00
Sigma Dimensions (Yass) ad420108b0 run black and fix silly code #3652 2023-08-27 18:43:33 +01:00
Sigma Dimensions (Yass) 9944c7d2de you can now reload linked IFCs #3652 2023-08-27 18:21:19 +01:00
Sigma Dimensions (Yass) 1a8f2be4fd Move grids panel under Project Setup 2023-08-27 18:19:33 +01:00
Dion Moult 13f64fdfe2 Write documentation describing facet selector and element query syntax. 2023-08-27 22:32:41 +10:00
Dion Moult 38a9e29102 Bump IOS and enable unify inputs. 2023-08-26 22:11:54 +10:00
Dion Moult 3c23a57138 Minor fix to use new regex syntax in select similar dialog. 2023-08-26 18:26:03 +10:00
Dion Moult 7baed872c6 Minor fixes, and IfcCSV now uses pandas to import ODS/XLSX for more robust importing. 2023-08-26 18:24:48 +10:00
Dion Moult 9a7a284561 Selector element key queries now allow for regex matching, and single regex matches return that only item, not a list with one item in it. 2023-08-26 16:42:18 +10:00
Dion Moult e9c24a2656 Fix #3587. IfcCSV now supports custom formatting functions. 2023-08-26 15:15:34 +10:00
Gorgious56 5c73ef0a6d Fix #3641 : Error when creating roof type 2023-08-25 15:13:07 +02:00
Carlos Dias 6c29c53a72 Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0 2023-08-25 08:25:25 -03:00
Thomas Krijnen dadcbe61ea #3158 Fix unify inputs 2023-08-25 12:48:45 +02:00
Thomas Krijnen 93502a05ea Update draw.py --with-unify-inputs [True] 2023-08-25 12:43:32 +02:00
Andrej730 5ebde4c79a small info message on bim.get_representation_ifc_parameters
just to notify that it worked but haven't found any parameters
2023-08-25 12:16:40 +05:00
Dion Moult cf21ae22f1 Fix incorrect implementation of regex matching 2023-08-25 17:15:21 +10:00
Dion Moult cc500ae833 Fix #3635. Minor fix. 2023-08-25 16:59:08 +10:00
Dion Moult 256c0baa14 Accommodate invalid Revit models where they have invalid material relationships. 2023-08-25 16:52:00 +10:00
Dion Moult 66decc604e Fix failing tests and optimise brick tests. 2023-08-25 16:52:00 +10:00
Andrej730 356bc18078 fixed errors after 13309cb8c #3624
for example it was throwing errors when using WindowTool you selected a wall and it would try to assign current type to wall
2023-08-25 11:26:37 +05:00
rileywong311 1344cbc192 Update core/test_brick.py 2023-08-24 16:38:54 -07:00
rileywong311 e00ffb07ad Update tool/test_brick.py 2023-08-24 16:38:54 -07:00
rileywong311 dba43590a5 Fix bug where split screen selection from previous page is out of range on the next 2023-08-24 16:38:54 -07:00
rileywong311 a0613cfee6 Undo indentation from commit <e08283350> (did not account for no name existing) 2023-08-24 16:38:54 -07:00
rileywong311 c3de72b71a Fix Brick core
- Refresh viewer now reloads both screens by default
- Rename "add_namespace" to "add_brick_namespace"
- Fix error where "view_brick_class" was run instead of "brick.run_view_brick_class"
2023-08-24 16:38:54 -07:00
rileywong311 39fc60a482 Update core\tool.py for Brick 2023-08-24 16:38:54 -07:00
rileywong311 0d7e71a269 Fix Brick tool
- Data is now stored regularly and parsed in props
- "get_convertable_brick_spaces" returns a set
- "export_brick_attributes" always returns a tuple of strings
2023-08-24 16:38:54 -07:00
rileywong311 78a2f65ec3 Fix brick.feature
For one particular, I removed "And I set 'scene.BIMRootProperties.new_brick_relation_type' to 'hasPart'". Although it should really be "https://brickschema.org/schema/Brick#hasPart" to begin with, it was still failing the test. So removing it as a work around.
2023-08-24 16:38:54 -07:00
rileywong311 802bd74c52 Refactor UI get_brick_relations 2023-08-24 16:38:54 -07:00
rileywong311 33cf40debb Fix condition for hiding "view_brick_item" 2023-08-24 16:38:54 -07:00
rileywong311 ff63fd9f6f Rename 'add_brick_failed" to "add_brick_relation_failed" 2023-08-24 16:38:54 -07:00
rileywong311 5b207e6f54 Fix indentation for assign Brick reference 2023-08-24 16:38:54 -07:00
Gorgious 695dc6ec5a Fix #3636 : Check if representation class exists before testing if it's a circle extrusion representation 2023-08-24 20:42:42 +02:00
Sigma Dimensions (Yass) d3bcb8c6b9 updating a duration will not auto update schedule usage 2023-08-24 15:51:33 +01:00
Andrej730 6226aea3c3 Fixed bug adding ports to the transitions between profiles with an offset
end port ended up located without the offset
2023-08-24 18:22:03 +05:00
Andrej730 a30ad9b886 Fixed bug in shape_builder.mep_transition_calculate
it wasn't taking account that `h` can also end up negative
2023-08-24 18:22:03 +05:00
Andrej730 2b1e17681f Fixed bug with segments incorrectly adjusted after adding transition
If transition was really long comparing to segments length then DumbProfileJoiner.join_E would start change their their length in unexpected way - ATSTART when you'd still expect ATEND and vice versa.

Also fixed the bug when segments length was incorrectly calculated - it wasn't calculating it world space when it makes more sense here to calculate it by local segments Z axis.
2023-08-24 18:22:03 +05:00
Dion Moult 8f25a31f19 Fix more failing tests. 2023-08-24 23:03:43 +10:00
Sigma Dimensions (Yass) 1c7e6cf1b9 fix bug where nested resources in task ICOM panel didn't show 2023-08-24 13:58:18 +01:00
Sigma Dimensions (Yass) fc7459c07f Resource Features :
- Adding/removing and edit productivity data is now easier (+ cleaner UI)
- Pressing calculate schedule work on a parent resource will default to calculating its nested resources schedule work.
- Show derived Schedule Work for a parent resource
- Improve apperance of Resource Tree Structure
2023-08-24 13:43:25 +01:00
Gorgious56 8f6932de64 Prevent user from editing the mesh of a circle based extrusion 2023-08-24 14:16:59 +02:00
Dion Moult b708100c03 See #3581. Fix failing IOS tests. 2023-08-24 22:12:44 +10:00
Christoph Mellueh d4e2d3d2dd rename File and unify with ci-ifctester-pypi 2023-08-24 21:05:54 +10:00
Andrej730 13309cb8c4 Fixed #3624 - tools props were updating only for BIM Tool
It wasn't taking into account WallTool, BeamTool and all other tools we have.
2023-08-24 15:42:23 +05:00
Andrej730 5a4bc0909b Update currently selected ifc class and type on selecting object
Had this idea for awhile now and heard it multiple times from other people. Please give feedback if this feature gets in the way instead of helping.

Example - https://imgur.com/a/K4hz2FB
2023-08-24 15:20:36 +05:00
Andrej730 39540e5794 A button to jump back from boolean to the original object
Example - https://imgur.com/a/A3dVbFM
2023-08-24 14:29:42 +05:00
Dion Moult 0a0f977b5c Fix #3632. Make search and CSV UIs share the same Blender props for DRY. 2023-08-24 17:01:25 +10:00
Dion Moult 13a75e7ad7 You can now reorder columns in IfcCSV 2023-08-24 13:56:43 +10:00
Dion Moult 99574d6255 Loading IFCs now prioritise 2D bodies over 3D non-bodies. This helps prevent loading and seeing a bunch of Box / Clearance representations. 2023-08-24 13:24:08 +10:00
Dion Moult 968cceb725 Fix #3627. Bug where exclude didn't take into account entities are "OR" not "AND". Whoops. 2023-08-24 11:50:48 +10:00
Sigma Dimensions (Yass) 002985a446 run black 2023-08-23 21:21:19 +01:00
Sigma Dimensions (Yass) 5adc29b0b3 Feature to calculate required resources 2023-08-23 21:21:03 +01:00
Sigma Dimensions (Yass) 52ea4ff44d Calculates the number of resources based on required person-hours. 2023-08-23 21:19:16 +01:00
Sigma Dimensions (Yass) 4e31a87c20 clean up Resource UI using column layout 2023-08-23 21:15:59 +01:00
Jesusbill 5d85390715 Fix duplicate id in EP_set_Drawing template 2023-08-23 17:01:25 +02:00
Andrej730 3e13eb8942 bump ifcsverchok release in readme 2023-08-23 18:43:27 +05:00
Andrej730 262c6d1fcb added UI to display connections for realizing elements
Example - https://imgur.com/a/1ZZlTwp
2023-08-23 18:42:07 +05:00
Andrej730 12b5a88861 Added small UI to show realizing elements for the connections
Example - https://i.imgur.com/JLDcnbK.png
2023-08-23 18:42:06 +05:00
Andrej730 2ccc9d886e test to make sure nothing happened to ifcsverchok 😅 2023-08-23 18:42:06 +05:00
Andrej730 a78769c8ff a bit faster renaming ifc elements when renaming blender objects
Previously when you renamed blender object it was requiring the "Ifc.../" prefix so it would also change the name for ifc element. So when you wanted to rename something you'd only select and change the name part without prefix.

Now you can just type the name right in after using F2 which seems a bit quicker by a few less clicks.

Before - https://imgur.com/a/Rn7a17W
After - https://imgur.com/a/a3lmxte
2023-08-23 18:42:06 +05:00
Andrej730 1a142ad5eb fixed bug in mep transitions
it wasn't taking into account that offset can be too big to sustain the angle
2023-08-23 18:42:06 +05:00
Andrej730 2bc22e150c added tests for shape builder transition length calculator 2023-08-23 18:42:06 +05:00
Sigma Dimensions (Yass) aad5d280fd you can now also update resource numbers (usage) from the task ICOM resource list 2023-08-23 14:13:16 +01:00
Sigma Dimensions (Yass) 7ab07ed149 refactor highligh_task code 2023-08-23 14:04:39 +01:00
Dion Moult 3690998dbc Fix #3620. Bug where manually inserted windows should preseve the existing Z value. 2023-08-23 23:03:13 +10:00
Sigma Dimensions (Yass) 1b83fcc1c7 when editing sequence relationships, enabling selecting successor and predecessor task 2023-08-23 14:02:53 +01:00
Sigma Dimensions (Yass) 5cf25c45f9 feature to select a resource in resource tree from task ICOM list 2023-08-23 13:59:31 +01:00
Dion Moult efa734c06e Fix #3628. Minor issue where regex queries didn't load properly. 2023-08-23 22:42:21 +10:00
Dion Moult e242244ec0 The copy property tool now works on enumerated properties. Hooray for copying over statuses! 2023-08-23 17:47:20 +10:00
Andrej730 6f9da163fb Small fix for 422f772c4 2023-08-23 12:32:37 +05:00
Dion Moult a3fd169bb6 IfcPatch now uses the new facet selector syntax. 2023-08-23 17:10:17 +10:00
Dion Moult 899056f929 Due to popular demand, custom EPset_Status to be used for "userdefined" status values as well as for things which don't have a status. 2023-08-23 17:10:17 +10:00
Dion Moult 132fef1b76 New Status panel for managing statuses in the costing / scheduling tab. 2023-08-23 17:10:17 +10:00
Andrej730 422f772c40 Fixed bug with remembering materials assigned to faces
The problem was that bim.update_representation was assigning representation styles without taking into account that some styles may not be actually used in the mesh, so it was always assigning first style (blender material) to the first IFCPOLYGONALFACESET even though it might be using for example the 3rd style.

More - https://community.osarch.org/discussion/1636/materials-not-remembering-their-assigment
2023-08-23 11:07:57 +05:00
Sigma Dimensions (Yass) 66f5081ada implement calculating task duration based on resource usage change for fixed person-hours and prevent constrained attributes from updating 2023-08-23 02:19:44 +01:00
Dion Moult 839e35f1da Fix #3627. Error where using filters incorrectly applied includes / excludes. 2023-08-23 11:15:38 +10:00
Sigma Dimensions (Yass) 40d9713326 consolidate constraint utilities into ifcopenshell.util.constraint and refactor 2023-08-23 02:11:18 +01:00
rileywong311 17b04ad697 Update Brick feature tests 2023-08-22 13:15:01 -07:00
rileywong311 2f99dd8e98 Catch Assign_Brick_Reference with no selections 2023-08-22 13:15:01 -07:00
rileywong311 49f825ba82 Refactor+polish Brick UI 2023-08-22 13:15:01 -07:00
rileywong311 3f18ad0bc5 Use "split" in Brick relations list to better align layout 2023-08-22 13:15:01 -07:00
rileywong311 991c42e816 Update Brick References Panel 2023-08-22 13:15:01 -07:00
rileywong311 20d6eae50a Export/assign Brick library reference uses "label" if there is one 2023-08-22 13:15:01 -07:00
rileywong311 9740582a84 Brick UI relations list uses "label" if there is one 2023-08-22 13:15:01 -07:00
rileywong311 a8046a6d69 Restore Brick select ifcGlobalID functionality 2023-08-22 13:15:01 -07:00
rileywong311 d6655a5c14 Move Brick "set last saved" to BrickStore 2023-08-22 13:15:01 -07:00
rileywong311 0a3a2db4ae Simplify buttons for add Brick relations manually 2023-08-22 13:15:01 -07:00
rileywong311 499eb5ea14 Rework Brick UI into toggle panels 2023-08-22 13:15:01 -07:00
rileywong311 b8ca287883 Fix up convert_ifc_to_brick
Remove line separation between code, but add comments
Add full URI to Brick relations
Fix typo where "system_uris" was written as "space_uris"
Remove unnecessary get of "distribution_elements = brick.get_convertable_brick_elements()" again
2023-08-22 13:15:01 -07:00
rileywong311 52f3392ece Remove Brick data debugging printouts 2023-08-22 13:15:01 -07:00
rileywong311 d53641ce5e Check Brick library location exists 2023-08-22 13:15:01 -07:00
Sigma Dimensions (Yass) 7a3ad6c3a1 forgotten bits and bobs + run black 2023-08-22 20:03:09 +01:00
Sigma Dimensions (Yass) 0b2007011e Feature to constrain a resource work or number of used resources 2023-08-22 20:01:19 +01:00
Sigma Dimensions (Yass) eae6983ca5 Fix calculating resource work based from parent's productivity and improve UI to show this 2023-08-22 19:54:37 +01:00
Sigma Dimensions (Yass) 0ec337748f improve purge of remove_metric usecase 2023-08-22 19:36:01 +01:00
Sigma Dimensions (Yass) 2699278ba3 api usecase to add a reference path to a metric objective 2023-08-22 19:34:47 +01:00
Sigma Dimensions (Yass) 0406166d8a fix updating an objective's metric 2023-08-22 19:21:26 +01:00
Andrej730 2128eda87b Save blenderbim last commit hash to the ifc header
Now it's possible to identify blenderbim version from .ifc file which is useful for debugging

Example:
FILE_NAME('test.ifc','2023-08-22T18:07:07+05:00',(),(),'IfcOpenShell v0.7.0-fc50bdd3a','BlenderBIM 0.0.999999-64bc7af','Nobody');
2023-08-22 19:59:46 +05:00
Carlos Dias 59e11aa804 Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0 2023-08-22 11:14:04 -03:00
Dion Moult 21f4fb169f New util function to format a length value in preparation for custom formatting rules in drawings and schedules. 2023-08-22 23:12:37 +10:00
Thomas Krijnen 30fc52ebd9 #3616 Only consider distance orthogonal to projection vector for 2d boolean preprocessing 2023-08-22 15:00:25 +02:00
Andrej730 64bc7af4ef mep transitions - correct angle when connected segments share the same dimensions
Basically there are 3 methods to define the transition angle (https://i.imgur.com/AtCIJty.png). Before we supported only the second method, now we support 1 and 3 too.
2023-08-22 16:06:24 +05:00
Dion Moult b3f1fc667a IfcCSV can now create summary rows (e.g. total, average) at the end of the table (may or may not be in addition to group totals). 2023-08-22 21:04:59 +10:00
Dion Moult fcbb28f9d8 When you force an object to be a tessellation, automatically remove all parametric constraints for you. 2023-08-22 17:32:29 +10:00
Dion Moult 240a31db3a Fix bug where split elements by plane didn't work on multiple elements due to forgetting to toggle normals of the cutting plane. 2023-08-22 17:31:54 +10:00
Dion Moult c1bde09585 IfcCSV now supports grouping and group operations like concat, sum, min, max, etc. 2023-08-22 15:43:31 +10:00
Dion Moult 5dd2b5e555 New support for sorting IfcCSV outputs 2023-08-22 14:32:26 +10:00
Dion Moult 37dcb92220 Drawing include/exclude filters now use the new facet selector syntax 2023-08-22 11:31:18 +10:00
Dion Moult 6c43c60d04 Drawings now can include non-drawing specific annotations too. 2023-08-22 11:30:48 +10:00
Dion Moult b8d191ac1c Now support custom queries for advanced users in the facet selector (similar to old selector). Also support types and count keys. (e.g. filter by objects with zero types, or zero materials, etc). 2023-08-21 23:44:20 +10:00
Dion Moult 57173c7740 You can now get specific container types via util.element or util.selector. E.g. if you wanted to know what building an object is in or what storey an object is on. 2023-08-21 23:07:02 +10:00
Andrej730 2d3295ec54 more work on transitions for MEP
- support transitions from and to circle profiles
- reworked transition length algorithm now it should be more accurate
- added support for creating transitions between profiles that are parallel but not collinear
2023-08-21 17:56:17 +05:00
Andrej730 941ede117c show error if transition length is more the segments length 2023-08-21 17:56:17 +05:00
Andrej730 4210b8333f fix the errors occured trying to find compatible fitting type
1) It would stop if the first occurence would be connected to a segment without type
2) It would raise an error if one of the fitting's ports was not connected.
2023-08-21 17:56:17 +05:00
Sigma Dimensions (Yass) 1723d1e5a9 Update tests for editing sequence relationships 2023-08-21 13:43:43 +01:00
Sigma Dimensions (Yass) 3ee06ee7a0 remove unused function 2023-08-21 13:41:42 +01:00
Sigma Dimensions (Yass) d3e8da58dc stop committing print statements 2023-08-21 13:30:20 +01:00
Sigma Dimensions (Yass) 29e000b939 clean up updating selected task ICOM and UI re-ordering for work schedule subpanels 2023-08-21 13:28:08 +01:00
Sigma Dimensions (Yass) 6686a72d1f editing sequence relationships now requires less clicks 2023-08-21 13:24:36 +01:00
Sigma Dimensions (Yass) 7dd20f69d7 ligten up add cost schedule UI 2023-08-21 01:13:17 +01:00
Dion Moult 0044ef5588 Close #3615. Follow (terrible, unofficial) convention that boolean result is intentional and boolean clipping result is automated. 2023-08-21 08:53:14 +10:00
Dion Moult ffa5686b22 Fix #3614. Remove_pset API now supports removing predefined property sets (E.g. door lining properties). 2023-08-21 08:44:24 +10:00
Sigma Dimensions (Yass) ab8d6bea99 update sequence tool functions 2023-08-20 23:02:31 +01:00
Sigma Dimensions (Yass) e7bb89f582 You can now save and load 4D animation color schemes 2023-08-20 21:39:00 +01:00
Dion Moult c80b0464e5 Fix #3551. Project specific pset templates now show up in the pset template editor. 2023-08-20 23:51:38 +10:00
Dion Moult 7e3547b309 Fix #3610. Glitch where editing existing float cells in IfcCSV ODS files created new cells or didn't update. 2023-08-20 23:42:11 +10:00
Dion Moult 45c7432ff7 Minor fix 2023-08-20 22:53:32 +10:00
Dion Moult c98c20d403 Fix #3583. BaseQuantity QTOs in IFC4 can now be set on types. 2023-08-20 20:50:46 +10:00
Dion Moult d26a2580ea Fix #3605. Bug where invalid representation type was created when booleans are added / removed. 2023-08-20 17:12:01 +10:00
Dion Moult f84c4ab2e5 IfcCSV now supports importing from ODS, XLSX, and Pandas dataframes in addition to CSV 2023-08-20 16:55:01 +10:00
Dion Moult de6676a516 Fix #3609. IfcCSV can now optionally attempt to "preserve" formatting for XLSX and ODS. 2023-08-20 16:34:42 +10:00
Dion Moult bfbb7bec94 Fix #2973. Bundle pandas, openpyxl, and odfpy in preprataion for upgrades in IfcCSV and IfcFM. 2023-08-20 15:28:09 +10:00
Dion Moult ac00aaae4d Fix #3607. IfcCSV now supports omitting the GlobalId column. This is great for presentation schedules, but the tradeoff is that you can't use it for imports. 2023-08-20 14:41:34 +10:00
Dion Moult 422222a7cb Bump IOS 2023-08-19 23:13:25 +10:00
Dion Moult e1c7b37d62 See #3587. IfcCSV now supports custom header titles. 2023-08-19 23:09:40 +10:00
Ryan Schultz dec978743b small fix on 'Live development environment' instructions 2023-08-18 13:15:35 -05:00
Sigma Dimensions (Yass) 10fae033c8 fix saving and loading coulour schemes 2023-08-18 17:09:00 +01:00
Sigma Dimensions (Yass) b23180d287 fix enumartion of saved searches 2023-08-18 17:08:01 +01:00
Gorgious56 99ccd81b3f You can now purge unused representations from the purge data panel 2023-08-18 16:20:41 +02:00
Gorgious56 e2d3f3a351 You can now purge types from the Purge data panel
And refactor a bit the purge profiles code to make use of the profile tool module
2023-08-18 16:04:08 +02:00
Dion Moult 5e6a444aa2 Advanced users can now directly edit search filter queries. 2023-08-18 23:39:13 +10:00
Dion Moult 72cf5cfc59 Minor fix to allow edit_work_time to work seamlessly for IFC4X3. 2023-08-18 23:01:24 +10:00
Andrej730 75cb68d2f1 Refactored svg angle decorator code, solves #3602, more constistency between viewport and svg
Now it should be more consistent and more stable since svg and viewport are now using much more similar approach.
2023-08-18 17:59:40 +05:00
Dion Moult 7f40a9d723 See #3603. Base64 encode gantt chart JSON data to prevent JSON parsing problems. 2023-08-18 22:19:27 +10:00
Andrej730 dcc9d0e9cd set_objects_selection to set selection only if active_object is not None
It was creating errors if you'd try to add angle annotation without having any objects active.
2023-08-18 15:37:04 +05:00
Sigma Dimensions (Yass) 7228329f5e Start improving UI for clash detection and management 2023-08-18 11:04:21 +01:00
Gorgious56 d8786717b6 Active profil users count is now dynamically fetched when the profile is clicked in the UI list 2023-08-18 09:43:46 +02:00
Andrej730 b73bd3506f Fixed clearing scales (after 3345d7e)
It was producing a bug with text rotation in elevation view
Added fix to make matrix normalization work for the cases when matrix is rotated and I've just found that mathutils.Matrix.normalize(d) is very conveniently ignoring 4th column (translation) (same for mathutils.Vector)
2023-08-18 12:05:53 +05:00
Andrej730 bdb2791b35 Fill-bg for template tags #3594
Also simplified create_text_tag a bit - now it adds fill_bg by just by copying text tags and adding fill_bg filter to them instead of going through the entire logic again.
2023-08-18 12:04:42 +05:00
Dion Moult 549ea11945 Support arbitrary element selection for manual groups in search / IfcCSV, with support for huge element selections. 2023-08-18 16:58:07 +10:00
Dion Moult aed01b5703 IfcCSV can now use the graphical filter query builder too. 2023-08-18 13:43:42 +10:00
Dion Moult 13eb8562e0 Add support for converting IFC spaces, systems, and feed / location / part relationships into Brick. Brick utilities can now get downstream equipment, and system util can now take into account port flow direction. 2023-08-18 10:25:06 +10:00
rileywong311 c022a12835 Support displaying Brick Bnode relations
- Important for Ifc External References and other data.
- Set predicate_uri of predicates of the Bnode to None, which is used to remove the ability to delete the relationship in the UI.
- Also added try/excepts to difficult edge cases such as the object_uri not having a "#" character in it (such as "<http://qudt.org/vocab/unit/>") and the object_uri not being a brick class, which breaks "view_brick_item".
- Removing a Bnode type from the entity's relation removes all relations of the Bnode also
2023-08-17 16:19:49 -07:00
rileywong311 04eb47ff65 HIde Brick "Create Relation:" when not toggled 2023-08-17 16:19:49 -07:00
rileywong311 10ecd16f0c Refresh Brick split screen on ConvertIfcToBrick 2023-08-17 16:19:49 -07:00
rileywong311 75852bfa75 Rework "view brick item" conditional access
Change from never show the operator if the relation is "type" to not showing it only if the "type" is the current class being viewed.

This may come in handy if other list views other than hierarchy are implemented.

It also implies why we don't want to show "view brick item" here: because we already viewing it.
2023-08-17 16:19:49 -07:00
rileywong311 750c720c9b Support Add Brick with IfcEntity selected (part 2 aka references)
Can now assign references again.
See https://github.com/BrickSchema/Brick/tree/master/examples/ifc for examples.
2023-08-17 16:19:49 -07:00
rileywong311 4697681fcb Support Add Brick with IfcEntity selected (part 1)
Next is to add the reference
2023-08-17 16:19:49 -07:00
Dion Moult 9398363cbf Fix #3589. Users can now configure how the null values are represented in IfcCSV. 2023-08-18 08:50:48 +10:00
Massimo Fabbro ae45e6b960 Clone opening initial draft 2023-08-18 08:30:36 +10:00
Gorgious 88c002703e Move profile data and inverse check in data class 2023-08-17 21:00:03 +02:00
Gorgious56 51c78a89bd simplify ifc class suggestions json file and operator 2023-08-17 17:31:00 +02:00
Gorgious56 e36a958c0d Scene properties : Highlight buttons to make them stand out more (#3598) 2023-08-17 16:56:26 +02:00
Gorgious56 a8126a6f90 You can now purge unused profiles 2023-08-17 16:26:21 +02:00
Dion Moult 9b857cdefa Fix #3596. Fix bug where objects marked as edited were not unmarked after saving when toggling mode. Also fix bug where updating representation didn't check whether or not the meshlike representation has openings applied (which would bake the openings, instead of leaving them dynamic). 2023-08-18 00:04:02 +10:00
Gorgious56 90e6400115 Active Profile's inverse relationships count is now displayed in the profiles editor 2023-08-17 15:44:37 +02:00
Dion Moult 2dcfcf9708 Fix #3591. Fix bug where IfcCSV import was not symmetric capability wise. Now you can set all sorts of complex values with the exact same keys you are using to query. 2023-08-17 23:33:40 +10:00
Thomas Krijnen f4971da42e #3429 Fix b operand non-planar face check 2023-08-17 11:28:02 +02:00
Andrej730 008f953b6c Fix tests errors after 8689164
Error was AttributeError: module 'blenderbim.bim.handler' has no attribute 'setDefaultProperties'
2023-08-17 13:18:27 +05:00
Andrej730 5481237480 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.
2023-08-17 13:18:27 +05:00
Andrej730 4f7564e5ae misspelling 😅 2023-08-17 13:18:27 +05:00
Dion Moult d214cbaece Fix #3590. Update dev instructions to symlink other utility libraries in BBIM. 2023-08-17 17:37:37 +10:00
Dion Moult d0c5f1e69f Fix #2626. New IFC overrides for setting object origins. 2023-08-17 17:25:40 +10:00
Massimo Fabbro 4ba3240fb4 fix #3213 Problem related with sheet created on windows and opened on Linux 2023-08-17 16:22:16 +10:00
rileywong311 6d8e5e4c83 Merge Brick classification
https://github.com/rileywong311/BrickIfcClassification
2023-08-17 16:21:29 +10:00
rileywong311 cd1402570b Merge IfcClassification
https://github.com/Moult/IfcClassification/tree/master
2023-08-17 16:21:29 +10:00
Sigma Dimensions (Yass) 6c0e528dd2 enable an object to take part in an object type decomposition #3592 2023-08-16 16:08:27 +01:00
Dion Moult 297a513d21 Don't strictly require guids / class filters that exist in new facet selector. 2023-08-16 14:05:26 +10:00
Andrej730 9f0a4ba064 Calculate/guess quantity descriptions to avoid confusion 2023-08-15 14:42:31 +05:00
Dion Moult 8813ed66e0 See #3582. Fix bug where switching representations didn't handle curves in a body / model_view.
This means that if you created a curve body, you couldn't switch to it, or if you deleted everything, you ended up with an empty object. If you then tried to switch to that, it would "sync" the empty object and leave you with an empty cartesian point list. E.g:

 1. Create cube and assign IFC element.
 2. Remove all faces only (leaving edges and verts). Save changes.
 3. Switch to representation (bug!)
 4. Delete everything (no verts, edges, or faces). Attempt to save.
 5. "Revert" switch will fail, leading to empty mesh.
 6. Manually try to switch. Empty mesh will sync, creating an empty point list.
2023-08-15 18:06:16 +10:00
Andrej730 fafcd5dfca root.copy_class to remove connections from previously connected ports 2023-08-15 10:35:36 +05:00
Carlos Dias 155a8b79da Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0 2023-08-14 22:10:54 -03:00
Dion Moult f523870b57 Fix #3584. Support matching enumerated properties in new facet selector. 2023-08-15 09:59:50 +10:00
Sigma Dimensions (Yass) 2ed24434c8 experimental import plot coordinates 2023-08-14 18:22:11 +01:00
Andrej730 6878b2c072 Handle ods schedules without column styles #3573
Turned out there are ODS files (and turned out we're producing them ourselves from ifccsv) where column styles are not defined and therefore no width/style assigned to each column which was resulting in errors on building schedule.
2023-08-14 17:46:10 +05:00
Dion Moult 0ed8dc970d New simplified IfcFM parser for basic object data. 2023-08-14 16:14:57 +10:00
Andrej730 bc85f09109 Small info message on using validate 2023-08-14 11:09:26 +05:00
Andrej730 793b28e43b Remove empty IfcDocumentInformationRelationship #3581 2023-08-14 11:09:26 +05:00
Dion Moult ed4abacd1e Fix #3578. Support querying surface styles in tools like IfcCSV. 2023-08-14 11:55:15 +10:00
Dion Moult 8bf55ab46c See #3561. Misc annotation decorator now only highlights non-internal edges. 2023-08-13 23:34:06 +10:00
Dion Moult 7edabce657 Fix #3562. Non-manifold geometry is no longer considered in join criteria as there is no such thing as a closed polygon. 2023-08-13 23:04:32 +10:00
Sigma Dimensions (Yass) 56187e4da3 Improve Cost Schedule Layout 2023-08-13 13:23:31 +01:00
Sigma Dimensions (Yass) 31a12faef1 woopsies 2023-08-13 12:18:48 +01:00
Sigma Dimensions (Yass) eb94c16465 fix the bug fix #07b5c49 - where counting objects controlled by a cost item stopped working 2023-08-13 12:16:29 +01:00
Dion Moult e8437a9c54 Fix #3253. Bug where duplicating elements with fillings incorrectly recreated fillings at the cursor (i.e. the cursor was used as a target destination).
Now, instead of trying to be clever and regenerating filling locations and opening types, we simply copy the existing scenario. This also means it'll be more stable for weird fillings coming from proprietary apps.
2023-08-13 20:07:33 +10:00
Dion Moult 840039ef1e Fix #3472. You can now toggle selectability of linked IFCs. 2023-08-13 15:49:23 +10:00
Dion Moult 84a749605e See #3579. Support Google Colab as an installation option. 2023-08-13 14:48:49 +10:00
Bruno Postle c1283d2ab0 fix SyntaxError: '(' was never closed 2023-08-12 21:36:40 +01:00
Sigma Dimensions (Yass) 07b5c4918b fix api logic where only quantities of the same type can be assignmed to a cost control 2023-08-12 15:17:32 +01:00
Sigma Dimensions (Yass) 703f0a6b70 fix orphaned data when unassigning element quantities from cost item control 2023-08-12 14:57:01 +01:00
Dion Moult 5e98dee46f Fix #3554. Support editing IfcIndexedPolyCurve profiles where IfcLineIndex has >2 indices. 2023-08-12 22:25:34 +10:00
Sigma Dimensions (Yass) b2eddf55d2 Fix contracting/expanding cost schedule tree and add tests to avoid proof changes 2023-08-12 12:58:16 +01:00
Massimo Fabbro db7be640d4 Fix #3569 Variable name override caused the bug (#3575) 2023-08-12 19:03:58 +10:00
Dion Moult 04fa597844 Fix #3564. Bug where IfcBuiltSystems didn't show up due to missing icon in IFC4X3. 2023-08-12 17:09:48 +10:00
Dion Moult 694dbeb96c Fix #3576. Explicit drawing annotations are now immune to "include / exclude" filters. 2023-08-12 17:06:22 +10:00
Dion Moult 7afd358c3c Fix #3556. Bug where quantities could not be imported using IfcCSV. Also make IfcCSV support any qset name, not just "Qto" prefixed names. 2023-08-12 16:41:57 +10:00
Dion Moult b0a5a570a9 IfcCSV now uses the new filter query system. 2023-08-12 16:40:59 +10:00
Dion Moult c45b84c850 Fix #3577. Don't force uppercase in schedules. 2023-08-12 16:16:51 +10:00
rileywong311 d575a43aee Make refresh Brick viewer refresh both screens 2023-08-11 16:14:41 -07:00
rileywong311 0b151ea559 Second level query for Brick equipment+point roots 2023-08-11 16:14:41 -07:00
rileywong311 926970b256 Polish Brick UI and add "last saved" label 2023-08-11 16:14:41 -07:00
rileywong311 d58af0bfa5 Filter Brick class if deprecated 2023-08-11 16:14:41 -07:00
rileywong311 429da7c6f3 Filter more (all) Brick ontology namespaces
I'm not sure if this method of filtering out the entire domain will cause problems. This could use investigation.
2023-08-11 16:14:41 -07:00
rileywong311 60a7433573 Clear Brick breadcrumbs on close project 2023-08-11 16:14:41 -07:00
rileywong311 08a5d444d4 Remove another needless BrickStore.graph.triples check
As before, this returns a generator type which always evaluates true, even if it is empty.
2023-08-11 16:14:41 -07:00
rileywong311 1982069b69 Add description to Brick operators 2023-08-11 16:14:41 -07:00
rileywong311 7c06c65df3 Move Brick "set root" button and change roots on update instead of operator 2023-08-11 16:14:41 -07:00
Sigma Dimensions (Yass) 6263766202 fix Cost schedule of rates UI bug where linked types dont't refresh correctly (and black formatting) 2023-08-11 14:57:43 +01:00
Dion Moult 66fbbeff54 See #3561. Fix bug where schedules couldn't be removed. 2023-08-11 22:47:42 +10:00
Dion Moult 3c5ad1328f Auto create relevant context when attempting to add an annotation to make it friendlier for new users. 2023-08-11 22:41:47 +10:00
Dion Moult 3345d7e088 Fix #2894. Implement reflected ceiling plans. Note that this requires new bot build. 2023-08-11 22:41:47 +10:00
Dion Moult 2bb25cb874 See #3501. Minor matrix math fix that caused annotations to not appear in global coordinates. 2023-08-11 22:41:47 +10:00
Dion Moult 444a728e7a Improve default search filter to include types and spatial elements. 2023-08-11 22:41:47 +10:00
Sigma Dimensions (Yass) 70bea0c865 Feature to add a camera to extents of the scene objects 2023-08-11 13:39:58 +01:00
Sigma Dimensions (Yass) 6eea1e9035 feature to clear previous 4D Animation (object keyframes & colors) 2023-08-11 13:36:14 +01:00
Kristoffer Andersen 4deb1836ad Update bld.bat
reduce number of schema variations on windows as well
2023-08-11 11:42:08 +02:00
Kristoffer Andersen 4c8007dcfe Update meta.yaml
pin compatible boost, occt and cgal-cpp
2023-08-11 08:44:25 +02:00
Kristoffer Andersen 000116bb3d Update build.sh
limit number of schema variants
2023-08-11 08:22:52 +02:00
Dion Moult a2b6f21c7a See #2894. Implement SVG mirroring options (typically used for RCPs or useful when converting to other things like DXF). 2023-08-11 16:01:01 +10:00
Sigma Dimensions (Yass) a374ee39d3 simplify setup_default_task_columns 2023-08-11 02:06:49 +01:00
Sigma Dimensions (Yass) 0f5c82dffd animation settings now use human readable durations to make it less confusing 2023-08-11 02:05:37 +01:00
Sigma Dimensions (Yass) 268fed761e simplify updateTaskDuration 2023-08-11 02:03:07 +01:00
Sigma Dimensions (Yass) fe01d252db WIP - Scheduling UI improvements 2023-08-10 22:07:34 +01:00
Sigma Dimensions (Yass) dc36d74337 Hide Header for Costing and Schedule Tab 2023-08-10 16:36:35 +01:00
Sigma Dimensions (Yass) 7a0da7bd8e Revert "Rename and move sub panels of Costing and Schedule Tab"
This reverts commit 9d4715c0a9.
2023-08-10 16:20:13 +01:00
Andrej730 530d5a4e63 plug add_transition to fit_flow_segments 2023-08-10 17:37:52 +05:00
Andrej730 2d847d1704 Adjusting connected elements on bim.regenerate_distribution_element
Basically commented out automatic adjustment after 45f81b478 - now it's hapenning only when you decide to regenerate it.

It's adjusting connected segments extrusion and location, for all other elements besides segments it's adjusting only location. The idea is it will try to change as less as possible.

Demo - https://imgur.com/oZ1I2Bl
2023-08-10 16:31:08 +05:00
Andrej730 631d8fcfb1 quickly connect mep elements if they have matching ports
Demo - https://imgur.com/a/o9u8M1u
2023-08-10 15:06:16 +05:00
Andrej730 a8888efb88 fixed bug getting port relating element in ifc2x3 2023-08-10 14:12:20 +05:00
Andrej730 a51ecea9b1 More descriptive error message on attempt to delete drawings category 2023-08-10 13:55:46 +05:00
Andrej730 4d49517111 small refactor 2023-08-10 13:49:35 +05:00
Thomas Krijnen d5d1b3567b Update draw.py --include-curves 2023-08-10 15:44:21 +08:00
Kristoffer Andersen 7827ce3448 Update build.sh
fix env var declaration
2023-08-10 08:22:07 +02:00
Kristoffer Andersen a05059db01 Update build.sh
Reduce number of schema versions
2023-08-10 08:06:38 +02:00
Thomas Krijnen b78490ca56 #3510 Sample points along diagonal as well for quick and dirty occlusion detection 2023-08-10 10:52:06 +08:00
Andrej730 f8ffc97bf5 remove_product to also remove psets for types 2023-08-09 16:37:47 +05:00
Andrej730 29d4a8d5fe More Ports UI
Created more UI for ports.

Now you can see the list of ports from UI and what objects they are connected to, you can quickly select any ports/connected objects or disconnect objects.

From port UI you can see what object's it located on and what object it's connected to and quickly jump across them.

Demo - https://imgur.com/a/Gu4Vz7V
2023-08-09 15:04:27 +05:00
Andrej730 2c1c13f27e bim.add_transition
Added simple operator to add transition between two mep segments (now only rectangular collinear segments are supported).
It also reuses the transition type that was previously used to connect segments of the same type.

Demonstration - https://imgur.com/a/c1AOxj1
2023-08-09 15:04:27 +05:00
Andrej730 4dc55e844c Fix default mep profile names
Previously it was generating names like 4000000x4000000 in mm projects.
2023-08-09 14:46:58 +05:00
Thomas Krijnen b611151039 #3536 fix edge segments in world coords 2023-08-09 14:55:23 +08:00
Dion Moult 9fc32e5c2e IfcTester JSON reporter now also stores identification data separately for convenient reporting. 2023-08-09 16:42:03 +10:00
Dion Moult c5e5036fd3 Store applicability in IfcTester JSON results 2023-08-09 15:00:58 +10:00
Dion Moult 0f68679295 Fix #2753. Disable mapping representations when appending assets via the ExtractElements recipe to be more forgiving (and faster) on invalid models. 2023-08-09 00:13:16 +10:00
Dion Moult fea0d93162 Fix SurfaceColour typo that broke loading colours in some IFCs 2023-08-08 23:47:57 +10:00
Dion Moult e43347161a Fix #3547. Bug where using existing clippings were not preserved when editing profile or wall representations. 2023-08-08 22:35:40 +10:00
arun 706aa70899 Update create_2pt_wall.py (#3553)
* Update create_2pt_wall.py

included unit scale for use cases other than si unit

* Revised Update create_2pt_wall.py

included is_si kwarg to select between si units and other units and also changed the dtype of p1 and p2 array to float incase they are entered as integers
2023-08-08 13:06:36 +10:00
Carlos Dias b46ccc9b78 Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0 2023-08-06 11:21:39 -03:00
Carlos Dias fe5a6749a7 Add element guId in BCF report (#3549) 2023-08-06 21:11:31 +10:00
Thomas Krijnen c3f352c018 #3546 Filter duplicate edge indices 2023-08-06 14:27:31 +08:00
c4rlosdias 4f1e21dfb0 Add element guId in BCF report 2023-08-05 10:50:27 -03:00
Dion Moult 79584dba13 Whoops 2023-08-04 23:56:05 +10:00
Dion Moult 1c74147d89 Dissolve specifically IOS triangulated edges for meshes instead of generic Blender limited dissolve. 2023-08-04 23:49:50 +10:00
Dion Moult cc53744c29 Skeleton operator to regenerate distribution elements recursively 2023-08-04 17:20:50 +10:00
Dion Moult 945836f578 Initial implementation of scale dependent map conversion for IFC4X3 2023-08-04 14:42:43 +10:00
rileywong311 e88e2f5d9c Add brick create relation with split screen 2023-08-03 16:41:30 -07:00
rileywong311 ea267d9443 Implement Brick split screen 2023-08-03 16:41:30 -07:00
rileywong311 d64e4d70c5 Add more subclasses to Brick root options 2023-08-03 16:41:30 -07:00
rileywong311 156844b27d Move Brick list root setting 2023-08-03 16:41:30 -07:00
rileywong311 b96944ff1b Reformat Brick props order and singularize "brick_entity_classes" 2023-08-03 16:41:30 -07:00
rileywong311 7bfa6115ee Refactor AddBrickRelation to combine object namespace+label in operator
This is an important change that should make adding relations through other methods easier to implement
2023-08-03 16:41:30 -07:00
rileywong311 589b3928f3 Guard loading brick files from bad paths
Referred to "IFCFileSelector.is_existing_ifc_file" method for to make this
2023-08-03 16:41:30 -07:00
rileywong311 a884eb5c54 Add "rdfs:label" to Brick relation options
This is a tricky one because "rdfs:label" cannot really be queried from the Brick ontology, so it is a special case that probably needs to get added manually. Furthermore, an entity really shouldn't have multiple labels, so the option to give an entity an "rdfs:label"
 should only appear if it doesn't have one already. The way I did it meant I had to manually reset the Enum type in Blender because it was the active one selection and made the Enum blank since it got removed  now that the entity has a "rdfs:label." One possible alternative solution is to allow multiple labels, but in the query to import bricks in the UI list only select one label somehow.
2023-08-03 16:41:30 -07:00
rileywong311 796d19a3a8 Change BrickschemaData.relations to BrickschemaData.active_relations 2023-08-03 16:41:30 -07:00
rileywong311 b9211e2a93 Load Brick relationships from schema 2023-08-03 16:41:30 -07:00
rileywong311 b662d6f08e Remove if Brickstore.graph.triples check
This returns a generator type which I believe is always truthy, so it didn't change anything.
2023-08-03 16:41:30 -07:00
rileywong311 deecd60ff1 Implement basic Brick create relation 2023-08-03 16:41:30 -07:00
rileywong311 01615724fd Add "remove brick relation" operator 2023-08-03 16:41:30 -07:00
rileywong311 97685a7a77 Rename Brick "attributes" to "relations" 2023-08-03 16:41:30 -07:00
Dion Moult dc1721ed60 Fix #3538. Update bl_info metadata to reflect that we are a native IFC authoring platform not an import-export add-on. 2023-08-03 23:25:13 +10:00
Andrej730 e801ba49b2 option to provide step_id into bim.create_shape_from_step_id directly 2023-08-03 15:54:47 +05:00
Andrej730 2446479d82 remove_product to remove object placement too
previously it wasn't deleting object placement when you removed the objects (and related elements like IfcDirections etc) and working on project long enough you might had a bunch of orphaned data in it
2023-08-03 15:54:47 +05:00
Andrej730 8908011ecf automatically assign ports predefined type 2023-08-03 13:42:00 +05:00
Andrej730 fe6be61d7a small change for readibility 2023-08-02 16:37:09 +05:00
Andrej730 45f81b4780 adjust obstruction position on changing segment length
Now when you change the segment's length connected obstructions will adjust. Same for changing obstruction's length. You can also move obstructions/segment around and then use "Regenerate" to make them fit.
Small demo - https://imgur.com/a/atm8Mdx
2023-08-02 16:33:36 +05:00
Andrej730 92df1b351c add_obstruction to fit_flow_segments, derive it's position from cursor 2023-08-02 14:09:25 +05:00
Andrej730 002c7c1ad9 Fixed #3533 (also fixed the same issue for windows) 2023-08-02 11:42:48 +05:00
Andrej730 a583860b58 Fixed error on drawing tester UI
Error was:
Traceback (most recent call last):
  File "\3.6\scripts\addons\blenderbim\bim\module\tester\ui.py", line 39, in draw
    row.prop(self.props, "should_load_from_memory")
AttributeError: 'BIM_PT_tester' object has no attribute 'props'
2023-08-02 11:41:37 +05:00
Dion Moult 4efe198dbb Whoops 2023-08-02 00:03:24 +10:00
Dion Moult 7a6332c883 Skeleton of "add fitting" operator which decides appropriate fitting type 2023-08-02 00:02:05 +10:00
Andrej730 a14ef1ebc2 Fixed TestGetApplicableTypes after 0e69f484f 2023-08-01 18:24:11 +05:00
Andrej730 fab0f92c8a keep the default flow direction for ports NOTDEFINED as it's not yet set 2023-08-01 17:52:01 +05:00
Andrej730 490937ecf9 operator to add mep obstruction
Currently it's not yet available from UI, only from F3 menu.
On changing segment's length obstruction is not yet adjusted.
Short demonstration - https://imgur.com/a/I5fybpO
2023-08-01 17:45:17 +05:00
Andrej730 cbf8b7f3a2 root.remove_product to remove IfcRelConnectsPorts too
previously if you deleted some flow segment that was connected to another the connection would stay resulting in invalid ifc and other bugs
2023-08-01 17:45:17 +05:00
Andrej730 6c5bc5a3e8 Poll check for show/hide ports
https://i.imgur.com/NFAM1UC.png
2023-08-01 17:45:17 +05:00
Andrej730 f7aa67c6e9 Communicate that blend file is also saved on Ctrl-S
https://i.imgur.com/BnzTDhM.png
2023-08-01 17:45:17 +05:00
Andrej730 4ce41b33bb small add_constr_type_instance refactor
ifc_class removed as it was never used - ifc_class was always figured either from BIMModelProperties.relating_type_id or operator.relating_type_id
2023-08-01 17:45:17 +05:00
Dion Moult a0fd2a11cb Another minor documentation fix 2023-08-01 22:43:40 +10:00
Dion Moult 4443f484c1 Easily create a "default" duct / pipe even if you have no demo library. 2023-08-01 22:34:34 +10:00
Dion Moult 120a9f9f3e Minor documentation fix 2023-08-01 22:25:25 +10:00
Andrej730 e33a400ebb Fixed error opening type manager from window_tool, slab_tool etc
Th error was:

Error: Python: Traceback (most recent call last):
  File "\scripts\addons\blenderbim\bim\module\model\ui.py", line 54, in invoke
    props.type_class = props.ifc_class
TypeError: bpy_struct: item.attr = val: enum "" not found in ('IfcActuatorType', 'IfcAirTerminalBoxType', 'IfcAirTerminalType', 'IfcAirToAirHeatRecoveryType', 'IfcAlarmType', 'IfcAudioVisualApplianceType', 'IfcBeamType', 'IfcBoilerType', 'IfcBuildingElementPartType', 'IfcBuildingElementProxyType', 'IfcBurnerType', 'IfcCableCarrierFittingType', 'IfcCableCarrierSegmentType', 'IfcCableFittingType', 'IfcCableSegmentType', 'IfcChillerType', 'IfcChimneyType', 'IfcCivilElementType', 'IfcCoilType', 'IfcColumnType', 'IfcCommunicationsApplianceType', 'IfcCompressorType', 'IfcCondenserType', 'IfcControllerType', 'IfcCooledBeamType', 'IfcCoolingTowerType', 'IfcCoveringType', 'IfcCurtainWallType', 'IfcDamperType', 'IfcDiscreteAccessoryType', 'IfcDistributionChamberElementType', 'IfcDistributionElementType', 'IfcDoorStyle', 'IfcDoorType', 'IfcDuctFittingType', 'IfcDuctSegmentType', 'IfcDuctSilencerType', 'IfcElectricApplianceType', 'IfcElectricDistributionBoardType', 'IfcElectricFlowStorageDeviceType', 'IfcElectricGeneratorType', 'IfcElectricMotorType', 'IfcElectricTimeControlType', 'IfcElementAssemblyType', 'IfcEngineType', 'IfcEvaporativeCoolerType', 'IfcEvaporatorType', 'IfcFanType', 'IfcFastenerType', 'IfcFilterType', 'IfcFireSuppressionTerminalType', 'IfcFlowInstrumentType', 'IfcFlowMeterType', 'IfcFootingType', 'IfcFurnishingElementType', 'IfcFurnitureType', 'IfcGeographicElementType', 'IfcHeatExchangerType', 'IfcHumidifierType', 'IfcInterceptorType', 'IfcJunctionBoxType', 'IfcLampType', 'IfcLightFixtureType', 'IfcMechanicalFastenerType', 'IfcMedicalDeviceType', 'IfcMemberType', 'IfcMotorConnectionType', 'IfcOutletType', 'IfcPileType', 'IfcPipeFittingType', 'IfcPipeSegmentType', 'IfcPlateType', 'IfcProtectiveDeviceTrippingUnitType', 'IfcProtectiveDeviceType', 'IfcPumpType', 'IfcRailingType', 'IfcRampFlightType', 'IfcRampType', 'IfcReinforcingBarType', 'IfcReinforcingMeshType', 'IfcRoofType', 'IfcSanitaryTerminalType', 'IfcSensorType', 'IfcShadingDeviceType', 'IfcSlabType', 'IfcSolarDeviceType', 'IfcSpaceHeaterType', 'IfcSpaceType', 'IfcSpatialZoneType', 'IfcStackTerminalType', 'IfcStairFlightType', 'IfcStairType', 'IfcSwitchingDeviceType', 'IfcSystemFurnitureElementType', 'IfcTankType', 'IfcTendonAnchorType', 'IfcTendonType', 'IfcTransformerType', 'IfcTransportElementType', 'IfcTubeBundleType', 'IfcUnitaryControlElementType', 'IfcUnitaryEquipmentType', 'IfcValveType', 'IfcVibrationIsolatorType', 'IfcWallType', 'IfcWasteTerminalType', 'IfcWindowStyle', 'IfcWindowType')

WARN (bpy.rna): C:\Users\blender\git\blender-v360\blender.git\source\blender\python\intern\bpy_rna.c:1343 pyrna_enum_to_py: current value '8' matches no enum in 'BIMModelProperties', '', 'ifc_class'
2023-08-01 14:19:30 +05:00
Andrej730 2cc9ea0539 tests for system.get_connected_to / get_connected_from 2023-08-01 13:40:06 +05:00
Andrej730 3c8dc70198 error message on setting flow direction for disconnected port
previously it just did nothing which was a bit confusing
2023-08-01 13:40:06 +05:00
Chetan 08d8657588 When creating a GLTF file, make the material double sided to fix a bug where some surfaces were transparent. This will allow surfaces created from a mesh to be be viewed from all angles regardless of the shape of the mesh or the directions of the normals. 2023-08-01 08:46:57 +08:00
Dion Moult e0b4c1a810 Flow segments are now created at a specific RL above the active storey in the BIM Tool 2023-07-31 23:32:10 +10:00
ay-ex a517c9338d fix_choco_cmake_url (#3528)
fixed problematic url for blender cmake
2023-07-31 22:50:26 +10:00
Andrej730 ef01766f4d fixed bug in system.get_connected_to / get_connected_from
import was missing
2023-07-31 17:30:40 +05:00
Andrej730 e9f77f8d2e Create empty at object placement from debug panel
Small feature for debugging - https://i.imgur.com/OSOCIqG.png
2023-07-31 16:00:44 +05:00
Andrej730 a93d4da810 Fixed #3262 2023-07-31 15:17:45 +05:00
Andrej730 e86d3731ff sort keys in the entity to type mapping 2023-07-31 11:46:27 +05:00
Andrej730 0e69f484f4 More general solution for #3466 2023-07-31 11:45:03 +05:00
Dion Moult 3a812a9ec1 Fix #3465. Move representation utilities into new tab system. 2023-07-30 23:18:58 +10:00
Dion Moult 12d70324b8 Fix #3483. You can now conveniently duplicate material layers. 2023-07-30 22:41:28 +10:00
Bruno Postle caff4d0b20 Fix some broken restructured text formatting 2023-07-30 12:41:45 +01:00
Dion Moult afb9aa178f Fix #3453. Hidden annotation type removed, and demo library now comes with linetypes for dashed, fine, thin, medium, thick, and strong. 2023-07-30 21:13:21 +10:00
Wei Yang 356a10eac9 Add UV texture support for IfcTessellatedFaceSet (#3523)
* Add texture support for IfcIndexedTextureMap

* fix description.

* Fix posible duplicate coordinate index issue

* Clean up code.

* revert default clean_mesh.

* Fix errors.

* change to EXTEND mode when not RepeatS/T

* remove tris merge to support mix quads and tris.
2023-07-30 20:34:50 +10:00
Massimo Fabbro 60f60798df Add new api function that allows to create arbitrary profiles with voids (#3522) 2023-07-30 17:30:56 +10:00
Dion Moult 360729738c Fix #3466. Bug in upstream IFC where distribution elements and furnishing elements had no corresponding type and occurrence. 2023-07-30 16:59:25 +10:00
Dion Moult 794212c223 Fix #2906. Basic support added for perspective drawings. 2023-07-30 16:50:17 +10:00
Dion Moult 2015f0618a Fix #3484. You can now have project-specific pset templates distributed with your project in a relative path. Defaults to pset/. 2023-07-30 14:47:05 +10:00
Dion Moult d7158be431 Purge obsolete search operators in favour of new search filters, colour legend system. 2023-07-30 08:16:30 +10:00
Dion Moult 1ccbe831c8 Purge select similar prop operator in favour of dedicated select similar panel 2023-07-30 08:03:37 +10:00
Dion Moult 5a8e4fa8fd Purge obsolete & risky module unloading / loading feature in favour of tabs. 2023-07-30 07:55:04 +10:00
Dion Moult 9048b67724 Fix #3501. Annotation tool now creates annotations at the 3D cursor. 2023-07-29 23:46:45 +10:00
Dion Moult 9059b5d7ec Fix #3511. You can now use a query to load in occurrences from another project (library). 2023-07-29 22:43:50 +10:00
Dion Moult 7af3f89688 Fix #3502. New select similar feature. 2023-07-29 20:46:07 +10:00
Dion Moult 8be0f2e1da Fix #3273. Don't use simple string replacement when renaming drawings but instead identify elements by attributes which is preferred. 2023-07-29 14:46:11 +10:00
Thomas Krijnen 630bb88a15 SVG serialization UnifyInputs option 2023-07-29 10:07:33 +08:00
Thomas Krijnen 6575921ccd Implement IfcGridPlacement 2023-07-29 10:06:44 +08:00
Thomas Krijnen 95eb78e919 ci-ifctester-pypi.yml Add workflow_dispatch event 2023-07-29 09:37:39 +08:00
Thomas Krijnen 78b4b09be9 Include .xsd in ifctester package pypi distribution 2023-07-29 09:34:26 +08:00
Dion Moult 32e02db3f7 Fix #3521. Forgot to commit function. 2023-07-29 10:21:19 +10:00
Sigma Dimensions (Yass) 9d4715c0a9 Rename and move sub panels of Costing and Schedule Tab 2023-07-28 19:04:12 +01:00
Dion Moult 0ba5db751c Fix #3471. Allow to select hidden types (except if the type is excluded). 2023-07-28 23:42:02 +10:00
Dion Moult c1a15d944f Fix #3518. Default to deeper opening extrusions to handle more wall thicknesses. 2023-07-28 23:07:56 +10:00
ay-ex 7cd1c47ceb add ids html report template percentage bars per section (#3520)
adding html report template percentage bars to each section
2023-07-28 18:55:35 +10:00
Dion Moult a1aa047161 Revert "Example of UI if we sentence-cased IFC classes. Good or bad? Please comment at https://community.osarch.org/discussion/comment/16493"
This reverts commit 53bd4bf5ea.
2023-07-28 17:42:41 +10:00
Dion Moult e4896539b4 Fix #3509. Backport Qto_BodyGeometryValidation to IFC4 (via EQto) and fix bug where there was no way to have custom Qtos show up in the qto dropdown. 2023-07-28 17:41:36 +10:00
Dion Moult 47ee667f06 Fix #3517. Fix bug where edit arbitrary profile button doesn't show if your profile has voids. 2023-07-28 17:27:54 +10:00
Dion Moult 7804c9ea80 Potential fix for #3273 where renamed drawings might not get moved on Windows. 2023-07-28 15:35:02 +10:00
Dion Moult 3980666824 Fix #3513. Minor issue where new hierarchical drawing list broke print all feature. 2023-07-28 14:55:22 +10:00
Dion Moult eda0b33b41 Fix #3512. Fix incorrect shapely fills due to unclosed polygons (tolerance issue) and incorrect raycast results. 2023-07-28 12:56:42 +10:00
Ryan Schultz 8fdd0983c0 Merge branch 'v0.7.0' of https://github.com/IfcOpenShell/IfcOpenShell into v0.7.0 2023-07-27 18:34:40 -05:00
Ryan Schultz 0ef141447b added to ifc_classes_suggestions.json 2023-07-27 18:34:27 -05:00
Bruno Postle 06ea0512f5 BlenderBIM filter Git messages, remove sort #3096 2023-07-27 16:35:10 +01:00
Dion Moult 8af11db8c2 Fix #3006. Don't affect visibility of types when activating drawing. 2023-07-27 22:29:17 +10:00
Dion Moult 1c5a4ddf20 Fix #3223. Fix #3474. When creating new representations, give the option to generate bounding box or "outline" curves (60 degree crease threshold hardcoded) instead of full 3D mesh. 2023-07-27 12:36:15 +10:00
ay-ex b792b05753 add collapsible detail results (#3508) 2023-07-26 23:33:36 +10:00
Dion Moult 524bace23b Redo mechanism that allows filtered BIM Tool classes to be less "magic" and more explicit whether it filters all vs a specific element type. 2023-07-26 18:14:31 +10:00
Dion Moult 0d656040eb Fix #3479. Regression in 69fa124 when addressing #3421 that led to objects with multiple paths not taking part in the wall / slab joining procedure. 2023-07-25 23:29:06 +10:00
Dion Moult 12fcdebd37 Fix #3486. If Z index isn't specified, text is prioritised over other annotation types. 2023-07-25 22:50:09 +10:00
ay-ex c798309039 fix choco url constants (#3504) 2023-07-25 22:35:25 +10:00
Dion Moult e1913bf03e Fix #3497. Set closed vs unclosed polygonal face sets to allow loading in some IFC software. 2023-07-25 17:41:33 +10:00
Dion Moult bc541d335f Fix #3469. Fix bug where you couldn't load models if there was no style due to no polygons. 2023-07-25 17:12:11 +10:00
rileywong311 d4933c7f24 Refactor BrickStore.root_classes 2023-07-24 21:27:44 -07:00
Trashman247 4e96f17dac Ignore populate Brick attributes if active entity is a brick entity 2023-07-24 21:27:44 -07:00
Trashman247 4665b44ded Make Brick "root_classes" one source of truth 2023-07-24 21:27:44 -07:00
Trashman247 d834d94fd9 Change brick attributes query "name" and "value" to "predicate" and "object" 2023-07-24 21:27:44 -07:00
Trashman247 f2db071cf3 Move brick entity classes to BrickStore and create drop-down for entity type creation 2023-07-24 21:27:44 -07:00
Trashman247 0348e6d11a Move Brick namespace from data to BrickStore 2023-07-24 21:27:44 -07:00
Trashman247 1eb7c006f1 Add Brick "Set View" operator to change list hierarchy
- "System" as a root may need different logic since children of a system are not "subClasses" but rather "parts". Currently, "part" would be listed as attribute rather than a direct object in the group.
2023-07-24 21:27:44 -07:00
Trashman247 c80a2e1d64 Reformat BrickSchema UI 2023-07-24 21:27:44 -07:00
Dion Moult 7b2d99ba1e Fix #3498. 2023-07-25 08:54:45 +10:00
Dion Moult 55c4ce0071 Fix #3391 #3491 #3493. New space generation that uses a cutting plane across all eligible objects instead of a simplified "straight wall" analysis.
This makes generating spaces significantly more robust, makes it easier to add / remove "space separating objects" (so we now have support for virtual elements), and only acts on visible objects.
2023-07-24 23:22:12 +10:00
Dion Moult 8e5dc01758 New projects now load with a Views and Types collection with appropriate visibility settings. 2023-07-24 18:01:25 +10:00
Dion Moult 90632a363c Demo library now ships with example text annotation types (door tag, window tag, etc) 2023-07-24 17:59:04 +10:00
Dion Moult 4d6225bc32 More explanatory images in geometry creation docs 2023-07-23 23:56:50 +10:00
Dion Moult 411ec36e65 Add documentation specifically about swept disk solid geometry for rebar 2023-07-23 23:41:53 +10:00
Gorgious 1a54f54c64 You can now directly apply an ifc array modifier
Previously one would have to click on "remove" then "keep objects"
2023-07-23 15:13:04 +02:00
Dion Moult 5d48dc15c1 Finish writing documentation on geometry creation 2023-07-23 23:04:14 +10:00
Gorgious 5169599884 Array children are now transform-unlocked & unconstrained when the array is applied 2023-07-23 14:01:17 +02:00
Gorgious c3323733a7 Array children are now transforme-locked after editing the array
I have yet to find how to set it on ifc load though
2023-07-23 13:39:52 +02:00
Gorgious 1468b7fddd Array children now follow their parent with a "child-of" constraint #3492 2023-07-23 13:38:37 +02:00
Gorgious 41d6882b40 Clicking on the "Select all array objects" button now sets the parent object as active #3492
Moved the array objects fetching code to tool.Blender
Also a bit of housekeeping and fixing minor typos here and there
2023-07-23 13:03:06 +02:00
Dion Moult a1ebc2e167 Revert "Small tester UI fix #3487"
This reverts commit c7a1acf974.
2023-07-23 19:09:00 +10:00
Carlos Dias d5d9c91f5a [BlenderBIM] Update IfcTester (2023_07_21) (#3489) 2023-07-23 19:04:45 +10:00
Ryan Schultz 98a6cbb1aa Allow negative X_angle values 2023-07-23 19:04:12 +10:00
Dion Moult f48060e7c7 Fix #3488. Minor regression in IFC4X3 mapping. 2023-07-23 15:42:09 +10:00
Dion Moult dd827bb4c5 You can now save, load, and create custom colour legends of properties 2023-07-23 15:20:14 +10:00
Dion Moult b1cab9484c Search now renamed filtering and grouping. New "sandbox" section for more experimental panels. Old selector moved to sandbox along with augin/lca/covetool/temporary cutaways also moved there. 2023-07-22 23:09:48 +10:00
Dion Moult 74637dd0ea You can now load and save searches from the search panel 2023-07-22 22:49:22 +10:00
Dion Moult a61eae5f98 More powerful search interface that uses the new facet selector syntax 2023-07-22 16:48:36 +10:00
Andrej730 4c18a89ee6 Spatial manager elevation in projects units and some bug fixed
1) Elevation prop now is taking into account project units (previously it was hardcoded to meters)
2) Fixed a bug that occured when you started changing spatial element name/elevation right after you loaded spatial manager.

https://i.imgur.com/1keMGus.png
2023-07-22 11:03:22 +05:00
Andrej730 4a7b8f1104 Fixed errors after b6ddc0d
`element.is_a() in ...` wasn't taking into account spatial classes that inherit from IfcSpatialElement/IfcSpatialStructureElement
2023-07-22 10:36:40 +05:00
Andrej730 c7a1acf974 Small tester UI fix #3487 2023-07-21 18:00:11 +05:00
Andrej730 630ac7250a Fixed ifctester tests by the latest ids schema #3458
Commented out tests involving minOccurs and maxOccurs until https://github.com/buildingSMART/IDS/issues/144 gets resolved.
2023-07-21 15:33:28 +05:00
Dion Moult 08756a24a4 Fix #3477. Move text panels to object information tab. 2023-07-21 18:14:49 +10:00
Gorgious56 8edee78900 Minor fix in wall creation code 2023-07-21 09:57:23 +02:00
Dion Moult 9864261c41 New wall tool, slab tool, etc in toolshelf to improve usability. 2023-07-21 17:29:09 +10:00
Andrej730 bb3e978bba moving code to shape builder 2023-07-21 11:04:44 +05:00
Gorgious56 288cc698bd #3478 : Ifc class name suggestions can now autofill predefined type
If they are correctly filled in the json file :)
2023-07-20 19:40:31 +02:00
Andrej730 a2e70cb454 fixed error after 190153347 2023-07-20 21:56:28 +05:00
Andrej730 1901533470 Distance subtype for rl1, rl2 and x/y/z (opening dimensions) in BIM Tool 2023-07-20 19:35:35 +05:00
Andrej730 c61854c7aa small matrix math refactor
more readable and allows avoiding jumping between 3d/4d vectors
2023-07-20 19:13:56 +05:00
Andrej730 0dee353b8e A bit more descriptive port UI
Before - https://i.imgur.com/ZhVRoJM.png
After - https://i.imgur.com/tI1h2i7.png
2023-07-20 18:08:23 +05:00
Andrej730 2e3cc8e73a Added some MEP related type templates
3 more new types for distribution segments.
Distribution segments work the same way as beams - they come without representation but with IfcMaterialProfileSet defined with some profile. Occurences will also have ports at the start and the end of the segment (ports can be displayed in "Ports" section in "Services and Systems"). If you extend the segment or move it around - ports will move accordingly.

Small demo - https://imgur.com/a/Aq0utXa
2023-07-20 18:08:23 +05:00
Andrej730 6b276b8aed Small type manager refactor and more descriptions 2023-07-20 18:08:23 +05:00
Dion Moult 1b71f4f569 Implement guid facet in facet selector 2023-07-20 19:42:34 +10:00
Dion Moult 452089596e New facet based selector syntax. Proposed to supersede existing selector syntax. 2023-07-20 19:22:15 +10:00
Dion Moult a360bac4c3 You can now explicitly create new IfcTypeProducts. 2023-07-20 19:14:24 +10:00
Gorgious56 09bc05f1af Fix #3480 : Scene tabs now show their individual description on hover
Also correct minor typo
2023-07-20 10:42:11 +02:00
Andrej730 efc84606c5 Support looped railings #3415
Example - https://imgur.com/a/RaLORbk
2023-07-19 16:53:39 +05:00
Dion Moult 268039fb13 Write docs describing how to create profile representations 2023-07-19 19:58:19 +10:00
Dion Moult c59757c61a Fix #3469. Minor regression in linking refactor. 2023-07-19 19:58:19 +10:00
ay-ex 0e3386438e fix error messages 2023-07-19 18:39:13 +10:00
ay-ex 38782f4f53 fix choco_regex
fixes new regex needed for upstream blender cmake adjustment, 
pulls all regex and url into contant variables, 
improves error message, when a version cannot be retrieved
2023-07-19 18:39:13 +10:00
Dion Moult da23e39084 Merge pull request #3467 from c4rlosdias/v0.7.0
[BlenderBIM] Add UI to IfcTester
2023-07-19 09:46:39 +10:00
Gorgious 88278a9edb Boolean subpanel is now located in the Geometric Relationships panel 2023-07-18 21:45:48 +02:00
Carlos Dias a23a66edc2 Update __init__.py 2023-07-18 15:28:37 -03:00
Carlos Dias d2c22b0b0c Update handler.py 2023-07-18 15:27:30 -03:00
Gorgious56 76a4850238 Show ifc modifiers only when applicable to current element 2023-07-18 19:31:51 +02:00
Gorgious56 bf5c8f5e88 Disable some tab buttons when no ifc file is loaded 2023-07-18 18:54:24 +02:00
c4rlosdias 36b45b744d add export bcf to ifctester (2023_07_18) 2023-07-18 13:35:43 -03:00
Andrej730 bffbfb5fa3 Small description for some type templates 2023-07-18 19:52:38 +05:00
Gorgious56 963ffa39b7 Housekeeping - Reorder suggestion dictionary keys alphabetically 2023-07-18 16:17:51 +02:00
Carlos Dias 25d76152f6 Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0 2023-07-18 09:22:32 -03:00
c4rlosdias d851614cbb Add bug fixes 2023-07-18 09:21:47 -03:00
Gorgious56 9c7b073414 Refactor edit mode toggle logic for profile based representations 2023-07-18 14:02:56 +02:00
Gorgious56 66ed95fbc1 Add ifc modifier utilities to tool.Blender 2023-07-18 14:00:30 +02:00
Andrej730 44e98b17a0 Fixing railing/roof bug #3416
Issue occured when you imported .ifc and then would try to edit roof/railing path and then cancel/finish editing.

Added safe check to avoid using `change_object_data` in edit mode - https://projects.blender.org/blender/blender/issues/110232
2023-07-18 15:52:59 +05:00
Gorgious56 a095d93838 Fix bug when using the search operator (F3) with no active object 2023-07-18 10:43:36 +02:00
Dion Moult 892b41a540 New geometry.create_2pt_wall API function to create a wall-like representation from two points. 2023-07-18 18:29:26 +10:00
Dion Moult 0cdce9b2d6 Add documentation for basic geometry creation 2023-07-18 18:28:46 +10:00
Dion Moult 05e05d0d5a Rename sverchok representation to mesh representation 2023-07-18 18:22:56 +10:00
Dion Moult 8cbe298072 Utility function to create rotation matrixes in numpy. 2023-07-18 14:28:35 +10:00
c4rlosdias 7bc23c996b Add select entities (2023_07_17) 2023-07-17 17:07:45 -03:00
Gorgious56 b9ff4f3263 Fix Ifc modifier error after #3393064 because of legacy context.object
For some reason in the scene properties context.object returns None even if an object is active  in the viewport, so ifc modifiers would randomly throw errors. AFAIK functionally they are supposed to point to the same thing, but active_object seems to be the superior one and context.object deprecated and kept for legacy reasons. Couldn't find dev quote but I'm sure I saw it at some point
2023-07-17 14:48:01 +02:00
Gorgious56 42bbc9a093 Ensure positive extrusion depth
This prevents an error and mesh corruption when trying to input a negative extrusion depth
2023-07-17 14:29:35 +02:00
Dion Moult 33930642a4 Move all modifier panels into Representations and Materials tab. 2023-07-17 22:21:31 +10:00
ay-ex 0573ffb11a fix choco_update action
fix according to upstream makefile change: 
https://github.com/blender/blender/blob/main/build_files/cmake/Modules/FindPythonLibsUnix.cmake
2023-07-17 22:16:55 +10:00
Andrej730 21a614560a Revision Clouds - option to match revision cloud with the selected object
Works similarly to tagging, example - https://imgur.com/a/Atr0nYE

This feature also can be useful in the future if we integrate revision clouds with ifcgit
2023-07-17 16:32:40 +05:00
Dion Moult 80d74866a9 More tab and panel shuffling. Top level panels now have a tab prefix. 2023-07-17 18:17:32 +10:00
Dion Moult d75e85b3a6 Disable Shift-D duplication of drawings for now until drawings stabilise more. Use the dedicated duplicate drawings feature. 2023-07-17 18:17:32 +10:00
Andrej730 a101f46478 Fixing bugs on small revision clouds #3310
Bugs were:
1) svg print ZeroDivisionError if there was less than 1 pattern segment
2) svg drawing wasn't preserving edge direction if there was less than 1 pattern segment
2023-07-17 12:11:52 +05:00
Andrej730 2463b77985 Fixed #3441 2023-07-17 11:32:12 +05:00
Dion Moult e695bdbd0d Fix #3449. Fix bug where you couldn't edit the relating type of an annotation. 2023-07-17 15:47:10 +10:00
Dion Moult 17230e4170 Fix bug where loaded point geometry had unlinked meshes or placements with wrong units. 2023-07-17 15:46:33 +10:00
Dion Moult 80d88b3821 Fix #3275. You can now rename annotation types from the annotation manager. 2023-07-17 14:32:05 +10:00
Dion Moult 0500e666bd Add support for arbitrary point annotations and survey point, traverse points, control points, spot elevations, etc. 2023-07-17 11:48:09 +10:00
c4rlosdias 31bb220d38 Update 2023_07_16 2023-07-16 20:46:26 -03:00
Dion Moult 944f2f701a Fix #3288. Implement undo / redo until specified named transaction. Fix fundamental undo bug where Blender doesn't track the undo UUID property if you toggle edit mode.
This also has the nice side effect of implementing "Jump to point in history" so you can now use the Edit > Undo History menu.
2023-07-16 22:58:56 +10:00
Dion Moult 844cc62960 More panel shuffling, new Quality and Coordination tab. Geometry is now part of materials. 2023-07-15 21:47:35 +10:00
Dion Moult 147df7f46b Bulk rename panels to remove redundant IFC prefix 2023-07-15 21:02:40 +10:00
Dion Moult 53bd4bf5ea Example of UI if we sentence-cased IFC classes. Good or bad? Please comment at https://community.osarch.org/discussion/comment/16493 2023-07-15 21:02:40 +10:00
Andrej730 d50e43197e small fix 90fce1804 2023-07-15 10:28:23 +05:00
Dion Moult 90fce18042 New icon tabbed interface so you don't need to click twice to change tab. 2023-07-15 13:22:13 +10:00
c4rlosdias 772414451e update ifctester - 2023_07_14 2023-07-14 12:04:22 -03:00
Dion Moult 0a840188bf DANGER! Potentially fix a bunch of undo bugs by completely rebuilding undo id_map tracking with a much simpler solution.
In the past, we used undo_pre and redo_pre and a bunch of complex commit_link and rollback_link tracking to figure out what IDs and GUIDs were added / removed during transactions and how to handle invalidated objects in the id/guid maps.

I really don't know why I made it that complex.

Now we simply treat all data as bad and rebuild the either map. This means slower undos / redos for large projects, but in theory the maps will never invalidate.

This either fixes a lot of things or breaks a lot of things :) Watch out!
2023-07-15 00:05:34 +10:00
Dion Moult a2e7cb8158 Fix undo bugs in the type module where some operators were not part of the undo system for some reason. 2023-07-15 00:00:10 +10:00
Dion Moult 2034fa203b Fix #3275. You can now rename types from the type manager. 2023-07-14 23:58:33 +10:00
Andrej730 572a8c812e root.remove_product fix 2023-07-14 18:22:31 +05:00
Andrej730 af4b5e1fe6 oops, forgot to clean up the test name 2023-07-14 18:02:51 +05:00
Andrej730 9c383e0c1a Fixed plan level annotation rotation #3440 2023-07-14 17:42:45 +05:00
Andrej730 a72231cb91 StairData refactor, solves #3416 2023-07-14 16:17:14 +05:00
Andrej730 846dbc341d root.copy_class to support copying ports in ifc2x3 2023-07-14 15:48:41 +05:00
Andrej730 ed95516b9d Clean up type objects on ifc import 2023-07-14 15:04:15 +05:00
Andrej730 b6ddc0d55e avoid IfcSpatialElement errors in ifc2x3
IfcSpatialElement was added only in ifc4
2023-07-14 14:46:58 +05:00
Andrej730 be5950bcb7 clean up after running test_wall_opening.py 2023-07-14 14:46:58 +05:00
Andrej730 6810bbff2f remove_product to remove IfcRelConnectsElements 2023-07-14 14:46:58 +05:00
Andrej730 2fa7cbaabf Fixing confusing UI #3357
It was showing "Edit Profile" when you have slab and wall selected when it will actually extend the wall to the slab.
2023-07-14 14:46:58 +05:00
Dion Moult 69fa12423d See #3421. Fix drawing bug where IfcOpenShell might return unclosed paths even though the shape is closed and therefore break cut polygon fills. 2023-07-14 17:32:45 +10:00
Dion Moult 8f609ff383 See #3421. Fix bug where some projection fills wouldn't polygonize correctly in shapely due to numerical tolerance. 2023-07-14 17:29:30 +10:00
Dion Moult 924bf2a3ad Fix #3442. Update sheet list if drawing name changes. 2023-07-14 13:54:24 +10:00
Dion Moult 2be8f4a139 Move object data out of object tab and into new object dropdown. 2023-07-14 13:41:02 +10:00
Dion Moult 8411feedf4 You can now open projects from the Ctrl-N shortcut. 2023-07-14 13:40:09 +10:00
Gorgious56 56e6c8e0e1 Improve slightly the boolean interface in mesh properties editor 2023-07-13 14:52:00 +02:00
Dion Moult 818226d1e2 Fix #3414. The project wizard now doesn't load a fresh session by default. Note that File > Open still enforces a fresh session. 2023-07-13 22:34:13 +10:00
Andrej730 6336241431 Cleaning up connections on delete_ifc
Noticed an error if you connect wall and slab, then remove the slab and try to regenerate the wall - error occured because connection to that slab wasn't removed.

The error was:
Error: Python: Traceback (most recent call last):
  File "\3.6\scripts\addons\blenderbim\bim\module\model\workspace.py", line 381, in invoke
    return self.execute(context)
  File "\3.6\scripts\addons\blenderbim\tool\ifc.py", line 136, in execute
    IfcStore.execute_ifc_operator(self, context)
  File "\3.6\scripts\addons\blenderbim\bim\ifc.py", line 421, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
  File "\3.6\scripts\addons\blenderbim\bim\module\model\workspace.py", line 373, in _execute
    getattr(self, f"hotkey_{self.hotkey}")()
  File "\3.6\scripts\addons\blenderbim\bim\module\model\workspace.py", line 465, in hotkey_S_E
    bpy.ops.bim.join_wall(join_type="T")
  File "C:\software\Steam\steamapps\common\Blender\3.6\scripts\modules\bpy\ops.py", line 113, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Python: Traceback (most recent call last):
  File "\3.6\scripts\addons\blenderbim\tool\ifc.py", line 136, in execute
    IfcStore.execute_ifc_operator(self, context)
  File "\3.6\scripts\addons\blenderbim\bim\ifc.py", line 421, in execute_ifc_operator
    result = getattr(operator, "_execute")(context)
  File "\3.6\scripts\addons\blenderbim\bim\module\model\wall.py", line 76, in _execute
    joiner.join_E(context.active_object, context.scene.cursor.location)
  File "\3.6\scripts\addons\blenderbim\bim\module\model\wall.py", line 1038, in join_E
    self.recreate_wall(element1, wall1, axis, body)
  File "\3.6\scripts\addons\blenderbim\bim\module\model\wall.py", line 1145, in recreate_wall
    height = self.clip(obj, tool.Ifc.get_object(rel.RelatingElement))
  File "\3.6\scripts\addons\blenderbim\tool\ifc.py", line 89, in get_object
    return IfcStore.get_element(element.id())
AttributeError: 'NoneType' object has no attribute 'id'
2023-07-13 17:32:25 +05:00
Dion Moult 7720166c31 Fix #3393. Bug where duplicating a typed text didn't also copy its literal. 2023-07-13 22:22:00 +10:00
Carlos Dias f5ba0673e3 Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0 2023-07-13 08:01:54 -03:00
Andrej730 3b05799956 Delete edit text from BIM Tool since it's already in Annotation Tool 2023-07-13 15:54:28 +05:00
Andrej730 f3924249e9 handle null diffuse color loading ifc styles
The error was:
Traceback (most recent call last):
  File "\3.6\scripts\addons\blenderbim\bim\module\style\prop.py", line 99, in update_shading_style
    tool.Style.set_surface_style_props(blender_material)
  File "\3.6\scripts\addons\blenderbim\tool\style.py", line 174, in set_surface_style_props
    style_data["DiffuseColour"] = style_data["DiffuseColour"][1]
TypeError: 'NoneType' object is not subscriptable
2023-07-13 14:54:36 +05:00
Gorgious56 7f9e8a207d Enable drawing generation buttons only when an actual drawing is selected 2023-07-13 11:38:11 +02:00
Andrej730 38f7c044a3 Fixed error on canceling editing railing/roof
Since we do not update representation for railing / roofs and just mark them wtih `tool.Ifc.edit(obj)` their previous representation may still be incorrect. So we restore the previous representation just using bmesh update method.

For example if create a new roof, enter editing roof properties mode and then cancel editing, then it would result in "Failed to process a shape" because roof still had just empty Body/PointCloud representation.
2023-07-13 14:32:09 +05:00
Andrej730 7896d5b6e5 Fixing errors on loading ifc after ef8f82501
The error was:
RuntimeError: Operator bpy.ops.object.editmode_toggle.poll() failed, context is incorrect
Location: C:\software\Steam\steamapps\common\Blender\3.6\scripts\modules\bpy\ops.py:113
Traceback (most recent call last):
  File "\3.6\scripts\addons\blenderbim\bim\module\project\operator.py", line 594, in execute
    bpy.ops.bim.load_project_elements()
  File "C:\software\Steam\steamapps\common\Blender\3.6\scripts\modules\bpy\ops.py", line 113, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Python: Traceback (most recent call last):
  File "\3.6\scripts\addons\blenderbim\bim\module\project\operator.py", line 653, in execute
    ifc_importer.execute()
  File "\3.6\scripts\addons\blenderbim\bim\import_ifc.py", line 265, in execute
    self.clean_mesh()
  File "\3.6\scripts\addons\blenderbim\bim\import_ifc.py", line 1347, in clean_mesh
    bpy.ops.object.editmode_toggle(context_override)
  File "C:\software\Steam\steamapps\common\Blender\3.6\scripts\modules\bpy\ops.py", line 111, in __call__
    ret = _op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Operator bpy.ops.object.editmode_toggle.poll() failed, context is incorrect
Location: C:\software\Steam\steamapps\common\Blender\3.6\scripts\modules\bpy\ops.py:113
2023-07-13 13:45:50 +05:00
Andrej730 96d812eaba Fixed console errors on checking modeling data 2023-07-13 13:03:18 +05:00
Dion Moult 0390a65590 Fix #3300. Bug where it was impossible to delete normal Blender objects in the outliner when an IFC existed.
Also port over batch deletion to the outliner override.
2023-07-13 16:26:06 +10:00
Andrej730 ad4ab1567f model data parameters renamed to pset_data for consitency 2023-07-13 11:08:52 +05:00
Andrej730 d633733d18 DoorData use refactor 2023-07-13 10:58:03 +05:00
Andrej730 cd1a813630 WindowData use refactor 2023-07-13 10:36:09 +05:00
Andrej730 c9e6da9b6c change .is_editing type for ifc modifiers to boolean 2023-07-13 09:53:11 +05:00
Andrej730 cada2c36e3 RoofData use refactor 2023-07-13 09:48:33 +05:00
Dion Moult 33304eb1a5 Group drawings by target view in the drawing list 2023-07-13 14:13:28 +10:00
Bruno Perdigão 4e72ef8b20 Select all objects in array modifier #3331 2023-07-13 13:21:49 +10:00
Dion Moult b9d8e86748 Fix #3411. Filtering sheets now doesn't break sheet hierarchy and also lets you search for sheet identification, name, and names of drawings / titleblocks / things on sheets. 2023-07-13 11:53:08 +10:00
Dion Moult 3adfc63b65 Fix #3432. Bug where null applicable occurrence of a type product caused the annotation tool to fail. 2023-07-13 11:27:01 +10:00
Andrej730 91e7d49060 makefile fix 2023-07-12 18:34:48 +05:00
Andrej730 4ad1a2be73 minor change for RailingData 2023-07-12 17:46:56 +05:00
Andrej730 ef8f825012 bim.load_project to refresh session on execute not invoke
if you accidentally opened file dialog or just changed your mind it shouldn't remove all objects from the current blender session
2023-07-12 17:10:30 +05:00
Andrej730 56adfc70b5 RailingData use refactor, solves #3416 2023-07-12 17:01:51 +05:00
smr02 bc909a26fa ifcsverchok delete api_WIP 2023-07-12 21:18:20 +10:00
Andrej730 dd0a015ec3 display current commit in status bar
it works for users who symlinked their blenderbim/bim folders to git repository or installed blenderbim from release created from makefile
https://i.imgur.com/mEBH9I7.png
2023-07-12 12:34:24 +05:00
Gorgious56 3813c26db7 Fix error when trying to edit an object that doesn't support edit mode with the TAB keypress
Also run black on the rest of the file
2023-07-12 09:28:21 +02:00
Dion Moult 95c06c7f82 Fix #3420. Fix missing sheet references on drawings and incorrect direction of section references. 2023-07-12 17:17:54 +10:00
Andrej730 db910d4024 more consistency in values for plan-, section level and diameter 2023-07-12 11:47:19 +05:00
Andrej730 669dbd2e8d radius annotation - support for prefix/suffix/fill-bg
and more consistency between viewport and svg
2023-07-12 11:47:18 +05:00
Andrej730 becbfccae9 PLAN/SECTION_LEVEL consistency between viewport and svg
before - https://i.imgur.com/bwYbozz.png
after - https://i.imgur.com/7BlmQIg.png

NOTE that if you're using markers.svg that was created before this update you won't see the changes for the section-/plan-level markers.
2023-07-12 11:47:18 +05:00
Andrej730 2f02d401f2 fill-bg for diameter, plan- and section-level annotations 2023-07-12 11:47:18 +05:00
Dion Moult ec2ca4bcf4 Fix #3417. Apply 50mm offset to camera to ensure text isn't "behind" the camera. This 50mm convention is used in quite a few places, we should standardise it. 2023-07-12 12:37:53 +10:00
Dion Moult 89df937f89 Fix #3425. Fix invalid IFC data where grid axes should be 2D not 3D. 2023-07-12 11:41:58 +10:00
Thomas Krijnen 7567971a32 Update entity_instance.py 2023-07-11 21:41:06 +02:00
Thomas Krijnen 74160731c9 Update rule_executor.py 2023-07-11 21:40:05 +02:00
Andrej730 5d7fefa042 Prevent resetting selected tab on blender restart
Not sure if there is any caveats to that
2023-07-11 18:23:26 +05:00
Dion Moult db4c61a472 Fix #3407. Override Ctrl-S to the export IFC which checks for Blender projects.
1. No IFC --> Saves Blend file
 2. IFC, unsaved Blend --> Saves IFC
 3. IFC, saved Blend --> Saves IFC and Blend
2023-07-11 23:08:05 +10:00
Andrej730 298568d3ea PLAN_LEVEL annotations support for prefix, suffix #3399
Viewport - https://i.imgur.com/XRa3oJO.png
SVG - https://i.imgur.com/C8PjoiO.png
2023-07-11 17:04:58 +05:00
Dion Moult 4da7b355bf Fix #3414. Only clear default scene, not custom scene when loading / creating IFCs. 2023-07-11 21:45:34 +10:00
Andrej730 2a15743f8b SECTION_LEVEL annotations support for prefix, suffix #3399
also added support for "show only description" for section_level
2023-07-11 16:42:07 +05:00
Andrej730 e54cc11ca6 Fixed #3400 introduced in dda16c8 2023-07-11 14:54:51 +05:00
Dion Moult 24fdfc6d82 Resolve merge conflict 2023-07-11 18:15:18 +10:00
Dion Moult 8689164769 Fix registration bug that created hundreds of workspaces due to continuous triggering of the depsgraph_update.
Use an is_registering check to only run the on_register once.

Rename setDefaultProperties to load_post to better reflect what handler it is.

Unregister our custom scene panels upon addon activation.

Move aprops getting to tool.Blender because it is a bit complex. Also, aprops may not be setup until load_post is called, so the len() check protects against that.
2023-07-11 18:08:02 +10:00
Gorgious56 86dd79daa6 Keep active object when unlinking an IFC element
Unlinking an element recreates a new blender object so the active object would be lost, jumping the properties to the scene panel which was slightly annoying
2023-07-11 09:33:06 +02:00
Andrej730 a231cc31e8 fixed properties search after 949a2bb and fixed console errors on search
1) When you search not from the SCENE properties blender creates some kind of phantom area to check search results. As this area is not present in `context.screen.areas` it was resulting in the error below.

2) After 949a2bb search in scene properties was limited to currently selected tab. Given the amount of tools we have in properties and native blender approach for searching across all available sections in properties, it seems reasonable to make search work across all tabs.

Console error was:
The error was
Python: Traceback (most recent call last):
  File "\3.6\scripts\addons\blenderbim\bim\ui.py", line 281, in draw
    aprops = context.screen.BIMAreaProperties[context.screen.areas[:].index(context.area)]
ValueError: bpy.data.screens['Layout.001']...Area is not in list
2023-07-11 11:00:20 +05:00
Dion Moult e412d27398 Integrate brickschema undo system into BlenderBIM Add-on undo system wrapper 2023-07-11 11:16:49 +10:00
Andrej730 60388f1a24 Fixed #3412
After 949a2bb printing happens not fron N-panel (which is part of viewport) but from scene properties - so current context doesn't have region_3d anymore.

PS The same issue was there all along if you'd try to print the drawing from Camera Properties tab.
2023-07-10 17:31:11 +05:00
Andrej730 d13d1493e3 allow to call select/color by attribute by providing arguments
instead of always checking scene.BIMSearchProperties. This allows to add different setups of selections to quick favorites
2023-07-10 17:17:12 +05:00
Dion Moult 556489d686 Implement Ctrl-Tab in properties to conveniently toggle between two tabs. 2023-07-10 22:04:10 +10:00
Dion Moult 657e77117c Move built-in scene panels to a dedicated "Blender Properties" tab instead of unregistering permanently. 2023-07-10 22:04:10 +10:00
Andrej730 7d97f5e375 Library for US AISC15 Steel Profiles #3203 2023-07-10 16:36:07 +05:00
Gorgious56 7583b56738 Trying to edit a railing modifier path while modifying the parameters is now prevented and user is informed with a tooltip 2023-07-10 13:00:43 +02:00
Gorgious56 073a00b2ca Fix IfcRailing modifier support spacing <= 0 would throw an error, and deactivate support spacing field if manual support is selected 2023-07-10 12:47:46 +02:00
Thomas Krijnen 8baa0945e9 2dc4bbf8cd Apply same logic for derived attributes 2023-07-10 10:26:37 +02:00
Dion Moult 717c28b7c9 Override Ctrl-N new file menu to make it easier to start new projects and new IFC icon. 2023-07-10 17:16:32 +10:00
Andrej730 f4a4e906ab Using EPset_Drawing data instead of camera props on drawing print #3396
Previously if you change `HasUnderlay` in pset it caused errors because camera properties `has_underlay` wasn't updated.
Still some work need to be done for updating keep camera properties in sync with pset - probably we can should call something like `tool.Drawing.import_drawing()` on EPset_Drawing edit
2023-07-10 11:09:48 +05:00
Dion Moult 052ff71c51 See #3411. Sheets are now sorted alphabetically by default. 2023-07-10 14:13:44 +10:00
Dion Moult 3dfd36877e See #3016. Scene shading styles are now stored as part of the drawing style. 2023-07-10 14:13:44 +10:00
Dion Moult a9f2237d32 Update splash image to be centered 2023-07-10 13:15:49 +10:00
Dion Moult 62c93f0462 Fix #3410. Minor regression when moving UI to properties panel. 2023-07-10 11:19:15 +10:00
Dion Moult 60ea504267 Add support for Point representations too, not just point cloud. 2023-07-10 10:23:33 +10:00
Dion Moult 1e3b45c0b8 Fix bug where all grouped annotations were excluded when opening models, whereas we only want drawing annotations to be excluded. 2023-07-10 10:23:33 +10:00
Massimo Fabbro 757277cedf Fix bug where drawing decimal places couldn't be 0. Now it's possible to define 0 as value 2023-07-09 18:52:03 +02:00
Dion Moult 14fced7aba Forgot to commit updated IfcTester test suite 2023-07-09 22:30:14 +10:00
Dion Moult 7a3b299148 Fix critical undo sync bug related to invoking instead of executing. See notes.
Currently, the undo system works by wrapping the execute operator. What was not considered was that execute() isn't the only entry point to operators. Operators can be invoked. If an invoked operator calls a bpy.ops.bim.something in its invoke() function, then bpy.ops.bim.something will start and finish its own transaction, and then when the invoke finishes and finally runs execute(), another transaction will be started and finished. This means that we get at least one extra transaction logged (one per any call to bpy.ops.bim.foo in invoke()).

This mismatch of number of transactions and undo stack means that when the user presses ctrl-z, the undo doesn't actually occur. This leads to a sync bug.

To be safe, all IFC invokes must be wrapped. This will take some time to review so expect another commit soon.
2023-07-09 22:29:49 +10:00
Dion Moult 45cf6a8ace Drawing panels now moved to the drawings and documents "tab" 2023-07-09 18:30:40 +10:00
Dion Moult 9b1693e112 Update IfcTester to comply with latest modifications to IDS XSD. 2023-07-09 17:02:12 +10:00
Dion Moult cc59929cfd Visual clean up of annotation tool to only activate when a drawing is active and have a type manager similar to the BIM tool. 2023-07-09 16:01:16 +10:00
Dion Moult 43fd012a4c Update tool icons to all use the same underlying "cube" shape and add bracing for structural icon and background walls for spatial icon. 2023-07-08 22:56:23 +10:00
Bruno Perdigão f96f663dc3 recreate decompositions in Refresh operator 2023-07-08 22:12:24 +10:00
Bruno Perdigão 486bafc814 changed keymap 2023-07-08 22:12:24 +10:00
Bruno Perdigão 20a31be5bf clear BIMObjectPropertis.collection after duplication 2023-07-08 22:12:24 +10:00
Bruno Perdigão 98dad0cbbe initial commit 2023-07-08 22:12:24 +10:00
Dion Moult b0ce2e5a00 Fix #3390. Type products should not be set in the model interface. 2023-07-08 22:09:50 +10:00
Thomas Krijnen 3aea0915d0 #3189 proposal (#3190) 2023-07-08 20:07:28 +10:00
Bruno Perdigão 0ee5e3887b removed total_items from the operator 2023-07-08 20:06:18 +10:00
Bruno Perdigão 1afcec2005 implementation of #3332 2023-07-08 20:06:18 +10:00
Dion Moult 656b7cb06e Merge pull request #3405 from brunoperdigao/pset_select_same_value
Bug fix in #3392
2023-07-08 20:05:22 +10:00
Dion Moult 19d3f98b6f Merge branch 'v0.7.0' into pset_select_same_value 2023-07-08 20:05:13 +10:00
Dion Moult 73a736f52a Fix #3402. Activate drawing no longer affects the visibility of non-IFC objects. 2023-07-08 19:55:45 +10:00
Dion Moult 6adc48ade4 Fix #3403. Templates must be specific to the version you are creating. 2023-07-08 19:30:11 +10:00
Dion Moult 949a2bb347 Start mocking up our own property "tabs" with the intention to use this new tab system instead of Blender property tabs
Blender property tabs are hardcoded and we cannot customise them. IFC data only "somewhat" maps to Blender property tabs, and some things fail to map causing user confusion. For example material and styles are very confusing. Also scene and object properties are crazy overpopulated (see how many times IFCArchitect bulk collapses things). And this also causes things to be spread out and lost (e.g. some random panels in viewport N menu). This should give us a lot more control to organise panels exactly how we want them.
2023-07-08 17:03:06 +10:00
Dion Moult 8cb63720eb Workspace inspired by IFCArchitect's layout is now setup by default and irrelevant Blender scene panels are hidden. You can disable this behaviour for advanced users, or use your own workspace layout but at least now there is a better "BIM-optimised" layout.
The layout uses three columns with a focus on a larger outliner (important as BIM models have lots of objects and complex hierarchies!) and properties, and removes the mostly irrelevant timeline for beginners.
2023-07-08 16:26:21 +10:00
Dion Moult 52ac1090e9 You can now create, open, and save projects from the file menu, with simple project presets. Also the scene is cleared so no more manual cube / light / camera deletion. Also poll prior to saving. No more import / export menu to confuse users.
https://imgur.com/a/EIt2H5b
2023-07-08 14:39:39 +10:00
Dion Moult 4f6180baf8 Delete old annotation panel in favour of annotation tool 2023-07-08 10:58:53 +10:00
Bruno Perdigão 743339598e minor fix 2023-07-07 15:27:48 -03:00
Bruno Perdigão 2e423f26ff bugfix and alt+click functionality 2023-07-07 15:19:35 -03:00
luzpaz b3b45893cc Fix various typos in src/ifcgeom* subdirs 2023-07-07 18:44:02 +02:00
Dion Moult a65747dd2c Minor doc improvements and SQL/stream code cleanup 2023-07-07 18:12:52 +10:00
Dion Moult 4286ad6dcc Fix #3394. Fix bug where railing and roof type names were hardcoded. Also improve UI of create type form so you can actually read the fields. 2023-07-07 17:57:09 +10:00
Dion Moult 0b823c772e Fix #3213. Internally, we should always use Unix path separators. 2023-07-07 17:20:07 +10:00
Dion Moult 9944024457 The user can now toggle between rotate before / after translating in OffsetObjectPlacements 2023-07-07 15:57:42 +10:00
Dion Moult 3cdad90755 Fix #3016. Drawing styles that set the shading style will change shading style upon activating the style. 2023-07-07 15:17:53 +10:00
Dion Moult 71846d683b Fix #3121. Merge equivalent contexts when merging projects in MergeProject Ifcpatch recipe. 2023-07-07 13:04:44 +10:00
Dion Moult 7be0fd6137 Fix failing tests since Github test runner only has IFC4X3_ADD1 not TC1 compiled in. 2023-07-07 12:33:38 +10:00
Bruno Perdigão 6a7cf6843a implements #3268 2023-07-06 15:10:53 -03:00
c4rlosdias 700d8a3b9c Add extra formats to output file 2023-07-03 10:22:08 -03:00
Carlos Dias da3440d848 Merge branch 'IfcOpenShell:v0.7.0' into v0.7.0 2023-07-03 08:48:10 -03:00
Carlos Dias 93aa24c6d2 Update operator.py
missing output file format in arguments
2023-07-02 20:25:51 -03:00
1633 changed files with 1264448 additions and 58932 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ jobs:
- run: echo ok go
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs: activate
steps:
- uses: actions/checkout@v2
@@ -80,7 +80,7 @@ jobs:
path: build/assets/Ifc*
deliver:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs: build
name: Docker Build, Tag, Push
+57
View File
@@ -0,0 +1,57 @@
name: ci-bcf-pypi
on:
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# * * * * *
- cron: "0 0 18 * *"
push:
paths:
- '.github/workflows/ci-bcf-pypi.yml'
workflow_dispatch:
env:
major: 0
minor: 0
name: ifcopenshell
jobs:
activate:
runs-on: ubuntu-latest
if: |
github.repository == 'IfcOpenShell/IfcOpenShell'
steps:
- name: Set env
run: echo ok go
build:
needs: activate
name: ${{ matrix.config.name }}-${{ matrix.pyver }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2 # https://github.com/actions/checkout
- uses: actions/setup-python@v2 # https://github.com/actions/setup-python
with:
python-version: '3.10' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- run: echo ${{ env.DATE }}
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%y%m%d')"
- name: Compile
run: |
pip install build
cd src/bcf &&
make dist
- name: Publish a Python distribution to PyPI
uses: ortega2247/pypi-upload-action@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: src/bcf/dist
-37
View File
@@ -1,37 +0,0 @@
name: ci-bcf
on:
push:
jobs:
activate:
runs-on: ubuntu-latest
if: |
github.repository == 'IfcOpenShell/IfcOpenShell' &&
contains(github.event.head_commit.message, '[bcf release]')
steps:
- run: echo ok go
upload:
needs: activate
name: Upload BCF package to Pypi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Build package
run: |
cd src/bcf
pip install build
python -m build
- name: Test
run: |
cd src/bcf
make test
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
packages_dir: src/bcf/dist
+2 -2
View File
@@ -39,7 +39,7 @@ jobs:
strategy:
fail-fast: false
matrix:
pyver: [py39, py310]
pyver: [py39, py310, py311]
config:
- {
name: "Windows Build",
@@ -62,7 +62,7 @@ jobs:
- uses: actions/setup-python@v2 # https://github.com/actions/setup-python
with:
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
python-version: '3.10'
python-version: '3.11'
- run: echo ${{ env.DATE }}
- name: Get current date
id: date
+48
View File
@@ -0,0 +1,48 @@
name: ci-bsdd-pypi
on:
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# * * * * *
- cron: "0 0 18 * *"
workflow_dispatch:
env:
major: 0
minor: 0
name: ifcopenshell
jobs:
activate:
runs-on: ubuntu-latest
if: |
github.repository == 'IfcOpenShell/IfcOpenShell'
steps:
- name: Set env
run: echo ok go
build:
needs: activate
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2 # https://github.com/actions/setup-python
with:
python-version: '3.11' # Version range or exact version of a Python version to use, using SemVer's version range syntax
- name: Compile
run: |
pip install build
cd src/bsdd &&
make dist
- name: Publish a Python distribution to PyPI
uses: ortega2247/pypi-upload-action@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: src/bsdd/dist
+48
View File
@@ -0,0 +1,48 @@
name: ci-ifcclash-pypi
on:
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# * * * * *
- cron: "0 0 18 * *"
workflow_dispatch:
env:
major: 0
minor: 0
name: ifcopenshell
jobs:
activate:
runs-on: ubuntu-latest
if: |
github.repository == 'IfcOpenShell/IfcOpenShell'
steps:
- name: Set env
run: echo ok go
build:
needs: activate
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2 # https://github.com/actions/setup-python
with:
python-version: '3.11' # Version range or exact version of a Python version to use, using SemVer's version range syntax
- name: Compile
run: |
pip install build
cd src/ifcclash &&
make dist
- name: Publish a Python distribution to PyPI
uses: ortega2247/pypi-upload-action@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: src/ifcclash/dist
+48
View File
@@ -0,0 +1,48 @@
name: ci-ifccsv-pypi
on:
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# * * * * *
- cron: "0 0 18 * *"
workflow_dispatch:
env:
major: 0
minor: 0
name: ifcopenshell
jobs:
activate:
runs-on: ubuntu-latest
if: |
github.repository == 'IfcOpenShell/IfcOpenShell'
steps:
- name: Set env
run: echo ok go
build:
needs: activate
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2 # https://github.com/actions/setup-python
with:
python-version: '3.11' # Version range or exact version of a Python version to use, using SemVer's version range syntax
- name: Compile
run: |
pip install build
cd src/ifccsv &&
make dist
- name: Publish a Python distribution to PyPI
uses: ortega2247/pypi-upload-action@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: src/ifccsv/dist
@@ -1,10 +1,7 @@
name: ci-ifcopenshell-conda-daily
on:
push:
paths:
- .github/workflows/ci-ifcopenshell-conda-daily.yml
- conda/**
workflow_dispatch:
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
@@ -15,17 +12,8 @@ on:
- cron: "49 23 * * *" # 11min before utc midnight every day
jobs:
activate:
runs-on: ubuntu-latest
if: |
github.repository == 'IfcOpenShell/IfcOpenShell'
steps:
- name: Set env
run: echo ok go
test:
name: ${{ matrix.platform.distver }}-${{ matrix.pyver.name }}
needs: activate
name: ${{ matrix.platform.distver }}-${{ matrix.pyver.name }}-${{ matrix.variant }}
runs-on: ${{ matrix.platform.distver }}
defaults:
run:
@@ -34,18 +22,23 @@ jobs:
fail-fast: false
matrix:
pyver: [
{ name: py310, distver: '3.10'},
{ name: py311, distver: '3.11'}
{ name: py311, distver: '3.11'},
{ name: py312, distver: '3.12'}
]
platform: [
{ name: Windows, distver: windows-2022, upload: 'true' },
{ name: Linux, distver: ubuntu-22.04, upload: 'true' },
{ name: macOS, distver: macos-12, upload: 'true' }
]
variant: [
'novtk',
# 'all'
]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Download MacOSX SDK
if: ${{ matrix.platform.name == 'macOS' }}
run: |
@@ -53,21 +46,22 @@ jobs:
tar xf MacOSX10.13.sdk.tar.xz && \
sudo mv -v MacOSX10.13.sdk /opt/ && \
ls /opt/
- uses: seanmiddleditch/gha-setup-ninja@master
- uses: mamba-org/provision-with-micromamba@main # https://github.com/mamba-org/provision-with-micromamba
- uses: mamba-org/setup-micromamba@v1 # https://github.com/mamba-org/setup-micromamba
with:
channels: conda-forge
channel-priority: strict
environment-file: conda/environment.yml
extra-specs: |
python=${{ matrix.pyver.distver }}
environment-name: build-env
cache-environment: true
condarc: |
channels:
- conda-forge
channel_priority: strict
create-args: >-
python=3.11
anaconda-client
boa
- name: build, test and upload ifcopenshell
if: ${{ matrix.platform.upload == 'true' }}
run: |
conda-build . --python ${{ matrix.pyver.distver }} -c conda-forge --token ${{ secrets.ANACONDA_TOKEN }} --user ifcopenshell
working-directory: ./conda
- name: build & test ifcopenshell
if: ${{ matrix.platform.upload == 'false' }}
run: |
conda-build . --python ${{ matrix.pyver.distver }} -c conda-forge
conda mambabuild . --python ${{ matrix.pyver.distver }} -c conda-forge --variants "{variant: ${{ matrix.variant }}}" --token ${{ secrets.ANACONDA_TOKEN }} --user ifcopenshell
working-directory: ./conda
+3 -2
View File
@@ -1,6 +1,7 @@
name: ci-ifcopenshell-pypi
on:
workflow_dispatch:
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
@@ -35,7 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
pyver: [py36, py37, py38, py39, py310, py311]
pyver: [py39, py310, py311, py312]
config:
- {
name: "Windows Build",
@@ -57,7 +58,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2 # https://github.com/actions/setup-python
with:
python-version: '3.10' # Version range or exact version of a Python version to use, using SemVer's version range syntax
python-version: '3.11' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- run: echo ${{ env.DATE }}
- name: Get current date
+48
View File
@@ -0,0 +1,48 @@
name: ci-ifcpatch-pypi
on:
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# * * * * *
- cron: "0 0 18 * *"
workflow_dispatch:
env:
major: 0
minor: 0
name: ifcopenshell
jobs:
activate:
runs-on: ubuntu-latest
if: |
github.repository == 'IfcOpenShell/IfcOpenShell'
steps:
- name: Set env
run: echo ok go
build:
needs: activate
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2 # https://github.com/actions/setup-python
with:
python-version: '3.11' # Version range or exact version of a Python version to use, using SemVer's version range syntax
- name: Compile
run: |
pip install build
cd src/ifcpatch &&
make dist
- name: Publish a Python distribution to PyPI
uses: ortega2247/pypi-upload-action@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: src/ifcpatch/dist
@@ -0,0 +1,53 @@
name: Publish-ifcsverchok
on:
push:
paths:
- '.github/workflows/ci-ifcsverchok-build.yml'
- 'src/ifcsverchok/*'
branches:
- v0.7.0
env:
major: 0
minor: 0
name: ifcsverchok
jobs:
activate:
runs-on: ubuntu-latest
if: |
github.repository == 'IfcOpenShell/IfcOpenShell'
steps:
- name: Set env
run: echo ok go
build:
needs: activate
name: ifcsverchok
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2 # https://github.com/actions/setup-python
with:
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
python-version: '3.11'
- run: echo ${{ env.DATE }}
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%y%m%d')"
- name: Compile
run: |
cd src/ifcsverchok
make dist
- name: Upload Zip file to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: src/ifcsverchok/dist/ifcsverchok-${{steps.date.outputs.date}}.zip
asset_name: ifcsverchok-${{steps.date.outputs.date}}.zip
tag: "ifcsverchok-${{steps.date.outputs.date}}"
overwrite: true
body: "ifcsverchok build for ${{steps.date.outputs.date}}"
+2 -11
View File
@@ -9,10 +9,7 @@ on:
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# * * * * *
- cron: "0 0 18 * *"
push:
paths:
- '.github/workflows/ci-ifctester-pypi.yml'
workflow_dispatch:
env:
major: 0
@@ -30,7 +27,6 @@ jobs:
build:
needs: activate
name: ${{ matrix.config.name }}-${{ matrix.pyver }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
@@ -38,12 +34,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2 # https://github.com/actions/setup-python
with:
python-version: '3.10' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- run: echo ${{ env.DATE }}
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%y%m%d')"
python-version: '3.11' # Version range or exact version of a Python version to use, using SemVer's version range syntax
- name: Compile
run: |
pip install build
-98
View File
@@ -1,98 +0,0 @@
name: ci_py_only
on:
push:
paths:
- 'src/**'
- 'test/**'
- 'conda/**'
- 'cmake/**'
- '.github/workflows/ci-py-only.yml'
pull_request:
jobs:
activate:
runs-on: ubuntu-latest
if: |
github.repository == 'IfcOpenShell/IfcOpenShell' &&
!contains(github.event.head_commit.message, 'skip ci')
steps:
- run: echo ok go
build:
runs-on: ubuntu-20.04
needs: activate
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install C++ dependencies
run: |
sudo apt update
sudo apt-get install --no-install-recommends \
git cmake gcc g++ \
libboost-date-time-dev \
libboost-filesystem-dev \
libboost-iostreams-dev \
libboost-program-options-dev \
libboost-regex-dev \
libboost-system-dev \
libboost-thread-dev \
python3-all-dev python3-pip \
swig libpcre3-dev libxml2-dev \
libtbb-dev nlohmann-json3-dev \
libocct-foundation-dev libocct-modeling-algorithms-dev libocct-modeling-data-dev libocct-ocaf-dev libocct-visualization-dev libocct-data-exchange-dev \
libhdf5-dev libcgal-dev
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${GITHUB_WORKFLOW}
- name: Build ifcopenshell
run: |
sudo /usr/sbin/update-ccache-symlinks
mkdir build && cd build
PATH="/usr/lib/ccache:$PATH" cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=/usr \
-DCMAKE_SYSTEM_PREFIX_PATH=/usr \
-DOCC_INCLUDE_DIR=/usr/include/opencascade \
-DOCC_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu \
-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 \
-DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.8 \
-DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython3.8.so \
-DCOLLADA_SUPPORT=Off \
"-DSCHEMA_VERSIONS=2x3;4;4x3_add1" \
-DBUILD_CONVERT=Off \
-DGLTF_SUPPORT=On \
-DJSON_INCLUDE_DIR=/usr/include \
-DCGAL_INCLUDE_DIR=/usr/include \
-DGMP_INCLUDE_DIR=/usr/include \
-DMPFR_INCLUDE_DIR=/usr/include \
-DGMP_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu \
-DMPFR_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu \
-DHDF5_INCLUDE_DIR=/usr/include/hdf5/serial \
../cmake
sudo make -j $(nproc)
sudo make install
- name: Install Python dependencies
run: |
sudo /usr/bin/python -m pip install -U pip
sudo /usr/bin/python -m pip install xmlschema xsdata numpy lxml
sudo /usr/bin/python -m pip install src/bcf --no-deps
sudo /usr/bin/python -m pip install pytest
sudo /usr/bin/python -m pip install isodate
sudo /usr/bin/python -m pip install lark
sudo /usr/bin/python -m pip install networkx
sudo /usr/bin/python -m pip install tabulate
sudo /usr/bin/python -m pip install python-dateutil
- name: Test
run: |
cd test
sudo /usr/bin/python tests.py
cd ../src/ifcopenshell-python
mv ifcopenshell ifcopenshell-local # Force testing on installed module
make test
+24 -21
View File
@@ -31,12 +31,25 @@ jobs:
- run: echo ok go
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs: activate
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install xmlschema xsdata numpy lxml pytest isodate lark networkx tabulate python-dateutil
pip install src/bcf --no-deps
pip install https://github.com/Andrej730/aud/archive/refs/heads/master-reduced-size.zip
- name: Install C++ dependencies
run: |
sudo apt update
@@ -49,7 +62,6 @@ jobs:
libboost-regex-dev \
libboost-system-dev \
libboost-thread-dev \
python3-all-dev python3-pip \
swig libpcre3-dev libxml2-dev \
libtbb-dev nlohmann-json3-dev \
libocct-foundation-dev libocct-modeling-algorithms-dev libocct-modeling-data-dev libocct-ocaf-dev libocct-visualization-dev libocct-data-exchange-dev \
@@ -62,6 +74,9 @@ jobs:
- name: Build ifcopenshell
run: |
echo $Python3_ROOT_DIR
echo ${{ env.pythonLocation }}
mkdir build && cd build
cmake \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
@@ -71,9 +86,9 @@ jobs:
-DCMAKE_SYSTEM_PREFIX_PATH=/usr \
-DOCC_INCLUDE_DIR=/usr/include/opencascade \
-DOCC_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu \
-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 \
-DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.8 \
-DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython3.8.so \
-DPYTHON_EXECUTABLE:FILEPATH=${{ env.pythonLocation }}/bin/python \
-DPYTHON_INCLUDE_DIR:PATH=${{ env.pythonLocation }}/include/python3.11 \
-DPYTHON_LIBRARY:FILEPATH=${{ env.pythonLocation }}/lib/libpython3.11.so \
-DCOLLADA_SUPPORT=Off \
"-DSCHEMA_VERSIONS=2x3;4;4x3_add1" \
-DGLTF_SUPPORT=On \
@@ -102,23 +117,11 @@ jobs:
grep 0$ statuses
grep 0$ statuses | wc -l
- name: Install Python dependencies
run: |
sudo /usr/bin/python -m pip install -U pip
sudo /usr/bin/python -m pip install xmlschema xsdata numpy lxml
sudo /usr/bin/python -m pip install src/bcf --no-deps
sudo /usr/bin/python -m pip install pytest
sudo /usr/bin/python -m pip install isodate
sudo /usr/bin/python -m pip install lark
sudo /usr/bin/python -m pip install networkx
sudo /usr/bin/python -m pip install https://github.com/Andrej730/aud/archive/refs/heads/master-reduced-size.zip
sudo /usr/bin/python -m pip install tabulate
sudo /usr/bin/python -m pip install python-dateutil
- name: Test
- name: Test ifcopenshell-python
run: |
cd test
sudo /usr/bin/python tests.py
python tests.py
cd ../src/ifcopenshell-python
mv ifcopenshell ifcopenshell-local # Force testing on installed module
make test
make test-safe
+16 -13
View File
@@ -7,34 +7,26 @@
# output directories
/cmake/out/
/docs/out/
/src/examples/out/
/src/ifcmax/out/
/src/ifcwrap/out/
/src/qtviewer/out/
/win/BuildDepsCache*.txt
# IfcExpressParser residue
/src/ifcexpressparser/express_parser.py
# General Python residue
__pycache__
*.py.bak
# Visual Studio Code files
.vscode
.vs
# PyCharm files
.idea
#Virtual Env Files
Pipfile
Pipfile.lock
# Docs
/docs/output
/docs/rst_files
/docs/doxygen
/src/ifcblenderexport/docs/_build
/docs/cpp-api/output
# gettext binary translation files
*.mo
@@ -84,8 +76,14 @@ src/ifcopenshell-python/test/build
# blenderbim libs
src/blenderbim/blenderbim/libs
# blenderbim i18n
src/blenderbim/blenderbim/translations.py
# blenderbim test temp files
src/blenderbim/test/files/temp
src/blenderbim/test/files/basic.ifc.cache.blend
src/blenderbim/test/files/basic.ifc.cache.sqlite
src/blenderbim/drawings
src/blenderbim/layouts
@@ -96,5 +94,10 @@ src/ifcopenshell-python/ifcopenshell/ifcopenshell_wrapper.py
# apple
.DS_Store
# clangd config
.clangd
# clangd cache
.cache
# Brickschema
src/blenderbim/blenderbim/bim/schema/Brick.ttl
src/blenderbim/blenderbim/bim/schema/Brick.ttl
+4 -1
View File
@@ -10,4 +10,7 @@
url = https://github.com/IfcOpenShell/svgfill
[submodule "src/ifcopenshell-python/test/Sample-BIM-Files"]
path = src/ifcopenshell-python/test/Sample-BIM-Files
url = https://github.com/IfcOpenShell/ids-test-files
url = https://github.com/IfcOpenShell/ids-test-files
[submodule "docs/cpp-api/assets/doxygen-awesome-css"]
path = docs/cpp-api/assets/doxygen-awesome-css
url = https://github.com/jothepro/doxygen-awesome-css.git
+17 -16
View File
@@ -1,38 +1,39 @@
IfcOpenShell
============
<p align="center">
<img src="https://github.com/IfcOpenShell/IfcOpenShell/assets/79010126/9e540403-c79f-446a-88c6-7c1ebc6ba864">
<img src="https://github.com/IfcOpenShell/IfcOpenShell/assets/88302/34901387-e2dd-4a0c-8e38-9ffc32a66cde">
</p>
IfcOpenShell is an open source ([LGPL]) software library for working with Industry Foundation Classes ([IFC]). Complete
parsing support is provided for [IFC2x3 TC1], [IFC4 Add2 TC1], IFC4x1, IFC4x2, and IFC4x3. Extensive geometric support
parsing support is provided for [IFC2x3 TC1], [IFC4 Add2 TC1], IFC4x1, IFC4x2, and [IFC4x3 Add2]. Extensive geometric support
is implemented for the IFC releases [IFC2x3 TC1] and [IFC4 Add2 TC1]. Extending with support for arbitrary IFC schemas
is possible at compile-time when using C++ and at run-time when using Python.
In addition to a C++ and Python API, IfcOpenShell comes with an ecosystem of tools, notably including IfcConvert (an application to convert IFC models to
other formats), the BlenderBIM Add-on (an add-on to Blender providing a graphical IFC authoring platform), and many
other libraries, CLI apps, and more. Support is also provided for auxiliary standards such as BCF and IDS.
In addition to a C++ and Python API, IfcOpenShell comes with an ecosystem of tools, notably including IfcConvert (an application
to convert IFC models to other formats), the BlenderBIM Add-on (an add-on to Blender providing a graphical IFC authoring platform),
and many other libraries, CLI apps, and more. Support is also provided for auxiliary standards such as BCF and IDS.
For more information, see:
* [IfcOpenShell Website](http://ifcopenshell.org)
* [IfcOpenShell Documentation](http://blenderbim.org/docs-python)
* [IfcOpenShell C++ Installation](https://blenderbim.org/docs-python/ifcopenshell/installation.html)
* [IfcOpenShell Python Installation](https://blenderbim.org/docs-python/ifcopenshell-python/installation.html)
* [IfcOpenShell Python Hello World Tutorial](https://blenderbim.org/docs-python/ifcopenshell-python/hello_world.html)
* [IfcOpenShell Documentation](https://docs.ifcopenshell.org)
* [IfcOpenShell C++ Installation](https://docs.ifcopenshell.org/ifcopenshell/installation.html)
* [IfcOpenShell Python Installation](https://docs.ifcopenshell.org/ifcopenshell-python/installation.html)
* [IfcOpenShell Python Hello World Tutorial](https://docs.ifcopenshell.org/ifcopenshell-python/hello_world.html)
* [BlenderBIM Add-on Website](https://blenderbim.org)
* [BlenderBIM Add-on Documentation](http://blenderbim.org/docs)
* [Add-on Installation](https://blenderbim.org/docs/users/installation.html)
* [Exploring an IFC model](https://blenderbim.org/docs/users/exploring_an_ifc_model.html)
* [BlenderBIM Add-on Documentation](https://docs.blenderbim.org/index.html)
* [Add-on Installation](https://docs.blenderbim.org/users/installation.html)
* [Exploring an IFC model](https://docs.blenderbim.org/users/exploring_an_ifc_model.html)
| Service | Status |
| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| Anaconda Daily Build | [![Anaconda-Server Badge](https://img.shields.io/conda/vn/ifcopenshell/ifcopenshell)](https://anaconda.org/ifcopenshell/ifcopenshell) |
| Anaconda v0.7.0 Stable | [![Anaconda-Server Badge](https://img.shields.io/conda/vn/conda-forge/ifcopenshell)](https://anaconda.org/conda-forge/ifcopenshell) |
| PyPi Daily Build | [![PyPi Badge](https://img.shields.io/pypi/v/ifcopenshell)](https://pypi.org/project/ifcopenshell/) |
| ArchLinux AUR Package Stable | [![AUR Badge](https://img.shields.io/aur/version/ifcopenshell)](https://aur.archlinux.org/packages/ifcopenshell) |
| ArchLinux AUR Package git | [![AUR Badge](https://img.shields.io/aur/version/ifcopenshell-git)](https://aur.archlinux.org/packages/ifcopenshell-git) |
| ArchLinux AUR Package Stable | [![AUR Badge](https://img.shields.io/aur/version/ifcopenshell)](https://aur.archlinux.org/packages/ifcopenshell) |
| ArchLinux AUR Package git | [![AUR Badge](https://img.shields.io/aur/version/ifcopenshell-git)](https://aur.archlinux.org/packages/ifcopenshell-git) |
| BlenderBIM Add-on Chocolatey (under moderation) | [![Chocolatey Badge](https://img.shields.io/chocolatey/v/blenderbim-nightly)](https://community.chocolatey.org/packages/blenderbim-nightly/) |
| Sponsor development on OpenCollective | [![Financial Contributors](https://opencollective.com/opensourcebim/tiers/badge.svg)](https://opencollective.com/opensourcebim/) |
| Docker hub | [![Docker Pulls](https://img.shields.io/docker/pulls/aecgeeks/ifcopenshell)](https://hub.docker.com/r/aecgeeks/ifcopenshell) |
@@ -43,7 +44,7 @@ Contents
Those marked with an asterisk are part of IfcOpenShell.
| Name | Description | License |
| ------------------------- | ----------------------------------------------------------------------| ------------------- |
| ------------------------- | --------------------------------------------------------------------- | ------------------- |
| bcf | Library to read and write BCF-XML and query OpenCDE BCF-API modules | LGPL-3.0-or-later |
| blenderbim | Add-on to Blender providing a graphical native IFC authoring platform | GPL-3.0-or-later |
| bsdd | Library to query the bSDD API | LGPL-3.0-or-later |
@@ -54,7 +55,6 @@ Those marked with an asterisk are part of IfcOpenShell.
| ifcblender | Historic Blender IFC import add-on | LGPL-3.0-or-later\* |
| ifccityjson | Convert CityJSON to IFC | LGPL-3.0-or-later |
| ifcclash | Clash detection library and CLI app | LGPL-3.0-or-later |
| ifccobie | Extract IFC data for COBie handover requirements | LGPL-3.0-or-later |
| ifcconvert | CLI app to convert IFC to many other formats | LGPL-3.0-or-later\* |
| ifccsv | Library and CLI app to export and import schedules from IFC | LGPL-3.0-or-later |
| ifcdiff | Compare changes between IFC models | LGPL-3.0-or-later |
@@ -77,6 +77,7 @@ Those marked with an asterisk are part of IfcOpenShell.
[IFC]: https://technical.buildingsmart.org/standards/ifc/ "IFC"
[IFC2x3 TC1]: https://standards.buildingsmart.org/IFC/RELEASE/IFC2x3/TC1/HTML/ "IFC2x3 TC1"
[IFC4 Add2 TC1]: https://standards.buildingsmart.org/IFC/RELEASE/IFC4/ADD2_TC1/HTML/ "IFC4 Add2 TC1"
[IFC4x3 Add2]: https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/ "IFC4x3 Add2"
[Visual Studio]: https://www.visualstudio.com/ "Visual Studio"
[Visual C++ Build Tools]: http://landinghub.visualstudio.com/visual-cpp-build-tools "Visual C++ Build Tools"
[MSYS2]: https://msys2.github.io/ "MSYS2"
+1 -1
View File
@@ -12,7 +12,7 @@ RUN apt-get -y update && apt-get -y install unzip curl
# Install AWS Lambda runtime interface client
RUN pip install --target ${FUNCTION_DIR} awslambdaric
# Set the IfcOpenShell build version (check available builds at: https://blenderbim.org/docs-python/ifcopenshell-python/installation.html)
# Set the IfcOpenShell build version (check available builds at: https://docs.ifcopenshell.org/ifcopenshell-python/installation.html)
ARG IFC_OPENSHELL_BUILD="39-v0.7.0-476ab50"
# Download and extract IfcOpenShell
+1 -1
View File
@@ -15,7 +15,7 @@
<licenseUrl>https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/COPYING</licenseUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<projectSourceUrl>https://github.com/IfcOpenShell/IfcOpenShell</projectSourceUrl>
<docsUrl>https://blenderbim.org/docs/</docsUrl>
<docsUrl>https://docs.blenderbim.org/</docsUrl>
<!--<mailingListUrl></mailingListUrl>-->
<bugTrackerUrl>https://github.com/IfcOpenShell/IfcOpenShell/issues</bugTrackerUrl>
<tags>blender bim blenderbim ifc python opensource foss</tags>
+49 -40
View File
@@ -13,68 +13,77 @@ def request_repo_info(url: str):
return resp
def get_choco_package_info() -> str:
resp = request_repo_info(URL_CHOCO_PACKAGE)
html_txt = str(resp.read())
return html_txt
def get_latest_blender_version() -> list:
html_txt = get_choco_package_info()
return re.findall(RE_BLENDER_VERSION_MIN_MAJ_PAT, html_txt)
URL_IFCOS_RELEASES = "https://github.com/IfcOpenShell/IfcOpenShell/releases"
URL_CHOCO_PACKAGE = "https://community.chocolatey.org/packages/blender"
URL_BLENDER_CMAKE = "https://raw.githubusercontent.com/blender/blender/{}/build_files/cmake/Modules/FindPythonLibsUnix.cmake"
RE_BLENDER_VERSION_MIN_MAJ = r"Latest Version.+<span>Blender (\d+\.\d+)\..+</span>"
RE_BLENDER_VERSION_MIN_MAJ_PAT = r"Latest Version.+<span>Blender (\d+\.\d+\.\d+)</span>"
RE_BLENDER_PYTHON_VERSION_MAJ_MIN = r"(?:set|SET)\(_PYTHON_VERSION_SUPPORTED (\d+\.\d+)\)"
if sys.argv[1] == "--do_choco_release?":
now = datetime.datetime.now()
blenderbim_date = (now - datetime.timedelta(days=1)).strftime("%y%m%d")
url = "https://github.com/IfcOpenShell/IfcOpenShell/releases"
resp = request_repo_info(url)
resp = request_repo_info(URL_IFCOS_RELEASES)
text = str(resp.read())
if blenderbim_date in text:
print("do_choco_release", end="")
elif sys.argv[1] == "--latest_blender_release_maj_min_pat?":
re_blender_version_min_maj_pat = r"Latest Version.+<span>Blender (\d+\.\d+\.\d+)</span>"
url = "https://community.chocolatey.org/packages/blender"
resp = request_repo_info(url)
html_txt = str(resp.read())
found = re.findall(re_blender_version_min_maj_pat, html_txt)
if found:
print(found[0], end="")
latest_blender_version = get_latest_blender_version()
if latest_blender_version:
print(latest_blender_version[0], end="")
else:
print("[ERROR] could not determine blender_version_min_maj_pat")
quit(1)
elif sys.argv[1] == "--latest_blender_release_maj_min?":
re_blender_version_min_maj = r"Latest Version.+<span>Blender (\d+\.\d+)\..+</span>"
url = "https://community.chocolatey.org/packages/blender"
resp = request_repo_info(url)
html_txt = str(resp.read())
found = re.findall(re_blender_version_min_maj, html_txt)
if found:
print(found[0], end="")
html_txt = get_choco_package_info()
blender_version_min_maj = re.findall(RE_BLENDER_VERSION_MIN_MAJ, html_txt)
if blender_version_min_maj:
print(blender_version_min_maj[0], end="")
else:
print("[ERROR] could not determine blender_version_min_maj")
quit(1)
elif sys.argv[1] == "--latest_blender_python_version_maj_min?":
# get latest blender version first
re_blender_version_min_maj_pat = r"Latest Version.+<span>Blender (\d+\.\d+\.\d+)</span>"
url = "https://community.chocolatey.org/packages/blender"
resp = request_repo_info(url)
html_txt = str(resp.read())
found = re.findall(re_blender_version_min_maj_pat, html_txt)
if found:
latest_blender_version_tag = f"v{found[0]}"
re_blender_python_version_maj_min = r"SET\(PYTHON_VERSION (\d+.\d+) "
url = f"https://raw.githubusercontent.com/blender/blender/{latest_blender_version_tag}/build_files/cmake/Modules/FindPythonLibsUnix.cmake"
resp = request_repo_info(url)
latest_blender_version = get_latest_blender_version()
if latest_blender_version:
latest_blender_version_tag = f"v{latest_blender_version[0]}"
resp = request_repo_info(URL_BLENDER_CMAKE.format(latest_blender_version_tag))
html_txt = str(resp.read())
found = re.findall(re_blender_python_version_maj_min, html_txt)
found = re.findall(RE_BLENDER_PYTHON_VERSION_MAJ_MIN, html_txt)
if found:
print(found[0], end="")
else:
print("[ERROR] could not determine blender_python_version_maj_min")
quit(1)
elif sys.argv[1] == "--pyver?":
# get latest blender version first
re_blender_version_min_maj_pat = r"Latest Version.+<span>Blender (\d+\.\d+\.\d+)</span>"
url = "https://community.chocolatey.org/packages/blender"
resp = request_repo_info(url)
html_txt = str(resp.read())
found = re.findall(re_blender_version_min_maj_pat, html_txt)
if found:
latest_blender_version_tag = f"v{found[0]}"
re_blender_python_version_maj_min = r"SET\(PYTHON_VERSION (\d+.\d+) "
url = f"https://raw.githubusercontent.com/blender/blender/{latest_blender_version_tag}/build_files/cmake/Modules/FindPythonLibsUnix.cmake"
resp = request_repo_info(url)
latest_blender_version = get_latest_blender_version()
if latest_blender_version:
latest_blender_version_tag = f"v{latest_blender_version[0]}"
resp = request_repo_info(URL_BLENDER_CMAKE.format(latest_blender_version_tag))
html_txt = str(resp.read())
found = re.findall(re_blender_python_version_maj_min, html_txt)
found = re.findall(RE_BLENDER_PYTHON_VERSION_MAJ_MIN, html_txt)
if found:
print(f"py{found[0].replace('.', '')}", end="")
else:
print("[ERROR] could not determine pyver")
quit(1)
+700 -602
View File
File diff suppressed because it is too large Load Diff
+43
View File
@@ -0,0 +1,43 @@
################################################################################
# #
# This file is part of IfcOpenShell. #
# #
# IfcOpenShell is free software: you can redistribute it and/or modify #
# it under the terms of the Lesser GNU General Public License as published by #
# the Free Software Foundation, either version 3.0 of the License, or #
# (at your option) any later version. #
# #
# IfcOpenShell is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# Lesser GNU General Public License for more details. #
# #
# You should have received a copy of the Lesser GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
################################################################################
if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
endif()
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
exec_program(
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
)
if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
endif()
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
endif()
endforeach()
-8
View File
@@ -1,8 +0,0 @@
compile:
conda activate conda-build && conda-build -c conda-forge . --keep-old-work --python 3.10.5
debug:
conda activate conda-build && conda-debug -c conda-forge . --python 3.10.4
env:
conda env update --f environment.yml --prune
+1
View File
@@ -4,6 +4,7 @@ set MY_PY_VER=%PY_VER:.=%
set LIBXML2="%LIBRARY_PREFIX%/lib/libxml2.lib"
cmake -G "Ninja" ^
-D SCHEMA_VERSIONS="2x3;4;4x1;4x3;4x3_add1" ^
-D CMAKE_BUILD_TYPE:STRING=Release ^
-D CMAKE_INSTALL_PREFIX:FILEPATH="%LIBRARY_PREFIX%" ^
-D CMAKE_PREFIX_PATH:FILEPATH="%LIBRARY_PREFIX%" ^
+1
View File
@@ -13,6 +13,7 @@ if [ `uname` == Darwin ]; then
fi
cmake -G Ninja \
-DSCHEMA_VERSIONS="2x3;4;4x1;4x3;4x3_add1" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
${CMAKE_PLATFORM_FLAGS[@]} \
+5 -1
View File
@@ -1,2 +1,6 @@
CONDA_BUILD_SYSROOT:
- /opt/MacOSX10.13.sdk # [osx]
- /opt/MacOSX10.13.sdk # [osx]
variant:
- novtk
- all
-13
View File
@@ -1,13 +0,0 @@
name: conda-build
channels:
- conda-forge
dependencies:
- conda-build
- conda-verify
- anaconda-client
- ninja
- doxygen
- ripgrep
- pip
- pip:
- lief==0.13
+14 -9
View File
@@ -1,6 +1,10 @@
{% set name = "ifcopenshell" %}
{% set version = "0.7.0" %}
{% set build = 1 %}
# Higher number -> Always prioritize "novtk" variant over "all" variant
{% set build = build + 200 %} # [variant == "novtk"]
{% set build = build + 100 %} # [variant == "all"]
package:
name: {{ name }}
@@ -10,8 +14,9 @@ source:
path: ..
build:
string: py{{ CONDA_PY }}_{{ variant }}_h{{ PKG_HASH }}_{{ build }}
binary_relocation: false [osx]
number: 1
number: {{ build }}
requirements:
build:
@@ -19,12 +24,12 @@ requirements:
- {{ compiler('cxx') }}
- ninja >=1.10.2
- cmake
- swig >=4.0.2
- swig 4.1.1
host:
- python
- boost-cpp
- occt ==7.7.0
- occt 7.7.2 *{{ variant }}*
- libxml2
- cgal-cpp
- hdf5
@@ -36,11 +41,11 @@ requirements:
run:
- python
- boost-cpp
- occt ==7.7.0
- occt 7.7.2 *{{ variant }}*
- {{ pin_compatible('cgal-cpp', max_pin='x.x.x') }}
- {{ pin_compatible('boost-cpp', max_pin='x.x.x') }}
- {{ pin_compatible('hdf5', max_pin='x.x.x') }}
- libxml2
- cgal-cpp
- hdf5
- mpfr
- gmp # [unix]
- mpir # [win]
@@ -52,12 +57,12 @@ test:
- ifcopenshell
about:
home: http://ifcopenshell.org
home: https://ifcopenshell.org
license: LGPL-3.0-or-later
license_file: COPYING
summary: 'IfcOpenShell is a library to support the IFC file format'
description: |
IfcOpenShell is an open source (LGPL) software library for
working with the Industry Foundation Classes (IFC) file format.
doc_url: http://ifcopenshell.org/
doc_url: https://ifcopenshell.org/
dev_url: https://github.com/IfcOpenShell/IfcOpenShell
-11
View File
@@ -1,11 +0,0 @@
#Look for an executable called sphinx-build
find_program(SPHINX_EXECUTABLE
NAMES sphinx-build
DOC "Path to sphinx-build executable")
include(FindPackageHandleStandardArgs)
#Handle standard arguments to find_package like REQUIRED and QUIET
find_package_handle_standard_args(Sphinx
"Failed to find sphinx-build executable"
SPHINX_EXECUTABLE)
-11
View File
@@ -1,11 +0,0 @@
#Look for an executable called sphinx-build
find_program(SPHINX_EXECUTABLE
NAMES sphinx-build
DOC "Path to sphinx-build executable")
include(FindPackageHandleStandardArgs)
#Handle standard arguments to find_package like REQUIRED and QUIET
find_package_handle_standard_args(Sphinx
"Failed to find sphinx-build executable"
SPHINX_EXECUTABLE)
File diff suppressed because it is too large Load Diff
+33
View File
@@ -0,0 +1,33 @@
# IfcOpenShell C++ API documentation
This folder contains the setup to build the IfcOpenShell C++ API documentation from the source code.
## Generating the documentation
> Prerequisites:
>
> Make sure to have [Doxygen](https://www.doxygen.nl) and [Graphviz](https://graphviz.org) installed into your `$PATH` variable.
>
> The documentation also use the [doxygen-awesome](https://jothepro.github.io/doxygen-awesome-css) theme as a git submodule.
Build with the command (from within the `/docs/cpp-api` folder):
```shell
$ doxygen
```
To include the current git commit hash into the build documentation, use the following command:
```shell
$ PROJECT_NUMBER=$(git rev-parse --short HEAD) doxygen
```
This will extract the current commit hash in short version and sets the propper ENV variable used by doxygen.
The generation of the documentation might take a while depending on your systems hardware, as it is configured to generate the Class graphs using .
The resulting documentation is located unter `/cpp-api/output/html` and can be directly accessed with your browser:
```shell
$ open ./output/html/index.html
```
Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

-240
View File
@@ -1,240 +0,0 @@
APPLY_DEFAULT_MATERIALS
-----------------------
Given the command invocation:
Duplex_A_20110907_optimized.ifc d.dae -yv --include attribute GlobalId 3bXiCStxP6Fgxdej$yc50U
You will find log messages along the lines of
[Warning] {3bXiCStxP6Fgxdej$yc50U} No material and surface styles for:
#333=IfcCovering('3bXiCStxP6Fgxdej$yc50U',#1,'Compound Ceiling:Gypsum Board:187483',$,'Compound Ceiling:Gypsum Board',#17840,#17052,'187483',.CEILING.)
This means that there is no IfcStyledItem associated to the representation items and that the element does not have an IfcMaterial association with IfcMaterialRepresentation from which we can derive a style (colour) for the element.
The interactive session below shows how with this setting enabled you will get a default generated material from the IFC element entity type and material indices of 0 pointing to that. With this setting disabled the material index would be -1 to indicate a missing style. Note that there is one material index for every triangle in the list of `shp.geometry.faces`.
>>> import ifcopenshell, ifcopenshell.geom
>>> f = ifcopenshell.open("Duplex_A_20110907_optimized.ifc")
>>> s = ifcopenshell.geom.settings()
>>> c = f["3bXiCStxP6Fgxdej$yc50U"]
>>>
>>> shp = ifcopenshell.geom.create_shape(s, c)
>>> shp.geometry.material_ids
(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
>>> [(m.name, m.diffuse) for m in shp.geometry.materials]
[]
>>>
>>> s.set(s.APPLY_DEFAULT_MATERIALS, True)
>>> shp = ifcopenshell.geom.create_shape(s, c)
>>> shp.geometry.material_ids
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
>>> [(m.name, m.diffuse) for m in shp.geometry.materials]
[('IfcCovering', (0.7, 0.7, 0.7))]
This is enabled by default for the IfcConvert serializers as they will not gracefully handle -1 material indices and allows users to quickly assign colours based on entity types in their modelling applications.
APPLY_LAYERSETS
---------------
This setting is available in IfcConvert as `--enable-layerset-slicing`.
For IfcWall and IfcSlab elements, takes the associated IfcMaterialLayerSet and builds a set of surfaces to segment the building element geometry.
Note that enabling this settings is computationally intensive as it involves 3D Boolean operations.
Duplex_A_20110907_optimized.ifc d1.dae -yv --include attribute GlobalId 2O2Fr$t4X7Zf8NOew3FNr2
![Image of d1.dae](images/settings-1.png)
Duplex_A_20110907_optimized.ifc d2.dae --enable-layerset-slicing -yv --include attribute GlobalId 2O2Fr$t4X7Zf8NOew3FNr2
![Image of d2.dae](images/settings-2.png)
BUILDING_LOCAL_PLACEMENT
------------------------
This setting is available in IfcConvert using `--building-local-placement`.
In the typical IfcSite > IfcBuilding > IfcBuildingStorey > ... hierarchy of elements, don't incorporate the ObjectPlacement of the IfcBuilding and above in the placement of elements in the output. This is useful when there is a large offset in this placement that reduces precision in further processing.
CONVERT_BACK_UNITS
------------------
This setting is available in IfcConvert using `--convert-back-units`.
Internally IfcOpenShell uses meters as the global length unit to do calculations. This setting restores the coordinate positions after conversion by multiplying the factor of the IfcUnit with UnitType=LENGTHUNIT into the output geometry coordinate values.
DISABLE_OPENING_SUBTRACTIONS
----------------------------
This setting is available in IfcConvert using `--disable-opening-subtraction`.
As in most viewer applications, IfcOpeningElement geometry is subtracted from their host elements. This setting disables this behavior.
Duplex_A_20110907_optimized.ifc d1.dae -yv --include attribute GlobalId 2O2Fr$t4X7Zf8NOew3FNr2
![Image of d1.dae](images/settings-1.png)
Duplex_A_20110907_optimized.ifc d3.dae --disable-opening-subtraction -yv --include attribute GlobalId 2O2Fr$t4X7Zf8NOew3FNr2
![Image of d3.dae](images/settings-3.png)
Note that disabling this settings will reduce processing time and improve robustness as it involves 3D Boolean operations.
DISABLE_TRIANGULATION
---------------------
To be used in conjunction with `USE_BREP_DATA`. Do not apply the triangulation and - when `USE_BREP_DATA` is set - return a OpenCASCADE serialized TopoDS_Shape from `create_shape()` and `iterator`.
>>> import ifcopenshell, ifcopenshell.geom
>>> s = ifcopenshell.geom.settings()
>>> s.set(s.DISABLE_TRIANGULATION, True)
>>> s.set(s.USE_BREP_DATA, True)
>>> f = ifcopenshell.open("Duplex_A_20110907_optimized.ifc")
>>> c = f["3bXiCStxP6Fgxdej$yc50U"]
>>> shp = ifcopenshell.geom.create_shape(s, c)
>>> print(shp.geometry.brep_data)
CASCADE Topology V1, (c) Matra-Datavision
Locations 0
Curve2ds 0
Curves 12
1 4.6750000000000034 -8.0749999999999904 2.657 -2.0455514041918775e-15 -1 0
1 4.6750000000000034 -8.0749999999999904 2.657 1 -3.435893306383461e-15 0
1 6.2260000000000044 -8.0749999999999957 2.657 -2.0455514041918724e-15 -1 0
1 6.226 -10.246000000000031 2.657 -1 6.8717866127669219e-15 0
...
EDGE_ARROWS
-----------
When `INCLUDE_CURVES` is true and geometric elements include curves (such as the wall axis), add arrow heads to the edges to indicate direction of the curve.
Duplex_A_20110907_optimized.ifc d4.dae --model --plan --edge-arrows -yv --include attribute GlobalId 2O2Fr$t4X7Zf8NOew3FNr2
![Image of d4.dae](images/settings-4.png)
EXCLUDE_SOLIDS_AND_SURFACES
---------------------------
Exclude faces, shells and solids from geometrical output. Implied when using `--plan` without `--model` in IfcConvert.
FASTER_BOOLEANS
---------------
NOTE: Only applicable when using OCCT 6.9 and earlier.
This setting is available in IfcConvert using `--merge-boolean-operands`.
Fuse the collection of all boolean operands into a single union before applying the boolean subtraction, as opposed to doing individual subtractions. This likely improves performance. From OCCT 7.0 onwards the boolean operations with multiple arguments is used.
GENERATE_UVS
------------
This setting is available in IfcConvert using `--generate-uvs`.
Applies a box projection on the generated geometry for the element to obtain UV coordinates. This is purely generated, it does not involve texture coordinates stored in the IFC model.
Duplex_A_20110907_optimized.ifc d5.dae --generate-uvs -yv --include attribute GlobalId 2O2Fr$t4X7Zf8NOew3FNr2
![Image of d5.dae with a UV grid applied in Blender](images/settings-5.png)
INCLUDE_CURVES
--------------
This setting is available in IfcConvert using `--plan`.
Include edge and wire geometries in the geometric output.
LAYERSET_FIRST
--------------
This setting is available in IfcConvert using `--layerset-first`.
When not using APPLY_LAYERSETS, take the first material layer from the set to use as the material for the overall element.
NO_NORMALS
----------
This setting is available in IfcConvert using `--no-normals`.
Do not emit normals on geometric output
SEARCH_FLOOR
------------
Note: Only applicable to Collada .DAE output when used from IfcConvert.
This setting is available in IfcConvert using `--use-element-hierarchy`.
Include the spatial hierarchy in the elements.
SEW_SHELLS
----------
This setting is available in IfcConvert using `--orient-shells`.
Re-orient or sew connected face sets to have a consistent outwards orientation.
SITE_LOCAL_PLACEMENT
--------------------
This setting is available in IfcConvert using `--site-local-placement`.
See `BUILDING_LOCAL_PLACEMENT`, but exclude also the ObjectPlacement of the IfcSite.
USE_BREP_DATA
-------------
See `DISABLE_TRIANGULATION`.
USE_PYTHON_OPENCASCADE
----------------------
Note: Only available when an import of `OCC.Core.BRepTools` or `OCC.BRepTools` succeeds.
This implies `USE_WORLD_COORDS` `USE_BREP_DATA` and `DISABLE_TRIANGULATION`. The serialized TopoDS_Shape of `USE_BREP_DATA` is deserialized by Python OpenCASCADE.
USE_WORLD_COORDS
----------------
Apply the ObjectPlacement of the building elements to the geometric output. This is implied when using the Wavefront .OBJ output in IfcConvert. Note that this also eliminates the possibility for geometric elements to point to the same interpreted geometry result.
VALIDATE_QUANTITIES
-------------------
This setting is available in IfcConvert using `--validate`.
Running IfcConvert with `--validate` will set a non-zero exit code when ever a log message with severity equal or greater than ERROR has been emitted.
Currently for internal use only. For every building element geometry converted, looks for an associated quantity set where the OwnerHistory's organization name is IfcOpenShell. And looks for the quantities "Total Surface Area", "Volume", "Shape Validation Properties.Surface Genus" and validates these according to the interpreted geometry definition. Emit Logger::Error when calculated values are outside of the tolerance range for the value stored in the model.
WELD_VERTICES
-------------
Note: In Python, this setting is *on* by default.
Note: This setting only affects triangulated output.
This setting is available in IfcConvert using `--weld-vertices`.
Discards normals and joins vertices solely based on position. This is useful when output is to be modified in a modeling application.
>>> import ifcopenshell, ifcopenshell.geom
>>> s = ifcopenshell.geom.settings()
>>> s.set(s.WELD_VERTICES, False)
>>> f = ifcopenshell.open("Duplex_A_20110907_optimized.ifc")
>>> c = f["3bXiCStxP6Fgxdej$yc50U"]
>>> shp = ifcopenshell.geom.create_shape(s, c)
>>> shp.geometry.verts
(4.675000000000003, -8.07499999999999, 2.657, 4.674999999999999, -10.24600000000002, 2.657, 6.226000000000004, -8.074999999999996, 2.657, 6.226, -10.24600000000003, 2.657, 4.675000000000003, -8.07499999999999, 2.6, 4.674999999999999, -10.24600000000002, 2.6, 6.226000000000004, -8.074999999999996, 2.6, 6.226, -10.24600000000003, 2.6, 4.674999999999999, -10.24600000000002, 2.657, 4.674999999999999, -10.24600000000002, 2.6, 4.675000000000003, -8.07499999999999, 2.657, 4.675000000000003, -8.07499999999999, 2.6, 6.226, -10.24600000000003, 2.657, 4.674999999999999, -10.24600000000002, 2.657, 6.226, -10.24600000000003, 2.6, 4.674999999999999, -10.24600000000002, 2.6, 6.226000000000004, -8.074999999999996, 2.657, 6.226, -10.24600000000003, 2.657, 6.226000000000004, -8.074999999999996, 2.6, 6.226, -10.24600000000003, 2.6, 4.675000000000003, -8.07499999999999, 2.657, 4.675000000000003, -8.07499999999999, 2.6, 6.226000000000004, -8.074999999999996, 2.657, 6.226000000000004, -8.074999999999996, 2.6)
>>> shp.geometry.normals
(3.059754518198021e-17, 0.0, -1.0, 3.059754518198021e-17, 0.0, -1.0, 3.059754518198021e-17, 0.0, -1.0, 3.059754518198021e-17, 0.0, -1.0, 2.110175529791737e-16, 0.0, -1.0, 2.110175529791737e-16, 0.0, -1.0, 2.110175529791737e-16, 0.0, -1.0, 2.110175529791737e-16, 0.0, -1.0, -1.0, 1.79434333701042e-15, 0.0, -1.0, 1.79434333701042e-15, 0.0, -1.0, 1.79434333701042e-15, 0.0, -1.0, 1.79434333701042e-15, 0.0, 6.8717866127669046e-15, 1.0, 0.0, 6.8717866127669046e-15, 1.0, 0.0, 6.8717866127669046e-15, 1.0, 0.0, 6.8717866127669046e-15, 1.0, 0.0, -1.0, 1.79434333701042e-15, 0.0, -1.0, 1.79434333701042e-15, 0.0, -1.0, 1.79434333701042e-15, 0.0, -1.0, 1.79434333701042e-15, 0.0, 3.4358933063834523e-15, 1.0, 0.0, 3.4358933063834523e-15, 1.0, 0.0, 3.4358933063834523e-15, 1.0, 0.0, 3.4358933063834523e-15, 1.0, 0.0)
>>>
>>> s.set(s.WELD_VERTICES, True)
>>> shp = ifcopenshell.geom.create_shape(s, c)
>>> shp.geometry.verts
(4.675000000000003, -8.07499999999999, 2.657, 4.674999999999999, -10.24600000000002, 2.657, 6.226000000000004, -8.074999999999996, 2.657, 6.226, -10.24600000000003, 2.657, 4.675000000000003, -8.07499999999999, 2.6, 4.674999999999999, -10.24600000000002, 2.6, 6.226000000000004, -8.074999999999996, 2.6, 6.226, -10.24600000000003, 2.6)
>>> shp.geometry.normals
()
+12 -5
View File
@@ -76,7 +76,7 @@ PROJECT_NAME = "IfcOpenShell"
USE_CURRENT_PYTHON_VERSION = os.getenv("USE_CURRENT_PYTHON_VERSION")
ADD_COMMIT_SHA = os.getenv("ADD_COMMIT_SHA")
PYTHON_VERSIONS = ["3.6.14", "3.7.13", "3.8.13", "3.9.11", "3.10.3", "3.11.0"]
PYTHON_VERSIONS = ["3.9.11", "3.10.3", "3.11.8", "3.12.1"]
JSON_VERSION = "v3.6.1"
OCE_VERSION = "0.18.3"
OCCT_VERSION = "7.5.3"
@@ -254,6 +254,11 @@ if not os.path.exists(LOG_FILE):
open(LOG_FILE, "w").close()
logger.info(f"using command log file '{LOG_FILE}'")
# Causing havoc in python 3.11 build
try:
del os.environ['__PYVENV_LAUNCHER__']
except: pass
def run(cmds, cwd=None, can_fail=False):
"""
@@ -284,8 +289,9 @@ if platform.system() == "Darwin":
# Apparently not supported
PYTHON_VERSIONS = [pv for pv in PYTHON_VERSIONS if tuple(map(int, pv.split("."))) >= (3, 7)]
if run(["sw_vers", "-productVersion"]) < "10.16":
# Apparently not supported
PYTHON_VERSIONS = [pv for pv in PYTHON_VERSIONS if tuple(map(int, pv.split("."))) < (3, 11)]
# This is now solved with the '__PYVENV_LAUNCHER__' hack
# PYTHON_VERSIONS = [pv for pv in PYTHON_VERSIONS if tuple(map(int, pv.split("."))) < (3, 11)]
pass
BOOST_VERSION_UNDERSCORE = BOOST_VERSION.replace(".", "_")
@@ -892,8 +898,9 @@ if "IfcOpenShell-Python" in targets:
module_dir = os.path.dirname(run([python_executable, "-c", "import inspect, ifcopenshell; print(inspect.getfile(ifcopenshell))"]))
if platform.system() != "Darwin":
# TODO: This symbol name depends on the Python version?
run([strip, "-s", "-K", "PyInit__ifcopenshell_wrapper", "_ifcopenshell_wrapper.so"], cwd=module_dir)
if BUILD_CFG == "Release":
# TODO: This symbol name depends on the Python version?
run([strip, "-s", "-K", "PyInit__ifcopenshell_wrapper", "_ifcopenshell_wrapper.so"], cwd=module_dir)
return module_dir
+14 -1
View File
@@ -1,3 +1,9 @@
VERSION:=`date '+%y%m%d'`
SED:=sed -i
ifeq ($(UNAME_S),Darwin)
SED:=sed -i '' -e
endif
.PHONY: ci
ci:
tox
@@ -12,6 +18,13 @@ models:
cd src && xsdata generate -p bcf.v2.model --unnest-classes --kw-only --slots -ds Google bcf/v2/xsd
cd src && xsdata generate -p bcf.v3.model --unnest-classes --kw-only --slots -ds Google bcf/v3/xsd
.PHONY: dist
dist:
rm -rf dist
$(SED) "s/999999/$(VERSION)/" pyproject.toml
python -m build
$(SED) "s/$(VERSION)/999999/" pyproject.toml
# .PHONY
# api:
# openapi-python-client generate --url https://api.swaggerhub.com/apis/buildingSMART/BCF/3.0
# openapi-python-client generate --url https://api.swaggerhub.com/apis/buildingSMART/BCF/3.0
+3 -82
View File
@@ -1,84 +1,5 @@
# bcf
A simple Python implementation of BCF.
Manipulation of BCF-XML is available via `bcfxml.py` and manipulation of BCF-API
is available via `bcfapi.py`.
It tries to support BCF-XML version 2.1 and 3.0, and BCF-API 3.0.
## bcfxml
The `bcfxml.load` function lets you read a BCF-XML file.
It takes care of using the right version based on the "bcf.version" file contained in the BCF package.
The BCF files are extracted and parsed on-demand, and edits are stored in memory until you call the `save` method.
```python
from bcf.bcfxml import load
# Load a project
with load("/path/to/file.bcf") as bcfxml:
project = bcfxml.project
print(project.name)
# To edit a project, just modify the object directly
bcfxml.project.name = "New name"
# Get a dictionary of topics
topics = bcfxml.topics
for topic_guid, topic_handler in bcfxml.topics.items():
topic = topic_handler.topic
print("Topic guid is", topic.guid)
print("Topic title is", topic.title)
# Fetch extra data about a topic
header = topic_handler.header
comments = topic_handler.comments
viewpoints = topic_handler.viewpoints
for comment in comments:
print(comment.guid)
print(comment.comment)
print(comment.author)
# Get a particular topic
topic = bcfxml.get_topic(guid)
# Modify a topic
topic.title = "New title"
bcfxml.save()
```
## bcfapi
The `bcfapi` module lets you interact with the BCF-API standard.
```python
from bcf.v3.bcfapi import FoundationClient, BcfClient
foundation_client = FoundationClient("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET", "OPENCDE_BASEURL")
auth_methods = foundation_client.get_auth_methods()
# Our library currently only implements the authorization_code flow
if "authorization_code" in auth_methods:
foundation_client.login()
bcf_client = BcfClient(foundation_client)
versions = foundation_client.get_versions()
for version in versions:
if "3.0" in versions:
if version["api_id"] == "bcf" and version["version_id"] == "3.0":
bcf_client.set_version(version)
data = bcf_client.get_projects()
print(data)
project_id = data[0]["project_id"]
print(project_id)
data = bcf_client.get_project(project_id)
print(data)
data = bcf_client.get_extensions(project_id)
print(data)
```
A simple Python implementation of the BCF standard. Manipulation of BCF-XML is
available via `bcfxml.py` and manipulation of BCF-API is available via
`bcfapi.py`.
+3 -3
View File
@@ -17,7 +17,7 @@ dependencies = [
"numpy",
"ifcopenshell",
]
version = "0.0.1"
version = "0.0.999999"
classifiers = [
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
@@ -76,7 +76,7 @@ deps =
black
isort
pylint
commands =
commands =
black {posargs:.}
isort {posargs:.}
pylint {posargs:.} --output-format=colorized
@@ -138,4 +138,4 @@ max-attributes = 10
[tool.pylint.format]
expected-line-ending-format = "LF"
max-line-length = 120
max-line-length = 120
+78 -292
View File
@@ -36,114 +36,88 @@ endif
endif
VERSION:=`date '+%y%m%d'`
LAST_COMMIT_HASH:=$(shell git rev-parse HEAD)
PYVERSION:=py310
PYPI_IMP:=cp
ifeq ($(PYVERSION), py39)
PYLIBDIR:=python3.9
PYNUMBER:=39
PYPI_VERSION:=3.9
endif
ifeq ($(PYVERSION), py310)
PYLIBDIR:=python3.10
PYNUMBER:=310
PYPI_VERSION:=3.10
endif
ifeq ($(PYVERSION), py311)
PYLIBDIR:=python3.11
PYNUMBER:=311
PYPI_VERSION:=3.11
endif
ifeq ($(PLATFORM), linux)
ifeq ($(PYVERSION), py39)
HPPFCL_URL:=https://anaconda.org/conda-forge/hpp-fcl/2.3.4/download/linux-64/hpp-fcl-2.3.4-py39h40a70d0_0.conda
EIGENPY_URL:=https://anaconda.org/conda-forge/eigenpy/3.1.0/download/linux-64/eigenpy-3.1.0-py39hdfdd6bb_0.conda
BOOST_URL:=https://anaconda.org/conda-forge/boost/1.78.0/download/linux-64/boost-1.78.0-py39h7c9e3ff_4.tar.bz2
QHULL_URL:=https://anaconda.org/conda-forge/qhull/2020.2/download/linux-64/qhull-2020.2-h4bd325d_2.tar.bz2
LXML_URL:=https://files.pythonhosted.org/packages/19/d9/a69c6aff5673554df48120565a14a50eaa41d29ae03b02faa0b023666318/lxml-4.6.3-cp39-cp39-manylinux2014_x86_64.whl
SHAPELY_URL:=https://files.pythonhosted.org/packages/2d/f2/8ec281d357e8bb7d08dc8d727f0e4c8ef3dae7d3fa75c69c8e452bb82d50/shapely-2.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
PILLOW_URL:=https://files.pythonhosted.org/packages/01/61/3ff85fb4bb596ce3d223c8fcf93c8df5c12bc8899dfb4fb3cb1c5b20dd5f/Pillow-9.2.0-cp39-cp39-manylinux_2_28_x86_64.whl
endif
ifeq ($(PYVERSION), py310)
HPPFCL_URL:=https://anaconda.org/conda-forge/hpp-fcl/2.3.4/download/linux-64/hpp-fcl-2.3.4-py310h995690b_0.conda
EIGENPY_URL:=https://anaconda.org/conda-forge/eigenpy/3.1.0/download/linux-64/eigenpy-3.1.0-py310hf02b7e0_0.conda
BOOST_URL:=https://anaconda.org/conda-forge/boost/1.78.0/download/linux-64/boost-1.78.0-py310hc4a4660_4.tar.bz2
QHULL_URL:=https://anaconda.org/conda-forge/qhull/2020.2/download/linux-64/qhull-2020.2-h4bd325d_2.tar.bz2
LXML_URL:=https://files.pythonhosted.org/packages/25/1e/19b46d8e8881fe0df2e20945d51919eeb1817836d62a90efa8506530e45c/lxml-4.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
SHAPELY_URL:=https://files.pythonhosted.org/packages/a8/a5/403728b5614b28083f6424dfdefec5fcf58068495fb03bb08532671c642f/shapely-2.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
PILLOW_URL:=https://files.pythonhosted.org/packages/f6/51/320986ebd6d46a0e95c2240468ced73153b691ce07617078bcdf30c609ec/Pillow-9.2.0-cp310-cp310-manylinux_2_28_x86_64.whl
endif
ASSIMP_URL:=https://anaconda.org/conda-forge/assimp/5.0.1/download/linux-64/assimp-5.0.1-hedfc422_6.tar.bz2
OCTOMAP_URL:=https://anaconda.org/conda-forge/octomap/1.9.8/download/linux-64/octomap-1.9.8-h924138e_0.tar.bz2
BOOSTCPP_URL:=https://anaconda.org/conda-forge/boost-cpp/1.78.0/download/linux-64/boost-cpp-1.78.0-h6582d0a_3.conda
ZLIB_URL:=https://anaconda.org/conda-forge/zlib/1.2.11/download/linux-64/zlib-1.2.11-h516909a_1010.tar.bz2
PYPI_PLATFORM:=--platform manylinux_2_17_x86_64
LXML_ARCH:=manylinux_2_28_x86_64
SHAPELY_ARCH:=manylinux_2_17_x86_64.manylinux2014_x86_64
PILLOW_ARCH:=manylinux_2_28_x86_64
endif
ifeq ($(PLATFORM), macos)
PYPI_PLATFORM:=--platform macosx_10_9_x86_64
SHAPELY_ARCH:=macosx_10_9_x86_64
PILLOW_ARCH:=macosx_10_10_x86_64
ifeq ($(PYVERSION), py39)
HPPFCL_URL:=https://anaconda.org/conda-forge/hpp-fcl/2.3.4/download/osx-64/hpp-fcl-2.3.4-py39hd85b194_0.conda
EIGENPY_URL:=https://anaconda.org/conda-forge/eigenpy/3.1.0/download/osx-64/eigenpy-3.1.0-py39hc4d6e28_0.conda
BOOST_URL:=https://anaconda.org/conda-forge/boost/1.78.0/download/osx-64/boost-1.78.0-py39h953a6b8_4.tar.bz2
QHULL_URL:=https://anaconda.org/conda-forge/qhull/2020.2/download/osx-64/qhull-2020.2-h940c156_2.tar.bz2
LXML_URL:=https://files.pythonhosted.org/packages/b8/74/a71f7ad72e8db54ce899efab84507b801660750cbbfa6a39e6717557d36a/lxml-4.6.3-cp39-cp39-macosx_10_9_x86_64.whl
SHAPELY_URL:=https://files.pythonhosted.org/packages/36/a4/7e542a209f862f967d7cb8e939eff155f4294a27d17e16441fb8bdd51a2c/shapely-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl
PILLOW_URL:=https://files.pythonhosted.org/packages/88/7a/ddfe28b485b623361457d4783007c1f9ba83a87f93e7fec32f64793efb6c/Pillow-9.2.0-cp39-cp39-macosx_10_10_x86_64.whl
LXML_ARCH:=macosx_11_0_x86_64
endif
ifeq ($(PYVERSION), py310)
HPPFCL_URL:=https://anaconda.org/conda-forge/hpp-fcl/2.3.4/download/osx-64/hpp-fcl-2.3.4-py310h1db6f5f_0.conda
EIGENPY_URL:=https://anaconda.org/conda-forge/eigenpy/3.1.0/download/osx-64/eigenpy-3.1.0-py310h43da829_0.conda
BOOST_URL:=https://anaconda.org/conda-forge/boost/1.78.0/download/osx-64/boost-1.78.0-py310h3e792ce_4.tar.bz2
QHULL_URL:=https://anaconda.org/conda-forge/qhull/2020.2/download/osx-64/qhull-2020.2-h940c156_2.tar.bz2
LXML_URL:=https://files.pythonhosted.org/packages/a1/44/17b7dac7a18807d30e2fe10c3328c152808f5464565e230bfd0e77f178c6/lxml-4.8.0-cp310-cp310-macosx_10_15_x86_64.whl
SHAPELY_URL:=https://files.pythonhosted.org/packages/1f/2a/dc3353c2431cf53e8d04bb8fba27e584410ca3435c9c85f76d71bf0c0e80/shapely-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl
PILLOW_URL:=https://files.pythonhosted.org/packages/d8/60/b13c00d403f34110e96c1b5c0afa73ce461efe3fe960c3a7e3e7fe190d82/Pillow-9.2.0-cp310-cp310-macosx_10_10_x86_64.whl
LXML_ARCH:=macosx_11_0_x86_64
endif
ifeq ($(PYVERSION), py311)
LXML_ARCH:=macosx_11_0_universal2
endif
ASSIMP_URL:=https://anaconda.org/conda-forge/assimp/5.0.1/download/osx-64/assimp-5.0.1-h1224e73_6.tar.bz2
OCTOMAP_URL:=https://anaconda.org/conda-forge/octomap/1.9.8/download/osx-64/octomap-1.9.8-hb8565cd_0.tar.bz2
BOOSTCPP_URL:=https://anaconda.org/conda-forge/boost-cpp/1.78.0/download/osx-64/boost-cpp-1.78.0-hf5ba120_3.conda
ZLIB_URL:=https://anaconda.org/conda-forge/zlib/1.2.11/download/osx-64/zlib-1.2.11-h7795811_1010.tar.bz2
endif
ifeq ($(PLATFORM), macosm1)
ifeq ($(PYVERSION), py39)
HPPFCL_URL:=https://anaconda.org/conda-forge/hpp-fcl/2.3.4/download/osx-arm64/hpp-fcl-2.3.4-py39hc34188a_0.conda
EIGENPY_URL:=https://anaconda.org/conda-forge/eigenpy/3.1.0/download/osx-arm64/eigenpy-3.1.0-py39h13cfc01_0.conda
BOOST_URL:=https://anaconda.org/conda-forge/boost/1.78.0/download/osx-arm64/boost-1.78.0-py39h99de9ae_4.tar.bz2
QHULL_URL:=https://anaconda.org/conda-forge/qhull/2020.2/download/osx-arm64/qhull-2020.2-hc021e02_2.tar.bz2
LXML_URL:=https://anaconda.org/conda-forge/lxml/4.9.1/download/osx-arm64/lxml-4.9.1-py39h9eb174b_0.tar.bz2
SHAPELY_URL:=https://files.pythonhosted.org/packages/ea/aa/45fbd031edf3149cb767d8b9f9db45d5faf0324d743c6b8fb0298cc022d0/shapely-2.0.1-cp39-cp39-macosx_11_0_arm64.whl
PILLOW_URL:=https://files.pythonhosted.org/packages/aa/bc/21097cd891dd2fa02f2b3d767e02e883e026482e59d29975d1bc30024aa3/Pillow-9.2.0-cp39-cp39-macosx_11_0_arm64.whl
endif
ifeq ($(PYVERSION), py310)
HPPFCL_URL:=https://anaconda.org/conda-forge/hpp-fcl/2.3.4/download/osx-arm64/hpp-fcl-2.3.4-py310h46fc4cd_0.conda
EIGENPY_URL:=https://anaconda.org/conda-forge/eigenpy/3.1.0/download/osx-arm64/eigenpy-3.1.0-py310ha2643af_0.conda
BOOST_URL:=https://anaconda.org/conda-forge/boost/1.78.0/download/osx-arm64/boost-1.78.0-py310h629746b_4.tar.bz2
QHULL_URL:=https://anaconda.org/conda-forge/qhull/2020.2/download/osx-arm64/qhull-2020.2-hc021e02_2.tar.bz2
LXML_URL:=https://anaconda.org/conda-forge/lxml/4.9.1/download/osx-arm64/lxml-4.9.1-py310h02f21da_0.tar.bz2
SHAPELY_URL:=https://files.pythonhosted.org/packages/ec/41/d59208743e737184e1b403e95a937aebb022b8459e99efbcd5208fc8be46/shapely-2.0.1-cp310-cp310-macosx_11_0_arm64.whl
PILLOW_URL:=https://files.pythonhosted.org/packages/0c/5f/117b653cad585f3aedfe0de996c292e67d4b020ed77f652e5a6c8c24f908/Pillow-9.2.0-cp310-cp310-macosx_11_0_arm64.whl
endif
ASSIMP_URL:=https://anaconda.org/conda-forge/assimp/5.0.1/download/osx-arm64/assimp-5.0.1-h0f81e16_7.tar.bz2
OCTOMAP_URL:=https://anaconda.org/conda-forge/octomap/1.9.8/download/osx-arm64/octomap-1.9.8-hffc8910_0.tar.bz2
BOOSTCPP_URL:=https://anaconda.org/conda-forge/boost-cpp/1.78.0/download/osx-arm64/boost-cpp-1.78.0-h9ed8d21_3.conda
ZLIB_URL:=https://anaconda.org/conda-forge/zlib/1.2.11/download/osx-arm64/zlib-1.2.11-h90dfc92_1014.tar.bz2
PYPI_PLATFORM:=--platform macosx_11_0_arm64
LXML_ARCH:=macosx_11_0_universal2
SHAPELY_ARCH:=macosx_11_0_arm64
PILLOW_ARCH:=macosx_11_0_arm64
endif
ifeq ($(PLATFORM), win)
PYPI_PLATFORM:=--platform win_amd64
LXML_ARCH:=win_amd64
SHAPELY_ARCH:=win_amd64
PILLOW_ARCH:=win_amd64
endif
LXML_NAME:=lxml
LXML_VER:=4.9.4
SHAPELY_NAME:=shapely
SHAPELY_VER:=2.0.2
PILLOW_NAME:=pillow
PILLOW_PKG_NAME:=Pillow
PILLOW_VER:=9.5.0
SHAPELY_URL:=https://files.pythonhosted.org/packages/cp$(PYNUMBER)/s/$(SHAPELY_NAME)/$(SHAPELY_NAME)-$(SHAPELY_VER)-cp$(PYNUMBER)-cp$(PYNUMBER)-$(SHAPELY_ARCH).whl
PILLOW_URL:=https://files.pythonhosted.org/packages/cp$(PYNUMBER)/p/$(PILLOW_NAME)/$(PILLOW_PKG_NAME)-$(PILLOW_VER)-cp$(PYNUMBER)-cp$(PYNUMBER)-$(PILLOW_ARCH).whl
ifeq ($(PLATFORM), macosm1)
ifeq ($(PYVERSION), py39)
HPPFCL_URL:=https://anaconda.org/conda-forge/hpp-fcl/2.3.4/download/win-64/hpp-fcl-2.3.4-py39h39b25cb_0.conda
EIGENPY_URL:=https://anaconda.org/conda-forge/eigenpy/3.1.0/download/win-64/eigenpy-3.1.0-py39hb6c915b_0.conda
BOOST_URL:=https://anaconda.org/conda-forge/boost/1.78.0/download/win-64/boost-1.78.0-py39hea4d8d1_4.tar.bz2
LXML_URL:=https://files.pythonhosted.org/packages/72/d4/426ecb8849c47c3e370c87aa0ac05d85768df917ffea27fcd6686a5e6495/lxml-4.6.3-cp39-cp39-win_amd64.whl
SHAPELY_URL:=https://files.pythonhosted.org/packages/a7/ae/eab645c4075093584b7a65ab71cb8ff4563a015bd935c9b55dba14b2c1eb/shapely-2.0.1-cp39-cp39-win_amd64.whl
PILLOW_URL:=https://files.pythonhosted.org/packages/19/3f/b4d4bcf05dbcbe07f2e9613a8f4180c297395e73a91d8ad22c32c6624f8c/Pillow-9.2.0-cp39-cp39-win_amd64.whl
LXML_URL:=https://anaconda.org/conda-forge/lxml/4.9.1/download/osx-arm64/lxml-4.9.1-py39h0520ce3_1.tar.bz2
endif
ifeq ($(PYVERSION), py310)
HPPFCL_URL:=https://anaconda.org/conda-forge/hpp-fcl/2.3.4/download/win-64/hpp-fcl-2.3.4-py310heb59267_0.conda
EIGENPY_URL:=https://anaconda.org/conda-forge/eigenpy/3.1.0/download/win-64/eigenpy-3.1.0-py310hd146abe_0.conda
BOOST_URL:=https://anaconda.org/conda-forge/boost/1.78.0/download/win-64/boost-1.78.0-py310h220cb41_4.tar.bz2
LXML_URL:=https://files.pythonhosted.org/packages/f6/71/65c80a4caa1617a4c6e8fe1500cebb179db96232e2f623bfe6a1f4294e39/lxml-4.8.0-cp310-cp310-win_amd64.whl
SHAPELY_URL:=https://files.pythonhosted.org/packages/81/8a/7ac076a86b2632f1872284c5e60ed5f2fc26094875a85b35d9fa17b52504/shapely-2.0.1-cp310-cp310-win_amd64.whl
PILLOW_URL:=https://files.pythonhosted.org/packages/02/55/67a3c17b9e7d972ed8c246f104da99ca4f3ea42fba566697e479011b84b6/Pillow-9.2.0-cp310-cp310-win_amd64.whl
LXML_URL:=https://anaconda.org/conda-forge/lxml/4.9.1/download/osx-arm64/lxml-4.9.1-py310h02f21da_0.tar.bz2
endif
ASSIMP_URL:=https://anaconda.org/conda-forge/assimp/5.0.1/download/win-64/assimp-5.0.1-hc2aa0de_6.tar.bz2
OCTOMAP_URL:=https://anaconda.org/conda-forge/octomap/1.9.8/download/win-64/octomap-1.9.8-h91493d7_0.tar.bz2
BOOSTCPP_URL:=https://anaconda.org/conda-forge/boost-cpp/1.78.0/download/win-64/boost-cpp-1.78.0-h9f4b32c_3.conda
ZLIB_URL:=https://anaconda.org/conda-forge/zlib/1.2.11/download/win-64/zlib-1.2.11-h62dcd97_1010.tar.bz2
ifeq ($(PYVERSION), py311)
LXML_URL:=https://anaconda.org/conda-forge/lxml/4.9.1/download/osx-arm64/lxml-4.9.1-py311h246f609_1.tar.bz2
endif
else
LXML_URL:=https://files.pythonhosted.org/packages/cp$(PYNUMBER)/l/$(LXML_NAME)/$(LXML_NAME)-$(LXML_VER)-cp$(PYNUMBER)-cp$(PYNUMBER)-$(LXML_ARCH).whl
endif
$(info $$LXML_URL is [${LXML_URL}])
$(info $$SHAPELY_URL is [${SHAPELY_URL}])
$(info $$PILLOW_URL is [${PILLOW_URL}])
.PHONY: bump
bump:
@@ -163,7 +137,7 @@ endif
cp -r blenderbim/* dist/blenderbim/
# Provides IfcOpenShell Python functionality
cd dist/working && wget https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-$(PYNUMBER)-v0.7.0-fc50bdd-$(PLATFORM)64.zip
cd dist/working && wget https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-$(PYNUMBER)-v0.7.0-f7c03db-$(PLATFORM)64.zip
cd dist/working && unzip ifcopenshell-python*
cp -r dist/working/ifcopenshell dist/blenderbim/libs/site/packages/
@@ -177,8 +151,10 @@ endif
cd dist/working && wget https://github.com/IfcOpenShell/IfcOpenShell/archive/v0.7.0.zip
cd dist/working && unzip v0.7.0.zip
# IfcOpenBot sometimes lags behind, so we hotfix the Python utilities
cp -r dist/working/IfcOpenShell-0.7.0/src/ifcopenshell-python/ifcopenshell/util/* dist/blenderbim/libs/site/packages/ifcopenshell/util/
cp -r dist/working/IfcOpenShell-0.7.0/src/ifcopenshell-python/ifcopenshell/api/* dist/blenderbim/libs/site/packages/ifcopenshell/api/
rm -rf dist/blenderbim/libs/site/packages/ifcopenshell/util/
rm -rf dist/blenderbim/libs/site/packages/ifcopenshell/api/
cp -r dist/working/IfcOpenShell-0.7.0/src/ifcopenshell-python/ifcopenshell/util dist/blenderbim/libs/site/packages/ifcopenshell/
cp -r dist/working/IfcOpenShell-0.7.0/src/ifcopenshell-python/ifcopenshell/api dist/blenderbim/libs/site/packages/ifcopenshell/
cp dist/working/IfcOpenShell-0.7.0/src/ifcopenshell-python/ifcopenshell/*.py dist/blenderbim/libs/site/packages/ifcopenshell/
cp dist/working/IfcOpenShell-0.7.0/src/ifcopenshell-python/ifcopenshell/express/rule_executor.py dist/blenderbim/libs/site/packages/ifcopenshell/express/
# Provides bcf functionality
@@ -193,8 +169,10 @@ endif
cp -r dist/working/IfcOpenShell-0.7.0/src/ifcbimtester/bimtester dist/blenderbim/libs/site/packages/
# Provides IFCTester functionality
cp -r dist/working/IfcOpenShell-0.7.0/src/ifctester/ifctester dist/blenderbim/libs/site/packages/
# Provides IFCCOBie functionality
cp -r dist/working/IfcOpenShell-0.7.0/src/ifccobie/* dist/blenderbim/libs/site/packages/
# Provides IFCFM functionality
cp -r dist/working/IfcOpenShell-0.7.0/src/ifcfm/ifcfm dist/blenderbim/libs/site/packages/
# Provides bSDD functionality
cp -r dist/working/IfcOpenShell-0.7.0/src/bsdd/* dist/blenderbim/libs/site/packages/
# Provides IFCDiff functionality
cp -r dist/working/IfcOpenShell-0.7.0/src/ifcdiff/* dist/blenderbim/libs/site/packages/
# Provides IFCCSV functionality
@@ -375,165 +353,23 @@ endif
mkdir dist/working
cd dist/working && $(PYTHON) -m venv env
cd dist/working && mkdir site-packages
# Required by IfcCSV
cd dist/working && . env/bin/activate && $(PIP) install pandas $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --target=./site-packages
# Pandas ships with very heavy tests
cd dist/working/site-packages/pandas && rm -rf tests
cd dist/working && . env/bin/activate && $(PIP) install openpyxl --target=./site-packages
cd dist/working && . env/bin/activate && $(PIP) install odfpy --target=./site-packages
# Required by IFCCityJSON
cd dist/working && . env/bin/activate && $(PIP) install cjio --target=./site-packages
# Provides express rule validation for ifcopenshell.validate
cd dist/working && . env/bin/activate && $(PIP) install pytest --target=./site-packages
# Provides Brickschema functionality
cd dist/working && . env/bin/activate && $(PIP) install brickschema[persistence] --target=./site-packages
cd dist/working && . env/bin/activate && $(PIP) install "brickschema[persistence]==0.7.6a2" --target=./site-packages
# Required for SVG to DXF conversion
cd dist/working && . env/bin/activate && $(PIP) install "ezdxf" --target=./site-packages
cp -r dist/working/site-packages/* dist/blenderbim/libs/site/packages/
rm -rf dist/working
# Required by IFCClash
mkdir dist/working
cd dist/working && wget $(HPPFCL_URL)
cd dist/working && unzip hpp-fcl*
cd dist/working && tar -I zstd -xvf pkg*
ifeq ($(PLATFORM), linux)
cp -r dist/working/lib/$(PYLIBDIR)/site-packages/hppfcl dist/blenderbim/libs/site/packages/
cp -r dist/working/lib/*.so* dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), macos)
cp -r dist/working/lib/$(PYLIBDIR)/site-packages/hppfcl dist/blenderbim/libs/site/packages/
cp -r dist/working/lib/*.dylib dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), macosm1)
cp -r dist/working/lib/$(PYLIBDIR)/site-packages/hppfcl dist/blenderbim/libs/site/packages/
cp -r dist/working/lib/*.dylib dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), win)
cp -r dist/working/Lib/site-packages/hppfcl dist/blenderbim/libs/site/packages/
cp -r dist/working/Library/bin/*.dll dist/blenderbim/libs/site/packages/hppfcl/
endif
rm -rf dist/working
# Required by hpp-fcl
mkdir dist/working
cd dist/working && wget $(ASSIMP_URL)
cd dist/working && tar -xf assimp*
ifeq ($(PLATFORM), linux)
cp -r dist/working/lib/*.so* dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), macos)
cp -r dist/working/lib/*.dylib dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), macosm1)
cp -r dist/working/lib/*.dylib dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), win)
cp -r dist/working/Library/bin/*.dll dist/blenderbim/libs/site/packages/hppfcl/
endif
rm -rf dist/working
# Required by hpp-fcl except on Windows
ifneq ($(PLATFORM), win)
mkdir dist/working
cd dist/working && wget $(QHULL_URL)
cd dist/working && tar -xf qhull*
ifeq ($(PLATFORM), linux)
cp -r dist/working/lib/*.so* dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), macos)
cp -r dist/working/lib/*.dylib dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), macosm1)
cp -r dist/working/lib/*.dylib dist/blenderbim/libs/
endif
rm -rf dist/working
endif
# Required by hpp-fcl
mkdir dist/working
cd dist/working && wget $(EIGENPY_URL)
cd dist/working && unzip eigenpy*
cd dist/working && tar -I zstd -xvf pkg*
ifeq ($(PLATFORM), linux)
cp -r dist/working/lib/*.so* dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), macos)
cp -r dist/working/lib/*.dylib dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), macosm1)
cp -r dist/working/lib/*.dylib dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), win)
cp -r dist/working/Library/bin/*.dll dist/blenderbim/libs/site/packages/hppfcl/
endif
rm -rf dist/working
# Required by hpp-fcl
mkdir dist/working
cd dist/working && wget $(OCTOMAP_URL)
cd dist/working && tar -xf octomap*
ifeq ($(PLATFORM), linux)
cp -r dist/working/lib/*.so* dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), macos)
cp -r dist/working/lib/*.dylib dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), macosm1)
cp -r dist/working/lib/*.dylib dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), win)
# Uh, do nothing, apparently? No DLLs are shipped.
endif
rm -rf dist/working
# Required by hpp-fcl
mkdir dist/working
cd dist/working && wget $(BOOST_URL)
cd dist/working && tar -xf boost*
ifeq ($(PLATFORM), linux)
cp -r dist/working/lib/*.so* dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), macos)
cp -r dist/working/lib/*.dylib dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), macosm1)
cp -r dist/working/lib/*.dylib dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), win)
cp -r dist/working/Library/bin/*.dll dist/blenderbim/libs/site/packages/hppfcl/
endif
rm -rf dist/working
# Required by hpp-fcl
mkdir dist/working
cd dist/working && wget $(BOOSTCPP_URL)
cd dist/working && unzip boost-cpp*
cd dist/working && tar -I zstd -xvf pkg*
ifeq ($(PLATFORM), linux)
cp -r dist/working/lib/libboost_serialization.so* dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), macos)
cp -r dist/working/lib/libboost_serialization.dylib dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), macosm1)
cp -r dist/working/lib/libboost_serialization.dylib dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), win)
cp -r dist/working/Library/bin/boost_serialization.dll dist/blenderbim/libs/site/packages/hppfcl/
endif
rm -rf dist/working
# Required by hpp-fcl
mkdir dist/working
cd dist/working && wget $(ZLIB_URL)
cd dist/working && tar -xf zlib*
ifeq ($(PLATFORM), linux)
cp -r dist/working/lib/*.so* dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), macos)
cp -r dist/working/lib/*.dylib dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), macosm1)
cp -r dist/working/lib/*.dylib dist/blenderbim/libs/
endif
ifeq ($(PLATFORM), win)
cp -r dist/working/Library/bin/*.dll dist/blenderbim/libs/site/packages/hppfcl/
endif
rm -rf dist/working
# Required by BIMTester
mkdir dist/working
cd dist/working && wget https://files.pythonhosted.org/packages/c8/4b/d0a8c23b6c8985e5544ea96d27105a273ea22051317f850c2cdbf2029fe4/behave-1.2.6.tar.gz
@@ -581,56 +417,6 @@ endif
cd dist/working/parse_type-0.5.2/ && cp -r parse_type ../../blenderbim/libs/site/packages/
rm -rf dist/working
# Required by IFCCOBie for XLSX support
# TODO: see if we can replace this with openpyxl which does both read/write
mkdir dist/working
cd dist/working && wget https://files.pythonhosted.org/packages/0c/bc/82d6783f83f65f56d8b77d052773c4a2f952fa86385f0cd54e1e006658d7/XlsxWriter-1.2.9.tar.gz
cd dist/working && tar -xzvf XlsxWriter*
cd dist/working/XlsxWriter-1.2.9/ && cp -r xlsxwriter ../../blenderbim/libs/site/packages/
rm -rf dist/working
# Required by IFCCOBie for ODS support
mkdir dist/working
cd dist/working && wget https://files.pythonhosted.org/packages/97/73/8ade73f6749177003f7ce3304f524774adda96e6aaab30ea79fd8fda7934/odfpy-1.4.1.tar.gz
cd dist/working && tar -xzvf odfpy*
cd dist/working/odfpy-1.4.1/ && cp -r odf ../../blenderbim/libs/site/packages/
rm -rf dist/working
# Required by odfpy
mkdir dist/working
cd dist/working && wget https://files.pythonhosted.org/packages/a4/5f/f8aa58ca0cf01cbcee728abc9d88bfeb74e95e6cb4334cfd5bed5673ea77/defusedxml-0.6.0.tar.gz
cd dist/working && tar -xzvf defusedxml*
cd dist/working/defusedxml-0.6.0/ && cp -r defusedxml ../../blenderbim/libs/site/packages/
rm -rf dist/working
# Required by augin
mkdir dist/working
cd dist/working && wget https://files.pythonhosted.org/packages/76/b4/b7baffbda025efd5dc8fcd8d2e953e3aa939c236a484084fa8f4c3588ee9/boto3-1.17.17.tar.gz
cd dist/working && tar -xzvf boto3*
cd dist/working/boto3-1.17.17/ && cp -r boto3 ../../blenderbim/libs/site/packages/
rm -rf dist/working
# Required by boto3
mkdir dist/working
cd dist/working && wget https://files.pythonhosted.org/packages/7f/2e/e02fdfd0f0377c4e44e61de27b05d5cfe93575770661ef9ded80ed90fa88/botocore-1.20.17.tar.gz
cd dist/working && tar -xzvf botocore*
cd dist/working/botocore-1.20.17/ && cp -r botocore ../../blenderbim/libs/site/packages/
rm -rf dist/working
# Required by boto3
mkdir dist/working
cd dist/working && wget https://files.pythonhosted.org/packages/3c/56/3f325b1eef9791759784aa5046a8f6a1aff8f7c898a2e34506771d3b99d8/jmespath-0.10.0.tar.gz
cd dist/working && tar -xzvf jmespath*
cd dist/working/jmespath-0.10.0/ && cp -r jmespath ../../blenderbim/libs/site/packages/
rm -rf dist/working
# Required by boto3
mkdir dist/working
cd dist/working && wget https://files.pythonhosted.org/packages/08/e1/3ee2096ebaeeb8c186d20ed16c8faf4a503913e5c9a0e14cd6b8ffc405a3/s3transfer-0.3.4.tar.gz
cd dist/working && tar -xzvf s3transfer*
cd dist/working/s3transfer-0.3.4/ && cp -r s3transfer ../../blenderbim/libs/site/packages/
rm -rf dist/working
# Provides IFCJSON functionality
mkdir dist/working
cd dist/working && wget https://github.com/IFCJSON-Team/IFC2JSON_python/archive/master.zip
@@ -638,13 +424,6 @@ endif
cp -r dist/working/IFC2JSON_python-master/file_converters/ifcjson dist/blenderbim/libs/site/packages/
rm -rf dist/working
# Provides OpenLCA functionality
mkdir dist/working
cd dist/working && wget https://files.pythonhosted.org/packages/85/33/f91b96e9e8608ff65a003b692e8a9cdd60f2178f60617e5b1d21334c009c/olca-ipc-0.0.10.tar.gz
cd dist/working && tar -xzvf olca-ipc*
cd dist/working/olca-ipc-0.0.10/ && cp -r olca ../../blenderbim/libs/site/packages/
rm -rf dist/working
# Provides Brickschema functionality
mkdir dist/working
# For now lets bundle the latest nightly schema
@@ -655,7 +434,7 @@ endif
# Required by brickschema
# This is a bit of a dodgy one, it should be provided by setuptools which Blender doesn't ship.
mkdir dist/working
cd dist/working && wget https://blenderbim.org/builds/pkg_resources.tar.gz
cd dist/working && wget https://github.com/IfcOpenShell/IfcOpenShell/raw/v0.7.0/src/blenderbim/scripts/pkg_resources.tar.gz
cd dist/working && tar -xzvf pkg_resources*
cd dist/working/ && cp -r pkg_resources ../blenderbim/libs/site/packages/
rm -rf dist/working
@@ -670,11 +449,18 @@ endif
# Required for Desktop icon and file association
cp -r blenderbim/libs/desktop dist/blenderbim/libs/
# Generate translations module for BBIM build
git clone https://github.com/IfcOpenShell/blenderbim-translations.git dist/working
$(PYTHON) scripts/bbim_translations.py -i "dist/working" -o "dist/blenderbim"
rm -rf dist/working
# Remove dependencies also bundled with Blender
rm -rf dist/blenderbim/libs/site/packages/numpy
rm -rf dist/blenderbim/libs/site/packages/numpy.libs
cd dist/blenderbim && $(SED) "s/999999/$(VERSION)/" __init__.py
cd dist/blenderbim && $(SED) "s/999999/$(VERSION)/" blender_manifest.toml
cd dist/blenderbim/bim && $(SED) "s/8888888/$(LAST_COMMIT_HASH)/" __init__.py
cd dist && zip -r blenderbim-$(VERSION)-$(PYVERSION)-$(PLATFORM).zip ./*
rm -rf dist/blenderbim
+151 -10
View File
@@ -18,29 +18,170 @@
import os
import sys
import site
import bpy
import platform
import traceback
import subprocess
import webbrowser
import addon_utils
from collections import deque
bl_info = {
"name": "BlenderBIM",
"description": "Author, import, and export data using the Industry Foundation Classes schema",
"description": "Transforms Blender into a native Building Information Model authoring platform using IFC.",
"author": "IfcOpenShell Contributors",
"blender": (2, 80, 0),
"blender": (3, 1, 0),
"version": (0, 0, 999999),
"location": "File > Export, File > Import, Scene / Object / Material / Mesh Properties",
"location": "File Menu, Scene Properties Tab. See documentation for more.",
"doc_url": "https://docs.blenderbim.org/",
"tracker_url": "https://github.com/IfcOpenShell/IfcOpenShell/issues",
"category": "Import-Export",
"category": "System",
}
last_error = None
last_actions: deque = deque(maxlen=10)
def get_debug_info():
version = ".".join(
[
str(x)
for x in [
addon.bl_info.get("version", (-1, -1, -1))
for addon in addon_utils.modules()
if addon.bl_info["name"] == "BlenderBIM"
][0]
]
)
return {
"os": platform.system(),
"os_version": platform.version(),
"python_version": platform.python_version(),
"architecture": platform.architecture(),
"machine": platform.machine(),
"processor": platform.processor(),
"blender_version": bpy.app.version_string,
"blenderbim_version": version,
"last_actions": last_actions,
"last_error": last_error,
}
def format_debug_info(info: dict):
last_actions = ""
for action in info["last_actions"]:
last_actions += f"\n# {action['type']}: {action['name']}"
if settings := action.get("settings"):
last_actions += f"\n>>> {settings}"
info["last_actions"] = last_actions
text = "\n".join(f"{k}: {v}" for k, v in info.items())
return text.strip()
if sys.modules.get("bpy", None):
# Process *.pth in /libs/site/packages to setup globally importable modules
# This is 3 levels deep as required by the static RPATH of ../../ from dependencies taken from Anaconda
# site.addsitedir(os.path.join(os.path.dirname(os.path.realpath(__file__)), "libs", "site", "packages"))
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), "libs", "site", "packages"))
import blenderbim.bim
try:
import blenderbim.bim
import ifcopenshell.api
def register():
blenderbim.bim.register()
def log_api(usecase_path, ifc_file, settings):
last_actions.append(
{
"type": "ifcopenshell.api",
"name": usecase_path,
"settings": ifcopenshell.api.serialise_settings(settings),
}
)
def unregister():
blenderbim.bim.unregister()
ifcopenshell.api.add_pre_listener("*", "action_logger", log_api)
def register():
blenderbim.bim.register()
def unregister():
blenderbim.bim.unregister()
except:
last_error = traceback.format_exc()
print(last_error)
print(format_debug_info(get_debug_info()))
print("\nFATAL ERROR: Unable to load the BlenderBIM Add-on")
class BIM_PT_fatal_error(bpy.types.Panel):
bl_label = "BlenderBIM Fatal Error"
bl_idname = "SCENE_PT_error_message"
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "scene"
def draw(self, context):
layout = self.layout
layout.label(text="BlenderBIM could not load.", icon="ERROR")
layout.label(text="View the console for full logs.", icon="CONSOLE")
box = layout.box()
info = get_debug_info()
py = ".".join(info["python_version"].split(".")[0:2])
b3d = ".".join(info["blender_version"].split(".")[0:2])
box.label(text=f"Blender {b3d} {info['os']} {info['machine']}", icon="BLENDER")
box.label(text=f"Python {py} BBIM {info['blenderbim_version']}", icon="SCRIPTPLUGINS")
layout.operator("bim.copy_debug_information", text="Copy Error Message To Clipboard")
op = layout.operator("bim.open_uri", text="How Can I Fix This?")
op.uri = "https://docs.blenderbim.org/users/troubleshooting.html#installation-issues"
class OpenUri(bpy.types.Operator):
bl_idname = "bim.open_uri"
bl_label = "Open URI"
uri: bpy.props.StringProperty()
def execute(self, context):
webbrowser.open(self.uri)
return {"FINISHED"}
class CopyDebugInformation(bpy.types.Operator):
bl_idname = "bim.copy_debug_information"
bl_label = "Copy Debug Information"
bl_description = "Copies debugging information to your clipboard for use in bugreports"
def execute(self, context):
info = format_debug_info(get_debug_info())
if platform.system() == "Windows":
command = "echo | set /p nul=" + info
elif platform.system() == "Darwin": # for MacOS
command = 'printf "' + info.replace("\n", "\\n").replace('"', "") + '" | pbcopy'
else: # Linux
command = 'printf "' + info.replace("\n", "\\n").replace('"', "") + '" | xclip -selection clipboard'
subprocess.run(command, shell=True, check=True)
return {"FINISHED"}
class HiddenPanel:
@classmethod
def false_poll(cls, context):
return False
def register():
# Only show our error panel and nothing else in the scene tab
for item_name in dir(bpy.types):
item = getattr(bpy.types, item_name)
if not hasattr(item, "bl_rna") or not isinstance(item.bl_rna, bpy.types.Panel):
continue
if getattr(item, "bl_context", None) != "scene":
continue
# Reregister scene panel with a new poll to hide it
item.poll = HiddenPanel.false_poll
bpy.utils.unregister_class(item)
bpy.utils.register_class(item)
bpy.utils.register_class(BIM_PT_fatal_error)
bpy.utils.register_class(CopyDebugInformation)
bpy.utils.register_class(OpenUri)
def unregister():
bpy.utils.unregister_class(OpenUri)
bpy.utils.unregister_class(CopyDebugInformation)
bpy.utils.unregister_class(BIM_PT_fatal_error)
+142 -37
View File
@@ -16,15 +16,26 @@
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
import os
import bpy
import bpy.utils.previews
import blenderbim
import importlib
from pathlib import Path
from . import handler, ui, prop, operator, helper
from typing import Callable, Union
try:
from blenderbim.translations import translations_dict
except ImportError:
translations_dict = {}
cwd = os.path.dirname(os.path.realpath(__file__))
modules = {
"project": None,
"search": None,
"bcf": None,
"bsdd": None,
"root": None,
"unit": None,
"model": None,
@@ -38,8 +49,9 @@ modules = {
"spatial": None,
"void": None,
"aggregate": None,
"nest": None,
"geometry": None,
"cobie": None,
"fm": None,
"resource": None,
"cost": None,
"sequence": None,
@@ -61,7 +73,6 @@ modules = {
"document": None,
"pset_template": None,
"clash": None,
"lca": None,
"csv": None,
"tester": None,
"bimtester": None,
@@ -72,6 +83,7 @@ modules = {
"augin": None,
"debug": None,
"ifcgit": None,
"covering": None,
# Uncomment this line to enable loading of the demo module. Happy hacking!
# The name "demo" must correlate to a folder name in `bim/module/`.
# "demo": None,
@@ -85,27 +97,33 @@ for name in modules.keys():
classes = [
operator.AddIfcFile,
operator.BIM_OT_add_section_plane,
operator.BIM_OT_delete_object,
operator.BIM_OT_open_webbrowser,
operator.BIM_OT_remove_section_plane,
operator.ConfigureVisibility,
operator.BIM_OT_select_object,
operator.BIM_OT_show_description,
operator.ClippingPlaneCutWithCappings,
operator.CloseError,
operator.EditBlenderCollection,
operator.FileAssociate,
operator.FileUnassociate,
operator.OpenUpstream,
operator.OpenUri,
operator.ReloadIfcFile,
operator.RemoveIfcFile,
operator.RevertClippingPlaneCut,
operator.SelectDataDir,
operator.SelectIfcFile,
operator.ReloadSelectedIfcFile,
operator.SelectSchemaDir,
operator.FileAssociate,
operator.FileUnassociate,
operator.SelectURIAttribute,
operator.EditBlenderCollection,
operator.BIM_OT_open_webbrowser,
operator.BIM_OT_show_description,
operator.SetTab,
operator.SwitchTab,
prop.StrProperty,
operator.BIM_OT_enum_property_search, # /!\ Register AFTER prop.StrProperty
prop.ObjProperty,
prop.Attribute,
prop.ModuleVisibility,
prop.BIMAreaProperties,
prop.BIMTabProperties,
prop.BIMProperties,
prop.IfcParameter,
prop.PsetQto,
@@ -114,51 +132,92 @@ classes = [
prop.BIMCollectionProperties,
prop.BIMMaterialProperties,
prop.BIMMeshProperties,
ui.BIM_PT_section_plane,
prop.BIMFacet,
prop.BIMFilterGroup,
ui.BIM_UL_clipping_plane,
ui.BIM_UL_generic,
ui.BIM_UL_topics,
ui.BIM_ADDON_preferences,
# Scene panel groups
ui.BIM_PT_project_info,
ui.BIM_PT_project_setup,
ui.BIM_PT_collaboration,
ui.BIM_PT_selection,
ui.BIM_PT_geometry,
ui.BIM_PT_services,
ui.BIM_PT_structural,
ui.BIM_PT_4D5D,
ui.BIM_PT_quality_control,
ui.BIM_PT_integrations,
# Object panel groups
ui.BIM_PT_object_metadata,
ui.BIM_PT_geometry_object,
ui.BIM_PT_services_object,
ui.BIM_PT_utilities_object,
ui.BIM_PT_misc_object,
# Tabs panel
ui.BIM_PT_tabs,
# Project overview
ui.BIM_PT_tab_project_info,
ui.BIM_PT_tab_project_setup,
ui.BIM_PT_tab_geometry,
ui.BIM_PT_tab_stakeholders,
ui.BIM_PT_tab_grouping_and_filtering,
# Object information
ui.BIM_PT_tab_object_metadata,
ui.BIM_PT_tab_misc,
# Geometry and materials
ui.BIM_PT_tab_placement,
ui.BIM_PT_tab_representations,
ui.BIM_PT_tab_geometric_relationships,
ui.BIM_PT_tab_parametric_geometry,
ui.BIM_PT_tab_profiles,
ui.BIM_PT_tab_materials,
ui.BIM_PT_tab_styles,
# Drawings and documents
ui.BIM_PT_tab_sheets,
ui.BIM_PT_tab_drawings,
ui.BIM_PT_tab_schedules,
ui.BIM_PT_tab_references,
# Services and systems
ui.BIM_PT_tab_services,
ui.BIM_PT_tab_zones,
# Structural analysis
ui.BIM_PT_tab_structural,
# Construction scheduling
ui.BIM_PT_tab_status,
ui.BIM_PT_tab_resources,
ui.BIM_PT_tab_cost,
ui.BIM_PT_tab_sequence,
# Facility management
ui.BIM_PT_tab_handover,
ui.BIM_PT_tab_operations,
# Quality and coordination
ui.BIM_PT_tab_quality_control,
ui.BIM_PT_tab_clash_detection,
ui.BIM_PT_tab_collaboration,
ui.BIM_PT_tab_sandbox,
# TODO: move this somewhere else and clean it up
ui.BIM_PT_section_plane,
ui.BIM_PT_section_with_cappings,
]
for mod in modules.values():
classes.extend(mod.classes)
addon_keymaps = []
icons = None
is_registering = False
last_commit_hash = "8888888"
original_scene_panels_polls: dict[bpy.types.Panel, Union[Callable, None]] = dict()
def on_register(scene):
handler.setDefaultProperties(scene)
global is_registering
if is_registering:
return
is_registering = True
handler.load_post(scene)
if not bpy.app.background:
bpy.app.handlers.depsgraph_update_post.remove(on_register)
is_registering = False
def register():
for cls in classes:
bpy.utils.register_class(cls)
bpy.app.handlers.depsgraph_update_post.append(on_register)
bpy.app.handlers.undo_pre.append(handler.undo_pre)
bpy.app.handlers.undo_post.append(handler.undo_post)
bpy.app.handlers.redo_pre.append(handler.redo_pre)
bpy.app.handlers.redo_post.append(handler.redo_post)
bpy.app.handlers.load_post.append(handler.setDefaultProperties)
bpy.app.handlers.load_post.append(handler.load_post)
bpy.app.handlers.load_post.append(handler.loadIfcStore)
bpy.app.handlers.save_post.append(handler.ensureIfcExported)
bpy.types.Scene.BIMProperties = bpy.props.PointerProperty(type=prop.BIMProperties)
bpy.types.Screen.BIMAreaProperties = bpy.props.CollectionProperty(type=prop.BIMAreaProperties)
bpy.types.Screen.BIMTabProperties = bpy.props.PointerProperty(type=prop.BIMTabProperties)
bpy.types.Collection.BIMCollectionProperties = bpy.props.PointerProperty(type=prop.BIMCollectionProperties)
bpy.types.Object.BIMObjectProperties = bpy.props.PointerProperty(type=prop.BIMObjectProperties)
bpy.types.Material.BIMObjectProperties = bpy.props.PointerProperty(type=prop.BIMObjectProperties)
@@ -167,7 +226,6 @@ def register():
bpy.types.Curve.BIMMeshProperties = bpy.props.PointerProperty(type=prop.BIMMeshProperties)
bpy.types.Camera.BIMMeshProperties = bpy.props.PointerProperty(type=prop.BIMMeshProperties)
bpy.types.PointLight.BIMMeshProperties = bpy.props.PointerProperty(type=prop.BIMMeshProperties)
bpy.types.SCENE_PT_unit.append(ui.ifc_units)
if hasattr(bpy.types, "UI_MT_button_context_menu"):
bpy.types.UI_MT_button_context_menu.append(ui.draw_custom_context_menu)
bpy.types.STATUSBAR_HT_header.append(ui.draw_statusbar)
@@ -175,17 +233,50 @@ def register():
for mod in modules.values():
mod.register()
wm = bpy.context.window_manager
if wm.keyconfigs.addon:
km = wm.keyconfigs.addon.keymaps.new(name="Window", space_type="EMPTY")
kmi = km.keymap_items.new("bim.switch_tab", "TAB", "PRESS", ctrl=True)
addon_keymaps.append((km, kmi))
global icons
icons_dir = os.path.join(cwd, "data", "icons")
icon_preview = bpy.utils.previews.new()
for filename in os.listdir(icons_dir):
if filename.endswith(".png"):
icon_name = os.path.splitext(filename)[0]
icon_path = os.path.join(icons_dir, filename)
icon_preview.load(icon_name, icon_path, "IMAGE")
icons = icon_preview
global last_commit_hash
try:
import git
path = Path(__file__).resolve().parent
repo = git.Repo(str(path), search_parent_directories=True)
last_commit_hash = repo.head.object.hexsha
except:
pass
bpy.app.translations.register("blenderbim", translations_dict)
def unregister():
global icons
bpy.utils.previews.remove(icons)
for cls in reversed(classes):
if getattr(cls, "is_registered", None) is None:
bpy.utils.unregister_class(cls)
elif cls.is_registered:
bpy.utils.unregister_class(cls)
bpy.app.handlers.load_post.remove(handler.setDefaultProperties)
bpy.app.handlers.load_post.remove(handler.load_post)
bpy.app.handlers.load_post.remove(handler.loadIfcStore)
bpy.app.handlers.save_post.remove(handler.ensureIfcExported)
del bpy.types.Scene.BIMProperties
del bpy.types.Collection.BIMCollectionProperties
del bpy.types.Object.BIMObjectProperties
@@ -195,10 +286,24 @@ def unregister():
del bpy.types.Curve.BIMMeshProperties
del bpy.types.Camera.BIMMeshProperties
del bpy.types.PointLight.BIMMeshProperties
bpy.types.SCENE_PT_unit.remove(ui.ifc_units)
if hasattr(bpy.types, "UI_MT_button_context_menu"):
bpy.types.UI_MT_button_context_menu.remove(ui.draw_custom_context_menu)
bpy.types.STATUSBAR_HT_header.remove(ui.draw_statusbar)
for mod in reversed(list(modules.values())):
mod.unregister()
wm = bpy.context.window_manager
kc = wm.keyconfigs.addon
if kc:
for km, kmi in addon_keymaps:
km.keymap_items.remove(kmi)
addon_keymaps.clear()
import blenderbim.tool as tool
# use tuple() as method will be removing keys from dict
for panel in tuple(original_scene_panels_polls.keys()):
tool.Blender.remove_scene_panel_override(panel)
bpy.app.translations.unregister("blenderbim")
@@ -10,7 +10,7 @@
* (at your option) any later version.
*
* BlenderBIM Add-on is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* but WITHOUT ANY WARRANTY, without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
@@ -27,6 +27,12 @@ text, tspan { /* 2.5mm */ fill: black; stroke: none; font-family: 'OpenGost Type
.IfcAnnotation { fill: none; stroke: black; stroke-linecap: 'round'; stroke-width: 0.25; }
.IfcGeographicElement { fill: none; stroke: black; stroke-linecap: 'round'; stroke-width: 1; }
.PredefinedType-LINEWORK { stroke: black; stroke-width: 0.25; }
.PredefinedType-LINEWORK.dashed { stroke-dasharray: 3, 2; }
.PredefinedType-LINEWORK.fine { stroke-width: 0.18; stroke: #777777; }
.PredefinedType-LINEWORK.thin { stroke-width: 0.25; }
.PredefinedType-LINEWORK.medium { stroke-width: 0.35; }
.PredefinedType-LINEWORK.thick { stroke-width: 0.5; }
.PredefinedType-LINEWORK.strong { stroke-width: 1; }
.PredefinedType-BACKGROUND { stroke: black; stroke-width: 0.18; }
.PredefinedType-GRID { marker-start: url(#grid-marker); marker-end: url(#grid-marker); }
.PredefinedType-SECTION { stroke-dasharray: 12.5, 3, 3, 3; }
@@ -40,7 +46,6 @@ text, tspan { /* 2.5mm */ fill: black; stroke: none; font-family: 'OpenGost Type
.PredefinedType-SLOPEPERCENT { marker-end: url(#radius-marker-end); }
.PredefinedType-SLOPEFRACTION { marker-end: url(#radius-marker-end); }
.PredefinedType-DIAMETER { marker-start: url(#diameter-marker-start); marker-end: url(#diameter-marker-end); }
.PredefinedType-HIDDENLINE { stroke-dasharray: 3, 2; }
.PredefinedType-STAIRARROW { marker-start: url(#stair-marker-start); marker-end: url(#stair-marker-end); }
.PredefinedType-BOUNDARY { fill: none; stroke: red; stroke-width: 1; stroke-dasharray: 12, 4, 3, 4, 3, 4; }
.PredefinedType-SEALANT { fill: url(#crosshatch1); stroke-width: 0.25; }
@@ -75,7 +75,7 @@
<marker id="stair-marker-end" markerHeight="42" markerWidth="21" orient="auto" refX="21" refY="21">
<path d="M 0 0 L 21 21 L 0 42" class="annotation stair" style="stroke-width:2; marker-start: none; marker-end: none;" />
</marker>
<marker id="plan-level-marker" markerHeight="30" markerWidth="30" refX="15" refY="15">
<marker id="plan-level-marker" markerHeight="30" markerWidth="30" refX="15" refY="15" orient="auto">
<g>
<path d="M 15 0 L 15 30" class="annotation" style="stroke-width:1;" />
<path d="M 0 15 L 30 15" class="annotation" style="stroke-width:1;" />
@@ -84,7 +84,7 @@
<path d="M 15 15 L 22.5 15 A 7.5 7.5 0 0 1 15 22.5 Z" fill="black"/>
</g>
</marker>
<marker id="section-level-marker" markerHeight="11" markerWidth="90" refX="20" refY="10">
<marker id="section-level-marker" markerHeight="11" markerWidth="90" refX="20" refY="10" orient="auto-start-reverse">
<g>
<path d="M 0 1 L 20 1 L 10 11 Z" fill="black" />
<path d="M 0 1 L 90 1" class="annotation" style="stroke-width:1;" />

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

@@ -10,7 +10,7 @@
* (at your option) any later version.
*
* BlenderBIM Add-on is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* but WITHOUT ANY WARRANTY, without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
@@ -389,7 +389,7 @@
"scene.display.shading.studiolight_background_blur": 0.0,
"scene.display.shading.studiolight_intensity": 0.0,
"scene.display.shading.studiolight_rotate_z": 0.0,
"scene.display.shading.type": "SOLID",
"scene.display.shading.type": "RENDERED",
"scene.display.shading.use_compositor": "DISABLED",
"scene.display.shading.use_dof": false,
"scene.display.shading.use_scene_lights": false,
@@ -640,7 +640,7 @@
"scene.display.shading.studiolight_background_blur": 0.0,
"scene.display.shading.studiolight_intensity": 0.0,
"scene.display.shading.studiolight_rotate_z": 0.0,
"scene.display.shading.type": "SOLID",
"scene.display.shading.type": "RENDERED",
"scene.display.shading.use_compositor": "DISABLED",
"scene.display.shading.use_dof": false,
"scene.display.shading.use_scene_lights": false,
@@ -752,4 +752,4 @@
"space.overlay.xray_alpha_bone": 0.0
}
}
}
}
@@ -21,6 +21,9 @@
<line x1="-5" x2="5" style="stroke: black; stroke-width: 0.25;" />
<text y="2.5" class="regular" text-anchor="middle" dominant-baseline="middle" data-type="text-template"></text>
</g>
<g id="window-tag">
<path style="fill: white; stroke: black; stroke-width: 0.25;" d="m 0.0161133,-6.0583333 5.2339915,3.8366023 -2.031433,6.1633977 c 0,0 -6.4894866,-0.027414 -6.4894866,-0.027414 l -1.97929,-6.1803395 5.2662181,-3.7922467" />
</g>
<g id="space-tag">
<text y="-5" class="large" text-anchor="middle" dominant-baseline="middle" data-type="text-template"></text>
<rect x="-6" y="-2.5" width="12" height="5" fill="white" stroke="black" style="stroke-width: 0.25;" />
@@ -41,4 +44,29 @@
<circle r="5" fill="white" stroke="black" style="stroke-width: 0.25;" />
<line x1="-5" y1="0" x2="5" y2="0" style="stroke: black; stroke-width: 0.25;" />
</g>
<g id="dot">
<circle r="1" fill="black" stroke="black" style="stroke-width: 0.25;" />
</g>
<g id="setout-tag">
<circle fill="white" stroke="black" r="2.5" style="stroke-width: 0.5"/>
<path d="M 0 0 L -2.5 0 A 2.5 2.5 0 0 1 0 -2.5 Z" fill="black"/>
<path d="M 0 0 L 2.5 0 A 2.5 2.5 0 0 1 0 2.5 Z" fill="black"/>
<text x="3" y="-8" class="regular" text-anchor="start" dominant-baseline="auto" data-type="text-template"></text>
<text x="3" y="-4" class="regular" text-anchor="start" dominant-baseline="auto" data-type="text-template"></text>
</g>
<g id="setout-point">
<circle fill="white" stroke="black" r="2.5" style="stroke-width: 0.5"/>
<path d="M 0 0 L -2.5 0 A 2.5 2.5 0 0 1 0 -2.5 Z" fill="black"/>
<path d="M 0 0 L 2.5 0 A 2.5 2.5 0 0 1 0 2.5 Z" fill="black"/>
</g>
<g id="control-point">
<path style="fill: white; stroke: black; stroke-width: 0.5;" d="M 2.286165,1.4798666 H -1.0000316e-7 -2.2861651 L -1.1430826,-0.5000101 -1.0000316e-7,-2.479888 1.1430827,-0.5000101 Z" />
<circle r="0.5" fill="black" stroke="black" style="stroke-width: 0.25;" />
</g>
<g id="traverse-point">
<path style="fill: white; stroke: black; stroke-width: 0.5;" d="M -2,-2 2,2 M -2,2 2,-2" />
</g>
<g id="spot-elevation">
<path style="fill: white; stroke: black; stroke-width: 0.5;" d="M 0,-2 0,2 M -2,0 2,0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

@@ -51,5 +51,5 @@ var json_data = `{{{json_data}}}`;
<script>
var data = `{{{data}}}`;
setupPage(data);
create_gantt_chart(json_data)
</script>
create_gantt_chart(atob(json_data))
</script>
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -5,27 +5,28 @@ FILE_NAME('EPset_Drawing.ifc','2020-01-01T00:00:00',(),(),'EPset_Drawing','EPset
FILE_SCHEMA(('IFC4'));
ENDSEC;
DATA;
#1=IFCPROPERTYSETTEMPLATE('2JhNIvqZrFnAgxfhK0XVQX',$,'EPset_Drawing','',.PSET_OCCURRENCEDRIVEN.,'IfcAnnotation',(#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12,#13,#14,#15,#16,#17,#18,#19,#20,#21));
#1=IFCPROPERTYSETTEMPLATE('2JhNIvqZrFnAgxfhK0XVQX',$,'EPset_Drawing','',.PSET_OCCURRENCEDRIVEN.,'IfcAnnotation/DRAWING',(#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12,#13,#14,#15,#16,#17,#18,#19,#20,#21,#22,#23));
#2=IFCSIMPLEPROPERTYTEMPLATE('23JavTMk98ZxXhrUEnjAcf',$,'TargetView','',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
#3=IFCSIMPLEPROPERTYTEMPLATE('1yVWUt5H9DAOuu0OaMMLpe',$,'Scale','The scale of this drawing represented as a numerator and denominator, such as 1/100',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
#4=IFCSIMPLEPROPERTYTEMPLATE('3gsuPBtU93b8f0gg1pjkq6',$,'HumanScale','The scale of this drawing in human readable format, such as 1:100',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
#4=IFCSIMPLEPROPERTYTEMPLATE('2T$a4OFsv2LeD5JeBKEV4f',$,'IsNTS','Whether or not the scale is intended to be significant',.P_SINGLEVALUE.,'IfcBoolean',$,$,$,$,$,.READWRITE.);
#5=IFCSIMPLEPROPERTYTEMPLATE('0AK5C2UpL4$eaac2LszAx$',$,'HasUnderlay','',.P_SINGLEVALUE.,'IfcBoolean',$,$,$,$,$,.READWRITE.);
#6=IFCSIMPLEPROPERTYTEMPLATE('2j2ZEZR8X5tONm7kli5hM6',$,'HasLinework','',.P_SINGLEVALUE.,'IfcBoolean',$,$,$,$,$,.READWRITE.);
#7=IFCSIMPLEPROPERTYTEMPLATE('1ttChRysH9UuEX2FeMj5Hu',$,'HasAnnotation','',.P_SINGLEVALUE.,'IfcBoolean',$,$,$,$,$,.READWRITE.);
#8=IFCSIMPLEPROPERTYTEMPLATE('2NPPxuABv1huDTVh32TFgw',$,'GlobalReferencing','',.P_SINGLEVALUE.,'IfcBoolean',$,$,$,$,$,.READWRITE.);
#9=IFCSIMPLEPROPERTYTEMPLATE('10hT_1zrzEbRRKMXYAWvtD',$,'Metadata','',.P_SINGLEVALUE.,'IfcText',$,$,$,$,$,.READWRITE.);
#10=IFCSIMPLEPROPERTYTEMPLATE('3Z0BXPSG5CWgtI33ioV7aj',$,'Include','Selector expression to include ifc elements in the drawing',.P_SINGLEVALUE.,'IfcText',$,$,$,$,$,.READWRITE.);
#11=IFCSIMPLEPROPERTYTEMPLATE('1RVts_g3PAw98PJA2yL3bO',$,'Exclude','Selector expression to exclude ifc elements in the drawing',.P_SINGLEVALUE.,'IfcText',$,$,$,$,$,.READWRITE.);
#12=IFCSIMPLEPROPERTYTEMPLATE('0c1$8NpYDEaBiJrj16jHIo',$,'Stylesheet','',.P_SINGLEVALUE.,'IfcText',$,$,$,$,$,.READWRITE.);
#13=IFCSIMPLEPROPERTYTEMPLATE('3mRF52q81FQB$h4oTh7M45',$,'Markers','',.P_SINGLEVALUE.,'IfcText',$,$,$,$,$,.READWRITE.);
#14=IFCSIMPLEPROPERTYTEMPLATE('1rhr_0N3LDtuORcEJP0KXM',$,'Symbols','',.P_SINGLEVALUE.,'IfcText',$,$,$,$,$,.READWRITE.);
#15=IFCSIMPLEPROPERTYTEMPLATE('2sHDBuW7P4TROy$hL2w7ct',$,'Patterns','',.P_SINGLEVALUE.,'IfcText',$,$,$,$,$,.READWRITE.);
#16=IFCSIMPLEPROPERTYTEMPLATE('1$xfo9EVb26QLqmPll2_RK',$,'MetricPrecision','',.P_SINGLEVALUE.,'IfcReal',$,$,$,$,$,.READWRITE.);
#17=IFCSIMPLEPROPERTYTEMPLATE('38uAtrp9nD_901NO42zd$7',$,'ImperialPrecision','',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
#18=IFCSIMPLEPROPERTYTEMPLATE('1MX0uffTL6TOvtvEJpxFmk',$,'DecimalPlaces','',.P_SINGLEVALUE.,'IfcInteger',$,$,$,$,$,.READWRITE.);
#19=IFCSIMPLEPROPERTYTEMPLATE('0joEq0Rd10cxweEh0NeHT6',$,'JoinCriteria','Comma separated selection keys which determine what cut objects are to be joined.',.P_SINGLEVALUE.,'IfcText',$,$,$,$,$,.READWRITE.);
#20=IFCSIMPLEPROPERTYTEMPLATE('0nYMT3OSj5gArVniCWZRtv',$,'ShadingStyles','',.P_SINGLEVALUE.,'IfcText',$,$,$,$,$,.READWRITE.);
#21=IFCSIMPLEPROPERTYTEMPLATE('3VWG22eZXBdQwdKlzMeVQH',$,'CurrentShadingStyle','',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
#5=IFCSIMPLEPROPERTYTEMPLATE('2T$a4OFsv2LeD5JeBKEV4f',$,'IsNTS','Whether or not the scale is intended to be significant',.P_SINGLEVALUE.,'IfcBoolean',$,$,$,$,$,.READWRITE.);
#6=IFCSIMPLEPROPERTYTEMPLATE('0AK5C2UpL4$eaac2LszAx$',$,'HasUnderlay','',.P_SINGLEVALUE.,'IfcBoolean',$,$,$,$,$,.READWRITE.);
#7=IFCSIMPLEPROPERTYTEMPLATE('2j2ZEZR8X5tONm7kli5hM6',$,'HasLinework','',.P_SINGLEVALUE.,'IfcBoolean',$,$,$,$,$,.READWRITE.);
#8=IFCSIMPLEPROPERTYTEMPLATE('1ttChRysH9UuEX2FeMj5Hu',$,'HasAnnotation','',.P_SINGLEVALUE.,'IfcBoolean',$,$,$,$,$,.READWRITE.);
#9=IFCSIMPLEPROPERTYTEMPLATE('2NPPxuABv1huDTVh32TFgw',$,'GlobalReferencing','',.P_SINGLEVALUE.,'IfcBoolean',$,$,$,$,$,.READWRITE.);
#10=IFCSIMPLEPROPERTYTEMPLATE('10hT_1zrzEbRRKMXYAWvtD',$,'Metadata','',.P_SINGLEVALUE.,'IfcText',$,$,$,$,$,.READWRITE.);
#11=IFCSIMPLEPROPERTYTEMPLATE('3Z0BXPSG5CWgtI33ioV7aj',$,'Include','Selector expression to include ifc elements in the drawing',.P_SINGLEVALUE.,'IfcText',$,$,$,$,$,.READWRITE.);
#12=IFCSIMPLEPROPERTYTEMPLATE('1RVts_g3PAw98PJA2yL3bO',$,'Exclude','Selector expression to exclude ifc elements in the drawing',.P_SINGLEVALUE.,'IfcText',$,$,$,$,$,.READWRITE.);
#13=IFCSIMPLEPROPERTYTEMPLATE('0c1$8NpYDEaBiJrj16jHIo',$,'Stylesheet','',.P_SINGLEVALUE.,'IfcText',$,$,$,$,$,.READWRITE.);
#14=IFCSIMPLEPROPERTYTEMPLATE('3mRF52q81FQB$h4oTh7M45',$,'Markers','',.P_SINGLEVALUE.,'IfcText',$,$,$,$,$,.READWRITE.);
#15=IFCSIMPLEPROPERTYTEMPLATE('1rhr_0N3LDtuORcEJP0KXM',$,'Symbols','',.P_SINGLEVALUE.,'IfcText',$,$,$,$,$,.READWRITE.);
#16=IFCSIMPLEPROPERTYTEMPLATE('2sHDBuW7P4TROy$hL2w7ct',$,'Patterns','',.P_SINGLEVALUE.,'IfcText',$,$,$,$,$,.READWRITE.);
#17=IFCSIMPLEPROPERTYTEMPLATE('1$xfo9EVb26QLqmPll2_RK',$,'MetricPrecision','',.P_SINGLEVALUE.,'IfcReal',$,$,$,$,$,.READWRITE.);
#18=IFCSIMPLEPROPERTYTEMPLATE('38uAtrp9nD_901NO42zd$7',$,'ImperialPrecision','',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
#19=IFCSIMPLEPROPERTYTEMPLATE('1MX0uffTL6TOvtvEJpxFmk',$,'DecimalPlaces','',.P_SINGLEVALUE.,'IfcInteger',$,$,$,$,$,.READWRITE.);
#20=IFCSIMPLEPROPERTYTEMPLATE('0joEq0Rd10cxweEh0NeHT6',$,'JoinCriteria','Comma separated selection keys which determine what cut objects are to be joined.',.P_SINGLEVALUE.,'IfcText',$,$,$,$,$,.READWRITE.);
#21=IFCSIMPLEPROPERTYTEMPLATE('0nYMT3OSj5gArVniCWZRtv',$,'ShadingStyles','',.P_SINGLEVALUE.,'IfcText',$,$,$,$,$,.READWRITE.);
#22=IFCSIMPLEPROPERTYTEMPLATE('3VWG22eZXBdQwdKlzMeVQH',$,'CurrentShadingStyle','',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
#23=IFCSIMPLEPROPERTYTEMPLATE('28mJ$GDxb7kBbKFH_rACMQ',$,'AngleDecimalPlaces','',.P_SINGLEVALUE.,'IfcInteger',$,$,$,$,$,.READWRITE.);
ENDSEC;
END-ISO-10303-21;
@@ -0,0 +1,13 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION((),'2;1');
FILE_NAME('EPset_Status.ifc','2020-01-01T00:00:00',(),(),'EPset_Status','EPset_Status',$);
FILE_SCHEMA(('IFC4'));
ENDSEC;
DATA;
#1=IFCPROPERTYSETTEMPLATE('3JoyTt$cz4fhYuQvJeTMhs',$,'EPset_Status','',.PSET_TYPEDRIVENOVERRIDE.,'IfcProduct',(#2,#4));
#2= IFCSIMPLEPROPERTYTEMPLATE('2HBOdOfz5E3hZ7IBLCq$$D',$,'Status','Status of the element, predominately used in renovation or retrofitting projects. The status can be assigned to as "New" - element designed as new addition, "Existing" - element exists and remains, "Demolish" - element existed but is to be demolished, "Temporary" - element will exists only temporary (like a temporary support structure).',.P_ENUMERATEDVALUE.,'IfcLabel',$,#3,$,$,$,.READWRITE.);
#3= IFCPROPERTYENUMERATION('EPEnum_ElementStatus',(IFCLABEL('NEW'),IFCLABEL('EXISTING'),IFCLABEL('DEMOLISH'),IFCLABEL('TEMPORARY'),IFCLABEL('OTHER'),IFCLABEL('NOTKNOWN'),IFCLABEL('UNSET')),$);
#4=IFCSIMPLEPROPERTYTEMPLATE('3ttXxqmlz62BlxjzEPpqvH',$,'UserDefinedStatus','',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
ENDSEC;
END-ISO-10303-21;
@@ -0,0 +1,16 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION((),'2;1');
FILE_NAME('EQto_BodyGeometryValidation.ifc','2020-01-01T00:00:00',(),(),'EQto_BodyGeometryValidation','EQto_BodyGeometryValidation',$);
FILE_SCHEMA(('IFC4'));
ENDSEC;
DATA;
#1=IFCPROPERTYSETTEMPLATE('2KS9su6r517uLXTGKwwDdn',$,'EQto_BodyGeometryValidation','Quantities supplied for validating the correct interpretation of the body shape representation at import. In case of multiple representation items, the quantities are summed for each of the items (irrespective of any overlap). Choosing a suitable tolerance value for comparing the supplied numbers to the numbers calculated from the reconstructed geometry is at the discretion of the importing application.',.QTO_OCCURRENCEDRIVEN.,'IfcProduct',(#2,#3,#4,#5,#6,#7));
#2=IFCSIMPLEPROPERTYTEMPLATE('3iCdOOLRjCwQ_HRTB41Xh8',$,'GrossSurfaceArea','Total gross area of the object, normally generated as perimeter * length + 2 * cross section area. It is the sum of OuterSurfaceArea + (2 x CrossSectionArea) and shall only be given, if the OuterSurfaceArea and CrossSectionArea cannot be established separately.\X2\000A000A\X0\Total gross surface area of the element before applying product-level geometric features such as openings and projections.',.Q_AREA.,$,$,$,$,$,$,.READWRITE.);
#3=IFCSIMPLEPROPERTYTEMPLATE('0juemEqF5889vg7HwR87Fv',$,'NetSurfaceArea','Net surface area of the object, normally generated as perimeter * length + 2 * cross section area taking into account possible processing features (cut-out''s, etc.) or openings and recesses.\X2\000A000A\X0\Total net surface area of the element after applying product-level geometric features such as openings and projections.',.Q_AREA.,$,$,$,$,$,$,.READWRITE.);
#4=IFCSIMPLEPROPERTYTEMPLATE('1LUuLSnMXFDgGLBCvte8aH',$,'GrossVolume','Total gross volume of the object. Openings, recesses, enclosed objects and projections are not taken into account.\X2\000A000A\X0\Total gross volume of the element before applying product-level geometric features such as openings and projections.',.Q_VOLUME.,$,$,$,$,$,$,.READWRITE.);
#5=IFCSIMPLEPROPERTYTEMPLATE('0ny7TXUFz8wvnoQ2eU8czF',$,'NetVolume','Total net volume of the object, taking into account possible processing features (cut-out''s, etc.) or openings and recesses.\X2\000A000A\X0\Total net volume of the element before applying product-level geometric features such as openings and projections.',.Q_VOLUME.,$,$,$,$,$,$,.READWRITE.);
#6=IFCSIMPLEPROPERTYTEMPLATE('31g8_gdUv8KRkOWzW48KoP',$,'SurfaceGenusBeforeFeatures','The Surface Genus of the evaluated representation items before applying product-level geometric features such as openings and projections.Surface Genus is a topological measure that represents the number of "holes" or "handles" on a surface. For example, a sphere has genus 0, and a torus has genus 1.Computed using the Euler characteristic:$$\\chi=V-E+F$$With the numbers of vertices (V), edges (E) and faces (F)$$\\chi=2\X2\2212\X0\2g\X2\2212\X0\b$$With surface genus (g) and the number of boundaries (b) the latter zero in case of an enclosed volume.',.Q_COUNT.,$,$,$,$,$,$,.READWRITE.);
#7=IFCSIMPLEPROPERTYTEMPLATE('3kBBtGUebC09mUggGTKpjj',$,'SurfaceGenusAfterFeatures','The Surface Genus of the evaluated representation items after applying product-level geometric features such as openings and projections.Surface Genus is a topological measure that represents the number of "holes" or "handles" on a surface. For example, a sphere has genus 0, and a torus has genus 1.Computed using the Euler characteristic:$$\\chi=V-E+F$$With the numbers of vertices (V), edges (E) and faces (F)$$\\chi=2\X2\2212\X0\2g\X2\2212\X0\b$$With surface genus (g) and the number of boundaries (b) the latter zero in case of an enclosed volume.',.Q_COUNT.,$,$,$,$,$,$,.READWRITE.);
ENDSEC;
END-ISO-10303-21;
@@ -5,20 +5,20 @@ FILE_NAME('Psets_BBIM_Annotation.ifc','2020-01-01T00:00:00',(),(),'Psets_BBIM_An
FILE_SCHEMA(('IFC4'));
ENDSEC;
DATA;
#1=IFCPROPERTYSETTEMPLATE('3VuPUwdCD2Qx3XDDRs0R1N',$,'EPset_Annotation','',.PSET_OCCURRENCEDRIVEN.,'IfcAnnotation,IfcTypeProduct',(#2,#3,#4));
#1=IFCPROPERTYSETTEMPLATE('3VuPUwdCD2Qx3XDDRs0R1N',$,'EPset_Annotation','',.PSET_TYPEDRIVENOVERRIDE.,'IfcAnnotation,IfcTypeProduct',(#2,#3,#4));
#2=IFCSIMPLEPROPERTYTEMPLATE('2P7JN79n96Q9pElZ83LKe4',$,'ZIndex','',.P_SINGLEVALUE.,'IfcInteger',$,$,$,$,$,.READWRITE.);
#3=IFCSIMPLEPROPERTYTEMPLATE('1Wpx_r2xj1_9w5JpI0QRJy',$,'Symbol','',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
#4=IFCSIMPLEPROPERTYTEMPLATE('3q0oxMUKP47vZ4jnyG$dDb',$,'Classes','Classes separarated by spaces that end up in classes for this element in svg. Can be used to specify the text font size: small - 1.8mm; regular - 2.5mm; large - 3.5mm; header - 5mm; title - 7mm. By default regular size is used.',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
#5=IFCPROPERTYSETTEMPLATE('0iKwujnQL9IevVQato8f7Z',$,'BBIM_Batting','',.PSET_OCCURRENCEDRIVEN.,'IfcAnnotation,IfcTypeProduct',(#6,#7));
#5=IFCPROPERTYSETTEMPLATE('0iKwujnQL9IevVQato8f7Z',$,'BBIM_Batting','',.PSET_TYPEDRIVENOVERRIDE.,'IfcAnnotation/BATTING,IfcTypeProduct',(#6,#7));
#6=IFCSIMPLEPROPERTYTEMPLATE('0t2LEesGT1QRQtrIZUAR8L',$,'Thickness','Batting thickness',.P_SINGLEVALUE.,'IfcPositiveLengthMeasure',$,$,$,$,$,.READWRITE.);
#7=IFCSIMPLEPROPERTYTEMPLATE('082PndS6v2kBOiJoSboMnh',$,'Reverse pattern direction','Reverse batting pattern (swap starting and ending points)',.P_SINGLEVALUE.,'IfcBoolean',$,$,$,$,$,.READWRITE.);
#8=IFCPROPERTYSETTEMPLATE('1Dx2EiZnP67xotInXpwz90',$,'BBIM_Section','',.PSET_OCCURRENCEDRIVEN.,'IfcAnnotation,IfcTypeProduct',(#9,#10,#11,#12,#13));
#8=IFCPROPERTYSETTEMPLATE('1Dx2EiZnP67xotInXpwz90',$,'BBIM_Section','',.PSET_TYPEDRIVENOVERRIDE.,'IfcAnnotation/SECTION,IfcTypeProduct',(#9,#10,#11,#12,#13));
#9=IFCSIMPLEPROPERTYTEMPLATE('2a_9s8spHDc9dZHtgg71XL',$,'ShowStartArrow','Display start arrow.',.P_SINGLEVALUE.,'IfcBoolean',$,$,$,$,$,.READWRITE.);
#10=IFCSIMPLEPROPERTYTEMPLATE('3i6SH_GbT7zhKea$wVE56A',$,'StartArrowSymbol','Custom symbol for the start of the section marker arrow. Need to make sure it''s present in "symbols.svg".',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
#11=IFCSIMPLEPROPERTYTEMPLATE('1DtsPn5a9FG8$zXHDDMavY',$,'ShowEndArrow','Display end arrow.',.P_SINGLEVALUE.,'IfcBoolean',$,$,$,$,$,.READWRITE.);
#12=IFCSIMPLEPROPERTYTEMPLATE('2$6U0mLI9AiPRWeBabdY3u',$,'EndArrowSymbol','Custom symbol for the end of the section marker arrow. Need to make sure it''s present in "symbols.svg".',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
#13=IFCSIMPLEPROPERTYTEMPLATE('1naFqntIL7igCY7hCaE7kq',$,'HasConnectedSectionLine','Connect or disconnect section markers with line (by default = True).',.P_SINGLEVALUE.,'IfcBoolean',$,$,$,$,$,.READWRITE.);
#14=IFCPROPERTYSETTEMPLATE('3V8oZ8YRD3_O7uR5vcUleS',$,'BBIM_Documentation','',.PSET_OCCURRENCEDRIVEN.,'IfcProject',(#15,#16,#17,#18,#19,#20,#21,#22,#23));
#14=IFCPROPERTYSETTEMPLATE('3V8oZ8YRD3_O7uR5vcUleS',$,'BBIM_Documentation','',.PSET_TYPEDRIVENOVERRIDE.,'IfcProject',(#15,#16,#17,#18,#19,#20,#21,#22,#23));
#15=IFCSIMPLEPROPERTYTEMPLATE('0ulAhgk3v9qfGlDILauR6J',$,'SheetsDir','Default sheets directory',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
#16=IFCSIMPLEPROPERTYTEMPLATE('2yvlVKiQXASucfH40deCvu',$,'LayoutsDir','Default layouts directory',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
#17=IFCSIMPLEPROPERTYTEMPLATE('2kXZqXicL3jRwsOnLM_0ho',$,'TitleblocksDir','Default titleblocks directory',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
@@ -28,7 +28,7 @@ DATA;
#21=IFCSIMPLEPROPERTYTEMPLATE('1UDakJ5_f7kBhggNSW4$h5',$,'SymbolsPath','Default symbols SVG',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
#22=IFCSIMPLEPROPERTYTEMPLATE('0d53LEtgLDQxnv__NfgH7i',$,'PatternsPath','Default patterns SVG',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
#23=IFCSIMPLEPROPERTYTEMPLATE('26qFNMv7nCHgU6Jd7Anga5',$,'ShadingStylesPath','Default shading styles',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
#24=IFCPROPERTYSETTEMPLATE('0I9merLinF5Ap$aZwaclgm',$,'BBIM_Dimension','',.PSET_OCCURRENCEDRIVEN.,'IfcAnnotation,IfcTypeProduct',(#25,#26,#27,#28));
#24=IFCPROPERTYSETTEMPLATE('0I9merLinF5Ap$aZwaclgm',$,'BBIM_Dimension','',.PSET_TYPEDRIVENOVERRIDE.,'IfcAnnotation/DIMENSION,IfcTypeProduct',(#25,#26,#27,#28));
#25=IFCSIMPLEPROPERTYTEMPLATE('1rL2AbQsXD8RbpoWH5pYOV',$,'ShowDescriptionOnly','Hide the measurement values and show only annotation description',.P_SINGLEVALUE.,'IfcBoolean',$,$,$,$,$,.READWRITE.);
#26=IFCSIMPLEPROPERTYTEMPLATE('0SVyOfB0rC2xNfdRYf3XvY',$,'SuppressZeroInches','Suppress 0 inch values in dimension annotation text (for example: 12'' - 0" -> 12'')',.P_SINGLEVALUE.,'IfcBoolean',$,$,$,$,$,.READWRITE.);
#27=IFCSIMPLEPROPERTYTEMPLATE('2bUmj458PBqPAtUoI3MXsb',$,'TextPrefix','Text to add before annotation measurement value',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
@@ -0,0 +1,23 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
FILE_NAME('','2023-09-28T23:00:50',(),(),'IfcOpenShell v0.7.0-fbd8ea1ed','IfcOpenShell v0.7.0-fbd8ea1ed','');
FILE_SCHEMA(('IFC4'));
ENDSEC;
DATA;
#1=IFCPROPERTYSETTEMPLATE('1TLQmgUKf0I8Zi07bm9Jqn',$,'ePSet_ProjectedCRS','',.PSET_OCCURRENCEDRIVEN.,'IfcProject',(#2,#3,#4,#5,#6,#7));
#2=IFCSIMPLEPROPERTYTEMPLATE('2cH53PtVT3v88uf_uGFblG',$,'Name','',.P_SINGLEVALUE.,'IfcLabel',$,$,$,$,$,.READWRITE.);
#3=IFCSIMPLEPROPERTYTEMPLATE('3JsReA6vXDqR7aNC$haRYW',$,'Description','',.P_SINGLEVALUE.,'IfcText',$,$,$,$,$,.READWRITE.);
#4=IFCSIMPLEPROPERTYTEMPLATE('0u0uEsT5HFtuX5GvozO9ba',$,'GeodeticDatum','',.P_SINGLEVALUE.,'IfcIdentifier',$,$,$,$,$,.READWRITE.);
#5=IFCSIMPLEPROPERTYTEMPLATE('1JgEX9Fsf0$ggxYltdkqiY',$,'VerticalDatum','',.P_SINGLEVALUE.,'IfcIdentifier',$,$,$,$,$,.READWRITE.);
#6=IFCSIMPLEPROPERTYTEMPLATE('3ahTZjYrD0MAOo5IH6QuGH',$,'MapProjection','',.P_SINGLEVALUE.,'IfcIdentifier',$,$,$,$,$,.READWRITE.);
#7=IFCSIMPLEPROPERTYTEMPLATE('3hqJR2ghD0GAti7q4sXKj7',$,'MapZone','',.P_SINGLEVALUE.,'IfcIdentifier',$,$,$,$,$,.READWRITE.);
#8=IFCPROPERTYSETTEMPLATE('1jGHTycOj0vA8xHfRl4TNs',$,'ePSet_MapConversion','',.PSET_OCCURRENCEDRIVEN.,'IfcProject',(#9,#10,#11,#12,#13,#15));
#9=IFCSIMPLEPROPERTYTEMPLATE('0nxsULXo17JRrAvNteYtNR',$,'Eastings','',.P_SINGLEVALUE.,'IfcLengthMeasure',$,$,$,$,$,.READWRITE.);
#10=IFCSIMPLEPROPERTYTEMPLATE('26RfaGJs5CqemN0Xin12XL',$,'Northings','',.P_SINGLEVALUE.,'IfcLengthMeasure',$,$,$,$,$,.READWRITE.);
#11=IFCSIMPLEPROPERTYTEMPLATE('0ziCn3nZv3m850VEUwWH42',$,'OrthogonalHeight','',.P_SINGLEVALUE.,'IfcLengthMeasure',$,$,$,$,$,.READWRITE.);
#12=IFCSIMPLEPROPERTYTEMPLATE('3d4BOt4In8WR119ms1SaAe',$,'XAxisAbscissa','',.P_SINGLEVALUE.,'IfcReal',$,$,$,$,$,.READWRITE.);
#13=IFCSIMPLEPROPERTYTEMPLATE('1Q4Voqj2j84RQRI8l67m28',$,'XAxisOrdinate','',.P_SINGLEVALUE.,'IfcReal',$,$,$,$,$,.READWRITE.);
#15=IFCSIMPLEPROPERTYTEMPLATE('0O1Hc0$XnDNOG_jPBmbW5r',$,'Scale','',.P_SINGLEVALUE.,'IfcReal',$,$,$,$,$,.READWRITE.);
ENDSEC;
END-ISO-10303-21;
File diff suppressed because one or more lines are too long
@@ -1,214 +0,0 @@
# BlenderBIM Add-on - OpenBIM Blender Add-on
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
#
# This file is part of BlenderBIM Add-on.
#
# BlenderBIM Add-on is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# BlenderBIM Add-on is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
presets = {
"Basic": ["project", "search", "bcf", "attribute", "spatial", "pset", "qto"],
"Admin": [
"project",
"search",
"bcf",
"root",
"unit",
"model",
"georeference",
"context",
"drawing",
"misc",
"attribute",
"type",
"spatial",
"void",
"aggregate",
"geometry",
"cobie",
"resource",
"cost",
"sequence",
"group",
"system",
"structural",
"boundary",
"profile",
"material",
"style",
"layer",
"owner",
"pset",
"qto",
"classification",
"constraint",
"document",
"pset_template",
"clash",
"lca",
"csv",
"bimtester",
"diff",
"patch",
"covetool",
"augin",
"debug",
],
"BIM Coordination": [
"project",
"search",
"bcf",
"root",
"unit",
"georeference",
"attribute",
"type",
"spatial",
"void",
"aggregate",
"owner",
"pset",
"qto",
"clash",
"csv",
"bimtester",
"diff",
"patch",
"debug",
],
"Architecture": [
"project",
"search",
"bcf",
"root",
"unit",
"model",
"georeference",
"context",
"drawing",
"misc",
"attribute",
"type",
"spatial",
"void",
"aggregate",
"geometry",
"group",
"system",
"boundary",
"profile",
"material",
"style",
"layer",
"owner",
"pset",
"qto",
"classification",
"pset_template",
"clash",
"csv",
],
"Structural Engineering": [
"project",
"search",
"bcf",
"root",
"unit",
"model",
"georeference",
"context",
"drawing",
"misc",
"attribute",
"type",
"spatial",
"void",
"aggregate",
"geometry",
"group",
"system",
"structural",
"boundary",
"profile",
"material",
"style",
"layer",
"owner",
"pset",
"qto",
"classification",
"pset_template",
"clash",
"csv",
],
"MEP": [
"project",
"search",
"bcf",
"root",
"unit",
"model",
"georeference",
"context",
"drawing",
"misc",
"attribute",
"type",
"spatial",
"void",
"aggregate",
"geometry",
"group",
"system",
"boundary",
"profile",
"material",
"style",
"layer",
"owner",
"pset",
"qto",
"classification",
"pset_template",
"clash",
"csv",
],
"Quantity Surveying": ["project", "search", "attribute", "spatial", "void", "pset", "qto", "classification", "csv"],
"Model Enrichment": [
"project",
"search",
"root",
"attribute",
"spatial",
"pset",
"qto",
"pset_template",
"csv",
"patch",
],
"3D Visualisation": ["project", "search", "bcf", "attribute", "spatial", "pset", "qto"],
"4D Scheduling": ["project", "search", "attribute", "spatial", "resource", "cost", "sequence", "pset", "qto"],
"5D Cost Management": [
"project",
"search",
"attribute",
"spatial",
"resource",
"cost",
"sequence",
"pset",
"qto",
"lca",
],
"Facility Management": ["project", "search", "attribute", "spatial", "cobie", "pset", "qto", "lca"],
}
@@ -1,2 +0,0 @@
Name,foo
TransomThickness,500
1 Name foo
2 TransomThickness 500
Binary file not shown.
+28 -16
View File
@@ -16,6 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
from __future__ import annotations
import os
import bpy
import json
@@ -27,6 +28,7 @@ import addon_utils
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.util.placement
import ifcopenshell.util.unit
import blenderbim.tool as tool
import blenderbim.core.geometry
import blenderbim.core.aggregate
@@ -34,6 +36,8 @@ import blenderbim.core.spatial
import blenderbim.core.style
from blenderbim.bim.ifc import IfcStore
from mathutils import Vector
from typing import Union
from logging import Logger
class IfcExporter:
@@ -82,30 +86,34 @@ class IfcExporter:
)
self.file.wrapped_data.header.file_name.preprocessor_version = "IfcOpenShell {}".format(ifcopenshell.version)
self.file.wrapped_data.header.file_name.originating_system = "{} {}".format(
self.get_application_name(), self.get_application_version()
self.get_application_name(), tool.Blender.get_blenderbim_version()
)
def sync_all_objects(self):
results = []
def sync_all_objects(self, skip_unlinking=False) -> list[ifcopenshell.entity_instance]:
results: list[ifcopenshell.entity_instance] = []
self.unit_scale = ifcopenshell.util.unit.calculate_unit_scale(self.file)
for ifc_definition_id in list(IfcStore.id_map.keys()):
obj = IfcStore.id_map[ifc_definition_id]
try:
if isinstance(obj, bpy.types.Material):
continue
tool.Collector.sync(obj)
if obj.library:
continue
tool.Collector.sync(obj, skip_unlinking)
result = self.sync_object_placement(obj)
if result:
results.append(result)
result = self.sync_object_material(obj)
# TODO: sync_object_material always returns None
# so it's never really appended
if result:
results.append(result)
except ReferenceError:
pass # The object is likely deleted
return results
def sync_edited_objects(self):
results = []
def sync_edited_objects(self) -> list[ifcopenshell.entity_instance]:
results: list[ifcopenshell.entity_instance] = []
for obj in IfcStore.edited_objs.copy():
if not obj:
continue
@@ -123,7 +131,7 @@ class IfcExporter:
IfcStore.edited_objs.clear()
return results
def sync_object_material(self, obj):
def sync_object_material(self, obj: bpy.types.Object) -> None:
if not obj.data or not isinstance(obj.data, bpy.types.Mesh):
return
if not self.has_changed_materials(obj):
@@ -134,11 +142,10 @@ class IfcExporter:
checksum = obj.data.BIMMeshProperties.material_checksum
return checksum != str([s.id() for s in tool.Geometry.get_styles(obj) if s])
def sync_object_placement(self, obj):
def sync_object_placement(self, obj: bpy.types.Object) -> Union[ifcopenshell.entity_instance, None]:
element = self.file.by_id(obj.BIMObjectProperties.ifc_definition_id)
if not tool.Ifc.is_moved(obj):
return
blender_matrix = np.array(obj.matrix_world)
if (obj.scale - Vector((1.0, 1.0, 1.0))).length > 1e-4:
bpy.ops.bim.update_representation(obj=obj.name)
return element
@@ -149,7 +156,7 @@ class IfcExporter:
blenderbim.core.geometry.edit_object_placement(tool.Ifc, tool.Geometry, tool.Surveyor, obj=obj)
return element
def sync_grid_axis_object_placement(self, obj, element):
def sync_grid_axis_object_placement(self, obj: bpy.types.Object, element: ifcopenshell.entity_instance) -> None:
grid = (element.PartOfU or element.PartOfV or element.PartOfW)[0]
grid_obj = tool.Ifc.get_object(grid)
if grid_obj:
@@ -158,11 +165,11 @@ class IfcExporter:
bpy.ops.bim.update_representation(obj=obj.name)
tool.Geometry.record_object_position(obj)
def get_application_name(self):
def get_application_name(self) -> str:
return "BlenderBIM"
def get_application_version(self):
return ".".join(
def get_application_version(self) -> str:
version = ".".join(
[
str(x)
for x in [
@@ -172,15 +179,20 @@ class IfcExporter:
][0]
]
)
if blenderbim.bim.last_commit_hash != "8888888":
version += f"-{blenderbim.bim.last_commit_hash[:7]}"
return version
class IfcExportSettings:
def __init__(self):
self.logger = None
self.output_file = None
self.logger: Logger = None
self.output_file: str = None
self.json_version: str = None
self.json_compact: bool = None
@staticmethod
def factory(context, output_file, logger):
def factory(context: bpy.types.Context, output_file: str, logger: Logger) -> IfcExportSettings:
settings = IfcExportSettings()
settings.output_file = output_file
settings.logger = logger
+85 -68
View File
@@ -16,46 +16,35 @@
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
import os
import bpy
import json
import addon_utils
import ifcopenshell.api.owner.settings
import blenderbim.bim
import blenderbim.tool as tool
import blenderbim.core.owner as core_owner
from bpy.app.handlers import persistent
from blenderbim.bim.ifc import IfcStore
from blenderbim.bim.module.owner.prop import get_user_person, get_user_organisation
from blenderbim.bim.module.model.data import AuthoringData
from blenderbim.bim.module.model.workspace import LIST_OF_TOOLS, TOOLS_TO_CLASSES_MAP
from mathutils import Vector
from math import cos, degrees
from typing import Union
cwd = os.path.dirname(os.path.realpath(__file__))
global_subscription_owner = object()
def mode_callback(obj, data):
objects = bpy.context.selected_objects
if bpy.context.active_object:
objects += [bpy.context.active_object]
for obj in objects:
if (
obj.mode != "EDIT"
or not obj.data
or not isinstance(obj.data, (bpy.types.Mesh, bpy.types.Curve, bpy.types.TextCurve))
or not obj.BIMObjectProperties.ifc_definition_id
):
continue
if obj.data.BIMMeshProperties.ifc_definition_id:
tool.Ifc.edit(obj)
elif IfcStore.get_file().by_id(obj.BIMObjectProperties.ifc_definition_id).is_a("IfcGridAxis"):
tool.Ifc.edit(obj)
def name_callback(obj, data):
# TODO Do we still need this, now that we are monitoring the undo redo objects?
try:
obj.name
except:
# The object is invalid but somehow still has a callback. Clear all
# msgbus subscriptions to prevent useless further triggers.
bpy.msgbus.clear_by_owner(obj)
return # In case the object RNA is gone during an undo / redo operation
# Blender names are up to 63 UTF-8 bytes
if len(bytes(obj.name, "utf-8")) >= 63:
@@ -69,17 +58,31 @@ def name_callback(obj, data):
refresh_ui_data()
return
if not obj.BIMObjectProperties.ifc_definition_id or "/" not in obj.name:
if not obj.BIMObjectProperties.ifc_definition_id:
return
if obj.BIMObjectProperties.is_renaming:
obj.BIMObjectProperties.is_renaming = False
return
element = IfcStore.get_file().by_id(obj.BIMObjectProperties.ifc_definition_id)
if "/" in obj.name:
object_name = obj.name
element_name = obj.name.split("/", 1)[1]
else:
element_name = obj.name
object_name = element.is_a() + f"/{element_name}"
obj.name = object_name # NOTE: doesn't trigger infinite recursion
if element.is_a("IfcGridAxis"):
element.AxisTag = obj.name.split("/")[1]
element.AxisTag = object_name.split("/")[1]
refresh_ui_data()
if not element.is_a("IfcRoot"):
return
element.Name = element_name
if obj.BIMObjectProperties.collection:
obj.BIMObjectProperties.collection.name = obj.name
element.Name = "/".join(obj.name.split("/")[1:])
obj.BIMObjectProperties.collection.name = object_name
refresh_ui_data()
@@ -102,7 +105,7 @@ def update_bim_tool_props():
return
mode = bpy.context.mode
current_tool = bpy.context.workspace.tools.from_space_view3d_mode(mode)
if not current_tool or current_tool.idname != "bim.bim_tool":
if not current_tool or current_tool.idname not in LIST_OF_TOOLS:
return
element = tool.Ifc.get_entity(obj)
if not element:
@@ -110,6 +113,16 @@ def update_bim_tool_props():
representation = ifcopenshell.util.representation.get_representation(element, "Model", "Body", "MODEL_VIEW")
if not representation:
return
props = bpy.context.scene.BIMModelProperties
if element.is_a("IfcElementType") or element.is_a("IfcElement"):
element_type = ifcopenshell.util.element.get_type(element)
if element_type:
is_bim_tool = current_tool.idname == "bim.bim_tool"
if is_bim_tool:
props.ifc_class = element_type.is_a()
if is_bim_tool or TOOLS_TO_CLASSES_MAP.get(current_tool.idname) == element_type.is_a():
props.relating_type_id = str(element_type.id())
extrusion = tool.Model.get_extrusion(representation)
if not extrusion:
return
@@ -120,7 +133,6 @@ def update_bim_tool_props():
return x_angle
si_conversion = ifcopenshell.util.unit.calculate_unit_scale(tool.Ifc.get())
props = bpy.context.scene.BIMModelProperties
if not AuthoringData.is_loaded:
AuthoringData.load()
@@ -171,73 +183,47 @@ def refresh_ui_data():
except AttributeError:
pass
if isinstance(tool.Ifc.get(), ifcopenshell.sqlite):
tool.Ifc.get().clear_cache()
def purge_module_data():
from blenderbim.bim import modules
refresh_ui_data()
for name, value in modules.items():
try:
getattr(getattr(getattr(ifcopenshell.api, name), "data"), "Data").purge()
except AttributeError:
pass
# TODO: deprecate prop purge functions and refactor into data classes.
try:
getattr(value, "prop").purge()
except AttributeError:
pass
if isinstance(tool.Ifc.get(), ifcopenshell.sqlite):
tool.Ifc.get().clear_cache()
bpy.context.scene.DocProperties.should_draw_decorations = bpy.context.scene.DocProperties.should_draw_decorations
@persistent
def loadIfcStore(scene):
IfcStore.purge()
purge_module_data()
refresh_ui_data()
if not IfcStore.get_file():
return
IfcStore.get_schema()
IfcStore.relink_all_objects()
@persistent
def undo_pre(scene):
IfcStore.track_undo_redo_stack_object_map()
@persistent
def undo_post(scene):
if IfcStore.last_transaction != bpy.context.scene.BIMProperties.last_transaction:
IfcStore.last_transaction = bpy.context.scene.BIMProperties.last_transaction
IfcStore.undo()
purge_module_data()
IfcStore.track_undo_redo_stack_selected_objects()
IfcStore.reload_undo_redo_stack_objects()
@persistent
def redo_pre(scene):
IfcStore.track_undo_redo_stack_object_map()
IfcStore.undo(until_key=bpy.context.scene.BIMProperties.last_transaction)
refresh_ui_data()
tool.Ifc.rebuild_element_maps()
@persistent
def redo_post(scene):
if IfcStore.last_transaction != bpy.context.scene.BIMProperties.last_transaction:
IfcStore.last_transaction = bpy.context.scene.BIMProperties.last_transaction
IfcStore.redo()
purge_module_data()
IfcStore.track_undo_redo_stack_selected_objects()
IfcStore.reload_undo_redo_stack_objects()
IfcStore.redo(until_key=bpy.context.scene.BIMProperties.last_transaction)
refresh_ui_data()
tool.Ifc.rebuild_element_maps()
@persistent
def ensureIfcExported(scene):
if IfcStore.get_file() and not bpy.context.scene.BIMProperties.ifc_file:
bpy.ops.export_ifc.bim("INVOKE_DEFAULT")
def get_application(ifc):
def get_application(ifc: ifcopenshell.file) -> ifcopenshell.entity_instance:
# TODO: cache this for even faster application retrieval. It honestly makes a difference on long scripts.
version = get_application_version()
for element in ifc.by_type("IfcApplication"):
@@ -252,7 +238,20 @@ def get_application(ifc):
)
def get_application_version():
def get_user(ifc: ifcopenshell.file) -> Union[ifcopenshell.entity_instance, None]:
# TODO: cache this for even faster application retrieval. It honestly makes a difference on long scripts.
if pao := next(iter(ifc.by_type("IfcPersonAndOrganization")), None):
return pao
elif ifc.schema == "IFC2X3":
if (person := next(iter(ifc.by_type("IfcPerson")), None)) is None:
person = tool.Ifc.run("owner.add_person")
if (organization := next(iter(ifc.by_type("IfcOrganization")), None)) is None:
organization = tool.Ifc.run("owner.add_organisation")
pao = tool.Ifc.run("owner.add_person_and_organisation", person=person, organisation=organization)
return pao
def get_application_version() -> str:
return ".".join(
[
str(x)
@@ -272,7 +271,7 @@ def viewport_shading_changed_callback(area):
@persistent
def setDefaultProperties(scene):
def load_post(scene):
global global_subscription_owner
active_object_key = bpy.types.LayerObjects, "active"
bpy.msgbus.subscribe_rna(
@@ -293,6 +292,24 @@ def setDefaultProperties(scene):
key=key, owner=global_subscription_owner, args=(area,), notify=viewport_shading_changed_callback
)
ifcopenshell.api.owner.settings.get_user = lambda ifc: core_owner.get_user(tool.Owner)
ifcopenshell.api.owner.settings.get_user = get_user
ifcopenshell.api.owner.settings.get_application = get_application
AuthoringData.type_thumbnails = {}
if not bpy.context.preferences.addons["blenderbim"].preferences.should_setup_toolbar:
tool.Blender.unregister_toolbar()
if bpy.context.preferences.addons["blenderbim"].preferences.should_setup_workspace:
if "BIM" in bpy.data.workspaces:
bpy.context.window.workspace = bpy.data.workspaces["BIM"]
else:
bpy.ops.workspace.append_activate(idname="BIM", filepath=os.path.join(cwd, "data", "workspace.blend"))
# To improve usability for new users, we hijack the scene properties
# tab. We override default scene properties panels with our own poll
# to hide them unless the user has chosen to view Blender properties.
for panel in tool.Blender.get_scene_panels_list():
if panel in blenderbim.bim.original_scene_panels_polls:
continue
tool.Blender.override_scene_panel(panel)
tool.Blender.setup_tabs()
+94 -41
View File
@@ -29,6 +29,7 @@ from mathutils import geometry
from mathutils import Vector
import blenderbim.tool as tool
from blenderbim.bim.ifc import IfcStore
from typing import Optional, Callable, Any
def draw_attributes(props, layout, copy_operator=None, popup_active_attribute=None):
@@ -75,6 +76,10 @@ def draw_attribute(attribute, layout, copy_operator=None):
op.data_path = attribute.path_from_id("string_value")
if attribute.is_optional:
layout.prop(attribute, "is_null", icon="RADIOBUT_OFF" if attribute.is_null else "RADIOBUT_ON", text="")
if attribute.name == "GlobalId":
layout.operator("bim.generate_global_id", icon="FILE_REFRESH", text="")
if copy_operator:
op = layout.operator(f"{copy_operator}", text="", icon="COPYDOWN")
op.name = attribute.name
@@ -87,8 +92,15 @@ def import_attributes(ifc_class, props, data, callback=None):
# A more elegant attribute importer signature, intended to supersede import_attributes
def import_attributes2(element, props, callback=None):
for attribute in element.wrapped_data.declaration().as_entity().all_attributes():
import_attribute(attribute, props, element.get_info(), callback=callback)
if isinstance(element, str):
attributes = tool.Ifc.schema().declaration_by_name(element).as_entity().all_attributes()
info = {a.name(): None for a in attributes}
info["type"] = element
else:
attributes = element.wrapped_data.declaration().as_entity().all_attributes()
info = element.get_info()
for attribute in attributes:
import_attribute(attribute, props, info, callback=callback)
def import_attribute(attribute, props, data, callback=None):
@@ -109,7 +121,7 @@ def import_attribute(attribute, props, data, callback=None):
elif is_handled_by_callback is False:
props.remove(len(props) - 1)
elif data_type == "string":
new.string_value = "" if new.is_null else str(data[attribute.name()])
new.string_value = "" if new.is_null else str(data[attribute.name()]).replace("\n", "\\n")
if attribute.type_of_attribute().declared_type().name() == "IfcURIReference":
new.is_uri = True
elif data_type == "boolean":
@@ -171,7 +183,7 @@ def add_attribute_description(attribute_blender, attribute_ifc=None):
attribute_blender.description = description
def export_attributes(props, callback=None):
def export_attributes(props, callback: Optional[Callable] = None) -> dict[str, Any]:
attributes = {}
for prop in props:
is_handled_by_callback = callback(attributes, prop) if callback else False
@@ -209,37 +221,6 @@ def get_enum_items(data, prop_name, context=None):
return items
def get_obj_ifc_definition_id(context, obj, obj_type):
if obj_type == "Object":
return bpy.data.objects.get(obj).BIMObjectProperties.ifc_definition_id
elif obj_type == "Material":
return bpy.data.materials.get(obj).BIMObjectProperties.ifc_definition_id
elif obj_type == "MaterialSet":
return ifcopenshell.util.element.get_material(
tool.Ifc.get_entity(bpy.data.objects.get(obj)), should_skip_usage=True
).id()
elif obj_type == "MaterialSetItem":
return bpy.data.objects.get(obj).BIMObjectMaterialProperties.active_material_set_item_id
elif obj_type == "Task":
return context.scene.BIMTaskTreeProperties.tasks[
context.scene.BIMWorkScheduleProperties.active_task_index
].ifc_definition_id
elif obj_type == "Cost":
return context.scene.BIMCostProperties.cost_items[
context.scene.BIMCostProperties.active_cost_item_index
].ifc_definition_id
elif obj_type == "Resource":
return context.scene.BIMResourceTreeProperties.resources[
context.scene.BIMResourceProperties.active_resource_index
].ifc_definition_id
elif obj_type == "Profile":
return context.scene.BIMProfileProperties.profiles[
context.scene.BIMProfileProperties.active_profile_index
].ifc_definition_id
elif obj_type == "WorkSchedule":
return context.scene.BIMWorkScheduleProperties.active_work_schedule_id
# hack to close popup
# https://blender.stackexchange.com/a/202576/130742
def close_operator_panel(event):
@@ -260,12 +241,7 @@ def convert_property_group_from_si(property_group, skip_props=()):
for prop_name in property_group.bl_rna.properties.keys():
if prop_name in skip_props:
continue
prop_bl_rna = property_group.bl_rna.properties[prop_name]
if prop_bl_rna.array_length > 0:
prop_value = prop_bl_rna.default_array
else:
prop_value = prop_bl_rna.default
prop_value = tool.Blender.get_blender_prop_default_value(property_group, prop_name)
if type(prop_value) is float:
prop_value = prop_value * conversion_k
elif type(prop_value) is bpy.types.bpy_prop_array:
@@ -273,6 +249,83 @@ def convert_property_group_from_si(property_group, skip_props=()):
setattr(property_group, prop_name, prop_value)
def draw_filter(layout, filter_groups, data, module):
if not data.is_loaded:
data.load()
sprops = bpy.context.scene.BIMSearchProperties
if tool.Ifc.get():
row = layout.row(align=True)
row.label(text=f"{len(data.data['saved_searches'])} Saved Searches")
if data.data["saved_searches"]:
row.operator("bim.load_search", text="", icon="IMPORT").module = module
row.operator("bim.save_search", text="", icon="EXPORT").module = module
row = layout.row(align=True)
row.operator("bim.add_filter_group", text="Add Search Group", icon="ADD").module = module
row.operator("bim.edit_filter_query", text="", icon="FILTER").module = module
for i, filter_group in enumerate(filter_groups):
box = layout.box()
row = box.row(align=True)
row.prop(sprops, "facet", text="")
op = row.operator("bim.add_filter", text="Add Filter", icon="ADD")
op.type = sprops.facet
op.index = i
op.module = module
op = row.operator("bim.remove_filter_group", text="", icon="X")
op.index = i
op.module = module
for j, ifc_filter in enumerate(filter_group.filters):
if ifc_filter.type == "entity":
row = box.row(align=True)
row.prop(ifc_filter, "value", text="", icon="FILE_3D")
elif ifc_filter.type == "attribute":
row = box.row(align=True)
row.prop(ifc_filter, "name", text="", icon="COPY_ID")
row.prop(ifc_filter, "value", text="")
elif ifc_filter.type == "type":
row = box.row(align=True)
row.prop(ifc_filter, "value", text="", icon="FILE_VOLUME")
elif ifc_filter.type == "material":
row = box.row(align=True)
row.prop(ifc_filter, "value", text="", icon="MATERIAL")
elif ifc_filter.type == "property":
row = box.row(align=True)
row.prop(ifc_filter, "pset", text="", icon="PROPERTIES")
row.prop(ifc_filter, "name", text="")
row.prop(ifc_filter, "comparison", text="")
row.prop(ifc_filter, "value", text="")
elif ifc_filter.type == "classification":
row = box.row(align=True)
row.prop(ifc_filter, "value", text="", icon="OUTLINER")
elif ifc_filter.type == "location":
row = box.row(align=True)
row.prop(ifc_filter, "value", text="", icon="PACKAGE")
elif ifc_filter.type == "group":
row = box.row(align=True)
row.prop(ifc_filter, "value", text="", icon="OUTLINER_COLLECTION")
elif ifc_filter.type == "query":
row = box.row(align=True)
row.prop(ifc_filter, "name", text="", icon="POINTCLOUD_DATA")
row.prop(ifc_filter, "value", text="")
elif ifc_filter.type == "instance":
row = box.row(align=True)
row.prop(ifc_filter, "value", text="", icon="GRIP")
op = row.operator("bim.select_filter_elements", text="", icon="EYEDROPPER")
op.group_index = i
op.index = j
op.module = module
op = row.operator("bim.remove_filter", text="", icon="X")
op.group_index = i
op.index = j
op.module = module
# TODO this should move into ifcopenshell.util
+113 -147
View File
@@ -19,39 +19,46 @@
import os
import bpy
import uuid
import shutil
import hashlib
import zipfile
import tempfile
import traceback
import ifcopenshell
import ifcopenshell.geom
import ifcopenshell.ifcopenshell_wrapper
import blenderbim
import blenderbim.bim.handler
import blenderbim.tool as tool
from pathlib import Path
from blenderbim.tool.brick import BrickStore
from typing import Set, Union, Optional
IFC_CONNECTED_TYPE = Union[bpy.types.Material, bpy.types.Object]
class IfcStore:
path = ""
file = None
schema = None
cache = None
cache_path = None
id_map = {}
guid_map = {}
edited_objs = set()
pset_template_path = ""
pset_template_file = None
classification_path = ""
classification_file = None
library_path = ""
library_file = None
element_listeners = set()
undo_redo_stack_objects = set()
undo_redo_stack_object_names = {}
path: str = ""
file: Optional[ifcopenshell.file] = None
schema: Optional[ifcopenshell.ifcopenshell_wrapper.schema_definition] = None
cache: Optional[ifcopenshell.ifcopenshell_wrapper.HdfSerializer] = None
cache_path: Optional[str] = None
id_map: dict[int, IFC_CONNECTED_TYPE] = {}
guid_map: dict[str, IFC_CONNECTED_TYPE] = {}
edited_objs: Set[bpy.types.Object] = set()
pset_template_path: str = ""
pset_template_file: Optional[ifcopenshell.file] = None
classification_path: str = ""
classification_file: Optional[ifcopenshell.file] = None
library_path: str = ""
library_file: Optional[ifcopenshell.file] = None
current_transaction = ""
last_transaction = ""
history = []
future = []
schema_identifiers = ["IFC4", "IFC2X3", "IFC4X3"]
session_files = {}
session_files: dict[str, ifcopenshell.file] = {}
@staticmethod
def purge():
@@ -82,8 +89,8 @@ class IfcStore:
if IfcStore.path:
try:
IfcStore.load_file(IfcStore.path)
except:
pass
except Exception as e:
print(f"Failed to load file {IfcStore.path}. Error details: {e}")
return IfcStore.file
@staticmethod
@@ -115,11 +122,17 @@ class IfcStore:
ifc_hash = hashlib.md5(ifc_key.encode("utf-8")).hexdigest()
new_cache_path = os.path.join(bpy.context.scene.BIMProperties.data_dir, "cache", f"{ifc_hash}.h5")
IfcStore.cache = None
os.replace(IfcStore.cache_path, new_cache_path)
try:
shutil.move(IfcStore.cache_path, new_cache_path)
except PermissionError:
try:
shutil.copy2(IfcStore.cache_path, new_cache_path)
except PermissionError:
pass # Well we tried. No cache for you!
IfcStore.get_cache()
@staticmethod
def load_file(path):
def load_file(path) -> None:
if not os.path.isfile(path):
return
extension = path.split(".")[-1]
@@ -148,7 +161,7 @@ class IfcStore:
return IfcStore.schema
@staticmethod
def get_element(id_or_guid):
def get_element(id_or_guid: Union[int, str]) -> IFC_CONNECTED_TYPE:
if isinstance(id_or_guid, int):
map_object = IfcStore.id_map
else:
@@ -161,106 +174,20 @@ class IfcStore:
return obj
@staticmethod
def add_element_listener(callback):
IfcStore.element_listeners.add(callback)
@staticmethod
def track_undo_redo_stack_object_map():
"""Keeps track of currently mapped object names, typically during undo and redo
When any Blender object is stored outside a Blender PointerProperty, such as
in a regular Python list, there is the likely probability that the object
will be invalidated when undo or redo occurs. Object invalidation seems to
occur whenever an object is affected during an operation.
For example, if an operator deletes a modifier on o1, then o1 will be invalidated.
"""
for key, value in IfcStore.id_map.items():
try:
IfcStore.undo_redo_stack_object_names[key] = value.name
except:
continue
@staticmethod
def track_undo_redo_stack_selected_objects():
"""Keeps track of selected object names, typically during undo and redo
When any Blender object is stored outside a Blender PointerProperty, such as
in a regular Python list, there is the likely probability that the object
will be invalidated when undo or redo occurs. Object invalidation seems to
occur for selected objects either pre/post undo/redo event, including
selected objects for consecutive undo/redos, and all children. This is
important because selected objects are often deleted from the scene.
So if I first select o1, then o2, then o3, then press undo, o3 will be
invalidated. If instead I press undo twice, o3 and o2 will be invalidated.
"""
if bpy.context.active_object:
objects = set([o.name for o in bpy.context.selected_objects + [bpy.context.active_object]])
objects.update([o.name for o in bpy.context.active_object.children])
else:
objects = set([o.name for o in bpy.context.selected_objects])
for obj in bpy.context.selected_objects:
objects.update([o.name for o in obj.children])
IfcStore.undo_redo_stack_objects |= objects
@staticmethod
def reload_undo_redo_stack_objects():
"""Reloads any invalidated objects after undo or redo
After an undo or redo operation, objects may have been invalidated in
our id_map and guid_map. Invalidated objects are typically those that
have been manipulated or deleted. This checks the cache of mapped and
selected objects prior to the operation and ensures that if the object
is invalidated, they are reloaded based on the object name that was
tracked prior to the undo / redo.
"""
file = IfcStore.get_file()
if not file:
return
# First, reload objects that were selected or active
for name in IfcStore.undo_redo_stack_objects:
obj = bpy.data.objects.get(name)
if not obj:
continue
if not obj.BIMObjectProperties.ifc_definition_id:
continue
element = file.by_id(obj.BIMObjectProperties.ifc_definition_id)
data = {"id": element.id(), "obj": obj.name}
if hasattr(element, "GlobalId"):
data["guid"] = element.GlobalId
IfcStore.commit_link_element(data)
# Scan for any straggling invalidated objects which were indirectly affected and reload them too.
for key, value in IfcStore.id_map.items():
try:
value.name
except:
# TODO not so sure about this obj_name check
obj_name = IfcStore.undo_redo_stack_object_names.get(key, None)
if not obj_name:
continue
obj = bpy.data.objects.get(obj_name)
if not obj or not obj.BIMObjectProperties.ifc_definition_id:
continue
element = file.by_id(obj.BIMObjectProperties.ifc_definition_id)
data = {"id": element.id(), "obj": obj.name}
if hasattr(element, "GlobalId"):
data["guid"] = element.GlobalId
IfcStore.commit_link_element(data)
@staticmethod
def relink_all_objects():
def relink_all_objects() -> None:
if not IfcStore.get_file():
return
for obj in bpy.data.objects:
if obj.library:
continue
IfcStore.relink_object(obj)
for obj in bpy.data.materials:
if obj.library:
continue
IfcStore.relink_object(obj)
@staticmethod
def relink_object(obj):
def relink_object(obj: IFC_CONNECTED_TYPE) -> None:
if not obj:
return
if obj.BIMObjectProperties.ifc_definition_id:
@@ -281,7 +208,14 @@ class IfcStore:
IfcStore.commit_link_element(data)
@staticmethod
def link_element(element, obj):
def link_element(element: ifcopenshell.entity_instance, obj: IFC_CONNECTED_TYPE) -> None:
# Please use tool.Ifc.link() instead of this method. We want to
# refactor this class and deprecate usage of IfcStore in favour of
# tools.
if not isinstance(obj, (bpy.types.Object, bpy.types.Material)):
obj.BIMMeshProperties.ifc_definition_id = element.id()
return
existing_obj = IfcStore.id_map.get(element.id(), None)
if existing_obj == obj:
return
@@ -305,11 +239,9 @@ class IfcStore:
if isinstance(obj, bpy.types.Material):
blenderbim.bim.handler.subscribe_to(obj, "diffuse_color", blenderbim.bim.handler.color_callback)
elif isinstance(obj, bpy.types.Object):
blenderbim.bim.handler.subscribe_to(obj, "mode", blenderbim.bim.handler.mode_callback)
blenderbim.bim.handler.subscribe_to(obj, "active_material_index", blenderbim.bim.handler.active_material_index_callback)
for listener in IfcStore.element_listeners:
listener(element, obj)
blenderbim.bim.handler.subscribe_to(
obj, "active_material_index", blenderbim.bim.handler.active_material_index_callback
)
if IfcStore.history:
data = {"id": element.id(), "guid": getattr(element, "GlobalId", None), "obj": obj.name}
@@ -331,15 +263,18 @@ class IfcStore:
IfcStore.id_map[data["id"]] = obj
if "guid" in data:
IfcStore.guid_map[data["guid"]] = obj
blenderbim.bim.handler.subscribe_to(obj, "mode", blenderbim.bim.handler.mode_callback)
blenderbim.bim.handler.subscribe_to(obj, "name", blenderbim.bim.handler.name_callback)
if isinstance(obj, bpy.types.Material):
blenderbim.bim.handler.subscribe_to(obj, "diffuse_color", blenderbim.bim.handler.color_callback)
elif isinstance(obj, bpy.types.Object):
blenderbim.bim.handler.subscribe_to(
obj, "active_material_index", blenderbim.bim.handler.active_material_index_callback
)
# TODO Listeners are not re-registered. Does this cause nasty problems to debug later on?
# TODO We're handling id_map and guid_map, but what about edited_objs? This might cause big problems.
@staticmethod
def rollback_unlink_element(data):
def rollback_unlink_element(data) -> None:
if "id" not in data or "obj" not in data:
return
obj = bpy.data.objects.get(data["obj"])
@@ -348,13 +283,15 @@ class IfcStore:
IfcStore.guid_map[data["guid"]] = obj
@staticmethod
def commit_unlink_element(data):
def commit_unlink_element(data) -> None:
del IfcStore.id_map[data["id"]]
if data["guid"]:
del IfcStore.guid_map[data["guid"]]
@staticmethod
def unlink_element(element=None, obj=None):
def unlink_element(
element: Optional[ifcopenshell.entity_instance] = None, obj: Optional[IFC_CONNECTED_TYPE] = None
) -> None:
if element is None:
try:
element = tool.Ifc.get_entity(obj)
@@ -400,43 +337,56 @@ class IfcStore:
)
@staticmethod
def execute_ifc_operator(operator, context):
def execute_ifc_operator(operator: bpy.types.Operator, context: bpy.types.Context, is_invoke=False):
blenderbim.last_actions.append({"type": "operator", "name": operator.bl_idname})
bpy.context.scene.BIMProperties.is_dirty = True
is_top_level_operator = not bool(IfcStore.current_transaction)
if is_top_level_operator:
IfcStore.begin_transaction(operator)
IfcStore.get_file().begin_transaction()
if tool.Ifc.get():
tool.Ifc.get().begin_transaction()
if BrickStore.graph is not None: # `if BrickStore.graph` by itself takes ages.
BrickStore.begin_transaction()
# This empty transaction ensures that each operator has at least one transaction
IfcStore.add_transaction_operation(operator, rollback=lambda data: True, commit=lambda data: True)
else:
operator.transaction_key = IfcStore.current_transaction
result = getattr(operator, "_execute")(context)
try:
if is_invoke:
result = getattr(operator, "_invoke")(context, None)
else:
result = getattr(operator, "_execute")(context)
except:
blenderbim.last_error = traceback.format_exc()
raise
if is_top_level_operator:
IfcStore.get_file().end_transaction()
IfcStore.add_transaction_operation(
operator, rollback=lambda d: IfcStore.get_file().undo(), commit=lambda d: IfcStore.get_file().redo()
)
if tool.Ifc.get():
tool.Ifc.get().end_transaction()
IfcStore.add_transaction_operation(
operator, rollback=lambda d: tool.Ifc.get().undo(), commit=lambda d: tool.Ifc.get().redo()
)
if BrickStore.graph is not None: # `if BrickStore.graph` by itself takes ages.
BrickStore.end_transaction()
IfcStore.end_transaction(operator)
blenderbim.bim.handler.refresh_ui_data()
return result
@staticmethod
def begin_transaction(operator):
IfcStore.undo_redo_stack_objects = set()
IfcStore.undo_redo_stack_object_names = {}
def begin_transaction(operator: bpy.types.Operator) -> None:
IfcStore.current_transaction = str(uuid.uuid4())
operator.transaction_key = IfcStore.current_transaction
@staticmethod
def end_transaction(operator):
def end_transaction(operator: bpy.types.Operator) -> None:
IfcStore.current_transaction = ""
operator.transaction_key = ""
@staticmethod
def add_transaction_operation(operator, rollback=None, commit=None):
def add_transaction_operation(operator: bpy.types.Operator, rollback=None, commit=None) -> None:
key = getattr(operator, "transaction_key", None)
data = getattr(operator, "transaction_data", None)
bpy.context.scene.BIMProperties.last_transaction = key
@@ -452,19 +402,35 @@ class IfcStore:
IfcStore.future = []
@staticmethod
def undo():
def undo(until_key=None) -> None:
BrickStore.undo()
if not IfcStore.history:
return
event = IfcStore.history.pop()
for transaction in event["operations"][::-1]:
transaction["rollback"](transaction["data"])
IfcStore.future.append(event)
while IfcStore.history:
if IfcStore.history[-1]["key"] == until_key:
return
event = IfcStore.history.pop()
for transaction in event["operations"][::-1]:
transaction["rollback"](transaction["data"])
IfcStore.future.append(event)
@staticmethod
def redo():
def redo(until_key=None) -> None:
BrickStore.redo()
if not IfcStore.future:
return
event = IfcStore.future.pop()
for transaction in event["operations"]:
transaction["commit"](transaction["data"])
IfcStore.history.append(event)
has_encountered_key = False
while IfcStore.future:
if has_encountered_key and IfcStore.future[-1]["key"] != until_key:
return
elif IfcStore.future[-1]["key"] == until_key:
has_encountered_key = True
event = IfcStore.future.pop()
for transaction in event["operations"]:
transaction["commit"](transaction["data"])
IfcStore.history.append(event)
File diff suppressed because it is too large Load Diff
@@ -20,16 +20,19 @@ import bpy
from . import ui, prop, operator
classes = (
operator.BIM_OT_assign_object,
operator.BIM_OT_unassign_object,
operator.BIM_OT_enable_editing_aggregate,
operator.BIM_OT_disable_editing_aggregate,
operator.BIM_OT_add_aggregate,
operator.BIM_OT_select_parts,
operator.BIM_OT_select_aggregate,
operator.BIM_OT_add_part_to_object,
operator.BIM_OT_aggregate_assign_object,
operator.BIM_OT_disable_editing_aggregate,
operator.BIM_OT_enable_editing_aggregate,
operator.BIM_OT_select_aggregate,
operator.BIM_OT_select_parts,
operator.BIM_OT_aggregate_unassign_object,
operator.BIM_OT_break_link_to_other_aggregates,
operator.BIM_OT_select_linked_aggregates,
prop.BIMObjectAggregateProperties,
ui.BIM_PT_aggregate,
ui.BIM_PT_linked_aggregate,
)
@@ -35,8 +35,9 @@ class AggregateData:
"has_relating_object": cls.has_relating_object(),
"relating_object_label": cls.get_relating_object_label(),
"has_related_objects": cls.has_related_objects(),
"related_objects_amount": cls.get_related_objects_amount(),
"total_parts": cls.total_parts(),
"ifc_class": cls.ifc_class(),
"total_linked_aggregate": cls.total_linked_aggregate(),
}
cls.is_loaded = True
@@ -59,7 +60,7 @@ class AggregateData:
return ifcopenshell.util.element.get_parts(tool.Ifc.get_entity(bpy.context.active_object))
@classmethod
def get_related_objects_amount(cls):
def total_parts(cls):
parts = cls.get_related_objects()
return len(parts) if parts else 0
@@ -72,3 +73,26 @@ class AggregateData:
element = tool.Ifc.get_entity(bpy.context.active_object)
if element:
return element.is_a()
@classmethod
def total_linked_aggregate(cls):
element = tool.Ifc.get_entity(bpy.context.active_object)
aggregate = ifcopenshell.util.element.get_aggregate(element)
if not aggregate:
return []
if not element:
return []
product_linked_agg_group = [
r
for r in getattr(aggregate, "HasAssignments", []) or []
if r.is_a("IfcRelAssignsToGroup")
if "BBIM_Linked_Aggregate" in r.RelatingGroup.Name
]
if not product_linked_agg_group:
return []
total = len(product_linked_agg_group[0].RelatedObjects)
return total
@@ -33,18 +33,23 @@ class Operator:
return {"FINISHED"}
class BIM_OT_assign_object(bpy.types.Operator, Operator):
class BIM_OT_aggregate_assign_object(bpy.types.Operator, Operator):
"""Create aggregation relationship between two ifc elements"""
bl_idname = "bim.assign_object"
bl_label = "Assign Object"
bl_idname = "bim.aggregate_assign_object"
bl_label = "Assign Object To Aggregation"
bl_options = {"REGISTER", "UNDO"}
relating_object: bpy.props.IntProperty()
def _execute(self, context):
relating_obj = None
if self.relating_object:
relating_obj = tool.Ifc.get_object(tool.Ifc.get().by_id(self.relating_object))
element = tool.Ifc.get().by_id(self.relating_object)
if element.IsDecomposedBy:
relating_obj = tool.Ifc.get_object(element)
else:
assembly = element.Decomposes[0].RelatingObject
relating_obj = tool.Ifc.get_object(assembly)
elif context.active_object:
relating_obj = context.active_object
if not relating_obj:
@@ -67,11 +72,11 @@ class BIM_OT_assign_object(bpy.types.Operator, Operator):
self.report({"ERROR"}, f" Cannot aggregate {obj.name} to {relating_obj.name}")
class BIM_OT_unassign_object(bpy.types.Operator, Operator):
class BIM_OT_aggregate_unassign_object(bpy.types.Operator, Operator):
"""Remove aggregation relationship between two ifc elements"""
bl_idname = "bim.unassign_object"
bl_label = "Unassign Object"
bl_idname = "bim.aggregate_unassign_object"
bl_label = "Unassign Object From Aggregation"
bl_options = {"REGISTER", "UNDO"}
def _execute(self, context):
@@ -90,7 +95,14 @@ class BIM_OT_unassign_object(bpy.types.Operator, Operator):
related_obj=tool.Ifc.get_object(element),
)
# Removes Pset related to Linked Aggregates
if not element.is_a('IfcElementAssembly'):
pset = ifcopenshell.util.element.get_pset(element, 'BBIM_Linked_Aggregate')
if pset:
pset = tool.Ifc.get().by_id(pset["id"])
ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), pset=pset)
class BIM_OT_enable_editing_aggregate(bpy.types.Operator, Operator):
"""Enable editing aggregation relationship"""
@@ -121,6 +133,7 @@ class BIM_OT_add_aggregate(bpy.types.Operator, tool.Ifc.Operator):
bl_options = {"REGISTER", "UNDO"}
obj: bpy.props.StringProperty()
ifc_class: bpy.props.StringProperty(name="IFC Class", default="IfcElementAssembly")
aggregate_name: bpy.props.StringProperty(name="Name", default="Default_Name")
def invoke(self, context, event):
return context.window_manager.invoke_props_dialog(self)
@@ -128,13 +141,15 @@ class BIM_OT_add_aggregate(bpy.types.Operator, tool.Ifc.Operator):
def draw(self, context):
row = self.layout
row.prop(self, "ifc_class")
row = self.layout
row.prop(self, "aggregate_name")
def _execute(self, context):
try:
ifc_class = tool.Ifc.schema().declaration_by_name(self.ifc_class).name()
except:
return
aggregate = self.create_aggregate(context, ifc_class)
aggregate = self.create_aggregate(context, ifc_class, self.aggregate_name)
for obj in context.selected_objects:
element = tool.Ifc.get_entity(obj)
@@ -162,8 +177,9 @@ class BIM_OT_add_aggregate(bpy.types.Operator, tool.Ifc.Operator):
)
core.assign_object(tool.Ifc, tool.Aggregate, tool.Collector, relating_obj=aggregate, related_obj=obj)
def create_aggregate(self, context, ifc_class):
aggregate = bpy.data.objects.new("Assembly", None)
def create_aggregate(self, context, ifc_class, aggregate_name):
aggregate = bpy.data.objects.new(aggregate_name, None)
aggregate.location = context.scene.cursor.location
bpy.ops.bim.assign_class(obj=aggregate.name, ifc_class=ifc_class)
return aggregate
@@ -178,12 +194,17 @@ class BIM_OT_select_parts(bpy.types.Operator):
def execute(self, context):
self.file = IfcStore.get_file()
obj = bpy.data.objects.get(self.obj) or context.active_object
parts = ifcopenshell.util.element.get_parts(tool.Ifc.get_entity(obj))
parts_objs = set(tool.Ifc.get_object(part) for part in parts)
selectable_parts_objs = set(context.selectable_objects).intersection(parts_objs)
for selectable_part_obj in selectable_parts_objs:
selectable_part_obj.select_set(True)
# obj = bpy.data.objects.get(self.obj) or context.active_object
for obj in context.selected_objects:
parts = ifcopenshell.util.element.get_parts(tool.Ifc.get_entity(obj))
if parts:
parts_objs = set(tool.Ifc.get_object(part) for part in parts)
selectable_parts_objs = set(context.selectable_objects).intersection(parts_objs)
for selectable_part_obj in selectable_parts_objs:
selectable_part_obj.select_set(True)
else:
obj.select_set(False)
return {"FINISHED"}
@@ -194,14 +215,54 @@ class BIM_OT_select_aggregate(bpy.types.Operator):
bl_label = "Select Aggregate"
bl_options = {"REGISTER", "UNDO"}
obj: bpy.props.StringProperty()
select_parts: bpy.props.BoolProperty(default=False)
@classmethod
def description(cls, context, properties):
if properties.select_parts:
return "Select Aggregate and Parts"
else:
return "Select Aggregate"
def execute(self, context):
self.file = IfcStore.get_file()
obj = bpy.data.objects.get(self.obj) or context.active_object
aggregate = ifcopenshell.util.element.get_aggregate(tool.Ifc.get_entity(obj))
aggregate_obj = tool.Ifc.get_object(aggregate)
if aggregate_obj in context.selectable_objects:
aggregate_obj.select_set(True)
# obj = bpy.data.objects.get(self.obj) or context.active_object
# aggregate = ifcopenshell.util.element.get_aggregate(tool.Ifc.get_entity(obj))
# aggregate_obj = tool.Ifc.get_object(aggregate)
all_parts = []
for obj in context.selected_objects:
element = tool.Ifc.get_entity(obj)
if element:
aggregate = ifcopenshell.util.element.get_aggregate(element)
if aggregate:
all_parts.append(aggregate)
obj.select_set(False)
else:
pass
if not element:
obj.select_set(False)
if self.select_parts:
all_objs = []
for part in all_parts:
if part.IsDecomposedBy:
for subpart in part.IsDecomposedBy[0].RelatedObjects:
all_parts.append(subpart)
all_objs.append(part)
for element in all_objs:
obj = tool.Ifc.get_object(element)
if obj:
obj.select_set(True)
else:
for aggregate_element in all_parts:
aggregate_obj = tool.Ifc.get_object(aggregate_element)
aggregate_obj.select_set(True)
bpy.context.view_layer.objects.active = aggregate_obj
return {"FINISHED"}
@@ -228,3 +289,88 @@ class BIM_OT_add_part_to_object(bpy.types.Operator, Operator):
part_class=self.part_class,
part_name=self.part_name,
)
class BIM_OT_break_link_to_other_aggregates(bpy.types.Operator, Operator):
bl_idname = "bim.break_link_to_other_aggregates"
bl_label = "Break link to other aggregates"
bl_options = {"REGISTER", "UNDO"}
def _execute(self, context):
element = tool.Ifc.get_entity(bpy.context.active_object)
aggregate = ifcopenshell.util.element.get_aggregate(element)
if not aggregate:
return []
if not element:
return []
parts = ifcopenshell.util.element.get_parts(aggregate)
for part in parts:
pset = ifcopenshell.util.element.get_pset(part, "BBIM_Linked_Aggregate")
pset = tool.Ifc.get().by_id(pset["id"])
ifcopenshell.api.run("pset.remove_pset", tool.Ifc.get(), pset=pset)
linked_aggregate_group = [
r.RelatingGroup
for r in getattr(aggregate, "HasAssignments", []) or []
if r.is_a("IfcRelAssignsToGroup")
if "BBIM_Linked_Aggregate" in r.RelatingGroup.Name
]
tool.Ifc.run("group.unassign_group", group=linked_aggregate_group[0], products=[aggregate])
return {"FINISHED"}
class BIM_OT_select_linked_aggregates(bpy.types.Operator, Operator):
bl_idname = "bim.select_linked_aggregates"
bl_label = "Select linked aggregates"
bl_options = {"REGISTER", "UNDO"}
select_parts: bpy.props.BoolProperty(default=False)
@classmethod
def description(cls, context, properties):
if properties.select_parts:
return "Select all aggregates, subaggregates and all their parts"
else:
return "Select all aggregates"
def _execute(self, context):
for obj in context.selected_objects:
obj.select_set(False)
element = tool.Ifc.get_entity(obj)
aggregate = ifcopenshell.util.element.get_aggregate(element)
if not aggregate:
continue
if not element:
continue
linked_aggregate_group = [
r.RelatingGroup
for r in getattr(aggregate, "HasAssignments", []) or []
if r.is_a("IfcRelAssignsToGroup")
if "BBIM_Linked_Aggregate" in r.RelatingGroup.Name
]
group_rel = linked_aggregate_group[0].IsGroupedBy or []
for group_link in group_rel:
parts = list(group_link.RelatedObjects)
if self.select_parts:
parts_objs = []
for part in parts:
if part.IsDecomposedBy:
for subpart in part.IsDecomposedBy[0].RelatedObjects:
parts.append(subpart)
parts_objs.append(part)
for element in parts_objs:
obj = tool.Ifc.get_object(element)
if obj:
obj.select_set(True)
else:
for element in parts:
obj = tool.Ifc.get_object(element)
obj.select_set(True)
return {"FINISHED"}
@@ -18,17 +18,19 @@
from bpy.types import Panel
from blenderbim.bim.module.aggregate.data import AggregateData
from blenderbim.bim.module.group.data import GroupsData, ObjectGroupsData
from blenderbim.bim.ifc import IfcStore
import blenderbim.tool as tool
class BIM_PT_aggregate(Panel):
bl_label = "IFC Aggregates"
bl_label = "Aggregates"
bl_idname = "BIM_PT_aggregate"
bl_options = {"DEFAULT_CLOSED"}
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "object"
bl_parent_id = "BIM_PT_object_metadata"
bl_parent_id = "BIM_PT_tab_object_metadata"
@classmethod
def poll(cls, context):
@@ -54,26 +56,36 @@ class BIM_PT_aggregate(Panel):
row = layout.row(align=True)
row.prop(props, "relating_object", text="")
if props.relating_object:
op = row.operator("bim.assign_object", icon="CHECKMARK", text="")
op = row.operator("bim.aggregate_assign_object", icon="CHECKMARK", text="")
op.relating_object = props.relating_object.BIMObjectProperties.ifc_definition_id
row.operator("bim.disable_editing_aggregate", icon="CANCEL", text="")
else:
row = layout.row(align=True)
if AggregateData.data["has_relating_object"]:
row.label(text=AggregateData.data["relating_object_label"], icon="TRIA_UP")
op = row.operator("bim.select_aggregate", icon="OBJECT_DATA", text="")
op.obj = context.active_object.name
op.select_parts = False
op = row.operator("bim.select_aggregate", icon="RESTRICT_SELECT_OFF", text="")
op.obj = context.active_object.name
op.select_parts = True
row.operator("bim.enable_editing_aggregate", icon="GREASEPENCIL", text="")
row.operator("bim.add_aggregate", icon="ADD", text="")
op = row.operator("bim.unassign_object", icon="X", text="")
op = row.operator("bim.aggregate_unassign_object", icon="X", text="")
else:
row.label(text="No Aggregate", icon="TRIA_UP")
row.label(text="No Whole relation defined", icon="TRIA_UP")
row.operator("bim.enable_editing_aggregate", icon="GREASEPENCIL", text="")
row.operator("bim.add_aggregate", icon="ADD", text="")
row = layout.row(align=True)
parts = AggregateData.data["related_objects_amount"]
row.label(text=f"{parts or 'No'} Part{'s' if parts > 1 else ''}", icon="TRIA_DOWN")
total_parts = AggregateData.data["total_parts"]
if total_parts == 0:
row.label(text="No Parts", icon="TRIA_DOWN")
elif total_parts == 1:
row.label(text="1 Part", icon="TRIA_DOWN")
else:
row.label(text=f"{total_parts} Parts", icon="TRIA_DOWN")
if AggregateData.data["has_related_objects"]:
op = row.operator("bim.select_parts", icon="RESTRICT_SELECT_OFF", text="")
op.obj = context.active_object.name
@@ -90,3 +102,59 @@ class BIM_PT_aggregate(Panel):
op = layout.operator("bim.add_part_to_object", text="Add " + part_class.lstrip("Ifc"))
op.part_class = part_class
op.obj = context.active_object.name
class BIM_PT_linked_aggregate(Panel):
bl_label = "Linked Aggregates"
bl_idname = "BIM_PT_linked_aggregate"
bl_options = {"DEFAULT_CLOSED"}
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "object"
bl_order = 2
bl_parent_id = "BIM_PT_aggregate"
@classmethod
def poll(cls, context):
if not context.active_object:
return False
props = context.active_object.BIMObjectProperties
if not props.ifc_definition_id:
return False
if not IfcStore.get_element(props.ifc_definition_id):
return False
if not IfcStore.get_file().by_id(props.ifc_definition_id).is_a("IfcObjectDefinition"):
return False
return True
def draw(self, context):
layout = self.layout
if not AggregateData.is_loaded:
AggregateData.load()
obj = context.active_object
element = tool.Ifc.get_entity(obj)
props = obj.BIMObjectAggregateProperties
row = layout.row(align=True)
if element.Decomposes:
Number_Linked_Aggregates = AggregateData.data['total_linked_aggregate']
if not Number_Linked_Aggregates:
row.label(text="Not a Linked Aggregate")
else:
row.label(text=f"{Number_Linked_Aggregates} Linked Aggregates")
op = row.operator("bim.object_duplicate_move_linked_aggregate", text="", icon="DUPLICATE")
if type(Number_Linked_Aggregates) is int:
if Number_Linked_Aggregates > 0:
op = row.operator("bim.select_linked_aggregates", text="", icon="OUTLINER_DATA_POINTCLOUD")
op.select_parts = False
op = row.operator("bim.select_linked_aggregates", text="", icon="OUTLINER_OB_POINTCLOUD")
op.select_parts = True
row.operator("bim.refresh_linked_aggregate", text="", icon="FILE_REFRESH")
op = row.operator("bim.break_link_to_other_aggregates", text="", icon="X")
else:
row.label(text="Not an Aggregate")
@@ -20,6 +20,7 @@ import bpy
import json
import ifcopenshell
import ifcopenshell.api
import ifcopenshell.guid
import blenderbim.bim.helper
import blenderbim.bim.handler
import blenderbim.tool as tool
@@ -47,10 +48,18 @@ class EnableEditingAttributes(bpy.types.Operator):
obj = bpy.data.objects.get(self.obj)
elif self.obj_type == "Material":
obj = bpy.data.materials.get(self.obj)
oprops = obj.BIMObjectProperties
props = obj.BIMAttributeProperties
props.attributes.clear()
element = tool.Ifc.get_entity(obj)
has_inherited_predefined_type = False
if not element.is_a("IfcTypeObject") and (element_type := ifcopenshell.util.element.get_type(element)):
# Allow for None due to https://github.com/buildingSMART/IFC4.3.x-development/issues/818
has_inherited_predefined_type = ifcopenshell.util.element.get_predefined_type(element_type) not in (
"NOTDEFINED",
None,
)
def callback(name, prop, data):
if name in ("RefLatitude", "RefLongitude"):
new = props.attributes.add()
@@ -62,10 +71,11 @@ class EnableEditingAttributes(bpy.types.Operator):
new.string_value = "" if new.is_null else json.dumps(data[name])
blenderbim.bim.helper.add_attribute_description(new)
new.description += " The degrees, minutes and seconds should follow this format : [12,34,56]"
if name in ("PredefinedType", "ObjectType") and has_inherited_predefined_type:
props.attributes.remove(len(props.attributes) - 1)
return True
blenderbim.bim.helper.import_attributes2(
tool.Ifc.get().by_id(oprops.ifc_definition_id), props.attributes, callback=callback
)
blenderbim.bim.helper.import_attributes2(element, props.attributes, callback=callback)
props.is_editing_attributes = True
return {"FINISHED"}
@@ -120,20 +130,46 @@ class EditAttributes(bpy.types.Operator, Operator):
return {"FINISHED"}
class GenerateGlobalId(bpy.types.Operator):
class GenerateGlobalId(bpy.types.Operator, Operator):
bl_idname = "bim.generate_global_id"
bl_label = "Regenerate GlobalId"
bl_description = "Regenerate GlobalId\n\nSHIFT+CLICK to regenerate GlobalIds for all selected objects"
bl_options = {"REGISTER", "UNDO"}
def execute(self, context):
index = context.active_object.BIMAttributeProperties.attributes.find("GlobalId")
if index >= 0:
global_id = context.active_object.BIMAttributeProperties.attributes[index]
use_selected: bpy.props.BoolProperty(name="Use All Selected Objects", default=False, options={"SKIP_SAVE"})
def invoke(self, context, event):
# using all selected objects on shift+click
# make sure to use SKIP_SAVE on property, otherwise it might get stuck
if event.type == "LEFTMOUSE" and event.shift:
self.use_selected = True
return self.execute(context)
def _execute(self, context):
if self.use_selected:
for obj in context.selected_objects:
element = tool.Ifc.get_entity(obj)
if not element or not element.is_a("IfcRoot"):
continue
element.GlobalId = ifcopenshell.guid.new()
obj = context.active_object
if not obj or not obj.BIMAttributeProperties.is_editing_attributes:
return {"FINISHED"}
props = obj.BIMAttributeProperties
element = tool.Ifc.get_entity(obj)
if not element.is_a("IfcRoot"):
return {"FINISHED"}
if self.use_selected and obj in context.selected_objects:
# guid value was already regenerated, just update the ui prop
guid_value = element.GlobalId
else:
global_id = context.active_object.BIMAttributeProperties.attributes.add()
global_id.name = "GlobalId"
global_id.data_type = "string"
global_id.string_value = ifcopenshell.guid.new()
guid_value = ifcopenshell.guid.new()
props.attributes["GlobalId"].string_value = guid_value
return {"FINISHED"}
@@ -54,12 +54,12 @@ def draw_ui(context, layout, obj_type, attributes):
class BIM_PT_object_attributes(Panel):
bl_label = "IFC Attributes"
bl_label = "Attributes"
bl_idname = "BIM_PT_object_attributes"
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "object"
bl_parent_id = "BIM_PT_object_metadata"
bl_parent_id = "BIM_PT_tab_object_metadata"
@classmethod
def poll(cls, context):
@@ -76,7 +76,7 @@ class BIM_PT_object_attributes(Panel):
class BIM_PT_material_attributes(Panel):
bl_label = "IFC Material Attributes"
bl_label = "Material Attributes"
bl_idname = "BIM_PT_material_attributes"
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
@@ -26,7 +26,7 @@ class BIM_PT_augin(bpy.types.Panel):
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "scene"
bl_parent_id = "BIM_PT_integrations"
bl_parent_id = "BIM_PT_tab_sandbox"
def draw(self, context):
layout = self.layout
@@ -16,6 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
import os
import bpy
import bcf
import bcf.v2.bcfxml
@@ -23,12 +25,31 @@ import bcf.v2.bcfxml
class BcfStore:
bcfxml = None
@staticmethod
def get_bcfxml():
if not BcfStore.bcfxml:
BcfStore.bcfxml = bcf.v2.bcfxml.BcfXml()
return BcfStore.bcfxml
@classmethod
def get_bcfxml(cls):
if not cls.bcfxml:
bcf_filepath = bpy.context.scene.BCFProperties.bcf_file
if not os.path.isabs(bcf_filepath):
bcf_filepath = os.path.abspath(os.path.join(bpy.path.abspath("//"), bcf_filepath))
if bcf_filepath:
try:
cls.bcfxml = bcf.bcfxml.load(bcf_filepath)
except:
# there will be a plenty of "Permission denied" errors
# as many poll() methods will try to access the bcfxml simultaneously
# the first time it's loaded
pass
return cls.bcfxml
@classmethod
def set(cls, bcfxml):
def set(cls, bcfxml, filepath):
cls.bcfxml = bcfxml
bpy.context.scene.BCFProperties.bcf_file = filepath
@classmethod
def set_by_filepath(cls, filepath):
cls.set(None, filepath)
@classmethod
def unload_bcfxml(cls):
cls.set(None, "")
@@ -42,11 +42,9 @@ class NewBcfProject(bpy.types.Operator):
bl_options = {"REGISTER", "UNDO"}
def execute(self, context):
context.scene.BCFProperties.is_loaded = False
bcfxml = bcf.v2.bcfxml.BcfXml.create_new("New Project")
bcfstore.BcfStore.set(bcfxml)
bcfstore.BcfStore.set(bcfxml, "")
bpy.ops.bim.load_bcf_project()
context.scene.BCFProperties.is_loaded = True
return {"FINISHED"}
@@ -59,11 +57,10 @@ class LoadBcfProject(bpy.types.Operator):
def execute(self, context):
if self.filepath:
bcfstore.BcfStore.bcfxml = bcf.bcfxml.load(self.filepath)
bcfstore.BcfStore.set_by_filepath(self.filepath)
bcfxml = bcfstore.BcfStore.get_bcfxml()
context.scene.BCFProperties.name = bcfxml.project.name
bpy.ops.bim.load_bcf_topics()
context.scene.BCFProperties.is_loaded = True
return {"FINISHED"}
def invoke(self, context, event):
@@ -77,8 +74,7 @@ class UnloadBcfProject(bpy.types.Operator):
bl_options = {"REGISTER", "UNDO"}
def execute(self, context):
bcfstore.BcfStore.set(None)
context.scene.BCFProperties.is_loaded = False
bcfstore.BcfStore.unload_bcfxml()
return {"FINISHED"}
@@ -267,6 +263,7 @@ class SaveBcfProject(bpy.types.Operator):
def execute(self, context):
bcfxml = bcfstore.BcfStore.get_bcfxml()
bcfxml.save(self.filepath)
bcfstore.BcfStore.set(bcfxml, self.filepath)
return {"FINISHED"}
def invoke(self, context, event):
@@ -964,7 +961,8 @@ class ActivateBcfViewpoint(bpy.types.Operator):
context_override = {}
context_override["object"] = context_override["active_object"] = objs[0]
context_override["selected_objects"] = context_override["selected_editable_objects"] = objs
bpy.ops.object.hide_view_set(context_override, unselected=True)
with context.temp_override(**context_override):
bpy.ops.object.hide_view_set(unselected=True)
context.area.type = old
if viewpoint.visualization_info.components.view_setup_hints:
@@ -978,14 +976,16 @@ class ActivateBcfViewpoint(bpy.types.Operator):
self.hide_spaces(context)
self.set_openings_visibility(False, context)
# set selection at the end not to conflict with .hide_spaces
self.set_selection(viewpoint)
self.set_colours(viewpoint)
def hide_spaces(self, context):
old = context.area.type
context.area.type = "VIEW_3D"
bpy.ops.object.select_all(action="DESELECT")
bpy.ops.object.select_pattern(pattern="IfcSpace/*")
bpy.ops.object.hide_view_set({})
bpy.ops.object.hide_view_set()
context.area.type = old
def set_openings_visibility(self, is_visible, context):
@@ -41,37 +41,37 @@ def purge():
def updateBcfReferenceLink(self, context):
if context.scene.BCFProperties.is_loaded:
if bcfstore.BcfStore.get_bcfxml():
bpy.ops.bim.edit_bcf_reference_links()
def updateBcfLabel(self, context):
if context.scene.BCFProperties.is_loaded:
if bcfstore.BcfStore.get_bcfxml():
bpy.ops.bim.edit_bcf_labels()
def updateBcfProjectName(self, context):
if self.is_loaded:
if bcfstore.BcfStore.get_bcfxml():
bpy.ops.bim.edit_bcf_project_name()
def updateBcfAuthor(self, context):
if self.is_loaded:
if bcfstore.BcfStore.get_bcfxml():
bpy.ops.bim.edit_bcf_author()
def updateBcfTopicName(self, context):
if context.scene.BCFProperties.is_loaded:
if bcfstore.BcfStore.get_bcfxml():
bpy.ops.bim.edit_bcf_topic_name()
def updateBcfTopicIsEditable(self, context):
if context.scene.BCFProperties.is_loaded and not self.is_editable:
if bcfstore.BcfStore.get_bcfxml() and not self.is_editable:
bpy.ops.bim.edit_bcf_topic()
def updateBcfCommentIsEditable(self, context):
if context.scene.BCFProperties.is_loaded and not self.is_editable:
if bcfstore.BcfStore.get_bcfxml() and not self.is_editable:
bpy.ops.bim.edit_bcf_comment(comment_guid=self.name)
@@ -151,7 +151,7 @@ class BcfTopic(PropertyGroup):
class BCFProperties(PropertyGroup):
is_loaded: BoolProperty(name="Is Loaded", default=False)
bcf_file: StringProperty(name="BCF File")
comment_text_width: IntProperty(name="Comment Text Width", default=40)
name: StringProperty(default="", name="Project Name", update=updateBcfProjectName)
author: StringProperty(default="john@doe.com", name="Author Email", update=updateBcfAuthor)
@@ -29,7 +29,7 @@ class BIM_PT_bcf(Panel):
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "scene"
bl_parent_id = "BIM_PT_collaboration"
bl_parent_id = "BIM_PT_tab_collaboration"
def draw(self, context):
layout = self.layout
@@ -39,8 +39,7 @@ class BIM_PT_bcf(Panel):
scene = context.scene
props = scene.BCFProperties
if not props.is_loaded:
if not bcfstore.BcfStore.get_bcfxml():
row = layout.row(align=True)
row.operator("bim.new_bcf_project", text="New Project")
row.operator("bim.load_bcf_project", text="Load Project")
@@ -27,7 +27,7 @@ class BIM_PT_qa(Panel):
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "scene"
bl_parent_id = "BIM_PT_quality_control"
bl_parent_id = "BIM_PT_tab_quality_control"
def draw(self, context):
self.layout.use_property_split = True
@@ -22,6 +22,7 @@ from . import ui, operator, prop
classes = (
operator.AddBoundary,
operator.ColourByRelatedBuildingElement,
operator.DecorateBoundaries,
operator.DisableEditingBoundary,
operator.DisableEditingBoundaryGeometry,
operator.EditBoundaryAttributes,
@@ -62,14 +62,14 @@ class BoundaryDecorator:
gpu.state.point_size_set(6)
gpu.state.blend_set("ALPHA")
self.line_shader = gpu.shader.from_builtin("3D_POLYLINE_UNIFORM_COLOR")
self.line_shader = gpu.shader.from_builtin("POLYLINE_UNIFORM_COLOR")
self.line_shader.bind() # required to be able to change uniforms of the shader
# POLYLINE_UNIFORM_COLOR specific uniforms
self.line_shader.uniform_float("viewportSize", (context.region.width, context.region.height))
self.line_shader.uniform_float("lineWidth", 2.0)
# general shader
self.shader = gpu.shader.from_builtin("3D_UNIFORM_COLOR")
self.shader = gpu.shader.from_builtin("UNIFORM_COLOR")
selected_vertices = []
selected_edges = []
@@ -20,9 +20,12 @@ import bpy
import bmesh
import logging
import shapely
import shapely.ops
import mathutils
import numpy as np
import multiprocessing
import ifcopenshell.api
import ifcopenshell.geom
import ifcopenshell.util.unit
import ifcopenshell.util.shape
import ifcopenshell.util.element
@@ -30,12 +33,13 @@ import ifcopenshell.util.placement
import ifcopenshell.util.representation
import blenderbim.tool as tool
import blenderbim.bim.import_ifc as import_ifc
from math import pi, inf
from math import pi, inf, degrees, acos, radians
from mathutils import Vector, Matrix
from blenderbim.bim.ifc import IfcStore
from blenderbim.bim.module.model.decorator import ProfileDecorator
from blenderbim.bim.module.boundary.decorator import BoundaryDecorator
import blenderbim.core
import blenderbim.core.geometry
def get_boundaries_collection(blender_space):
@@ -63,7 +67,8 @@ def disable_editing_boundary_geometry(context):
class Loader:
def __init__(self):
def __init__(self, operator=None):
self.operator = operator
self.ifc_file = None
self.logger = None
self.ifc_importer = None
@@ -85,14 +90,33 @@ class Loader:
tool.Loader.link_mesh(shape, mesh)
except RuntimeError:
# Fallback solution for invalid geometry provided by Revit. (InnerBoundaries cuting OuterBoundary)
print(f"Failed to create mesh from IfcRelSpaceBoundary with ID {boundary.id()}. Geometry might be invalid")
shape = ifcopenshell.geom.create_shape(self.fallback_settings, surface.OuterBoundary)
self.operator.report(
{"WARNING"},
(
f"IfcRelSpaceBoundary {boundary.id()} mesh creation failed. Geometry might be invalid. Using fallback solution"
),
)
try:
shape = ifcopenshell.geom.create_shape(self.fallback_settings, surface.OuterBoundary)
except RuntimeError:
self.operator.report(
{"WARNING"},
f"Skipping IfcRelSpaceBoundary {boundary.id()}. Fallback solution failed. Geometry might be invalid",
)
return None
mesh = bpy.data.meshes.new(str(surface.id()))
bm = bmesh.new()
verts = [bm.verts.new(shape.verts[i : i + 3]) for i in range(0, len(shape.verts), 3)]
bm.faces.new(verts)
for inner_boundary in surface.InnerBoundaries:
shape = ifcopenshell.geom.create_shape(self.fallback_settings, inner_boundary)
try:
shape = ifcopenshell.geom.create_shape(self.fallback_settings, inner_boundary)
except RuntimeError:
self.operator.report(
{"WARNING"},
f"Skipping an inner boundary for IfcRelSpaceBoundary with ID {boundary.id()}. Geometry might be invalid",
)
return None
verts = [bm.verts.new(shape.verts[i : i + 3]) for i in range(0, len(shape.verts), 3)]
for i in range(len(verts) - 1):
bm.edges.new(verts[i : i + 2])
@@ -104,9 +128,7 @@ class Loader:
matrix = mathutils.Matrix(
ifcopenshell.util.placement.get_axis2placement(surface.BasisSurface.Position).tolist()
)
matrix[0][3] *= unit_scale
matrix[1][3] *= unit_scale
matrix[2][3] *= unit_scale
matrix.translation *= unit_scale
mesh.transform(matrix)
return mesh
@@ -128,7 +150,17 @@ class Loader:
self.ifc_importer = import_ifc.IfcImporter(ifc_import_settings)
self.ifc_importer.file = self.ifc_file
def load_boundary(self, boundary, blender_space):
def load_boundary(
self, boundary: ifcopenshell.entity_instance, blender_space: bpy.types.Object = None
) -> bpy.types.Object:
if not blender_space:
if not boundary.RelatingSpace:
self.operator.report(
{"WARNING"},
f"Skipping IfcRelSpaceBoundary {boundary.id()} which have no relating space. Invalid boundary.",
)
return
blender_space = tool.Ifc.get_object(boundary.RelatingSpace)
obj = tool.Ifc.get_object(boundary)
if obj:
return obj
@@ -147,9 +179,9 @@ class LoadProjectSpaceBoundaries(bpy.types.Operator):
bl_options = {"REGISTER", "UNDO"}
def execute(self, context):
loader = Loader()
loader = Loader(self)
for rel in tool.Ifc.get().by_type("IfcRelSpaceBoundary"):
loader.load_boundary(rel, tool.Ifc.get_object(rel.RelatingSpace))
loader.load_boundary(rel)
return {"FINISHED"}
@@ -160,7 +192,7 @@ class LoadBoundary(bpy.types.Operator):
boundary_id: bpy.props.IntProperty()
def execute(self, context):
loader = Loader()
loader = Loader(self)
for obj in context.visible_objects:
obj.select_set(False)
obj = loader.load_boundary(tool.Ifc.get().by_id(self.boundary_id), context.active_object)
@@ -175,7 +207,7 @@ class LoadSpaceBoundaries(bpy.types.Operator):
bl_options = {"REGISTER", "UNDO"}
def execute(self, context):
loader = Loader()
loader = Loader(self)
element = tool.Ifc.get_entity(context.active_object)
for rel in element.BoundedBy or []:
loader.load_boundary(rel, context.active_object)
@@ -423,7 +455,7 @@ class EnableEditingBoundaryGeometry(bpy.types.Operator, tool.Ifc.Operator):
bpy.ops.object.mode_set(mode="EDIT")
ProfileDecorator.install(context, exit_edit_mode_callback=lambda: disable_editing_boundary_geometry(context))
if not bpy.app.background:
bpy.ops.wm.tool_set_by_id(tool.Blender.get_viewport_context(), name="bim.cad_tool")
tool.Blender.set_viewport_tool("bim.cad_tool")
return {"FINISHED"}
@@ -461,7 +493,7 @@ class EditBoundaryGeometry(bpy.types.Operator, tool.Ifc.Operator):
ifcopenshell.util.element.remove_deep2(tool.Ifc.get(), old_surface)
old_mesh = obj.data
loader = Loader()
loader = Loader(self)
obj.data = loader.create_mesh(element)
tool.Geometry.delete_data(old_mesh)
@@ -482,11 +514,11 @@ class DisableEditingBoundaryGeometry(bpy.types.Operator, tool.Ifc.Operator):
class ShowBoundaries(bpy.types.Operator, tool.Ifc.Operator):
bl_idname = "bim.show_boundaries"
bl_label = "Show Boundaries"
bl_description = "Load selected objects boundaries if they are not loaded"
bl_options = {"REGISTER", "UNDO"}
def _execute(self, context):
props = bpy.context.scene.BIMBoundaryProperties
loader = Loader()
loader = Loader(self)
for obj in context.selected_objects:
element = tool.Ifc.get_entity(obj)
if not element or not getattr(element, "BoundedBy", None):
@@ -497,7 +529,7 @@ class ShowBoundaries(bpy.types.Operator, tool.Ifc.Operator):
for rel in element.BoundedBy or []:
boundary_obj = loader.load_boundary(rel, obj)
tool.Boundary.decorate_boundary(boundary_obj)
BoundaryDecorator.install(bpy.context)
BoundaryDecorator.install(context)
return {"FINISHED"}
@@ -530,6 +562,36 @@ class HideBoundaries(bpy.types.Operator, tool.Ifc.Operator):
return {"FINISHED"}
class DecorateBoundaries(bpy.types.Operator, tool.Ifc.Operator):
bl_idname = "bim.decorate_boundaries"
bl_label = "Toggle Boundaries Decorations"
bl_description = "Add special decorations for all boundaries in the scene or hide them if they are already added"
bl_options = {"REGISTER", "UNDO"}
def _execute(self, context):
props = context.scene.BIMBoundaryProperties
# filter not decorated boundaries and add decorations for them
decorated_boundaries = set([i.obj for i in props.boundaries])
active_boundaries = set()
for element in tool.Ifc.get().by_type("IfcRelSpaceBoundary"):
obj = tool.Ifc.get_object(element)
if obj is not None:
active_boundaries.add(obj)
boundaries_to_decorate = active_boundaries - decorated_boundaries
if boundaries_to_decorate:
for obj in boundaries_to_decorate:
tool.Boundary.decorate_boundary(obj)
BoundaryDecorator.install(context)
else:
for obj in decorated_boundaries:
tool.Boundary.undecorate_boundary(obj)
props.boundaries.clear()
BoundaryDecorator.uninstall()
tool.Blender.update_viewport()
return {"FINISHED"}
class AddBoundary(bpy.types.Operator, tool.Ifc.Operator):
bl_idname = "bim.add_boundary"
bl_label = "Add Boundary"
@@ -540,6 +602,7 @@ class AddBoundary(bpy.types.Operator, tool.Ifc.Operator):
related_building_element = None
relating_space_obj = None
related_building_element_obj = None
parent_boundaries = []
objs = context.selected_objects
if len(objs) == 2:
@@ -554,8 +617,19 @@ class AddBoundary(bpy.types.Operator, tool.Ifc.Operator):
else:
related_building_element = element
related_building_element_obj = obj
parent_boundary = self.create_element_boundary(
context, relating_space, relating_space_obj, related_building_element, related_building_element_obj
)
if parent_boundary:
parent_boundaries.append(parent_boundary)
elif len(objs) == 1:
# New prototype, old code not yet removed. Still testing.
space = tool.Ifc.get_entity(objs[0])
if space.is_a("IfcSpace"):
self.auto_generate_boundaries(space, objs[0])
elif len(objs) == 1:
# Optionally the user may select just the space, and the building element shall be auto-detected
# TODO : refactor to be able to generate all boundaries for selected space automatically or with an option
def msg(self, context):
self.layout.label(text="NO ACTIVE STOREY")
@@ -565,8 +639,6 @@ class AddBoundary(bpy.types.Operator, tool.Ifc.Operator):
relating_space = element
relating_space_obj = objs[0]
target = bpy.context.scene.cursor.location
collection = context.view_layer.active_layer_collection.collection
collection_obj = bpy.data.objects.get(collection.name)
if not collection_obj:
@@ -578,19 +650,258 @@ class AddBoundary(bpy.types.Operator, tool.Ifc.Operator):
return
for subelement in ifcopenshell.util.element.get_decomposition(spatial_element):
if not (subelement.is_a("IfcWall") or subelement.is_a("IfcSlab")):
if not (
subelement.is_a("IfcWall") or subelement.is_a("IfcSlab") or subelement.is_a("IfcVirtualElement")
):
continue
obj = tool.Ifc.get_object(subelement)
if obj:
raycast = obj.closest_point_on_mesh(obj.matrix_world.inverted() @ target, distance=0.1)
if raycast[0]:
related_building_element = subelement
related_building_element_obj = obj
break
related_building_element = subelement
related_building_element_obj = obj
parent_boundary = self.create_element_boundary(
context,
relating_space,
relating_space_obj,
related_building_element,
related_building_element_obj,
)
if parent_boundary:
parent_boundaries.append(parent_boundary)
bpy.ops.bim.show_boundaries()
for parent_boundary in parent_boundaries:
obj = tool.Ifc.get_object(parent_boundary)
obj.select_set(True)
def auto_generate_boundaries(self, space, space_obj):
# Identify all potential building elements
# TODO: don't select everything, use AABB culling in Blender
building_elements = (
tool.Ifc.get().by_type("IfcWall")
+ tool.Ifc.get().by_type("IfcSlab")
+ tool.Ifc.get().by_type("IfcVirtualElement")
)
# Don't generate boundaries of building elements that we've already got bounaries for.
for boundary in space.BoundedBy:
if boundary.RelatedBuildingElement in building_elements:
building_elements.remove(boundary.RelatedBuildingElement)
# Create tree of gross shapes of all potential related building elements
include = building_elements + [space]
tree = ifcopenshell.geom.tree()
shapes = {}
settings = ifcopenshell.geom.settings()
settings.set(settings.STRICT_TOLERANCE, True)
settings.set(settings.DISABLE_OPENING_SUBTRACTIONS, True)
iterator = ifcopenshell.geom.iterator(settings, tool.Ifc.get(), multiprocessing.cpu_count(), include=include)
if iterator.initialize():
while True:
tree.add_element(iterator.get_native())
shape = iterator.get()
shapes[shape.id] = shape
if not iterator.next():
break
# Spatially query all potential boundary elements via a 100mm extension of the space
building_elements = [e for e in tree.select(space, extend=0.1) if e != space]
if not building_elements:
return
# Create a dissolved bmesh for the space
space_bm = bmesh.new()
space_bm.from_mesh(space_obj.data)
bmesh.ops.dissolve_limit(space_bm, angle_limit=pi * 2 / 360, verts=space_bm.verts, edges=space_bm.edges)
# Create dissolved bmeshes for all boundary elements
building_element_bms = {}
for building_element in building_elements:
bm = bmesh.new()
shape = shapes[building_element.id()]
verts = ifcopenshell.util.shape.get_vertices(shape.geometry)
for vert in verts:
bm.verts.new(Vector(vert))
bm.verts.ensure_lookup_table()
faces = ifcopenshell.util.shape.get_faces(shape.geometry)
for face in faces:
bm.faces.new([bm.verts[i] for i in face])
bm.verts.ensure_lookup_table()
bm.faces.ensure_lookup_table()
bm.normal_update() # Needed so that dissolve_limit will work.
bmesh.ops.dissolve_limit(bm, angle_limit=radians(1), verts=bm.verts[:], edges=bm.edges[:])
bm.verts.ensure_lookup_table()
bm.faces.ensure_lookup_table()
building_element_bms[building_element.id()] = bm
# Compare space faces and building element faces to see if they relate to one another
for space_face in space_bm.faces:
space_face_normal = space_obj.matrix_world.to_3x3() @ space_face.normal
space_face_vert = space_obj.matrix_world @ space_face.verts[0].co
for building_element in building_elements:
for face in building_element_bms[building_element.id()].faces:
building_obj = tool.Ifc.get_object(building_element)
face_normal = building_obj.matrix_world.to_3x3() @ face.normal
angle = degrees(acos(max(min(space_face_normal.dot(face_normal), 1), -1)))
if tool.Cad.is_x(angle, 180, tolerance=2):
pass # Faces need to be parallel and have opposite normals to be related.
elif building_element.is_a("IfcVirtualElement") and tool.Cad.is_x(angle, 0, tolerance=2):
pass # Virtual elements only need to be parallel to be related, since they are planes.
else:
continue
# Both faces should be close to one another. Say within 50mm.
space_vert = building_obj.matrix_world.inverted() @ space_face_vert
dist = mathutils.geometry.distance_point_to_plane(space_vert, face.verts[0].co, face.normal)
if abs(dist) > 0.05:
continue
# Project the building element face onto the space face
space_face_verts = [v.co.copy() for v in space_face.verts]
space_face_matrix = self.get_face_matrix(*[v.copy() for v in space_face_verts[0:3]])
space_face_matrix_i = space_face_matrix.inverted()
space_face_polygon = shapely.Polygon(
[tuple((space_face_matrix_i @ v).xy) for v in space_face_verts]
)
space_matrix_world_i = space_obj.matrix_world.inverted()
face_verts = [space_matrix_world_i @ building_obj.matrix_world @ v.co.copy() for v in face.verts]
face_polygon = shapely.Polygon([tuple((space_face_matrix_i @ v).xy) for v in face_verts])
gross_boundary_polygon = space_face_polygon.intersection(face_polygon)
if type(gross_boundary_polygon) == shapely.GeometryCollection:
for geom in gross_boundary_polygon.geoms:
if type(geom) == shapely.Polygon:
gross_boundary_polygon = geom
break
if (
not (isinstance(gross_boundary_polygon, shapely.Polygon) and gross_boundary_polygon.is_valid)
or gross_boundary_polygon.is_empty
):
continue
# The gross boundary polygon may not be a true gross boundary since it
# may have openings already removed, such as in IFC4 Reference View. So
# we cheat by using the exterior boundary to mean "gross".
exterior_boundary_polygon = shapely.Polygon(gross_boundary_polygon.exterior.coords)
parent_boundary = tool.Ifc.run(
"root.create_entity", ifc_class=bpy.context.scene.BIMModelProperties.boundary_class
)
if building_element.is_a("IfcVirtualElement"):
parent_boundary.PhysicalOrVirtualBoundary = "VIRTUAL"
else:
parent_boundary.PhysicalOrVirtualBoundary = "PHYSICAL"
parent_boundary.InternalOrExternalBoundary = "NOTDEFINED"
if building_element.is_a("IfcWall"):
is_external = ifcopenshell.util.element.get_pset(
building_element, "Pset_WallCommon", "IsExternal"
)
if is_external is True:
parent_boundary.InternalOrExternalBoundary = "EXTERNAL"
elif is_external is False:
parent_boundary.InternalOrExternalBoundary = "INTERNAL"
elif building_element.is_a("IfcSlab"):
predefined_type = ifcopenshell.util.element.get_predefined_type(building_element)
if predefined_type == "BASESLAB":
parent_boundary.InternalOrExternalBoundary = "EXTERNAL_EARTH"
else:
is_external = ifcopenshell.util.element.get_pset(
building_element, "Pset_SlabCommon", "IsExternal"
)
if is_external is True:
parent_boundary.InternalOrExternalBoundary = "EXTERNAL"
elif is_external is False:
parent_boundary.InternalOrExternalBoundary = "INTERNAL"
parent_boundary.RelatingSpace = space
parent_boundary.RelatedBuildingElement = building_element
parent_boundary.ConnectionGeometry = self.create_connection_geometry_from_polygon(
exterior_boundary_polygon, space_face_matrix
)
self.set_boundary_name(parent_boundary)
for rel in getattr(building_element, "HasOpenings", []):
opening = rel.RelatedOpeningElement
filling = opening.HasFillings[0].RelatedBuildingElement if opening.HasFillings else None
# Create shape of opening as a dissolved BMesh
settings = ifcopenshell.geom.settings()
settings.set(settings.STRICT_TOLERANCE, True)
shape = ifcopenshell.geom.create_shape(settings, opening)
m = shape.transformation.matrix.data
mat = Matrix(
(
[m[0], m[3], m[6], m[9]],
[m[1], m[4], m[7], m[10]],
[m[2], m[5], m[8], m[11]],
[0, 0, 0, 1],
)
)
opening_bm = bmesh.new()
verts = ifcopenshell.util.shape.get_vertices(shape.geometry)
for vert in verts:
opening_bm.verts.new(Vector(vert))
opening_bm.verts.ensure_lookup_table()
faces = ifcopenshell.util.shape.get_faces(shape.geometry)
for face in faces:
opening_bm.faces.new([opening_bm.verts[i] for i in face])
opening_bm.verts.ensure_lookup_table()
opening_bm.faces.ensure_lookup_table()
opening_bm.normal_update() # Needed so that dissolve_limit will work.
bmesh.ops.dissolve_limit(
opening_bm, angle_limit=radians(1), verts=opening_bm.verts[:], edges=opening_bm.edges[:]
)
opening_bm.verts.ensure_lookup_table()
opening_bm.faces.ensure_lookup_table()
# Get relevant faces of BMesh that can turn into boundaries
opening_polygons = []
for opening_face in opening_bm.faces:
opening_face_normal = mat.to_3x3() @ opening_face.normal
angle = degrees(acos(max(min(opening_face_normal.dot(face_normal), 1), -1)))
if not tool.Cad.is_x(angle, 180, tolerance=2):
continue # Any non-parallel faces are not relevant
opening_face_verts = [space_matrix_world_i @ mat @ v.co.copy() for v in opening_face.verts]
polygon = shapely.Polygon([tuple((space_face_matrix_i @ v).xy) for v in opening_face_verts])
opening_polygons.append(polygon)
# Merge them all into a single opening polygon for our boundary
opening_polygon = shapely.ops.unary_union(opening_polygons)
# Only openings that are projected onto our exterior boundary are relevant.
if opening_polygon.intersection(exterior_boundary_polygon).area == 0:
continue
boundary = tool.Ifc.run(
"root.create_entity", ifc_class=bpy.context.scene.BIMModelProperties.boundary_class
)
boundary.RelatingSpace = space
boundary.RelatedBuildingElement = filling or opening
boundary.ConnectionGeometry = self.create_connection_geometry_from_polygon(
opening_polygon, space_face_matrix
)
if filling:
boundary.PhysicalOrVirtualBoundary = "PHYSICAL"
else:
boundary.PhysicalOrVirtualBoundary = "VIRTUAL"
boundary.InternalOrExternalBoundary = parent_boundary.InternalOrExternalBoundary
if boundary.is_a() != "IfcRelSpaceBoundary":
boundary.ParentBoundary = parent_boundary
self.set_boundary_name(boundary)
def create_element_boundary(
self, context, relating_space, relating_space_obj, related_building_element, related_building_element_obj
):
if not relating_space or not related_building_element:
return
# Find which face on space should be bounded to related building element
# TODO: Handle round wall where multiple faces need to be bound to the same related building element
bm = bmesh.new()
bm.from_mesh(relating_space_obj.data)
bmesh.ops.dissolve_limit(bm, angle_limit=pi * 2 / 360, verts=bm.verts, edges=bm.edges)
@@ -611,8 +922,6 @@ class AddBoundary(bpy.types.Operator, tool.Ifc.Operator):
if not target_face:
return
parent_boundary = tool.Ifc.run("root.create_entity", ifc_class=context.scene.BIMModelProperties.boundary_class)
# Is this right? Or should I use loop?
target_face_verts = [v.co.copy() for v in target_face.verts]
target_face_matrix = self.get_face_matrix(*[v.copy() for v in target_face_verts[0:3]])
@@ -632,6 +941,18 @@ class AddBoundary(bpy.types.Operator, tool.Ifc.Operator):
gross_boundary_polygon = geom
break
if (
not (isinstance(gross_boundary_polygon, shapely.Polygon) and gross_boundary_polygon.is_valid)
or gross_boundary_polygon.is_empty
):
return
parent_boundary = tool.Ifc.run("root.create_entity", ifc_class=context.scene.BIMModelProperties.boundary_class)
parent_boundary.PhysicalOrVirtualBoundary = "PHYSICAL"
# Set to EXTERNAL by default and turn later to internal if there is a corresponding boundary relating to an
# internal space
parent_boundary.InternalOrExternalBoundary = "EXTERNAL"
# The gross boundary polygon may not be a true gross boundary since it
# may have openings already removed, such as in IFC4 Reference View. So
# we cheat by using the exterior boundary to mean "gross". Later, we
@@ -639,19 +960,25 @@ class AddBoundary(bpy.types.Operator, tool.Ifc.Operator):
# space.
exterior_boundary_polygon = shapely.Polygon(gross_boundary_polygon.exterior.coords)
net_boundary_polygon = shapely.Polygon(gross_boundary_polygon)
inner_boundaries = []
for rel in getattr(related_building_element, "HasOpenings", []):
opening = rel.RelatedOpeningElement
filling = None
if opening.HasFillings:
filling = opening.HasFillings[0].RelatedBuildingElement
if not opening.HasFillings:
continue
# TODO: HasFilling is a zero to many relationship. How to handle many ?
filling = opening.HasFillings[0].RelatedBuildingElement
opening_polygon = self.get_flattened_polygon(opening, relating_space_obj, target_face_matrix_i)
net_boundary_polygon = net_boundary_polygon.difference(opening_polygon)
# An inner boundary is supposed to overlap its parent boundary according to IFC4 documentation
# so we extend our exterior boundary with all opening which has a filling
# Also see Implementation aggreement SB 1.1 for IFC 2x3 TC1 Space Boundary Addon View
# https://standards.buildingsmart.org/MVD/RELEASE/IFC2x3/TC1/SB1_1/IFC%20Space%20Boundary%20Implementation%20Agreement%20Addendum%202010-03-22.pdf
unionised_object = exterior_boundary_polygon.union(opening_polygon)
if isinstance(unionised_object, shapely.Polygon):
exterior_boundary_polygon = unionised_object
# Only openings that are projected onto our exterior boundary are relevant.
if opening_polygon.intersection(exterior_boundary_polygon).area == 0:
continue
@@ -659,24 +986,25 @@ class AddBoundary(bpy.types.Operator, tool.Ifc.Operator):
connection_geometry = self.create_connection_geometry_from_polygon(opening_polygon, target_face_matrix)
boundary = tool.Ifc.run("root.create_entity", ifc_class=context.scene.BIMModelProperties.boundary_class)
boundary.RelatingSpace = relating_space
boundary.RelatedBuildingElement = filling or related_building_element
boundary.RelatedBuildingElement = filling
boundary.ConnectionGeometry = connection_geometry
boundary.PhysicalOrVirtualBoundary = "PHYSICAL" if filling else "VIRTUAL"
boundary.InternalOrExternalBoundary = "INTERNAL"
if related_building_element.is_a("IfcVirtualElement"):
boundary.PhysicalOrVirtualBoundary = "VIRTUAL"
else:
boundary.PhysicalOrVirtualBoundary = "PHYSICAL"
boundary.InternalOrExternalBoundary = parent_boundary.InternalOrExternalBoundary
self.set_boundary_name(boundary)
if boundary.is_a("IfcRelSpaceBoundary2ndLevel"):
boundary.ParentBoundary = parent_boundary
connection_geometry = self.create_connection_geometry_from_polygon(net_boundary_polygon, target_face_matrix)
connection_geometry = self.create_connection_geometry_from_polygon(
exterior_boundary_polygon, target_face_matrix
)
parent_boundary.RelatingSpace = relating_space
parent_boundary.RelatedBuildingElement = related_building_element
parent_boundary.ConnectionGeometry = connection_geometry
parent_boundary.PhysicalOrVirtualBoundary = "PHYSICAL"
parent_boundary.InternalOrExternalBoundary = "INTERNAL"
bpy.ops.bim.show_boundaries()
obj = tool.Ifc.get_object(parent_boundary)
obj.select_set(True)
self.set_boundary_name(parent_boundary)
return parent_boundary
def get_face_matrix(self, p1, p2, p3):
edge1 = p2 - p1
@@ -691,7 +1019,7 @@ class AddBoundary(bpy.types.Operator, tool.Ifc.Operator):
mat.col[0][:3] = x_axis
mat.col[1][:3] = y_axis
mat.col[2][:3] = z_axis
mat.col[3][:3] = p1
mat.translation = p1
return mat
@@ -725,17 +1053,19 @@ class AddBoundary(bpy.types.Operator, tool.Ifc.Operator):
def export_surface(self, polygon, target_face_matrix):
x_axis = target_face_matrix.col[0][:3]
z_axis = target_face_matrix.col[2][:3]
p1 = target_face_matrix.col[3][:3]
p1 = target_face_matrix.translation
self.unit_scale = ifcopenshell.util.unit.calculate_unit_scale(tool.Ifc.get())
tool.Model.unit_scale = self.unit_scale
surface = tool.Ifc.get().createIfcCurveBoundedPlane()
surface.BasisSurface = tool.Ifc.get().createIfcPlane(tool.Ifc.get().createIfcAxis2Placement3D(
tool.Ifc.get().createIfcCartesianPoint([o / self.unit_scale for o in p1]),
tool.Ifc.get().createIfcDirection([float(o) for o in z_axis]),
tool.Ifc.get().createIfcDirection([float(o) for o in x_axis]),
))
surface.BasisSurface = tool.Ifc.get().createIfcPlane(
tool.Ifc.get().createIfcAxis2Placement3D(
tool.Ifc.get().createIfcCartesianPoint([o / self.unit_scale for o in p1]),
tool.Ifc.get().createIfcDirection([float(o) for o in z_axis]),
tool.Ifc.get().createIfcDirection([float(o) for o in x_axis]),
)
)
if tool.Ifc.get().schema != "IFC2X3":
points = [tool.Model.convert_si_to_unit(list(co)) for co in polygon.exterior.coords]
@@ -748,9 +1078,24 @@ class AddBoundary(bpy.types.Operator, tool.Ifc.Operator):
point_list = tool.Ifc.get().createIfcCartesianPointList2D(points)
inner_boundaries.append(tool.Ifc.get().createIfcIndexedPolyCurve(point_list, None, False))
else:
pass # TODO
pass # TODO
surface.OuterBoundary = outer_boundary
surface.InnerBoundaries = inner_boundaries
return surface
def set_boundary_name(self, boundary):
"""
By convention 1stLevel and 2ndLevel boundary have specific name and description
See https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/lexical/IfcRelSpaceBoundary.htm
Warning: IfcRelSpaceBoundary2ndLevel is a subclass of IfcRelSpaceBoundary1stLevel test order matter
"""
if boundary.is_a("IfcRelSpaceBoundary2ndLevel"):
boundary.Name = "2ndLevel"
if boundary.CorrespondingBoundary:
boundary.Description = "2a"
else:
boundary.Description = "2b"
elif boundary.is_a("IfcRelSpaceBoundary1stLevel"):
boundary.Name = "1stLevel"
@@ -25,13 +25,13 @@ from blenderbim.bim.module.boundary.data import SpaceBoundariesData
class BIM_PT_SceneBoundaries(Panel):
bl_label = "IFC Space Boundaries"
bl_label = "Space Boundaries"
bl_id_name = "BIM_PT_scene_boundaries"
bl_options = {"DEFAULT_CLOSED"}
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "scene"
bl_parent_id = "BIM_PT_geometry"
bl_parent_id = "BIM_PT_tab_geometry"
@classmethod
def poll(cls, context):
@@ -45,12 +45,12 @@ class BIM_PT_SceneBoundaries(Panel):
class BIM_PT_Boundary(Panel):
bl_label = "IFC Space Boundary"
bl_label = "Space Boundary"
bl_idname = "BIM_PT_Boundary"
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "object"
bl_parent_id = "BIM_PT_geometry_object"
bl_parent_id = "BIM_PT_tab_geometric_relationships"
@classmethod
def poll(cls, context):
@@ -117,14 +117,14 @@ class BIM_PT_Boundary(Panel):
class BIM_PT_SpaceBoundaries(Panel):
bl_label = "IFC Space Boundaries"
bl_label = "Space Boundaries"
bl_idname = "BIM_PT_SpaceBoundaries"
bl_options = {"DEFAULT_CLOSED"}
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "object"
bl_order = 1
bl_parent_id = "BIM_PT_geometry_object"
bl_parent_id = "BIM_PT_tab_geometric_relationships"
@classmethod
def poll(cls, context):
@@ -21,7 +21,7 @@ from . import ui, prop, operator
classes = (
operator.AddBrick,
operator.AddBrickFeed,
operator.AddBrickRelation,
operator.AssignBrickReference,
operator.CloseBrickProject,
operator.ConvertBrickProject,
@@ -33,15 +33,18 @@ classes = (
operator.RewindBrickClass,
operator.ViewBrickClass,
operator.ViewBrickItem,
operator.UndoBrick,
operator.RedoBrick,
operator.SerializeBrick,
operator.AddBrickNamespace,
operator.RemoveBrickRelation,
prop.Brick,
prop.BIMBrickProperties,
ui.BIM_PT_brickschema,
ui.BIM_PT_ifc_brickschema_references,
ui.BIM_PT_brickschema_project_info,
ui.BIM_PT_brickschema_namespaces,
ui.BIM_PT_brickschema_create_entity,
ui.BIM_PT_brickschema_viewport,
ui.BIM_UL_bricks,
ui.BIM_PT_ifc_brickschema_references,
)
@@ -41,17 +41,15 @@ class BrickschemaData:
cls.is_loaded = True
cls.data = {
"is_loaded": cls.get_is_loaded(),
"attributes": cls.attributes(),
"namespaces": cls.namespaces(),
"brick_equipment_classes": cls.brick_equipment_classes(),
"active_relations": cls.active_relations(),
}
@classmethod
def get_is_loaded(cls):
return BrickStore.graph is not None
return BrickStore.graph is not None # `if BrickStore.graph` by itself takes ages.
@classmethod
def attributes(cls):
def active_relations(cls):
if BrickStore.graph is None:
return []
props = bpy.context.scene.BIMBrickProperties
@@ -59,80 +57,75 @@ class BrickschemaData:
brick = props.bricks[props.active_brick_index]
except:
return []
results = []
uri = brick.uri
namespace = str(uri.split("#")[0])
if namespace == "https://brickschema.org/schema/Brick":
return []
results = []
query = BrickStore.graph.query(
"""
PREFIX brick: <https://brickschema.org/schema/Brick#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?name ?value ?sp ?sv WHERE {
<{uri}> ?name ?value .
OPTIONAL {
{ ?name rdfs:range brick:TimeseriesReference . }
UNION
{ ?name a brick:EntityProperty . }
?value ?sp ?sv }
SELECT DISTINCT ?predicate ?object ?label ?sp ?sv WHERE {
<{uri}> ?predicate ?object .
OPTIONAL {
?object rdfs:label ?label .
}
OPTIONAL {
{ ?predicate rdfs:range brick:TimeseriesReference . }
UNION
{ ?predicate a brick:EntityProperty . }
?object ?sp ?sv .
}
}
GROUP BY ?object
""".replace(
"{uri}", uri
)
)
for row in query:
name = row.get("name").toPython().split("#")[-1]
value = row.get("value")
predicate_uri = row.get("predicate")
predicate_name = predicate_uri.toPython().split("#")[-1]
object_uri = row.get("object")
object_name = row.get("label")
if not object_name:
if isinstance(object_uri, BNode):
object_name = "[]"
else:
try:
object_name = object_uri.toPython().split("#")[-1]
except:
object_name = str(object_uri)
results.append(
{
"name": name,
"value": value.toPython().split("#")[-1],
"is_uri": isinstance(value, URIRef),
"value_uri": value.toPython(),
"is_globalid": name == "globalID",
"predicate_uri": predicate_uri,
"predicate_name": predicate_name,
"object_uri": object_uri,
"object_name": object_name,
"is_uri": isinstance(object_uri, URIRef),
"is_globalid": predicate_name == "ifcGlobalID",
}
)
if isinstance(row.get("value"), BNode):
for s, p, o in BrickStore.graph.triples((value, None, None)):
if isinstance(object_uri, BNode):
for subject2, predicate2, object2 in BrickStore.graph.triples((object_uri, None, None)):
predicate2_name = predicate2.toPython().split("#")[-1]
try:
object2_name = object2.toPython().split("#")[-1]
except:
object2_name = str(object2)
results.append(
{
"name": name + ":" + p.toPython().split("#")[-1],
"value": o.toPython().split("#")[-1],
"is_uri": isinstance(o, URIRef),
"value_uri": o.toPython(),
"is_globalid": p.toPython().split("#")[-1] == "globalID",
"predicate_uri": None,
"predicate_name": predicate_name + ":" + predicate2_name,
"object_uri": object2,
"object_name": object2_name,
"is_uri": isinstance(object2, URIRef),
"is_globalid": predicate2_name == "ifcGlobalID",
}
)
return results
@classmethod
def namespaces(cls):
if BrickStore.graph is None:
return []
results = []
filter = ["brick", "owl", "w3", "xml"]
for alias, uri in BrickStore.graph.namespaces():
if alias not in filter:
results.append((uri, f"{alias}: {uri}", ""))
return results
@classmethod
def brick_equipment_classes(cls):
if BrickStore.graph is None:
return []
results = []
query = BrickStore.graph.query(
"""
PREFIX brick: <https://brickschema.org/schema/Brick#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?class WHERE {
?class rdfs:subClassOf* brick:Equipment .
}
"""
)
for uri in sorted([x[0].toPython() for x in query]):
results.append((uri, uri.split("#")[-1], ""))
return results
class BrickschemaReferencesData:
data = {}
@@ -156,7 +149,7 @@ class BrickschemaReferencesData:
for library in ifc.by_type("IfcLibraryInformation"):
if tool.Ifc.get_schema() == "IFC2X3":
results.append((str(library.id()), library.Name or "Unnamed", ""))
elif ".ttl" in library.Location:
elif library.Location and ".ttl" in library.Location:
results.append((str(library.id()), library.Name or "Unnamed", ""))
return results
@@ -16,6 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
import os
import bpy
import ifcopenshell.api
import blenderbim.tool as tool
@@ -24,9 +25,10 @@ import blenderbim.bim.handler
from blenderbim.bim.ifc import IfcStore
from blenderbim.tool.brick import BrickStore
class Operator:
def execute(self, context):
self._execute(context)
IfcStore.execute_ifc_operator(self, context)
blenderbim.bim.handler.refresh_ui_data()
return {"FINISHED"}
@@ -35,11 +37,16 @@ class LoadBrickProject(bpy.types.Operator, Operator):
bl_idname = "bim.load_brick_project"
bl_label = "Load Brickschema Project"
bl_options = {"REGISTER", "UNDO"}
bl_description = "Load in a Brick project from a file"
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
filter_glob: bpy.props.StringProperty(default="*.ttl", options={"HIDDEN"})
def _execute(self, context):
core.load_brick_project(tool.Brick, filepath=self.filepath)
if os.path.exists(self.filepath) and "ttl" in os.path.splitext(self.filepath)[1].lower():
root = context.scene.BIMBrickProperties.brick_list_root
core.load_brick_project(tool.Brick, filepath=self.filepath, brick_root=root)
else:
self.report({'ERROR'}, f'Failed to load {self.filepath}')
def invoke(self, context, event):
context.window_manager.fileselect_add(self)
@@ -50,35 +57,45 @@ class ViewBrickClass(bpy.types.Operator, Operator):
bl_idname = "bim.view_brick_class"
bl_label = "View Brick Class"
bl_options = {"REGISTER", "UNDO"}
bl_description = "Inspect the subclasses of this class"
brick_class: bpy.props.StringProperty(name="Brick Class")
split_screen: bpy.props.BoolProperty(name="Split Screen", default=False, options={"HIDDEN"})
def _execute(self, context):
core.view_brick_class(tool.Brick, brick_class=self.brick_class)
core.view_brick_class(tool.Brick, brick_class=self.brick_class, split_screen=self.split_screen)
class ViewBrickItem(bpy.types.Operator, Operator):
bl_idname = "bim.view_brick_item"
bl_label = "View Brick Item"
bl_options = {"REGISTER", "UNDO"}
bl_description = "Inspect this entity in the viewer"
item: bpy.props.StringProperty(name="Brick Item")
split_screen: bpy.props.BoolProperty(name="Split Screen", default=False, options={"HIDDEN"})
def _execute(self, context):
core.view_brick_item(tool.Brick, item=self.item)
try:
core.view_brick_item(tool.Brick, item=self.item, split_screen=self.split_screen)
except:
self.report({'ERROR'}, f'Could not find {self.item}')
class RewindBrickClass(bpy.types.Operator, Operator):
bl_idname = "bim.rewind_brick_class"
bl_label = "Rewind Brick Class"
bl_options = {"REGISTER", "UNDO"}
bl_description = "Go back to the previous list view"
split_screen: bpy.props.BoolProperty(name="Split Screen", default=False, options={"HIDDEN"})
def _execute(self, context):
core.rewind_brick_class(tool.Brick)
core.rewind_brick_class(tool.Brick, split_screen=self.split_screen)
class CloseBrickProject(bpy.types.Operator, Operator):
bl_idname = "bim.close_brick_project"
bl_label = "Close Brick Project"
bl_options = {"REGISTER", "UNDO"}
bl_description = "Close the Brick project"
def _execute(self, context):
core.close_brick_project(tool.Brick)
@@ -88,6 +105,7 @@ class ConvertBrickProject(bpy.types.Operator, Operator):
bl_idname = "bim.convert_brick_project"
bl_label = "Convert Brick Project"
bl_options = {"REGISTER", "UNDO"}
bl_description = "Create an Ifc library for this Brick project"
def _execute(self, context):
core.convert_brick_project(tool.Ifc, tool.Brick)
@@ -97,9 +115,18 @@ class AssignBrickReference(bpy.types.Operator, Operator):
bl_idname = "bim.assign_brick_reference"
bl_label = "Assign Brick Reference"
bl_options = {"REGISTER", "UNDO"}
bl_description = "Assign the selected Ifc entity to the selected Brick entity"
def _execute(self, context):
if not context.active_object:
self.report({'ERROR'}, f'No Ifc selected')
return
props = context.scene.BIMBrickProperties
try:
props.bricks[props.active_brick_index]
except:
self.report({'ERROR'}, f'No Brick selected')
return
core.assign_brick_reference(
tool.Ifc,
tool.Brick,
@@ -113,36 +140,41 @@ class AddBrick(bpy.types.Operator, Operator):
bl_idname = "bim.add_brick"
bl_label = "Add Brick"
bl_options = {"REGISTER", "UNDO"}
bl_description = "Create the Brick entity"
def _execute(self, context):
props = context.scene.BIMBrickProperties
library = None
if props.libraries:
library = tool.Ifc.get().by_id(int(props.libraries))
core.add_brick(
tool.Ifc,
tool.Brick,
element=tool.Ifc.get_entity(context.active_object) if context.selected_objects else None,
namespace=props.namespace,
brick_class=props.brick_equipment_class,
library=library,
label=props.new_brick_label
brick_class=props.brick_entity_class,
library=tool.Ifc.get().by_id(int(props.libraries)) if props.libraries else None,
label=props.new_brick_label,
)
class AddBrickFeed(bpy.types.Operator, Operator):
bl_idname = "bim.add_brick_feed"
bl_label = "Add Brick Feed"
class AddBrickRelation(bpy.types.Operator, Operator):
bl_idname = "bim.add_brick_relation"
bl_label = "Add Brick Relation"
bl_options = {"REGISTER", "UNDO"}
bl_description = "Create the Brick relationship"
def _execute(self, context):
source = tool.Ifc.get_entity([o for o in context.selected_objects if o != context.active_object][0])
destination = tool.Ifc.get_entity(context.active_object)
core.add_brick_feed(
tool.Ifc,
props = context.scene.BIMBrickProperties
brick = props.bricks[props.active_brick_index]
if props.new_brick_relation_type == "http://www.w3.org/2000/01/rdf-schema#label":
object = props.new_brick_relation_object
elif props.split_screen_toggled:
object = props.split_screen_bricks[props.split_screen_active_brick_index].uri
else:
object = props.namespace + props.new_brick_relation_object
core.add_brick_relation(
tool.Brick,
source=source,
destination=destination,
brick_uri=brick.uri,
predicate=props.new_brick_relation_type,
object=object
)
@@ -150,6 +182,7 @@ class ConvertIfcToBrick(bpy.types.Operator, Operator):
bl_idname = "bim.convert_ifc_to_brick"
bl_label = "Convert IFC To Brick"
bl_options = {"REGISTER", "UNDO"}
bl_description = "Convert Ifc entities and relations to Brick entities and relations"
def _execute(self, context):
props = context.scene.BIMBrickProperties
@@ -159,19 +192,44 @@ class ConvertIfcToBrick(bpy.types.Operator, Operator):
core.convert_ifc_to_brick(tool.Brick, namespace=props.namespace, library=library)
class NewBrickFile(bpy.types.Operator, Operator):
class NewBrickFile(bpy.types.Operator):
bl_idname = "bim.new_brick_file"
bl_label = "New Brick File"
bl_options = {"REGISTER", "UNDO"}
bl_description = "Create a Brick project from scratch"
def execute(self, context):
IfcStore.begin_transaction(self)
IfcStore.add_transaction_operation(self, rollback=self.rollback, commit=lambda data: True)
self._execute(context)
self.transaction_data = {
"schema": BrickStore.schema,
"path": BrickStore.path,
"graph": BrickStore.graph,
}
IfcStore.add_transaction_operation(self, rollback=lambda data: True, commit=self.commit)
IfcStore.end_transaction(self)
blenderbim.bim.handler.refresh_ui_data()
return {"FINISHED"}
def _execute(self, context):
core.new_brick_file(tool.Brick)
root = context.scene.BIMBrickProperties.brick_list_root
core.new_brick_file(tool.Brick, brick_root=root)
def rollback(self, data):
BrickStore.purge()
def commit(self, data):
BrickStore.schema = data["schema"]
BrickStore.path = data["path"]
BrickStore.graph = data["graph"]
class RefreshBrickViewer(bpy.types.Operator, Operator):
bl_idname = "bim.refresh_brick_viewer"
bl_label = "Refresh Brick Viewer"
bl_options = {"REGISTER", "UNDO"}
bl_description = "Refresh the list view"
def _execute(self, context):
core.refresh_brick_viewer(tool.Brick)
@@ -181,6 +239,7 @@ class RemoveBrick(bpy.types.Operator, Operator):
bl_idname = "bim.remove_brick"
bl_label = "Remove Brick"
bl_options = {"REGISTER", "UNDO"}
bl_description = "Delete this entity"
def _execute(self, context):
props = context.scene.BIMBrickProperties
@@ -191,21 +250,8 @@ class RemoveBrick(bpy.types.Operator, Operator):
brick_uri=props.bricks[props.active_brick_index].uri,
)
class UndoBrick(bpy.types.Operator, Operator):
bl_idname = "bim.undo_brick"
bl_label = "Undo Brick"
def _execute(self, context):
core.undo_brick(tool.Brick)
class RedoBrick(bpy.types.Operator, Operator):
bl_idname = "bim.redo_brick"
bl_label = "Redo Brick"
def _execute(self, context):
core.redo_brick(tool.Brick)
class SerializeBrick(bpy.types.Operator, Operator):
class SerializeBrick(bpy.types.Operator):
bl_idname = "bim.serialize_brick"
bl_label = "Serialize Brick"
filter_glob: bpy.props.StringProperty(default="*.ttl", options={"HIDDEN"})
@@ -220,24 +266,40 @@ class SerializeBrick(bpy.types.Operator, Operator):
else:
return self.execute(context)
def _execute(self, context):
def execute(self, context):
if self.should_save_as or not BrickStore.path:
BrickStore.path = self.filepath
core.serialize_brick(tool.Brick)
return {"FINISHED"}
@classmethod
def description(cls, context, properties):
if properties.should_save_as:
return "Save Brick project to a selected file"
return "Save the Brick project"
class AddBrickNamespace(bpy.types.Operator, Operator):
bl_idname = "bim.add_brick_namespace"
bl_label = "Add Brick Namespace"
bl_description = "Bind a new namespace to the Brick project"
def _execute(self, context):
props = context.scene.BIMBrickProperties
alias = props.new_brick_namespace_alias
uri = props.new_brick_namespace_uri
core.add_namespace(tool.Brick, alias=alias, uri=uri)
core.add_brick_namespace(tool.Brick, alias=alias, uri=uri)
class RemoveBrickRelation(bpy.types.Operator, Operator):
bl_idname = "bim.remove_brick_relation"
bl_label = "Remove Relation"
bl_options = {"REGISTER", "UNDO"}
bl_description = "Delete this relationship"
predicate: bpy.props.StringProperty(name="Relation")
object: bpy.props.StringProperty(name="Object")
def _execute(self, context):
props = context.scene.BIMBrickProperties
brick = props.bricks[props.active_brick_index]
core.remove_brick_relation(tool.Brick, brick_uri=brick.uri, predicate=self.predicate, object=self.object)
@@ -30,7 +30,9 @@ from bpy.props import (
FloatVectorProperty,
CollectionProperty,
)
import blenderbim.core.brick as core
import blenderbim.tool.brick as tool
from blenderbim.tool.brick import BrickStore
def update_active_brick_index(self, context):
BrickschemaData.is_loaded = False
@@ -43,15 +45,35 @@ def get_libraries(self, context):
def get_namespaces(self, context):
if not BrickschemaData.is_loaded:
BrickschemaData.load()
return BrickschemaData.data["namespaces"]
return [(uri, f"{alias}: {uri}", "") for alias, uri in BrickStore.namespaces]
def get_brick_equipment_classes(self, context):
if not BrickschemaData.is_loaded:
BrickschemaData.load()
return BrickschemaData.data["brick_equipment_classes"]
def get_brick_entity_classes(self, context):
entity = self.brick_entity_create_type
return [(uri, uri.split("#")[-1], "") for uri in BrickStore.entity_classes[entity]]
def get_brick_roots(self, context):
return [(root, root, "") for root in BrickStore.root_classes]
def get_brick_relations(self, context):
relations = [(uri, uri.split("#")[-1], "") for uri in BrickStore.relationships]
for relation in BrickschemaData.data["active_relations"]:
if relation["predicate_name"] == "label":
return relations
relations.append(("http://www.w3.org/2000/01/rdf-schema#label", "label", ""))
return relations
def update_view(self, context):
root = context.scene.BIMBrickProperties.brick_list_root
core.set_brick_list_root(tool.Brick, brick_root=root, split_screen=False)
def split_screen_update_view(self, context):
root = context.scene.BIMBrickProperties.split_screen_brick_list_root
core.set_brick_list_root(tool.Brick, brick_root=root, split_screen=True)
class Brick(PropertyGroup):
@@ -67,9 +89,26 @@ class BIMBrickProperties(PropertyGroup):
bricks: CollectionProperty(name="Bricks", type=Brick)
active_brick_index: IntProperty(name="Active Brick Index", update=update_active_brick_index)
libraries: EnumProperty(name="Libraries", items=get_libraries)
set_list_root_toggled: BoolProperty(name="Set List Root Toggled", default=False)
brick_list_root: EnumProperty(name="Brick List Root", items=get_brick_roots, update=update_view)
# namespace manager
namespace: EnumProperty(name="Namespace", items=get_namespaces)
brick_equipment_class: EnumProperty(name="Brick Equipment Class", items=get_brick_equipment_classes)
brick_settings_toggled: BoolProperty(name="Brick Settings Toggled", default=False)
new_brick_label: StringProperty(name="New Brick Label")
new_brick_namespace_alias: StringProperty(name="New Brick Namespace Alias")
new_brick_namespace_uri: StringProperty(name="New Brick Namespace URI")
new_brick_namespace_uri: StringProperty(name="New Brick Namespace URI")
# create brick entity
new_brick_label: StringProperty(name="New Brick Label")
brick_entity_create_type: EnumProperty(name="Brick Entity Types", items=get_brick_roots)
brick_entity_class: EnumProperty(name="Brick Equipment Class", items=get_brick_entity_classes)
# create relations
brick_create_relations_toggled: BoolProperty(name="Brick Create Relations Toggled", default=False)
brick_edit_relations_toggled: BoolProperty(name="Brick Edit Relations Toggled", default=False)
new_brick_relation_type: EnumProperty(name="New Brick Relation Type", items=get_brick_relations)
new_brick_relation_object: StringProperty(name="New Brick Relation Object")
add_brick_relation_failed: BoolProperty(name="Add Relation Failed", default=False)
# create relations split screen
split_screen_toggled: BoolProperty(name="Split Screen Toggled", default=False)
split_screen_bricks: CollectionProperty(name="Split Screen Bricks", type=Brick)
split_screen_active_brick_index: IntProperty(name="Split Screen Active Brick Index", update=update_active_brick_index)
split_screen_active_brick_class: StringProperty(name="Split Screen Active Brick Class")
split_screen_brick_breadcrumbs: CollectionProperty(name="Split Screen Brick Breadcrumbs", type=StrProperty)
split_screen_brick_list_root: EnumProperty(name="Split Screen Brick List Root", items=get_brick_roots, update=split_screen_update_view)
+224 -70
View File
@@ -22,92 +22,249 @@ from blenderbim.bim.helper import prop_with_search
from blenderbim.bim.module.brick.data import BrickschemaData, BrickschemaReferencesData
from blenderbim.tool.brick import BrickStore
class BIM_PT_brickschema(Panel):
bl_label = "Brickschema Project"
bl_idname = "BIM_PT_brickschema"
bl_options = {"DEFAULT_CLOSED"}
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "scene"
bl_parent_id = "BIM_PT_tab_operations"
def draw(self, context):
if not BrickschemaData.is_loaded:
BrickschemaData.load()
self.props = context.scene.BIMBrickProperties
class BIM_PT_brickschema_project_info(Panel):
bl_label = "Project Info"
bl_idname = "BIM_PT_brickschema_project_info"
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "scene"
bl_parent_id = "BIM_PT_brickschema"
def draw(self, context):
self.props = context.scene.BIMBrickProperties
if not BrickschemaData.data["is_loaded"]:
row = self.layout.row(align=True)
row.operator("bim.new_brick_file", text="Create Project")
row.operator("bim.load_brick_project", text="Load Project")
return
row = self.layout.row(align=True)
if BrickStore.path:
row = self.layout.row(align=True)
row.label(text=BrickStore.path, icon='FILEBROWSER')
row.label(text=BrickStore.path, icon="FILEBROWSER")
else:
row.label(text="No file", icon="FILEBROWSER")
row = self.layout.row(align=True)
if len(self.props.brick_breadcrumbs):
row.operator("bim.rewind_brick_class", text="", icon="FRAME_PREV")
row.label(text=self.props.active_brick_class)
row.prop(data=self.props, property="brick_settings_toggled", text="", icon="PREFERENCES")
row.operator("bim.refresh_brick_viewer", text="", icon="FILE_REFRESH")
row.operator("bim.close_brick_project", text="", icon="CANCEL")
if self.props.brick_settings_toggled:
box = self.layout.box()
row = box.row(align=True)
row.label(text="Active Namespace:")
row = box.row(align=True)
prop_with_search(row, self.props, "namespace", text="")
row = box.row(align=True)
row.label(text="Bind New Namespace:")
row = box.row(align=True)
row.prop(data=self.props, property="new_brick_namespace_alias", text="")
col = row.column()
col.alignment = "CENTER"
col.scale_x = 1.1
col.label(text=":")
row.prop(data=self.props, property="new_brick_namespace_uri", text="")
row.operator("bim.add_brick_namespace", text="", icon="ADD")
row = self.layout.row(align=True)
row.label(text="Create Entity:")
row = self.layout.row(align=True)
row.prop(data=self.props, property="new_brick_label", text="")
prop_with_search(row, self.props, "brick_equipment_class", text="")
row.operator("bim.add_brick", text="", icon="ADD")
row = self.layout.row(align=True)
row.alignment = "RIGHT"
row.operator("bim.add_brick_feed", text="", icon="PLUGIN")
row.operator("bim.remove_brick", text="", icon="X")
row = self.layout.row(align=True)
row.operator("bim.undo_brick", icon="LOOP_BACK")
row.operator("bim.redo_brick", icon="LOOP_FORWARDS")
if BrickStore.last_saved:
row.label(text=BrickStore.last_saved, icon="TIME")
else:
row.label(text="Not saved", icon="TIME")
row = self.layout.row(align=True)
op = row.operator("bim.serialize_brick", icon="EXPORT", text="Save")
op.should_save_as = False
op = row.operator("bim.serialize_brick", icon="FILE_TICK", text="Save As")
op.should_save_as = True
row.operator("bim.close_brick_project", text="", icon="CANCEL")
self.layout.template_list("BIM_UL_bricks", "", self.props, "bricks", self.props, "active_brick_index")
for attribute in BrickschemaData.data["attributes"]:
class BIM_PT_brickschema_namespaces(Panel):
bl_label = "Namespaces"
bl_idname = "BIM_PT_brickschema_namespaces"
bl_options = {"DEFAULT_CLOSED"}
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "scene"
bl_parent_id = "BIM_PT_brickschema"
@classmethod
def poll(cls, context):
return BrickStore.graph != None
def draw(self, context):
self.props = context.scene.BIMBrickProperties
row = self.layout.row(align=True)
row.label(text="Active Namespace:")
row = self.layout.row(align=True)
prop_with_search(row, self.props, "namespace", text="")
row = self.layout.row(align=True)
row.label(text="Bind New Namespace:")
row = self.layout.row(align=True)
row.prop(data=self.props, property="new_brick_namespace_alias", text="")
col = row.column()
col.alignment = "CENTER"
col.scale_x = 1.1
col.label(text=":")
row.prop(data=self.props, property="new_brick_namespace_uri", text="")
row.operator("bim.add_brick_namespace", text="", icon="ADD")
class BIM_PT_brickschema_create_entity(Panel):
bl_label = "Create Entity"
bl_idname = "BIM_PT_brickschema_create_entity"
bl_options = {"DEFAULT_CLOSED"}
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "scene"
bl_parent_id = "BIM_PT_brickschema"
@classmethod
def poll(cls, context):
return BrickStore.graph != None
def draw(self, context):
self.props = context.scene.BIMBrickProperties
# TO DO: hide this if selected entity already has a reference, or something similar
row = self.layout.row(align=True)
row.prop(data=self.props, property="brick_entity_create_type", text="Class")
row = self.layout.row(align=True)
prop_with_search(row, self.props, "brick_entity_class", text="Type")
row = self.layout.row(align=True)
active = tool.Ifc.get_entity(context.active_object)
if active and context.selected_objects:
row.label(text="Label:")
row.label(text=active.Name if active.Name else "Unnamed")
else:
row.prop(data=self.props, property="new_brick_label", text="Label")
row = self.layout.row(align=True)
row.operator("bim.add_brick", text="Create Entity")
class BIM_PT_brickschema_viewport(Panel):
bl_label = "Viewport"
bl_idname = "BIM_PT_brickschema_viewport"
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "scene"
bl_parent_id = "BIM_PT_brickschema"
@classmethod
def poll(cls, context):
return BrickStore.graph != None
def draw(self, context):
self.props = context.scene.BIMBrickProperties
row = self.layout.row(align=True)
row.column().alignment = "RIGHT"
row.prop(data=self.props, property="set_list_root_toggled", text="", icon="OUTLINER")
row.prop(data=self.props, property="split_screen_toggled", text="", icon="WINDOW")
row.operator("bim.refresh_brick_viewer", text="", icon="FILE_REFRESH")
grid = self.layout.grid_flow(even_columns=True)
grid_left = grid.column(align=True)
row = grid_left.row(align=True)
if len(self.props.brick_breadcrumbs):
op = row.operator("bim.rewind_brick_class", text="", icon="FRAME_PREV")
op.split_screen = False
row.label(text=self.props.active_brick_class)
if self.props.set_list_root_toggled:
row = grid_left.row(align=True)
row.prop(data=self.props, property="brick_list_root", text="")
row = grid_left.row()
BIM_UL_bricks.split_screen = False
row.template_list("BIM_UL_bricks", "", self.props, "bricks", self.props, "active_brick_index")
if self.props.split_screen_toggled:
grid_right = grid.column(align=True)
row = grid_right.row(align=True)
if len(self.props.split_screen_brick_breadcrumbs):
op = row.operator("bim.rewind_brick_class", text="", icon="FRAME_PREV")
op.split_screen = True
row.label(text=self.props.split_screen_active_brick_class)
if self.props.set_list_root_toggled:
row = grid_right.row(align=True)
row.prop(data=self.props, property="split_screen_brick_list_root", text="")
row = grid_right.row()
BIM_UL_bricks.split_screen = True
row.template_list("BIM_UL_bricks", "", self.props, "split_screen_bricks", self.props, "split_screen_active_brick_index")
if BrickschemaData.data["active_relations"]:
row = self.layout.row(align=True)
row.label(text=attribute["name"])
row.label(text=attribute["value"])
if attribute["is_uri"]:
op = row.operator("bim.view_brick_item", text="", icon="DISCLOSURE_TRI_RIGHT")
op.item = attribute["value_uri"]
if attribute["is_globalid"]:
op = row.operator("bim.select_global_id", icon="RESTRICT_SELECT_OFF", text="")
op.global_id = attribute["value"]
row.column().alignment = "RIGHT"
row.prop(data=self.props, property="brick_create_relations_toggled", text="", icon="PLUGIN")
row.prop(data=self.props, property="brick_edit_relations_toggled", text="", icon="TOOL_SETTINGS")
row.operator("bim.remove_brick", text="", icon="X")
if self.props.brick_create_relations_toggled and self.props.split_screen_toggled:
row = self.layout.row(align=True)
try:
split_screen_selection = self.props.split_screen_bricks[self.props.split_screen_active_brick_index]
except:
split_screen_selection = None
if not split_screen_selection or split_screen_selection.total_items:
row.label(text="No selection", icon="INFO")
else:
prop_with_search(row, self.props, "new_brick_relation_type", text="")
row.label(text=split_screen_selection.label if split_screen_selection.label else split_screen_selection.name)
row.operator("bim.add_brick_relation", text="", icon="ADD")
elif self.props.brick_create_relations_toggled:
row = self.layout.row(align=True)
prop_with_search(row, self.props, "new_brick_relation_type", text="")
row.prop(data=self.props, property="new_brick_relation_object", text="")
row.operator("bim.add_brick_relation", text="", icon="ADD")
if self.props.brick_create_relations_toggled and self.props.add_brick_relation_failed:
row = self.layout.row(align=True)
row.label(text="Failed to find this entity!", icon="ERROR")
for relation in BrickschemaData.data["active_relations"]:
split = self.layout.split(factor=0.85, align=True)
row = split.row(align=True)
row.label(text=relation["predicate_name"])
row.separator()
row.label(text=relation["object_name"])
row = split.row(align=True)
row.column().alignment = "RIGHT"
if self.props.brick_edit_relations_toggled and relation["predicate_uri"] and relation["predicate_name"] != "type":
op = row.operator("bim.remove_brick_relation", text="", icon="UNLINKED")
op.predicate = relation["predicate_uri"]
op.object = relation["object_uri"]
if relation["is_uri"] and relation["object_uri"].toPython().split("#")[-1] != self.props.active_brick_class:
op = row.operator("bim.view_brick_item", text="", icon="DISCLOSURE_TRI_RIGHT")
op.item = relation["object_uri"]
if relation["is_globalid"]:
op = row.operator("bim.select_global_id", icon="RESTRICT_SELECT_OFF", text="")
op.global_id = relation["object_name"]
class BIM_UL_bricks(UIList):
split_screen = False
def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
if item:
split = layout.split(factor=0.85, align=True)
row = split.row()
label = item.label if item.label else item.name
if item.total_items:
op = row.operator("bim.view_brick_class", text="", icon="DISCLOSURE_TRI_RIGHT", emboss=False)
op.brick_class = item.name
op.split_screen = self.split_screen
row.label(text=label)
if item.total_items:
row = split.row()
row.label(text=str(item.total_items))
class BIM_PT_ifc_brickschema_references(Panel):
bl_label = "IFC Brickschema References"
bl_label = "Brickschema References"
bl_idname = "BIM_PT_ifc_brickschema_references"
bl_options = {"DEFAULT_CLOSED"}
bl_space_type = "PROPERTIES"
@@ -129,15 +286,24 @@ class BIM_PT_ifc_brickschema_references(Panel):
row.label(text="No Brickschema Project Loaded")
return
if not BrickschemaReferencesData.data["libraries"]:
if not BrickschemaReferencesData.data["libraries"] and BrickStore.path:
row = self.layout.row(align=True)
row.label(text="No IFC Libraries")
row.operator("bim.convert_brick_project", text="", icon="ADD")
return
elif not BrickschemaReferencesData.data["libraries"]:
row = self.layout.row(align=True)
row.label(text="No IFC Libraries: save the Brick project to create a new library", icon="ERROR")
row = self.layout.row(align=True)
row.label(text="Libraries must have location pointing to a \".ttl\" file", icon="INFO")
return
row = self.layout.row(align=True)
prop_with_search(row, self.props, "libraries")
row.operator("bim.convert_brick_project", text="", icon="ADD")
if BrickStore.path:
row.operator("bim.convert_brick_project", text="", icon="ADD")
row = self.layout.row(align=True)
row.operator("bim.assign_brick_reference", icon="ADD")
@@ -152,16 +318,4 @@ class BIM_PT_ifc_brickschema_references(Panel):
row.label(text=reference["identification"], icon="ASSET_MANAGER")
row.label(text=reference["name"])
row.operator("bim.unassign_library_reference", text="", icon="X").reference = reference["id"]
row.operator("bim.view_brick_item", text="", icon="DISCLOSURE_TRI_RIGHT").item = reference["identification"]
class BIM_UL_bricks(UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
if item:
row = layout.row(align=True)
if item.total_items:
op = row.operator("bim.view_brick_class", text="", icon="DISCLOSURE_TRI_RIGHT", emboss=False)
op.brick_class = item.name
row.label(text=item.label if item.label else item.name)
if item.total_items:
row.label(text=str(item.total_items))
row.operator("bim.view_brick_item", text="", icon="DISCLOSURE_TRI_RIGHT").item = reference["identification"]
@@ -0,0 +1,42 @@
# BlenderBIM Add-on - OpenBIM Blender Add-on
# Copyright (C) 2023 Dion Moult <dion@thinkmoult.com>
#
# This file is part of BlenderBIM Add-on.
#
# BlenderBIM Add-on is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# BlenderBIM Add-on is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
import bpy
from . import ui, prop, operator
classes = (
operator.GetBSDDClassificationProperties,
operator.LoadBSDDDomains,
operator.SearchBSDDClass,
operator.SetActiveBSDDDictionary,
prop.BSDDDomain,
prop.BSDDClassification,
prop.BSDDPset,
prop.BIMBSDDProperties,
ui.BIM_UL_bsdd_domains,
ui.BIM_UL_bsdd_classifications,
ui.BIM_PT_bsdd,
)
def register():
bpy.types.Scene.BIMBSDDProperties = bpy.props.PointerProperty(type=prop.BIMBSDDProperties)
def unregister():
del bpy.types.Scene.BIMBSDDProperties
@@ -0,0 +1,65 @@
# BlenderBIM Add-on - OpenBIM Blender Add-on
# Copyright (C) 2023 Dion Moult <dion@thinkmoult.com>
#
# This file is part of BlenderBIM Add-on.
#
# BlenderBIM Add-on is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# BlenderBIM Add-on is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
import bpy
import bsdd
import blenderbim.tool as tool
from blenderbim.core import bsdd as core
class LoadBSDDDomains(bpy.types.Operator):
bl_idname = "bim.load_bsdd_domains"
bl_label = "Load bSDD Dictionaries"
bl_options = {"REGISTER", "UNDO"}
def execute(self, context):
core.load_bsdd(bsdd.Client(), tool.Bsdd)
return {"FINISHED"}
class SetActiveBSDDDictionary(bpy.types.Operator):
bl_idname = "bim.set_active_bsdd_domain"
bl_label = "Load bSDD Dictionary"
bl_options = {"REGISTER", "UNDO"}
name: bpy.props.StringProperty()
uri: bpy.props.StringProperty()
def execute(self, context):
core.set_active_bsdd_dictionary(self.name, self.uri, tool.Bsdd)
return {"FINISHED"}
class SearchBSDDClass(bpy.types.Operator):
bl_idname = "bim.search_bsdd_classifications"
bl_label = "Search bSDD Class"
bl_options = {"REGISTER", "UNDO"}
def execute(self, context):
keyword = context.scene.BIMBSDDProperties.keyword
core.search_class(keyword, bsdd.Client(), tool.Bsdd)
return {"FINISHED"}
class GetBSDDClassificationProperties(bpy.types.Operator):
bl_idname = "bim.get_bsdd_classification_properties"
bl_label = "Search bSDD Classifications"
bl_options = {"REGISTER", "UNDO"}
def execute(self, context):
core.get_class_properties(bsdd.Client(), tool.Bsdd)
return {"FINISHED"}
@@ -0,0 +1,67 @@
# BlenderBIM Add-on - OpenBIM Blender Add-on
# Copyright (C) 2023 Dion Moult <dion@thinkmoult.com>
#
# This file is part of BlenderBIM Add-on.
#
# BlenderBIM Add-on is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# BlenderBIM Add-on is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
import bpy
from bpy.types import PropertyGroup
from blenderbim.bim.prop import Attribute, StrProperty
from bpy.props import (
PointerProperty,
StringProperty,
EnumProperty,
BoolProperty,
IntProperty,
FloatProperty,
FloatVectorProperty,
CollectionProperty,
)
class BSDDDomain(PropertyGroup):
name: StringProperty(name="Name")
uri: StringProperty(name="URI")
default_language_code: StringProperty(name="Language")
organization_name_owner: StringProperty(name="Organization")
status: StringProperty(name="Status")
version: StringProperty(name="Version")
class BSDDClassification(PropertyGroup):
name: StringProperty(name="Name")
reference_code: StringProperty(name="Reference Code")
description: StringProperty(name="Description")
uri: StringProperty(name="Namespace URI")
domain_name: StringProperty(name="Domain Name")
domain_namespace_uri: StringProperty(name="Domain Namespace URI")
class BSDDPset(PropertyGroup):
name: StringProperty(name="Name")
properties: CollectionProperty(name="Properties", type=Attribute)
class BIMBSDDProperties(PropertyGroup):
active_domain: StringProperty(name="Active Domain")
active_uri: StringProperty(name="Active URI")
domains: CollectionProperty(name="Domains", type=BSDDDomain)
active_domain_index: IntProperty(name="Active Domain Index")
classifications: CollectionProperty(name="Classifications", type=BSDDClassification)
active_classification_index: IntProperty(name="Active Classification Index")
keyword: StringProperty(name="Keyword")
should_filter_ifc_class: BoolProperty(name="Filter Active IFC Class", default=True)
load_preview_domains: BoolProperty(name="Load Preview Domains", default=False)
classification_psets: CollectionProperty(name="Classification Psets", type=BSDDPset)
@@ -0,0 +1,79 @@
# BlenderBIM Add-on - OpenBIM Blender Add-on
# Copyright (C) 2023 Dion Moult <dion@thinkmoult.com>
#
# This file is part of BlenderBIM Add-on.
#
# BlenderBIM Add-on is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# BlenderBIM Add-on is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
import blenderbim.tool as tool
from bpy.types import Panel, UIList
from blenderbim.bim.ifc import IfcStore
class BIM_PT_bsdd(Panel):
bl_label = "buildingSMART Data Dictionary"
bl_idname = "BIM_PT_bsdd"
bl_options = {"DEFAULT_CLOSED"}
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_context = "scene"
bl_parent_id = "BIM_PT_tab_project_setup"
def draw(self, context):
props = context.scene.BIMBSDDProperties
row = self.layout.row(align=True)
row.prop(props, "load_preview_domains")
if len(props.domains):
row.operator("bim.load_bsdd_domains", text="", icon="FILE_REFRESH")
if props.active_domain:
row = self.layout.row()
row.label(text="Active: " + props.active_domain, icon="URL")
else:
row = self.layout.row()
row.label(text="No Active bSDD Domain", icon="ERROR")
if len(props.domains):
self.layout.template_list(
"BIM_UL_bsdd_domains",
"",
props,
"domains",
props,
"active_domain_index",
)
else:
row = self.layout.row()
row.operator("bim.load_bsdd_domains")
class BIM_UL_bsdd_domains(UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
if item:
row = layout.row(align=True)
if item.status != "Active":
row.label(text=f"{item.name} ({item.organization_name_owner}) - {item.status}", icon="ERROR")
else:
row.label(text=f"{item.name} ({item.organization_name_owner})")
op = row.operator("bim.set_active_bsdd_domain", text="", icon="RESTRICT_SELECT_OFF")
op.name = item.name
op.uri = item.uri
class BIM_UL_bsdd_classifications(UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
if item:
row = layout.row(align=True)
row.label(text=item.reference_code)
row.label(text=item.name)
@@ -37,7 +37,7 @@ classes = (
def register():
if not bpy.app.background:
bpy.utils.register_tool(workspace.CadTool, after={"builtin.transform"}, separator=True, group=True)
bpy.utils.register_tool(workspace.CadTool, after={"builtin.transform"}, separator=True, group=False)
bpy.types.Scene.BIMCadProperties = bpy.props.PointerProperty(type=prop.BIMCadProperties)

Some files were not shown because too many files have changed in this diff Show More