ArtifactMap should be processed at the end of an execution (PART 2) (#3121)

* seperate out artifactmap functions into seperate file, change types quiet a bit with e2e still passing

* more type changes

* another increment

* cull artifact map

* remove excessive parentIds

* rename props

* final clean up

* unused vars
This commit is contained in:
Kurt Hutten
2024-07-25 19:03:56 +10:00
committed by GitHub
parent c184a7d4d8
commit 95781143eb
12 changed files with 363 additions and 290 deletions

View File

@ -1142,7 +1142,7 @@ export const modelingMachine = createMachine(
const sketchGroup = kclManager.programMemory.get(sketchVar)
if (sketchGroup?.type !== 'SketchGroup') return
const idArtifact = engineCommandManager.artifactMap[sketchGroup.id]
if (idArtifact.commandType !== 'start_path') return
if (idArtifact.type !== 'startPath') return
const extrusionArtifactId = (idArtifact as any)?.extrusions?.[0]
if (typeof extrusionArtifactId !== 'string') return
const extrusionArtifact = (engineCommandManager.artifactMap as any)[