multical icon indicating copy to clipboard operation
multical copied to clipboard

Board creation - pixel / mm accuracy

Open philipsgithub opened this issue 2 years ago • 2 comments

multical boards --boards example_boards/charuco_16x22.yaml --paper_size A2 --pixels_mm 10 --write my_images this creates an image where the black squares are 248x248 pixel. when using gimp to create the pdf and then print it, the squares are not 25x25 mm on the paper logically. when using multical boards --boards example_boards/charuco_16x22.yaml --paper_size A2 --pixels_mm 10 --margin_mm 0 --write my_images the black squares are 250x250 pixel and have the correct size on paper.

after having a quick look at the code, i think the margin_mm parameters are not forcefully set to 0 when specifying a paper_size. but i did not really invest a lot of effort and thoughts into debugging. maybe you quickly have an idea, whats going on here:)

philipsgithub avatar Sep 07 '22 16:09 philipsgithub

@dajojo

philipsgithub avatar Sep 07 '22 16:09 philipsgithub

Hi there,

Yes, that board generation code will generate an image, which if printed to the size of the paper (zero margins) it will give the right size. For example A4 is 297x210mm - assuming you use 10 pixels per mm it will generate you an image 2970x2100 - it's not really doing anything fancy!

There might be a way to improve it to produce a PDF which will be directly printable at the right size, I usually did this manually afterwards using something like Gimp where I would use "print to file" with zero margins.

Hopefully that helps, Oliver

On Thu, Sep 8, 2022 at 4:14 AM Philip Keller @.***> wrote:

multical boards --boards example_boards/charuco_16x22.yaml --paper_size A2 --pixels_mm 10 --write my_images this creates an image where the black squares are 248x248 pixel. when using gimg to create the pdf and then print it, the squares are not 25x25 mm on the paper logically. when using multical boards --boards example_boards/charuco_16x22.yaml --paper_size A2 --pixels_mm 10 --margin_mm 0 --write my_images the black squares are 250x250 pixel and have the correct size on paper.

after having a quick look at the code, i think the margin_mm parameters are not forcefully set to 0 when specifying a paper_size. but i did not really invest a lot of effort and thoughts into debugging. maybe you quickly have an idea, whats going on here:)

— Reply to this email directly, view it on GitHub https://github.com/oliver-batchelor/multical/issues/36, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAITRZKRNWCZZZ73VUEBWO3V5C5NRANCNFSM6AAAAAAQG5PUWU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

oliver-batchelor avatar Sep 08 '22 00:09 oliver-batchelor