add edges to Artifact Graph (Fillet UI related) (#3675)

* add edges to artifact graph

* update graph snapshot sizes (too cluttered

* fix adjencent reverse issue

* add comments

* remove log

* Look at this (photo)Graph *in the voice of Nickelback*

* remove log

* remove silly debug

* make wasm-prep windows friendly

* don't swallow error

* more rust tweaks

* Increase test timeout

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
This commit is contained in:
Kurt Hutten
2024-08-30 19:46:48 +10:00
committed by GitHub
parent 1739f3dafe
commit 50259aa052
8 changed files with 267 additions and 35 deletions

View File

@ -33,6 +33,7 @@ import {
getArtifactOfTypes,
getArtifactsOfTypes,
getCapCodeRef,
getExtrudeEdgeCodeRef,
getSolid2dCodeRef,
getWallCodeRef,
} from 'lang/std/artifactGraph'
@ -141,6 +142,20 @@ export async function getEventForSelectWithPoint({
},
}
}
if (_artifact.type === 'extrudeEdge') {
const codeRef = getExtrudeEdgeCodeRef(
_artifact,
engineCommandManager.artifactGraph
)
if (err(codeRef)) return null
return {
type: 'Set selection',
data: {
selectionType: 'singleCodeCursor',
selection: { range: codeRef.range, type: 'edge' },
},
}
}
return null
}