The torus primitive was creating "donut" shapes that looked unrealistic.
Fixed 7 parts by replacing torus with layered cylinders:
- flywheel: Now shows proper disc with bolt holes, no ring gear torus
- first-gear through fifth-gear: Tiered cylinders with splined hub
- release-bearing: Proper cylindrical bearing stack
Added torus detection to validate-geometry.ts:
- DONUT SHAPE: Warns when torus tubeR > 15% of body radius
- DOMINANT TORUS: Warns when torus radius close to body size
All 16 gearbox parts now pass validation with scores 84-162.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Detects problematic patterns that produce visually poor results:
- First shape is subtraction/intersection (nothing to operate on)
- BREEZE BLOCK: Single base with only subtractions (invisible internal cuts)
- NO EXTERNAL FEATURES: All unions centered (looks like basic shape)
- Subtraction encompasses base shape (may hollow out completely)
- Duplicate shapes (likely copy-paste error)
- Subtraction outside base bounds (has no effect)
- Very thin shapes (may be invisible)
- Zero/negative dimensions
Smart exceptions:
- Shaft bores (long thin cylinders) don't trigger "larger than base" warning
Added --strict mode to treat warnings as errors.
Updated validate-assembly.sh to show warning count.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added detailed clutch disc geometry:
- Dual-layer friction ring surfaces
- 8 damper spring cylinders arranged radially
- 4 spring retainer plates
- Splined hub with cross-pattern cutout
- Hub retention flange
Also fixed validate-geometry.ts to accept #RGB shorthand colors.
All 16 gearbox parts now pass complexity scoring (min 79, max 162).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
CLI tools for fast iteration without browser:
- validate-geometry.ts: JSON schema validation
- geometry-stats.ts: Metrics and warnings (breeze block detection)
- complexity-score.ts: Visual interest scoring with breakdown
- ascii-preview.ts: Terminal-based top-down/front view
- validate-assembly.sh: Batch validate all parts
Updated 3D_GEOMETRY_AUTHORING_GUIDE.md with headless workflow section.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Documents the iterative process for creating realistic 3D part geometry:
- Visual feedback loop (view → analyze → improve)
- Schema reference for all primitive types
- Design patterns by part type (housings, gears, shafts, bearings, plates)
- Color guidelines for distinguishing features
- Key insight: external features matter, internal subtractions are invisible
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added external features to make the gear case look like a real gearbox housing:
- Mating flange with 6 bolt bosses and bolt holes
- Two shaft bearing housings (cylindrical protrusions)
- Vertical structural ribbing
- Output shaft housing boss
- Drain plug boss
Also includes camera position fix (150,150,150) and grid size (200) for mm-scale parts.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tab & viewer styling:
- Match dark theme with gradient accents and glow effects
- Update ThreeCanvas background to dark blue (#1a1a2e)
- Add cyan accent lighting for visual interest
- Style part selector with dark theme colors
Add geometry3d to all 16 gearbox parts:
- bell-housing: conical bell shape with bolt holes
- gear-case: rectangular housing with shaft bores
- input-shaft: splined end with bearing journal and gear
- layshaft: multiple integrated gears along shaft
- output-shaft: mainshaft with synchro hub locations
- first-gear through fifth-gear: progressively smaller gears
- synchro-hub: splined hub with external teeth
- selector-fork: Y-shaped component for synchro engagement
- flywheel, clutch-disc, pressure-plate, release-bearing (already done)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add tabbed interface to switch between Exploded View and 3D Part View
- Create JSCAD-to-Three.js converter for CSG operations (union, subtract, intersect)
- Support cylinder, box, sphere, torus, cone geometry types with transforms
- Add ThreeCanvas component with OrbitControls for camera manipulation
- Add PartSelector sidebar for selecting parts to view in 3D
- Extend Part type with optional geometry3d array for 3D definitions
- Add geometry3d to clutch parts: flywheel, clutch-disc, pressure-plate, release-bearing
- Parts without geometry3d fall back to placeholder box
Dependencies: three, @react-three/fiber, @react-three/drei, @jscad/modeling
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 12 parts: bell housing, input/output shafts, layshaft, 5 gears,
synchro hubs, selector forks, gear case
- Add automotive category with Ford manufacturer
- Add castAluminum material for transmission housings
- Gear ratios: 1st 3.58:1 to 5th 0.82:1 overdrive
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Migrate from vanilla JS to Next.js 15 with TypeScript
- Add Love2D-style AABB collision detection for parts
- Dynamic canvas that expands when parts collide
- UI boundary collision (horizontal rule grace margin)
- Sass styling with dark theme
- Interactive controls (explosion slider, rotation)
- Part highlighting with glow effects
- Breadcrumb navigation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>