skeinforge_tools.craft_plugins.inset ($Date: 2008/28/04 $)
index
/home/enrique/Desktop/backup/babbleold/script/reprap/pyRepRap/skeinforge_tools/craft_plugins/inset.py

Inset is a script to inset a gcode file.

Inset will inset the outside outlines by half the perimeter width, and the inside outlines will be outset by half the perimeter width.

If "Add Custom Code for Temperature Reading" is selected, the M105 custom code for temperature reading will be added at the beginning of the file, the default is on. If the "Turn Extruder Heater Off at Shut Down" preference is selected, the M104 S0 gcode line will be added to the end of the file to turn the extruder heater off by setting the extruder heater temperature to 0, this is the default choice.

The 'Bridge Width Multiplier' is the ratio of the extrusion width of a bridge layer over the extrusion width of the typical non bridge layers, the default is 1.0.

The 'Overlap Removal Width over Perimeter Width' is the ratio of the overlap removal width over the perimeter width, the default is 0.6. Any part of the extrusion that comes within the overlap removal width of another is removed. This is to prevent the extruder from depositing two extrusions right beside each other. If the 'Overlap Removal Width over Perimeter Width' is less than 0.2, the overlap will not be removed.

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

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


> python inset.py Screw Holder Bottom.stl
The inset tool is parsing the file:
Screw Holder Bottom.stl
..
The inset tool has created the file:
.. Screw Holder Bottom_inset.gcode


> 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 inset
>>> inset.main()
This brings up the inset dialog.


>>> inset.writeOutput()
The inset tool is parsing the file:
Screw Holder Bottom.stl
..
The inset tool has created the file:
.. Screw Holder Bottom_inset.gcode

 
Modules
       
__init__
skeinforge_tools.skeinforge_utilities.consecution
skeinforge_tools.skeinforge_utilities.euclidean
skeinforge_tools.skeinforge_utilities.gcodec
skeinforge_tools.skeinforge_utilities.intercircle
skeinforge_tools.skeinforge_utilities.interpret
math
os
skeinforge_tools.meta_plugins.polyfile
skeinforge_tools.skeinforge_utilities.preferences
sys

 
Classes
       
InsetRepository
InsetSkein

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

 
class InsetSkein
    A class to inset a skein of extrusions.
 
  Methods defined here:
__init__(self)
addGcodeFromPerimeterPaths(self, isIntersectingSelf, loop, loopLists, radius, z)
Add the perimeter paths to the output.
addGcodeFromRemainingLoop(self, loop, loopLists, radius, z)
Add the remainder of the loop which does not overlap the alreadyFilledArounds loops.
addGcodePerimeterBlockFromRemainingLoop(self, loop, loopLists, radius, z)
Add the perimter block remainder of the loop which does not overlap the alreadyFilledArounds loops.
addInitializationToOutput(self)
Add initialization gcode to the output.
addInset(self, rotatedBoundaryLayer)
Add inset to the layer.
addRotatedLoopLayer(self, z)
Add rotated loop layer.
addShutdownToOutput(self)
Add shutdown gcode to the output.
getCraftedGcode(self, insetRepository, gcodeText)
Parse gcode text and store the bevel gcode.
parseInitialization(self)
Parse gcode initialization and store the parameters.
parseLine(self, lineIndex)
Parse a gcode line and add it to the inset skein.

 
Functions
       
addAlreadyFilledArounds(alreadyFilledArounds, loop, radius)
Add already filled loops around loop to alreadyFilledArounds.
addSegmentOutline(isThick, outlines, pointBegin, pointEnd, width)
Add a diamond or hexagonal outline for a line segment.
getCraftedText(fileName, text='', insetRepository=None)
Inset the preface file or text.
getCraftedTextFromText(gcodeText, insetRepository=None)
Inset the preface gcode text.
getRepositoryConstructor()
Get the repository constructor.
getSegmentsFromPoints(aroundLists, loopLists, pointBegin, pointEnd)
Get endpoint segments from the beginning and end of a line segment.
isCloseToLast(paths, point, radius)
Determine if the point is close to the last point of the last path.
isIntersectingItself(loop, width)
Determine if the loop is intersecting itself.
isIntersectingWithinList(loop, loopList)
Determine if the loop is intersecting or is within the loop list.
isIntersectingWithinLists(loop, loopLists)
Determine if the loop is intersecting or is within the loop lists.
isSegmentInsideAround(aroundLists, segment)
Determine if the segment is inside an around.
main()
Display the inset dialog.
writeOutput(fileName='')
Inset the carving of a gcode file.  If no fileName is specified, inset the first unmodified gcode file in this folder.

 
Data
        __author__ = 'Enrique Perez (perez_enrique@yahoo.com)'
__date__ = '$Date: 2008/28/04 $'
__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)