kigster / laser-cutter

Similar to boxmaker, this ruby gem generates PDFs that can be used as a basis for cutting boxes on a typical laser cutter. The intention is to create an extensible, well tested, and modern ruby framework for generating PDF templates used in laser cutting.
MIT License
95 stars 60 forks source link

Tab mismatch when using same thickness and tab width. #12

Closed ekohilas closed 6 years ago

ekohilas commented 6 years ago

When producing boxes which have the same tab widths as the board thickness, the tabs don't match. For example, producing a box with dimensions that are divisible by the tab width such as:

width: 172
height: 52
depth: 112
thickness: 4
tab width: 4

gives the following result. makeabox-172.00W-52.00H-112.00D-4.00T-20171203134837.pdf

In the top left 3 piece joint, assuming that each piece has a depth identical to the tab width, you can geometrically see that one of the pieces doesn't fit. For example, the top-left notch of the left board interferes with the left-bottom notch of the bigger board.

Am I thinking about this the wrong way or is this a bug?

ekohilas commented 6 years ago

Is this because the tabs are changed size so that they're odd instead?

kigster commented 6 years ago

Can you try leaving the tab field blank?

Or set it to an odd number?

ekohilas commented 6 years ago

@kigster doing that seems to resolve the problem. However now that I have a better understanding of the tool, even under those dimensions, if the tab width is there as a suggestion, doesn't that mean that there's still a bug?

For example, the tabs are mismatched with a tab width of 3 as well. makeabox-174.00W-54.00H-114.00D-3.00T-20171205063016.pdf

kigster commented 6 years ago

There is absolutely a bug! It has already been reported and more than once.

I need to find the time to fix it, but in the meantime, folks don't understand how the Tab value is being used. You generally want tabs to be 5-10x longer than the thickness of the material. The tabs entry box on the makeabox.io has a question mark next to it, which reads as described below.

When you specified 4 — the tabs end up being very teeth-like, and there are LOTS of them to cut. The design is simpler to cut AND generate when there are only a few total tabs per side, eg, 3, 5 or 7. That makes tabs longer, but the same concept still works.

My recommendation is for now to leave this blank, or set it to something like 30 or 40.

Approximate Tab Width

If you specify a value in this field, it will be used as a guideline, not an exact value. The layout of the tabs on each side of the box contributes to the overall aesthetics of the final product.

One of the key differences of MakeABox and other tools, is that MakeABox goes out of its way to create a symmetric tab layout. To accomplish this, we always choose an odd number of outward tabs per side, ie. 3, 5, 7, etc. The value you provide in this field helps the algorithm determine how many tabs per side to generate.

kigster commented 6 years ago

Duplicate of #6

ekohilas commented 6 years ago

@kigster I'm still new to all of this so thank you for the clarification. :) I am curious however why it is good for tabs to be 5-10x longer than the thickness of the material and why more cuts are bad?