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

Packing Trays #69

Open
Freaksta opened this issue Jun 17, 2023 · 0 comments
Open

Packing Trays #69

Freaksta opened this issue Jun 17, 2023 · 0 comments

Comments

@Freaksta
Copy link

Freaksta commented Jun 17, 2023

@aaron-siegel wondering if you can provide guidance on how the trays are generated in the packing tray puzzles. I am trying to convert a couple of these into dxf files for laser cutting but not sure how to calculate the size and angles in the polygon.

The read me guide only have the following guidance // opening_polygon use in place of opening_width and opening_depth; generates an arbitrary // polygon for the opening, rather than a rectangle

Example file I am trying to convert is the Basket Case puzzle:

These fields are defined and easy to calculate:
opening_depth = 4 * sqrt(2); opening_width = (5 + 1/3) * sqrt(2);

Packing tray module:
packing_tray( opening_polygon = [[0, 0], [opening_depth / 3, opening_depth], [opening_width - opening_depth / 3, opening_depth], [opening_width, 0]], piece_holder_spec = [".x|.x|xx|x."], piece_holder_x_adj = -$tray_scale, finger_wedge = [2, 2], render_as_lid = render_as_lid, title = "Basket Case", subtitles = ["Stewart Coffin", "STC #227"] )

While I can solve for the opening_polygon its not making a lot of sense result would be: [[0, 0], [1.89,5.66], [5.66,5.66], [7.54,0]] but there doesnt appear anything to scale this up? it has no reference to tray scale in the polygon calculation.

Any help or guidance would be greatly appreciated. I am happy to contribute an update to the readme guide to explain how this is all done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant