Commit Graph

8625 Commits

Author SHA1 Message Date
Andrej730 37bcbd077d 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.
2024-04-16 10:05:48 +02:00
Dion Moult 8a64675e2c See #3421. Fix drawing bug where IfcOpenShell might return unclosed paths even though the shape is closed and therefore break cut polygon fills. 2024-04-16 10:05:47 +02:00
Dion Moult efd3ef1a89 See #3421. Fix bug where some projection fills wouldn't polygonize correctly in shapely due to numerical tolerance. 2024-04-16 10:05:47 +02:00
Dion Moult a1faf4fe08 Fix #3442. Update sheet list if drawing name changes. 2024-04-16 10:05:47 +02:00
Dion Moult 551db039d0 Move object data out of object tab and into new object dropdown. 2024-04-16 10:05:47 +02:00
Dion Moult 8553c79dea You can now open projects from the Ctrl-N shortcut. 2024-04-16 10:05:47 +02:00
Gorgious56 8339d04326 Improve slightly the boolean interface in mesh properties editor 2024-04-16 10:05:47 +02:00
Dion Moult 60b06bbc44 Fix #3414. The project wizard now doesn't load a fresh session by default. Note that File > Open still enforces a fresh session. 2024-04-16 10:05:47 +02:00
Andrej730 36e476b744 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'
2024-04-16 10:05:47 +02:00
Dion Moult 57cb163c8f Fix #3393. Bug where duplicating a typed text didn't also copy its literal. 2024-04-16 10:05:47 +02:00
Andrej730 fa5e785849 Delete edit text from BIM Tool since it's already in Annotation Tool 2024-04-16 10:05:47 +02:00
Andrej730 1d56538152 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
2024-04-16 10:05:47 +02:00
Gorgious56 5e709d5e64 Enable drawing generation buttons only when an actual drawing is selected 2024-04-16 10:05:47 +02:00
Andrej730 3cc3bace3a 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.
2024-04-16 10:05:47 +02:00
Andrej730 056f76c7c0 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
2024-04-16 10:05:47 +02:00
Andrej730 d9b124715a Fixed console errors on checking modeling data 2024-04-16 10:05:47 +02:00
Dion Moult a00e47f822 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.
2024-04-16 10:05:47 +02:00
Andrej730 17420ca779 model data parameters renamed to pset_data for consitency 2024-04-16 10:05:47 +02:00
Andrej730 ee308ed0b8 DoorData use refactor 2024-04-16 10:05:47 +02:00
Andrej730 577aacb746 WindowData use refactor 2024-04-16 10:05:47 +02:00
Andrej730 8217fcdf47 change .is_editing type for ifc modifiers to boolean 2024-04-16 10:05:47 +02:00
Andrej730 403c5caf0c RoofData use refactor 2024-04-16 10:05:47 +02:00
Dion Moult a386a14a6f Group drawings by target view in the drawing list 2024-04-16 10:05:47 +02:00
Bruno Perdigão 6b98626210 Select all objects in array modifier #3331 2024-04-16 10:05:47 +02:00
Dion Moult 0602711104 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. 2024-04-16 10:05:47 +02:00
Dion Moult bee4e77d63 Fix #3432. Bug where null applicable occurrence of a type product caused the annotation tool to fail. 2024-04-16 10:05:47 +02:00
Andrej730 e92217a362 makefile fix 2024-04-16 10:05:47 +02:00
Andrej730 0a546d847c minor change for RailingData 2024-04-16 10:05:47 +02:00
Andrej730 984b33cd77 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
2024-04-16 10:05:47 +02:00
Andrej730 6505758171 RailingData use refactor, solves #3416 2024-04-16 10:05:47 +02:00
smr02 f0263b0e6c ifcsverchok delete api_WIP 2024-04-16 10:05:47 +02:00
Andrej730 928ccf1b9f 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
2024-04-16 10:05:47 +02:00
Gorgious56 55821117d5 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
2024-04-16 10:05:47 +02:00
Dion Moult 5a0192c5c4 Fix #3420. Fix missing sheet references on drawings and incorrect direction of section references. 2024-04-16 10:05:47 +02:00
Andrej730 3abd3b1b0d more consistency in values for plan-, section level and diameter 2024-04-16 10:05:47 +02:00
Andrej730 1ae6a0eb5a radius annotation - support for prefix/suffix/fill-bg
and more consistency between viewport and svg
2024-04-16 10:05:46 +02:00
Andrej730 97b3bf5511 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.
2024-04-16 10:05:46 +02:00
Andrej730 710dce845e fill-bg for diameter, plan- and section-level annotations 2024-04-16 10:05:46 +02:00
Dion Moult e75afc9ffb 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. 2024-04-16 10:05:46 +02:00
Dion Moult dc9b11832b Fix #3425. Fix invalid IFC data where grid axes should be 2D not 3D. 2024-04-16 10:05:46 +02:00
Thomas Krijnen c2aa09b374 Update entity_instance.py 2024-04-16 10:05:46 +02:00
Thomas Krijnen ffa9015798 Lingering changes after conflict resolution 2024-04-16 10:05:40 +02:00
Andrej730 8e4b93fb03 Prevent resetting selected tab on blender restart
Not sure if there is any caveats to that
2024-04-16 10:05:08 +02:00
Dion Moult a5af1ad79b 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
2024-04-16 10:05:08 +02:00
Andrej730 a43863cad3 PLAN_LEVEL annotations support for prefix, suffix #3399
Viewport - https://i.imgur.com/XRa3oJO.png
SVG - https://i.imgur.com/C8PjoiO.png
2024-04-16 10:05:08 +02:00
Dion Moult 2d19b82a63 Fix #3414. Only clear default scene, not custom scene when loading / creating IFCs. 2024-04-16 10:05:08 +02:00
Andrej730 3d96187a91 SECTION_LEVEL annotations support for prefix, suffix #3399
also added support for "show only description" for section_level
2024-04-16 10:05:08 +02:00
Andrej730 e5c5c18d8d Fixed #3400 introduced in dda16c8 2024-04-16 10:05:08 +02:00
Dion Moult ef0ccfd48f Resolve merge conflict 2024-04-16 10:05:08 +02:00
Dion Moult cdf617e95b 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.
2024-04-16 10:05:08 +02:00