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

Raft is a script to create a raft, elevate the nozzle and set the temperature.

Allan Ecker aka The Masked Retriever's has written two quicktips for raft which follow below.
"Skeinforge Quicktip: The Raft, Part 1" at:
http://blog.thingiverse.com/2009/07/14/skeinforge-quicktip-the-raft-part-1/
"Skeinforge Quicktip: The Raft, Part II" at:
http://blog.thingiverse.com/2009/08/04/skeinforge-quicktip-the-raft-part-ii/

The default 'Activate Raft' checkbox is on. When it is on, the functions described below will work, when it is off, the functions will not be called. The raft script sets the temperature. If the "Activate Raft, Elevate Nozzle, Orbit and Set Altitude" checkbox is checked, the script will also create a raft, elevate the nozzle, orbit and set the altitude of the bottom of the raft.

Raft is based on the Nophead's reusable raft, which has a base layer running one way, and a couple of perpendicular layers above. Each set of layers can be set to a different temperature. There is the option of having the extruder orbit the raft for a while, so the heater barrel has time to reach a different temperature, without ooze accumulating around the nozzle.

The important values for the raft preferences are the temperatures of the raft, the first layer and the next layers. These will be different for each material. The default preferences for ABS, HDPE, PCL & PLA are extrapolated from Nophead's experiments.

This brings up the profile preferences dialog. In that dialog you can add or delete a profile on the listbox and you change the selected profile. After you can change the selected profile, run raft again. If there are preferences for the new profile, those will be in the raft dialog. If there are no preferences for the new profile, the preferences will be set to defaults and you will have to set new preferences for the new profile.

The "Base Infill Density" preference is the infill density ratio of the base of the raft, the default ratio is half. The "Base Layer Height over Layer Thickness" preference is the ratio of the height & width of the base layer compared to the height and width of the shape infill, the default is two. The feed rate will be slower for raft layers which have thicker extrusions than the shape infill. The "Base Layers" preference is the number of base layers, the default is one. The "Base Nozzle Lift over Base Layer Thickness" is the amount the nozzle is above the center of the extrusion divided by the base layer thickness.

The interface of the raft has equivalent preferences called "Interface Infill Density", "Interface Layer Thickness over Extrusion Height", "Interface Layers" and "Interface Nozzle Lift over Base Layer Thickness". The shape has the equivalent preference of called "Operating Nozzle Lift over Layer Thickness".

The altitude that the bottom of the raft will be set to the "Bottom Altitude" preference.

The raft fills a rectangle whose base size is the rectangle around the bottom layer of the shape expanded on each side by the 'Raft Margin' plus the 'Raft Additional Margin over Length (%)' percentage times the length of the side. The default 'Raft Margin' is 3 millimeters and the default 'Raft Additional Margin over Length (%)' is 1 percent. The rectangle size is then reduced by the 'Infill Overhang' ratio times the width of the extrusion of the raft.

In the "Support Material Choice" radio button group, if "No Support Material" is selected then raft will not add support material, this is the default because the raft takes time to generate. If "Support Material Everywhere" is selected, support material will be added wherever there are overhangs, even inside the object; because support material inside objects is hard or impossible to remove, this option should only be chosen if the shape has a cavity that needs support and there is some way to extract the support material. If "Support Material on Exterior Only" is selected, support material will be added only the exterior of the object; this is the best option for most objects which require support material. The "Support Minimum Angle" preference is the minimum angle that a surface overhangs before support material is added, the default is sixty degrees. The "Support Flowrate over Operating Flowrate" is the ratio of the flow rate when the support is extruded over the operating flow rate. With a number less than one, the support flow rate will be smaller so the support will be thinner and easier to remove, the default is 0.9. The "Support Gap over Perimeter Extrusion Width" is the gap between the support material and the object over the perimeter extrusion width, the default is 0.5.

If support material is generated, then if there is a file support_start.gcode, it will add that to the start of the support gcode. After it has added the support gcode, it will add the file support_end.gcode if it exists. Raft does not care if the text file names are capitalized, but some file systems do not handle file name cases properly, so to be on the safe side you should give them lower case names. Raft looks for those files in the alterations folder in the .skeinforge folder in the home directory. If it doesn't find the file it then looks in the alterations folder in the skeinforge_tools folder. If it doesn't find anything there it looks in the skeinforge_tools folder.

The extruder will orbit for at least "Temperature Change Time Before Raft" seconds before extruding the raft. It will orbit for at least "Temperature Change Time Before First Layer Outline" seconds before extruding the outline of the first layer of the shape. It will orbit for at least "Temperature Change Time Before Next Threads" seconds before extruding within the outline of the first layer of the shape and before extruding the next layers of the shape. It will orbit for at least "Temperature Change Time Before Support Layers" seconds before extruding the support layers. It will orbit for at least "Temperature Change Time Before Supported Layers" seconds before extruding the layer of the shape above the support layer. If a time is zero, it will not orbit.

