public SingleMaterialFFFPrintGenPro(PrintMeshAssembly meshes, PlanarSliceStack slices, SingleMaterialFFFSettings settings, AssemblerFactoryF overrideAssemblerF = null) : base(meshes, slices, settings, overrideAssemblerF) { }
public SLSPrintGenerator(PrintMeshAssembly meshes, PlanarSliceStack slices, SingleMaterialFFFSettings settings, ThreeAxisLaserCompiler compiler) { Initialize(meshes, slices, settings, compiler); }
public SLSPrintGenerator(PrintMeshAssembly meshes, PlanarSliceStack slices, PrintProfileFFF settings, IThreeAxisLaserCompiler compiler) { Initialize(meshes, slices, settings, compiler); }
public SingleMaterialFFFPrintGenerator(PrintMeshAssembly meshes, PlanarSliceStack slices, SingleMaterialFFFSettings settings, AssemblerFactoryF overrideAssemblerF = null) { Initialize(meshes, slices, settings, overrideAssemblerF); }
public GCodeFile GCodeFromPrintMeshAssembly(PrintMeshAssembly printMeshAssembly, out IEnumerable <string> generationReport, TPrintSettings settings = null) { PlanarSliceStack slices = null; if (AcceptsParts) { SliceMesh(printMeshAssembly, out slices); } var globalSettings = settings ?? settingsBuilder.Settings; // Run the print generator logger.WriteLine("Running print generator..."); var printGenerator = new TPrintGenerator(); AssemblerFactoryF overrideAssemblerF = globalSettings.AssemblerType(); printGenerator.Initialize(printMeshAssembly, slices, globalSettings, overrideAssemblerF); if (printGenerator.Generate()) { generationReport = printGenerator.GenerationReport; return(printGenerator.Result); } else { throw new Exception("PrintGenerator failed to generate gcode!"); } }
public virtual GCodeFile GCodeFromPrintMeshAssembly(PrintMeshAssembly printMeshAssembly, out GCodeGenerationDetails details, TPrintSettings settings = null, CancellationToken?cancellationToken = null) { PlanarSliceStack slices = null; var globalSettings = settings ?? settingsBuilder.Settings; if (AcceptsParts) { SliceMesh(printMeshAssembly, out slices, globalSettings.Part.LayerHeightMM); } // Run the print generator logger.WriteLine("Running print generator..."); var printGenerator = new TPrintGenerator(); AssemblerFactoryF overrideAssemblerF = (globalSettings.MachineProfile as MachineProfileBase).AssemblerFactory(); printGenerator.Initialize(printMeshAssembly, slices, globalSettings, overrideAssemblerF); if (printGenerator.Generate(cancellationToken)) { details = new GCodeGenerationDetails(printGenerator.PrintTimeEstimate, printGenerator.MaterialUsageEstimate, printGenerator.Warnings); return(printGenerator.Result); } else { throw new Exception("PrintGenerator failed to generate gcode!"); } }
public bool Add(PrintMeshAssembly assy) { foreach (var pair in assy.MeshesAndOptions()) { AddMesh(pair.Item1, pair.Item2); } return(true); }
public void Initialize(PrintMeshAssembly meshes, PlanarSliceStack slices, SingleMaterialFFFSettings settings, ThreeAxisLaserCompiler compiler) { PrintMeshes = meshes; Slices = slices; Settings = settings; Compiler = compiler; }
public void Initialize(PrintMeshAssembly meshes, PlanarSliceStack slices, PrintProfileFFF settings, IThreeAxisLaserCompiler compiler) { PrintMeshes = meshes; Slices = slices; Settings = settings; Compiler = compiler; }
private PrintMeshAssembly PrintMeshAssemblyFromMeshes(IEnumerable <DMesh3> meshes) { if (AcceptsParts) { var printMeshAssembly = new PrintMeshAssembly(); printMeshAssembly.AddMeshes(meshes, PrintMeshOptionsFactory.Default()); return(printMeshAssembly); } return(null); }
public GenericSLSPrintGenerator(PrintMeshAssembly meshes, PlanarSliceStack slices, SingleMaterialFFFSettings settings) { file_accumulator = new GCodeFileAccumulator(); //builder = new GCodeBuilder(file_accumulator); //compiler = new SLSCompiler(builder, settings); compiler = new SLSCompiler(settings); base.Initialize(meshes, slices, settings, compiler); }
public override void Initialize(PrintMeshAssembly meshes, PlanarSliceStack slices, SingleMaterialFFFSettings settings, AssemblerFactoryF overrideAssemblerF = null) { file_accumulator = new GCodeFileAccumulator(); builder = new GCodeBuilder(file_accumulator); AssemblerFactoryF useAssembler = overrideAssemblerF ?? settings.AssemblerType(); compiler = new SingleMaterialFFFCompiler(builder, settings, useAssembler); Initialize(meshes, slices, settings, compiler); }
private void SliceMesh(PrintMeshAssembly meshes, out PlanarSliceStack slices) { logger?.WriteLine("Slicing..."); // Do slicing MeshPlanarSlicer slicer = new MeshPlanarSlicer() { LayerHeightMM = Settings.LayerHeightMM }; slicer.Add(meshes); slices = slicer.Compute(); }
protected virtual void SliceMesh(PrintMeshAssembly meshes, out PlanarSliceStack slices, double layerHeight) { logger?.WriteLine("Slicing..."); // Do slicing MeshPlanarSlicer slicer = new MeshPlanarSlicer() { LayerHeightMM = layerHeight, }; slicer.Add(meshes); slices = slicer.Compute(); }
public GCodeFile GenerateGCode(IList <Tuple <DMesh3, TPrintSettings> > parts, TPrintSettings globalSettings, out IEnumerable <string> generationReport, Action <GCodeLine> gcodeLineReadyF = null, Action <string> progressMessageF = null) { if (AcceptsParts == false && parts != null && parts.Count > 0) { throw new Exception("Must pass null or empty list of parts to generator that does not accept parts."); } // Create print mesh set PrintMeshAssembly meshes = new PrintMeshAssembly(); foreach (var part in parts) { if (part.Item2 != null) { throw new ArgumentException($"Entries for the `parts` arguments must have a null second item since this generator does not handle per-part settings."); } meshes.AddMesh(part.Item1, PrintMeshOptions.Default()); } progressMessageF?.Invoke("Slicing..."); // Do slicing MeshPlanarSlicer slicer = new MeshPlanarSlicer() { LayerHeightMM = globalSettings.LayerHeightMM }; slicer.Add(meshes); PlanarSliceStack slices = slicer.Compute(); // Run the print generator progressMessageF?.Invoke("Running print generator..."); var printGenerator = new TPrintGenerator(); AssemblerFactoryF overrideAssemblerF = globalSettings.AssemblerType(); printGenerator.Initialize(meshes, slices, globalSettings, overrideAssemblerF); if (printGenerator.Generate()) { generationReport = printGenerator.GenerationReport; return(printGenerator.Result); } else { throw new Exception("PrintGenerator failed to generate gcode!"); } }