Skip to content

Commit

Permalink
Add option to Reverse Insets Print Order
Browse files Browse the repository at this point in the history
  • Loading branch information
totalretribution committed May 29, 2014
1 parent b27a51e commit 179b740
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
28 changes: 21 additions & 7 deletions src/fffProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class fffProcessor
void processSliceData(SliceDataStorage& storage)
{
const unsigned int totalLayers = storage.volumes[0].layers.size();

//carveMultipleVolumes(storage.volumes);
generateMultipleVolumesOverlap(storage.volumes, config.multiVolumeOverlap);
//dumpLayerparts(storage, "c:/models/output.html");
Expand Down Expand Up @@ -568,7 +568,7 @@ class fffProcessor
}
if (config.spiralizeMode)
inset0Config.spiralize = true;

gcodeLayer.addPolygonsByOptimizer(polygons, &inset0Config);
return;
}
Expand Down Expand Up @@ -599,12 +599,26 @@ class fffProcessor
if (static_cast<int>(layerNr) == config.downSkinCount && part->insets.size() > 0)
gcodeLayer.addPolygonsByOptimizer(part->insets[0], &insetXConfig);
}
for(int insetNr=part->insets.size()-1; insetNr>-1; insetNr--)

if (!config.enableReverseInsetOrder)
{
if (insetNr == 0)
gcodeLayer.addPolygonsByOptimizer(part->insets[insetNr], &inset0Config);
else
gcodeLayer.addPolygonsByOptimizer(part->insets[insetNr], &insetXConfig);
for(int insetNr=part->insets.size()-1; insetNr>-1; insetNr--)
{
if (insetNr == 0)
gcodeLayer.addPolygonsByOptimizer(part->insets[insetNr], &inset0Config);
else
gcodeLayer.addPolygonsByOptimizer(part->insets[insetNr], &insetXConfig);
}
}
else
{
for(unsigned int insetNr=0; insetNr<part->insets.size(); insetNr++)
{
if (insetNr == 0)
gcodeLayer.addPolygonsByOptimizer(part->insets[insetNr], &inset0Config);
else
gcodeLayer.addPolygonsByOptimizer(part->insets[insetNr], &insetXConfig);
}
}
}

Expand Down
1 change: 1 addition & 0 deletions src/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ ConfigSettings::ConfigSettings()
SETTING(skirtDistance, 6000);
SETTING(skirtLineCount, 1);
SETTING(skirtMinLength, 0);
SETTING(enableReverseInsetOrder, 0);

SETTING(initialSpeedupLayers, 4);
SETTING(initialLayerSpeed, 20);
Expand Down
1 change: 1 addition & 0 deletions src/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ class ConfigSettings
int skirtDistance;
int skirtLineCount;
int skirtMinLength;
int enableReverseInsetOrder;

//Retraction settings
int retractionAmount;
Expand Down

0 comments on commit 179b740

Please sign in to comment.