OpenSCAD Linkages Library

OpenSCAD Linkages Library

Description

# Openscad_Linkages_Library ### Openscad Library To Create Multiple Types Of Mechanical Linkages In 2D And 3D. Thingiverse Thing: [2081445](Http://Www.Thingiverse.Com/Thing:2081445) Check Out On [Github](Https://Github.Com/Machineree/Openscad_Linkages_Library) Check Out Http://Machineree.Com/#Openscad For More Information And Projects. *V.02 - February 5, 2017* + Linkages.Scad: 2D & 3D Linkages In One Library - Added Help Function: `Linkagehelp();` - Added Linkwidthangle, Linksurroundangle In 2D & 3D For Angled Flat Bar Linkages With 2/3 Holes - Renamed Modules To Fit Scheme - Changed Slots In Linkwidth & Linksurround To True/False - `Scale(In())` For Inches - `Scale(Cm())` For Centimeters *V.01 - January 31, 2017* + Linkages.Scad: 3D Linkages + Linkages2D.Scad: 2D Linkages To Be Exported .Svg Or .Dxf + Linkageex.Scad: Examples Of Some Of The Operations And Functions Of The Library Add To Your Library Folder In Openscad And Use The Include Function To Begin Using These Modules. ```Scad Include <Linkages.Scad> ``` [Openscad Libraries (Manual)](Https://En.Wikibooks.Org/Wiki/Openscad_User_Manual/Libraries "Openscad Libraries") Default Units Are Mm. ### 3D Linkages ![Alt Text](Https://Github.Com/Machineree/Openscad_Linkages_Library/Blob/Master/Pics/Linkageex.Png?Raw=True "Examples") 1. `Linkwidth(Holed,Width,Length,Thick,Slot=False);` + **Holed:** Diameter Of The Holes At Each End + **Width:** Width Of The Part (Must Be Greater Than Holed) + **Length:** Distance Between Outer Holes From Center + **Thick:** Thickness Of The Part Or Z Value + **Slot:** True For A Slot 2. `Linkwidththree(Holed,Width,Length,Thick,Three);` + **Holed:** Diameter Of The Holes At Each End + **Width:** Width Of The Part + **Length:** Distance Between Outer Holes From Center + **Thick:** Thickness Of The Part Or Z Value + **Three:** Distance A Third Hole Is From The First Hole, Choose Length/2 For Center Hole 3. `Linkwidthrot(Holed,Width,Length,Thick,Rot);` + **Holed:** Diameter Of The Holes At Each End + **Width:** Width Of The Part + **Length:** Distance Between Outer Holes From Center + **Thick:** Thickness Of The Part Or Z Value + **Rot:** Angle Of Rotation For The Second Hole To Create Angular Linkages 4. `Linkwidthangle(Holed,Width,Length1,Length2,Thick,Angle);` + **Holed:** Diameter Of The Holes At Each End + **Width:** Width Of The Part (Must Be Greater Than Holed) + **Length1:** Distance Between Holes From Center, First Section + **Length2:** Distance Between Holes From Center, Angled/Second Section + **Thick:** Thickness Of The Part Or Z Value + **Angle:** Angle Of Second Section Referenced From First Section 5. `Linksurround(Holed,Surround,Length,Thick,Slot=False);` + **Holed:** Diameter Of The Holes At Each End + **Surround:** Distance From The Edge Of The Hole To The Edge Of The Part + **Length:** Distance Between Outer Holes From Center + **Thick:** Thickness Of The Part Or Z Value + **Slot:** True For A Slot 6. `Linksurroundthree(Holed,Surround,Length,Thick,Three);` + **Holed:** Diameter Of The Holes At Each End + **Surround:** Distance From The Edge Of The Hole To The Edge Of The Part + **Length:** Distance Between Outer Holes From Center + **Thick:** Thickness Of The Part Or Z Value + **Three:** Distance A Third Hole Is From The First Hole, Choose Length/2 For Center Hole 7. `Linksurroundrot(Holed,Surround,Length,Thick,Rot);` + **Holed:** Diameter Of The Holes At Each End + **Surround:** Distance From The Edge Of The Hole To The Edge Of The Part + **Length:** Distance Between Outer Holes From Center + **Thick:** Thickness Of The Part Or Z Value + **Rot:** Angle Of Rotation For The Second Hole To Create Angular Linkages 8. `Linksurroundangle(Holed,Surround,Length1, Length2,Thick, Angle);` + **Holed:** Diameter Of The Holes At Each End + **Surround:** Distance From The Edge Of The Hole To The Edge Of The Part + **Length1:** Distance Between Holes From Center, First Section + **Length2:** Distance Between Holes From Center, Angled/Second Section + **Thick:** Thickness Of The Part Or Z Value + **Angle:** Angle Of Second Section Referenced From First Section ### 2D Linkages ![Alt Text](Https://Github.Com/Machineree/Openscad_Linkages_Library/Blob/Master/Pics/Linkage2Dex.Png?Raw=True "2D Examples") 1. `Linkwidth2D(Holed,Width,Length,Slot=False);` + **Holed:** Diameter Of The Holes At Each End + **Width:** Width Of The Part (Must Be Greater Than Holed) + **Length:** Distance Between Outer Holes From Center + **Slot:** True For A Slot 2. `Linkwidththree2D(Holed,Width,Length,Three);` + **Holed:** Diameter Of The Holes At Each End + **Width:** Width Of The Part + **Length:** Distance Between Outer Holes From Center + **Three:** Distance A Third Hole Is From The First Hole, Choose Length/2 For Center Hole 3. `Linkwidthangle2D(Holed,Width,Length1,Length2,Angle);` + **Holed:** Diameter Of The Holes At Each End + **Width:** Width Of The Part (Must Be Greater Than Holed) + **Length1:** Distance Between Holes From Center, First Section + **Length2:** Distance Between Holes From Center, Angled/Second Section + **Angle:** Angle Of Second Section Referenced From First Section 4. `Linksurround2D(Holed,Surround,Length,Slot=False);` + **Holed:** Diameter Of The Holes At Each End + **Surround:** Distance From The Edge Of The Hole To The Edge Of The Part + **Length:** Distance Between Outer Holes From Center + **Slot:** True For A Slot 5. `Linksurroundthree2D(Holed,Surround,Length,Three);` + **Holed:** Diameter Of The Holes At Each End + **Surround:** Distance From The Edge Of The Hole To The Edge Of The Part + **Length:** Distance Between Outer Holes From Center + **Three:** Distance A Third Hole Is From The First Hole, Choose Length/2 For Center Hole 6. `Linksurroundangle2D(Holed,Surround,Length1,Length2,Angle);` + **Holed:** Diameter Of The Holes At Each End + **Surround:** Distance From The Edge Of The Hole To The Edge Of The Part + **Length1:** Distance Between Holes From Center, First Section + **Length2:** Distance Between Holes From Center, Angled/Second Section + **Angle:** Angle Of Second Section Referenced From First Section ###Naming Strategy: Link+(Width/Surround)+(Three/Rot/Angle)+(2D) ###Examples! Using Basic `Linkwidth` And The Slot: ```Openscad Include <Linkages.Scad> Linkwidth(2,5,20,1); Translate([7.5,0,0]) Linkwidth(2,5,20,1,Slot=True); ``` ![Alt Text](Https://Github.Com/Machineree/Openscad_Linkages_Library/Blob/Master/Pics/Linkwidth.Png?Raw=True "Linkwidth") Comparison Of `Linkwidth` To `Linksurround` With The Same Values In Mm: ```Openscad Include <Linkages.Scad> Linkwidth(2,5,20,1); Translate([15,0,0]) Linksurround(2,5,20,1); ``` ![Alt Text](Https://Github.Com/Machineree/Openscad_Linkages_Library/Blob/Master/Pics/Linkwidthsurround.Png?Raw=True "Linkwidthsurround") Using Basic `Linkwidththree` To Determine Custom Distance To Middle Hole Using A Specific Number Or Dividing By Length Used For The Linkage: ```Openscad Include <Linkages.Scad> Linkwidththree(2,5,20,1,4); Translate([7.5,0,0]) Linkwidththree(2,5,20,1,20/2); ``` ![Alt Text](Https://Github.Com/Machineree/Openscad_Linkages_Library/Blob/Master/Pics/Linkwidththree.Png?Raw=True "Linkwidththree") Using `Linkwidthrot` For Complicated Angled/Twist Linkages, Using Positive And Negative Degrees: ```Openscad Include <Linkages.Scad> Linkwidthrot(2,5,20,1,45); Translate([7.5,0,0]) Linkwidthrot(2,5,20,1,-45); Translate([15,0,0]) Linkwidthrot(2,5,20,1,90); ``` ![Alt Text](Https://Github.Com/Machineree/Openscad_Linkages_Library/Blob/Master/Pics/Linkwidthrot.Png?Raw=True "Linkwidthrot") Using `Linkwidthrot` And 90 Degree Linkages With Flat Sides. This Is Accomplished By Making The Height Value The Same As The Width Value. For `Linksurroundrot` The Height Would Have To Be *Holed+Surround+Surround*. This Is The Result: ```Openscad Include <Linkages.Scad> Linkwidthrot(2,5,20,5,90); ``` ![Alt Text](Https://Github.Com/Machineree/Openscad_Linkages_Library/Blob/Master/Pics/Linkwidthrot90.Png?Raw=True "Linkwidthrot90") Using `Linkwidthangle` To Create Flat Angled Linkages, Using Different Length Segments, Positive And Negative Angles: ```Openscad Include <Linkages.Scad> Linkwidthangle(2,5,20,20,1,45); Translate([15,0,0]) Linkwidthangle(2,5,20,40,1,-90); ``` ![Alt Text](Https://Github.Com/Machineree/Openscad_Linkages_Library/Blob/Master/Pics/Linkwidthangle.Png?Raw=True "Linkwidthangle") Comparison Of Scaling The Same Linkage In Inches, Centimeters, And Millimeters: ```Openscad Include <Linkages.Scad> Scale(In()) Linkwidth(.25,.5,3,.125); Translate([15,0,0]) Scale(Cm()) Linkwidth(.25,.5,3,.125); Translate([22.5,0,0]) Linkwidth(.25,.5,3,.125); ``` ![Alt Text](Https://Github.Com/Machineree/Openscad_Linkages_Library/Blob/Master/Pics/3Dscaling.Png?Raw=True "Scaling") Simple 2X Pantograph Displaying Pieces, Colors, And Wireframe: ```Openscad Include <Linkages.Scad> Range=12; Thick=1; Color("Red") Linkwidththree (1,2,Range,Thick,Range/4); Color("Blue") Translate([Range/2,Range/4,0])Linkwidththree (1,2,3*Range/4,Thick,Range/4); Color("Yellow") Translate([0,Range/4,Thick]) Rotate([0,0,-90]) Linkwidth(1,2,Range/2,Thick); Color("Green") Translate([0,Range,Thick]) Rotate([0,0,-90]) Linkwidththree (1,2,Range,Thick,Range/2); ``` ![Alt Text](Https://Github.Com/Machineree/Openscad_Linkages_Library/Blob/Master/Pics/Pantorender.Png?Raw=True "Pantograph") ![Alt Text](Https://Github.Com/Machineree/Openscad_Linkages_Library/Blob/Master/Pics/Pantocolor.Png?Raw=True "Pantograph") ![Alt Text](Https://Github.Com/Machineree/Openscad_Linkages_Library/Blob/Master/Pics/Pantowire.Png?Raw=True "Pantograph") Output Of Help Within Openscad Console: ```Openscad Include <Linkages.Scad> Linkagehelp(); ``` ![Alt Text](Https://Github.Com/Machineree/Openscad_Linkages_Library/Blob/Master/Pics/Linkagehelp.Png?Raw=True "Linkagehelp")

Statistics

Likes

45

Downloads

0

Category

Parts