mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
doc fix
This commit is contained in:
parent
5153cb20da
commit
f72d89fae7
2 changed files with 5 additions and 5 deletions
|
@ -253,8 +253,8 @@ function line_intersection(line1, line2, bounded1, bounded2, bounded, eps=EPSILO
|
||||||
// pt = line_closest_point(line, pt, [bounded]);
|
// pt = line_closest_point(line, pt, [bounded]);
|
||||||
// Topics: Geometry, Lines, Distance
|
// Topics: Geometry, Lines, Distance
|
||||||
// Description:
|
// Description:
|
||||||
// Returns the point on the given 2D or 3D line, segment or ray that is closest to the given point `pt`.
|
// Returns the point on the given line, segment or ray that is closest to the given point `pt`.
|
||||||
// The inputs `line` and `pt` args should either both be 2D or both 3D. The parameter bounded indicates
|
// The inputs `line` and `pt` args should be of the same dimension. The parameter bounded indicates
|
||||||
// whether the points of `line` should be treated as endpoints.
|
// whether the points of `line` should be treated as endpoints.
|
||||||
// Arguments:
|
// Arguments:
|
||||||
// line = A list of two points that are on the unbounded line.
|
// line = A list of two points that are on the unbounded line.
|
||||||
|
|
|
@ -523,8 +523,8 @@ function is_path_simple(path, closed, eps=EPSILON) =
|
||||||
// Finds the closest path segment, and point on that segment to the given point.
|
// Finds the closest path segment, and point on that segment to the given point.
|
||||||
// Returns `[SEGNUM, POINT]`
|
// Returns `[SEGNUM, POINT]`
|
||||||
// Arguments:
|
// Arguments:
|
||||||
// path = The path to find the closest point on.
|
// path = path of any dimension or a 1-region
|
||||||
// pt = the point to find the closest point to.
|
// pt = the point to find the closest point to
|
||||||
// closed =
|
// closed =
|
||||||
// Example(2D):
|
// Example(2D):
|
||||||
// path = circle(d=100,$fn=6);
|
// path = circle(d=100,$fn=6);
|
||||||
|
@ -535,7 +535,7 @@ function is_path_simple(path, closed, eps=EPSILON) =
|
||||||
// color("red") translate(closest[1]) circle(d=3, $fn=12);
|
// color("red") translate(closest[1]) circle(d=3, $fn=12);
|
||||||
function path_closest_point(path, pt, closed=true) =
|
function path_closest_point(path, pt, closed=true) =
|
||||||
let(path = force_path(path))
|
let(path = force_path(path))
|
||||||
assert(is_path(path,[2,3]), "Must give 2D or 3D path.")
|
assert(is_path(path), "Input must be a path")
|
||||||
assert(is_vector(pt, len(path[0])), "Input pt must be a compatible vector")
|
assert(is_vector(pt, len(path[0])), "Input pt must be a compatible vector")
|
||||||
assert(is_bool(closed))
|
assert(is_bool(closed))
|
||||||
let(
|
let(
|
||||||
|
|
Loading…
Reference in a new issue