Files
dyolink/frontend/src/components/ui/treatment/toothGlyphStructural.ts

16 lines
644 B
TypeScript

import type { ToothShapeKind } from '@/components/treatment/fdiToothMeta';
/** Inner “shell” contours: scaled copies of closed paths (wireframe). */
export function wireframeInnerScale(kind: ToothShapeKind): number {
if (kind === 'molar') return 0.9;
if (kind === 'premolar') return 0.88;
if (kind === 'canine') return 0.87;
return 0.85;
}
/** Approximate transform origin per region for scaled wireframe rings. */
export function wireframeOriginY(part: 'crown' | 'root', kind: ToothShapeKind): number {
if (part === 'crown') return kind === 'canine' ? 16 : 18;
return kind === 'molar' ? 50 : kind === 'premolar' ? 46 : 48;
}