Fixed docs errors and regressions issue.

This commit is contained in:
Garth Minette 2021-04-06 19:25:40 -07:00
parent 698268c8c7
commit a8a34e77e0
2 changed files with 4 additions and 4 deletions

View File

@ -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) )

View File

@ -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]);