Conversation
rainman110
commented
Dec 11, 2015
- Computation of edges
- Interface to Vertices, Normals, and Triangles
|
Cool! The ipython work is exciting... |
Unfortunately yes. It would be better, if the swig interface already returns the whole array instead of iterating over each vertex. The workflow is as follows:
This might be the reason, why my code is quite slow. There is probably some room for optimization though. |
|
Ah, thanks for the insight @rainman110 To make this fast, probably we could create a .json string in pythonocc, where iteration through the mesh is handled in C++ and the .json returned through the SWIG interface. But this is a nice step fwd! |
|
Good idea! Should be much faster. |
|
There seem to be build problems with the Tesselator. I will have a look into it. |
src/Visualization/Tesselator.cpp
Outdated
There was a problem hiding this comment.
Deleting these lines was by accident, sorry.
- Computation of edges - Interface to Vertices, Normals, and Triangles
25af8e0 to
75f537c
Compare
|
Greta, interface to vertices/faces/edges was something requested for a while. We should add an example now. |
|
What about an example, where we plot a shape with matplotlib? There we can explicitly use the tesselator to get the triangles and edges. |
|
Initially the tesselator was put in place for generating mesh data to be rendered in webgl. |
|
The Tesselator can be used to solve any problem. So far actually the Tesselator is mostly used to render a shape in the browser, but if it can be used for something else, it's cool too. I use to work with numpy/matplolib, an example demonstrating a use of pythonocc/matplotlib would be great IMHO. |
|
I just added a small matplotlib example for the tesselator. I think this is more instructive than a huge opengl/webgl code. See my PR #167 |
|
@rainman110 , I just saw your PR... |