public void CopyFrom(SliceBuildConfig source) { dpmmX = source.dpmmX; // dots per mm x dpmmY = source.dpmmY; // dots per mm y xres = source.xres; yres = source.yres; // the resolution of the output image ZThick = source.ZThick; // thickness of the z layer - slicing height layertime_ms = source.layertime_ms; // time to project image per layer in milliseconds firstlayertime_ms = source.firstlayertime_ms; blanktime_ms = source.blanktime_ms; plat_temp = source.plat_temp; // desired platform temperature in celsius // exportgcode = source.exportgcode; // export the gcode file when slicing exportsvg = source.exportsvg; // export the svg slices when building export = source.export; // export image slices when building exportpng = source.exportpng; m_headercode = source.m_headercode; // inserted at beginning of file m_footercode = source.m_footercode; // inserted at end of file m_preslicecode = source.m_preslicecode; // inserted before each slice m_liftcode = source.m_liftcode; // its the main lift code m_shutterclosecode = source.m_shutterclosecode; m_shutteropencode = source.m_shutteropencode; liftdistance = source.liftdistance; direction = source.direction; numfirstlayers = source.numfirstlayers; XOffset = source.XOffset; YOffset = source.YOffset; slidetiltval = source.slidetiltval; antialiasing = source.antialiasing; usemainliftgcode = source.usemainliftgcode; liftfeedrate = source.liftfeedrate; bottomliftfeedrate = source.bottomliftfeedrate; liftretractrate = source.liftretractrate; aaval = source.aaval;// //m_generateautosupports = source.m_generateautosupports; m_exportopt = source.m_exportopt; m_flipX = source.m_flipX; m_flipY = source.m_flipY; m_notes = source.m_notes; m_resinprice = source.m_resinprice; selectedInk = source.selectedInk; m_createoutlines = source.m_createoutlines; m_outlinewidth_inset = source.m_outlinewidth_inset; m_outlinewidth_outset = source.m_outlinewidth_outset; if (source.inks != null) { inks = new Dictionary <string, InkConfig>(); foreach (KeyValuePair <string, InkConfig> entry in source.inks) { inks[entry.Key] = entry.Value; } } minExposure = source.minExposure; exposureStep = source.exposureStep; exportpreview = source.exportpreview; userParams = source.userParams; }
public void CreateDefault() { numfirstlayers = 3; layertime_ms = 1000; // 1 second default firstlayertime_ms = 5000; blanktime_ms = 2000; // 2 seconds blank xres = 1024; yres = 768; ZThick = .05; plat_temp = 75; dpmmX = 102.4; dpmmY = 76.8; XOffset = 0; YOffset = 0; numfirstlayers = 3; //exportgcode = true; exportsvg = 0; export = false; exportpng = false; direction = eBuildDirection.Bottom_Up; liftdistance = 5.0; //raise_time_ms = 750; slidetiltval = 0.0; antialiasing = false; usemainliftgcode = false; aaval = 1.5; liftfeedrate = 50.0; // 50mm/s bottomliftfeedrate = 25.0; liftretractrate = 100.0; // 100mm/s m_exportopt = "SUBDIR"; // default to saving in subdirectory m_flipX = false; m_flipY = false; m_notes = ""; m_resinprice = 0.0;// //set the default gcode segments m_headercode = DefGCodeHeader(); m_footercode = DefGCodeFooter(); m_liftcode = DefGCodeLift(); m_preslicecode = DefGCodePreslice(); m_shutteropencode = DefGCodeOpenShutter(); m_shutterclosecode = DefGCodeCloseShutter(); inks = new Dictionary <string, InkConfig>(); selectedInk = "Default"; inks[selectedInk] = new InkConfig(selectedInk); minExposure = 500; m_createoutlines = false; m_outlinewidth_inset = 2.0; m_outlinewidth_outset = 0.0; exposureStep = 200; exportpreview = PreviewGenerator.ePreview.None; userParams = new UserParameterList(); }
private void LoadInternal(ref XmlHelper xh) { XmlNode sbc = xh.m_toplevel; dpmmX = xh.GetDouble(sbc, "DotsPermmX", 102.4); dpmmY = xh.GetDouble(sbc, "DotsPermmY", 76.8); xres = xh.GetInt(sbc, "XResolution", 1024); yres = xh.GetInt(sbc, "YResolution", 768); //ZThick = xh.GetDouble(sbc, "SliceHeight", 0.05); //layertime_ms = xh.GetInt(sbc, "LayerTime", 1000); // 1 second default //firstlayertime_ms = xh.GetInt(sbc, "FirstLayerTime", 5000); blanktime_ms = xh.GetInt(sbc, "BlankTime", 2000); // 2 seconds blank plat_temp = xh.GetInt(sbc, "PlatformTemp", 75); //exportgcode = xh.GetBool(sbc, "ExportGCode")); exportsvg = xh.GetInt(sbc, "ExportSVG", 0); // the problem is this was previously a boolean variable if ((exportsvg < 0) || (exportsvg > 4)) exportsvg = 0; export = xh.GetBool(sbc, "Export", false); ; exportpng = xh.GetBool(sbc, "ExportPNG", false); ; XOffset = xh.GetInt(sbc, "XOffset", 0); YOffset = xh.GetInt(sbc, "YOffset", 0); //numfirstlayers = xh.GetInt(sbc, "NumberofBottomLayers", 3); direction = (eBuildDirection)xh.GetEnum(sbc, "Direction", typeof(eBuildDirection), eBuildDirection.Bottom_Up); liftdistance = xh.GetDouble(sbc, "LiftDistance", 5.0); slidetiltval = xh.GetDouble(sbc, "SlideTiltValue", 0.0); antialiasing = xh.GetBool(sbc, "AntiAliasing", false); usemainliftgcode = xh.GetBool(sbc, "UseMainLiftGCode", false); aaval = xh.GetDouble(sbc, "AntiAliasingValue", 1.5); liftfeedrate = xh.GetDouble(sbc, "LiftFeedRate", 50.0); // 50mm/s bottomliftfeedrate = xh.GetDouble(sbc, "BottomLiftFeedRate", 25.0); // 50mm/s liftretractrate = xh.GetDouble(sbc, "LiftRetractRate", 100.0); // 100mm/s m_exportopt = xh.GetString(sbc, "ExportOption", "SUBDIR"); // default to saving in subdirectory m_flipX = xh.GetBool(sbc, "FlipX", false); m_flipY = xh.GetBool(sbc, "FlipY", false); m_notes = xh.GetString(sbc, "Notes", ""); m_createoutlines = xh.GetBool(sbc, "RenderOutlines", false); m_outlinewidth_inset = xh.GetDouble(sbc, "OutlineWidth_Inset", 2.0); m_outlinewidth_outset = xh.GetDouble(sbc, "OutlineWidth_Outset", 0.0); //m_resinprice = xh.GetDouble(sbc, "ResinPriceL", 0.0); m_headercode = xh.GetString(sbc, "GCodeHeader", DefGCodeHeader()); m_footercode = xh.GetString(sbc, "GCodeFooter", DefGCodeFooter()); m_preslicecode = xh.GetString(sbc, "GCodePreslice", DefGCodePreslice()); m_liftcode = xh.GetString(sbc, "GCodeLift", DefGCodeLift()); selectedInk = xh.GetString(sbc, "SelectedInk", "Default"); inks = new Dictionary<string, InkConfig>(); List<XmlNode> inkNodes = xh.FindAllChildElement(sbc, "InkConfig"); foreach (XmlNode xnode in inkNodes) { string name = xh.GetString(xnode, "Name", "Default"); InkConfig ic = new InkConfig(name); ic.Load(xh, xnode); inks[name] = ic; } if (!inks.ContainsKey(selectedInk)) { InkConfig ic = new InkConfig(selectedInk); ic.Load(xh, sbc); // try loading legacy settings from parent inks[selectedInk] = ic; } SetCurrentInk(selectedInk); minExposure = xh.GetInt(sbc, "MinTestExposure", 500); exposureStep = xh.GetInt(sbc, "TestExposureStep", 200); exportpreview = (PreviewGenerator.ePreview)xh.GetEnum(sbc, "ExportPreview", typeof(PreviewGenerator.ePreview), PreviewGenerator.ePreview.None); xh.LoadUserParamList(userParams); }
public void CreateDefault() { numfirstlayers = 3; layertime_ms = 1000;// 1 second default firstlayertime_ms = 5000; blanktime_ms = 2000; // 2 seconds blank xres = 1024; yres = 768; ZThick = .05; plat_temp = 75; dpmmX = 102.4; dpmmY = 76.8; XOffset = 0; YOffset = 0; numfirstlayers = 3; //exportgcode = true; exportsvg = 0; export = false; exportpng = false; direction = eBuildDirection.Bottom_Up; liftdistance = 5.0; //raise_time_ms = 750; slidetiltval = 0.0; antialiasing = false; usemainliftgcode = false; aaval = 1.5; liftfeedrate = 50.0;// 50mm/s bottomliftfeedrate = 25.0; liftretractrate = 100.0;// 100mm/s m_exportopt = "SUBDIR"; // default to saving in subdirectory m_flipX = false; m_flipY = false; m_notes = ""; m_resinprice = 0.0;// //set the default gcode segments m_headercode = DefGCodeHeader(); m_footercode = DefGCodeFooter(); m_liftcode = DefGCodeLift(); m_preslicecode = DefGCodePreslice(); inks = new Dictionary<string, InkConfig>(); selectedInk = "Default"; inks[selectedInk] = new InkConfig(selectedInk); minExposure = 500; m_createoutlines = false; m_outlinewidth_inset = 2.0; m_outlinewidth_outset = 0.0; exposureStep = 200; exportpreview = PreviewGenerator.ePreview.None; userParams = new UserParameterList(); }
public void CopyFrom(SliceBuildConfig source) { dpmmX = source.dpmmX; // dots per mm x dpmmY = source.dpmmY; // dots per mm y xres = source.xres; yres = source.yres; // the resolution of the output image ZThick = source.ZThick; // thickness of the z layer - slicing height layertime_ms = source.layertime_ms; // time to project image per layer in milliseconds firstlayertime_ms = source.firstlayertime_ms; blanktime_ms = source.blanktime_ms; plat_temp = source.plat_temp; // desired platform temperature in celsius // exportgcode = source.exportgcode; // export the gcode file when slicing exportsvg = source.exportsvg; // export the svg slices when building export = source.export; // export image slices when building exportpng = source.exportpng; m_headercode = source.m_headercode; // inserted at beginning of file m_footercode = source.m_footercode; // inserted at end of file m_preslicecode = source.m_preslicecode; // inserted before each slice m_liftcode = source.m_liftcode; // its the main lift code liftdistance = source.liftdistance; direction = source.direction; numfirstlayers = source.numfirstlayers; XOffset = source.XOffset; YOffset = source.YOffset; slidetiltval = source.slidetiltval; antialiasing = source.antialiasing; usemainliftgcode = source.usemainliftgcode; liftfeedrate = source.liftfeedrate; bottomliftfeedrate = source.bottomliftfeedrate; liftretractrate = source.liftretractrate; aaval = source.aaval;// //m_generateautosupports = source.m_generateautosupports; m_exportopt = source.m_exportopt; m_flipX = source.m_flipX; m_flipY = source.m_flipY; m_notes = source.m_notes; m_resinprice = source.m_resinprice; selectedInk = source.selectedInk; m_createoutlines = source.m_createoutlines; m_outlinewidth_inset = source.m_outlinewidth_inset; m_outlinewidth_outset = source.m_outlinewidth_outset; if (source.inks != null) { inks = new Dictionary<string, InkConfig>(); foreach (KeyValuePair<string, InkConfig> entry in source.inks) { inks[entry.Key] = entry.Value; } } minExposure = source.minExposure; exposureStep = source.exposureStep; exportpreview = source.exportpreview; userParams = source.userParams; }
private void LoadInternal(ref XmlHelper xh) { XmlNode sbc = xh.m_toplevel; dpmmX = xh.GetDouble(sbc, "DotsPermmX", 102.4); dpmmY = xh.GetDouble(sbc, "DotsPermmY", 76.8); xres = xh.GetInt(sbc, "XResolution", 1024); yres = xh.GetInt(sbc, "YResolution", 768); //ZThick = xh.GetDouble(sbc, "SliceHeight", 0.05); //layertime_ms = xh.GetInt(sbc, "LayerTime", 1000); // 1 second default //firstlayertime_ms = xh.GetInt(sbc, "FirstLayerTime", 5000); blanktime_ms = xh.GetInt(sbc, "BlankTime", 2000); // 2 seconds blank plat_temp = xh.GetInt(sbc, "PlatformTemp", 75); //exportgcode = xh.GetBool(sbc, "ExportGCode")); exportsvg = xh.GetInt(sbc, "ExportSVG", 0); // the problem is this was previously a boolean variable if ((exportsvg < 0) || (exportsvg > 4)) { exportsvg = 0; } export = xh.GetBool(sbc, "Export", false);; exportpng = xh.GetBool(sbc, "ExportPNG", false);; XOffset = xh.GetInt(sbc, "XOffset", 0); YOffset = xh.GetInt(sbc, "YOffset", 0); //numfirstlayers = xh.GetInt(sbc, "NumberofBottomLayers", 3); direction = (eBuildDirection)xh.GetEnum(sbc, "Direction", typeof(eBuildDirection), eBuildDirection.Bottom_Up); liftdistance = xh.GetDouble(sbc, "LiftDistance", 5.0); slidetiltval = xh.GetDouble(sbc, "SlideTiltValue", 0.0); antialiasing = xh.GetBool(sbc, "AntiAliasing", false); usemainliftgcode = xh.GetBool(sbc, "UseMainLiftGCode", false); aaval = xh.GetDouble(sbc, "AntiAliasingValue", 1.5); liftfeedrate = xh.GetDouble(sbc, "LiftFeedRate", 50.0); // 50mm/s bottomliftfeedrate = xh.GetDouble(sbc, "BottomLiftFeedRate", 25.0); // 50mm/s liftretractrate = xh.GetDouble(sbc, "LiftRetractRate", 100.0); // 100mm/s m_exportopt = xh.GetString(sbc, "ExportOption", "SUBDIR"); // default to saving in subdirectory m_flipX = xh.GetBool(sbc, "FlipX", false); m_flipY = xh.GetBool(sbc, "FlipY", false); m_notes = xh.GetString(sbc, "Notes", ""); m_createoutlines = xh.GetBool(sbc, "RenderOutlines", false); m_outlinewidth_inset = xh.GetDouble(sbc, "OutlineWidth_Inset", 2.0); m_outlinewidth_outset = xh.GetDouble(sbc, "OutlineWidth_Outset", 0.0); //m_resinprice = xh.GetDouble(sbc, "ResinPriceL", 0.0); m_headercode = xh.GetString(sbc, "GCodeHeader", DefGCodeHeader()); m_footercode = xh.GetString(sbc, "GCodeFooter", DefGCodeFooter()); m_preslicecode = xh.GetString(sbc, "GCodePreslice", DefGCodePreslice()); m_liftcode = xh.GetString(sbc, "GCodeLift", DefGCodeLift()); m_shutterclosecode = xh.GetString(sbc, "GCodeShutterClose", DefGCodeCloseShutter()); m_shutteropencode = xh.GetString(sbc, "GCodeShutterOpen", DefGCodeOpenShutter()); selectedInk = xh.GetString(sbc, "SelectedInk", "Default"); inks = new Dictionary <string, InkConfig>(); List <XmlNode> inkNodes = xh.FindAllChildElement(sbc, "InkConfig"); foreach (XmlNode xnode in inkNodes) { string name = xh.GetString(xnode, "Name", "Default"); InkConfig ic = new InkConfig(name); ic.Load(xh, xnode); inks[name] = ic; } if (!inks.ContainsKey(selectedInk)) { InkConfig ic = new InkConfig(selectedInk); ic.Load(xh, sbc); // try loading legacy settings from parent inks[selectedInk] = ic; } SetCurrentInk(selectedInk); minExposure = xh.GetInt(sbc, "MinTestExposure", 500); exposureStep = xh.GetInt(sbc, "TestExposureStep", 200); exportpreview = (PreviewGenerator.ePreview)xh.GetEnum(sbc, "ExportPreview", typeof(PreviewGenerator.ePreview), PreviewGenerator.ePreview.None); xh.LoadUserParamList(userParams); }