Title: BlenderBIM: error ifc export after manual mesh merge · Issue #2851 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: BlenderBIM: error ifc export after manual mesh merge · Issue #2851 · IfcOpenShell/IfcOpenShell
X Title: BlenderBIM: error ifc export after manual mesh merge · Issue #2851 · IfcOpenShell/IfcOpenShell
Description: In a model with elements very similar to shown in #2847 I followed that recipe and merged, set to tessellated some triangular IfcSlab SweptSolid subelements from one Slab: def join_tesselated(): selected_elems = C.selected_objects if len...
Open Graph Description: In a model with elements very similar to shown in #2847 I followed that recipe and merged, set to tessellated some triangular IfcSlab SweptSolid subelements from one Slab: def join_tesselated(): se...
X Description: In a model with elements very similar to shown in #2847 I followed that recipe and merged, set to tessellated some triangular IfcSlab SweptSolid subelements from one Slab: def join_tesselated(): se...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/2851
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"BlenderBIM: error ifc export after manual mesh merge","articleBody":"In a model with elements very similar to shown in https://github.com/IfcOpenShell/IfcOpenShell/issues/2847 \r\nI followed that recipe and merged, set to tessellated \r\nsome triangular IfcSlab SweptSolid subelements \r\nfrom one Slab: \r\n\r\n\r\n```python\r\ndef join_tesselated():\r\n\tselected_elems = C.selected_objects\r\n\tif len(selected_elems) > 0:\r\n\t\tbpy.ops.object.join()\r\n\tselected_elems = C.selected_objects\r\n\tif len(selected_elems) == 1:\r\n\t\telem = C.selected_objects[0]\r\n\t\tbpy.ops.bim.update_representation(\r\n\t\t\tobj=elem.name,\r\n\t\t\tifc_representation_class=\"IfcTesselatedFaceSet\",\r\n\t\t)\r\n\telse:\r\n\t\tprint(\"selection does not meet criteria\")\r\n\t\t\r\njoin_tesselated()\r\n```\r\n\r\nthen removed it from the aggregates and \r\ndeleted the empty container and empty node. \r\n\r\nFor a few this worked fine, and I could re-export afterwards, \r\nbut for most elements I get this error when trying to export:\r\n\r\n```\r\nPython: Traceback (most recent call last):\r\n File \"C:\\Users\\user.name\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\bim\\module\\project\\operator.py\", line 829, in invoke\r\n return self.execute(context)\r\n File \"C:\\Users\\user.name\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\bim\\module\\project\\operator.py\", line 842, in execute\r\n IfcStore.execute_ifc_operator(self, context)\r\n File \"C:\\Users\\user.name\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\bim\\ifc.py\", line 427, in execute_ifc_operator\r\n result = getattr(operator, \"_execute\")(context)\r\n File \"C:\\Users\\user.name\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\bim\\module\\project\\operator.py\", line 873, in _execute\r\n ifc_exporter.export()\r\n File \"C:\\Users\\user.name\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\bim\\export_ifc.py\", line 49, in export\r\n self.sync_all_objects()\r\n File \"C:\\Users\\user.name\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\bim\\export_ifc.py\", line 115, in sync_all_objects\r\n result = self.sync_object_material(obj)\r\n File \"C:\\Users\\user.name\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\bim\\export_ifc.py\", line 146, in sync_object_material\r\n bpy.ops.bim.update_representation(obj=obj.name)\r\n File \"C:\\ProgramData\\portable\\blender-3.4.1\\3.4\\scripts\\modules\\bpy\\ops.py\", line 113, in __call__\r\n ret = _op_call(self.idname_py(), None, kw)\r\nRuntimeError: Error: Python: Traceback (most recent call last):\r\n File \"C:\\Users\\user.name\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\bim\\module\\geometry\\operator.py\", line 41, in execute\r\n IfcStore.execute_ifc_operator(self, context)\r\n File \"C:\\Users\\user.name\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\bim\\ifc.py\", line 427, in execute_ifc_operator\r\n result = getattr(operator, \"_execute\")(context)\r\n File \"C:\\Users\\user.name\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\bim\\module\\geometry\\operator.py\", line 178, in _execute\r\n self.update_obj_mesh_representation(context, obj)\r\n File \"C:\\Users\\user.name\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\bim\\module\\geometry\\operator.py\", line 238, in update_obj_mesh_representation\r\n new_representation = ifcopenshell.api.run(\"geometry.add_representation\", self.file, **representation_data)\r\n File \"C:\\Users\\user.name\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\libs\\site\\packages\\ifcopenshell\\api\\__init__.py\", line 66, in run\r\n result = usecase_class(ifc_file, **settings).execute()\r\n File \"C:\\Users\\user.name\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\libs\\site\\packages\\ifcopenshell\\api\\geometry\\add_representation.py\", line 69, in execute\r\n return self.create_model_representation()\r\n File \"C:\\Users\\user.name\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\libs\\site\\packages\\ifcopenshell\\api\\geometry\\add_representation.py\", line 122, in create_model_representation\r\n return self.create_variable_representation()\r\n File \"C:\\Users\\user.name\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\libs\\site\\packages\\ifcopenshell\\api\\geometry\\add_representation.py\", line 237, in create_variable_representation\r\n return self.create_arbitrary_void_extrusion_representation()\r\n File \"C:\\Users\\user.name\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\libs\\site\\packages\\ifcopenshell\\api\\geometry\\add_representation.py\", line 510, in create_arbitrary_void_extrusion_representation\r\n return self.create_arbitrary_extrusion_representation()\r\n File \"C:\\Users\\user.name\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\libs\\site\\packages\\ifcopenshell\\api\\geometry\\add_representation.py\", line 498, in create_arbitrary_extrusion_representation\r\n item = helper.create_extruded_area_solid(self.settings[\"geometry\"], indices[\"extrusion\"], profile_def)\r\n File \"C:\\Users\\user.name\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\bim\\module\\geometry\\helper.py\", line 495, in create_extruded_area_solid\r\n direction = self.get_extrusion_direction(mesh, extrusion_indices, profile_def[\"curve_ucs\"])\r\n File \"C:\\Users\\user.name\\AppData\\Roaming\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\bim\\module\\geometry\\helper.py\", line 637, in get_extrusion_direction\r\n curve_ucs[\"center\"] + (mesh.vertices[extrusion_indices[1]].co - mesh.vertices[extrusion_indices[0]].co)\r\nTypeError: 'NoneType' object is not subscriptable\r\nLocation: C:\\ProgramData\\portable\\blender-3.4.1\\3.4\\scripts\\modules\\bpy\\ops.py:113\r\n```\r\n\r\nWhich seems strange to me. \r\nAmong other things it complains about \"create_extruded_area_solid\", \r\nbut I thought I just turned the combined mesh into a IfcTesselatedFaceSet. (?)\r\nMaybe @Moult any ideas?\r\n","author":{"url":"https://github.com/ay-ex","@type":"Person","name":"ay-ex"},"datePublished":"2023-03-10T15:17:50Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/2851"}
| 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:058cf372-2d54-7b4a-1928-67e1f06796e8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C56E:24386F:F8372:154DC7:6B04B122 |
| html-safe-nonce | 04ad5c12fee6fad258ae87511bd95bd21bf65bd7e3314a8ad9fd636aa248ab17 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTZFOjI0Mzg2RjpGODM3MjoxNTREQzc6NkIwNEIxMjIiLCJ2aXNpdG9yX2lkIjoiMjAyNjI5NjExMzgzNzE1ODY5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8e674628665359b31a998c063eb71e649e70ce765d4a0d55dc04d2b748961b9f |
| hovercard-subject-tag | issue:1619148272 |
| 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/2851/issue_layout |
| twitter:image | https://opengraph.githubassets.com/11bae97a60a9d8e72583806293083dd4b668de5a574bf57cc867b7801dd779b7/IfcOpenShell/IfcOpenShell/issues/2851 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/11bae97a60a9d8e72583806293083dd4b668de5a574bf57cc867b7801dd779b7/IfcOpenShell/IfcOpenShell/issues/2851 |
| og:image:alt | In a model with elements very similar to shown in #2847 I followed that recipe and merged, set to tessellated some triangular IfcSlab SweptSolid subelements from one Slab: def join_tesselated(): se... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ay-ex |
| hostname | github.com |
| expected-hostname | github.com |
| None | f1d110ea058a0915c1d8aa3fc2069fa15801e128f591e5762525abe77490ecb1 |
| 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 | ffa22a65e4c46d376940fe34b05e6a7e9c7fdb9b |
| 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