| 12345678910111213141516171819202122232425262728293031323334353637 |
- // Two 10x10 mm panels meeting at one edge, 45-degree dihedral angle,
- // with a rounded fillet on the outer face of the junction.
- t = 2; // panel thickness
- s = 10; // panel size (10x10 mm face)
- r = 2; // fillet radius
- $fn = 64;
- // Cross-section is built in the YZ plane, extruded in X.
- //
- // Panel 1 outer face: y=0
- // Panel 2 outer face: z = y+10 (i.e. the plane after 45-deg pivot)
- //
- // Fillet circle tangent to both faces at distance r:
- // centre_y = r
- // centre_z = 10 + r*(1 - sqrt(2))
- //
- // Tangent point on Panel 1 face (y=0) is at angle 180° from centre.
- // Tangent point on Panel 2 face is at angle 135° from centre.
- // Arc sweeps 180° → 135°.
- fc = [r, 10 + r*(1 - sqrt(2))];
- rotate([90, 0, 90])
- linear_extrude(s)
- polygon(concat(
- // Panel 1 outer face: bottom to fillet start
- [[0, 0]],
- // Fillet arc (180° → 135°)
- [for (a = [180:-1:135]) [fc[0]+r*cos(a), fc[1]+r*sin(a)]],
- // Panel 2 outer face: fillet end to far tip
- [[s*sin(45), 10+s*cos(45)]],
- // Across Panel 2 far end, down Panel 2 inner face, down Panel 1 inner face
- [[s*sin(45)+t*cos(45), 10+s*cos(45)-t*sin(45)],
- [t, fc[1]],
- [t, 0]]
- ));
|