skeinforge_tools.craft_plugins.stretch ($Date: 2008/21/04 $) | index /home/enrique/Desktop/backup/babbleold/script/reprap/pyRepRap/skeinforge_tools/craft_plugins/stretch.py |
Stretch is a script to stretch the threads to partially compensate for filament shrinkage when extruded.
The default 'Activate Stretch' checkbox is off. When it is on, the functions described below will work, when it is off, the functions
will not be called.
The important value for the stretch preferences is "Perimeter Maximum Stretch Over Extrusion Width (ratio)" which is the ratio of
the maximum amount the perimeter thread will be stretched compared to the extrusion width, the default is 0.3. The higher the
value the more it will stretch the perimeter and the wider holes will be. If the value is too small, the holes will have to be
drilled out after fabrication, if the value is too high, the holes will be too wide and the part will have to junked, so the default is
low. The 'Loop Stretch Over Extrusion Width' is the ratio of the maximum amount the loop aka shell threads will be stretched
compared to the extrusion width, in general this value should be around half the Perimeter Maximum Stretch preference. The
'Path Stretch Over Extrusion Width' is the ratio of the maximum amount the threads which are not loops, like the infill threads,
will be stretched compared to the extrusion width, the default is 0.
In general, stretch will widen holes and push corners out. The algorithm works by checking at each turning point on the
extrusion path what the direction of the thread is at a distance of "Stretch from Distance over Extrusion Width (ratio)" times the
extrusion width, on both sides, and moves the thread in the opposite direction. The magnitude of the stretch increases with the
amount that the direction of the two threads is similar and by the Stretch Over Extrusion Width ratio. The script then also
stretches the thread at two locations on the path on close to the turning points. In practice the filament contraction will be
similar but different from the algorithm, so even once the optimal parameters are determined, the stretch script will not be able
to eliminate the inaccuracies caused by contraction, but it should reduce them. To run stretch, in a shell type:
> python stretch.py
The following examples stretch the files Screw Holder Bottom.gcode & Screw Holder Bottom.stl. The examples are run in a terminal in the
folder which contains Screw Holder Bottom.gcode, Screw Holder Bottom.stl and stretch.py. The functions writeOutput and
getChainGcode check to see if the text has been stretched, if not they call the getChainGcode in cool.py to cool the
text; once they have the cooled text, then they stretch.
> python stretch.py Screw Holder Bottom.stl
File Screw Holder Bottom.stl is being chain stretched.
The stretched file is saved as Screw Holder Bottom_stretch.gcode
> python stretch.py
This brings up the dialog, after clicking 'Stretch', the following is printed:
File Screw Holder Bottom.stl is being chain stretched.
The stretched file is saved as Screw Holder Bottom_stretch.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 stretch
>>> stretch.main()
This brings up the stretch dialog.
>>> stretch.writeOutput()
Screw Holder Bottom.stl
File Screw Holder Bottom.stl is being chain stretched.
The stretched file is saved as Screw Holder Bottom_stretch.gcode
Classes | ||||||||||||||||||||||||||||||||||
|
Functions | ||
|
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) |