mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 00:09:41 +00:00
Correction for _path_cut_points() rename.
This commit is contained in:
parent
f993e4339e
commit
0260d92187
4 changed files with 8 additions and 8 deletions
|
@ -946,7 +946,7 @@ module path_spread(path, n, spacing, sp=undef, rotate_children=true, closed=fals
|
|||
);
|
||||
distOK = is_def(n) || (min(distances)>=0 && max(distances)<=length);
|
||||
assert(distOK,"Cannot fit all of the copies");
|
||||
cutlist = path_cut_points(path, distances, closed, direction=true);
|
||||
cutlist = _path_cut_points(path, distances, closed, direction=true);
|
||||
planar = len(path[0])==2;
|
||||
if (true) for(i=[0:1:len(cutlist)-1]) {
|
||||
$pos = cutlist[i][0];
|
||||
|
|
|
@ -757,8 +757,8 @@ function _assemble_path_fragments(fragments, eps=EPSILON, _finished=[]) =
|
|||
/// Cuts a path at a list of distances from the first point in the path. Returns a list of the cut
|
||||
/// points and indices of the next point in the path after that point. So for example, a return
|
||||
/// value entry of [[2,3], 5] means that the cut point was [2,3] and the next point on the path after
|
||||
/// this point is path[5]. If the path is too short then path_cut_points returns undef. If you set
|
||||
/// `direction` to true then `path_cut_points` will also return the tangent vector to the path and a normal
|
||||
/// this point is path[5]. If the path is too short then _path_cut_points returns undef. If you set
|
||||
/// `direction` to true then `_path_cut_points` will also return the tangent vector to the path and a normal
|
||||
/// vector to the path. It tries to find a normal vector that is coplanar to the path near the cut
|
||||
/// point. If this fails it will return a normal vector parallel to the xy plane. The output with
|
||||
/// direction vectors will be `[point, next_index, tangent, normal]`.
|
||||
|
|
|
@ -649,8 +649,8 @@ function _path_join(paths,joint,k=0.5,i=0,result=[],relocate=true,closed=false)
|
|||
assert(d_first<path_length(revresult),str("Path ",i," is too short for specified cut distance ",d_first))
|
||||
assert(d_next<path_length(nextpath), str("Path ",i+1," is too short for specified cut distance ",d_next))
|
||||
let(
|
||||
firstcut = path_cut_points(revresult, d_first, direction=true),
|
||||
nextcut = path_cut_points(nextpath, d_next, direction=true)
|
||||
firstcut = _path_cut_points(revresult, d_first, direction=true),
|
||||
nextcut = _path_cut_points(nextpath, d_next, direction=true)
|
||||
)
|
||||
assert(!loop || nextcut[1] < len(revresult)-1-firstcut[1], "Path is too short to close the loop")
|
||||
let(
|
||||
|
@ -1611,8 +1611,8 @@ function _stroke_end(width,left, right, spec) =
|
|||
90-vector_angle([newright[1],newright[0],newleft[0]])/2,
|
||||
jointleft = 8*cutleft/cos(leftangle)/(1+4*bez_k),
|
||||
jointright = 8*cutright/cos(rightangle)/(1+4*bez_k),
|
||||
pathcutleft = path_cut_points(newleft,abs(jointleft)),
|
||||
pathcutright = path_cut_points(newright,abs(jointright)),
|
||||
pathcutleft = _path_cut_points(newleft,abs(jointleft)),
|
||||
pathcutright = _path_cut_points(newright,abs(jointright)),
|
||||
leftdelete = intright? pathcutleft[1] : pathcutleft[1] + pathclip[1] -1,
|
||||
rightdelete = intright? pathcutright[1] + pathclip[1] -1 : pathcutright[1],
|
||||
leftcorner = line_intersection([pathcutleft[0], newleft[pathcutleft[1]]], [newright[0],newleft[0]]),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//////////////////////////////////////////////////////////////////////
|
||||
// LibFile: shapes.scad
|
||||
// LibFile: shapes3d.scad
|
||||
// Common useful shapes and structured objects.
|
||||
// Includes:
|
||||
// include <BOSL2/std.scad>
|
||||
|
|
Loading…
Reference in a new issue