Fixed the skirtminlength to map from slic3r to cura
This commit is contained in:
parent
b472366da7
commit
24f0e5c4c0
1 changed files with 23 additions and 1 deletions
|
|
@ -40,7 +40,7 @@ namespace MatterHackers.MatterControl
|
|||
new MapItem("insetCount", "perimeters"),
|
||||
|
||||
new MapItem("skirtLineCount", "skirts"),
|
||||
new MapItem("skirtMinLenght", "min_skirt_length"),
|
||||
new SkirtLengthMaping("skirtMinLength", "min_skirt_length"),
|
||||
new ScaledSingleNumber("skirtDistance", "skirt_distance", 1000),
|
||||
|
||||
new MapItem("fanSpeedMin", "max_fan_speed"),
|
||||
|
|
@ -405,6 +405,28 @@ enableOozeShield = 0;
|
|||
}
|
||||
}
|
||||
|
||||
public class SkirtLengthMaping : MapItem
|
||||
{
|
||||
public SkirtLengthMaping(string curaKey, string defaultKey)
|
||||
: base(curaKey, defaultKey)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CuraValue
|
||||
{
|
||||
get
|
||||
{
|
||||
double lengthToExtrudeMm = double.Parse(base.CuraValue);
|
||||
// we need to convert mm of filament to mm of extrusion path
|
||||
double amountOfFilamentCubicMms = ActiveSliceSettings.Instance.FillamentDiameter * MathHelper.Tau * lengthToExtrudeMm;
|
||||
double extrusionSquareSize = ActiveSliceSettings.Instance.FirstLayerHeight * ActiveSliceSettings.Instance.NozzleDiameter;
|
||||
double lineLength = amountOfFilamentCubicMms / extrusionSquareSize;
|
||||
|
||||
return (lineLength * 1000).ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ScaledSingleNumber : MapItem
|
||||
{
|
||||
internal double scale;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue