kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #14653
Re: [Branch ~kicad-product-committers/kicad/product] Rev 5123: Implemented special rules for plotting assembly layers
Sorry, but I don't like this patch because I want control of where the
reference text goes on both assembly and silk layers. It doesn't
necessary want to go in the centre of an electrolytic cap for example.
Only for the very basic components is the centre an okay choice.
I would rather just allow to have a reference object on the assembly
layer as well as the silk layer.
Best Regards,
Brian.
On 8 September 2014 19:00, <noreply@xxxxxxxxxxxxx> wrote:
> ------------------------------------------------------------
> revno: 5123
> committer: Lorenzo Marcantonio <l.marcantonio@xxxxxxxxxxxx>
> branch nick: kicad
> timestamp: Mon 2014-09-08 19:57:39 +0200
> message:
> Implemented special rules for plotting assembly layers
>
> - Reference is visible on silk and the corresponding assembly layer
> - Reference is shown on assembly always on the component insertion point
>
> Hidden references are not forced shown in assembly plots (there is
> already a user option for that)
> modified:
> pcbnew/plot_brditems_plotter.cpp
>
>
> --
> lp:kicad
> https://code.launchpad.net/~kicad-product-committers/kicad/product
>
> You are subscribed to branch lp:kicad.
> To unsubscribe from this branch go to https://code.launchpad.net/~kicad-product-committers/kicad/product/+edit-subscription
>
> === modified file 'pcbnew/plot_brditems_plotter.cpp'
> --- pcbnew/plot_brditems_plotter.cpp 2014-08-24 07:05:07 +0000
> +++ pcbnew/plot_brditems_plotter.cpp 2014-09-08 17:57:39 +0000
> @@ -124,6 +124,13 @@
> if( textLayer > LAYER_ID_COUNT ) // how will this ever be true?
> return false;
>
> + // Special rule: assembly always shows reference from the silk layer
> + if( (m_layerMask[F_Fab]) && (textLayer == F_SilkS) )
> + trace_ref = true;
> +
> + if( (m_layerMask[B_Fab]) && (textLayer == B_SilkS) )
> + trace_ref = true;
> +
> if( !m_layerMask[textLayer] )
> trace_val = false;
>
> @@ -216,7 +223,12 @@
>
> // calculate some text parameters :
> size = pt_texte->GetSize();
> - pos = pt_texte->GetTextPosition();
> +
> + // Assembly drawings always have the reference on the origin
> + if( m_layerMask[F_Fab] || m_layerMask[B_Fab] )
> + pos = static_cast<MODULE*>( pt_texte->GetParent() )->GetPosition();
> + else
> + pos = pt_texte->GetTextPosition();
>
> orient = pt_texte->GetDrawRotation();
>
>
>
Follow ups