Copy this entire script into the svgEXT DAT inside the .tox component.
Implements: Issue 1 (precision), Issue 2 (grouping), Issue 3 (Inkscape/Illustrator compatibility), Issue 4 (landscape scaling), Issue 5 Phase 1 (camera xOffset), Issue 5 Phase 2 (correct perspective projection), Issue 7 (SVG profile), Issue 8 (stale state - OOP refactor), pretty printing, stroke-width rounding, mm/in unit switch, Issue 9 (long polyline splitting for Illustrator compat)
Issue 8 Update: All global coordinate/scaling variables moved to instance variables. Benefits: eliminates stale state bugs, allows multiple instances, thread-safe, testable, no module reload issues. Call _refresh_state() or save() to update values.