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

Previous / Next / Contents


Dimension adds Adrian's extruder distance E value to the gcode movement lines, as described at:
http://blog.reprap.org/2009/05/4d-printing.html

and in Erik de Bruijn's conversion script page at:
http://objects.reprap.org/wiki/3D-to-5D-Gcode.php

The dimension manual page is at:
http://www.bitsfrombytes.com/wiki/index.php?title=Skeinforge_Dimension


Operation
Settings
  Extrusion Distance Format Choice
    Absolute Extrusion Distance
    Relative Extrusion Distance
Examples

Operation


The default 'Activate Dimension' checkbox is off. When it is on, the functions described below will work, when it is off, the functions will not be called.

Settings


Extrusion Distance Format Choice

Default is 'Relative Extrusion Distance'. In Adrian's description the distance is absolute, but since the relative distances are smaller than the cumulative absolute distances, I chose to make the default relative.

Absolute Extrusion Distance

When selected, the extrusion distance output will be the total extrusion distance to that gcode line.

Relative Extrusion Distance

When selected, the extrusion distance output will be the extrusion distance from the last gcode line.

Examples


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


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


> python dimension.py Screw Holder Bottom.stl
The dimension tool is parsing the file:
Screw Holder Bottom.stl
..
The dimension tool has created the file:
.. Screw Holder Bottom_dimension.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 dimension
>>> dimension.main()
This brings up the dimension dialog.


>>> dimension.writeOutput( 'Screw Holder Bottom.stl' )
The dimension tool is parsing the file:
Screw Holder Bottom.stl
..
The dimension tool has created the file:
.. Screw Holder Bottom_dimension.gcode


Previous / Next / Contents


 
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.profile
skeinforge_tools.skeinforge_utilities.settings
sys

 
Classes
       
DimensionRepository
DimensionSkein

 
class DimensionRepository
    A class to handle the dimension settings.
 
  Methods defined here:
__init__(self)
Set the default settings, execute title & settings fileName.
execute(self)
Dimension button has been clicked.

 
class DimensionSkein
    A class to dimension a skein of extrusions.
 
  Methods defined here:
__init__(self)
getCraftedGcode(self, gcodeText, repository)
Parse gcode text and store the dimension gcode.
getDimensionedArcMovement(self, line, splitLine)
Get an dimensioned arc movement.
getDimensionedLinearMovement(self, line, splitLine)
Get an dimensioned linear movement.
getExtrusionDistanceString(self, distance, splitLine)
Get the extrusion distance string.
parseInitialization(self)
Parse gcode initialization and store the parameters.
parseLine(self, lineIndex)
Parse a gcode line and add it to the dimension skein.

 
Functions
       
getCraftedText(fileName, gcodeText='', repository=None)
Dimension a gcode file or text.
getCraftedTextFromText(gcodeText, repository=None)
Dimension a gcode text.
getNewRepository()
Get the repository constructor.
main()
Display the dimension dialog.
writeOutput(fileName='')
Dimension a gcode file.

 
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)