Skip to content

Commit

Permalink
Version 1.7.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
svenhb authored Dec 18, 2023
1 parent 005f3cf commit 7e91277
Show file tree
Hide file tree
Showing 5 changed files with 265 additions and 226 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ private static void ConvertDrill(string[] drillCode, string info)
Dictionary<string, string> tNrToDiameter = new Dictionary<string, string>();

Logger.Info(" Amount Lines:{0}", drillCode.Length);
if (backgroundWorker != null) backgroundWorker.ReportProgress(0, new MyUserState { Value = 10, Content = "Read DXF vector data of " + drillCode.Length.ToString() + " lines" });
backgroundWorker?.ReportProgress(0, new MyUserState { Value = 10, Content = "Read DXF vector data of " + drillCode.Length.ToString() + " lines" });

int lineNr = 0;
foreach (string line in drillCode)
Expand Down
6 changes: 3 additions & 3 deletions GRBL-Plotter/GCodeCreation/ImportFromFile/GCodeFromGerber.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class GCodeFromGerber
private static Point StartCoordinate = new Point();
private static Point lastMove = new Point();

private static bool handleM19 = true;
//private static bool handleM19 = true;

private static string geometryPen = "pen";
private static string geometryKnife = "knife";
Expand Down Expand Up @@ -179,7 +179,7 @@ private static bool ConvertGerber(string gerberCode, string filePath)
string val = "C,0.03200";
apertures.Add(key, new Aperture(val));

handleM19 = Properties.Settings.Default.importGerberTypeEnable;
//handleM19 = Properties.Settings.Default.importGerberTypeEnable;
geometryPen = Properties.Settings.Default.importGerberTypePen;
geometryKnife = Properties.Settings.Default.importGerberTypeKnife;
geometryM19 = Properties.Settings.Default.importGerberTypeM19;
Expand All @@ -205,7 +205,7 @@ private static void GetVectorGerber(string gerberCode)
bool nextIsInfo = false;

Logger.Info(" Amount Lines:{0}", lines.Length);
if (backgroundWorker != null) backgroundWorker.ReportProgress(0, new MyUserState { Value = 10, Content = "Read Gerber vector data of " + lines.Length.ToString() + " length" });
backgroundWorker?.ReportProgress(0, new MyUserState { Value = 10, Content = "Read Gerber vector data of " + lines.Length.ToString() + " length" });

int lineNr = 0;
foreach (string singleLine in lines)
Expand Down
10 changes: 5 additions & 5 deletions GRBL-Plotter/GCodeCreation/ImportFromFile/GCodeFromHpgl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static class GCodeFromHpgl
private static double charWidth = 2.85;
private static double charHeight = 3.75;
private static double charAngle = 0;
private static string charFont = "standard"; // default GCFontName = "lff\\standard.lff";
//private static string charFont = "standard"; // default GCFontName = "lff\\standard.lff";
private static char charTerminator = '\x3';
private static int charAlign = 7;
private static string symbolChar = "";
Expand Down Expand Up @@ -175,17 +175,17 @@ private static void ResetVariables()
charHeight = 3.75;
charAngle = 0;
charAlign = 7;
charFont = "standard"; // default GCFontName = "lff\\standard.lff";
//charFont = "standard"; // default GCFontName = "lff\\standard.lff";
symbolChar = "";
}

private static void GetVectorHPGL(string hpglCode)
{
string[] fileLines = hpglCode.Split('\n');
char[] charsToTrim = { ' ', '\r', '\n' };
//char[] charsToTrim = { ' ', '\r', '\n' };
string line, cmd, parameter;

if (backgroundWorker != null) backgroundWorker.ReportProgress(0, new MyUserState { Value = 10, Content = "Read HPGL vector data of " + fileLines.Length.ToString() + " lines" });
backgroundWorker?.ReportProgress(0, new MyUserState { Value = 10, Content = "Read HPGL vector data of " + fileLines.Length.ToString() + " lines" });

parameter = cmd = "";
int indexCmd = 0, bwl = 0, bw;
Expand Down Expand Up @@ -590,7 +590,7 @@ private static Point MoveTo(string coord)
{
if (coord.Length > 0)
{
Point tmpPoint = new Point();
Point tmpPoint;// = new Point();
double[] floatArgs = ConvertArgs(coord); // floatArgs = coordinates.Select(arg => double.Parse(arg.Trim(), System.Globalization.NumberStyles.Number, System.Globalization.NumberFormatInfo.InvariantInfo)).ToArray();
Graphic.SetGeometry("moveTo");
Point position = new Point();
Expand Down
Loading

0 comments on commit 7e91277

Please sign in to comment.