Python: module skeinforge_application.skeinforge_plugins.craft_plugins.smooth

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

Previous / Next / Contents

`
This plugin smooths jagged extruder paths. It takes shortcuts through jagged paths and decreases the feed rate to compensate.
Smooth is based on ideas in Nophead's frequency limit post:
http://hydraraptor.blogspot.com/2010/12/frequency-limit.html
The smooth manual page is at:
http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge_Smooth
Operation
Settings
Layers From
Maximum Shortening over Width
Examples
`

## Operation

The default 'Activate Smooth' checkbox is off. When it is on, the functions described below will work, when it is off, nothing will be done.

## Settings

### Layers From

Default: 1
Defines which layer of the print the smoothing process starts from. If this is set this to zero, that might cause the smoothed parts of the bottom perimeter not to adhere well to the print surface. However, this is just a potential problem in theory, no bottom adhesion problem has been reported.

### Maximum Shortening over Width

Default: 1.2
Defines the maximum shortening of the shortcut compared to the original path. Smooth goes over the path and if the shortcut between the midpoint of one line and the midpoint of the second line after is not too short compared to the original and the shortcut is not too long, it replaces the jagged original with the shortcut. If the maximum shortening is too much, smooth will shorten paths which should not of been shortened and will leave blobs and holes in the model. If the maximum shortening is too little, even jagged paths that could be shortened safely won't be smoothed.

## Examples

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

Previous / Next / Contents

Modules
`` |  |
__init__ fabmetheus_utilities.archive fabmetheus_utilities.euclidean | fabmetheus_utilities.fabmetheus_tools.fabmetheus_interpret fabmetheus_utilities.gcodec fabmetheus_utilities.settings | skeinforge_application.skeinforge_utilities.skeinforge_craft skeinforge_application.skeinforge_utilities.skeinforge_polyfile skeinforge_application.skeinforge_utilities.skeinforge_profile | sys

Classes
`` |  | SmoothRepository SmoothSkein
class SmoothRepository
`` | `A class to handle the smooth settings.`
| Methods defined here: __init__(self) `Set the default settings, execute title & settings fileName.` execute(self) `Smooth button has been clicked.`
class SmoothSkein
`` | `A class to smooth a skein of extrusions.`
| Methods defined here: __init__(self) `Initialize.` addSmoothedInfill(self) `Add smoothed infill.` getCraftedGcode(self, gcodeText, repository) `Parse gcode text and store the smooth gcode.` getIsParallelToRotation(self, segment) `Determine if the segment is parallel to the rotation.` parseInitialization(self) `Parse gcode initialization and store the parameters.` parseLine(self, line) `Parse a gcode line and add it to the smooth skein.`

Functions
`` |  | getCraftedText(fileName, gcodeText, repository=None) `Smooth a gcode linear move text.` getCraftedTextFromText(gcodeText, repository=None) `Smooth a gcode linear move text.` getNewRepository() `Get new repository.` main() `Display the smooth dialog.` writeOutput(fileName, shouldAnalyze=True) `Smooth a gcode linear move file. Chain smooth the gcode if it is not already smoothed.`

Data
`` |  | __author__ = 'Enrique Perez (perez_enrique aht yahoo.com) & James Blackwell (jim_blag ahht hotmail.com)' __date__ = '$Date: 2008/21/04 $' __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 aht yahoo.com) & James Blackwell (jim_blag ahht hotmail.com)