Hi Dave,

I successfully ran your OccLib script (0.2). Here are my first  feelings:

- The shapeTypeString(shapetype) function is very convenient and could 
be added to the Topology module,

- The dumpTopology function is a good idea although it's a bit redundant 
with existing WriteToString method of TopoDS_Shape (the one used for 
pickling),

- Why don't you use the builtin wxDisplay.py?

- 'slice' is a python buildit type. It should not be used, in my 
opinion, as a name for a method of the class 'Slicer' (line 218),

- you create a 'Point' class with a isSame method. I suggest you use the 
builtin gp_Pnt2d class and the IsEqual() method, that actually do the 
same thing:

""">>> help(P.IsEqual)
Help on method gp_Pnt2d_IsEqual in module OCC._gp:

gp_Pnt2d_IsEqual(...) method of OCC.gp.gp_Pnt2d instance
    gp_Pnt2d_IsEqual(gp_Pnt2d self, gp_Pnt2d Other, Standard_Real 
LinearTolerance) -> Standard_Boolean
"""

Is the produced SVG file readable with a SVG viewer? What is the next 
step of your project?

Best Regards,

Thomas

Dave Cowden a écrit :
> Thanks Thomas. I'd appreciate the feedback. I think you'll be 
> underwhelmed-- it doesnt really do anything more than your slicers 
> do.  It does produce a kind of cool svg file, but the files' not 
> particularly impressive either.
>
>
>
> On Mon, May 18, 2009 at 12:59 AM, Thomas Paviot <thomas.pav...@free.fr 
> <mailto:thomas.pav...@free.fr>> wrote:
>
>     Hi Dave,
>
>     Such a good news that you achieved your slice application. Thanks for
>     sharing your cade, I'll test it in a few hours!
>
>     Thomas
>
>     Cowdens a écrit :
>     > Hello, everyone:
>     >
>     > I have finally finished a halfway decent implementation of my
>     slicer,
>     > and posted it on the wiki here:
>     >
>     > http://www.pythonocc.org/wiki/index.php/DavesSlicerProject
>     >
>     > Thank you to Jelle and Thomas for their help.
>     >
>     > This script will accept a STEP or STL file, and slice it into
>     > layers.   This script is not very impressive for those familiar with
>     > Occ, especially since there is already some slicer code out
>     there.  It
>     > does have a few interesting features, though:
>     >
>     >
>     >     * It uses solid operations (BrepAlgoAPI_Cut ) intead of
>     >       BRepAlgoAPI_Section.  this runs more slowly, but makes it
>     easier
>     >       operate on the resulting shape as a solid.  i believe this
>     will
>     >       be useful later, for example so that i can compute the
>     volume of
>     >       the resulting solid , etc.
>     >     * It produces a 'slice' file format that is compatible with
>     a very
>     >       elaborate set of python scripts used by Reprappers to create
>     >       toolpaths for the slice.  This format is based on SVG-- it has
>     >       the unique and interesting property that the file is both
>     human
>     >       viewable, and machine readable.
>     >     * Most of the code in this example does the task of converting a
>     >       face to an svg path element-- a non-trivial amount of code
>     as it
>     >       turns out
>     >
>     > I hope to include this code into a modified version of
>     > interactiveViewer, which could be the basis for a very good quality
>     > rapid prototyping tool.
>     >
>     > If you are interested, here's the forum where i posted the tool for
>     > the use by Reprappers:
>     >
>     > http://forums.reprap.org/read.php?12,20013,23357
>     >
>     > There is much work left, but for now it has succeeded in letting me
>     > slice STEP and really bad STL files, and then successfully generate
>     > toolpaths for use on a Reprap machine
>     >
>     >
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > Pythonocc-users mailing list
>     > Pythonocc-users@gna.org <mailto:Pythonocc-users@gna.org>
>     > https://mail.gna.org/listinfo/pythonocc-users
>     >
>
>     _______________________________________________
>     Pythonocc-users mailing list
>     Pythonocc-users@gna.org <mailto:Pythonocc-users@gna.org>
>     https://mail.gna.org/listinfo/pythonocc-users
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Pythonocc-users mailing list
> Pythonocc-users@gna.org
> https://mail.gna.org/listinfo/pythonocc-users
>   

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

Reply via email to