Commit graph

287 commits

Author SHA1 Message Date
Rocka84
9008d3bf9c allow decimals for some values in the customizer 2024-05-19 00:42:23 +02:00
Arthur Moore
8bfd05be8e Generate Baseplate from profile isntead of as a negative
Previous implementation was off by 0.5mm,
and required creating a gridfinity base.

This is much more flexible, and easier to understand.
2024-05-17 09:38:54 -04:00
Arthur Moore
54f0f4f935 Simplify rounded_square and make defaults match square
The default for square is center=false.
2024-05-17 09:38:47 -04:00
Arthur Moore
5a43731728 Make block_inset look similar to the previous version 2024-05-06 23:09:57 -04:00
James Jenkins
0b80167413 Fix cylinder depth; fix chamfer; formatting
- Cylinder depth now consistent across all axes
- Chamfer disabled in non-z axes, since that's nonsensical and wasn't
  working anyway
- Cleaned up formatting around math symbols for readability
2024-05-03 03:31:23 -05:00
Arthur Moore
7aebad420c Re-worked generic-helpers.rounded_square
* Now behaves more like rounded_rectangle, but creates 2d or 3d items.
* Deprecated rounded_rectangle.
* Added significant input checks to ensure values are valid.
2024-05-02 09:21:28 -04:00
Arthur Moore
388cb8dbab Fix baseplate not rendering
Simplified profile_skeleton() by using `offset` instead of `minovsky`.
This is much less computationally expensive, and easier to understand.
2024-05-02 09:21:28 -04:00
Arthur Moore
43b0b350a4 Use OpenSCAD Circle resolution to speed up ribbed cylinder creation 2024-05-02 09:20:22 -04:00
Arthur Moore
2245dd097c Fix gridfinity-rebuilt-lite
It now also supports all the hole options.

Note: Tests are not performed, due to the high rendering time.
2024-04-30 23:35:43 -04:00
Arthur Moore
e34a25d640 Baseplate - Add support for crush ribs and chamfering the magnet holes
* Updated tests
2024-04-30 08:11:29 -04:00
Arthur Moore
6f4e3b590e Add tests baseplate hole options 2024-04-30 07:54:52 -04:00
Arthur Moore
a4807fd3ab OpenScad Python Runner - Make camera_args a variable
As opposed to being a parameter of `create_image`.

Also made CameraArguments support fluent.
2024-04-30 07:43:09 -04:00
Arthur Moore
cd56b0e421 Make sure hole naming is consistent
Also fixes tests.
2024-04-30 07:38:47 -04:00
Arthur Moore
95219c6cb9 Fix Baseplate
Hole changes were not tested against it.
Many oppertunities for improvements here.
2024-04-30 01:46:37 -04:00
Arthur Moore
8346ce4dd3 Tweak chamfered magnet_hole to so the cone works witrh supportless
Difference was small enough the slicer mostly ignored it.
2024-04-30 01:08:05 -04:00
Arthur Moore
787fa30950 Split screw_hole into a separate function.
This can be re-used for the baseplate.
2024-04-30 01:06:40 -04:00
Arthur Moore
0e7c298154 Add tests for magenet holes in spiral-vase mode 2024-04-29 23:20:15 -04:00
Arthur Moore
01d759f406 Fix spiral vase bases
* Updated constant names to match previous changes.
2024-04-29 22:54:25 -04:00
Arthur Moore
35ee2065db Fix spiral vase mode
* Fixed assertion relating to walls.
* Switched to profile_wall instead of profile_wall_sub.
* Adjusted block_pinch offset so the stacking lip is properly printed.
2024-04-29 22:48:08 -04:00
Arthur Moore
bdc5a7e4d7 Added and update Images of all hole types
May want to consider auto-generating these
as part of the documentation build.
2024-04-28 02:05:50 -04:00
Arthur Moore
9b89773812 Add a test suite to generate images of bins with holes
Used to ensure all hole options work.
2024-04-28 02:05:50 -04:00
Arthur Moore
447df8621b Tweak defaults for Base Hole Options 2024-04-28 01:56:13 -04:00
Arthur Moore
73b10760f8 Update tests / helpers to allow adding more tests 2024-04-28 01:55:42 -04:00
Arthur Moore
0649f10802 Add Python tests for the hole cutouts to generate images.
* These are not (yet) triggered/run by the CI/CD system.
2024-04-27 00:31:19 -04:00
Arthur Moore
ca28aed898 Allow multiple levels for supportless holes
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.
2024-04-27 00:18:18 -04:00
Arthur Moore
1a50807295 Make Screw Holes Printable 2024-04-24 21:22:56 -04:00
Arthur Moore
3e94c65cf2 Add images of all the hole options.
Does not include all combinations.
2024-04-24 21:19:16 -04:00
Arthur Moore
c47661af7f Add A 2nd Level For Supportless Hole Generation
Makes holes print better.

