// file : /home2/designs/boards/BVDC_24/Work/Geometries/bvdc_pcb
//
// date :  Monday  July 2, 2007
//        Tuesday   9-Oct-2007   change for 4mm pitch wires.
//         Friday  26-Oct-2007   add a Shape Area for Gnd Plane on Bottom
//                               add 20 mil traces on BV Filter Cap Gnd pins
//



$$lock_windows(@on);
$$create_board("bvdc_pcb");
$$page(0.0, 0.0, 0.03, @inches, 0.0, 0.0, [0.0,0.0,'BO$bvdc_pcb'] );
$$point_mode(@vertex); 

$$attribute( "MILLING_ORIGIN", "MILLING 0 0.0 0 ", , @scale , , [0.0, 0.0]);
$$attribute( "DRILL_ORIGIN", "0.0", , @scale , , [0.0, 0.0]);

$$template_line_style( @Solid );


$$path( "BOARD_OUTLINE", 0.01, ,                         [0.0, 0.0,   0.0, 5.00,   4.2, 5.00,   4.2, 0.0,   0.0, 0.0]);
$$attribute( "BOARD_ROUTING_OUTLINE", "", , @scale , ,   [0.0, 0.0,   0.0, 5.00,   4.2, 5.00,   4.2, 0.0            ]);
$$attribute( "BOARD_PLACEMENT_OUTLINE", "", , @scale , , [0.0, 0.0,   0.0, 5.00,   4.2, 5.00,   4.2, 0.0            ]);



$$attribute( "BOARD_DEFINITION_IDENTIFIER", "");

$$attribute( "BOARD_ROUTING_LAYERS", "", , , , [2, 0]);

$$attribute( "POWER_NET_NAMES", "GROUND");



$$attribute( "DIAGONAL_ROUTING_ALLOWED", "yes");
$$attribute( "TJUNCTIONS_ALLOWED", "yes");


$$attribute( "BOARD_DEFAULT_PADSTACK", "TERM_60");
$$attribute( "BOARD_DEFAULT_VIA", "VIA_33");
$$attribute( "DEFAULT_PAD_SIZE", "", , @scale , , [0.06, 0.0]);


$$attribute( "BOARD_PLACEMENT_GRID", "", , @scale , ,      [0.001, 0.0]);
$$attribute( "BOARD_PLACEMENT_CLEARANCE", "", , @scale , , [0.001, 0.0]);
$$attribute( "BOARD_MATERIAL", "");
$$attribute( "BOARD_THICKNESS", "", , @scale , , [0.0, 0.0]);
$$attribute( "BOARD_INTERNAL_COPPER", "", , @scale , , [0.0, 0.0]);
$$attribute( "BOARD_EXTERNAL_COPPER", "", , @scale , , [0.0, 0.0]);


$$text( "SILKSCREEN_1", "T962 - BVDC",                     2.10, 4.80, 0.1,  @BC, 0, 1.00, 0.01, "std", "None", 0.0, 0.0 );
$$text( "SILKSCREEN_1", "Bias Voltage Distribution Card",  2.10, 4.60, 0.1,  @BC, 0, 0.75, 0.01, "std", "None", 0.0, 0.0 );

$$text( "SILKSCREEN_1", "Bias Voltage",                    0.70, 4.40, 0.1,  @BC, 0, 1.00, 0.01, "std", "None", 0.0, 0.0 );
$$text( "SILKSCREEN_1", "Bias Voltage",                    3.50, 4.40, 0.1,  @BC, 0, 1.00, 0.01, "std", "None", 0.0, 0.0 );

$$text( "SILKSCREEN_1", "MSU Physics",                     2.10, 0.50, 0.085, @BC, 0, 0.90, 0.01, "std", "None", 0.0, 0.0 );
$$text( "SILKSCREEN_1", "OCT-07 Rev.A",                    2.10, 0.35, 0.080, @BC, 0, 0.90, 0.01, "std", "None", 0.0, 0.0 );

$$text( "SILKSCREEN_1", "1",                               2.00, 3.52, 0.1, @CC, 90, 1.00, 0.01, "std", "None", 0.0, 0.0 );
$$text( "SILKSCREEN_1", "2",                               2.20, 3.52, 0.1, @CC, 90, 1.00, 0.01, "std", "None", 0.0, 0.0 );
$$text( "SILKSCREEN_1", "49",                              2.00, 0.77, 0.1, @CC, 90, 1.00, 0.01, "std", "None", 0.0, 0.0 );
$$text( "SILKSCREEN_1", "50",                              2.20, 0.77, 0.1, @CC, 90, 1.00, 0.01, "std", "None", 0.0, 0.0 );

