skeinforge_application.skeinforge_plugins.craft_plugins.scale ($Date: 2008/28/04 $) | index /home/enrique/Desktop/backup/babbleold/script/reprap/fabmetheus/skeinforge_application/skeinforge_plugins/craft_plugins/scale.py

Previous / Next / Contents

`
Scale scales the carving to compensate for shrinkage after the extrusion has cooled.
It is best to only change the XY Plane Scale, because that does not affect other variables. If you choose to change the Z Axis Scale, that increases the layer thickness so you must increase the feed rate in speed by the same amount and maybe some other variables which depend on layer thickness.
Operation
Settings
XY Plane Scale
Z Axis Scale
SVG Viewer
Examples
`

## Operation

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

## Settings

### XY Plane Scale

Default is 1.01.
Defines the amount the xy plane of the carving will be scaled. The xy coordinates will be scaled, but the perimeterWidth is not changed, so this can be changed without affecting other variables.

### Z Axis Scale

Default is one.
Defines the amount the z axis of the carving will be scaled. The default is one because changing this changes many variables related to the layer thickness. For example, the feedRate should be multiplied by the Z Axis Scale because the layers would be farther apart..

### SVG Viewer

Default is webbrowser.
If the 'SVG Viewer' is set to the default 'webbrowser', the scalable vector graphics file will be sent to the default browser to be opened. If the 'SVG Viewer' is set to a program name, the scalable vector graphics file will be sent to that program to be opened.

## Examples

The following examples scale the file Screw Holder Bottom.stl. The examples are run in a terminal in the folder which contains Screw Holder Bottom.stl and scale.py.
> python scale.py
This brings up the scale dialog.
> python scale.py Screw Holder Bottom.stl
The scale tool is parsing the file:
Screw Holder Bottom.stl
..
The scale tool has created the file:
.. Screw Holder Bottom_scale.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 scale
>>> scale.main()
This brings up the scale dialog.
>>> scale.writeOutput('Screw Holder Bottom.stl')
The scale tool is parsing the file:
Screw Holder Bottom.stl
..
The scale tool has created the file:
.. Screw Holder Bottom_scale.gcode

Previous / Next / Contents

Modules
`` |  |
__init__ fabmetheus_utilities.archive cStringIO fabmetheus_utilities.euclidean | fabmetheus_utilities.fabmetheus_tools.fabmetheus_interpret fabmetheus_utilities.gcodec 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 time fabmetheus_utilities.xml_simple_writer

Classes
`` |  | ScaleRepository ScaleSkein
class ScaleRepository
`` | `A class to handle the scale settings.`
| Methods defined here: __init__(self) `Set the default settings, execute title & settings fileName.` execute(self) `Scale button has been clicked.`
class ScaleSkein
`` | `A class to scale a skein of extrusions.`
| Methods defined here: getCraftedGcode(self, fileName, repository, svgText) `Parse svgText and store the scale svgText.`

Functions
`` |  | getCraftedText(fileName, svgText='', repository=None) `Scale and convert an svg file or svgText.` getCraftedTextFromText(fileName, svgText, repository=None) `Scale and convert an svgText.` getNewRepository() `Get the repository constructor.` main() `Display the scale dialog.` setLoopLayerScale(rotatedLoopLayer, xyPlaneScale, zAxisScale) `Set the slice element scale.` writeOutput(fileName) `Scale the carving.`

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)