
//
//  file:  res0805
//
//  date:  Monday   17-Dec-2012   12:00:00
//
//
//  Geometry for the  Resistor  version of the  0805  component.
//                   ----------
//
//  This is a 100% standard IPC 0805 resistor layout.
//    The 0805 courtyard is  4mm in X  by  2mm in Y.
//    The center to center distance between pads is  1.90mm
//    The pad width  (dimension along the center to center line)  is  1.30mm.
//    The pad height is  1.30mm.
//
//  Thus we (not IPC) call this pad  1.30mm in X  by  1.30mm in Y.


$abort_enable = @false;
$$lock_windows(@on) ;
$$snap_diagonal(@off) ;
$$snap_orthogonal(@off) ;



//----------------------------------------------------------------------------

$$create_pin("res_0805_pad", @replace);

$$page(0.0, 0.0, 0.0, @mm, 0.0, 0.0, [0.0,0.0,'PI$res_0805_pad'] );

$$point_mode(@vertex);

$$polygon( "PAD", ,         [-0.650, -0.650,    0.650, -0.650,     0.650, 0.650,    -0.650, 0.650] );

$$polygon( "SOLDER_MASK", , [-0.700, -0.700,    0.700, -0.700,     0.700, 0.700,    -0.700, 0.700] );

$$polygon( "PASTE_MASK", ,  [-0.650, -0.650,    0.650, -0.650,     0.650, 0.650,    -0.650, 0.650] );

$$attribute( "TERMINAL_SURFACE_DEFINITION", "");

//----------------------------------------------------------------------------


$$create_component("res_0805", @replace);

$$page(0.0, 0.0, 0.0, @mm, 0.0, 0.0, [0.0,0.0,'CO$res_0805'] );

$$point_mode(@vertex); 

$$attribute( "COMPONENT_LAYOUT_TYPE", "surface");

$$attribute( "COMPONENT_LAYOUT_SURFACE", "both");

$$attribute( "COMPONENT_HEIGHT", "", , @scale , , [0.028, 0.0]);


$$attribute( "COMPONENT_PLACEMENT_OUTLINE", "", , @scale , , [-2.00, 1.00,    2.00, 1.00,    2.00, -1.00,    -2.00, -1.00]);


$$template_line_style( @Solid );

$$path( "SILKSCREEN", 0.20, , [-1.80,  1.00,    1.80,  1.00]);
$$path( "SILKSCREEN", 0.20, , [-1.80, -1.00,    1.80, -1.00]);


// Reference Designator is on the SILKSCREEN layer.

$$text( "SILKSCREEN", "^$ref", 0.0, 0.0, 1.5, @CC, 0, 0.7, 0.20, "std", "None", 0.0, 0.0 );



//  Define the two pins on the res0805:
//    pin #1 is to the left,  pin #2 to the right,  the axis is horizontal


$$attribute( "COMPONENT_PIN_DEFINITION",    "1", , @scale , , [-0.950, 0.0]);

$$attribute( "COMPONENT_PADSTACK_OVERRIDE", "1,res_0805_pad");


$$attribute( "COMPONENT_PIN_DEFINITION",    "2", , @scale , , [ 0.950, 0.0]);

$$attribute( "COMPONENT_PADSTACK_OVERRIDE", "2,res_0805_pad");


