Title: 'V3d_Viewer' object has no attribute 'GetObject' · Issue #843 · IfcOpenShell/IfcOpenShell · GitHub
Open Graph Title: 'V3d_Viewer' object has no attribute 'GetObject' · Issue #843 · IfcOpenShell/IfcOpenShell
X Title: 'V3d_Viewer' object has no attribute 'GetObject' · Issue #843 · IfcOpenShell/IfcOpenShell
Description: Trying to get ifcopenshell and pythonocc to work together, got as far as this error occurs when calling occ_display = ifcopenshell.geom.utils.initialize_display(): AttributeError: 'V3d_Viewer' object has no attribute 'GetObject' Environm...
Open Graph Description: Trying to get ifcopenshell and pythonocc to work together, got as far as this error occurs when calling occ_display = ifcopenshell.geom.utils.initialize_display(): AttributeError: 'V3d_Viewer' obje...
X Description: Trying to get ifcopenshell and pythonocc to work together, got as far as this error occurs when calling occ_display = ifcopenshell.geom.utils.initialize_display(): AttributeError: 'V3d_Viewer...
Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/843
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"'V3d_Viewer' object has no attribute 'GetObject' ","articleBody":"Trying to get `ifcopenshell` and `pythonocc` to work together, got as far as this error occurs when calling `occ_display = ifcopenshell.geom.utils.initialize_display()`:\r\n```\r\nAttributeError: 'V3d_Viewer' object has no attribute 'GetObject'\r\n```\r\nEnvironment:\r\n- Ubuntu 18.04 (same error on Windows 10)\r\n- Python 3.7.7\r\n - `conda create -n occ python=3.7` and then \r\n - `conda activate occ`\r\n- wxPython 4.0.4 (`conda install wxpython`)\r\n- ifcopenshell v0.6.0 (`conda install -c conda-forge ifcopenshell`)\r\n- pythonocc-core 7.4.0 (`conda install -c dlr-sc pythonocc-core`)\r\n\r\nNote: I had to upgrade `occt` (`conda update -c conda-forge occt`) from 7.3.0 to 7.4.0 or IfcOpenShell can't be imported after the installation of `pythonocc-core`. The conda environment has both `occt` and `opencascade` at version 7.4.0 from conda-forge and dlr-sc channels respectively. \r\n\r\nScreen output:\r\n```\r\n(occ) yang@OMEN-U1804:~$ ipython\r\nPython 3.7.7 (default, Mar 26 2020, 15:48:22) \r\nType 'copyright', 'credits' or 'license' for more information\r\nIPython 7.13.0 -- An enhanced Interactive Python. Type '?' for help.\r\n\r\nIn [1]: import ifcopenshell \r\n\r\nIn [2]: import ifcopenshell.geom \r\n\r\nIn [3]: settings = ifcopenshell.geom.settings() \r\n ...: settings.set(settings.USE_PYTHON_OPENCASCADE, True) \r\n ...: \r\n\r\nIn [4]: occ_display = ifcopenshell.geom.utils.initialize_display() \r\nINFO:OCC.Display.backend:backend loaded: wx\r\nINFO:OCC.Display.SimpleGui:GUI backend set to: wx\r\n\r\n(ipython:27784): Gdk-WARNING **: 17:35:42.362: /build/gtk+2.0-AoeliP/gtk+2.0-2.24.32/gdk/x11/gdkdrawable-x11.c:952 drawable is not a pixmap or window\r\n ###### 3D rendering pipe initialisation #####\r\nDisplay3d class initialization starting ...\r\nAspect_DisplayConnection created.\r\nGraphic_Driver created.\r\nV3d_Viewer created.\r\nAIS_InteractiveContext created.\r\nV3d_View created\r\nXw_Window created.\r\nDisplay3d class successfully initialized.\r\n ########################################\r\n---------------------------------------------------------------------------\r\nAttributeError Traceback (most recent call last)\r\n\u003cipython-input-4-28694ec22112> in \u003cmodule>\r\n----> 1 occ_display = ifcopenshell.geom.utils.initialize_display()\r\n\r\n~/Anaconda3/envs/occ/lib/python3.7/site-packages/ifcopenshell/geom/occ_utils.py in initialize_display()\r\n 83 viewer.SetLightOn(light.GetHandle())\r\n 84 \r\n---> 85 setup()\r\n 86 return handle\r\n 87 \r\n\r\n~/Anaconda3/envs/occ/lib/python3.7/site-packages/ifcopenshell/geom/occ_utils.py in setup()\r\n 62 viewer_handle = handle.GetViewer()\r\n 63 #viewer = viewer_handle\r\n---> 64 viewer = viewer_handle.GetObject()\r\n 65 \r\n 66 def lights():\r\n\r\nAttributeError: 'V3d_Viewer' object has no attribute 'GetObject'\r\n\r\nIn [5]:","author":{"url":"https://github.com/y5wang","@type":"Person","name":"y5wang"},"datePublished":"2020-05-05T21:50:56Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/843"}
| 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:e8a56cfa-d1dd-cf49-0538-709654588e41 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 981C:3DBB2B:5F1BF:842BB:6B04A36A |
| html-safe-nonce | 71454e8275a7cd40f152884b2c082e02c27bae1d108496e723487a017e2d19f3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODFDOjNEQkIyQjo1RjFCRjo4NDJCQjo2QjA0QTM2QSIsInZpc2l0b3JfaWQiOiI5Nzk0OTMyODI0OTUzNzQxODYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 76fa7e6043512556ad05c4824372cb27351a736d6afe8cc88e1ae5f59c98f040 |
| hovercard-subject-tag | issue:612917215 |
| 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/843/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8c55a2eb3687434c343915eb52f4d8357e06b6f31ef3348e6fbb5ba6599161f0/IfcOpenShell/IfcOpenShell/issues/843 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8c55a2eb3687434c343915eb52f4d8357e06b6f31ef3348e6fbb5ba6599161f0/IfcOpenShell/IfcOpenShell/issues/843 |
| og:image:alt | Trying to get ifcopenshell and pythonocc to work together, got as far as this error occurs when calling occ_display = ifcopenshell.geom.utils.initialize_display(): AttributeError: 'V3d_Viewer' obje... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | y5wang |
| hostname | github.com |
| expected-hostname | github.com |
| None | 188497a0f45a7aa8f7c866faa1950d1a7f8d82b59416adf549b222ad1d1dd19b |
| 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 | 557cfbac6cdb532730c95c90f2cefdc0c4128029 |
| 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