1
0
mirror of https://github.com/Irev-Dev/Round-Anything.git synced 2025-09-03 04:12:38 +02:00

Add individual examples

Having one example per file will make for a integration and there
live demo links with CadHub.
Resolves #29.
This commit is contained in:
Kurt Hutten
2021-06-07 07:13:04 +10:00
parent 8ead00a2bf
commit 28814a34a0
12 changed files with 237 additions and 0 deletions

29
examples/beamChain-1.scad Normal file
View File

@@ -0,0 +1,29 @@
// beamChain example 1
include <Round-Anything-1.0.4/polyround.scad>
function beamPoints(r1,r2,rStart=0,rEnd=0)=[[0,0,rStart],[2,8,0],[5,4,r1],[15,10,r2],[17,2,rEnd]];
linear_extrude(1){
// chained lines by themselves
translate(){
radiiPoints=beamPoints(0,0);
polygon(polyRound(beamChain(radiiPoints,offset1=0.02, offset2=-0.02),20));
}
// Add some radii to the line transitions
translate([0,-7,0]){
radiiPoints=beamPoints(2,1);
for(i=[0: len(beamPoints(2,1))]){color("red")translate([radiiPoints[i].x,radiiPoints[i].y,0])cylinder(d=0.2, h=1);}
polygon(polyRound(beamChain(radiiPoints,offset1=0.02, offset2=-0.02),20));
}
// Give make the lines beams with some thickness
translate([0,-7*2,0]){
radiiPoints=beamPoints(2,1);
polygon(polyRound(beamChain(radiiPoints,offset1=0.5, offset2=-0.5),20));
}
}