Complete 3axis tutorial native and Web/WASM parity tools

This commit is contained in:
2026-08-24 14:01:30 +08:00
parent 938654b19d
commit 7e90142b63
147 changed files with 17639 additions and 557 deletions

View File

@@ -21,8 +21,11 @@ export type MotionSnapshot = {
axes?: number[];
joints?: number[];
velocity?: number[];
homed?: boolean[];
limits?: number;
homed?: boolean | boolean[];
homed_axes?: boolean[];
limits?: number | Record<string, boolean>;
on_any_limit?: boolean;
fault?: string | null;
};
export type TrajectorySnapshot = {
@@ -32,6 +35,7 @@ export type TrajectorySnapshot = {
};
export type SimSnapshotV1 = {
schema?: string;
snapshot_id?: string;
base_snapshot_id?: string;
full?: boolean;
@@ -39,6 +43,7 @@ export type SimSnapshotV1 = {
state_hash: string;
task?: { state: string; mode: string; interp_state?: string; current_line?: number | null };
motion?: MotionSnapshot;
wasm_motion?: Record<string, unknown>;
authoritative?: { state_hash?: string; planner?: TrajectorySnapshot; kinematics?: Record<string, unknown> };
coordinates?: { machine?: number[]; relative?: number[]; g5x?: number; g92?: number[]; tool_offset?: number[] };
spindle?: Array<{ enabled?: boolean; direction?: number; commanded?: number; actual?: number; at_speed?: boolean }>;
@@ -48,6 +53,41 @@ export type SimSnapshotV1 = {
hal?: { graph_revision?: number; changed_values?: ArrayBuffer };
alarms?: Array<{ id?: string; severity?: string; code?: string; acknowledged?: boolean }>;
recovery?: { status?: string; last_verified_seq?: number; checkpoint_tick?: number };
panel_snapshot?: PanelSnapshotV1;
configuration?: Record<string, unknown> | null;
visual?: PanelSnapshotV1["visual"];
};
export type PanelSnapshotV1 = {
schema: "axis-panel-snapshot.v1";
context_id: string;
session_id: string;
simulation_tick: number;
state_hash: string;
task: Record<string, unknown>;
program: Record<string, unknown> | null;
motion: Record<string, unknown>;
coordinates?: { machine?: number[]; relative?: number[]; commanded?: number[] };
overrides?: { feed?: number; spindle?: number[] };
wasm_motion: Record<string, unknown>;
home_limit: Record<string, unknown>;
hal: Record<string, unknown>;
devices: Record<string, unknown>;
device_io: Record<string, unknown>;
configuration: Record<string, unknown> | null;
axis_state: AxisStateView;
gates: Record<string, { action: string; enabled: boolean; reason: string }>;
visual: {
schema: "axis-visual.v1";
pose: Record<string, number>;
joints: number[];
toolpath: Array<Record<string, unknown>>;
active_segment_id?: number | null;
source: "wasm_canonical_motion";
};
authoritative: Record<string, unknown>;
motion_authority: string;
task_authority: string;
};
export type Capabilities = {