The "Temperature of Raft" preference sets the temperature of the raft. The "Temperature of Shape First Layer Outline" preference sets the temperature of the outline of the first layer of the shape. The "Temperature of Shape First Layer Within" preference sets the temperature within the outline of the first layer of the shape. The "Temperature of Shape Next Layers" preference sets the temperature of the next layers of the shape. The "Temperature of Support Layers" preference sets the temperature of the support layer. The "Temperature of Supported Layers" preference sets the temperature of the layer of the shape above the support layer.

The following examples raft the file Screw Holder Bottom.stl. The examples are run in a terminal in the folder which contains Screw Holder Bottom.stl and raft.py. Pictures of rafting in action are available from the Metalab blog at:
http://reprap.soup.io/?search=rafting


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


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


>>> raft.writeOutput( 'Screw Holder Bottom.stl' )
Screw Holder Bottom.stl
The raft tool is parsing the file:
Screw Holder Bottom.stl
..
The raft tool has created the file:
Screw Holder Bottom_raft.gcode

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

 
Classes
       
RaftRepository
RaftSkein

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

 
class RaftSkein
    A class to raft a skein of extrusions.
 
  Methods defined here:
__init__(self)
addBaseLayer(self, baseExtrusionWidth, baseStep, stepBegin, stepEnd)
Add a base layer.
addFlowrateLineIfNecessary(self, flowRateString)
Add a line of flow rate if different.
addInterfaceLayer(self)
Add an interface layer.
addLayerFromSegments(self, layerLayerThickness, layerThicknessRatio, segments, z)
Add a layer from segments and raise the extrusion top.
addLayerLine(self, z)
Add the layer gcode line and close the last layer gcode block.
addOperatingOrbits(self, boundaryLoops, pointComplex, temperatureChangeTime, z)
Add the orbits before the operating layers.
addRaft(self)
Add the raft.
addSupportLayerTemperature(self, endpoints, z)
Add support layer and temperature before the object layer.
addSupportSegmentTable(self, layerIndex)
Add support segments from the boundary layers.
addTemperature(self, temperature)
Add a line of temperature.
addTemperatureOrbits(self, endpoints, temperaturePreference, temperatureTimeChangePreference, z)
Add the temperature and orbits around the support layer.
addToFillXIntersectionIndexTables(self, fillXIntersectionIndexTables, layerIndex)
Add fill segments from the boundary layers.
extendSegments(self, loops, radius, supportSegmentTableIndex)
Extend the support segments.
getCraftedGcode(self, gcodeText, raftRepository)
Parse gcode text and store the raft gcode.
getElevatedBoundaryLine(self, splitLine)
Get elevated boundary gcode line.
getRaftedLine(self, splitLine)
Get elevated gcode line with operating feed rate.
getStepsUntilEnd(self, begin, end, stepSize)
Get steps from the beginning until the end.
getSupportEndpoints(self)
Get the support layer segments.
joinSegments(self, supportSegmentTableIndex)
Join the support segments of this layer with those of the layer above.
parseInitialization(self)
Parse gcode initialization and store the parameters.
parseLine(self, line)
Parse a gcode line and add it to the raft skein.
setBoundaryLayers(self)
Set the boundary layers.
setCornersZ(self)
Set maximum and minimum corners and z.
setInterfaceVariables(self, interfaceExtrusionWidth, stepBegin, stepEnd)
Set the interface variables.
setOperatingFlowString(self, splitLine)
Set the operating flow string from the split line.
subtractJoinedFill(self, fillXIntersectionIndexTables, supportSegmentTableIndex)
Join the fill then subtract it from the support layer table.
truncateSupportSegmentTables(self)
Truncate the support segments after the last support segment which contains elements.

 
Functions
       
addXIntersectionsFromSegment(index, segment, xIntersectionIndexList)
Add the x intersections from the segment.
addXIntersectionsFromSegments(index, segments, xIntersectionIndexList)
Add the x intersections from the segments.
getCraftedText(fileName, text='', raftRepository=None)
Raft the file or text.
getCraftedTextFromText(gcodeText, raftRepository=None)
Raft a gcode linear move text.
getCrossHatchPointLine(crossHatchPointLineTable, y)
Get the cross hatch point line.
getEndpointsFromYIntersections(x, yIntersections)
Get endpoints from the y intersections.
getExtendedLineSegment(extensionDistance, lineSegment, loopXIntersections)
Get extended line segment.
getJoinOfXIntersectionIndexes(xIntersectionIndexList)
Get x intersections from surrounding layers.
getRepositoryConstructor()
Get the repository constructor.
joinSegmentTables(fromTable, intoTable)
Join both segment tables and put the join into the intoTable.
main()
Display the raft dialog.
setExtendedPoint(lineSegmentEnd, pointOriginal, x)
Set the point in the extended line segment.
subtractFill(fillXIntersectionIndexTable, supportSegmentLayerTable)
Subtract fill from the support layer table.
writeOutput(fileName='')
Raft a gcode linear move file.

 
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)