
//
//  file:  cap_1812
//
//  Original Rev.  18-Jan-2023    made for the Disco-Kraken
//
//
//  Geometry for the  1812  Kemet Capacitor
//                   -----------------------
//
//
//  Kemet Part Number:  C1812C474KARAC7800
//
//
//  This  1812 Capacitor geometry comes from the Kemet Specification.
//  I do not know how close this is to an IPC 1812 capacitor.
//
//    The 1812 courtyard is   6.00 mm in X  by  4.00 mm in Y.
//    The center to center distance between pads is  +- 2.05 mm
//    The pad  width  (our X dimension)  is  1.40 mm.
//    The pad height  (our Y dimension)  is  3.50 mm.
//


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


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

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

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

$$point_mode(@vertex);

$$polygon( "PAD", ,         [ -0.70, -1.75,    0.70, -1.75,     0.70, 1.75,    -0.70, 1.75 ] );

$$polygon( "SOLDER_MASK", , [ -0.75, -1.80,    0.75, -1.80,     0.75, 1.80,    -0.75, 1.80 ] );

$$polygon( "PASTE_MASK", ,  [ -0.70, -1.75,    0.70, -1.75,     0.70, 1.75,    -0.70, 1.75 ] );

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

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



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

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

$$point_mode(@vertex); 

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

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

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



//
//  Component Placement Outline for the  cap_1812
//

$$initial([  -2.90,  -1.90 ], , @nosnap );
$$terminal([ -2.90,   1.90 ] );
$$terminal([  2.90,   1.90 ] );
$$terminal([  2.90,  -1.90 ] );

$$attribute( "COMPONENT_PLACEMENT_OUTLINE", "", @mark, @scale );



$$template_line_style( @Solid );

$$path( "SILKSCREEN", 0.25, , [ -2.50,  2.15,    2.50,  2.15 ]);
$$path( "SILKSCREEN", 0.25, , [ -2.50, -2.15,    2.50, -2.15 ]);



// Reference Designator is on the SILKSCREEN layer.

$$text( "SILKSCREEN", "^$ref", 0.0,  2.8,  2.0,  @BC, 0, 0.7, 0.20, "std", "None", 0.0, 0.0 );



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


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

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


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

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



