Quick integrate
This commit is contained in:
parent
fff0cc8bd7
commit
2c1fe5a1f9
5 changed files with 143 additions and 0 deletions
|
|
@ -17,6 +17,7 @@
|
|||
</ProjectReference>
|
||||
<ProjectReference Include="..\Submodules\agg-sharp\agg\Agg.csproj">
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Submodules\agg-sharp\DataConverters3D\DataConverters3D.csproj" />
|
||||
<ProjectReference Include="..\Submodules\agg-sharp\Localizations\Localizations.csproj" />
|
||||
<ProjectReference Include="..\Submodules\agg-sharp\VectorMath\VectorMath.csproj">
|
||||
</ProjectReference>
|
||||
|
|
|
|||
39
MatterControl.Printing/Settings/IObjectSlicer.cs
Normal file
39
MatterControl.Printing/Settings/IObjectSlicer.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
Copyright (c) 2019, Lars Brubaker, John Lewin
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
The views and conclusions contained in the software and documentation are those
|
||||
of the authors and should not be interpreted as representing official policies,
|
||||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
using System.IO;
|
||||
using MatterHackers.DataConverters3D;
|
||||
|
||||
namespace MatterHackers.MatterControl.SlicerConfiguration
|
||||
{
|
||||
public interface IObjectSlicer
|
||||
{
|
||||
bool Slice(IObject3D object3D, PrinterSettings printerSettings, Stream outputStream);
|
||||
}
|
||||
}
|
||||
|
|
@ -34,6 +34,7 @@ using System.Linq;
|
|||
using System.Text;
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.MatterControl.SlicerConfiguration.MappingClasses;
|
||||
using MatterHackers.DataConverters3D;
|
||||
using MatterHackers.VectorMath;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
|
@ -72,6 +73,9 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
|
||||
public class PrinterSettings
|
||||
{
|
||||
// TODO: Move to more appropriate location after more consideration
|
||||
public static IObjectSlicer ExternalSlicer { get; set; }
|
||||
|
||||
// Latest version should be in the form of:
|
||||
// Year|month|day|versionForDay (to support multiple revisions on a given day)
|
||||
public static int LatestVersion { get; } = 201606271;
|
||||
|
|
|
|||
|
|
@ -328,6 +328,26 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
matrixAndMeshArgs.Append($" \"{fileName}\" ");
|
||||
}
|
||||
|
||||
// Map from PrinterSettings to PrintSettings
|
||||
if (PrinterSettings.ExternalSlicer != null)
|
||||
{
|
||||
var children = stlFileLocations.Select(s => new Object3D()
|
||||
{
|
||||
MeshPath = s.fileName,
|
||||
Matrix = s.matrix
|
||||
});
|
||||
|
||||
using (var outputStream = File.OpenWrite(gcodeFilePath))
|
||||
{
|
||||
PrinterSettings.ExternalSlicer.Slice(
|
||||
new Object3D(children),
|
||||
printer.Settings,
|
||||
outputStream);
|
||||
}
|
||||
|
||||
return Task.FromResult(true);
|
||||
}
|
||||
|
||||
printer.EngineMappingsMatterSlice.WriteSliceSettingsFile(
|
||||
configFilePath,
|
||||
new[]
|
||||
|
|
|
|||
79
PrusaI3-MK3/Defaults.txt
Normal file
79
PrusaI3-MK3/Defaults.txt
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
"BridgeExtrudeSpeedX": 0.5,
|
||||
"BridgeFillNozzleDiamStepX": 0.85,
|
||||
"BridgeVolumeScale": 1.0,
|
||||
"CarefulExtrudeSpeed": 1200.0,
|
||||
"ClassTypeName": "gs.info.PrusaSettings",
|
||||
"ClipSelfOverlaps": false,
|
||||
"EnableBridging": true,
|
||||
"EnableRetraction": true,
|
||||
"EnableSupportReleaseOpt": true,
|
||||
"EnableSupportShell": true,
|
||||
"ExtruderTempC": 200,
|
||||
"FanSpeedX": 1.0,
|
||||
"FloorLayers": 2,
|
||||
"GenerateSupport": true,
|
||||
"HeatedBedTempC": 60,
|
||||
"Identifier": "Defaults",
|
||||
"InteriorSolidRegionShells": 0,
|
||||
"LayerHeightMM": 0.2,
|
||||
"Machine": {
|
||||
"ManufacturerName": "Prusa",
|
||||
"ManufacturerUUID": "4530287d-cd23-416c-b74b-4876c385750a",
|
||||
"ModelIdentifier": "i3 MK3",
|
||||
"ModelUUID": "fc09f99c-aee0-45e9-bca3-3e088ccb0b55",
|
||||
"Class": "PlasticFFFPrinter",
|
||||
"BedSizeXMM": 250.0,
|
||||
"BedSizeYMM": 210.0,
|
||||
"MaxHeightMM": 200.0,
|
||||
"FilamentDiamMM": 1.75,
|
||||
"NozzleDiamMM": 0.4,
|
||||
"MinExtruderTempC": 20,
|
||||
"MaxExtruderTempC": 300,
|
||||
"HasHeatedBed": true,
|
||||
"MinBedTempC": 0,
|
||||
"MaxBedTempC": 120,
|
||||
"MinLayerHeightMM": 0.05,
|
||||
"MaxLayerHeightMM": 0.35,
|
||||
"EnableAutoBedLeveling": true,
|
||||
"HasAutoBedLeveling": true,
|
||||
"MaxExtrudeSpeedMMM": 4800,
|
||||
"MaxRetractSpeedMMM": 2100,
|
||||
"MaxTravelSpeedMMM": 7200,
|
||||
"MaxZTravelSpeedMMM": 15000,
|
||||
"MinPointSpacingMM": 0.1
|
||||
},
|
||||
"MaxBridgeWidthMM": 10.0,
|
||||
"MinExtrudeSpeed": 1200.0,
|
||||
"MinLayerTime": 5.0,
|
||||
"MinRetractTravelLength": 2.5,
|
||||
"ModelEnum": "i3_MK3",
|
||||
"OuterPerimeterSpeedX": 0.5,
|
||||
"OuterShellLast": false,
|
||||
"RapidExtrudeSpeed": 4800.0,
|
||||
"RapidTravelSpeed": 7200.0,
|
||||
"RetractDistanceMM": 0.7,
|
||||
"RetractSpeed": 2100.0,
|
||||
"RoofLayers": 2,
|
||||
"SelfOverlapToleranceX": 0.75,
|
||||
"Shells": 2,
|
||||
"ShellsFillNozzleDiamStepX": 1.0,
|
||||
"SolidFillBorderOverlapX": 0.25,
|
||||
"SolidFillNozzleDiamStepX": 1.0,
|
||||
"SparseFillBorderOverlapX": 0.25,
|
||||
"SparseLinearInfillStepX": 5.0,
|
||||
"StartLayerHeightMM": 0.0,
|
||||
"StartLayers": 0,
|
||||
"SupportAreaOffsetX": -0.5,
|
||||
"SupportMinDimension": 1.5,
|
||||
"SupportMinZTips": true,
|
||||
"SupportOverhangAngleDeg": 35.0,
|
||||
"SupportPointDiam": 2.5,
|
||||
"SupportPointSides": 4,
|
||||
"SupportRegionJoinTolX": 2.0,
|
||||
"SupportReleaseGap": 0.20000000298023224,
|
||||
"SupportSolidSpace": 0.34999999403953552,
|
||||
"SupportSpacingStepX": 5.0,
|
||||
"SupportVolumeScale": 1.0,
|
||||
"ZTravelSpeed": 15000.0
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue