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

Fillet is a script to fillet or bevel the corners on a gcode file.

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

Fillet rounds the corners slightly in a variety of ways. This is to reduce corner blobbing and sudden extruder acceleration. The 'Arc Point' method fillets the corners with an arc using the gcode point form. The 'Arc Radius' method fillets with an arc using the gcode radius form. The 'Arc Segment' method fillets corners with an arc composed of several segments. The 'Bevel' method bevels each corner. The default radio button choice is 'Bevel'.

The 'Corner FeedRate over Operating FeedRate' is the ratio of the feedRate in corners over the operating feedRate. With a high value the extruder will move quickly in corners, accelerating quickly and leaving a thin extrusion. With a low value, the extruder will move slowly in corners, accelerating gently and leaving a thick extrusion. The default value is 1.0. The 'Fillet Radius over Perimeter Width' ratio determines how much wide the fillet will be, the default is 0.35. The 'Reversal Slowdown over Perimeter Width' ratio determines how far before a path reversal the extruder will slow down. Some tools, like nozzle wipe, double back the path of the extruder and this option will add a slowdown point in that path so there won't be a sudden jerk at the end of the path. The default value is 0.5 and if the value is less than 0.1 a slowdown will not be added. If 'Use Intermediate FeedRate in Corners' is chosen, the feedRate entering the corner will be the average of the old feedRate and the new feedRate, the default is true.

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


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


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


>>> fillet.writeOutput()
The fillet tool is parsing the file:
Screw Holder Bottom.stl
..
The fillet tool has created the file:
.. Screw Holder Bottom_fillet.gcode

 
Modules
       
__init__
skeinforge_tools.skeinforge_utilities.consecution
skeinforge_tools.skeinforge_utilities.euclidean
skeinforge_tools.skeinforge_utilities.gcodec
skeinforge_tools.skeinforge_utilities.interpret
math
skeinforge_tools.meta_plugins.polyfile
skeinforge_tools.skeinforge_utilities.preferences
sys

 
Classes
       
BevelSkein
ArcSegmentSkein
ArcPointSkein
ArcRadiusSkein
FilletRepository

 
class ArcPointSkein(ArcSegmentSkein)
    A class to arc point a skein of extrusions.
 
 
Method resolution order:
ArcPointSkein
ArcSegmentSkein
BevelSkein

Methods defined here:
addArc(self, afterCenterDifferenceAngle, afterPoint, beforeCenterSegment, beforePoint, center)
Add an arc point to the filleted skein.
getRelativeCenter(self, centerMinusBeforeComplex)
Get the relative center.

Methods inherited from ArcSegmentSkein:
splitPointGetAfter(self, location, nextLocation)
Fillet a point into arc segments and return the end of the last segment.

Methods inherited from BevelSkein:
__init__(self)
addLinearMovePoint(self, feedRateMinute, point)
Add a gcode linear move, feedRate and newline to the output.
getCornerFeedRate(self)
Get the corner feedRate, which may be based on the intermediate feedRate.
getCraftedGcode(self, filletRepository, gcodeText)
Parse gcode text and store the bevel gcode.
getExtruderOffReversalPoint(self, afterSegment, afterSegmentComplex, beforeSegment, beforeSegmentComplex, location)
If the extruder is off and the path is reversing, add intermediate slow points.
getNextLocation(self)
Get the next linear move.  Return none is none is found.
linearMove(self, splitLine)
Bevel a linear move.
parseInitialization(self, filletRepository)
Parse gcode initialization and store the parameters.
parseLine(self, line)
Parse a gcode line and add it to the bevel gcode.

 
class ArcRadiusSkein(ArcPointSkein)
    A class to arc radius a skein of extrusions.
 
 
Method resolution order:
ArcRadiusSkein
ArcPointSkein
ArcSegmentSkein
BevelSkein

Methods defined here:
getRelativeCenter(self, centerMinusBeforeComplex)
Get the relative center.

Methods inherited from ArcPointSkein:
addArc(self, afterCenterDifferenceAngle, afterPoint, beforeCenterSegment, beforePoint, center)
Add an arc point to the filleted skein.

