start of code gen from direct manipulation

This commit is contained in:
Kurt Hutten IrevDev
2022-11-28 09:37:46 +11:00
parent 1831aad321
commit ade1e9fb82
11 changed files with 411 additions and 48 deletions

View File

@ -63,7 +63,9 @@ show(mySketch)
`
const { root, return: _return } = exe(code)
expect(
root.mySketch.map(({ previousPath, geo, ...rest }: any) => rest)
root.mySketch.map(
({ previousPath, firstPath, geo, ...rest }: any) => rest
)
).toEqual([
{ type: 'base', from: [0, 0], sourceRange: [0, 0] },
{ type: 'toPoint', to: [0, 1], sourceRange: [25, 45], name: 'myPath' },
@ -71,7 +73,6 @@ show(mySketch)
{ type: 'toPoint', to: [1, 0], sourceRange: [67, 90], name: 'rightPath' },
{
type: 'close',
firstPath: { type: 'base', from: [0, 0], sourceRange: [0, 0] },
sourceRange: [93, 100],
},
])