Skip to content

Commit cfa5517

Browse files
committed
Added 2.1 changes to template and readme
1 parent c6854ee commit cfa5517

File tree

2 files changed

+320
-16
lines changed

2 files changed

+320
-16
lines changed

README.md

Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,258 @@ or at the
1111

1212
<hr>
1313

14+
## Rev. 2.1 (22-11-2023)
15+
16+
** New functionality **
17+
Cutout Shapes
18+
Cutouts now support more shapes.
19+
yappRectangle : Rectangle with size 'width' x 'length'
20+
yappCircle : Circle with radius of 'radius'
21+
yappRoundedRect : Rectangle with size 'width' x 'length' and corner radius of 'radius'
22+
yappPolygon : User defined polygon. Three standard shapes are included for use/reference - 'shapeIsoTriangle', 'shapeHexagon', 'shape6ptStar'
23+
yappCircleWithFlats : Circle with radius of 'radius' with the sides clipped to width (length is not used)
24+
yappCircleWithKey : Circle with radius of 'radius' with a rectangular key of width x length (length is key depth)
25+
Cutout Masks
26+
27+
Fillets
28+
Fillets are automatically added to all appropriate items.
29+
This can be overridden with the yappNoFillet option.
30+
Fillet radius can also be changed from default (same as connected wall thickness) with the filletRadius parameter.
31+
32+
//========= HOOK dummy functions ============================
33+
34+
// Hook functions allow you to add 3d objects to the case.
35+
// Lid/Base = Shell part to attach the object to.
36+
// Inside/Outside = Join the object from the midpoint of the shell to the inside/outside.
37+
// Pre/Post = Attach the object Pre or Post doing Cutouts/Stands/Connectors.
38+
39+
//===========================================================
40+
// origin = box(0,0,0)
41+
module hookLidInsidePre()
42+
{
43+
} // hookLidInsidePre()
44+
45+
//===========================================================
46+
// origin = box(0,0,0)
47+
module hookLidInsidePost()
48+
{
49+
} // hookLidInsidePost()
50+
51+
//===========================================================
52+
//===========================================================
53+
// origin = box(0,0,shellHeight)
54+
module hookLidOutsidePre()
55+
{
56+
} // hookLidOutsidePre()
57+
58+
//===========================================================
59+
// origin = box(0,0,shellHeight)
60+
module hookLidOutsidePost()
61+
{
62+
} // hookLidOutsidePost()
63+
64+
//===========================================================
65+
//===========================================================
66+
// origin = box(0,0,0)
67+
module hookBaseInsidePre()
68+
{
69+
} // hookBaseInsidePre()
70+
71+
//===========================================================
72+
// origin = box(0,0,0)
73+
module hookBaseInsidePost()
74+
{
75+
} // hookBaseInsidePost()
76+
77+
//===========================================================
78+
//===========================================================
79+
// origin = box(0,0,0)
80+
module hookBaseOutsidePre()
81+
{
82+
} // hookBaseOutsidePre()
83+
84+
//===========================================================
85+
// origin = box(0,0,0)
86+
module hookBaseOutsidePost()
87+
{
88+
} // hookBaseOutsidePost()
89+
90+
//===========================================================
91+
//===========================================================
92+
93+
94+
** Refinements **
95+
Updated definition standards:
96+
Parameters:
97+
(0) = Parentheses with a number indicates a required parameter.
98+
(n) = Parentheses with a 'n' indicates an optional parameter must be after the required parameters.
99+
{ Optional parameter }
100+
< Default value>
101+
| means one or more values from the list are allowed
102+
, means only one value from the list is allowed
103+
104+
105+
**This version breaks with the API for the following array's:**
106+
107+
<pre>
108+
/*===================================================================
109+
*** PCB Supports ***
110+
Pin and Socket standoffs
111+
------------------------------------------------------------------
112+
Default origin = yappPCBCoord : pcb[0,0,0]
113+
114+
Parameters:
115+
(0) = posx
116+
(1) = posy
117+
(2) = standoffHeight
118+
(3) = filletRadius (0 = auto size)
119+
(n) = { <yappBoth> | yappLidOnly | yappBaseOnly }
120+
(n) = { yappHole, <yappPin> } // Baseplate support treatment
121+
(n) = { <yappAllCorners> | yappFrontLeft | yappFrontRight | yappBackLeft | yappBackRight }
122+
(n) = { yappBoxCoord, <yappPCBCoord> }
123+
(n) = { yappNoFillet }
124+
*/
125+
</pre>
126+
127+
<pre>
128+
*===================================================================
129+
*** Connectors ***
130+
Standoffs with hole through base and socket in lid for screw type connections.
131+
------------------------------------------------------------------
132+
Default origin = yappBoxCoord: box[0,0,0]
133+
134+
Parameters:
135+
(0) = posx
136+
(1) = posy
137+
(2) = pcbStandHeight
138+
(3) = screwDiameter
139+
(4) = screwHeadDiameter (don't forget to add extra for the fillet)
140+
(5) = insertDiameter
141+
(6) = outsideDiameter
142+
(7) = filletRadius (0 = auto size)
143+
(n) = { <yappAllCorners> | yappFrontLeft | yappFrontRight | yappBackLeft | yappBackRight }
144+
(n) = { <yappBoxCoord>, yappPCBCoord }
145+
(n) = { yappNoFillet }
146+
147+
*/</pre>
148+
149+
<pre>
150+
/*===================================================================
151+
*** Base Mounts ***
152+
Mounting tabs on the outside of the box
153+
------------------------------------------------------------------
154+
Default origin = yappBoxCoord: box[0,0,0]
155+
156+
Parameters:
157+
(0) = pos
158+
(1) = screwDiameter
159+
(2) = width
160+
(3) = height
161+
(4) = filletRadius
162+
(n) = yappLeft / yappRight / yappFront / yappBack (one or more)
163+
(n) = { yappNoFillet }
164+
*/
165+
</pre>
166+
167+
<pre>
168+
/*===================================================================
169+
*** Cutouts ***
170+
There are 6 cutouts one for each surface:
171+
cutoutsBase, cutoutsLid, cutoutsFront, cutoutsBack, cutoutsLeft, cutoutsRight
172+
------------------------------------------------------------------
173+
Default origin = yappBoxCoord: box[0,0,0]
174+
175+
Required Not Used Note
176+
+-----------------------+---------------+------------------------------------
177+
yappRectangle | width, length | radius |
178+
yappCircle | radius | width, length |
179+
yappPolygon | width, length | radius |
180+
yappRoundedRect | width, length, radius | |
181+
yappCircleWithFlats | width, radius | length | length=distance between flats
182+
yappCircleWithKey | width, length, radius | | width = key width length=key depth
183+
184+
185+
Parameters:
186+
(0) = from Back
187+
(1) = from Left
188+
(2) = width
189+
(3) = length
190+
(4) = radius
191+
(5) = depth 0=Auto (plane thickness)
192+
(6) = angle
193+
(7) = yappRectangle | yappCircle | yappPolygon | yappRoundedRect | yappCircleWithFlats | yappCircleWithKey
194+
(8) = Polygon : [] if not used. - Required if yappPolygon specified -
195+
(9) = Mask : [] if not used. - Required if yappUseMask specified -
196+
(n) = { <yappCoordBox> | yappCoordPCB }
197+
(n) = { <yappOrigin>, yappCenter }
198+
(n) = { yappUseMask }
199+
(n) = { yappLeftOrigin, <yappGlobalOrigin> } // Only affects Top, Back and Right Faces
200+
201+
202+
*/
203+
</pre>
204+
205+
<pre>
206+
/*===================================================================
207+
*** Snap Joins ***
208+
------------------------------------------------------------------
209+
Default origin = yappBoxCoord: box[0,0,0]
210+
211+
Parameters:
212+
(0) = posx | posy
213+
(1) = width
214+
(n) = yappLeft / yappRight / yappFront / yappBack (one or more)
215+
(n) = { <yappOrigin> | yappCenter }
216+
(n) = { yappSymmetric }
217+
*/
218+
</pre>
219+
220+
<pre>
221+
/*===================================================================
222+
*** Light Tubes ***
223+
------------------------------------------------------------------
224+
Default origin = yappPCBCoord: PCB[0,0,0]
225+
226+
Parameters:
227+
(0) = posx
228+
(1) = posy
229+
(2) = tubeLength
230+
(3) = tubeWidth
231+
(4) = tubeWall
232+
(5) = gapAbovePcb
233+
(6) = lensThickness (how much to leave on the top of the lid for the light to shine through 0 for open hole
234+
(7) = tubeType {yappCircle|yappRectangle}
235+
(8) = filletRadius
236+
(n) = { yappBoxCoord, <yappPCBCoord> }
237+
(n) = { yappNoFillet }
238+
*/
239+
</pre>
240+
241+
<pre>
242+
/*===================================================================
243+
*** Push Buttons ***
244+
------------------------------------------------------------------
245+
Default origin = yappPCBCoord: PCB[0,0,0]
246+
247+
Parameters:
248+
(0) = posx
249+
(1) = posy
250+
(2) = capLength
251+
(3) = capWidth
252+
(4) = capAboveLid
253+
(5) = switchHeight
254+
(6) = switchTrafel
255+
(7) = poleDiameter
256+
(6) = filletRadius
257+
(n) = buttonType {yappCircle|yappRectangle}
258+
*/
259+
</pre>
260+
261+
<pre>
262+
</pre>
263+
264+
265+
14266
## Rev. 2.0 (21-05-2023)
15267

16268
**New functionality *lightTubes* (experimental)**

YAPP_Template_v21.scad

Lines changed: 68 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,16 @@ baseMounts =
279279
------------------------------------------------------------------
280280
Default origin = yappCoordBox: box[0,0,0]
281281
282+
Required Not Used Note
283+
+-----------------------+---------------+------------------------------------
284+
yappRectangle | width, length | radius |
285+
yappCircle | radius | width, length |
286+
yappPolygon | width, length | radius |
287+
yappRoundedRect | width, length, radius | |
288+
yappCircleWithFlats | width, radius | length | length=distance between flats
289+
yappCircleWithKey | width, length, radius | | width = key width length=key depth
290+
291+
282292
Parameters:
283293
(0) = from Back
284294
(1) = from Left
@@ -287,7 +297,7 @@ Parameters:
287297
(4) = radius
288298
(5) = depth 0=Auto (plane thickness)
289299
(6) = angle
290-
(7) = yappRectangle | yappCircle | yappPolygon | yappRoundedRect
300+
(7) = yappRectangle | yappCircle | yappPolygon | yappRoundedRect | yappCircleWithFlats | yappCircleWithKey
291301
(8) = Polygon : [] if not used. - Required if yappPolygon specified -
292302
(9) = Mask : [] if not used. - Required if yappUseMask specified -
293303
(n) = { <yappCoordBox> | yappCoordPCB }
@@ -441,38 +451,80 @@ labelsPlane =
441451
];
442452

