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