Skip to content

Devel brims#914

Open
ranaur wants to merge 37 commits into
florianfesti:masterfrom
ranaur:devel-brims
Open

Devel brims#914
ranaur wants to merge 37 commits into
florianfesti:masterfrom
ranaur:devel-brims

Conversation

@ranaur
Copy link
Copy Markdown

@ranaur ranaur commented Apr 10, 2026

Added two new lid types: flatbrim ans fangbrim. Both are just like the flat type (the lid is a rectangle with the full size of the top os the box). The difference is that in flat lid, there is another rectangle slightly (thickness) smaller to glue, while in the flatbrim there are 4 a small finger walls thickness + brim_spacing smaller, so they can fit inside the box. In fangbrim there are only 4 "fangs" (small rectangles) on the corners of the lid to fit it indise the box.

@florianfesti
Copy link
Copy Markdown
Owner

Great someone is working on the lids. They clearly deserve more love.

Note that you don't need extra scripts to test them. Just use scripts/boxes ABox --Lid_style=flatbrim on the command line to render a box with lid.

I added the lids to the test suite (pre-commit run -a). I fully expect that to break with changes. Don't worry about that.

For the flatbrim lid I wonder if just two walls - one left and one right are actually enough. That would also allow them to be rounded over in at least one direction.

The fangbrim lid would probably benefit from a small recess that gives it a positive stop when sticking the pieces into the lid from below.

Both could grow a small spring that keeps the lid under tension. But that's not required to get this merged.

@ranaur
Copy link
Copy Markdown
Author

ranaur commented Apr 13, 2026

Hi Florian!

Should I write some test scripts? Where should I put them?

Sure you need only two walls. The 4 walls are more for aestetics of the lid than functionality.

I can make another option to choose between styles (4 walls, 2 walls - vertical/horizontal) or even make a third option to make the "fang" brim as the third option (and removing the fang brim lid type). What do you prefer?

And lastly quoting Knuth's "Beware of bugs in the above code; I have only proved it correct, not tried it." :-) I executed it and measured in Inkscape, but I still didn't have time to rent the laser cutter to make the real boxes. So, some small adjusts may need to be made.

The idea of the sprint is good. Instead of making only the rectangular "fang" it can male a small "blunt arrow" shape (an L with a slanted point). It could even make a small hole (or even dent, controlling the intensity of the laser) in the wall to lock the lid. You'll need to push with a scrwedriver to unlock the lid. But I would need some test to work the sizes. Let me test the simple one first.

@florianfesti
Copy link
Copy Markdown
Owner

You really don't need to write test scripts. de5ad7a adds test for all lid styles so far. The test fail on GH as c00f1e0 changes the way the file names are generated, but it passes locally. If you (pull), rebase and forcepush your branch I can adjust the file names.

For now I would avoid adding holes to the side walls. There isn't really infrastructure to do that nicely. I have a unfishished branch somewhere that allows passing an callback object to a box generator so that it has access to all parts. That would be great to have lids adding holes to the sides. So may be just hold up with that for now. Just sliding friction should already be a lot nicer than none.

@ranaur
Copy link
Copy Markdown
Author

ranaur commented Apr 14, 2026

Just did what you asked for.

ranaur and others added 12 commits April 22, 2026 14:20
…o devel-flatbrim

* refs/remotes/origin/devel-flatbrim:
  Add 'upsidedown' option for part flipping in Boxes class
  SlidingDrawer: Fix hi value for unchecked outside
  RoundedBox: Use edge_style for outside measurement
  New generator: RoundedTrapezoidBox
  chore: unnecessary key check before dictionary access
  chore: simplify compare
  build(deps): bump docker/login-action in the github-actions group
  chore: improve tests
  chore: migrate to `NamedTuple`
  chore: add GitHub Linguist overrides in .gitattributes
  chore: normalize pyproject quotes; bump dev deps
  change: dependabot schedule to quarterly
  fix: remove mypy test on symlink files
  chore: bump pre-commit hook versions
* devel-flatbrim:
  images of the new lids
  changed brim space to absolute
  removed debug info
  created tests in the same fashion fo flatbrim
  inherited from Boxes, not Box
  does not belong to this branch
  does not belong to this branch
  reverted to original .gitignore
  integrated in box-cli program (from another branch)
  revert to original boxesserver - the change may not suit everybody
  fix ignore on virtual environments and generate_yaml/ directory
  Add 'upsidedown' option for part flipping in Boxes class
  SlidingDrawer: Fix hi value for unchecked outside
@ranaur
Copy link
Copy Markdown
Author

ranaur commented May 1, 2026

DId a lot of improvements and cleanup after cutting the first boxes. Now it is working as expected. Should I open another PR or you can merge from this new point. Just let me know.

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.

2 participants