Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/techplexengineer/svg2laser
Prepare SVGs generated from CAD models for laser cutting on Epilog Helix.
https://github.com/techplexengineer/svg2laser
flyio inkscape svg vector
Last synced: about 1 month ago
JSON representation
Prepare SVGs generated from CAD models for laser cutting on Epilog Helix.
- Host: GitHub
- URL: https://github.com/techplexengineer/svg2laser
- Owner: TechplexEngineer
- Created: 2021-10-02T14:57:19.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-15T18:58:03.000Z (over 2 years ago)
- Last Synced: 2024-04-14T11:39:16.768Z (8 months ago)
- Topics: flyio, inkscape, svg, vector
- Language: Go
- Homepage: https://svg2laser.fly.dev/
- Size: 1.37 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
svg2laser
=========## Goal
Streamline hte process of cutting FRC Robotics prototypes designed in Onshape on an Epilog Helix 18"x24" laser cutter.This repo contains a number of tests and ideas, but nothing works great yet.
## Data flow
1. Possible sources (Suppored via Onshape export):
- DWG -- obscure format
- DXF -- obscure format
- DWT -- obscure format
- SVG ==> Easy to modify
- PNG -- eliminated, not vector
- JPEG -- eliminated, not vector2. Set line thickness to .001"
Math and text substitution will get us most of the way there3. Convert SVG to Postscript
inkscape input.svg --export-filename=output.ps4. Send postscript through epilog postprocessor
liblasercut## Inspiration
- LibLaserCut
- Lathser
- ctrl-cut## Notes
> The initial value for SVG user coordinates is that 1 user unit equals one CSS "px" (pixel) unit. By CSS standards, a "px" unit is exactly equal to 1/96th of an "in" (inch) unit. If you scale your SVG with transforms or a viewBox attribute, all the length units scale accordingly, so the ratio remains constant.
src: https://stackoverflow.com/a/23096315/4295441 (svg user coordinate) = 1 (css px)
1 (css px) = 1/96 (inch) ---- or ---- 96 (css px) = 1 (inch)if I have .3 (svg user coordinate) that is the same as .3 (css px)
So to convert .3 (css px) to inches we divide by 96
.3/96 = 0.003125 (inch)This seems wrong because if one uses inkscape to change stroke-width to .001" the resulting file has .3 as the stroke width
So maybe 96 is wrong....
What value of inches is actually per css px
.3 (css px) / x (css px/inch) = .001 (inch)
Cross multiply (both sides by x) and divide (.001).3 / .001 = x = 300
How can we calculate the resolution if its not a fixed value...
From a pseudocode perspective:
Take a hypothetical file
```