← Back to team overview

kicad-developers team mailing list archive

Re: pcbnew.py: How to set plot color?

 

JP, is this desired behavior? (I.e. should plot functions draw in layer
color, or draw in plotter color?)

I need to fix the plot functions depending on global function
GetLayerColor() in eeschema, and so since I'll have to modify schematic
plotting functions anyway, I could change the behavior at the same time.

-Jon

On Sat, Mar 18, 2017 at 12:35 PM, jp charras <jp.charras@xxxxxxxxxx> wrote:

> Le 18/03/2017 à 15:59, Martin Schreiber a écrit :
> > On Friday 03 February 2017 08:25:12 Martin Schreiber wrote:
> >> Hi,
> >> How can the plot color been set while using pcbnew.py?
> >> "
> >> [...]
> >>  board = LoadBoard(apcbfilename)
> >>  pctl = PLOT_CONTROLLER(board)
> >>  popt = pctl.GetPlotOptions()
> >>  popt.SetOutputDirectory(aoutputdir)
> >>  popt.SetPlotFrameRef(False)
> >>  popt.SetLineWidth(FromMM(0.35))
> >>
> >>  popt.SetAutoScale(False)
> >>  popt.SetScale(1)
> >>  popt.SetMirror(False)
> >>  popt.SetUseGerberAttributes(True)
> >>  popt.SetExcludeEdgeLayer(True);
> >>  popt.SetUseAuxOrigin(True)
> >>  popt.SetSubtractMaskFromSilk(False)
> >>
> >>  pctl.OpenPlotfile(lnames[0],PLOT_FORMAT_POST,'')
> >>  pctl.SetColorMode(False)
> >>  popt.SetColor(YELLOW)
> >>  pctl.SetLayer(F_SilkS)
> >>  pctl.PlotLayer()
> >>  pctl.ClosePlot()
> >> [...]
> >> "
> >> shows black,
> >> "
> >>  pctl.SetColorMode(True)
> >> "
>
> Currently, plot functions overwrite the initial setting made by
> popt.SetColor(color).
>
> --
> Jean-Pierre CHARRAS
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References