Commit eb396a5e authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Fix footprint wizard issues. Fix export vrml incorrect Z position of items.

parent 39216b4b
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -95,15 +95,13 @@ LSET D_PAD::StandardMask()

LSET D_PAD::SMDMask()
{
    // was: #define PAD_SMD_DEFAULT_LAYERS LAYER_FRONT | SOLDERPASTE_LAYER_FRONT | SOLDERMASK_LAYER_FRONT
    static LSET saved( 3, F_Cu, F_Paste, F_Mask );
    return saved;
}


LSET D_PAD::ConnMask()
LSET D_PAD::ConnSMDMask()
{
    // was: #define PAD_CONN_DEFAULT_LAYERS LAYER_FRONT | SOLDERMASK_LAYER_FRONT
    static LSET saved( 2, F_Cu, F_Mask );
    return saved;
}
+15 −4
Original line number Diff line number Diff line
@@ -88,10 +88,11 @@ public:
    /* Default layers used for pads, according to the pad type.
     * this is default values only, they can be changed for a given pad
     */
    static LSET StandardMask();
    static LSET ConnMask();
    static LSET SMDMask();
    static LSET UnplatedHoleMask();
    static LSET StandardMask();     ///< layer set for a through hole pad
    static LSET SMDMask();          ///< layer set for a SMD pad on Front layer
    static LSET ConnSMDMask();      ///< layer set for a SMD pad on Front layer
                                    ///< used for edge board connectors
    static LSET UnplatedHoleMask(); ///< layer set for a mechanical unplated through hole pad

    void Copy( D_PAD* source );

@@ -419,6 +420,16 @@ public:

    EDA_ITEM* Clone() const;

    /**
     * same as Clone, but returns a D_PAD item.
     * Useful mainly for pythons scripts, because Clone (virtual function)
     * returns an EDA_ITEM.
     */
    D_PAD* Duplicate() const
    {
        return (D_PAD*) Clone();
    }

    /// @copydoc VIEW_ITEM::ViewGetLayers()
    virtual void ViewGetLayers( int aLayers[], int& aCount ) const;

+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ static const LSET std_pad_layers[] = {
    D_PAD::SMDMask(),

    // PAD_CONN:
    D_PAD::ConnMask(),
    D_PAD::ConnSMDMask(),

    // PAD_HOLE_NOT_PLATED:
    D_PAD::UnplatedHoleMask()
+2 −2
Original line number Diff line number Diff line
@@ -473,9 +473,9 @@ static void compute_layer_Zs( MODEL_VRML& aModel, BOARD* pcb )
        LAYER_ID i = *seq;

        if( i < copper_layers )
            aModel.SetLayerZ( i, aModel.board_thickness * i / (copper_layers - 1) - half_thickness );
            aModel.SetLayerZ( i,  half_thickness - aModel.board_thickness * i / (copper_layers - 1) );
        else
            aModel.SetLayerZ( i, half_thickness );  // component layer
            aModel.SetLayerZ( i, - half_thickness );  // bottom layer
    }

    /* To avoid rounding interference, we apply an epsilon to each
+2 −2
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ class FPCFootprintWizard(FootprintWizardPlugin):
            pad.SetSize(size)
            pad.SetShape(PAD_RECT)
            pad.SetAttribute(PAD_SMD)
            pad.SetLayerMask(PAD_SMD_DEFAULT_LAYERS)
            pad.SetLayerSet( pad.StandardMask() )
            pad.SetPos0(pos)
            pad.SetPosition(pos)
            pad.SetPadName(name)
@@ -126,7 +126,7 @@ class FPCFootprintWizard(FootprintWizardPlugin):
        xstart = - pad_pitch*0.5-offsetX
        xend = pad_pitch * pads + xstart;
        outline.SetStartEnd( wxPoint(xstart, posy), wxPoint( xend, posy) )
        outline.SetLayer(SILKSCREEN_N_FRONT)    #default: not needed
        outline.SetLayer(F_SilkS)               #default: not needed
        outline.SetShape(S_SEGMENT)
        module.Add(outline)

Loading