Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate consistent document size for all layers. #324

Open
zandr opened this issue Mar 6, 2020 · 1 comment
Open

Generate consistent document size for all layers. #324

zandr opened this issue Mar 6, 2020 · 1 comment
Labels
v5-fixed Ticket is resolved in the `v5` branch

Comments

@zandr
Copy link

zandr commented Mar 6, 2020

I have a slightly odd (but potentially very cool) use case, and I've run into a bit of an issue.

I'd like to laser-cut thin acrylic for fit check/mockup boards for some complicated mechanical design (including conductive button pads). I have a Glowforge, which takes SVG as input.

Tracespace is 99% there, but the exported SVGs aren't all the same size, so I need to re-register the layers before I can go to the laser. Is it possible to add a flag that renders all the SVGs with the same 'bounding box'* such that the layers are in register?

Thanks!

*I don't know enough about SVG to know the right term here.

@mcous
Copy link
Member

mcous commented Mar 29, 2020

@zandr the API for doing this is a little unwieldy at the moment, but it's definitely possible and not super different than what https://tracespace.io/view does. The TL;DR version is:

  1. Generate layer (and board, if needed) renders
  2. Sum the viewboxes of the layer renders (or grab the overall board viewbox from the board renders if you have them)
  3. Re-render the layers using the attributes option to override the calculated viewbox with your summed viewbox

I could give you a more detailed example if needed. Are you using the tracespace CLI or the Node.js API?

@mcous mcous added the v5-fixed Ticket is resolved in the `v5` branch label Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v5-fixed Ticket is resolved in the `v5` branch
Projects
None yet
Development

No branches or pull requests

2 participants