# Skip the HW Store 3d Print it Instead

**URL:** <https://forum.makewithtech.com/t/skip-the-hw-store-3d-print-it-instead/3039>\
**Category:** Forum for Registered Users\
**Created:** [March 1, 2021, 7:30pm UTC](https://forum.makewithtech.com/t/skip-the-hw-store-3d-print-it-instead/3039 "2021-03-01T19:30:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![irvshapiro-drvax](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.makewithtech.com/irvshapiro-drvax/32/8_2.png) [@irvshapiro-drvax](https://forum.makewithtech.com/u/irvshapiro-drvax)\
**Post date:** [March 1, 2021, 7:30pm UTC](https://forum.makewithtech.com/t/skip-the-hw-store-3d-print-it-instead/3039/1 "2021-03-01T19:30:19Z")

</div>

Folks, I am working on two related videos about the above title. I thought I would give everyone in this forum a heads up about what’s next while I wait for my sample prints to complete.

The first highlights a number of OpenSCAD models that you can use to produce practical prints of brackets, hinges, chains, nuts, and bolts. The goal of the video is to introduce a number of practical uses for 3d printers.

In the video, I demonstrate a new OpenSCAD shelf bracket scripts I wrote for the video. Then in a follow-up video, I will walk folks through the code in the shelf bracket script and introduce the use of trigonometry in OpenSCAD. Here is an early version of the code I will explain in the video.

```auto

/*
* Copyright (c)..: 2020 Cogitations, LLC
*
* Author: Irv Shapiro for the DrVAX youtube channel
* Creation Date..: 03/2021
* Description....: Customizable Shelf Bracket
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/

/* Excellent resource for OpenSCAD syntax */
/* https://www.openscad.org/cheatsheet/ */

/* [Shelf Bracket Dimensions] */
base = 150.0;
side = 75.0;
width = 25.0;
thickness = 5.0;
screw_hole = 4.5;

/* [Hidden] */

$fn = 25; // number of sides in a circle
depth = thickness;
hole_1 = 40;
hole_2 = base - 40;
hole_3 = 20;
hole_4 = side - 20;
angle_attachment = side /2;

/* Horizontal Leg, with 2 screw holes */
difference(){

difference() {
/* horizontal leg */
cube([base,width,depth], center = false);
/* screw hole 1 */
translate([hole_1,width/2,-2])
cylinder( h=depth+3, d=screw_hole);
}

/* screw hole 2 */
translate([hole_2,width/2,-2])
cylinder( h=depth+3, d=screw_hole);

}

/* Vertical Leg, with 2 screw holes */

difference(){
difference() {
/* vertical leg */
cube([depth,width,side], center = false);
/* screw hole 1 */
translate([-2,width/2,hole_3])
rotate([0,90,0])
cylinder( h=depth+3, d=screw_hole);
}

/* screw hole 2 */
translate([-2,width/2,hole_4])
rotate([0,90,0])
cylinder( h=depth+3, d=screw_hole);

}

/ *********************************************************************
Add the cross beam at an angle
Calculate the length of the cross beam using a^2 + b^2 = c^2
Sin (x) = Opposite / Adjacent
angle of cross beam = inverse sin(Opposite / Adjacent)
********************************************************************* /

a = side/2;
b = base/2;
c = sqrt((a^2)+(b^2));
angle = asin(a/c);

translate([0,0,angle_attachment])
rotate([0,angle,0])
cube([c,width,depth], center = false);

/* end of script */

```

Enjoy.

---

<div class="post-metadata">

**Author:** ![Ender5r](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@Ender5r](https://forum.makewithtech.com/u/Ender5r)\
**Post date:** [March 2, 2021, 3:08pm UTC](https://forum.makewithtech.com/t/skip-the-hw-store-3d-print-it-instead/3039/2 "2021-03-02T15:08:29Z")

</div>

Hey, the man is getting into openSCAD!! I really like oSCAD, except for how poor it is at filleting. I have found I can’t stand not having filleting, so I had to give up on oSCAD. But, I just had a thought: I wonder if it would be possible to produce most of a model in oSCAD, then export it in a shareable format (STEP??) & do filleting in another program?

---

<div class="post-metadata">

**Author:** ![roon4660](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.makewithtech.com/roon4660/32/35_2.png) [@roon4660](https://forum.makewithtech.com/u/roon4660)\
**Post date:** [March 4, 2021, 2:05pm UTC](https://forum.makewithtech.com/t/skip-the-hw-store-3d-print-it-instead/3039/3 "2021-03-04T14:05:23Z")

</div>

What is the name of this code that SCAD uses?

---

<div class="post-metadata">

**Author:** ![Ender5r](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@Ender5r](https://forum.makewithtech.com/u/Ender5r)\
**Post date:** [March 4, 2021, 2:44pm UTC](https://forum.makewithtech.com/t/skip-the-hw-store-3d-print-it-instead/3039/4 "2021-03-04T14:44:25Z")

</div>

openSCAD has it’s own programming/scripting language. There are no 3D manipulation tools: i.e. you can’t select a line or face or body & dimension it or extrude it or anything else. Everything is done using the language.

---

<div class="post-metadata">

**Author:** ![roon4660](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.makewithtech.com/roon4660/32/35_2.png) [@roon4660](https://forum.makewithtech.com/u/roon4660)\
**Post date:** [March 4, 2021, 3:56pm UTC](https://forum.makewithtech.com/t/skip-the-hw-store-3d-print-it-instead/3039/5 "2021-03-04T15:56:01Z")

</div>

Do you get any feed back? I’m having trouble imagining. It’s been 20 years since I watched my son doing 3d animation with a Windows five computer. I can barely handle Tinkercad.

---

<div class="post-metadata">

**Author:** ![Gramps](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.makewithtech.com/gramps/32/60_2.png) [@Gramps](https://forum.makewithtech.com/u/Gramps)\
**Post date:** [March 4, 2021, 4:39pm UTC](https://forum.makewithtech.com/t/skip-the-hw-store-3d-print-it-instead/3039/6 "2021-03-04T16:39:38Z")

</div>

I haven’t tried using it yet but saw last night while in FreeCad an Openscad workbench. This is one of the nightly builds of 0.19

---

<div class="post-metadata">

**Author:** ![Ender5r](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@Ender5r](https://forum.makewithtech.com/u/Ender5r)\
**Post date:** [March 4, 2021, 4:47pm UTC](https://forum.makewithtech.com/t/skip-the-hw-store-3d-print-it-instead/3039/7 "2021-03-04T16:47:25Z")

</div>

> [@roon4660](#):
>
> Do you get any feed back? I’m having trouble imagining. It’s been 20 years since I watched my son doing 3d animation with a Windows five computer. I can barely handle Tinkercad.

Oh yes, there is a preview window that shows the effect of your code. You can zoom in/out, rotate, etc. You just can’t manipulate the image like you can in other CAD programs.

---

<div class="post-metadata">

**Author:** ![roon4660](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.makewithtech.com/roon4660/32/35_2.png) [@roon4660](https://forum.makewithtech.com/u/roon4660)\
**Post date:** [March 4, 2021, 5:17pm UTC](https://forum.makewithtech.com/t/skip-the-hw-store-3d-print-it-instead/3039/8 "2021-03-04T17:17:38Z")

</div>

I’ll have to play with it when my brain gets back from holiday,
