mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-29 11:58:39 +01:00
refactor
This commit is contained in:
parent
402aa95289
commit
5016231000
@ -1,4 +1,4 @@
|
||||
use <shape_starburst.scad>;
|
||||
use <shape_star.scad>;
|
||||
use <polyline_join.scad>;
|
||||
use <experimental/tri_bisectors.scad>;
|
||||
|
||||
@ -10,7 +10,7 @@ line_diameter = 1.75;
|
||||
half = true;
|
||||
|
||||
module hollow_out_starburst(r1, r2, h, n, line_diameter, half = false) {
|
||||
star = [for(p = shape_starburst(r1, r2, n)) [p[0], p[1], 0]];
|
||||
star = [for(p = shape_star(r1, r2, n)) [p[0], p[1], 0]];
|
||||
leng = len(star);
|
||||
tris = concat(
|
||||
[for(i = [0:leng - 2]) [[0, 0, h], star[i], star[i + 1]]],
|
||||
|
@ -1,5 +1,5 @@
|
||||
use <line2d.scad>;
|
||||
use <starburst.scad>;
|
||||
use <polyhedra/star.scad>;
|
||||
use <util/rand.scad>;
|
||||
|
||||
base = 100;
|
||||
@ -34,7 +34,7 @@ module xmas_tree(base, segments) {
|
||||
color("yellow")
|
||||
translate([0, 0, height + dh * 6])
|
||||
rotate([90, 0, 540]) {
|
||||
starburst(seg_w * 2.75, seg_w * 1.5, 8, seg_w);
|
||||
mirror([0, 0, 1]) starburst(seg_w * 2.75, seg_w * 1.5, 8, seg_w);
|
||||
star(seg_w * 2.75, seg_w * 1.5, seg_w, 8);
|
||||
mirror([0, 0, 1]) star(seg_w * 2.75, seg_w * 1.5, seg_w, 8);
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
use <shape_starburst.scad>;
|
||||
use <shape_star.scad>;
|
||||
|
||||
model = "STAR"; // [STAR, BASE, BOTH]
|
||||
r1 = 12;
|
||||
@ -33,7 +33,7 @@ module fidget_star(model, r1, r2, n, number_of_stars, height, thickness, spacing
|
||||
r_ratio = r1 / r2;
|
||||
|
||||
module star(r1, r2) {
|
||||
polygon(shape_starburst(r1, r2, n));
|
||||
polygon(shape_star(r1, r2, n));
|
||||
}
|
||||
|
||||
rs2 = [for(i = [0: number_of_stars + 1]) r2 + i * dr];
|
||||
|
@ -1,4 +1,4 @@
|
||||
use <shape_starburst.scad>;
|
||||
use <shape_star.scad>;
|
||||
use <hollow_out.scad>;
|
||||
|
||||
// The idea is from Walk Torus83 Fort.
|
||||
@ -31,7 +31,7 @@ module wall(radius, height, thickness) {
|
||||
hollow_out(shell_thickness = th)
|
||||
intersection() {
|
||||
rotate(22.5)
|
||||
polygon(shape_starburst(ro, ri, 8));
|
||||
polygon(shape_star(ro, ri, 8));
|
||||
circle(ro * 0.9);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user