Skip to content

Commit 3b98b7d

Browse files
authored
plan.md (#4)
* plan.md * feat: grid tests * feat: import SVG and STL format * feat: changelog * feat: roundedBox and text * feat: circularArray * fix: circArray sample * feat: mirror * chore: deps
1 parent e3af261 commit 3b98b7d

20 files changed

Lines changed: 8236 additions & 5380 deletions

CHANGELOG.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
## [2025-11-23]
6+
7+
### Features
8+
9+
#### Mirror Operations
10+
11+
- **MIRROR Method**: Create reflections and symmetric objects across axis planes
12+
- New `Solid.MIRROR(solid, axis)` static method for mirroring geometry
13+
- Axis options: 'X' (YZ plane), 'Y' (XZ plane), 'Z' (XY plane)
14+
- Returns mirrored copy (combine with UNION for bilateral symmetry)
15+
- Immutable operation - does not modify original solid
16+
- Works with all primitives, CSG results, and negative solids
17+
- Supports chaining for multi-axis symmetry (quadrant, octant)
18+
- Common use cases: symmetric gears, arches, propellers, organic forms
19+
20+
#### Import Capabilities
21+
22+
- **STL File Import**: Load external STL files (binary and ASCII formats) as Solid components
23+
- New `Solid.fromSTL()` method for importing 3D models
24+
- Automatic normalization for seamless CSG operations
25+
- Full support for transforms, boolean operations, and grid arrays
26+
- Uses Three.js STLLoader (no additional dependencies)
27+
28+
- **SVG Path Import**: Import SVG paths and extrude them into 3D profiles
29+
- New `Solid.profilePrismFromSVG()` method for extruding SVG paths
30+
- Supports all standard SVG path commands (M/m, L/l, H/h, V/v, C/c, Q/q, A/a, Z/z)
31+
- Automatic Y-axis coordinate conversion (SVG Y-down → 3D Y-up)
32+
- Perfect for logos, custom profiles, and 2D designs
33+
- Uses Three.js SVGLoader (no additional dependencies)
34+
35+
- **Combined Import Operations**: Imported geometries work seamlessly with CSG operations
36+
- STL + primitives boolean operations
37+
- SVG + STL combinations
38+
- Grid arrays from imported geometries
39+
40+
#### New Examples
41+
42+
- Added comprehensive tutorial `P.mirror.ts` with 7 example components
43+
- Simple mirroring and bilateral symmetry
44+
- Quadrant and octant (full 3D) symmetry
45+
- Symmetric gears with mirrored tooth patterns
46+
- Mirrored holes and mounting patterns
47+
- Architectural archway with symmetric pillars
48+
49+
- Added comprehensive tutorial `N-importing.ts` with 14 example components
50+
- STL import basics, transformations, and boolean operations
51+
- SVG shapes: rectangles, stars, curves, hearts
52+
- Advanced combinations: parametric imports, STL+SVG mixing, grid patterns
53+
- Added sample STL asset (`projects/examples/assets/sample.stl`) for testing
54+
55+
### Improvements
56+
57+
#### Code Architecture
58+
59+
- Extracted path segment types to dedicated module (`src/lib/3d/path-factories.ts`)
60+
- `StraightSegment` and `CurveSegment` types now in separate file
61+
- `straight()` and `curve()` factory functions modularized
62+
- Better code organization and reusability
63+
64+
#### Input Validation
65+
66+
- Enhanced validation across all primitive creation methods
67+
- Comprehensive validation for cube, cylinder, sphere, cone, and prism
68+
- Transform method validation (scale, rotate, move, at)
69+
- Better error handling for edge cases
70+
- NaN and Infinity detection with clear error messages
71+
- Zero and negative dimension validation
72+
73+
### Testing
74+
75+
- Added comprehensive validation test suite (`tests/unit/lib/3d/Solid.validation.test.ts`)
76+
- 380 lines of test coverage
77+
- Primitive validation tests for all geometry types
78+
- Transform validation tests (scale, rotate, move, at)
79+
- Edge case coverage: very small values, very large values, NaN, Infinity
80+
- Zero dimensions and negative value handling tests
81+
82+
### Documentation
83+
84+
- Updated `CLAUDE.md` with complete import capabilities documentation
85+
- STL import usage and examples
86+
- SVG path import usage and supported commands
87+
- Boolean operations with imported geometries
88+
- Updated `README.md` with import feature overview
89+
- Added extensive inline comments in example files
90+
91+
### Internal
92+
93+
- Added project planning document (`plan.MD`)
94+
- Merged fixes from main branch (wedge positions)

0 commit comments

Comments
 (0)