mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-27 08:25:45 +02:00
format
This commit is contained in:
@@ -50,20 +50,19 @@ module floor_stand(width, height, thickness, spacing) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module board_T() {
|
module board_T() {
|
||||||
linear_extrude(thickness, center = true)
|
linear_extrude(thickness, center = true) {
|
||||||
union() {
|
difference() {
|
||||||
difference() {
|
board_base();
|
||||||
board_base();
|
square([width, height / 3], center = true);
|
||||||
square([width, height / 3], center = true);
|
|
||||||
}
|
|
||||||
|
|
||||||
translate([0, -height / 12 - spacing / 2, 0])
|
|
||||||
difference() {
|
|
||||||
square([width / 1.5 - double_spacing, height / 6 + spacing], center = true);
|
|
||||||
square([width / 1.5 - thickness * 2, height / 6], center = true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
translate([0, -height / 12 - spacing / 2, 0])
|
||||||
|
difference() {
|
||||||
|
square([width / 1.5 - double_spacing, height / 6 + spacing], center = true);
|
||||||
|
square([width / 1.5 - thickness * 2, height / 6], center = true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
rotate([0, 90, 0]) {
|
rotate([0, 90, 0]) {
|
||||||
linear_extrude(width / 1.5 - double_spacing, center = true)
|
linear_extrude(width / 1.5 - double_spacing, center = true)
|
||||||
circle(half_th, $fn = 24);
|
circle(half_th, $fn = 24);
|
||||||
|
@@ -30,17 +30,16 @@ module content(text, font, font_size, symbol_png, symbol_unicode, symbol_font, s
|
|||||||
translate([0, -height / 1.8, thickness]) {
|
translate([0, -height / 1.8, thickness]) {
|
||||||
color("black")
|
color("black")
|
||||||
linear_extrude(half_th / 2)
|
linear_extrude(half_th / 2)
|
||||||
union() {
|
translate([0, -half_h / 3, 0])
|
||||||
translate([0, -half_h / 3, 0])
|
multi_line_text(
|
||||||
multi_line_text(
|
split_str(text, " "),
|
||||||
split_str(text, " "),
|
font = font,
|
||||||
font = font,
|
size = font_size,
|
||||||
size = font_size,
|
line_spacing = line_spacing,
|
||||||
line_spacing = line_spacing,
|
valign = "center",
|
||||||
valign = "center",
|
halign = "center"
|
||||||
halign = "center"
|
);
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(symbol_source == "DEFAULT") {
|
if(symbol_source == "DEFAULT") {
|
||||||
color("green")
|
color("green")
|
||||||
@@ -62,14 +61,13 @@ module content(text, font, font_size, symbol_png, symbol_unicode, symbol_font, s
|
|||||||
color("black")
|
color("black")
|
||||||
translate([0, half_h / 5, half_th / 4])
|
translate([0, half_h / 5, half_th / 4])
|
||||||
scale([symbol_png_scale, symbol_png_scale, 1])
|
scale([symbol_png_scale, symbol_png_scale, 1])
|
||||||
difference() {
|
difference() {
|
||||||
cube([symbol_png_size * 0.99, symbol_png_size * 0.99, stand_thickness / 4], center = true);
|
cube([symbol_png_size * 0.99, symbol_png_size * 0.99, stand_thickness / 4], center = true);
|
||||||
|
|
||||||
translate([0, 0, -50])
|
|
||||||
scale([1, 1, 100])
|
|
||||||
surface(symbol_png, center = true);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
translate([0, 0, -50])
|
||||||
|
scale([1, 1, 100])
|
||||||
|
surface(symbol_png, center = true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -24,8 +24,9 @@ function hollow_out_square(size, width) =
|
|||||||
rows = size[1]
|
rows = size[1]
|
||||||
)
|
)
|
||||||
[
|
[
|
||||||
for(y = [0:width:width * rows - width])
|
for(y = [0:width:width * rows - width],
|
||||||
for(x = [0:width:width * columns - width])
|
x = [0:width:width * columns - width],
|
||||||
for(line = h_lines_in_square(width))
|
line = h_lines_in_square(width)
|
||||||
[for(p = line) p + [x, y]]
|
)
|
||||||
|
[for(p = line) p + [x, y]]
|
||||||
];
|
];
|
@@ -20,14 +20,12 @@ else {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module hollow_out_torus_knot(shape, p, q, phi_step, thickness, line_style) {
|
module hollow_out_torus_knot(shape, p, q, phi_step, thickness, line_style) {
|
||||||
function angy_angz(p1, p2) =
|
function __angy_angz(p1, p2) =
|
||||||
let(
|
let(v = p2 - p1)
|
||||||
dx = p2[0] - p1[0],
|
[
|
||||||
dy = p2[1] - p1[1],
|
atan2(v.z, norm([v.x, v.y])),
|
||||||
dz = p2[2] - p1[2],
|
atan2(v.y, v.x)
|
||||||
ya = atan2(dz, sqrt(dx * dx + dy * dy)),
|
];
|
||||||
za = atan2(dy, dx)
|
|
||||||
) [ya, za];
|
|
||||||
|
|
||||||
function sects_by_path(shape, path) =
|
function sects_by_path(shape, path) =
|
||||||
let(
|
let(
|
||||||
@@ -37,7 +35,7 @@ module hollow_out_torus_knot(shape, p, q, phi_step, thickness, line_style) {
|
|||||||
],
|
],
|
||||||
angles = [
|
angles = [
|
||||||
for(line = lines)
|
for(line = lines)
|
||||||
let(a = angy_angz(line[0], line[1]))
|
let(a = __angy_angz(line[0], line[1]))
|
||||||
[0, 90 - a[0], a[1]]
|
[0, 90 - a[0], a[1]]
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user