Title: [bug?] Door rotation and alignment issue causes 3D representation to disappear · Issue #4949 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: [bug?] Door rotation and alignment issue causes 3D representation to disappear · Issue #4949 · IfcOpenShell/IfcOpenShell
X Title: [bug?] Door rotation and alignment issue causes 3D representation to disappear · Issue #4949 · IfcOpenShell/IfcOpenShell
Description: When attempting to change the direction of a door's opening, I rotated the door 180 degrees. I also tried to align the door to the exterior of the wall. Following these actions, the 3D representation of the door disappeared. Interestingl...
Open Graph Description: When attempting to change the direction of a door's opening, I rotated the door 180 degrees. I also tried to align the door to the exterior of the wall. Following these actions, the 3D representati...
X Description: When attempting to change the direction of a door's opening, I rotated the door 180 degrees. I also tried to align the door to the exterior of the wall. Following these actions, the 3D represen...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/4949
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[bug?] Door rotation and alignment issue causes 3D representation to disappear","articleBody":"When attempting to change the direction of a door's opening, I rotated the door 180 degrees. I also tried to align the door to the exterior of the wall. Following these actions, the 3D representation of the door disappeared. Interestingly, this issue also affected other instances of the same door type.\r\n\r\n**Steps to Reproduce:**\r\n1. Change the direction of the door's opening by rotating it 180 degrees.\r\n2. Align the door to the exterior of the wall.\r\n3. Observe that the 3D representation of the door disappears.\r\n4. Note that other instances of the same door type are also affected.\r\n\r\n**Expected Behavior:**\r\nThe door should rotate 180 degrees and align with the exterior of the wall without losing its 3D representation.\r\n\r\n**Actual Behavior:**\r\nThe 3D representation of the door disappears after rotation and alignment, and this issue also affects other instances of the same door type.\r\n\r\n\r\n**Stack Trace:**\r\nWhen trying to force displaying the SweptSolid representation, the following error is raised:\r\n\r\n```\r\nos: Linux\r\nos_version: #117-Ubuntu SMP PREEMPT Tue Apr 30 10:12:40 UTC 2024\r\npython_version: 3.11.7\r\narchitecture: ('64bit', 'ELF')\r\nmachine: x86_64\r\nprocessor: x86_64\r\nblender_version: 4.1.1\r\nblenderbim_version: 0.0.240602\r\nlast_actions: \r\n# ifcopenshell.api: geometry.add_wall_representation\r\n>>> {\"context\": {\"cast_type\": \"entity_instance\", \"value\": 15, \"Name\": null}, \"length\": \"0.9500000489385608\", \"height\": \"-0.025000000372528936\", \"x_angle\": \"3.1415927410125732\", \"offset\": \"0.0\", \"thickness\": \"0.0\", \"clippings\": \"[]\", \"booleans\": \"[]\"}\r\n# ifcopenshell.api: geometry.unassign_representation\r\n>>> {\"product\": {\"cast_type\": \"entity_instance\", \"value\": 113, \"Name\": \"DoorType\"}, \"representation\": {\"cast_type\": \"entity_instance\", \"value\": 196, \"Name\": null}}\r\n# ifcopenshell.api: geometry.remove_representation\r\n>>> {\"representation\": {\"cast_type\": \"entity_instance\", \"value\": 196, \"Name\": null}}\r\n# ifcopenshell.api: geometry.edit_object_placement\r\n>>> {\"product\": {\"cast_type\": \"entity_instance\", \"value\": 221, \"Name\": \"Door\"}, \"matrix\": {\"cast_type\": \"ndarray\", \"value\": [[1.0, 2.384185791015625e-07, 0.0, 1.3650543689727783], [-2.384185791015625e-07, 1.0, 0.0, 0.09250015020370483], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]}}\r\n# ifcopenshell.api: owner.update_owner_history\r\n>>> {\"element\": {\"cast_type\": \"entity_instance\", \"value\": 221, \"Name\": \"Door\"}}\r\n# operator: BIM_OT_switch_representation\r\n# operator: BIM_OT_update_representation\r\n# ifcopenshell.api: geometry.edit_object_placement\r\n>>> {\"product\": {\"cast_type\": \"entity_instance\", \"value\": 221, \"Name\": \"Door\"}, \"matrix\": {\"cast_type\": \"ndarray\", \"value\": [[1.0, 2.384185791015625e-07, 0.0, 1.3650543689727783], [-2.384185791015625e-07, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]}}\r\n# ifcopenshell.api: owner.update_owner_history\r\n>>> {\"element\": {\"cast_type\": \"entity_instance\", \"value\": 221, \"Name\": \"Door\"}}\r\n# ifcopenshell.api: geometry.add_representation\r\n>>> {\"context\": {\"cast_type\": \"entity_instance\", \"value\": 15, \"Name\": null}, \"blender_object\": \"\u003cbpy_struct, Object(\\\"IfcDoor/Door\\\") at 0x7f0ec6ab0108>\", \"geometry\": \"\u003cbpy_struct, Mesh(\\\"15/441\\\") at 0x7f0ebad07308>\", \"coordinate_offset\": \"None\", \"total_items\": \"1\", \"should_force_faceted_brep\": \"False\", \"should_force_triangulation\": \"False\", \"should_generate_uvs\": \"False\", \"ifc_representation_class\": \"IfcExtrudedAreaSolid/IfcArbitraryProfileDefWithVoids\", \"profile_set_usage\": \"None\", \"text_literal\": \"None\"}\r\nlast_error: Traceback (most recent call last):\r\n File \"/home/john/.config/blender/4.1/scripts/addons/blenderbim/bim/ifc.py\", line 360, in execute_ifc_operator\r\n result = getattr(operator, \"_execute\")(context)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/john/.config/blender/4.1/scripts/addons/blenderbim/bim/module/geometry/operator.py\", line 269, in _execute\r\n core.switch_representation(\r\n File \"/home/john/.config/blender/4.1/scripts/addons/blenderbim/core/geometry.py\", line 120, in switch_representation\r\n geometry.run_geometry_update_representation(obj=obj)\r\n File \"/home/john/.config/blender/4.1/scripts/addons/blenderbim/tool/geometry.py\", line 691, in run_geometry_update_representation\r\n bpy.ops.bim.update_representation(obj=obj.name, ifc_representation_class=\"\")\r\n File \"/snap/blender/4786/4.1/scripts/modules/bpy/ops.py\", line 109, in __call__\r\n ret = _op_call(self.idname_py(), kw)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\nRuntimeError: Error: Python: Traceback (most recent call last):\r\n File \"/home/john/.config/blender/4.1/scripts/addons/blenderbim/bim/ifc.py\", line 360, in execute_ifc_operator\r\n result = getattr(operator, \"_execute\")(context)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/john/.config/blender/4.1/scripts/addons/blenderbim/bim/module/geometry/operator.py\", line 326, in _execute\r\n self.update_obj_mesh_representation(context, obj)\r\n File \"/home/john/.config/blender/4.1/scripts/addons/blenderbim/bim/module/geometry/operator.py\", line 406, in update_obj_mesh_representation\r\n new_representation = ifcopenshell.api.run(\"geometry.add_representation\", self.file, **representation_data)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/john/.config/blender/4.1/scripts/addons/blenderbim/libs/site/packages/ifcopenshell/api/__init__.py\", line 184, in run\r\n return usecase_function(ifc_file, should_run_listeners=should_run_listeners, **settings)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/john/.config/blender/4.1/scripts/addons/blenderbim/libs/site/packages/ifcopenshell/api/__init__.py\", line 350, in wrapper\r\n raise e\r\n File \"/home/john/.config/blender/4.1/scripts/addons/blenderbim/libs/site/packages/ifcopenshell/api/__init__.py\", line 344, in wrapper\r\n result = usecase(*args, **settings)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/john/.config/blender/4.1/scripts/addons/blenderbim/libs/site/packages/ifcopenshell/api/geometry/add_representation.py\", line 97, in add_representation\r\n return usecase.execute()\r\n ^^^^^^^^^^^^^^^^^\r\n File \"/home/john/.config/blender/4.1/scripts/addons/blenderbim/libs/site/packages/ifcopenshell/api/geometry/add_representation.py\", line 114, in execute\r\n return self.create_model_representation()\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/john/.config/blender/4.1/scripts/addons/blenderbim/libs/site/packages/ifcopenshell/api/geometry/add_representation.py\", line 183, in create_model_representation\r\n return self.create_variable_representation()\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/john/.config/blender/4.1/scripts/addons/blenderbim/libs/site/packages/ifcopenshell/api/geometry/add_representation.py\", line 301, in create_variable_representation\r\n return self.create_arbitrary_void_extrusion_representation()\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/john/.config/blender/4.1/scripts/addons/blenderbim/libs/site/packages/ifcopenshell/api/geometry/add_representation.py\", line 706, in create_arbitrary_void_extrusion_representation\r\n return self.create_arbitrary_extrusion_representation()\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/john/.config/blender/4.1/scripts/addons/blenderbim/libs/site/packages/ifcopenshell/api/geometry/add_representation.py\", line 694, in create_arbitrary_extrusion_representation\r\n item = helper.create_extruded_area_solid(self.settings[\"geometry\"], indices[\"extrusion\"], profile_def)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/john/.config/blender/4.1/scripts/addons/blenderbim/bim/module/geometry/helper.py\", line 507, in create_extruded_area_solid\r\n direction = self.get_extrusion_direction(mesh, extrusion_indices, profile_def[\"curve_ucs\"])\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/home/john/.config/blender/4.1/scripts/addons/blenderbim/bim/module/geometry/helper.py\", line 649, in get_extrusion_direction\r\n curve_ucs[\"center\"] + (mesh.vertices[extrusion_indices[1]].co - mesh.vertices[extrusion_indices[0]].co)\r\n ~~~~~~~~~~~~~~~~~^^^\r\nTypeError: 'NoneType' object is not subscriptable\r\nLocation: /snap/blender/4786/4.1/scripts/modules/bpy/ops.py:109\r\n\r\n\r\nifc: Unsaved\r\nschema: IFC4\r\npreprocessor_version: IfcOpenShell v0.7.0-c7830e9e5\r\noriginating_system: IfcOpenShell v0.7.0-c7830e9e5\r\n```\r\n\r\n**Attachments:**\r\n\r\nhttps://www.youtube.com/watch?v=5W0WjORxT1E\r\n\r\n","author":{"url":"https://github.com/Vanuan","@type":"Person","name":"Vanuan"},"datePublished":"2024-06-29T21:44:36Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/4949"}
| 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:95e09dd9-d955-6226-5a77-ecfe2c9f3690 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 917C:3DD456:3225CA:44C540:6B04B413 |
| html-safe-nonce | 331fcdf1685450b0b4d5d487b57f9fed373e095200c1c84e6cdc2a016b2ed993 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTdDOjNERDQ1NjozMjI1Q0E6NDRDNTQwOjZCMDRCNDEzIiwidmlzaXRvcl9pZCI6IjU1OTg3MTY0MzU5NTEzMDE2NTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9427419a539081a7b7782b76acac53878e2ce5ef7ec496dfd5457f5f19323b53 |
| hovercard-subject-tag | issue:2381980738 |
| 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/4949/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7339ddbb990e97f564acd7a5757070cb721d292d962be6158c84e0ea686a9c53/IfcOpenShell/IfcOpenShell/issues/4949 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7339ddbb990e97f564acd7a5757070cb721d292d962be6158c84e0ea686a9c53/IfcOpenShell/IfcOpenShell/issues/4949 |
| og:image:alt | When attempting to change the direction of a door's opening, I rotated the door 180 degrees. I also tried to align the door to the exterior of the wall. Following these actions, the 3D representati... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Vanuan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 378bd702ac792b3550e484ad39d9a898fcd25bb52ba6962b0c9cc457c1ea71c7 |
| 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 | b032e77f1ea437ede6c115446a0a467709b468e7 |
| 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