Skip to content

A variety of fixes and features #795

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

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Conversation

maihde
Copy link
Contributor

@maihde maihde commented May 6, 2025

This PR has a mixure of fixes and features - and I appreciate it will be a lot to review. Each commit should be relatively isolated, so I'm happy to extract them into standalone PRs if desired so that easy merges can happen sooner.

The commit messages have more deatils, but the notable changes are:

  • boxes_main supports more flexible argument parsing, but is fully backwards compatible
  • examples are generated based on examples.yml which allows generating examples that don't use default args with the --examples argument
  • the test_svg.py also uses examples.yml so it can test generators without default arguments
  • Users can also create their own custom YAML configurations and run --multi-generator to generate multiple boxes in a repeatable and shareable fashion. A few of the YAML files I used for my projects are attached as examples.
    gridfinity_refined_bases.txt
    silverware_drawer.txt
  • The ability to take multiple SVG files and merge them into optimized cuts for a given panel size is part of boxes_main
  • The format converter had a few corner cases where tempfiles might be leaked. In additon, on Windows the converter cannot return a data file directly since Windows prevents the file from being opened if already opened.
  • I added support for generating Gridfinity Refined bases. You previously had asked about magnet pads in the base. At the time I didn't see a good use case, but recently have found some. While doing that, I went ahead and also implemented the Refined extentions (tabs and screw holes). See for examples https://www.printables.com/model/1286133-lasercut-gridfinity-refined/files

maihde added 16 commits May 6, 2025 00:31
The GridFinity Refined base adds various features to GridFinity, but
remains compatible with GridFinity.  Notable features:
- dovetail tabs to join panel
- screw holes to affix bins to a panel
- holes for magnets in the base
…e them for cutting on standard plywood panels
The photoframe module sets up a logger (this is okay) but then
proceeds to set the loggers level and output handler.  This causes
photoframe to emit logging statements to the console (i.e. visible
when boxes_main is run with --examples) and makes it difficult
for upstream code to turn off undesired logging.
The original boxes_main would handle args via sys.argv, which limits
functionality (for example adding a --debug flag that enables the
logging module at the debug level).

Full backwards compatibility is maintained using argparse.REMAINDER.
This also then supports the convention of using '--' to separate
boxes_main args and generator args when there is ambiguity
…lities

The current test setup can only verify that generators default output
doesn't change; this change uses a YAML file to automate generation of
examples and supports making custom examples with custom arguments.

This is also reusable to automate creation of multiple boxes.  For
example, you are generating a set of boxes for a silverware drawer
and you can write a single YAML file and then share that file with
others to generate all the boxes.
A common use case (at least for me) is that I want to make multiple cuts
that won't fit on a single standard 12"x12" panel.  I don't like having
to manually arrange pieces to fit on these panels, so this script
automates that action.
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.

1 participant