CLI/JobSet PCB plot missing functionality

44 views
Skip to first unread message

Salvador E. Tropea

unread,
Apr 16, 2025, 9:10:48 AMApr 16
to KiCad Developers
Hi!

Two years ago I opened a bug about it (
https://gitlab.com/kicad/code/kicad/-/issues/13957 )

A lot of the stuff got implemented, but some stuff remain, in particular
Postscript and HPGL support.

I already submitted a MR adding Postscript:
https://gitlab.com/kicad/code/kicad/-/merge_requests/2214

I'm waiting for comments on it.

Meanwhile I implemented HPGL format, and now I want to implement the
"Scale options".

While looking into it I got a couple of doubts:

1. Why the dialog offers such a limited set of options (Auto, 1:1, 3:2,
2:1, 3:1)?

2. Why PDF, SVG and DXF disables these options? The three formats
support scaling.

Regards, Salvador

Salvador E. Tropea

unread,
Apr 16, 2025, 11:32:37 AMApr 16
to dev...@kicad.org

On 16/4/25 10:10, Salvador E. Tropea wrote:
> 2. Why PDF, SVG and DXF disables these options? The three formats
> support scaling.
>
BTW: Looking at the code I saw the restriction that disables the border
and title block when the scale != 1:1 is very simple to remove:

diff --git a/pcbnew/plot_board_layers.cpp b/pcbnew/plot_board_layers.cpp
index 47e8434d8d..b5443d5319 100644
--- a/pcbnew/plot_board_layers.cpp
+++ b/pcbnew/plot_board_layers.cpp
@@ -1292,8 +1292,13 @@ PLOTTER* StartPlotBoard( BOARD *aBoard, const
PCB_PLOT_PARAMS *aPlotOpts, int aL
     // page layout is not mirrored, so temporarily change mirror
option for the page layout
     PCB_PLOT_PARAMS plotOpts = *aPlotOpts;

-    if( plotOpts.GetPlotFrameRef() && plotOpts.GetMirror() )
-        plotOpts.SetMirror( false );
+    if( plotOpts.GetPlotFrameRef() )
+    {
+        if( plotOpts.GetMirror() )
+            plotOpts.SetMirror( false );
+        if( plotOpts.GetScale() != 1.0 )
+            plotOpts.SetScale( 1.0 );
+    }

     initializePlotter( plotter, aBoard, &plotOpts );

@@ -1344,7 +1349,7 @@ PLOTTER* StartPlotBoard( BOARD *aBoard, const
PCB_PLOT_PARAMS *aPlotOpts, int aL
                                   aPageCount, aSheetName, aSheetPath,
aBoard->GetFileName(),
renderSettings->GetLayerColor( LAYER_DRAWINGSHEET ) );

-                if( aPlotOpts->GetMirror() )
+                if( aPlotOpts->GetMirror() || aPlotOpts->GetScale() !=
1.0 )
                     initializePlotter( plotter, aBoard, aPlotOpts );
             }


Reply all
Reply to author
Forward
0 new messages