Open jtran opened 1 week ago
This issue brings to light that we have been needlessly tracking the default planes as state within engineConnectionManager
and indirectly within kclManager
, where we have methods for showPlanes
and hidePlanes
. Here is my understanding after talking to the team, and my game plan for a refactor:
engineConnectionManager
, and why there is special logic for the default planes outside of the core WASM-side KCL execution in run_with_session_data
engineConnectionManager
, their visibility is not tracked anywhere, and has been mutated as a side effect of state transitions within modelingMachine
; namely when the AST is emptied or populated, and when sketch mode is awaiting a surface selection ( the "sketch no face"
state).run_with_session_data
, and include those commands in the same batch (remove the flush currently in the default_planes construction).1
)engineConnectionManager
or kclManager
default_planes
from wasm-lib
visibilityMap
from artifactGraph
and tracks relevant artifacts' visibility (planes only for now), removing if they don't exist in the artifactGraphhidePlanes
and showPlanes
into engineConnectionManager
, and make it act on the visibilityMap
artifactGraph
to determine if a plane is default or notBtw, I made these rust changes in my multi-profile PR.
I need the above for how I'm currently grouping profiles, but can work with an alternative.
Right now, we're going based off of the source range, which seems really fragile. See https://github.com/KittyCAD/modeling-app/pull/4481#discussion_r1841024676.