Indentation was completely broken (editor tabbing issue, maybe?)
This commit is contained in:
parent
beb33c7522
commit
6d0c5555ea
|
@ -50,14 +50,14 @@
|
||||||
* Useful because 356A (when implemented) must be sorted before outputting it */
|
* Useful because 356A (when implemented) must be sorted before outputting it */
|
||||||
struct D356_RECORD
|
struct D356_RECORD
|
||||||
{
|
{
|
||||||
bool smd;
|
bool smd;
|
||||||
bool hole;
|
bool hole;
|
||||||
wxString netname;
|
wxString netname;
|
||||||
wxString refdes;
|
wxString refdes;
|
||||||
wxString pin;
|
wxString pin;
|
||||||
bool midpoint;
|
bool midpoint;
|
||||||
int drill;
|
int drill;
|
||||||
bool mechanical;
|
bool mechanical;
|
||||||
int access; // Access 0 is 'both sides'
|
int access; // Access 0 is 'both sides'
|
||||||
int soldermask;
|
int soldermask;
|
||||||
// All these in PCB units, will be output in decimils
|
// All these in PCB units, will be output in decimils
|
||||||
|
@ -74,19 +74,19 @@ static int compute_pad_access_code( BOARD *aPcb, LAYER_MSK aLayerMask )
|
||||||
// Non-copper is not interesting here
|
// Non-copper is not interesting here
|
||||||
aLayerMask &= ALL_CU_LAYERS;
|
aLayerMask &= ALL_CU_LAYERS;
|
||||||
if( aLayerMask == 0 )
|
if( aLayerMask == 0 )
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
// Traditional TH pad
|
// Traditional TH pad
|
||||||
if( (aLayerMask & LAYER_FRONT) && (aLayerMask & LAYER_BACK) )
|
if( (aLayerMask & LAYER_FRONT) && (aLayerMask & LAYER_BACK) )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// Front SMD pad
|
// Front SMD pad
|
||||||
if( (aLayerMask & LAYER_FRONT) )
|
if( (aLayerMask & LAYER_FRONT) )
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
// Back SMD pad
|
// Back SMD pad
|
||||||
if( (aLayerMask & LAYER_BACK) )
|
if( (aLayerMask & LAYER_BACK) )
|
||||||
return aPcb->GetCopperLayerCount();
|
return aPcb->GetCopperLayerCount();
|
||||||
|
|
||||||
// OK, we have an inner-layer only pad (and I have no idea about
|
// OK, we have an inner-layer only pad (and I have no idea about
|
||||||
// what could be used for); anyway, find the first copper layer
|
// what could be used for); anyway, find the first copper layer
|
||||||
|
@ -129,36 +129,36 @@ static void build_pad_testpoints( BOARD *aPcb,
|
||||||
// It could be a mask only pad, we only handle pads with copper here
|
// It could be a mask only pad, we only handle pads with copper here
|
||||||
if( rk.access != -1 )
|
if( rk.access != -1 )
|
||||||
{
|
{
|
||||||
rk.netname = pad->GetNetname();
|
rk.netname = pad->GetNetname();
|
||||||
rk.refdes = module->GetReference();
|
rk.refdes = module->GetReference();
|
||||||
pad->StringPadName( rk.pin );
|
pad->StringPadName( rk.pin );
|
||||||
rk.midpoint = false; // XXX MAYBE need to be computed (how?)
|
rk.midpoint = false; // XXX MAYBE need to be computed (how?)
|
||||||
const wxSize& drill = pad->GetDrillSize();
|
const wxSize& drill = pad->GetDrillSize();
|
||||||
rk.drill = std::min( drill.x, drill.y );
|
rk.drill = std::min( drill.x, drill.y );
|
||||||
rk.hole = (rk.drill != 0);
|
rk.hole = (rk.drill != 0);
|
||||||
rk.smd = pad->GetAttribute() == PAD_SMD;
|
rk.smd = pad->GetAttribute() == PAD_SMD;
|
||||||
rk.mechanical = (pad->GetAttribute() == PAD_HOLE_NOT_PLATED);
|
rk.mechanical = (pad->GetAttribute() == PAD_HOLE_NOT_PLATED);
|
||||||
rk.x_location = pad->GetPosition().x - origin.x;
|
rk.x_location = pad->GetPosition().x - origin.x;
|
||||||
rk.y_location = origin.y - pad->GetPosition().y;
|
rk.y_location = origin.y - pad->GetPosition().y;
|
||||||
rk.x_size = pad->GetSize().x;
|
rk.x_size = pad->GetSize().x;
|
||||||
|
|
||||||
// Rule: round pads have y = 0
|
// Rule: round pads have y = 0
|
||||||
if( pad->GetShape() == PAD_CIRCLE )
|
if( pad->GetShape() == PAD_CIRCLE )
|
||||||
rk.y_size = 0;
|
rk.y_size = 0;
|
||||||
else
|
else
|
||||||
rk.y_size = pad->GetSize().y;
|
rk.y_size = pad->GetSize().y;
|
||||||
|
|
||||||
rk.rotation = -KiROUND( pad->GetOrientation() ) / 10;
|
rk.rotation = -KiROUND( pad->GetOrientation() ) / 10;
|
||||||
if( rk.rotation < 0 ) rk.rotation += 360;
|
if( rk.rotation < 0 ) rk.rotation += 360;
|
||||||
|
|
||||||
// the value indicates which sides are *not* accessible
|
// the value indicates which sides are *not* accessible
|
||||||
rk.soldermask = 3;
|
rk.soldermask = 3;
|
||||||
if( pad->GetLayerMask() & SOLDERMASK_LAYER_FRONT)
|
if( pad->GetLayerMask() & SOLDERMASK_LAYER_FRONT)
|
||||||
rk.soldermask &= ~1;
|
rk.soldermask &= ~1;
|
||||||
if( pad->GetLayerMask() & SOLDERMASK_LAYER_BACK)
|
if( pad->GetLayerMask() & SOLDERMASK_LAYER_BACK)
|
||||||
rk.soldermask &= ~2;
|
rk.soldermask &= ~2;
|
||||||
|
|
||||||
aRecords.push_back( rk );
|
aRecords.push_back( rk );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -172,15 +172,15 @@ static int via_access_code( BOARD *aPcb, int top_layer, int bottom_layer )
|
||||||
// Easy case for through vias: top_layer is component, bottom_layer is
|
// Easy case for through vias: top_layer is component, bottom_layer is
|
||||||
// solder, access code is 0
|
// solder, access code is 0
|
||||||
if( (top_layer == LAYER_N_FRONT) && (bottom_layer == LAYER_N_BACK) )
|
if( (top_layer == LAYER_N_FRONT) && (bottom_layer == LAYER_N_BACK) )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// Blind via, reachable from front
|
// Blind via, reachable from front
|
||||||
if( top_layer == LAYER_N_FRONT )
|
if( top_layer == LAYER_N_FRONT )
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
// Blind via, reachable from bottom
|
// Blind via, reachable from bottom
|
||||||
if( bottom_layer == LAYER_N_BACK )
|
if( bottom_layer == LAYER_N_BACK )
|
||||||
return aPcb->GetCopperLayerCount();
|
return aPcb->GetCopperLayerCount();
|
||||||
|
|
||||||
// It's a buried via, accessible from some inner layer
|
// It's a buried via, accessible from some inner layer
|
||||||
// (maybe could be used for testing before laminating? no idea)
|
// (maybe could be used for testing before laminating? no idea)
|
||||||
|
|
Loading…
Reference in New Issue