fix bug in round_prism for vertical caps

This commit is contained in:
Adrian Mariano 2023-10-03 18:57:39 -04:00
parent 5dc1aaaa88
commit 1e5a2e345d

View file

@ -1959,10 +1959,14 @@ function _rp_compute_patches(top, bot, rtop, rsides, ktop, ksides, concave) =
let( let(
prev_corner = prev_offset + abs(rtop_in)*in_prev, prev_corner = prev_offset + abs(rtop_in)*in_prev,
next_corner = next_offset + abs(rtop_in)*in_next, next_corner = next_offset + abs(rtop_in)*in_next,
prev_degenerate = is_undef(line_intersection(path2d([far_corner, far_corner+prev]), line = project_plane(plane, [
path2d([prev_offset, prev_offset+in_prev]),RAY,RAY)), [far_corner, far_corner+prev],
next_degenerate = is_undef(line_intersection(path2d([far_corner, far_corner+next]), [prev_offset, prev_offset+in_prev],
path2d([next_offset, next_offset+in_next]),RAY,RAY)) [far_corner, far_corner+next],
[next_offset, next_offset+in_next]
]),
prev_degenerate = is_undef(line_intersection(line[0],line[1],RAY,RAY)),
next_degenerate = is_undef(line_intersection(line[2],line[3],RAY,RAY))
) )
[ prev_degenerate ? far_corner : prev_corner, [ prev_degenerate ? far_corner : prev_corner,
far_corner, far_corner,