1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-22 06:13:10 +02:00
This commit is contained in:
Justin Lin
2019-09-19 09:58:58 +08:00
parent 1229716878
commit 4914dda1ac
4 changed files with 53 additions and 34 deletions

View File

@@ -1,8 +1,9 @@
module floor_stand(width, height, thickness, joint_spacing) {
module floor_stand(width, height, thickness, spacing) {
half_w = width / 2;
half_h = height / 2;
half_th = thickness / 2;
half_sc = joint_spacing / 2;
double_spacing = spacing * 2;
$fn = 24;
@@ -21,23 +22,8 @@ module floor_stand(width, height, thickness, joint_spacing) {
}
}
module joint_tops(dist) {
module joint_top() {
linear_extrude(thickness / 4 + half_sc, scale = 0.1)
circle(thickness / 4 + half_sc);
}
half_d = dist / 2;
translate([-half_d, 0, 0])
rotate([0, -90, 0])
joint_top();
translate([half_d, 0, 0])
rotate([0, 90, 0])
joint_top();
}
module board_U() {
angles = [0, 90, 0];
difference() {
union() {
linear_extrude(thickness, center = true)
@@ -45,38 +31,39 @@ module floor_stand(width, height, thickness, joint_spacing) {
board_base();
square([width / 1.5, height / 3], center = true);
}
rotate([0, 90, 0])
rotate(angles)
linear_extrude(width / 2.25 * 2, center = true)
circle(thickness / 2);
circle(half_th);
}
rotate([0, 90, 0])
rotate(angles) {
linear_extrude(width / 1.5, center = true)
circle(thickness, $fn = 24);
joint_tops(half_w / 1.5 * 2);
cone(half_th - spacing, length = half_w / 1.5 - spacing, spacing = spacing, heads = true, void = true);
}
}
}
module board_T() {
linear_extrude(thickness, center = true)
union() {
union() {
difference() {
board_base();
square([width, height / 3], center = true);
}
translate([0, -height / 12 - joint_spacing / 4, 0])
translate([0, -height / 12 - spacing / 2, 0])
difference() {
square([width / 1.5 - joint_spacing, height / 6 + joint_spacing / 2], center = true);
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])
linear_extrude(width / 1.5 - joint_spacing, center = true)
rotate([0, 90, 0]) {
linear_extrude(width / 1.5 - double_spacing, center = true)
circle(half_th, $fn = 24);
joint_tops(half_w / 1.5 * 2 - joint_spacing);
cone(half_th - spacing, length = half_w / 1.5 - spacing, spacing = spacing, heads = true);
}
}
module border() {

View File

@@ -4,6 +4,7 @@ include <multi_line_text.scad>;
include <shape_taiwan.scad>;
include <hollow_out.scad>;
include <floor_stand.scad>;
include <part/cone.scad>;
text = " Taiwan";
font = "Arial Black";
@@ -13,7 +14,7 @@ line_spacing = 7;
stand_width = 40;
stand_height = 80;
stand_thickness = 4;
joint_spacing = 1;
stand_spacing = 0.5;
symbol_source = "DEFAULT"; // [DEFAULT, PNG, UNICODE]
@@ -71,5 +72,5 @@ module content(text, font, font_size, symbol_png, symbol_unicode, symbol_font, s
}
}
floor_stand(stand_width, stand_height, stand_thickness, joint_spacing)
floor_stand(stand_width, stand_height, stand_thickness, stand_spacing)
content(text, font, font_size, symbol_png, symbol_unicode, symbol_font, symbol_font_size, stand_height, stand_thickness, line_spacing);

View File

@@ -3,6 +3,7 @@ include <util/split_str.scad>;
include <hollow_out.scad>;
include <floor_stand.scad>;
include <multi_line_text.scad>;
include <part/cone.scad>;
text = "Coder at Work";
font = "Arial Black";
@@ -12,7 +13,7 @@ line_spacing = 10;
stand_width = 40;
stand_height = 80;
stand_thickness = 4;
joint_spacing = 1;
stand_spacing = 0.5;
module words(text, font, font_size, height, thickness, line_spacing) {
half_th = thickness / 2;
@@ -31,5 +32,5 @@ module words(text, font, font_size, height, thickness, line_spacing) {
}
}
floor_stand(stand_width, stand_height, stand_thickness, joint_spacing)
floor_stand(stand_width, stand_height, stand_thickness, stand_spacing)
words(text, font, font_size, stand_height, stand_thickness, line_spacing);

30
src/part/cone.scad Normal file
View File

@@ -0,0 +1,30 @@
module cone(radius, length = 0, spacing = 0.5, angle = 50, void = false, heads = false) {
module base(r) {
rotate_extrude() {
if(length != 0) {
square([r, length]);
}
polygon([
[0, length], [r, length], [0, r * tan(angle) + length]
]);
}
}
module head() {
if(void) {
base(radius + spacing);
}
else {
base(radius);
}
}
if(heads) {
head();
mirror([0, 0, 1]) head();
}
else {
head();
}
}