skeinforge_tools.craft_plugins.carve ($Date: 2008/02/05 $)
index
/home/enrique/Desktop/backup/babbleold/script/reprap/pyRepRap/skeinforge_tools/craft_plugins/carve.py

Carve shape is a script to carve a list of slice layers.

Carve carves a list of slices into svg slice layers. The 'Layer Thickness' is the thickness the extrusion layer at default extruder speed, this is the most important carve preference. The 'Perimeter Width over Thickness' is the ratio of the extrusion perimeter width to the layer thickness. The higher the value the more the perimeter will be inset, the default is 1.8. A ratio of one means the extrusion is a circle, a typical ratio of 1.8 means the extrusion is a wide oval. These values should be measured from a test extrusion line.

When a triangle mesh has holes in it, the triangle mesh slicer switches over to a slow algorithm that spans gaps in the mesh. The higher the 'Import Coarseness' setting, the wider the gaps in the mesh it will span. An import coarseness of one means it will span gaps of the perimeter width. When the Mesh Type preference is Correct Mesh, the mesh will be accurately carved, and if a hole is found, carve will switch over to the algorithm that spans gaps. If the Mesh Type preference is Unproven Mesh, carve will use the gap spanning algorithm from the start. The problem with the gap spanning algothm is that it will span gaps, even if there is not actually a gap in the model.

If 'Infill in Direction of Bridges' is selected, the infill will be in the direction of bridges across gaps, so that the fill will be able to span a bridge easier.

The 'Extra Decimal Places' is the number of extra decimal places export will output compared to the number of decimal places in the layer thickness. The higher the 'Extra Decimal Places', the more significant figures the output numbers will have, the default is one.

Carve slices from bottom to top. The output will go from the "Layers From" index to the "Layers To" index. The default for the "Layers From" index is zero and the default for the "Layers To" is a really big number. To get a single layer, set the "Layers From" to zero and the "Layers To" to one.

The following examples carve the file Screw Holder Bottom.stl. The examples are run in a terminal in the folder which contains Screw Holder Bottom.stl and carve.py.


> python carve.py
This brings up the carve dialog.


> python carve.py Screw Holder Bottom.stl
The carve tool is parsing the file:
Screw Holder Bottom.stl
..
The carve tool has created the file:
.. Screw Holder Bottom_carve.svg


> python
Python 2.5.1 (r251:54863, Sep 22 2007, 01:43:31)
[GCC 4.2.1 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import carve
>>> carve.main()
This brings up the carve dialog.


>>> carve.writeOutput()
The carve tool is parsing the file:
Screw Holder Bottom.stl
..
The carve tool has created the file:
.. Screw Holder Bottom_carve.svg

 
Modules
       
__init__
skeinforge_tools.skeinforge_utilities.euclidean
skeinforge_tools.skeinforge_utilities.gcodec
skeinforge_tools.skeinforge_utilities.interpret
math
os
skeinforge_tools.meta_plugins.polyfile
skeinforge_tools.skeinforge_utilities.preferences
skeinforge_tools.skeinforge_utilities.svg_codec
sys
time
skeinforge_tools.skeinforge_utilities.triangle_mesh

 
Classes
       
CarveRepository
skeinforge_tools.skeinforge_utilities.svg_codec.SVGCodecSkein
CarveSkein

 
class CarveRepository
    A class to handle the carve preferences.
 
  Methods defined here:
__init__(self)
Set the default preferences, execute title & preferences fileName.
execute(self)
Carve button has been clicked.

 
class CarveSkein(skeinforge_tools.skeinforge_utilities.svg_codec.SVGCodecSkein)
    A class to carve a carving.
 
  Methods defined here:
addRotatedLoopLayerToOutput(self, layerIndex, rotatedBoundaryLayer)
Add rotated boundary layer to the output.
addRotatedLoopLayersToOutput(self, rotatedBoundaryLayers)
Add rotated boundary layers to the output.
getCarvedSVG(self, carveRepository, carving, fileName)
Parse gnu triangulated surface text and store the carved gcode.
setExtrusionDiameterWidth(self, carveRepository)
Set the extrusion diameter & width and the bridge thickness & width.

Methods inherited from skeinforge_tools.skeinforge_utilities.svg_codec.SVGCodecSkein:
__init__(self)
addInitializationToOutputSVG(self, procedureName)
Add initialization gcode to the output.
addLayerStart(self, layerIndex, z)
Add the start lines for the layer.
addLine(self, line)
Add a line of text and a newline to the output.
addLines(self, lines)
Add lines of text to the output.
addShutdownToOutput(self)
Add shutdown svg to the output.
getReplacedSVGTemplateLines(self, fileName, rotatedBoundaryLayers)
Get the lines of text from the svg_template.tmpl file.
getRounded(self, number)
Get number rounded to the number of carried decimal places as a string.
getRoundedComplexString(self, point)
Get the rounded complex string.
getSVGLoopString(self, loop)
Get the svg loop string.
getSVGPathString(self, path)
Get the svg path string.

 
Functions
       
getCraftedText(fileName, text='', carveRepository=None)
Get carved text.
getCraftedTextFromFileName(fileName, carveRepository=None)
Carve a shape file.
getRepositoryConstructor()
Get the repository constructor.
main()
Display the carve dialog.
writeOutput(fileName='')
Carve a GNU Triangulated Surface file.

 
Data
        __author__ = 'Enrique Perez (perez_enrique@yahoo.com)'
__date__ = '$Date: 2008/02/05 $'
__license__ = 'GPL 3.0'
absolute_import = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0), 16384)

 
Author
        Enrique Perez (perez_enrique@yahoo.com)