mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
Fixed bad error check in vp_search, example errors in debug.scad
This commit is contained in:
parent
465cc40c0a
commit
b88d05c4db
2 changed files with 2 additions and 2 deletions
|
@ -260,7 +260,7 @@ module debug_faces(vertices, faces, size=1, disabled=false) {
|
|||
// Example(EdgesMed):
|
||||
// verts = [for (z=[-10,10], a=[0:120:359.9]) [10*cos(a),10*sin(a),z]];
|
||||
// faces = [[0,1,2], [5,4,3], [0,3,4], [0,4,1], [1,4,5], [1,5,2], [2,5,3], [2,3,0]];
|
||||
// debug_polyhedron([verts,faces], txtsize=1);
|
||||
// debug_vnf([verts,faces], txtsize=2);
|
||||
module debug_vnf(vnf, convexity=6, txtsize=1, disabled=false) {
|
||||
debug_faces(vertices=vnf[0], faces=vnf[1], size=txtsize, disabled=disabled) {
|
||||
vnf_polyhedron(vnf, convexity=convexity);
|
||||
|
|
|
@ -304,7 +304,7 @@ function _vp_search(points, tree, p, r) =
|
|||
];
|
||||
|
||||
function vp_search(points, tree, p, r) =
|
||||
assert(is_list(tree[1]) && (len(tree[1])==4 || (len(tree[1])==1 && is_list(tree[0]))), "Vantage point tree not valid")
|
||||
assert(is_list(tree) && (len(tree)==4 || (len(tree)==1 && is_list(tree[0]))), "Vantage point tree not valid")
|
||||
assert(is_matrix(points), "Parameter points is not a consistent point list")
|
||||
assert(is_vector(p,len(points[0])), "Query must be a vector whose length matches the point list")
|
||||
assert(all_positive(r),"Radius r must be a positive number")
|
||||
|
|
Loading…
Reference in a new issue