Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ using std::pair;
#include <vector>
using std::vector;

#include "bg_operators.hpp"

typedef pair<string, shared_ptr<Layer> > layer_t;

/******************************************************************************/
Expand Down Expand Up @@ -84,7 +86,9 @@ void Board::createLayers()

// Calculate the maximum possible room needed by the PCB traces, for tiling later.
const auto outline = prepared_layers.find("outline");
if (outline != prepared_layers.cend()) {
if (outline != prepared_layers.cend() &&
(get<0>(outline->second)->get_bounding_box().min_corner() <
get<0>(outline->second)->get_bounding_box().max_corner())) {
shared_ptr<Cutter> outline_mill = static_pointer_cast<Cutter>(get<1>(outline->second));
const auto& importer = get<0>(outline->second);
coordinate_type_fp tool_diameter = outline_mill->tool_diameter;
Expand Down Expand Up @@ -144,7 +148,9 @@ void Board::createLayers()
}

// mask layers with outline
if (prepared_layers.find("outline") != prepared_layers.end()) {
if (outline != prepared_layers.cend() &&
(get<0>(outline->second)->get_bounding_box().min_corner() <
get<0>(outline->second)->get_bounding_box().max_corner())) {
shared_ptr<Layer> outline_layer = layers.at("outline");

for (const auto& layer : layers) {
Expand Down
1 change: 1 addition & 0 deletions integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"am-test-voronoi-front",
"am-test-voronoi-wide-extra-passes",
"backtrack",
"D1MiniGSR",
"edge-cuts-broken-loop",
"edge-cuts-inside-cuts",
"example_board_al_custom",
Expand Down
94 changes: 94 additions & 0 deletions testing/gerbv_example/D1MiniGSR/D1MiniGSR-B_Cu.gbr
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.9*
G04 #@! TF.CreationDate,2021-01-16T07:53:59+00:00*
G04 #@! TF.ProjectId,D1MiniGSR,44314d69-6e69-4475-9352-2e6b69636164,rev?*
G04 #@! TF.SameCoordinates,Original*
G04 #@! TF.FileFunction,Copper,L2,Bot*
G04 #@! TF.FilePolarity,Positive*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.1.9) date 2021-01-16 07:53:59*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
G04 #@! TA.AperFunction,ComponentPad*
%ADD10O,2.000000X1.600000*%
G04 #@! TD*
G04 #@! TA.AperFunction,ComponentPad*
%ADD11R,2.000000X2.000000*%
G04 #@! TD*
G04 #@! TA.AperFunction,ComponentPad*
%ADD12R,1.350000X1.350000*%
G04 #@! TD*
G04 #@! TA.AperFunction,ComponentPad*
%ADD13O,1.350000X1.350000*%
G04 #@! TD*
G04 APERTURE END LIST*
D10*
G04 #@! TO.P,U1,2*
G04 #@! TO.N,Net-(U1-Pad2)*
X97865001Y-155805001D03*
D11*
G04 #@! TO.P,U1,1*
G04 #@! TO.N,Net-(U1-Pad1)*
X97865001Y-153265001D03*
D10*
G04 #@! TO.P,U1,3*
G04 #@! TO.N,Net-(U1-Pad3)*
X97865001Y-158345001D03*
G04 #@! TO.P,U1,4*
G04 #@! TO.N,Net-(U1-Pad4)*
X97865001Y-160885001D03*
G04 #@! TO.P,U1,5*
G04 #@! TO.N,Net-(U1-Pad5)*
X97865001Y-163425001D03*
G04 #@! TO.P,U1,6*
G04 #@! TO.N,Net-(U1-Pad6)*
X97865001Y-165965001D03*
G04 #@! TO.P,U1,7*
G04 #@! TO.N,Net-(U1-Pad7)*
X97865001Y-168505001D03*
G04 #@! TO.P,U1,8*
G04 #@! TO.N,Net-(J1-Pad2)*
X97865001Y-171045001D03*
G04 #@! TO.P,U1,9*
G04 #@! TO.N,Net-(U1-Pad9)*
X120725001Y-171045001D03*
G04 #@! TO.P,U1,10*
G04 #@! TO.N,Net-(J1-Pad1)*
X120725001Y-168505001D03*
G04 #@! TO.P,U1,11*
G04 #@! TO.N,Net-(U1-Pad11)*
X120725001Y-165965001D03*
G04 #@! TO.P,U1,12*
G04 #@! TO.N,Net-(U1-Pad12)*
X120725001Y-163425001D03*
G04 #@! TO.P,U1,13*
G04 #@! TO.N,Net-(J1-Pad3)*
X120725001Y-160885001D03*
G04 #@! TO.P,U1,14*
G04 #@! TO.N,Net-(J1-Pad4)*
X120725001Y-158345001D03*
G04 #@! TO.P,U1,15*
G04 #@! TO.N,Net-(U1-Pad15)*
X120725001Y-155805001D03*
G04 #@! TO.P,U1,16*
G04 #@! TO.N,Net-(U1-Pad16)*
X120725001Y-153265001D03*
G04 #@! TD*
D12*
G04 #@! TO.P,J1,1*
G04 #@! TO.N,Net-(J1-Pad1)*
X109220000Y-167100000D03*
D13*
G04 #@! TO.P,J1,2*
G04 #@! TO.N,Net-(J1-Pad2)*
X109220000Y-165100000D03*
G04 #@! TO.P,J1,3*
G04 #@! TO.N,Net-(J1-Pad3)*
X109220000Y-163100000D03*
G04 #@! TO.P,J1,4*
G04 #@! TO.N,Net-(J1-Pad4)*
X109220000Y-161100000D03*
G04 #@! TD*
M02*
14 changes: 14 additions & 0 deletions testing/gerbv_example/D1MiniGSR/D1MiniGSR-Edge_Cuts.gbr
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.9*
G04 #@! TF.CreationDate,2021-01-16T07:53:59+00:00*
G04 #@! TF.ProjectId,D1MiniGSR,44314d69-6e69-4475-9352-2e6b69636164,rev?*
G04 #@! TF.SameCoordinates,Original*
G04 #@! TF.FileFunction,Profile,NP*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.1.9) date 2021-01-16 07:53:59*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
G04 APERTURE END LIST*
M02*
143 changes: 143 additions & 0 deletions testing/gerbv_example/D1MiniGSR/D1MiniGSR-F_Cu.gbr
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.9*
G04 #@! TF.CreationDate,2021-01-16T07:53:59+00:00*
G04 #@! TF.ProjectId,D1MiniGSR,44314d69-6e69-4475-9352-2e6b69636164,rev?*
G04 #@! TF.SameCoordinates,Original*
G04 #@! TF.FileFunction,Copper,L1,Top*
G04 #@! TF.FilePolarity,Positive*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.1.9) date 2021-01-16 07:53:59*
%MOMM*%
%LPD*%
G01*
G04 APERTURE LIST*
G04 #@! TA.AperFunction,ComponentPad*
%ADD10O,2.000000X1.600000*%
G04 #@! TD*
G04 #@! TA.AperFunction,ComponentPad*
%ADD11R,2.000000X2.000000*%
G04 #@! TD*
G04 #@! TA.AperFunction,ComponentPad*
%ADD12R,1.350000X1.350000*%
G04 #@! TD*
G04 #@! TA.AperFunction,ComponentPad*
%ADD13O,1.350000X1.350000*%
G04 #@! TD*
G04 #@! TA.AperFunction,Conductor*
%ADD14C,0.250000*%
G04 #@! TD*
G04 #@! TA.AperFunction,Conductor*
%ADD15C,0.800000*%
G04 #@! TD*
G04 APERTURE END LIST*
D10*
G04 #@! TO.P,U1,2*
G04 #@! TO.N,Net-(U1-Pad2)*
X97865001Y-155805001D03*
D11*
G04 #@! TO.P,U1,1*
G04 #@! TO.N,Net-(U1-Pad1)*
X97865001Y-153265001D03*
D10*
G04 #@! TO.P,U1,3*
G04 #@! TO.N,Net-(U1-Pad3)*
X97865001Y-158345001D03*
G04 #@! TO.P,U1,4*
G04 #@! TO.N,Net-(U1-Pad4)*
X97865001Y-160885001D03*
G04 #@! TO.P,U1,5*
G04 #@! TO.N,Net-(U1-Pad5)*
X97865001Y-163425001D03*
G04 #@! TO.P,U1,6*
G04 #@! TO.N,Net-(U1-Pad6)*
X97865001Y-165965001D03*
G04 #@! TO.P,U1,7*
G04 #@! TO.N,Net-(U1-Pad7)*
X97865001Y-168505001D03*
G04 #@! TO.P,U1,8*
G04 #@! TO.N,Net-(J1-Pad2)*
X97865001Y-171045001D03*
G04 #@! TO.P,U1,9*
G04 #@! TO.N,Net-(U1-Pad9)*
X120725001Y-171045001D03*
G04 #@! TO.P,U1,10*
G04 #@! TO.N,Net-(J1-Pad1)*
X120725001Y-168505001D03*
G04 #@! TO.P,U1,11*
G04 #@! TO.N,Net-(U1-Pad11)*
X120725001Y-165965001D03*
G04 #@! TO.P,U1,12*
G04 #@! TO.N,Net-(U1-Pad12)*
X120725001Y-163425001D03*
G04 #@! TO.P,U1,13*
G04 #@! TO.N,Net-(J1-Pad3)*
X120725001Y-160885001D03*
G04 #@! TO.P,U1,14*
G04 #@! TO.N,Net-(J1-Pad4)*
X120725001Y-158345001D03*
G04 #@! TO.P,U1,15*
G04 #@! TO.N,Net-(U1-Pad15)*
X120725001Y-155805001D03*
G04 #@! TO.P,U1,16*
G04 #@! TO.N,Net-(U1-Pad16)*
X120725001Y-153265001D03*
G04 #@! TD*
D12*
G04 #@! TO.P,J1,1*
G04 #@! TO.N,Net-(J1-Pad1)*
X109220000Y-167100000D03*
D13*
G04 #@! TO.P,J1,2*
G04 #@! TO.N,Net-(J1-Pad2)*
X109220000Y-165100000D03*
G04 #@! TO.P,J1,3*
G04 #@! TO.N,Net-(J1-Pad3)*
X109220000Y-163100000D03*
G04 #@! TO.P,J1,4*
G04 #@! TO.N,Net-(J1-Pad4)*
X109220000Y-161100000D03*
G04 #@! TD*
D14*
G04 #@! TO.N,Net-(J1-Pad1)*
X120725001Y-168505001D02*
X120725001Y-168834999D01*
D15*
X120725001Y-168505001D02*
X113895001Y-168505001D01*
X112490000Y-167100000D02*
X109220000Y-167100000D01*
X113895001Y-168505001D02*
X112490000Y-167100000D01*
G04 #@! TO.N,Net-(J1-Pad2)*
X97865001Y-171045001D02*
X99464999Y-171045001D01*
X105410000Y-165100000D02*
X109220000Y-165100000D01*
X99464999Y-171045001D02*
X105410000Y-165100000D01*
D14*
G04 #@! TO.N,Net-(J1-Pad3)*
X109220000Y-163100000D02*
X109220000Y-163830000D01*
X109220000Y-163100000D02*
X109220000Y-162560000D01*
D15*
X115974999Y-160885001D02*
X113760000Y-163100000D01*
X113760000Y-163100000D02*
X109220000Y-163100000D01*
X120725001Y-160885001D02*
X115974999Y-160885001D01*
G04 #@! TO.N,Net-(J1-Pad4)*
X111760000Y-161290000D02*
X114704999Y-158345001D01*
X114704999Y-158345001D02*
X120725001Y-158345001D01*
D14*
X109220000Y-161100000D02*
X109220000Y-161290000D01*
D15*
X109220000Y-161290000D02*
X111760000Y-161290000D01*
G04 #@! TD*
M02*
37 changes: 37 additions & 0 deletions testing/gerbv_example/D1MiniGSR/D1MiniGSR-PTH.drl
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
M48
; DRILL file {KiCad 5.1.9} date Sat Jan 16 07:41:27 2021
; FORMAT={-:-/ absolute / metric / decimal}
; #@! TF.CreationDate,2021-01-16T07:41:27+00:00
; #@! TF.GenerationSoftware,Kicad,Pcbnew,5.1.9
; #@! TF.FileFunction,Plated,1,2,PTH
FMAT,2
METRIC
T1C0.800
T2C1.000
%
G90
G05
T1
X109.22Y-161.1
X109.22Y-163.1
X109.22Y-165.1
X109.22Y-167.1
T2
X97.865Y-153.265
X97.865Y-155.805
X97.865Y-158.345
X97.865Y-160.885
X97.865Y-163.425
X97.865Y-165.965
X97.865Y-168.505
X97.865Y-171.045
X120.725Y-153.265
X120.725Y-155.805
X120.725Y-158.345
X120.725Y-160.885
X120.725Y-163.425
X120.725Y-165.965
X120.725Y-168.505
X120.725Y-171.045
T0
M30
Loading