Rewriting gcodepreview with Python

This was mentioned originally at:

and the Python aspect discussed at:

Starting a new thread 'cause the others were getting long.

First up is exporting SVGs — this is working now, except for the problem of SVGs having a different coordinate space from OpenSCAD and DXFs, so when exported, they are mirror-imaged top–bottom — may need to do yet another re-write to allow this to be handled in a reasonable fashion.

1 Like

Given the difficulties with SVGs, a work-around may be to instead use multiple DXFs — a separate file for each tool should make importing and cutting more straight-forward.

This however, wants that each sort of tool be defined/supported — the current project needs:

  • small square endmill
  • small V endmill (same diameter as the small square)
  • large V endmill

Obviously we would add support for at least:

  • small ball endmill
  • large ball endmill
  • large square endmill

which hopefully won’t be too onerous…

Doing that the variable definitions look like:

so we just need to add a check for each variable and if present, create/write to/close the matching file.

1 Like

Hallowe’en update — it now writes out separate files for each tool:

Next up:

Adding support for two more variables for the current project, then doing alternate versions.

1 Like

Small up-date for Veteran’s Day, and managed to get one half of the remaining modifications for vertical joinery done:

Balance and a test cut later today.

1 Like

and for Small Business Saturday we have a working file:

with usage shown at:

2 Likes

I’m curious why the bottom rabbits don’t extend into the 45 deg end cuts otherwise the base will need its corners cut out.

They do, just not very deeply — naturally, this could be set as desired by the person cutting the part.

1 Like