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

Add Waffle-block style tabs, refactor tab and layout code #15

Merged
merged 3 commits into from
Jan 3, 2020

Conversation

jimmc
Copy link
Contributor

@jimmc jimmc commented Apr 24, 2017

This branch is based on my dimples branch rather than master, but as the PR for dimples is still outstanding, this PR is against master, so accepting this PR will also pull in the dimples code if the dimples PR has not been merged.

In this PR, I have refactored the box style, layout, and tab generation code to be orthogonal, so you can mix and match among them as desired. As part of that refactoring, there were a few obscure bugs that got fixed. Also, the location of the tabs on each box face is no longer a function of the selected box type or layout, so the specific tab positions are different for some combinations of those values than before this change.

The box type now controls only which faces are included in the output, and which sides of the remaining faces do or do not have tabs. The location of all tabs that remain are not a function of the box type.

In the layout, when an entire row or column of pieces is missing due to the selected box type not having a complete set of faces, the remaining rows or columns are shifted so as to keep the layout compact.

The new Rotate-Symmetric tab type allows producing Waffle-block style tabs. In particular, if making a cube, all faces will have the identical shape and are thus interchangeable.

The size of the faces on open boxes is now a function of the box-dimensions inner/outer choice. The concept here is that, when a face is missing, the outer dimension is no longer the inner dimension plus the material thickness, because that side doesn't exist. If outer is specified, the code now produces a result that will exactly fit inside an enclosing box with those inner dimensions; if inner is specified, then a box of the specified dimensions will exactly fit inside the produced box, flush with the open faces of the box.

Dividers only work properly with XY-symmetric tabs (the previous primary style). They previously did not work with the "alternate tab style" (which is called Antisymmetric in this change), and I did not investigate that part of the code nor attempt to make them work with the new Rotate-symmetric tab style.

Here is a screenshot showing the box dialog along with a generated box that uses the Rotate-symmetric waffle-block style tabs.

screen shot 2017-04-24 at 12 27 47 pm

@jimmc jimmc changed the title Waffle Add Waffle-block style tabs, refactor tab and layout code Apr 24, 2017
@paulh-rnd
Copy link
Owner

paulh-rnd commented Apr 25, 2017 via email

@paulh-rnd
Copy link
Owner

@jimmc wow, again I apologise for the long delay getting to this, and WOW, thanks so much for this great contribution - what you've done is outstanding! Far cleaner than my kludged-together code (can you tell I really don't know Python? :D )

This fixes at least two known bugs, I'll merge this in and have a go at fixing some of the remaining ones. Just one thing: it seems now that the "Tab Width: Fixed/Proportional" option doesn't do anything any more, is that right? I'm fine with that, I never really saw the point of that option, and I think your tab styles are better options anyway.

Thanks again

@paulh-rnd paulh-rnd merged commit cc16627 into paulh-rnd:master Jan 3, 2020
@jimmc
Copy link
Contributor Author

jimmc commented Jan 5, 2020 via email

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

Successfully merging this pull request may close these issues.

None yet

2 participants