Skip to content

Commit

Permalink
Fix for ERROR: Parser error: syntax error in file box.scad, line 35
Browse files Browse the repository at this point in the history
  • Loading branch information
mohnen committed Apr 17, 2024
1 parent 7ab5ee5 commit c020165
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions box.scad
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ function v_replace_nonzero(a,b) =
function round_path(path, r, or, ir, closed=true) =
let(
or = get_radius(r1=or, r=r, dflt=0),
ir = get_radius(r1=ir, r=r, dflt=0),
ir = get_radius(r1=ir, r=r, dflt=0)
) or==0 && ir==0 ? path : offset(offset(offset(path,delta=ir,chamfer=true,closed=closed),-or-ir,closed=closed),or,closed=closed);

function chamfer_path(path, r, or, ir, closed=true) =
let(
or = get_radius(r1=or, r=r, dflt=0),
ir = get_radius(r1=ir, r=r, dflt=0),
ir = get_radius(r1=ir, r=r, dflt=0)
) or==0 && ir==0 ? path : offset(offset(offset(path,delta=ir,chamfer=true,closed=closed),delta=-or-ir,chamfer=true,closed=closed),delta=or,chamfer=true,closed=closed);

function lerp_index(v,x) = let(i=floor(x), a = v[i], b = v[min(i+1,len(v)-1)], f = x-i) lerp(a,b,f);
Expand All @@ -48,7 +48,7 @@ function lerp_index(v,x) = let(i=floor(x), a = v[i], b = v[min(i+1,len(v)-1)], f
function rpath(points) =
let(
path = [for(p = points) slice(p,0,-2)],
r = [for(p = points) last(p)],
r = [for(p = points) last(p)]
) [
for(i = idx(path)) each
let(
Expand Down
4 changes: 2 additions & 2 deletions parts.scad
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module open_round_box(
rim_snap_depth=0.4,
rim_snap_height=0.2,
inside_color,
outside_color,
outside_color
) {
rim_wall = rim_wall != 0 ? rim_wall : wall_side/2;

Expand Down Expand Up @@ -353,7 +353,7 @@ module box_shell_base_lid(
rim_wall=wall_sides/2-get_slop(),
rbot=rtop,
rbot_inside=rtop_inside,
rim_snap_ofs=rim_height-rim_snap_ofs-rim_snap_height,
rim_snap_ofs=rim_height-rim_snap_ofs-rim_snap_height
//
);
}
Expand Down

0 comments on commit c020165

Please sign in to comment.