Commit Graph

13 Commits

Author SHA1 Message Date
c3dca5ea64 fix: replace torus shapes with proper cylinder-based geometry
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>
2026-01-21 22:25:49 +00:00
0a7365f402 feat: add bogus geometry detection to validate-geometry.ts
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>
2026-01-21 22:18:14 +00:00
e4fa7c8446 feat: improve clutch-disc 3D geometry with realistic features
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>
2026-01-21 22:12:30 +00:00
8ea14c5e3d feat: add headless geometry validation and preview scripts
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>
2026-01-21 22:07:42 +00:00
6a4d1f4698 docs: add 3D geometry authoring guide with patterns and workflow
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>
2026-01-21 22:04:02 +00:00
efffbe2c0a feat: improve gear-case 3D geometry with realistic housing features
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>
2026-01-21 21:33:15 +00:00
054b78daea fix: Improve 3D viewer styling and add geometry3d to all gearbox parts
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>
2026-01-21 21:15:41 +00:00
2e11f6e16e feat: Add WebGL 3D part viewer with JSCAD geometry support
- 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>
2026-01-21 21:11:31 +00:00
7847bfb3e7 feat: Add complete Ford Fiesta Mk7 build with 12 assemblies and 131 parts
- Add installation metadata to all parts (tools, hardware, torque specs, notes)
- Create body-shell assembly (12 parts): shell, subframes, steering rack, brake servo, wiring
- Create front-suspension assembly (12 parts): struts, lower arms, hubs, brake components
- Create rear-suspension assembly (9 parts): twist beam, shocks, drums, handbrake
- Create brake-system assembly (9 parts): fluid reservoir, lines, hoses, proportioning valve
- Create cooling-system assembly (9 parts): radiator, thermostat, hoses, fan
- Create electrical assembly (9 parts): battery, cables, fuse box, earth straps, relays
- Create fuel-system assembly (9 parts): tank, pump module, lines, EVAP canister
- Create engine assembly (18 parts): 1.0 EcoBoost block, turbo, intake, injectors
- Create exhaust assembly (6 parts): downpipe, cat, silencers
- Create interior assembly (10 parts): dashboard, seats, trim panels
- Create exterior assembly (12 parts): panels, glass, lights, mirrors, wheels
- Add clutch components to gearbox: flywheel, clutch disc, pressure plate, release bearing
- Update Sidebar to show installation info when part selected
- Fix React key warnings in CategoryPage and ManufacturerPage

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 20:58:32 +00:00
842244fd2f fix: Auto-clean .next cache on dev start to prevent stale build errors
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 20:21:38 +00:00
d522ee9dd5 feat: Add Ford Fiesta IB5 5-speed manual gearbox assembly
- 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>
2026-01-21 20:20:20 +00:00
ec232d8c28 feat: Convert exploded-diagrams to React/Next.js with collision detection
- 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>
2026-01-21 20:10:11 +00:00
ebcb90141d Add files via upload 2026-01-21 19:28:59 +00:00