Allow modify sketch when extrude on end of pipe expr (#2960)
This commit is contained in:
@ -50,6 +50,7 @@ import {
|
|||||||
programMemoryInit,
|
programMemoryInit,
|
||||||
recast,
|
recast,
|
||||||
SketchGroup,
|
SketchGroup,
|
||||||
|
ExtrudeGroup,
|
||||||
VariableDeclaration,
|
VariableDeclaration,
|
||||||
VariableDeclarator,
|
VariableDeclarator,
|
||||||
} from 'lang/wasm'
|
} from 'lang/wasm'
|
||||||
@ -1079,9 +1080,16 @@ export class SceneEntities {
|
|||||||
programMemoryOverride,
|
programMemoryOverride,
|
||||||
})
|
})
|
||||||
this.sceneProgramMemory = programMemory
|
this.sceneProgramMemory = programMemory
|
||||||
const sketchGroup = programMemory.root[
|
|
||||||
variableDeclarationName
|
const maybeSketchGroup = programMemory.root[variableDeclarationName]
|
||||||
] as SketchGroup
|
let sketchGroup = undefined
|
||||||
|
if (maybeSketchGroup.type === 'SketchGroup') {
|
||||||
|
sketchGroup = maybeSketchGroup
|
||||||
|
} else if ((maybeSketchGroup as ExtrudeGroup).sketchGroup) {
|
||||||
|
sketchGroup = (maybeSketchGroup as ExtrudeGroup).sketchGroup
|
||||||
|
}
|
||||||
|
if (!sketchGroup) return
|
||||||
|
|
||||||
const sgPaths = sketchGroup.value
|
const sgPaths = sketchGroup.value
|
||||||
const orthoFactor = orthoScale(sceneInfra.camControls.camera)
|
const orthoFactor = orthoScale(sceneInfra.camControls.camera)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user