Files
snapcad-studio/apps/web/src/lib/cadModifierRuntime.ts
T

20 lines
914 B
TypeScript
Raw Normal View History

2026-07-11 20:34:13 +03:00
export const CAD_MODIFIER_RUNTIME_BASE = "/occt";
export const CAD_MODIFIER_REQUEST_TIMEOUT_MS = 30_000;
export const CAD_MODIFIER_MAX_SHARP_ANGLE = 90;
2026-07-11 20:34:13 +03:00
export type CadModifierRequestPhase = "prepare" | "preview";
export function edgeModifierSelectionStatus(prepared: boolean, selectedCount: number, availableCount: number) {
return prepared ? `${selectedCount} of ${availableCount} sharp edges selected` : "Preparing edges\u2026";
}
export function cadModifierTimeoutMessage(phase: CadModifierRequestPhase) {
if (phase === "preview") {
return "The edge preview timed out. Cancel the tool and try again.";
}
return "Edge preparation timed out. Update to Firefox 121+, Chrome/Brave 114+, or Safari 17.2+, then try again.";
}
export function cadModifierWorkerFailureMessage() {
return "The CAD worker could not start. Update to Firefox 121+, Chrome/Brave 114+, or Safari 17.2+, then try again.";
}