{"id":19449438,"url":"https://github.com/techplexengineer/svg2laser","last_synced_at":"2025-10-28T17:13:03.820Z","repository":{"id":50616577,"uuid":"412827260","full_name":"TechplexEngineer/svg2laser","owner":"TechplexEngineer","description":"Prepare SVGs generated from CAD models for laser cutting on Epilog Helix.","archived":false,"fork":false,"pushed_at":"2022-09-15T18:58:03.000Z","size":1432,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-07T23:36:12.217Z","etag":null,"topics":["flyio","inkscape","svg","vector"],"latest_commit_sha":null,"homepage":"https://svg2laser.fly.dev/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TechplexEngineer.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-02T14:57:19.000Z","updated_at":"2022-07-30T19:53:24.000Z","dependencies_parsed_at":"2023-01-18T09:15:44.522Z","dependency_job_id":null,"html_url":"https://github.com/TechplexEngineer/svg2laser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechplexEngineer%2Fsvg2laser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechplexEngineer%2Fsvg2laser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechplexEngineer%2Fsvg2laser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TechplexEngineer%2Fsvg2laser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TechplexEngineer","download_url":"https://codeload.github.com/TechplexEngineer/svg2laser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240636726,"owners_count":19832933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flyio","inkscape","svg","vector"],"created_at":"2024-11-10T16:32:33.347Z","updated_at":"2025-10-28T17:12:58.763Z","avatar_url":"https://github.com/TechplexEngineer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"svg2laser\n=========\n\n## Goal\nStreamline hte process of cutting FRC Robotics prototypes designed in Onshape on an Epilog Helix 18\"x24\" laser cutter.\n\n\nThis repo contains a number of tests and ideas, but nothing works great yet.\n\n## Data flow\n1. Possible sources (Suppored via Onshape export):\n    - PDF\n    - DWG -- obscure format\n    - DXF -- obscure format\n    - DWT -- obscure format\n    - SVG ==\u003e Easy to modify\n    - PNG -- eliminated, not vector\n    - JPEG -- eliminated, not vector\n\n\n2. Set line thickness to .001\"\n    Math and text substitution will get us most of the way there\n\n3. Convert SVG to Postscript\ninkscape input.svg --export-filename=output.ps\n\n4. Send postscript through epilog postprocessor\nliblasercut\n\n\n## Inspiration\n- LibLaserCut\n- Lathser\n- ctrl-cut\n\n\n## Notes\n\n\u003e 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.\nsrc: https://stackoverflow.com/a/23096315/429544\n\n1 (svg user coordinate) = 1 (css px)\n1 (css px) = 1/96 (inch) ---- or ---- 96 (css px) = 1 (inch)\n\nif I have .3 (svg user coordinate) that is the same as .3 (css px)\n\nSo to convert .3 (css px) to inches we divide by 96\n.3/96 = 0.003125 (inch)\n\nThis seems wrong because if one uses inkscape to change stroke-width to .001\" the resulting file has .3 as the stroke width\n\nSo maybe 96 is wrong....\n\nWhat value of inches is actually per css px\n\n.3 (css px) / x (css px/inch) = .001 (inch)\nCross multiply (both sides by x) and divide (.001)\n\n.3 / .001 = x = 300\n\nHow can we calculate the resolution if its not a fixed value...\n\n\nFrom a pseudocode perspective:\nTake a hypothetical file\n```\n\u003csvg\n\twidth=\"{width}\"\n\theight=\"{height}\"\n\tviewBox=\"{x_min} {y_min} {viewWidth} {viewHeight}\"\n```\n\n\n.001\" * {width}/({viewWidth}-{x_min}) = {new stroke width}\n\nbig thanks to this so post for leading me down this thought path\nhttps://stackoverflow.com/questions/23068907/how-do-i-use-inches-with-snap-svg#:~:text=The%20initial%20value%20for%20SVG,so%20the%20ratio%20remains%20constant.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechplexengineer%2Fsvg2laser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechplexengineer%2Fsvg2laser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechplexengineer%2Fsvg2laser/lists"}