443453

454+
//========= HOOK dummy functions ============================
455+
456+
// Hook functions allow you to add 3d objects to the case.
457+
// Lid/Base = Shell part to attach the object to.
458+
// Inside/Outside = Join the object from the midpoint of the shell to the inside/outside.
459+
// Pre/Post = Attach the object before (Pre) or after (Post) applying Cutouts/Stands/Connectors.
460+
444461
//===========================================================
445-
module hookLidInside()
462+
module hookLidInsidePre()
446463
{
447-
echo("hookLidInside(original) ..");
448-
translate([40, 40, -8]) color("purple") cube([15,20,10]);
464+
//echo("hookLidInside(original) ..");
465+
//translate([40, 40, -8]) cube([15,20,10]);
449466

450467
} // hookLidInside(dummy)
451468

452469
//===========================================================
453-
module hookLidOutside()
470+
module hookLidInsidePost()
454471
{
455-
echo("hookLidOutside(original) ..");
456-
translate([(shellLength/2),-5,-5])
457-
{
458-
color("yellow") cube([20,15,10]);
459-
}
472+
//echo("hookLidInside(original) ..");
473+
//translate([40, 40, -8]) cube([15,20,10]);
474+
475+
} // hookLidInside(dummy)
476+
477+
//===========================================================
478+
module hookLidOutsidePre()
479+
{
480+
//echo("hookLidOutside(original) ..");
481+
//translate([(shellLength/2),-5,-5])
482+
//{
483+
// cube([20,15,10]);
484+
//}
485+
} // hookLidOutside(dummy)
486+
//===========================================================
487+
module hookLidOutsidePost()
488+
{
489+
//echo("hookLidOutside(original) ..");
490+
//translate([(shellLength/2),-5,-5])
491+
//{
492+
// cube([20,15,10]);
493+
//}
460494
} // hookLidOutside(dummy)
461495