Use Affine Translation Matrices to be clear
how everything works without being too verbose.
2024-04-24 21:19:10 -04:00
Arthur Moore
32f91a77ca Support Chamfering Magnet Holes
Similar to ljbeal's Pull Request.
However, the implementation is completely different.

https://github.com/kennetek/gridfinity-rebuilt-openscad/pull/144
2024-04-21 23:34:23 -04:00
Arthur Moore
f222c262fc Allow using crush ribs for the magnet hole 2024-04-21 23:28:49 -04:00
Arthur Moore
8fa885ac72 Allow mixing and matching hole options 2024-04-21 23:21:21 -04:00
Arthur Moore
2e0e9bd363 Simplify Hole Creation
Everything now goes through block_base_hole(...)
Noting in gridfinity-rebuilt-utility knows or cares what sytle_hole contains.
2024-04-21 23:07:21 -04:00
Arthur Moore
a4200a04bd Simplify refined_hole() 2024-04-21 23:07:08 -04:00
Arthur Moore
67ba594585 Made some hole constants more readable 2024-04-21 22:08:54 -04:00
Arthur Moore
88ad9dbf6c Moved hole functions to a separate file 2024-04-21 22:03:21 -04:00
Ruud
36345f3efb
Merge pull request #175 from EmperorArthur/affine_hell
Use Affine Transformation Matrices For sweep_rounded
2024-04-18 20:15:49 +02:00
Ruud
fc51ba875e
Merge pull request #173 from coderjo/main
Don't add holes if style_hole is 0 even if only_corners is set
2024-04-18 20:10:17 +02:00
Ruud
cf1666fa2c
Merge pull request #171 from EmperorArthur/fix_wall_profile
Update Stacking Lip Profile
2024-04-18 20:07:55 +02:00
Arthur Moore
e7ef96bbcf Stop using as many hacks in sweep_rounded 2024-04-17 22:34:49 -04:00
Arthur Moore
ff3a325b37 Update affine_translate to support all axes. 2024-04-17 22:34:30 -04:00
Arthur Moore
20492634d8 Update affine_rotate to support all axes. 2024-04-17 22:34:03 -04:00
Arthur Moore
574d9dc6b1 Move helper functions / modules to their own file
These are not explicitly tied to Gridfinity.
2024-03-11 19:36:48 -04:00
Arthur Moore
637b98577f Match radius of bin to radius of base.
Fixes #169, and #165.
2024-03-10 23:34:30 -04:00
Arthur Moore
5b25e2e114 Replace "1.4" constant in profile_wall() with calculated value 2024-03-10 23:28:47 -04:00
Arthur Moore
69cb64e98d Rename chamfered profile to stacking_lip_chamfered() 2024-03-10 23:23:09 -04:00
Arthur Moore
1cf350121d Use Affine transformation matrices for creating walls.
This involves more math, but results in a cleaner abstract syntax tree.
Which also means it is cleaner when importing to something like FreeCAD.
2024-03-09 23:29:03 -05:00
Tracy Ward
d9d92db544 Don't add holes if style_hole is 0 even if only_corners is set 2024-03-04 22:13:17 -05:00
Arthur Moore
015daff2e8 Update Stacking Lip Profile
Profile is now based on https://gridfinity.xyz/specification/
This does not change the final profile, merely how it is created.

Fixes #168 - Cura watertight issue.
Paritally fixes #169 - FreeCad errors.
2024-02-24 03:57:06 -05:00
Arthur Moore
fd4db5aa9f Add more brief function descriptions 2024-02-24 09:18:49 +01:00
Arthur Moore
6b6b385cda Made height calculations more readable.
There are significantly more lines, but the code is now more understandable.
2024-02-24 09:18:49 +01:00