mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-30 08:19:36 +00:00
Fixed docs errors and regressions issue.
This commit is contained in:
parent
698268c8c7
commit
a8a34e77e0
2 changed files with 4 additions and 4 deletions
|
@ -961,7 +961,7 @@ function plane_from_polygon(poly, fast=false, eps=EPSILON) =
|
||||||
// plane_normal(plane);
|
// plane_normal(plane);
|
||||||
// Description:
|
// Description:
|
||||||
// Returns the unit length normal vector for the given plane.
|
// 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.
|
// plane = The `[A,B,C,D]` plane definition where `Ax+By+Cz=D` is the formula of the plane.
|
||||||
function plane_normal(plane) =
|
function plane_normal(plane) =
|
||||||
assert( _valid_plane(plane), "Invalid input 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.
|
// 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.
|
// This value may be negative.
|
||||||
// The absolute value of this coefficient is the distance of the plane from the origin.
|
// 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.
|
// plane = The `[A,B,C,D]` plane definition where `Ax+By+Cz=D` is the formula of the plane.
|
||||||
function plane_offset(plane) =
|
function plane_offset(plane) =
|
||||||
assert( _valid_plane(plane), "Invalid input plane." )
|
assert( _valid_plane(plane), "Invalid input plane." )
|
||||||
|
@ -1048,7 +1048,7 @@ function projection_on_plane(plane, points) =
|
||||||
// pt = plane_point_nearest_origin(plane);
|
// pt = plane_point_nearest_origin(plane);
|
||||||
// Description:
|
// Description:
|
||||||
// Returns the point on the plane that is closest to the origin.
|
// 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.
|
// 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) =
|
function plane_point_nearest_origin(plane) =
|
||||||
let( plane = normalize_plane(plane) )
|
let( plane = normalize_plane(plane) )
|
||||||
|
|
|
@ -908,7 +908,7 @@ module test_noncollinear_triple() {
|
||||||
module test_centroid() {
|
module test_centroid() {
|
||||||
$fn = 24;
|
$fn = 24;
|
||||||
assert_approx(centroid(circle(d=100)), [0,0]);
|
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]);
|
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))));
|
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]);
|
assert_approx(centroid(poly), [1,2.5,3.1]);
|
||||||
|
|
Loading…
Reference in a new issue