Inkscape.org
Using Inkscape with Cutters/Plotters GCodeTools only output is in PX
  1. #1
    u2fletch u2fletch @u2fletch
    *

    I completely uninstalled Inkscape and downloaded the latest version (Inkscape 1.3.2 (091e20e, 2023-11-25, custom) to try and resolve a problem.

    Drew a box 5" x 5" on the screen.  My Page size is US Letter, 8.5 by 11. Display units are In. Run GCodeTools with an output format of In, and the output is in Pixels.

    Ran it again and selected mm for output. The GCode is exactly the same. Except there is a G21 instead of G20.

    The Display scale under settings for US Inches format is 0.010417.  The Viewbox is 1056 x 816

    I am using the default tool setting.

    EDIT -- Did a test this morning where I left the Display properties in px, and selected mm for display units. I drew a box 200mm x 100mm. I ran the GCodeTools and the output was confirmed to be in mm with a G21, not px.  I had selected mm under the GCodeTools preferences.  I then ran it again with inches selected and the code was still in mm, and the G20 was there.

    At least this is workable. LinuxCNC should handle the G21 no problem.

  2. #2
    Tyler Durden Tyler Durden @TylerDurden

    Before proceeding further, I'd reset the preferences and relaunch Inkscape. https://inkscape.org/forums/questions/getting-back-to-square-one-and-starting-over-its-easy/

  3. #3
    u2fletch u2fletch @u2fletch
    *

    I actually installed Inkscape on an an entirely new machine with the exact same results.  And on the other machine I had also performed the Master Reset on the preferences. 

  4. #4
    u2fletch u2fletch @u2fletch

    Okay, I read in another post with similar scale issues to do this. In Document Settings set the units to px.  Then the Display Scale should be set to 1.  Then switch to whatever units you desire and leave the scale alone. I had done this in the earlier test.  I ran a test with a file that is roughly 30" x 20". The GCode produced in mm was way off. Final size was 114" or so. So back to being confused.

    I opened a clean document. I looked in Document Properties and saw that A4 page size was selected, Units were mm, and the Display Scale was 1.0.  Interesting. That seemed counter to the advice given earlier.  So I switched to in units and saw that the scale was now 0.03937.  I Ran several test files and now they are scaled properly with GCode output in mm with a G21 code.  Switching to inches in the GCodeTools preferences sill does nothing.  Just switches to G20 in the header.  No idea why that is not working.

    At this point I have a configuration that will make files, so just going with it.

     

  5. #5
    u2fletch u2fletch @u2fletch

    So learned something about the Display, Scale setting today.  I changed the Document settings to Inches, then the Scale to 1.0. Then made sure the preferences in GCodeTools were set to Inches as well so that it outputs the Proper G20 code.  When I run GCodeTools, the Text size of the Orientation Points, and Tool Settings are enormous, but the GCode output IS correctly scaled for Inches.

    Just need to make sure the feeds and speeds are set appropriately.  I modified the GCodetools.py code (line 3080 ish) so that the default settings are always the ones I want.