Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is XSDRAWSTLVRML or anything under TKXSDRAW available in pyocct? #90

Open
capfish opened this issue Oct 25, 2021 · 3 comments
Open

Is XSDRAWSTLVRML or anything under TKXSDRAW available in pyocct? #90

capfish opened this issue Oct 25, 2021 · 3 comments

Comments

@capfish
Copy link

capfish commented Oct 25, 2021

Context

Hi,
I'm trying to follow these guidelines for viewing an STL:
https://dev.opencascade.org/doc/overview/html/occt_user_guides__visualization.html#occt_visu_3_5_5

But I am unable to find XSDRAWSTLVRML to create the data source as MeshVS.MeshVS_DataSource doesn't have a constructor. Is this class available somewhere within pyOCCT? I have been unable to find it, but also I'm new to OCCT so maybe I'm just missing something/there's another way to create this data source?

>>> import OCCT
>>> for package in pkgutil.iter_modules(OCCT.__path__):
...     try:
...         foo = foo + dir(importlib.import_module(f'OCCT.{package.name}'))
...     except:
...         print(package.name)
...
IVtkTools
RWGltf
step
>>> [bar for bar in foo if 'xsdraw' in bar.lower()]
[]
>>> [bar for bar in foo if 'stlvrml' in bar.lower()]
[]

It's also not in those modules that it couldn't import.

Your Environment

  • Version used: 7.5.2.1
  • Operating System and version (desktop or mobile): Windows 10, Debian 9 Stretch, Desktop

Thanks!

@trelau
Copy link
Owner

trelau commented Oct 26, 2021

Not able to look at it closely yet, but the DRAW packages are not wrapped in pyOCCT.

Maybe you can read the STL and build the Mesh manually starting from (or around?) https://dev.opencascade.org/doc/refman/html/class_mesh_v_s___mesh_prs_builder.html

@capfish
Copy link
Author

capfish commented Oct 26, 2021

Ah thank you, I will try to make the Mesh presentation from the MeshVS_PrsBuilder and let you know how it goes.

@trelau
Copy link
Owner

trelau commented Oct 26, 2021

cool. if you have success you're welcome to share code or file here and i'll it to the examples and test database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants