diff --git a/src/__comm__/_convex_hull3.scad b/src/__comm__/_convex_hull3.scad index 219a1240..96752237 100644 --- a/src/__comm__/_convex_hull3.scad +++ b/src/__comm__/_convex_hull3.scad @@ -87,14 +87,14 @@ function _convex_hull3(pts) = leng = len(sorted), v0 = 0, v1 = _fst_v1(sorted, leng, v0 + 1), - _ = assert(v1 < leng, "common points"), - v2 = _fst_v2(sorted, leng, v1, v1 + 1), - __ = assert(v2 < leng, "collinear points"), - n = cross(sorted[v1] - sorted[v0], sorted[v2] - sorted[v0]), + v2 = assert(v1 < leng, "common points") + _fst_v2(sorted, leng, v1, v1 + 1), + n = assert(v2 < leng, "collinear points") + cross(sorted[v1] - sorted[v0], sorted[v2] - sorted[v0]), v3_d = _fst_v3(sorted, leng, n, 0, v2 + 1), v3 = v3_d[0], - ___ = assert(v3 < leng, "coplanar points"), - d = v3_d[1], + d = assert(v3 < leng, "coplanar points") + v3_d[1], fst_tetrahedron = d > 0 ? [ [v1, v0, v2], [v0, v1, v3], diff --git a/src/_impl/_bijection_offset_impl.scad b/src/_impl/_bijection_offset_impl.scad index 608012fb..78112f66 100644 --- a/src/_impl/_bijection_offset_impl.scad +++ b/src/_impl/_bijection_offset_impl.scad @@ -43,10 +43,10 @@ function _bijection_offset_impl(pts, d, epsilon) = let( this_edge = offset_es[i], next_edge = offset_es[i + 1], - p = __line_intersection2(this_edge, next_edge, epsilon), - // p == p to avoid [nan, nan], because [nan, nan] != [nan, nan], - _ = assert(p != [] && p == p, "bijection_offset failed. Parallel or conincident edges found") + p = __line_intersection2(this_edge, next_edge, epsilon) ) + // p == p to avoid [nan, nan], because [nan, nan] != [nan, nan] + assert(p != [] && p == p, "bijection_offset failed. Parallel or conincident edges found") p ] ]; diff --git a/src/experimental/tri_is_ccw.scad b/src/experimental/tri_is_ccw.scad index cb2e00e3..d9e17564 100644 --- a/src/experimental/tri_is_ccw.scad +++ b/src/experimental/tri_is_ccw.scad @@ -3,7 +3,7 @@ function tri_is_ccw(shape_pts) = p1 = shape_pts[0], p2 = shape_pts[1], p3 = shape_pts[2], - area = (p2[0] - p1[0]) * (p3[1] - p1[1]) - (p3[0] - p1[0]) * (p2[1] - p1[1]), - _ = assert(area != 0, "points are collinear") + area = (p2[0] - p1[0]) * (p3[1] - p1[1]) - (p3[0] - p1[0]) * (p2[1] - p1[1]) ) + assert(area != 0, "points are collinear") area > 0; \ No newline at end of file