Merge branch 'main' into wip-multi-profile
This commit is contained in:
@ -1489,6 +1489,7 @@ export class SceneEntities {
|
|||||||
kclManager.ast,
|
kclManager.ast,
|
||||||
artifact.range
|
artifact.range
|
||||||
)
|
)
|
||||||
|
|
||||||
const extrudePathToNode = extrusions?.range
|
const extrudePathToNode = extrusions?.range
|
||||||
? getNodePathFromSourceRange(kclManager.ast, extrusions.range)
|
? getNodePathFromSourceRange(kclManager.ast, extrusions.range)
|
||||||
: []
|
: []
|
||||||
|
|||||||
@ -508,6 +508,7 @@ export const ModelingMachineProvider = ({
|
|||||||
'animate-to-face': async (_, { data }) => {
|
'animate-to-face': async (_, { data }) => {
|
||||||
console.log('animate-to-face', data)
|
console.log('animate-to-face', data)
|
||||||
if (data.type === 'extrudeFace') {
|
if (data.type === 'extrudeFace') {
|
||||||
|
console.log('data', data)
|
||||||
const { modifiedAst, pathToNode: pathToNewSketchNode } =
|
const { modifiedAst, pathToNode: pathToNewSketchNode } =
|
||||||
sketchOnExtrudedFace(
|
sketchOnExtrudedFace(
|
||||||
kclManager.ast,
|
kclManager.ast,
|
||||||
|
|||||||
@ -1466,6 +1466,9 @@ export class EngineCommandManager extends EventTarget {
|
|||||||
|
|
||||||
if (command && command.type === 'pending') {
|
if (command && command.type === 'pending') {
|
||||||
const resolve = command.resolve
|
const resolve = command.resolve
|
||||||
|
const oldArtifact = this.artifactMap[id] as ArtifactMapCommand & {
|
||||||
|
extrusions?: string[]
|
||||||
|
}
|
||||||
const artifact = {
|
const artifact = {
|
||||||
type: 'result',
|
type: 'result',
|
||||||
range: command.range,
|
range: command.range,
|
||||||
@ -1474,7 +1477,10 @@ export class EngineCommandManager extends EventTarget {
|
|||||||
parentId: command.parentId ? command.parentId : undefined,
|
parentId: command.parentId ? command.parentId : undefined,
|
||||||
data: modelingResponse,
|
data: modelingResponse,
|
||||||
raw,
|
raw,
|
||||||
} as const
|
} as ArtifactMapCommand & { extrusions?: string[] }
|
||||||
|
if (oldArtifact?.extrusions) {
|
||||||
|
artifact.extrusions = oldArtifact.extrusions
|
||||||
|
}
|
||||||
this.artifactMap[id] = artifact
|
this.artifactMap[id] = artifact
|
||||||
if (
|
if (
|
||||||
(command.commandType === 'entity_linear_pattern' &&
|
(command.commandType === 'entity_linear_pattern' &&
|
||||||
@ -1903,6 +1909,8 @@ export class EngineCommandManager extends EventTarget {
|
|||||||
} else {
|
} else {
|
||||||
typedTarget.extrusions = [id]
|
typedTarget.extrusions = [id]
|
||||||
}
|
}
|
||||||
|
// Update in the map.
|
||||||
|
this.artifactMap[command.target] = typedTarget
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return promise
|
return promise
|
||||||
|
|||||||
Reference in New Issue
Block a user