mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-28 12:09:47 +02:00
Fix offset() bug where it produced 3 points too many in roundings
This commit is contained in:
@@ -1097,7 +1097,7 @@ function offset(
|
||||
goodsegs[i][0]-goodpath[i]))
|
||||
assert(!outsidecorner[i] || vang!=0, // If outsidecorner[i] is true then vang>0 needed to give valid step count
|
||||
"\nOffset computation failed, probably because validity check mistakenly removed a valid segment. Increasing quality might fix this.")
|
||||
1+floor(segs(r)*vang/360)
|
||||
1+segs(r,vang)
|
||||
],
|
||||
// newcorners is a list where each entry is a list of the points that correspond to a single point in the sharpcorners
|
||||
// list: newcorners[i] is the point list that replaces goodpath[i]. Without rounding or chamfering (or reversals),
|
||||
@@ -1134,7 +1134,7 @@ function offset(
|
||||
)
|
||||
arc(cp=goodpath[i], cw=cw, ccw=ccw,
|
||||
points=basepts,
|
||||
n=steps[i]+3)
|
||||
n=steps[i])
|
||||
],
|
||||
pointcount = [for(entry=newcorners) len(entry)],
|
||||
edges = flatten(newcorners),
|
||||
|
Reference in New Issue
Block a user