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

Fix Baseplate Not Rendering & Generate Baseplate From Profile #187

Merged
merged 32 commits into from
Aug 9, 2024

Conversation

EmperorArthur
Copy link
Collaborator

Incorporates #179

Main Changes

First, this fixes the baseplate not correctly in OpenSCAD version 2024.02.16 (git 55be9cf86). Done by switching from minovsky to offset in one function.

Second, instead of using a negative of the bin's this creates the base plate using technical data from the spec.

Other changes

Deprecated rounded_rectangle in favor of a new rounded_square function. Which operates like the built in square and cube functions.

Opinion

The minovsky function just seems to cause more issues than it is worth.

Everything now goes through block_base_hole(...)
Noting in gridfinity-rebuilt-utility knows or cares what sytle_hole contains.
Similar to ljbeal's Pull Request.
However, the implementation is completely different.

kennetek#144
Makes holes print better.

Use Affine Translation Matrices to be clear
how everything works without being too verbose.
Does not include all combinations.
Helps prevent / minimize issues with filament droop.
Expecially when Cura decides to start the top of hole in mid-air.

Visible Changes:
* Supportless screw holes have a 3rd layer.
* Supportless magnet holes without screw holes have a 3rd layer.

Backend Changes:
* Switched to a completely different generation strategy.
  * Previous strategy directly produced negative.
  * New strategy is to make a positive,
    then use that to create a negative.
* Algorithm for multiple layers is not perfect,
  but works within tollerances set.
* These are not (yet) triggered/run by the CI/CD system.
Used to ensure all hole options work.
May want to consider auto-generating these
as part of the documentation build.
* Updated constant names to match previous changes.
This can be re-used for the baseplate.
Difference was small enough the slicer mostly ignored it.
Hole changes were not tested against it.
Many oppertunities for improvements here.
As opposed to being a parameter of `create_image`.

Also made CameraArguments support fluent.
It now also supports all the hole options.

Note: Tests are not performed, due to the high rendering time.
Simplified profile_skeleton() by using `offset` instead of `minovsky`.
This is much less computationally expensive, and easier to understand.
* Now behaves more like rounded_rectangle, but creates 2d or 3d items.
* Deprecated rounded_rectangle.
* Added significant input checks to ensure values are valid.
The default for square is center=false.
Previous implementation was off by 0.5mm,
and required creating a gridfinity base.

This is much more flexible, and easier to understand.
@EmperorArthur
Copy link
Collaborator Author

EmperorArthur commented May 17, 2024

Pictures from python -m unittest

Edit: How do I make these smaller?!?

Also tests are not comprehensive, and do not cover other modes. The gaps are a rendering issue and are not there when creating the final model.

only_counterbored_screw_holes_top
only_countersunk_screw_holes_bottom
only_countersunk_screw_holes_top
plain_magnet_holes_top
ribbed_magnet_holes
chamfered_and_ribbed_magnet_holes
chamfered_magnet_holes
magnet_and_counterbored_screw_holes_bottom
magnet_and_counterbored_screw_holes_top
magnet_and_countersunk_screw_holes_bottom
magnet_and_countersunk_screw_holes_top
magnet_holes_bottom
no_holes_bottom
no_holes_top
only_counterbored_screw_holes_bottom

@nirvdrum
Copy link

I tried out this PR for my first Gridfinity baseplate. It worked great. I quite like the crush ribs for keeping magnets in place. Thanks for pulling this together.

Copy link

@ndemarco ndemarco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fit to drawer functionality has been lost.

The PR uses more modular construction (square_baseplate_lip, solid_square_baseplate, square_baseplate_corner), which appears to focus more on the modular and customizable aspect rather than ensuring the "fit to drawer" functionality.

@EmperorArthur
Copy link
Collaborator Author

Fit to drawer functionality has been lost.

The PR uses more modular construction (square_baseplate_lip, solid_square_baseplate, square_baseplate_corner), which appears to focus more on the modular and customizable aspect rather than ensuring the "fit to drawer" functionality.

Fit to drawer functionality has been restored, though tests were not added.

Please re-examine.

@EmperorArthur EmperorArthur requested a review from ndemarco June 20, 2024 05:15
Copy link

@ndemarco ndemarco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as intended. Excellent updates.

@EmperorArthur EmperorArthur requested a review from ndemarco June 26, 2024 19:27
@EmperorArthur
Copy link
Collaborator Author

EmperorArthur commented Jun 26, 2024

Works as intended. Excellent updates.

Thanks! Whenever you're ready feel free to merge it, as I don't have permissions to do so.

@freiser77
Copy link

@EmperorArthur : Thanks for your bugfix. I'm using your branch as a second remote origin and it solves #202 perfectly for me.

This was referenced Jul 15, 2024
@EmperorArthur EmperorArthur requested review from Ruudjhuu, kennetek and ndemarco and removed request for ndemarco July 23, 2024 14:56
@EmperorArthur
Copy link
Collaborator Author

Tried manually merging this, but "main" is a protected branch, and requires one reviewer to approve.

@ndemarco
Copy link

Works as intended.

Baseplates with styleskeletonized andstyle_hole` none is thicker than the same style with counterbore or countersink. The additional thickness when no screw holes are in place is unnecessary.

gridfinity-rebuilt-holes.scad Show resolved Hide resolved
tests/openscad_runner.py Show resolved Hide resolved
@EmperorArthur EmperorArthur merged commit 893e4f3 into kennetek:main Aug 9, 2024
1 check passed
@EmperorArthur EmperorArthur deleted the simplify_baseplate branch August 9, 2024 04:48
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.

6 participants