2010/6/28 Guillaume Bouchard <guillaume.bouch...@insa-lyon.fr>

> Hello everybody.
>

Hi Guillaume,


>
> Recently I have used python-OCC to convert STEP files into STL files with
> help
> of the STL API.
>
> But this gives me really crappy tesselation, with very little and very big
> triangles on a really long time (approximately 1 minutes on the quad core
> i7 for
> an object of only 400K entities). There is only one or two settings which
> are
> little or undocumented (is there a doc somewhere ?), and changing these
> settings from different values gives unpredictables results.
>

Do  API Reference available at: http://api.pythonocc.org

The methods available from the StlAPI_Writer class, useful to customize the
generated STL files are SetDeflection() (default is 0.01) and
SetCoefficient() (default is 0.001) (documentation:
http://api.pythonocc.org/OCC.StlAPI.StlAPI_Writer-class.html).



> In fact I don't care about STL, I only wants a soup of homogeneous
> triangles
> that represents my geometry. Is there a way to get the tesselated list of
> triangles, with understundable settings and at a quicker speed ?
>

The algorithm used to generate files is quite simple. You might have a look
at the MEFISTO2 mesher, that creates homogeneous triangles. But you will
have to write the STL exporter by yourself (in ASCII mode, it's not very
difficult). Have a look at the surfacig_mesh.py sample (
http://code.google.com/p/pythonocc/source/browse/trunk/src/examples/Level1/SMESH/surfacic_mesh.py).
You can see a video of this sample here:
http://www.youtube.com/watch?v=oebFo_adioA


>
> Thank you.
>
> --
> Guillaume


Best Regards,

Thomas
_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to