mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-11 04:44:11 +02:00
fix doc bug, put torx_mask first
This commit is contained in:
@@ -73,7 +73,7 @@ module color_this(c="default")
|
|||||||
// Description:
|
// Description:
|
||||||
// Iterates the list, displaying children in different colors for each list item. The color
|
// Iterates the list, displaying children in different colors for each list item. The color
|
||||||
// is set using the color() module, so this module is not compatible with {{recolor()}} or
|
// is set using the color() module, so this module is not compatible with {{recolor()}} or
|
||||||
// {{color_this}}. This is useful for debugging regions or lists of paths.
|
// {{color_this()}}. This is useful for debugging regions or lists of paths.
|
||||||
// Arguments:
|
// Arguments:
|
||||||
// list = The list of items to iterate through.
|
// list = The list of items to iterate through.
|
||||||
// stride = Consecutive colors stride around the color wheel divided into this many parts.
|
// stride = Consecutive colors stride around the color wheel divided into this many parts.
|
||||||
|
133
screw_drive.scad
133
screw_drive.scad
@@ -126,6 +126,74 @@ function phillips_diam(size, depth) =
|
|||||||
// Section: Torx Drive
|
// Section: Torx Drive
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Module: torx_mask()
|
||||||
|
// Usage:
|
||||||
|
// torx_mask(size, l, [center]);
|
||||||
|
// Description: Creates a torx bit tip.
|
||||||
|
// Arguments:
|
||||||
|
// size = Torx size.
|
||||||
|
// l = Length of bit.
|
||||||
|
// center = If true, centers bit vertically.
|
||||||
|
// ---
|
||||||
|
// anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER`
|
||||||
|
// spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0`
|
||||||
|
// orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP`
|
||||||
|
// Examples:
|
||||||
|
// torx_mask(size=30, l=10, $fa=1, $fs=1);
|
||||||
|
module torx_mask(size, l=5, center, anchor, spin=0, orient=UP) {
|
||||||
|
anchor = get_anchor(anchor, center, BOT, BOT);
|
||||||
|
od = torx_outer_diam(size);
|
||||||
|
attachable(anchor,spin,orient, d=od, l=l) {
|
||||||
|
linear_extrude(height=l, convexity=4, center=true) {
|
||||||
|
torx_mask2d(size);
|
||||||
|
}
|
||||||
|
children();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Module: torx_mask2d()
|
||||||
|
// Usage:
|
||||||
|
// torx_mask2d(size);
|
||||||
|
// Description: Creates a torx bit 2D profile.
|
||||||
|
// Arguments:
|
||||||
|
// size = Torx size.
|
||||||
|
// Example(2D):
|
||||||
|
// torx_mask2d(size=30, $fa=1, $fs=1);
|
||||||
|
module torx_mask2d(size) {
|
||||||
|
od = torx_outer_diam(size);
|
||||||
|
id = torx_inner_diam(size);
|
||||||
|
tip = torx_tip_radius(size);
|
||||||
|
rounding = torx_rounding_radius(size);
|
||||||
|
base = od - 2*tip;
|
||||||
|
$fn = quantup(segs(od/2),12);
|
||||||
|
difference() {
|
||||||
|
union() {
|
||||||
|
circle(d=base);
|
||||||
|
zrot_copies(n=2) {
|
||||||
|
hull() {
|
||||||
|
zrot_copies(n=3) {
|
||||||
|
translate([base/2,0,0]) {
|
||||||
|
circle(r=tip, $fn=$fn/2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
zrot_copies(n=6) {
|
||||||
|
zrot(180/6) {
|
||||||
|
translate([id/2+rounding,0,0]) {
|
||||||
|
circle(r=rounding);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Function: torx_outer_diam()
|
// Function: torx_outer_diam()
|
||||||
// Usage:
|
// Usage:
|
||||||
// diam = torx_outer_diam(size);
|
// diam = torx_outer_diam(size);
|
||||||
@@ -257,71 +325,6 @@ function torx_rounding_radius(size) = lookup(size, [
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Module: torx_mask2d()
|
|
||||||
// Usage:
|
|
||||||
// torx_mask2d(size);
|
|
||||||
// Description: Creates a torx bit 2D profile.
|
|
||||||
// Arguments:
|
|
||||||
// size = Torx size.
|
|
||||||
// Example(2D):
|
|
||||||
// torx_mask2d(size=30, $fa=1, $fs=1);
|
|
||||||
module torx_mask2d(size) {
|
|
||||||
od = torx_outer_diam(size);
|
|
||||||
id = torx_inner_diam(size);
|
|
||||||
tip = torx_tip_radius(size);
|
|
||||||
rounding = torx_rounding_radius(size);
|
|
||||||
base = od - 2*tip;
|
|
||||||
$fn = quantup(segs(od/2),12);
|
|
||||||
difference() {
|
|
||||||
union() {
|
|
||||||
circle(d=base);
|
|
||||||
zrot_copies(n=2) {
|
|
||||||
hull() {
|
|
||||||
zrot_copies(n=3) {
|
|
||||||
translate([base/2,0,0]) {
|
|
||||||
circle(r=tip, $fn=$fn/2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
zrot_copies(n=6) {
|
|
||||||
zrot(180/6) {
|
|
||||||
translate([id/2+rounding,0,0]) {
|
|
||||||
circle(r=rounding);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Module: torx_mask()
|
|
||||||
// Usage:
|
|
||||||
// torx_mask(size, l, [center]);
|
|
||||||
// Description: Creates a torx bit tip.
|
|
||||||
// Arguments:
|
|
||||||
// size = Torx size.
|
|
||||||
// l = Length of bit.
|
|
||||||
// center = If true, centers bit vertically.
|
|
||||||
// ---
|
|
||||||
// anchor = Translate so anchor point is at origin (0,0,0). See [anchor](attachments.scad#subsection-anchor). Default: `CENTER`
|
|
||||||
// spin = Rotate this many degrees around the Z axis after anchor. See [spin](attachments.scad#subsection-spin). Default: `0`
|
|
||||||
// orient = Vector to rotate top towards, after spin. See [orient](attachments.scad#subsection-orient). Default: `UP`
|
|
||||||
// Examples:
|
|
||||||
// torx_mask(size=30, l=10, $fa=1, $fs=1);
|
|
||||||
module torx_mask(size, l=5, center, anchor, spin=0, orient=UP) {
|
|
||||||
anchor = get_anchor(anchor, center, BOT, BOT);
|
|
||||||
od = torx_outer_diam(size);
|
|
||||||
attachable(anchor,spin,orient, d=od, l=l) {
|
|
||||||
linear_extrude(height=l, convexity=4, center=true) {
|
|
||||||
torx_mask2d(size);
|
|
||||||
}
|
|
||||||
children();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Section: Robertson/Square Drives
|
// Section: Robertson/Square Drives
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user