mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-01-16 13:50:23 +01:00
Fixed docs errors and regressions issue.
This commit is contained in:
parent
698268c8c7
commit
a8a34e77e0
@ -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) )
|
||||
|
@ -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]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user