Hi, Thomas thanks for your review. i've replied below. On Mon, May 18, 2009 at 9:47 AM, Thomas Paviot <thomas.pav...@free.fr>wrote:
> 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), > I agree. I do not expect dumpTopology to last after i get my stuff stabilized. > > - Why don't you use the builtin wxDisplay.py? A valid question. I think the answer is because I was having trouble figuring out how to override the viewer's default 'something selected' text and then never took it back out. After learning more i would like to use Viewer3d or better the wxBaseViewer you suggested, once it makes it into a stable replease > > > - '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 mean "builtin"-- ie, your'e referring to the fact that the naming might clash with the slice() method? i see., this is a good point. > > - 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: > a good point. I was in python script land and didnt think about pulling in the occ methods there. > > """>>> 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? > yes-- if you open the produced svg file you should see the layers. If you open it with a javascript-enabled viewer ( like firefox , which is what i use ), you should see a cute little menu that lets you scale the slices and scroll through them. The SVG is no substitute for a good viewer. However, we needed a format to represent slices, and SVG handles this quite nicely since it already describes a well-understood and standardized way to communication paths, curves, and such in 2d. The idea was to have a data file that can act as a slice format, while providing some basic 'viewability' for humans. In general, the slicing part is the most computationally intensive part of the process, and is the least dependent on machine characteristics. After slicing comes filling each layer with tool paths that rasterize the surface. This is also computationally intensive, but is very sensitive to particular machine characteristics, and thus is nearly always re-executed for the target machine. The slice operation has very few applicable parameters, so a portable file is more useful. The toolset we use in RepRap to exeucte these later stages is a pure-python library called skeinforge, written by Enrique. He helped me develop the slice format, and wrote an adapter so that his tools can accept this svg slice file as input. The next phases of the project are: (a) is to make an InteractiveViewer -like application that allows you to use a gui to load and slice files (b) import Enrique's tools so that they are available from inside this GUI. His tools produce Gcode. (c) implement code that will display the toolpaths from skeinforge in this tool. I'm getting very low on wife points right now though, so these phases may not be really soon. :( Dave > > 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 >
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users