# Python: module skeinforge_application.skeinforge_plugins.craft_plugins.preface

skeinforge_application.skeinforge_plugins.craft_plugins.preface ($Date: 2008/02/05 $) | index /home/enrique/Desktop/backup/babbleold/script/reprap/fabmetheus/skeinforge_application/skeinforge_plugins/craft_plugins/preface.py

Previous / Next / Contents

`
Preface converts the svg slices into gcode extrusion layers, optionally with home, positioning, turn off, and unit commands.
The preface manual page is at:
http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge_Preface
Settings
Meta
Set Positioning to Absolute
Set Units to Millimeters
Start at Home
Turn Extruder Off
Turn Extruder Off at Shut Down
Turn Extruder Off at Start Up
Examples
`

## Settings

### Meta

Default is empty.
The 'Meta' field is to add meta tags or a note to all your files. Whatever is in that field will be added in a meta tagged line to the output.

### Set Positioning to Absolute

Default is on.
When selected, preface will add the G90 command to set positioning to absolute.

### Set Units to Millimeters

Default is on.
When selected, preface will add the G21 command to set the units to millimeters.

### Start at Home

Default is off.
When selected, the G28 go to home gcode will be added at the beginning of the file.

### Turn Extruder Off

#### Turn Extruder Off at Shut Down

Default is on.
When selected, the M103 turn extruder off gcode will be added at the end of the file.

#### Turn Extruder Off at Start Up

Default is on.
When selected, the M103 turn extruder off gcode will be added at the beginning of the file.

## Examples

The following examples preface the file Screw Holder Bottom.stl. The examples are run in a terminal in the folder which contains Screw Holder Bottom.stl and preface.py.
> python preface.py
This brings up the preface dialog.
> python preface.py Screw Holder Bottom.stl
The preface tool is parsing the file:
Screw Holder Bottom.stl
..
The preface tool has created the file:
.. Screw Holder Bottom_preface.gcode

Previous / Next / Contents

Modules

``

__init__
fabmetheus_utilities.archive
fabmetheus_utilities.euclidean
fabmetheus_utilities.fabmetheus_tools.fabmetheus_interpret

fabmetheus_utilities.gcodec
fabmetheus_utilities.intercircle
os
fabmetheus_utilities.settings

skeinforge_application.skeinforge_utilities.skeinforge_craft
skeinforge_application.skeinforge_utilities.skeinforge_polyfile
skeinforge_application.skeinforge_utilities.skeinforge_profile
fabmetheus_utilities.svg_writer

sys

Classes

``

PrefaceRepository
PrefaceSkein

class PrefaceRepository
`` | `A class to handle the preface settings.`

Methods defined here:

__init__(self)
  `Set the default settings, execute title & settings fileName.`

execute(self)
  `Preface button has been clicked.`

class PrefaceSkein
`` | `A class to preface a skein of extrusions.`

Methods defined here:

__init__(self)

addInitializationToOutput(self)
  `Add initialization gcode to the output.`

addPreface(self, loopLayer)
  `Add preface to the carve layer.`

addShutdownToOutput(self)
  `Add shutdown gcode to the output.`

addToolSettingLines(self, pluginName)
  `Add tool setting lines.`

getCraftedGcode(self, repository, gcodeText)
  `Parse gcode text and store the bevel gcode.`

Functions

``

getCraftedText(fileName, text='', repository=None)
  `Preface and convert an svg file or text.`

getCraftedTextFromText(text, repository=None)
  `Preface and convert an svg text.`

getNewRepository()
  `Get new repository.`

main()
  `Display the preface dialog.`

strftime(...)
  `strftime(format[, tuple]) -> string
  Convert a time tuple to a string according to a format specification.
  See the library reference manual for formatting codes. When the time tuple
  is not present, current time as returned by localtime() is used.`

writeOutput(fileName, shouldAnalyze=True)
  `Preface the carving of a gcode file.`

Data
`` |  | __author__ = 'Enrique Perez (perez_enrique@yahoo.com)' __date__ = '$Date: 2008/02/05 $' __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' absolute_import = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0), 16384)

Author
`` |  | Enrique Perez (perez_enrique@yahoo.com)