On Thursday 14 March 2013 12:30:13 Anthony Garland wrote:
I'm just getting started with Free-cad and would like some advice if possible. I'm trying to generate .jpg images of slices of a 3d model for a 3d printer or DLP rapid prototyping machine.
The general idea of what I'm trying to do is to allow the user to configure the orientation of the slicing plane and the slicing thickness, and then have Free-cad slice the model and generate images of each slice and save the images to a file. This is similar to the Slic3r projects "export to .svg" command. However, Slic3r doesn't always do a good job making the .svg file when the .stl file is complex. Also, I would like to use 3d model formats besides .stl files.
I just used Doxygen to build documentation for Free-cad. I'm reading all I can to get an understanding of how free-cad works.
Can you give me any pointers on where to start or general advice about my project? am I reinventing the wheel??
I'm not entirely sure what kind of sclices you want, but I suppose you need 2d crosssections of parts at arbitrary planes? There is a crosssection tool in the Part workbench (in the last 0.13 stable) that does exactly that, create crosssections of parts at a specfic plane. It is however limited to the standart planes. This limitation can be obvercome when you use the scripting api. Best is to use the tool in the GUI and study the resulting output in the python console. This gives you a idea what needs to be done to slice at arbitrary planes.
Once you have the crosssection you can use the drawing workbench to create svg files or make a jpg picture wia menu->tools->save picture. Everything possible with scripting too.
So if you want an easy to use tool for other users you can ether create a macro script with the python code to share or create a custom python workbench. Study the tutorials for how it's done.