add start of extrude

This commit is contained in:
Kurt Hutten IrevDev
2022-12-30 14:09:07 +11:00
parent 8818d9cec1
commit f6c4250947
5 changed files with 327 additions and 58 deletions

View File

@ -77,8 +77,7 @@ show(mySketch)
sourceRange: [93, 100],
},
])
expect(root.mySketch.sketch[0]).toEqual(root.mySketch.sketch[4].firstPath)
// hmm not sure what handle the "show" function
// expect(root.mySketch.sketch[0]).toEqual(root.mySketch.sketch[4].firstPath)
expect(_return).toEqual([
{
type: 'Identifier',
@ -195,11 +194,14 @@ function exe(
}
function removeGeoFromSketch(sketch: Transform | SketchGeo): any {
if (sketch.type !== 'sketchGeo') {
return removeGeoFromSketch(sketch.sketch)
if (sketch.type !== 'sketchGeo' && sketch.type === 'transform') {
return removeGeoFromSketch(sketch.sketch as any) // TODO fix type
}
return {
...sketch,
sketch: sketch.sketch.map(({ geo, previousPath, ...rest }: any) => rest),
if (sketch.type === 'sketchGeo') {
return {
...sketch,
sketch: sketch.sketch.map(({ geo, previousPath, ...rest }: any) => rest),
}
}
throw new Error('not a sketch')
}