Title: StackTrace at wall creation · Issue #8597 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: StackTrace at wall creation · Issue #8597 · IfcOpenShell/IfcOpenShell
X Title: StackTrace at wall creation · Issue #8597 · IfcOpenShell/IfcOpenShell
Description: Bug Description Got this bug with BonsaiBIM 0.8.5 and 0.8.6-alpha260713 on Ubuntu 24.0 LTS and Blender 5.1.2. Steps: Create Project Click on X on gizmo coordinate to have Z/Y plan Click on "Wall tool" and "Quick Create IfcWallType" Then ...
Open Graph Description: Bug Description Got this bug with BonsaiBIM 0.8.5 and 0.8.6-alpha260713 on Ubuntu 24.0 LTS and Blender 5.1.2. Steps: Create Project Click on X on gizmo coordinate to have Z/Y plan Click on "Wall to...
X Description: Bug Description Got this bug with BonsaiBIM 0.8.5 and 0.8.6-alpha260713 on Ubuntu 24.0 LTS and Blender 5.1.2. Steps: Create Project Click on X on gizmo coordinate to have Z/Y plan Click on "Wa...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/8597
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"StackTrace at wall creation","articleBody":"### Bug Description\n\nGot this bug with BonsaiBIM 0.8.5 and 0.8.6-alpha260713 on Ubuntu 24.0 LTS and Blender 5.1.2.\n\nSteps:\n1. Create Project \n2. Click on X on gizmo coordinate to have Z/Y plan\n3. Click on \"Wall tool\" and \"Quick Create IfcWallType\"\n4. Then \"Add\", when moving mouse cursor to viewport, I got a popup with following stacktrace with BonsaiBIM 0.8.5:\n\n```\nos: Linux\nos_version: #35~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 19:30:42 UTC 2\npython_version: 3.13.9\narchitecture: ('64bit', 'ELF')\nmachine: x86_64\nprocessor: x86_64\nblender_version: 5.1.2\nbonsai_version: 0.8.5\nbonsai_commit_hash: None\nbonsai_commit_date: None\nbonsai_git_branch: None\nlast_actions: \n# ifcopenshell.api: owner.update_owner_history\n>>> {\"element\": {\"cast_type\": \"entity_instance\", \"value\": 39, \"Name\": \"My Storey\"}}\n# operator: BIM_OT_add_default_type\n# operator: BIM_OT_add_element\n# ifcopenshell.api: root.create_entity\n>>> {\"ifc_class\": \"IfcWallType\", \"predefined_type\": \"SOLIDWALL\", \"name\": \"Unnamed\"}\n# ifcopenshell.api: owner.create_owner_history\n>>> {}\n# ifcopenshell.api: material.add_material\n>>> {\"name\": \"Unknown\"}\n# ifcopenshell.api: material.assign_material\n>>> {\"products\": [{\"cast_type\": \"entity_instance\", \"value\": 63, \"Name\": \"Unnamed\"}], \"type\": \"IfcMaterialLayerSet\"}\n# ifcopenshell.api: owner.create_owner_history\n>>> {}\n# ifcopenshell.api: material.add_layer\n>>> {\"layer_set\": {\"cast_type\": \"entity_instance\", \"value\": 65, \"Name\": null}, \"material\": {\"cast_type\": \"entity_instance\", \"value\": 64, \"Name\": \"Unknown\"}}\n# ifcopenshell.api: pset.add_pset\n>>> {\"product\": {\"cast_type\": \"entity_instance\", \"value\": 63, \"Name\": \"Unnamed\"}, \"name\": \"EPset_Parametric\"}\n# ifcopenshell.api: owner.create_owner_history\n>>> {}\n# ifcopenshell.api: pset.assign_pset\n>>> {}\n# ifcopenshell.api: pset.edit_pset\n>>> {\"pset\": {\"cast_type\": \"entity_instance\", \"value\": 68, \"Name\": \"EPset_Parametric\"}, \"properties\": \"{'LayerSetDirection': 'AXIS2'}\"}\n# ifcopenshell.api: geometry.edit_object_placement\n>>> {\"product\": {\"cast_type\": \"entity_instance\", \"value\": 63, \"Name\": \"Unnamed\"}, \"matrix\": {\"cast_type\": \"ndarray\", \"value\": [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]}}\n# operator: BIM_OT_hotkey\n# operator: BIM_OT_draw_polyline_wall\n# operator: BIM_OT_draw_polyline_wall\n# operator: BIM_OT_draw_polyline_wall\n# operator: BIM_OT_draw_polyline_wall\n# operator: BIM_OT_draw_polyline_wall\nlast_error: Traceback (most recent call last):\n File \"/home/esteban-dugueperoux/.config/blender/5.1/extensions/.local/lib/python3.13/site-packages/bonsai/bim/ifc.py\", line 527, in execute_ifc_operator\n result = getattr(operator, \"_modal\")(context, event)\n File \"/home/esteban-dugueperoux/.config/blender/5.1/extensions/.local/lib/python3.13/site-packages/bonsai/bim/module/model/wall.py\", line 694, in _modal\n self.handle_mouse_move(context, event, should_round=True)\n ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/esteban-dugueperoux/.config/blender/5.1/extensions/.local/lib/python3.13/site-packages/bonsai/bim/module/model/polyline.py\", line 417, in handle_mouse_move\n tool.Polyline.calculate_distance_and_angle(\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^\n context, self.input_ui, self.tool_state, should_round=should_round\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n )\n ^\n File \"/home/esteban-dugueperoux/.config/blender/5.1/extensions/.local/lib/python3.13/site-packages/bonsai/tool/polyline.py\", line 193, in calculate_distance_and_angle\n angle = angle_snap * round(angle / angle_snap) if distance \u003c angle_round_threshold else angle\n ^^^^^^^^^^^^^^^^^^^^^\nUnboundLocalError: cannot access local variable 'angle_round_threshold' where it is not associated with a value\n\nblend_file_path: Not saved\nblend_file_dirty: N/A\nifc_file_path: No IFC loaded\nifc_is_dirty: N/A\nifc: Unsaved\nschema: IFC4\npreprocessor_version: IfcOpenShell 0.8.5\noriginating_system: IfcOpenShell 0.8.5\n```\n\nWith 0.8.6-alpha260713 I got:\n\n```\n03:52.129 bpy.rna | ERROR Python script error in BIM_OT_draw_polyline_wall.modal\n03:52.129 operator | ERROR Python: Traceback (most recent call last):\n | File \"/home/esteban-dugueperoux/.config/blender/5.1/extensions/.local/lib/python3.13/site-packages/bonsai/bim/module/model/wall.py\", line 1068, in modal\n | return IfcStore.execute_ifc_operator(self, context, event, method=\"MODAL\")\n | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n | File \"/home/esteban-dugueperoux/.config/blender/5.1/extensions/.local/lib/python3.13/site-packages/bonsai/bim/ifc.py\", line 566, in execute_ifc_operator\n | result = getattr(operator, \"_modal\")(context, event)\n | File \"/home/esteban-dugueperoux/.config/blender/5.1/extensions/.local/lib/python3.13/site-packages/bonsai/bim/module/model/wall.py\", line 1110, in _modal\n | self.handle_mouse_move(context, event, should_round=True)\n | ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n | File \"/home/esteban-dugueperoux/.config/blender/5.1/extensions/.local/lib/python3.13/site-packages/bonsai/bim/module/model/polyline.py\", line 418, in handle_mouse_move\n | tool.Polyline.calculate_distance_and_angle(\n | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^\n | context, self.input_ui, self.tool_state, should_round=should_round\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n | )\n | ^\n | File \"/home/esteban-dugueperoux/.config/blender/5.1/extensions/.local/lib/python3.13/site-packages/bonsai/tool/polyline.py\", line 193, in calculate_distance_and_angle\n | angle = angle_snap * round(angle / angle_snap) if distance \u003c angle_round_threshold else angle\n | ^^^^^^^^^^^^^^^^^^^^^\n | UnboundLocalError: cannot access local variable 'angle_round_threshold' where it is not associated with a value\n```\n\nI don't have this stacktrace using others coordinates plans.\n\n### Attachments\n\n_No response_\n\n### Debug and Error Output\n\n```true\n\n```","author":{"url":"https://github.com/EstebanDugueperoux2","@type":"Person","name":"EstebanDugueperoux2"},"datePublished":"2026-07-13T17:58:45Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/8597"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:45e2d3ac-312a-f0af-db6a-e7a7ef07a6a6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C2BA:38D535:2902C:37559:6B04C0D9 |
| html-safe-nonce | dd629145890b88efed1b80c8f58a0f2bef6b68f8b3e2ab370203052ca14ddc74 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMkJBOjM4RDUzNToyOTAyQzozNzU1OTo2QjA0QzBEOSIsInZpc2l0b3JfaWQiOiIzMzI3ODUzOTgxMTUzNDExMjg5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 33a586fef31305999551395c7b6e9517fdc28c385fe5678ca4bbb2fa0a538acf |
| hovercard-subject-tag | issue:4876276879 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/8597/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b99ebc0453cb7d3e6bc74a8df4b98465cfe8a45ec8a12be8fddfb69a08817bbd/IfcOpenShell/IfcOpenShell/issues/8597 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b99ebc0453cb7d3e6bc74a8df4b98465cfe8a45ec8a12be8fddfb69a08817bbd/IfcOpenShell/IfcOpenShell/issues/8597 |
| og:image:alt | Bug Description Got this bug with BonsaiBIM 0.8.5 and 0.8.6-alpha260713 on Ubuntu 24.0 LTS and Blender 5.1.2. Steps: Create Project Click on X on gizmo coordinate to have Z/Y plan Click on "Wall to... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | EstebanDugueperoux2 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85dd75377eb77313206b8fc108bcee6a3a029286d94bf32bf9b4426e4d92e0c4 |
| turbo-cache-control | no-preview |
| go-import | github.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git |
| octolytics-dimension-user_id | 13692563 |
| octolytics-dimension-user_login | IfcOpenShell |
| octolytics-dimension-repository_id | 40473201 |
| octolytics-dimension-repository_nwo | IfcOpenShell/IfcOpenShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 40473201 |
| octolytics-dimension-repository_network_root_nwo | IfcOpenShell/IfcOpenShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0d64fa748a2bab9a5b587a967ac4da1cfa8da6dd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width