From a8a34e77e0e189bd327d63a4facfc2699b7ebac0 Mon Sep 17 00:00:00 2001 From: Garth Minette Date: Tue, 6 Apr 2021 19:25:40 -0700 Subject: [PATCH] Fixed docs errors and regressions issue. --- geometry.scad | 6 +++--- tests/test_geometry.scad | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/geometry.scad b/geometry.scad index 489be44..73abe90 100644 --- a/geometry.scad +++ b/geometry.scad @@ -961,7 +961,7 @@ function plane_from_polygon(poly, fast=false, eps=EPSILON) = // plane_normal(plane); // Description: // Returns the unit length normal vector for the given plane. -// Argument: +// Arguments: // plane = The `[A,B,C,D]` plane definition where `Ax+By+Cz=D` is the formula of the plane. function plane_normal(plane) = assert( _valid_plane(plane), "Invalid input plane." ) @@ -975,7 +975,7 @@ function plane_normal(plane) = // Returns coeficient D of the normalized plane equation `Ax+By+Cz=D`, or the scalar offset of the plane from the origin. // This value may be negative. // The absolute value of this coefficient is the distance of the plane from the origin. -// Argument: +// Arguments: // plane = The `[A,B,C,D]` plane definition where `Ax+By+Cz=D` is the formula of the plane. function plane_offset(plane) = assert( _valid_plane(plane), "Invalid input plane." ) @@ -1048,7 +1048,7 @@ function projection_on_plane(plane, points) = // pt = plane_point_nearest_origin(plane); // Description: // Returns the point on the plane that is closest to the origin. -// Argument: +// Arguments: // plane = The `[A,B,C,D]` plane definition where `Ax+By+Cz=D` is the formula of the plane. function plane_point_nearest_origin(plane) = let( plane = normalize_plane(plane) ) diff --git a/tests/test_geometry.scad b/tests/test_geometry.scad index 3f78e7d..0e70f31 100644 --- a/tests/test_geometry.scad +++ b/tests/test_geometry.scad @@ -908,7 +908,7 @@ module test_noncollinear_triple() { module test_centroid() { $fn = 24; assert_approx(centroid(circle(d=100)), [0,0]); - assert_approx(centroid(rect([40,60],rounding=10,anchor=LEFT)), [-20,0]); + assert_approx(centroid(rect([40,60],rounding=10,anchor=LEFT)), [20,0]); assert_approx(centroid(rect([40,60],rounding=10,anchor=FWD)), [0,30]); poly = move([1,2.5,3.1],p=rot([12,49,24], p=path3d(circle(10,$fn=33)))); assert_approx(centroid(poly), [1,2.5,3.1]);