skeinforge_application.skeinforge_plugins.analyze_plugins.statistic ($Date: 2008/21/04 $) | index /home/enrique/Desktop/backup/babbleold/script/reprap/fabmetheus/skeinforge_application/skeinforge_plugins/analyze_plugins/statistic.py

Previous / Next / Contents

`
Statistic is a script to generate statistics a gcode file.
The statistic manual page is at:
http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge_Statistic
Operation
Settings
Extrusion Diameter over Thickness
Print Statistics
Save Statistics
Gcodes
Examples
`

## Operation

The default 'Activate Statistic' checkbox is on. When it is on, the functions described below will work when called from the skeinforge toolchain, when it is off, the functions will not be called from the toolchain. The functions will still be called, whether or not the 'Activate Statistic' checkbox is on, when statistic is run directly.

## Settings

### Extrusion Diameter over Thickness

Default is 1.25.
The 'Extrusion Diameter over Thickness is the ratio of the extrusion diameter over the layer thickness, the default is 1.25. The extrusion fill density ratio that is printed to the console, ( it is derived quantity not a parameter ) is the area of the extrusion diameter over the extrusion width over the layer thickness. Assuming the extrusion diameter is correct, a high value means the filament will be packed tightly, and the object will be almost as dense as the filament. If the fill density ratio is too high, there could be too little room for the filament, and the extruder will end up plowing through the extra filament. A low fill density ratio means the filaments will be far away from each other, the object will be leaky and light. The fill density ratio with the default extrusion settings is around 0.68.

### Print Statistics

Default is on.
When the 'Print Statistics' checkbox is on, the statistics will be printed to the console.

### Save Statistics

Default is off.
When the 'Save Statistics' checkbox is on, the statistics will be saved as a .txt file.

## Gcodes

An explanation of the gcodes is at:
http://reprap.org/bin/view/Main/Arduino_GCode_Interpreter
and at:
http://reprap.org/bin/view/Main/MCodeReference
A gode example is at:
http://forums.reprap.org/file.php?12,file=565

## Examples

Below are examples of statistic being used. These examples are run in a terminal in the folder which contains Screw Holder_penultimate.gcode and statistic.py. The 'Save Statistics' checkbox is selected.
> python statistic.py
This brings up the statistic dialog.
> python statistic.py Screw Holder_penultimate.gcode
The statistic file is saved as Screw_Holder_penultimate_statistic.txt
> 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 statistic
>>> statistic.main()
This brings up the statistic dialog.
>>> statistic.getWindowAnalyzeFile('Screw Holder_penultimate.gcode')
The statistics file is saved as Screw Holder_penultimate_statistic.txt

Previous / Next / Contents

Modules
`` |  |
__init__ fabmetheus_utilities.archive cStringIO | fabmetheus_utilities.euclidean fabmetheus_utilities.gcodec math | fabmetheus_utilities.settings skeinforge_application.skeinforge_utilities.skeinforge_polyfile skeinforge_application.skeinforge_utilities.skeinforge_profile | sys

Classes
`` |  | StatisticRepository StatisticSkein
class StatisticRepository
`` | `A class to handle the statistics settings.`
| Methods defined here: __init__(self) `Set the default settings, execute title & settings fileName.` execute(self) `Write button has been clicked.`
class StatisticSkein
`` | `A class to get statistics for a gcode skein.`
| Methods defined here: __init__(self) addLine(self, line) `Add a line of text and a newline to the output.` addToPath(self, location) `Add a point to travel and maybe extrusion.` extruderSet(self, active) `Maybe increment the number of times the extruder was toggled.` getCraftedGcode(self, gcodeText, repository) `Parse gcode text and store the statistics.` getLocationSetFeedRateToSplitLine(self, splitLine) `Get location ans set feed rate to the plsit line.` helicalMove(self, isCounterclockwise, splitLine) `Get statistics for a helical move.` linearMove(self, splitLine) `Get statistics for a linear move.` parseLine(self, line) `Parse a gcode line and add it to the statistics.`

Functions
`` |  | getNewRepository() `Get the repository constructor.` getWindowAnalyzeFile(fileName) `Write statistics for a gcode file.` getWindowAnalyzeFileGivenText(fileName, gcodeText, repository=None) `Write statistics for a gcode file.` main() `Display the statistics dialog.` writeOutput(fileName, fileNameSuffix, gcodeText='') `Write statistics for a skeinforge gcode file, if 'Write Statistics File for Skeinforge Chain' is selected.`

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