fix(plugin-annotations): Set bias/cutonfold explicity in cutlist
The cutlist methods were being clever by deducing whether a part should be cut on the fold from info set by the cutonfold macro. This is a footgun, because this only works when the cutlist is set after the cutonfold macro is run. We can't expect designers to know they should add this annotation before that annotation so now you need to add it explicitly. The current keys to pass are: - cut - from (used to be material) - onBias (used to be bias) - onFold (replaced ignoreOnFold)
This commit is contained in:
parent
64d580ad51
commit
6d5c21e4e1
2 changed files with 14 additions and 20 deletions
|
@ -43,8 +43,8 @@ describe('Cutlist Plugin Tests', () => {
|
|||
expect(pattern.setStores[0].cutlist.example_part.materials.fabric[0]).to.deep.equal({
|
||||
cut: 2,
|
||||
identical: false,
|
||||
bias: false,
|
||||
ignoreOnFold: false,
|
||||
onBias: false,
|
||||
onFold: false,
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -52,7 +52,7 @@ describe('Cutlist Plugin Tests', () => {
|
|||
const part = {
|
||||
name: 'example_part',
|
||||
draft: ({ store, part }) => {
|
||||
store.cutlist.addCut({ cut: 3, material: 'lining', identical: true })
|
||||
store.cutlist.addCut({ cut: 3, from: 'lining', identical: true })
|
||||
|
||||
return part
|
||||
},
|
||||
|
@ -65,8 +65,8 @@ describe('Cutlist Plugin Tests', () => {
|
|||
expect(pattern.setStores[0].cutlist.example_part.materials.lining[0]).to.deep.equal({
|
||||
cut: 3,
|
||||
identical: true,
|
||||
bias: false,
|
||||
ignoreOnFold: false,
|
||||
onBias: false,
|
||||
onFold: false,
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue