Skip to content

Commit 275ff13

Browse files
committed
Create nobo.scad
1 parent f1884a0 commit 275ff13

File tree

1 file changed

+215
-0
lines changed

1 file changed

+215
-0
lines changed

nobo.scad

Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
// body size
2+
width=40;
3+
height=41;
4+
length=82;
5+
wallWidth=2;
6+
7+
8+
//Connector
9+
connectorCutoutWidth=1;
10+
connectorCutoutHeight=6;
11+
connectorCutoutClearance=2;
12+
connectorCutoutPitch=3;
13+
14+
// PCB holder
15+
shelfDepth=18-13;
16+
shelfWidth=8;
17+
insertHoleDepth=10;
18+
insertHoleDiameter=4;
19+
PCBWidth=1.57;
20+
21+
// side positioners
22+
positionerWidth=1;
23+
24+
// LED
25+
ledCutoutRadius=5.5;
26+
ledCutoutWidth=0.4;
27+
28+
// srcew
29+
screw_dk=5.7;
30+
screw_k=3.5;
31+
screw_L=12;
32+
screw_d=3.2;
33+
34+
// Lid clearence
35+
lid_clearence=0.25;
36+
37+
// AUX
38+
height2=20;
39+
width2=11;
40+
41+
42+
43+
44+
// Main outline from side view
45+
outerLine =[[0,-2],[width,-2],[width,height2],[width-width2,height2],[0,height]];
46+
innerLine =[[wallWidth,-2],[width-wallWidth,-2],[width-wallWidth,height2-wallWidth],[width-width2-wallWidth*0.5,height2-wallWidth],[wallWidth,height-wallWidth*1.5]];
47+
bodyPolygon = concat(outerLine,innerLine);
48+
holderLine = [[0,shelfDepth],[width,shelfDepth],[width,height2],[width-width2,height2],[0,height]];
49+
50+
module side() {
51+
linear_extrude(height = wallWidth, center = true, convexity = 10, twist = 0, slices = 1, scale = 1.0, $fn = 64)
52+
polygon(outerLine,[[0,1,2,3,4]],10);
53+
}
54+
55+
module connectorCutout() {
56+
union() {
57+
translate([width-wallWidth-connectorCutoutHeight-connectorCutoutClearance,0,27.5-connectorCutoutWidth/2])
58+
for(ii=[0:1:6])
59+
if (ii!=1)
60+
translate([1,0,connectorCutoutPitch*ii]) cube([connectorCutoutHeight+0.5,height,connectorCutoutWidth]);
61+
translate([width-wallWidth-connectorCutoutHeight-connectorCutoutClearance-3,height2-1,27.5-connectorCutoutWidth/2-3]) cube([connectorCutoutHeight+6,10,connectorCutoutWidth*connectorCutoutPitch*7*1.2]);
62+
}
63+
}
64+
65+
module body() {
66+
difference() {
67+
linear_extrude(height = length-2*wallWidth, center = true, convexity = 10, twist = 0, slices = 40, scale = 1.0, $fn = 64)
68+
polygon(bodyPolygon,[[0,1,2,3,4],[5,6,7,8,9]],10);
69+
}
70+
}
71+
72+
module ledCutout() {
73+
translate([(width-2*wallWidth-2*lid_clearence)/2,wallWidth+ledCutoutWidth+1,(length-2*wallWidth)/2+21]) rotate([90,0,0]) cylinder(wallWidth,1.5*ledCutoutRadius,ledCutoutRadius, $fn = 64);
74+
}
75+
76+
module lidScrew() {
77+
union() {
78+
translate([0,shelfDepth*2,shelfWidth/2]) rotate([90,0,0]) cylinder(shelfDepth*1.5,screw_d/2,screw_d/2,$fn = 64);
79+
translate([0,screw_k,shelfWidth/2]) rotate([90,0,0]) cylinder(screw_k*1.5,screw_dk/2,screw_dk/2,$fn = 64);
80+
}
81+
}
82+
83+
module lid() {
84+
difference() {
85+
union() {
86+
cube([width-2*wallWidth-2*lid_clearence, wallWidth+1, length-2*wallWidth-2*lid_clearence],false);
87+
cube([width-2*wallWidth-2*lid_clearence, wallWidth+1+2,shelfWidth-lid_clearence],false);
88+
translate([0,0,length-2*wallWidth-shelfWidth-lid_clearence]) cube([width-2*wallWidth-2*lid_clearence,wallWidth+1+2,shelfWidth-lid_clearence],false);
89+
}
90+
translate([(width-2*wallWidth)/2-13-lid_clearence,0,lid_clearence]) lidScrew();
91+
translate([(width-2*wallWidth)/2+13-lid_clearence,0,lid_clearence]) lidScrew();
92+
translate([(width-2*wallWidth)/2-13-lid_clearence,0,length-2*wallWidth-shelfWidth-3*lid_clearence]) lidScrew();
93+
translate([(width-2*wallWidth)/2+13-lid_clearence,0,length-2*wallWidth-shelfWidth-3*lid_clearence]) lidScrew();
94+
95+
ledCutout();
96+
translate([(width-2*wallWidth-2*lid_clearence)/2,1,(length-2*wallWidth-2*lid_clearence)/2]) rotate([90,-90,0]) noboText();
97+
}
98+
99+
100+
101+
}
102+
103+
module noboText(){
104+
difference()
105+
{
106+
107+
scale(1.4) linear_extrude(3) text("NOBO",
108+
font="Raleway:style=ExtraBold",
109+
"Center Aligned" ,halign = "center",valign = "center");
110+
translate([-7,-10,-1]) cube([1.5,20,5]);
111+
translate([14,-6,-1]) rotate([0,0,-45]) cube([1.5,20,5]);
112+
}
113+
114+
}
115+
module insertHole(){
116+
rotate([90,0,0]) cylinder(insertHoleDepth,insertHoleDiameter/2,insertHoleDiameter/2,$fn = 64);
117+
}
118+
119+
module shelf(dir) {
120+
difference() {
121+
linear_extrude(height = shelfWidth, center = true, convexity = 10, twist = 0, slices = 1, scale = 1.0, $fn = 64)
122+
polygon(holderLine,[[0,1,2,3,4]],10);
123+
translate([width/2-13,shelfDepth+insertHoleDepth-1,dir]) insertHole();
124+
translate([width/2+13,shelfDepth+insertHoleDepth-1,dir]) insertHole();
125+
}
126+
}
127+
128+
module positioner() {
129+
linear_extrude(height = positionerWidth, center = true, convexity = 10, twist = 0, slices = 1, scale = 1.0, $fn = 64)
130+
polygon([[0,0],[25,0],[25,11],[25-8,11],[25-8,2],[25-8-3,2],[25-8-3,11],[0,11]],10);
131+
}
132+
133+
module screw()
134+
{
135+
difference() {
136+
union() {
137+
cylinder(h=screw_L+0.9*screw_k,d=0.90*screw_d,$fn = 64);
138+
cylinder(h=0.9*screw_k,d=0.9*screw_dk,$fn = 64);
139+
}
140+
cylinder(r=2, h=2, $fn=6);
141+
}
142+
}
143+
144+
module PCB() {
145+
difference() {
146+
cube([width-2*wallWidth-1,PCBWidth,length-2*wallWidth-1]);
147+
translate([(width-2*wallWidth)/2-13-lid_clearence,shelfDepth*1.25,shelfWidth/2-lid_clearence+0.5]) rotate([90,0,0]) cylinder(shelfDepth*1.5,screw_d/2,screw_d/2,$fn = 64);
148+
translate([(width-2*wallWidth)/2+13-lid_clearence,shelfDepth*1.25,shelfWidth/2-lid_clearence+0.5]) rotate([90,0,0]) cylinder(shelfDepth*1.5,screw_d/2,screw_d/2,$fn = 64);
149+
translate([(width-2*wallWidth)/2-13-lid_clearence,shelfDepth*1.25,length-2*wallWidth-shelfWidth-lid_clearence+shelfWidth/2-0.5]) rotate([90,0,0]) cylinder(shelfDepth*1.5,screw_d/2,screw_d/2,$fn = 64);
150+
translate([(width-2*wallWidth)/2+13-lid_clearence,shelfDepth*1.25,length-2*wallWidth-shelfWidth-lid_clearence+shelfWidth/2-0.5]) rotate([90,0,0]) cylinder(shelfDepth*1.5,screw_d/2,screw_d/2,$fn = 64);
151+
}
152+
}
153+
154+
module clamp() {
155+
clampPoly =[[0,0],[0,10],[-1,10],[-2,8],[-2,7],[-1,7],[-1,0]];
156+
linear_extrude(height = 7, center = true, convexity = 10, twist = 0, slices = 1, scale = 1.0, $fn = 64)
157+
polygon(clampPoly,[[0,1,2,3,4,5,6]],10);
158+
}
159+
160+
module base() {
161+
difference() {
162+
union() {
163+
translate([0,0,wallWidth/2]) side();
164+
translate([0,0,length/2]) body();
165+
translate([0,0,length-wallWidth/2]) side();
166+
translate([0,0,wallWidth+shelfWidth/2]) shelf(+0.5);
167+
translate([0,0,length-wallWidth-shelfWidth/2]) shelf(-0.5);
168+
translate([width-25,height2-2,positionerWidth/2]) positioner();
169+
translate([width-25,height2-2,length-positionerWidth/2]) positioner();
170+
translate([9,height-7.5,20]) clamp();
171+
translate([9,height-7.5,length-22]) clamp();
172+
}
173+
connectorCutout();
174+
175+
translate([21,35,length-11]) rotate([90,0,0]) cylinder(h=40,d=9,$fn = 64);
176+
}
177+
}
178+
179+
module crossSection() {
180+
difference() {
181+
union(){
182+
color("white") base();
183+
color ("green", alpha=0.5) translate([wallWidth+lid_clearence,shelfDepth-PCBWidth-0.2,wallWidth+lid_clearence]) PCB();
184+
color("red",alpha=0.9) translate([wallWidth+lid_clearence,-1.9,wallWidth+lid_clearence]) lid();
185+
color("yellow") translate([wallWidth+lid_clearence+4.75,-1.9,wallWidth+lid_clearence+4.25]) rotate([-90,0,0]) screw();
186+
}
187+
//translate([-17,0,0]) cube([100,500,500],true);
188+
translate([-43,0,0]) cube([100,500,500],true);
189+
}
190+
}
191+
192+
module exploded() {
193+
union(){
194+
color("white") base();
195+
color ("green", alpha=0.5) translate([wallWidth+lid_clearence,shelfDepth-PCBWidth-30,wallWidth+lid_clearence]) PCB();
196+
color("red",alpha=0.9) translate([wallWidth+lid_clearence,-60,wallWidth+lid_clearence]) lid();
197+
color("yellow") translate([wallWidth+lid_clearence+4.75,-90,wallWidth+lid_clearence+4.25]) rotate([-90,0,0]) screw();
198+
}
199+
}
200+
201+
module assembled() {
202+
union(){
203+
color("white") base();
204+
color ("green", alpha=0.5) translate([wallWidth+lid_clearence,shelfDepth-PCBWidth-0.2,wallWidth+lid_clearence]) PCB();
205+
color("red",alpha=0.9) translate([wallWidth+lid_clearence,-1.9+0,wallWidth+lid_clearence]) lid();
206+
}
207+
208+
}
209+
210+
//assembled();
211+
exploded();
212+
//crossSection();
213+
214+
//rotate([90,0,0]) lid();
215+
//rotate([0,-90,0]) base();

0 commit comments

Comments
 (0)