1
0
mirror of https://github.com/Irev-Dev/Round-Anything.git synced 2025-01-16 18:48:14 +01:00
round-anything/examples/translateRadiiPoints.scad
Kurt Hutten 28814a34a0 Add individual examples
Having one example per file will make for a integration and there
live demo links with CadHub.
Resolves #29.
2021-06-07 07:15:06 +10:00

31 lines
884 B
OpenSCAD

// translateRadiiPoints example
include <Round-Anything-1.0.4/polyround.scad>
nutW=5.5; nutH=3; boltR=1.6;
minT=2; minR=0.8;
function nutCapture(startAndEndRadius=0)=[
[-boltR, 0, startAndEndRadius],
[-boltR, minT, 0],
[-nutW/2, minT, minR],
[-nutW/2, minT+nutH, minR],
[nutW/2, minT+nutH, minR],
[nutW/2, minT, minR],
[boltR, minT, 0],
[boltR, 0, startAndEndRadius],
];
linear_extrude(3)translate([-5,0,0])polygon(polyRound(nutCapture(),20));
negativeNutCapture=translateRadiiPoints(nutCapture(),tran=[5,0]);
rotatedNegativeNutCapture=translateRadiiPoints(nutCapture(1),tran=[20,5],rot=90);
aSquare=concat(
[[0,0,0]],
negativeNutCapture,
[[20,0,0]],
rotatedNegativeNutCapture,
[[20,10,0]],
[[0,10,0]]
);
linear_extrude(3)polygon(polyRound(aSquare,20));