add dogbones as an outline option
This commit is contained in:
parent
42d43371c5
commit
83de534a52
5 changed files with 51 additions and 6 deletions
|
|
@ -173,11 +173,14 @@
|
|||
for (let i=1; i<oldpts.length + 1; i++) {
|
||||
let nextpt = oldpts[i % oldpts.length];
|
||||
let nextsl = lastpt.slopeTo(nextpt).toUnit();
|
||||
if (lastsl.angleDiff(nextsl) >= 10 && lastpt.distTo2D(nextpt) >= knifeTipOff) {
|
||||
arc(lastpt, lastsl, nextsl, newpts);
|
||||
// let tmp;
|
||||
// newpts.push( tmp = lastpt.projectOnSlope(lastsl, knifeTipOff) );
|
||||
// newpts.push( lastpt.projectOnSlope(nextsl, knifeTipOff) );
|
||||
if (lastsl.angleDiff(nextsl) >= 10) {
|
||||
if (lastpt.distTo2D(nextpt) >= knifeTipOff) {
|
||||
arc(lastpt, lastsl, nextsl, newpts);
|
||||
} else {
|
||||
// todo handle short segments
|
||||
// newpts.push(lastpt.projectOnSlope(lastsl, knifeTipOff) );
|
||||
// newpts.push( lastpt.projectOnSlope(nextsl, knifeTipOff) );
|
||||
}
|
||||
}
|
||||
newpts.push(nextpt);
|
||||
lastsl = nextsl;
|
||||
|
|
|
|||
Loading…
Reference in a new issue