mirror of
https://github.com/kennetek/gridfinity-rebuilt-openscad.git
synced 2025-01-02 12:09:33 +00:00
Break Gridfinity Refined thumbscrew out to a separate function
Also move constants to standard.scad.
This commit is contained in:
parent
bf7bbed27a
commit
fa942bf5f5
2 changed files with 21 additions and 15 deletions
|
@ -306,6 +306,18 @@ module base_polygon() {
|
|||
polygon(solid_profile);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Internal function to create the negative for a Gridfinity Refined thumbscrew hole.
|
||||
* @details Magic constants are what the threads.ScrewHole function does.
|
||||
*/
|
||||
module _base_thumbscrew() {
|
||||
ScrewThread(
|
||||
1.01 * BASE_THUMBSCREW_OUTER_DIAMETER + 1.25 * 0.4,
|
||||
BASE_HEIGHT,
|
||||
BASE_THUMBSCREW_PITCH
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief A single Gridfinity base. With holes (if set).
|
||||
* @param hole_options @see block_base_hole.hole_options
|
||||
|
@ -325,13 +337,6 @@ module block_base(hole_options, off=0, top_dimensions=BASE_TOP_DIMENSIONS, thumb
|
|||
str("Minimum size of a single base must be greater than ", 2*BASE_TOP_RADIUS)
|
||||
);
|
||||
|
||||
thumbscrew_outerdiam = 15;
|
||||
thumbscrew_height = 5;
|
||||
thumbscrew_tolerance = 0.4;
|
||||
thumbscrew_tooth_angle = 30;
|
||||
thumbscrew_pitch = 1.5;
|
||||
|
||||
|
||||
render(convexity = 2)
|
||||
difference() {
|
||||
union(){
|
||||
|
@ -343,14 +348,7 @@ module block_base(hole_options, off=0, top_dimensions=BASE_TOP_DIMENSIONS, thumb
|
|||
}
|
||||
|
||||
if (thumbscrew) {
|
||||
ScrewThread(
|
||||
1.01 * thumbscrew_outerdiam + 1.25 * thumbscrew_tolerance,
|
||||
thumbscrew_height,
|
||||
thumbscrew_pitch,
|
||||
thumbscrew_tooth_angle,
|
||||
thumbscrew_tolerance,
|
||||
tooth_height=0
|
||||
);
|
||||
_base_thumbscrew();
|
||||
}
|
||||
// 4 holes
|
||||
// Need this fancy code to support refined holes and non-square bases.
|
||||
|
|
|
@ -196,6 +196,14 @@ function base_bottom_dimensions(top_dimensions = BASE_TOP_DIMENSIONS) =
|
|||
[top_dimensions.x - 2*BASE_PROFILE_MAX.x,
|
||||
top_dimensions.y - 2*BASE_PROFILE_MAX.x];
|
||||
|
||||
// ***************
|
||||
// Gridfinity Refined Thumbscrew
|
||||
// See https://www.printables.com/model/413761-gridfinity-refined
|
||||
// ***************
|
||||
|
||||
BASE_THUMBSCREW_OUTER_DIAMETER=15;
|
||||
BASE_THUMBSCREW_PITCH=1.5;
|
||||
|
||||
// ****************************************
|
||||
// Baseplate constants
|
||||
// Based on https://gridfinity.xyz/specification/
|
||||
|
|
Loading…
Reference in a new issue