462496
//===========================================================
463-
module hookBaseInside()
497+
module hookBaseInsidePre()
464498
{
465499
//echo("hookBaseInside(original) ..");
466-
echo("hookBaseInside(original) ..");
467-
translate([10, 30, -5]) color("lightgreen") cube([15,25,8]);
500+
translate([80, 30, -5])
501+
cube([15,25,10]);
502+
503+
} // hookBaseInside(dummy)
504+
//===========================================================
505+
module hookBaseInsidePost()
506+
{
507+
//echo("hookBaseInside(original) ..");
508+
translate([60, 30, -5])
509+
cube([15,25,10]);
468510

469511
} // hookBaseInside(dummy)
470512

471513
//===========================================================
472-
module hookBaseOutside()
514+
module hookBaseOutsidePre()
515+
{
516+
//echo("hookBaseOutside(original) ..");
517+
//translate([shellLength-wallThickness-10, 55, -5])
518+
// cube([15,25,10]);
519+
520+
} // hookBaseOutside(dummy)
521+
522+
//===========================================================
523+
module hookBaseOutsidePost()
473524
{
474-
echo("hookBaseOutside(original) ..");
475-
translate([shellLength-wallThickness-10, 55, -5]) color("green") cube([15,25,10]);
525+
// echo("hookBaseOutside(original) ..");
526+
// translate([shellLength-wallThickness-10, 55, -5])
527+
// cube([15,25,10]);
476528

477529
} // hookBaseOutside(dummy)
478530

0 commit comments

Comments
 (0)