$$text( "SILKSCREEN_1", "24",                              0.25, 0.21, 0.1, @CC, 0, 1.00, 0.01, "std", "None", 0.0, 0.0 );
$$text( "SILKSCREEN_1", "13",                              1.75, 0.21, 0.1, @CC, 0, 1.00, 0.01, "std", "None", 0.0, 0.0 );
$$text( "SILKSCREEN_1", "12",                              2.40, 0.21, 0.1, @CC, 0, 1.00, 0.01, "std", "None", 0.0, 0.0 );
$$text( "SILKSCREEN_1", "1",                               3.95, 0.21, 0.1, @CC, 0, 1.00, 0.01, "std", "None", 0.0, 0.0 );

$$text( "SILKSCREEN_1", "TPC Wires",                       1.00, 0.45, 0.1, @BC, 0, 1.00, 0.01, "std", "None", 0.0, 0.0 );
$$text( "SILKSCREEN_1", "TPC Wires",                       3.20, 0.45, 0.1, @BC, 0, 1.00, 0.01, "std", "None", 0.0, 0.0 );





//
//   DRILLS    for the mounting and ground holes.
//

$$attribute( "DRILL_DEFINITION_UNPLATED", "0.140", , @scale , , [2.100, 0.200]);

$$attribute( "DRILL_DEFINITION_UNPLATED", "0.140", , @scale , , [0.175, 4.800]);
$$attribute( "DRILL_DEFINITION_UNPLATED", "0.140", , @scale , , [4.025, 4.800]);

//    Provide a little relief of the GND Plane from the drill hole edge.

$$circle( "POWER_1",   2.100,  0.200,    0.150,  0.0);

$$circle( "POWER_1",   0.175,  4.800,    0.150,  0.0);
$$circle( "POWER_1",   4.025,  4.800,    0.150,  0.0);

//    End of the Drill Holes





//
//  Add on layer DRAWING_1 the overall dimensions of the card.
//  This is to make a "board assembly" drawing.
//

$$template_line_style( @Solid );


// Show 0,0 at bottom left corner.

$$path( "DRAWING_1", 0.01, , [  -0.400,  0.000,   -0.150, 0.0] );
$$path( "DRAWING_1", 0.01, , [  -0.275,  0.040,   -0.150, 0.0] );
$$path( "DRAWING_1", 0.01, , [  -0.275, -0.040,   -0.150, 0.0] );

$$text( "DRAWING_1", "0,0",   -0.700, -0.060,  0.125, @BC, 0, 1.00, 0.010, "std", "None", 0.0, 0.0 );


// Horizontal Dimension.

$$path( "DRAWING_1", 0.01, , [ 0.0,   -0.150,     0.000, -0.900 ] );  // Left witness line
$$path( "DRAWING_1", 0.01, , [ 0.0,   -0.700,     1.000, -0.700 ] );  //      dimension line
$$path( "DRAWING_1", 0.01, , [ 0.0,   -0.700,     0.300, -0.600 ] );  //      arrow
$$path( "DRAWING_1", 0.01, , [ 0.0,   -0.700,     0.300, -0.800 ] );  //      arrow

$$path( "DRAWING_1", 0.01, , [ 4.200, -0.150,     4.200, -0.900 ] );  // Right witnes line
$$path( "DRAWING_1", 0.01, , [ 3.200, -0.700,     4.200, -0.700 ] );  //       dimension line
$$path( "DRAWING_1", 0.01, , [ 3.900, -0.600,     4.200, -0.700 ] );  //       arrow
$$path( "DRAWING_1", 0.01, , [ 3.900, -0.800,     4.200, -0.700 ] );  //       arrow

$$text( "DRAWING_1", "4.200 inch",   2.100, -0.700, 0.10, @CC, 0, 1.00, 0.01, "std", "None", 0.0, 0.0 );
$$text( "DRAWING_1", "X Dimension",  2.100, -0.875, 0.10, @CC, 0, 1.00, 0.01, "std", "None", 0.0, 0.0 );


// Vertical Dimension

