1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00
This commit is contained in:
Justin Lin 2019-10-04 09:50:33 +08:00
parent 6c15fc2fe0
commit 0badb22b54

View File

@ -1,7 +1,13 @@
include <rotate_p.scad>;
include <cross_sections.scad>;
include <polysections.scad>;
include <ring_extrude.scad>;
include <crystal_ball.scad>;
leng = 30; leng = 30;
leng_diff = 3; leng_diff = 3;
min_leng = 2; min_leng = 2;
model = "Cube"; // [Cube, Base] model = "Base"; // [Cube, Base]
module spiral_cube(leng, leng_diff, min_leng) { module spiral_cube(leng, leng_diff, min_leng) {
thickness = leng_diff / 3; thickness = leng_diff / 3;
@ -65,13 +71,11 @@ module base(leng) {
$fn = 96; $fn = 96;
r = leng / 3; r = leng / 3;
difference() { difference() {
difference() { crystal_ball(
sphere(r); radius = r,
theta = 360,
translate([0, 0, -r]) phi = 90
linear_extrude(r) );
square(r * 2, center = true);
}
translate([0, 0, leng * sqrt(3) / 2 + leng / 15]) translate([0, 0, leng * sqrt(3) / 2 + leng / 15])
rotate([45, atan2(1, sqrt(2)), 0]) rotate([45, atan2(1, sqrt(2)), 0])
cube(leng * 0.99, center = true); cube(leng * 0.99, center = true);