Skip to content

Commit

Permalink
general cleanup and checking for oversights
Browse files Browse the repository at this point in the history
  • Loading branch information
StijnKuipers committed Mar 10, 2021
1 parent 627c9d4 commit 35713e0
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 13 deletions.
3 changes: 3 additions & 0 deletions GerberCombiner/CombinerProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ static void Main(string[] args)
//GS.Split("%SRX1Y1I0.00000J1.76100*%", new GerberLibrary.Core.Primitives.GerberNumberFormat(),true);
//Console.WriteLine("{0}", GS.Pairs.Count);
Gerber.ShowProgress = true;
Gerber.DumpSanitizedOutput = true;
Gerber.WriteSanitized = true;

if (args.Count() < 2)
{
Console.WriteLine("usage: ");
Expand Down
1 change: 0 additions & 1 deletion GerberLibrary/Artwork Related/GerberArtWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,6 @@ private static void ArtGenerator_ReactDiffuse(ProgressLog log, string outline, s

{
int img = 0;
int forceiter = 0;
RD_Elem[] FieldA = new RD_Elem[iW * iH];
RD_Elem[] FieldB = new RD_Elem[iW * iH];
Random R = new Random(0);
Expand Down
2 changes: 1 addition & 1 deletion GerberLibrary/Core/BillOfMaterials.cs
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ public void LoadPrinted(string filename)

//string Header = "Count,Name,Type,Package,Value,MfgPartNumber,RefDes";

int idxcount = 0;
//int idxcount = 0;
int idxname = 1;
int idxtype = 2;
int idxpackage = 3;
Expand Down
7 changes: 0 additions & 7 deletions GerberLibrary/Core/GerberMerger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@ public static void MultiMerge(string file1, List<string> filestomergein, string
File1Lines = PolyLineSet.SanitizeInputLines(File1Lines);
ParsedGerber File1Parsed = PolyLineSet.ParseGerber274x(Log, File1Lines, true, false, new GerberParserState() { PreCombinePolygons = false, GenerateGeometry = false });




List<string> OutputLines = new List<string>();
GerberNumberFormat GNF = new GerberNumberFormat();
GNF.DigitsBefore = Math.Max(File1Parsed.State.CoordinateFormat.DigitsBefore, MaxDigitsBefore);
Expand Down Expand Up @@ -477,12 +474,9 @@ public static void MultiMerge(string file1, List<string> filestomergein, string
{
case "LPD":
if (CurrentPolarity != "LPD") { OutputLines.Add("%LPD*%"); CurrentPolarity = "LPD"; }

break;
case "LPC":
if (CurrentPolarity != "LPC") { OutputLines.Add("%LPC*%"); CurrentPolarity = "LPC"; }


break;

default:
Expand All @@ -507,7 +501,6 @@ public static void MultiMerge(string file1, List<string> filestomergein, string
{
Repeating = false;
}

}
else
{
Expand Down
4 changes: 2 additions & 2 deletions GerberLibrary/Core/GerberPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1519,14 +1519,14 @@ private static bool AddIntersectionsForTabAndPolyLine(BreakTab t, List<TabInters
TI.Direction.X = (V1.X - V2.X) / Len;
TI.Direction.Y = (V1.Y - V2.Y) / Len;
TI.Angle = Helpers.AngleBetween(t.Center, I1);
bool addedV1 = false;
//bool addedV1 = false;

bool V1Inside = Helpers.Distance(new PointD(t.Center.X, t.Center.Y), V1) < t.Radius;
bool V2Inside = Helpers.Distance(new PointD(t.Center.X, t.Center.Y), V2) < t.Radius;

if (Helpers.Distance(new PointD(t.Center.X, t.Center.Y), V1) < t.Radius)
{
addedV1 = true;
// addedV1 = true;
TI.Start = true;
}

Expand Down
3 changes: 1 addition & 2 deletions Project_Utilities/TilingLibrary/SVGThings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,6 @@ public void DecodeStyle(string style)
StrokeColor = ParseColor(a[1]);
}
break;
break;
case "fill":
if (a[1] == "none")
{
Expand Down Expand Up @@ -570,7 +569,7 @@ private void DecodeStrokeWidth(string v)
}
catch (Exception E)
{
Console.WriteLine(" failed to parse strokewidth {0}", v);
Console.WriteLine(" failed to parse strokewidth {0}: {1}", v, E.Message);
}


Expand Down

0 comments on commit 35713e0

Please sign in to comment.