$$path( "DRAWING_1", 0.01, , [ 4.350,  5.000,    4.800,  5.000 ] );  // Upper witness line
$$path( "DRAWING_1", 0.01, , [ 4.600,  3.600,    4.600,  5.000 ] );  //       dimension line
$$path( "DRAWING_1", 0.01, , [ 4.500,  4.700,    4.600,  5.000 ] );  //       arrow
$$path( "DRAWING_1", 0.01, , [ 4.700,  4.700,    4.600,  5.000 ] );  //       arrow

$$path( "DRAWING_1", 0.01, , [ 4.350,  0.000,    4.800,  0.000 ] );  // Lower witness line
$$path( "DRAWING_1", 0.01, , [ 4.600,  1.400,    4.600,  0.000 ] );  //       dimension line
$$path( "DRAWING_1", 0.01, , [ 4.500,  0.300,    4.600,  0.000 ] );  //       arrow
$$path( "DRAWING_1", 0.01, , [ 4.700,  0.300,    4.600,  0.000 ] );  //       arrow


$$text( "DRAWING_1", "Y Dimension", 4.700, 2.500, 0.10, @CC, 90, 1.00, 0.01, "std", "None", 0.0, 0.0 );
$$text( "DRAWING_1", "5.000 inch",  4.525, 2.500, 0.10, @CC, 90, 1.00, 0.01, "std", "None", 0.0, 0.0 );

//
//  End of the Drawing_1 overall board dimensions.
//





//
//   Label the Layers
//

$$text( "DRAWING_1", "MSU Physics     October 2007",   2.100,  -0.500, 0.1,  @BC, 0, 1.00, 0.01, "std", "None", 0.0, 0.0 );


$$text( "SIGNAL_1", "Trace Layer   TOP       Positive Data",  2.10,  -0.30, 0.1,  @BC, 0, 1.00, 0.01, "std", "None", 0.0, 0.0 );

$$text( "POWER_1",  "GROUND Plane  BOTTOM    Negative Data",  2.10,  -0.30, 0.1,  @BC, 0, 1.00, 0.01, "std", "None", 0.0, 0.0 );


$$text( "SILKSCREEN_1", "Silkscreen on TOP",       2.10,  -0.30,  0.1,  @BC, 0, 1.00, 0.01, "std", "None", 0.0, 0.0 );


$$text( "SOLDER_MASK_1", "Solder Mask TOP",        2.10,  -0.30,  0.1,  @BC, 0, 1.00, 0.01, "std", "None", 0.0, 0.0 );

$$text( "SOLDER_MASK_2", "Solder Mask BOTTOM",     2.10,  -0.30,  0.1,  @BC, 0, 1.00, 0.01, "std", "None", 0.0, 0.0 );

//
//  End of the Layer Labels
//





//
//   Use DAM_1 to relieve the GND Plane
//     from the pins with Bias Voltage
//

//       Vertical relief shapes under the Slim-Mox-102

$$path( "DAM_1", 0.355, , [ 0.199,  3.600,      0.199,  0.850 ]);
$$path( "DAM_1", 0.355, , [ 0.601,  3.600,      0.601,  0.850 ]);

$$path( "DAM_1", 0.355, , [ 3.599,  3.600,      3.599,  0.850 ]);
$$path( "DAM_1", 0.355, , [ 4.001,  3.600,      4.001,  0.850 ]);


//       Vertical relief shapes under the Blocking Capacitors

$$path( "DAM_1", 0.355, , [ 0.807,  3.600,      0.807,  0.850 ]);
$$path( "DAM_1", 0.355, , [ 3.393,  3.600,      3.393,  0.850 ]);


//       Make the R and C pins that are next to each other
//          have one uniform relief shape.

$$path( "DAM_1", 0.355, , [ 0.601,  3.600,      0.807,  3.600 ]);
$$path( "DAM_1", 0.355, , [ 0.601,  0.850,      0.807,  0.850 ]);

$$path( "DAM_1", 0.355, , [ 3.599,  3.600,      3.393,  3.600 ]);
$$path( "DAM_1", 0.355, , [ 3.599,  0.850,      3.393,  0.850 ]);


//      Make the outer pin on the Slim-Mox-102 resistors
//          have a unform relief shape.

$$path( "DAM_1", 0.355, , [ 0.000,  3.600,      0.199,  3.600 ]);
$$path( "DAM_1", 0.355, , [ 0.000,  0.850,      0.199,  0.850 ]);

$$path( "DAM_1", 0.355, , [ 0.000,  3.600,      0.000,  0.850 ]);


