33 include <../shapes/shapes2d.scad>;
128 mpc = f*[(c1x+c3x)/2, c3y/2];
130 polygon([[0,0], [c1x,0], mpc, [c3x,c3y]]);
141 polygon([[0,0], [c1x,0], [c3x,c3y]]);
154 mpc =
unit_l([(c1x+c3x)/2, c3y/2]);
159 polygon([[0,0], [c1x,0], [c3x,c3y]]);
161 translate(f*mpc - mpc)
167 polygon([[0,0], [c1x,0], [c3x,c3y]]);
169 translate(f*mpc - mpc)
222 wx = (p == 0) ? max(r, r*f)
223 : (p == 1) ? r/tan(sa/2)
227 : (p == 1) ? r/tan(sa/2)
233 translate(center==
true ?
origin3d : [0, 0, l/2])
236 translate([0,0,-l/2])
237 linear_extrude(height=l)
249 [ 0, -wy, -(l/2+
aeps)],
250 [ 0, +wy, -(l/2+
aeps)],
251 [wx, +wy, -(l/2+
aeps)],
252 [wx, -wy, -(l/2+
aeps)],
253 [wx, -wy, -(l/2-
aeps-wz)],
254 [wx, +wy, -(l/2-
aeps-wz)]
256 faces = [[1,5,4,0], [0,4,3], [1,2,5], [5,2,3,4], [2,1,0,3]]
module ellipse_s(size, a1=0, a2=0)
An ellipse sector.
function unit_l(l)
Compute the normalized unit vector of a Euclidean line (or vector).
origin3d
The origin point coordinate in 3-dimensional Euclidean space.
function bitwise_is_equal(v, b, t=1)
Test if a base-two bit position of an integer value equals a test bit.
aeps
Epsilon, small distance to deal with overlapping shapes.