Title: Creating shapes fails with different order of representations · Issue #2744 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: Creating shapes fails with different order of representations · Issue #2744 · IfcOpenShell/IfcOpenShell
X Title: Creating shapes fails with different order of representations · Issue #2744 · IfcOpenShell/IfcOpenShell
Description: I was fixing #2742 by changing element representation context from Plan/Annotation/PLAN_VIEW to Plan/Body/PLAN_VIEW and noticed some error - when I defined Plan/Body/PLAN_VIEW first and Model/Body/MODEL_VIEW second, switching to MODEL_VI...
Open Graph Description: I was fixing #2742 by changing element representation context from Plan/Annotation/PLAN_VIEW to Plan/Body/PLAN_VIEW and noticed some error - when I defined Plan/Body/PLAN_VIEW first and Model/Body/...
X Description: I was fixing #2742 by changing element representation context from Plan/Annotation/PLAN_VIEW to Plan/Body/PLAN_VIEW and noticed some error - when I defined Plan/Body/PLAN_VIEW first and Model/Body/...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/2744
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Creating shapes fails with different order of representations","articleBody":"I was fixing #2742 by changing element representation context from `Plan/Annotation/PLAN_VIEW` to `Plan/Body/PLAN_VIEW` and noticed some error - when I defined `Plan/Body/PLAN_VIEW` first and `Model/Body/MODEL_VIEW` second, switching to `MODEL_VIEW` representation for this element results in error:\r\n\r\nTraceback:\r\n```python\r\nError: Python: Traceback (most recent call last):\r\n File \"%appdata%\\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 \"%appdata%\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\bim\\ifc.py\", line 425, in execute_ifc_operator\r\n result = getattr(operator, \"_execute\")(context)\r\n File \"%appdata%\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\bim\\module\\geometry\\operator.py\", line 131, in _execute\r\n core.switch_representation(\r\n File \"%appdata%\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\core\\geometry.py\", line 100, in switch_representation\r\n data = geometry.import_representation(obj, representation)\r\n File \"%appdata%\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\tool\\geometry.py\", line 182, in import_representation\r\n shape = ifcopenshell.geom.create_shape(settings, element)\r\n File \"%appdata%\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\libs\\site\\packages\\ifcopenshell\\geom\\main.py\", line 210, in create_shape\r\n ifcopenshell_wrapper.create_shape(settings, inst.wrapped_data, repr.wrapped_data if repr is not None else None),\r\n File \"%appdata%\\Blender Foundation\\Blender\\3.4\\scripts\\addons\\blenderbim\\libs\\site\\packages\\ifcopenshell\\ifcopenshell_wrapper.py\", line 2378, in create_shape\r\n return _ifcopenshell_wrapper.create_shape(settings, instance, representation)\r\nRuntimeError: Failed to process shape\r\n```\r\n\r\nBut if you define `Model/Body/MODEL_VIEW` first it works fine. Is it a bug?\r\n\r\n\r\nTo reproduce the problem you can use the `debug_door_bugged.ifc` I've attached and try to switch representation to `MODEL_VIEW` and see the error. \r\n\r\n\r\nIf I change just one line in .ifc from `#71=IFCPRODUCTDEFINITIONSHAPE($,$,(#70,#85,#149));` to `#71=IFCPRODUCTDEFINITIONSHAPE($,$,(#70,#149,#85));` (this edit is included in `debug_door _fixed.ifc`) it will work fine.\r\n\r\n\r\n[debug_door_bugged.ifc.txt](https://github.com/IfcOpenShell/IfcOpenShell/files/10674537/debug_door_bugged.ifc.txt)\r\n[debug_door _fixed.ifc.txt](https://github.com/IfcOpenShell/IfcOpenShell/files/10674538/debug_door._fixed.ifc.txt)\r\n\r\n\r\n","author":{"url":"https://github.com/Andrej730","@type":"Person","name":"Andrej730"},"datePublished":"2023-02-07T11:42:37Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/2744"}
| 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:9170cd4e-49ed-434f-06cd-645531e91ee1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A16C:18CB59:2B9267:3B9AF0:6B04B96D |
| html-safe-nonce | f98d569dc1792db396f60c7c1e095a91bf66b3a9fe91077c318980dda4cb6454 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMTZDOjE4Q0I1OToyQjkyNjc6M0I5QUYwOjZCMDRCOTZEIiwidmlzaXRvcl9pZCI6IjUzODY2OTYzNzUwOTEwMTkzMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ee1bb6da12ef4fe15be29de354a72df7264b32fee6a7cf3888a0892fd418ddf9 |
| hovercard-subject-tag | issue:1574177236 |
| 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/2744/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5a14ba55bf2f208f19a4847c404bb8720f13642ea17e2ad17d2872877f121e9b/IfcOpenShell/IfcOpenShell/issues/2744 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5a14ba55bf2f208f19a4847c404bb8720f13642ea17e2ad17d2872877f121e9b/IfcOpenShell/IfcOpenShell/issues/2744 |
| og:image:alt | I was fixing #2742 by changing element representation context from Plan/Annotation/PLAN_VIEW to Plan/Body/PLAN_VIEW and noticed some error - when I defined Plan/Body/PLAN_VIEW first and Model/Body/... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Andrej730 |
| 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