Andrej730
fe8c396e12
typing
2024-11-08 18:32:19 +05:00
Andrej730
09fcd32b7a
Fix error duplicating array item after c415767 #5705
...
error traceback
```
Traceback (most recent call last):
File "bonsai\bim\module\geometry\operator.py", line 909, in execute
return OverrideDuplicateMove.execute_duplicate_operator(self, context, linked=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "bonsai\bim\module\geometry\operator.py", line 918, in execute_duplicate_operator
IfcStore.execute_ifc_operator(self, context)
File "bonsai\bim\ifc.py", line 443, in execute_ifc_operator
result = getattr(operator, "_execute")(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "bonsai\bim\module\geometry\operator.py", line 912, in _execute
return OverrideDuplicateMove.execute_ifc_duplicate_operator(self, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "bonsai\bim\module\geometry\operator.py", line 1021, in execute_ifc_duplicate_operator
tool.Model.handle_array_on_copied_element(new, array_data)
File "bonsai\tool\model.py", line 673, in handle_array_on_copied_element
array_pset_data = array_pset["Data"]
~~~~~~~~~~^^^^^^^^
KeyError: 'Data'
```
2024-11-07 17:38:39 +05:00
Andrej730
b0cc2e30a9
Fix error starting to edit pset without enum reference/enum values #5707
...
Traceback
Error: Python: Traceback (most recent call last):
File "\bonsai\bim\module\pset\operator.py", line 62, in execute
core.enable_pset_editing(tool.Pset, pset, self.pset_name, self.pset_type, self.obj, self.obj_type)
File "\bonsai\core\pset.py", line 86, in enable_pset_editing
pset_tool.import_pset_from_existing(pset, props)
File "\bonsai\tool\pset.py", line 121, in import_pset_from_existing
metadata.set_value(prop.EnumerationReference.EnumerationValues[0].wrappedValue)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'EnumerationValues'
2024-11-07 17:09:56 +05:00
Andrej730
d9186bce11
Bonsai to show different error for Python 3.12 users #5704
2024-11-07 17:09:56 +05:00
Andrej730
cc15e6b3c1
typing
2024-11-07 17:09:56 +05:00
Andrej730
832ad6d318
Prioritize existing data types for templates props for safety
...
Noticed working on #5596 and #5708 a few issue when pset template is changing the prop types.
E.g. prop had string data type and now template suggests that it should be a float.
Previously, it might error trying to cast a string to a float. Now it will show a float until user will set it to null, then next time it will be loaded from the template data type.
Another example - prop was a string and now it's a boolean. Previously, it would be cast to boolean implicitly. E.g. "test" -> bool("test") -> True. And if user wouldn't be paying attention then enabling pset editing and saving it would make them lose "test" value.
Now - https://imgchest.com/p/na7ke99wb78
Before - https://imgchest.com/p/5xy23rr3z4l
2024-11-07 16:21:12 +05:00
Andrej730
90d5509046
Add min 0 value to IFC props in UI
...
Basically it won't allow setting values below 0 by accident (especially important for representation item props as it may lead to a crash).
1) IfcPositiveLengthMeasure will affect bunch of props like Depth in IfcExtrudedAreaSolid.
2) IfcNonNegativeLengthMeasure will affect MaterialLayer and some profiles attributes.
2024-11-07 16:21:11 +05:00
Andrej730
f0a6906d73
Use helper.import_attributes for representation item attributes
2024-11-07 16:21:11 +05:00
Andrej730
bbca07d535
Edit other representation item attributes besides IfcSweptSolid depth
...
Examples:
- https://imgchest.com/p/qb4zjgbklyj
- https://imgchest.com/p/lqye68r2k4d
Added this feature in a very experiment way, I'm sure it will break very soon and we'll be able to refine it.
2024-11-06 18:26:57 +05:00
Andrej730
9a77222017
Option to add IfcEllipse as representation item
...
Example - https://i.imgur.com/PADKlAq.png
2024-11-06 18:06:51 +05:00
Andrej730
19cbf6d140
ifcfm - move preset searching logic from ifcm to bonsai
...
So anyone using 'python -m ifcfm' will get more readable error for invalid presets.
2024-11-06 18:06:51 +05:00
Andrej730
9821c343ca
Keep bim.select_container available for IfcProjects too
...
As it's the quicker way to select it than searching it in outliner - https://i.imgur.com/p2NVcdR.png
Couldn't find a simpler a way to do it in UI and had to create bunch of columns. Tried to use splits but they end up readjusting the buttons.
2024-11-06 18:06:50 +05:00
Andrej730
a3845c2b5c
Reload decorator after item attributes are updated and it's representation is reloaded
2024-11-06 18:06:50 +05:00
Andrej730
5c33a66548
Hide assign class panel for representation items
2024-11-06 18:06:50 +05:00
Andrej730
ecdbcff1aa
ifcfm operators - add info message when it's finished
2024-11-06 17:51:04 +05:00
Andrej730
47853bc551
Prevent user from selecting unavailable tabs from dropdown if ifc project is not loaded
2024-11-06 17:51:04 +05:00
Andrej730
41fc0cf8c1
BIMTabProperties fixes
...
1) Fixed non-existent tool.Blender.get_screen
2) ui.py - remove try/except for the case when tabs are not loaded yet as it's covered by BIMTabProperties
3) removed previous_tab, alt_tab props never used in ui
4) general method for getting area properties that includes BIMTabProperties automatically
2024-11-06 17:51:04 +05:00
Andrej730
e3de9c3ea4
bim.set_tab / bim.switch_tab not to create undo steps
...
To avoid unnecessary steps in undo history like on the screenshot - https://i.imgur.com/vEpsYa5.png
2024-11-06 17:51:04 +05:00
Andrej730
c594bc2c1a
bim.execute_ifcfm_federate - small fixes
2024-11-06 17:51:03 +05:00
Andrej730
681b89d95c
Bonsai - improve error message if ifc file fails to open #5694
2024-11-06 17:51:03 +05:00
Andrej730
4fdb313449
typing
2024-11-06 17:50:47 +05:00
Andrej730
4e070545ae
black .
2024-11-06 16:04:03 +05:00
Andrej730
262fca95e3
Bump IOS build #5661
2024-11-06 10:52:43 +05:00
Bruno Perdigão
6729739ee8
Fix a bug where the product decorator displays the incorrect position when type origin is not at world origin.
2024-11-04 10:48:11 -03:00
Bruno Perdigão
4a8710efd8
Fix product decorator to be uninstalled after mouse right click.
2024-11-04 10:27:49 -03:00
Ryan Schultz
f2c96b65e0
If perspective, don't add scale to the view title
2024-11-03 09:29:11 -06:00
Andrej730
caeabe2cd5
Optimize enums by moving them to data.py
2024-11-01 16:13:16 +05:00
Andrej730
9c0256165e
Use static enum items instead of dynamic
2024-11-01 16:13:16 +05:00
Andrej730
1acf8f1ed8
deprecate some prop.purge
2024-11-01 16:13:16 +05:00
Andrej730
0944f8a7cb
Fix unsafe enum items #5673
2024-11-01 16:13:15 +05:00
Andrej730
3debf62ca6
Mark unsafe enums #5673
2024-11-01 16:13:15 +05:00
Andrej730
f3019e4d7a
Store enum items strings references to be safe #5673
2024-11-01 16:13:15 +05:00
Andrej730
33b7c0a76f
small optimizations for enum props
2024-11-01 16:13:15 +05:00
Andrej730
ae18590893
typing
2024-11-01 16:13:15 +05:00
Dawid Huczyński
7517414552
add favicon to ifcopenshell-python and bonsaibim docs
2024-11-01 15:19:08 +05:00
Bruno Perdigão
4c08eaf953
Add a proposal to #3692
2024-10-31 17:43:30 -03:00
Bruno Perdigão
05b32b3c32
Fix #4298
2024-10-31 15:38:57 -03:00
Andrej730
08e38c65f5
Display Ifc length attributes as Blender length properties
...
Basically now all length ifc attributes should be displayed in UI as Blender length properties - they display the units and allow math, typing different units, etc.
Example - https://imgchest.com/p/dl7p93gz64o
2024-10-31 18:40:14 +05:00
Andrej730
3e44f0f37b
Quick way to select profile in profiles UI
...
Example - https://imgchest.com/p/9rydakllwyk
2024-10-31 18:40:14 +05:00
Andrej730
bd7ca78a37
bonsai - print number of voids for elements that hit void_limit
2024-10-31 18:40:13 +05:00
Andrej730
c53885f642
bonsai ifcclash - add separate property for export path
...
Example - https://i.imgur.com/bCRHx9q.png
Needed so it will be easier to rerun ifc clash without providing the same filepath each time.
2024-10-31 18:40:13 +05:00
Andrej730
904eb9fae8
Fix undo bugs with edited_objs
...
Now it's stored as a collection property in the project properties, so in the most cases we delegate to Blender to ensure it's handled properly on undo and redo.
2024-10-31 18:40:13 +05:00
Andrej730
09df81ab15
typing
2024-10-31 18:40:13 +05:00
Andrej730
06a6c2d79b
Option to apply openings to the geometry #5666
...
Button location - https://i.imgur.com/6zSv8vV.png
Now it's possible to "bake" openings to the geometry, The openings representation will be marked as "Reference".
2024-10-31 17:00:43 +05:00
Andrej730
b39f96e2ee
Fix bug duplicating edited object
...
It was losing original object representation on project save as it wasn't marked as edited.
2024-10-31 15:50:21 +05:00
Andrej730
64b3101cef
Skip applying scale to geometry on duplicate #5663
2024-10-31 15:50:21 +05:00
Andrej730
037b5d1bc1
Spatial container drop down to show only spatial objects
...
Example - https://i.imgur.com/v8p4D57.png (it's ignoring walls).
Since we now filter valid elements in poll_container_obj, then there is no need to check it twice in update_container_obj.
2024-10-30 18:45:50 +05:00
Andrej730
e463407de7
void_limit - document
2024-10-30 18:07:34 +05:00
Andrej730
28f81496dd
Small refactor for sync_edited_objects
...
1) remove materials if-branch as they're never edited
2) validate object explicitly
2024-10-30 18:07:34 +05:00
Andrej730
ccb223be94
Remove unnecessary ifc.finish_edits
...
Unused since we do not use fc.edit anymore for parametric geometry
2024-10-30 18:07:34 +05:00