Interface: SnapStatus
Describes one authored snap and its status in the current scene. Use it to draw or explain joints. Null evaluation flags mean a pending evaluation. Empty connections mean no live explicit joint. A free occupancy alone does not guarantee that a chosen product can be added. Use placement controls for that decision.
Example
const items = window.mimeeqApp.observers.modular.snapStatuses.getValue() ?? [];
const freeSnaps = items.flatMap(({ snaps }) => snaps.filter(({ occupancy }) => occupancy === 'free'));
console.log(freeSnaps);
Properties
code
code:
string
connections
connections:
PlacedSnapTarget[]
enabled
enabled:
boolean|null
hiddenByRule
hiddenByRule:
boolean|null
magnetic
magnetic:
SnapAttachment
meshId
meshId:
string
The authored mesh ID, which is also the snap ID.
Example
console.log(window.mimeeqApp.observers.modular.snapStatuses.getValue()?.[0]?.snaps[0]?.meshId);
meshName
meshName:
string
The mesh name on the model.
Example
console.log(window.mimeeqApp.observers.modular.snapStatuses.getValue()?.[0]?.snaps[0]?.meshName);
occupancy
occupancy:
"unknown"|"free"|"taken"
possibleConnections
possibleConnections:
SnapPossibleConnection[]
Compatible product snaps on the opposite side of a snap rule's source-to-target mapping. Check placement controls for current placement availability.
Example
const snap = window.mimeeqApp.observers.modular.snapStatuses.getValue()?.[0]?.snaps[0];
console.table(snap?.possibleConnections ?? []);
snapId
snapId:
string
unavailableReasons
unavailableReasons: (
"disabled"|"occupied"|"hiddenByRule"|"collision"|"conditionalRuleFailed"|"notEvaluated"|"targetSnapUnavailable")[]
visible
visible:
boolean|null
Whether the evaluated snap is enabled and visible for snapping. Null means evaluation is pending.
Example
const items = window.mimeeqApp.observers.modular.snapStatuses.getValue() ?? [];
console.table(items.flatMap(({ snaps }) => snaps.filter(({ visible }) => visible)));
welding
welding:
SnapAttachment