forked from 1b-agent/opencadstudio-upstream
TRIM, FILLET and EXPLODE each carried their own copy of the same plane maths. The copies had already drifted apart: `ll` differed only in parameter names between trim.rs and fillet.rs, `arc_pts` only in which angle helper it called, and `norm` meant angle normalisation in trim.rs and explode.rs while meaning vector normalisation in two other files. The implementations now live in cadkernel's geom2d. A new local `geom` module adapts the call shapes — the kernel takes `[f64; 2]` points and returns `[f64; 3]`, while these commands pass loose scalars and feed `WireModel::points`, which is `[f32; 3]`. Narrowing stays on this side because only the caller knows whether it is a preview wire, which leaves `points_low` empty and accepts the loss, or resident geometry, which splits the f64 into a high/low pair instead. Call sites are untouched: the kernel functions are imported under the old local names, so the signatures they were written against still hold. This also fixes ELLIPSE trim and extend previews. `ellipse_pts` wrote its components as [x, z, y] while `arc_pts` — reached from the same match in `entity_pts`, feeding the same `[f32; 3]` — wrote [x, y, z], and `WireModel::points` is documented as world-space positions. Ellipse previews were collapsing onto y = 0 and displacing along Z. The kernel's `ellipse_arc` orders them correctly, so delegating corrects it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>