$$path( "DAM_1", 0.355, , [ 4.001,  3.600,      4.200,  3.600 ]);
$$path( "DAM_1", 0.355, , [ 4.001,  0.850,      4.200,  0.850 ]);

$$path( "DAM_1", 0.355, , [ 4.200,  3.600,      4.200,  0.850 ]);


//      Horizontal relief shapes under the 12 pin connectors.
//       This is a complete and uniform relief under the
//       full area of the Wire Frame Connectors.

$$path( "DAM_1", 0.301, , [ 0.459,  0.365,      1.559,  0.365 ]);
$$path( "DAM_1", 0.301, , [ 0.459,  0.182,      1.559,  0.182 ]);
$$path( "DAM_1", 0.301, , [ 0.459,  0.000,      1.559,  0.000 ]);

$$path( "DAM_1", 0.301, , [ 0.459,  0.365,      0.459,  0.000 ]);
$$path( "DAM_1", 0.301, , [ 1.559,  0.365,      1.559,  0.000 ]);


$$path( "DAM_1", 0.301, , [ 2.641,  0.365,      3.741,  0.365 ]);
$$path( "DAM_1", 0.301, , [ 2.641,  0.182,      3.741,  0.182 ]);
$$path( "DAM_1", 0.301, , [ 2.641,  0.000,      3.741,  0.000 ]);

$$path( "DAM_1", 0.301, , [ 2.641,  0.365,      2.641,  0.000 ]);
$$path( "DAM_1", 0.301, , [ 3.741,  0.365,      3.741,  0.000 ]);


//       On the Bias Voltage end of each of the group
//       of three filter capacitors place a triangle of
//       Gnd plane relief to make it look uniform.

$$path( "DAM_1", 0.355, , [ 0.971,  4.200,      0.971,  3.950 ]);
$$path( "DAM_1", 0.355, , [ 1.133,  3.950,      0.971,  3.950 ]);
$$path( "DAM_1", 0.355, , [ 0.971,  4.200,      1.133,  3.950 ]);

$$path( "DAM_1", 0.355, , [ 3.229,  4.200,      3.067,  3.950 ]);
$$path( "DAM_1", 0.355, , [ 3.229,  3.950,      3.067,  3.950 ]);
$$path( "DAM_1", 0.355, , [ 3.229,  4.200,      3.229,  3.950 ]);




//
//  Now include the shape used to define the Ground Area Fill
//  on pcb Signal Layer #2.   This will be the bottom side of
//  the real pcb.
//

$$initial([   0.015,   0.015 ], , @nosnap );    //  Start in the SW corner

$$terminal([  0.015,   4.985 ] );               //  NW corner

$$terminal([  4.185,   4.985 ] );               //  NE corner

$$terminal([  4.185,   0.015 ] );               //  SE corner

$$terminal([  0.015,   0.015 ] );               //  Back in the SW corner

$$path( "SHAPE_EDIT", 0.0 );




//
//  Now add 20 mil wide Ground Ties to the Thermo Reliefs
//  on the Ground Pins on the Bias Voltage Filter Caps.
//  These 20 mil Ties supplement the 12 mil Ties from
//  the Area Fill generation.
//

$$path( "SIGNAL_2", 0.020, , [ 0.030,  4.255,      0.140,  4.145 ]);
$$path( "SIGNAL_2", 0.020, , [ 0.030,  4.145,      0.140,  4.255 ]);

$$path( "SIGNAL_2", 0.020, , [ 0.030,  4.005,      0.140,  3.895 ]);
$$path( "SIGNAL_2", 0.020, , [ 0.030,  3.895,      0.140,  4.005 ]);

$$path( "SIGNAL_2", 0.020, , [ 1.965,  4.005,      2.075,  3.895 ]);
$$path( "SIGNAL_2", 0.020, , [ 1.965,  3.895,      2.075,  4.005 ]);

$$path( "SIGNAL_2", 0.020, , [ 2.125,  4.005,      2.235,  3.895 ]);
$$path( "SIGNAL_2", 0.020, , [ 2.125,  3.895,      2.235,  4.005 ]);

$$path( "SIGNAL_2", 0.020, , [ 4.060,  4.255,      4.170,  4.145 ]);
$$path( "SIGNAL_2", 0.020, , [ 4.060,  4.145,      4.170,  4.255 ]);

$$path( "SIGNAL_2", 0.020, , [ 4.060,  4.005,      4.170,  3.895 ]);
$$path( "SIGNAL_2", 0.020, , [ 4.060,  3.895,      4.170,  4.005 ]);

