discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: gcodepreview now supports writing out SVGs (but they're upside down)

JB
Jordan Brown
Sun, Oct 29, 2023 4:07 PM

Next 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 --- unless someone has some nifty mathematical
solution which I can pound into my thick head.

Have your export negate the Y coordinate, and maybe add an offset?

> Next 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 --- unless someone has some nifty mathematical > solution which I can pound into my thick head. Have your export negate the Y coordinate, and maybe add an offset?
WF
William F. Adams
Sun, Oct 29, 2023 5:38 PM

On Sunday, October 29, 2023 at 12:07:55 PM EDT, Jordan Brown openscad@jordan.maileater.net wrote:

Have your export negate the Y coordinate, and maybe add an offset?

That seems to be the solution --- since I'm working using coordinates, my understanding is that I will need to:
 - add the overall dimensions along Y - subtract the Y coordinate of the relevant position
but for now, I'm going to move on to other aspects, and hopefully get some test cuts done.
Fortunately, the CAM tool I am using allows easy mirroring along an axis:
https://willadams.gitbook.io/design-into-3d/2d-drawing#flip

so I'll just do it by hand on import for a bit.
William

On Sunday, October 29, 2023 at 12:07:55 PM EDT, Jordan Brown <openscad@jordan.maileater.net> wrote: >Have your export negate the Y coordinate, and maybe add an offset? That seems to be the solution --- since I'm working using coordinates, my understanding is that I will need to:  - add the overall dimensions along Y - subtract the Y coordinate of the relevant position but for now, I'm going to move on to other aspects, and hopefully get some test cuts done. Fortunately, the CAM tool I am using allows easy mirroring along an axis: https://willadams.gitbook.io/design-into-3d/2d-drawing#flip so I'll just do it by hand on import for a bit. William