Outlines feature complete

This commit is contained in:
Bán Dénes 2020-07-10 22:40:34 +02:00
parent 066e1a54ea
commit 827cfeea21
8 changed files with 181 additions and 83 deletions

View file

@ -1,3 +1,4 @@
const m = require('makerjs')
const Point = require('./point')
const assert = exports.assert = (exp, msg) => {
@ -57,9 +58,8 @@ exports.anchor = (raw, name, points={}, check_unexpected=true, default_point=new
a = points[raw.ref].clone()
}
if (raw.shift !== undefined) {
const xyval = wh(raw.shift || [0, 0], name + '.shift')
a.x += xyval[0]
a.y += xyval[1]
let xyval = wh(raw.shift || [0, 0], name + '.shift')
a.shift(xyval, true)
}
if (raw.rotate !== undefined) {
a.r += sane(raw.rotate || 0, name + '.rotate', 'number')