Methods inherited from ArcSegmentSkein:
splitPointGetAfter(self, location, nextLocation)
Fillet a point into arc segments and return the end of the last segment.

Methods inherited from BevelSkein:
__init__(self)
addLinearMovePoint(self, feedRateMinute, point)
Add a gcode linear move, feedRate and newline to the output.
getCornerFeedRate(self)
Get the corner feedRate, which may be based on the intermediate feedRate.
getCraftedGcode(self, filletRepository, gcodeText)
Parse gcode text and store the bevel gcode.
getExtruderOffReversalPoint(self, afterSegment, afterSegmentComplex, beforeSegment, beforeSegmentComplex, location)
If the extruder is off and the path is reversing, add intermediate slow points.
getNextLocation(self)
Get the next linear move.  Return none is none is found.
linearMove(self, splitLine)
Bevel a linear move.
parseInitialization(self, filletRepository)
Parse gcode initialization and store the parameters.
parseLine(self, line)
Parse a gcode line and add it to the bevel gcode.

 
class ArcSegmentSkein(BevelSkein)
    A class to arc segment a skein of extrusions.
 
  Methods defined here:
addArc(self, afterCenterDifferenceAngle, afterPoint, beforeCenterSegment, beforePoint, center)
Add arc segments to the filleted skein.
splitPointGetAfter(self, location, nextLocation)
Fillet a point into arc segments and return the end of the last segment.

Methods inherited from BevelSkein:
__init__(self)
addLinearMovePoint(self, feedRateMinute, point)
Add a gcode linear move, feedRate and newline to the output.
getCornerFeedRate(self)
Get the corner feedRate, which may be based on the intermediate feedRate.
getCraftedGcode(self, filletRepository, gcodeText)
Parse gcode text and store the bevel gcode.
getExtruderOffReversalPoint(self, afterSegment, afterSegmentComplex, beforeSegment, beforeSegmentComplex, location)
If the extruder is off and the path is reversing, add intermediate slow points.
getNextLocation(self)
Get the next linear move.  Return none is none is found.
linearMove(self, splitLine)
Bevel a linear move.
parseInitialization(self, filletRepository)
Parse gcode initialization and store the parameters.
parseLine(self, line)
Parse a gcode line and add it to the bevel gcode.

 
class BevelSkein
    A class to bevel a skein of extrusions.
 
  Methods defined here:
__init__(self)
addLinearMovePoint(self, feedRateMinute, point)
Add a gcode linear move, feedRate and newline to the output.
getCornerFeedRate(self)
Get the corner feedRate, which may be based on the intermediate feedRate.
getCraftedGcode(self, filletRepository, gcodeText)
Parse gcode text and store the bevel gcode.
getExtruderOffReversalPoint(self, afterSegment, afterSegmentComplex, beforeSegment, beforeSegmentComplex, location)
If the extruder is off and the path is reversing, add intermediate slow points.
getNextLocation(self)
Get the next linear move.  Return none is none is found.
linearMove(self, splitLine)
Bevel a linear move.
parseInitialization(self, filletRepository)
Parse gcode initialization and store the parameters.
parseLine(self, line)
Parse a gcode line and add it to the bevel gcode.
splitPointGetAfter(self, location, nextLocation)
Bevel a point and return the end of the bevel.   should get complex for radius

 
class FilletRepository
    A class to handle the fillet preferences.
 
  Methods defined here:
__init__(self)
Set the default preferences, execute title & preferences fileName.
execute(self)
Fillet button has been clicked.

 
Functions
       
getCraftedText(fileName, text, filletRepository=None)
Fillet a gcode linear move file or text.
getCraftedTextFromText(gcodeText, filletRepository=None)
Fillet a gcode linear move text.
getRepositoryConstructor()
Get the repository constructor.
main()
Display the fillet dialog.
writeOutput(fileName='')
Fillet a gcode linear move file. Depending on the preferences, either arcPoint, arcRadius, arcSegment, bevel or do nothing.

 
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)