1
0
Fork 0

feat(plugin-annotations): Add setCut method

This commit is contained in:
joostdecock 2023-09-16 10:33:20 +02:00
parent dad2097214
commit 4198c35ea8

View file

@ -1,5 +1,6 @@
export const cutlistStores = [
['cutlist.addCut', addCut],
['cutlist.setCut', setCut],
['cutlist.removeCut', removeCut],
['cutlist.setGrain', setGrain],
['cutlist.setCutOnFold', setCutOnFold],
@ -62,6 +63,12 @@ function removeCut(store, from = false) {
return addCut(store, { cut: false, from })
}
/** Method to set (remove + add) the cut info */
function setCut(store, so) {
removeCut(store)
return addCut(store, so)
}
/** Method to add the grain info (called by grainline and cutonfold macros) */
function setGrain(store, grain = false) {
const partName = store.get('activePart')