mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
Corrected docs about the equation of a plane used in plane functions.
This commit is contained in:
parent
b048570f7a
commit
47c9560d5f
2 changed files with 9 additions and 9 deletions
|
@ -548,7 +548,7 @@ function triangle_area(a,b,c) =
|
||||||
// plane3pt(p1, p2, p3);
|
// plane3pt(p1, p2, p3);
|
||||||
// Description:
|
// Description:
|
||||||
// Generates the cartesian equation of a plane from three non-collinear points on the plane.
|
// Generates the cartesian equation of a plane from three non-collinear points on the plane.
|
||||||
// Returns [A,B,C,D] where Ax+By+Cz+D=0 is the equation of a plane.
|
// Returns [A,B,C,D] where Ax+By+Cz=D is the equation of a plane.
|
||||||
// Arguments:
|
// Arguments:
|
||||||
// p1 = The first point on the plane.
|
// p1 = The first point on the plane.
|
||||||
// p2 = The second point on the plane.
|
// p2 = The second point on the plane.
|
||||||
|
@ -569,7 +569,7 @@ function plane3pt(p1, p2, p3) =
|
||||||
// Given a list of points, and the indices of three of those points,
|
// Given a list of points, and the indices of three of those points,
|
||||||
// generates the cartesian equation of a plane that those points all
|
// generates the cartesian equation of a plane that those points all
|
||||||
// lie on. Requires that the three indexed points be non-collinear.
|
// lie on. Requires that the three indexed points be non-collinear.
|
||||||
// Returns [A,B,C,D] where Ax+By+Cz+D=0 is the equation of a plane.
|
// Returns [A,B,C,D] where Ax+By+Cz=D is the equation of a plane.
|
||||||
// Arguments:
|
// Arguments:
|
||||||
// points = A list of points.
|
// points = A list of points.
|
||||||
// i1 = The index into `points` of the first point on the plane.
|
// i1 = The index into `points` of the first point on the plane.
|
||||||
|
@ -588,7 +588,7 @@ function plane3pt_indexed(points, i1, i2, i3) =
|
||||||
// plane_from_pointslist(points);
|
// plane_from_pointslist(points);
|
||||||
// Description:
|
// Description:
|
||||||
// Given a list of 3 or more coplanar points, returns the cartesian equation of a plane.
|
// Given a list of 3 or more coplanar points, returns the cartesian equation of a plane.
|
||||||
// Returns [A,B,C,D] where Ax+By+Cz+D=0 is the equation of the plane.
|
// Returns [A,B,C,D] where Ax+By+Cz=D is the equation of the plane.
|
||||||
function plane_from_pointslist(points) =
|
function plane_from_pointslist(points) =
|
||||||
let(
|
let(
|
||||||
points = deduplicate(points),
|
points = deduplicate(points),
|
||||||
|
@ -613,7 +613,7 @@ function plane_normal(plane) = [for (i=[0:2]) plane[i]];
|
||||||
// distance_from_plane(plane, point)
|
// distance_from_plane(plane, point)
|
||||||
// Description:
|
// Description:
|
||||||
// Given a plane as [A,B,C,D] where the cartesian equation for that plane
|
// Given a plane as [A,B,C,D] where the cartesian equation for that plane
|
||||||
// is Ax+By+Cz+D=0, determines how far from that plane the given point is.
|
// is Ax+By+Cz=D, determines how far from that plane the given point is.
|
||||||
// The returned distance will be positive if the point is in front of the
|
// The returned distance will be positive if the point is in front of the
|
||||||
// plane; on the same side of the plane as the normal of that plane points
|
// plane; on the same side of the plane as the normal of that plane points
|
||||||
// towards. If the point is behind the plane, then the distance returned
|
// towards. If the point is behind the plane, then the distance returned
|
||||||
|
@ -629,7 +629,7 @@ function distance_from_plane(plane, point) =
|
||||||
// Usage:
|
// Usage:
|
||||||
// pt = closest_point_on_plane(plane, point);
|
// pt = closest_point_on_plane(plane, point);
|
||||||
// Description:
|
// Description:
|
||||||
// Takes a point, and a plane [A,B,C,D] where the equation of that plane is `Ax+By+Cz+D=0`.
|
// Takes a point, and a plane [A,B,C,D] where the equation of that plane is `Ax+By+Cz=D`.
|
||||||
// Returns the coordinates of the closest point on that plane to the given `point`.
|
// Returns the coordinates of the closest point on that plane to the given `point`.
|
||||||
// Arguments:
|
// Arguments:
|
||||||
// plane = The [A,B,C,D] values for the equation of the plane.
|
// plane = The [A,B,C,D] values for the equation of the plane.
|
||||||
|
@ -676,7 +676,7 @@ function plane_line_angle(plane, line) =
|
||||||
// Usage:
|
// Usage:
|
||||||
// pt = plane_line_intersection(plane, line, [eps]);
|
// pt = plane_line_intersection(plane, line, [eps]);
|
||||||
// Description:
|
// Description:
|
||||||
// Takes a line, and a plane [A,B,C,D] where the equation of that plane is `Ax+By+Cz+D=0`.
|
// Takes a line, and a plane [A,B,C,D] where the equation of that plane is `Ax+By+Cz=D`.
|
||||||
// Returns the coordinates of the where the given `line` intersects the given `plane`.
|
// Returns the coordinates of the where the given `line` intersects the given `plane`.
|
||||||
// Returns `undef` if the line is parallel to the plane.
|
// Returns `undef` if the line is parallel to the plane.
|
||||||
// Arguments:
|
// Arguments:
|
||||||
|
@ -735,7 +735,7 @@ function polygon_line_intersection(poly, line, bounded=false, eps=EPSILON) =
|
||||||
// coplanar(plane, point);
|
// coplanar(plane, point);
|
||||||
// Description:
|
// Description:
|
||||||
// Given a plane as [A,B,C,D] where the cartesian equation for that plane
|
// Given a plane as [A,B,C,D] where the cartesian equation for that plane
|
||||||
// is Ax+By+Cz+D=0, determines if the given point is on that plane.
|
// is Ax+By+Cz=D, determines if the given point is on that plane.
|
||||||
// Returns true if the point is on that plane.
|
// Returns true if the point is on that plane.
|
||||||
// Arguments:
|
// Arguments:
|
||||||
// plane = The [A,B,C,D] values for the equation of the plane.
|
// plane = The [A,B,C,D] values for the equation of the plane.
|
||||||
|
@ -749,7 +749,7 @@ function coplanar(plane, point) =
|
||||||
// in_front_of_plane(plane, point);
|
// in_front_of_plane(plane, point);
|
||||||
// Description:
|
// Description:
|
||||||
// Given a plane as [A,B,C,D] where the cartesian equation for that plane
|
// Given a plane as [A,B,C,D] where the cartesian equation for that plane
|
||||||
// is Ax+By+Cz+D=0, determines if the given point is on the side of that
|
// is Ax+By+Cz=D, determines if the given point is on the side of that
|
||||||
// plane that the normal points towards. The normal of the plane is the
|
// plane that the normal points towards. The normal of the plane is the
|
||||||
// same as [A,B,C].
|
// same as [A,B,C].
|
||||||
// Arguments:
|
// Arguments:
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
BOSL_VERSION = [2,0,164];
|
BOSL_VERSION = [2,0,165];
|
||||||
|
|
||||||
|
|
||||||
// Section: BOSL Library Version Functions
|
// Section: BOSL Library Version Functions
|
||||||
|
|
Loading…
Reference in a new issue