cyclecad 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +243 -0
- package/MASTERPLAN.md +182 -0
- package/app/index.html +1622 -30
- package/app/js/advanced-ops.js +762 -0
- package/app/js/app.js +79 -9
- package/app/js/assembly-resolver.js +477 -0
- package/app/js/assembly.js +1102 -0
- package/app/js/constraint-solver.js +1046 -0
- package/app/js/dxf-export.js +1173 -0
- package/app/js/operations.js +501 -112
- package/app/js/project-browser.js +741 -0
- package/app/js/project-loader.js +579 -0
- package/app/js/rebuild-guide.js +743 -0
- package/app/js/viewport.js +107 -0
- package/package.json +2 -2
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
# Memory — cycleCAD
|
|
2
|
+
|
|
3
|
+
## Me
|
|
4
|
+
SACHIN (vvlars@googlemail.com, GitHub: vvlars-cmd). Building cycleCAD — open-source browser-based parametric 3D CAD modeler. Also maintains ExplodeView (separate repo). Company: cycleWASH (bicycle washing machines).
|
|
5
|
+
|
|
6
|
+
## Two Repos — CRITICAL DISTINCTION
|
|
7
|
+
| Repo | Local Path | GitHub | npm | What |
|
|
8
|
+
|------|-----------|--------|-----|------|
|
|
9
|
+
| **ExplodeView** | `~/explodeview` | `vvlars-cmd/explodeview` | `explodeview` v1.0.5 | 3D CAD **viewer** for STEP files. 19,000+ line monolith app.js |
|
|
10
|
+
| **cycleCAD** | `~/cyclecad` | `vvlars-cmd/cyclecad` | `cyclecad` v0.1.3 | Parametric 3D CAD **modeler**. 19 modular JS files, 18,800+ lines. This is the active project. |
|
|
11
|
+
|
|
12
|
+
**IMPORTANT**: These are SEPARATE repos. When Sachin says "cyclecad" he means `~/cyclecad`, NOT `~/explodeview/docs/cyclecad/`. I made this mistake once and was corrected.
|
|
13
|
+
|
|
14
|
+
## Session History
|
|
15
|
+
|
|
16
|
+
### Session 2026-03-24 — Hero Image + Major Feature Build
|
|
17
|
+
|
|
18
|
+
**Problem evolution:**
|
|
19
|
+
1. Started: Previous session crashed, needed to resume
|
|
20
|
+
2. Task 1: Create polished hero image for npm/GitHub → Built HTML mockup of full cycleCAD UI, rendered to 2x retina PNG (2560×1440) with Playwright
|
|
21
|
+
3. Task 2: Commit and push → Hit stale git lock files from crash, needed Sachin to remove locally
|
|
22
|
+
4. Task 3: Push to npm → Found merge conflict in package.json (had `<<<<<<<` markers), fixed
|
|
23
|
+
5. Task 4: Import DUO Inventor project → Sachin copied full production Inventor project (482 files) into `~/cyclecad/example/`
|
|
24
|
+
6. Task 5: Build features using the real project data → Massive build session
|
|
25
|
+
|
|
26
|
+
**What was built (this session):**
|
|
27
|
+
|
|
28
|
+
5 NEW modules (3,540 lines):
|
|
29
|
+
- `project-loader.js` (579 lines) — Parses .ipj project files, indexes entire Inventor folder structures, categorizes files as CUSTOM/STANDARD/VENDOR
|
|
30
|
+
- `project-browser.js` (741 lines) — Folder tree UI with file type icons, categories, search, stats dashboard
|
|
31
|
+
- `assembly-resolver.js` (477 lines) — Parses .iam binary files, extracts component references, resolves paths, generates BOM with quantities
|
|
32
|
+
- `rebuild-guide.js` (743 lines) — Step-by-step recreation guides for both cycleCAD and Fusion 360 Free, with time estimates, HTML export
|
|
33
|
+
|
|
34
|
+
4 ENHANCED modules (~800 lines added):
|
|
35
|
+
- `operations.js` (690→1,078 lines) — Real fillet (edge-based), chamfer, boolean union/cut/intersect, shell, rectangular + circular pattern
|
|
36
|
+
- `viewport.js` (643→667 lines) — Working toggleGrid, toggleWireframe, fitToObject with camera animation
|
|
37
|
+
- `app.js` (724→794 lines) — Undo/redo with history snapshots, pushHistory after operations
|
|
38
|
+
- `index.html` (1,425→1,852 lines) — All new modules wired in, Guide tab in right panel, project browser integration, toolbar buttons connected to real functions
|
|
39
|
+
|
|
40
|
+
**Testing results:**
|
|
41
|
+
- Parser validated against 342/342 real DUO .ipt files — 100% success rate
|
|
42
|
+
- Feature detection: FlatPattern 52%, WorkPlane 44%, WorkAxis 4%
|
|
43
|
+
- Main assembly .iam (9.1 MB) parsed successfully — 47 components found
|
|
44
|
+
- Performance: 2-5ms per file
|
|
45
|
+
|
|
46
|
+
**Git state at end of session:**
|
|
47
|
+
- Commit ready but BLOCKED by stale `.git/index.lock` — Sachin needs to run:
|
|
48
|
+
```
|
|
49
|
+
cd ~/cyclecad
|
|
50
|
+
rm -f .git/index.lock
|
|
51
|
+
git add .gitignore MASTERPLAN.md app/index.html app/js/app.js app/js/operations.js app/js/viewport.js app/js/assembly-resolver.js app/js/project-browser.js app/js/project-loader.js app/js/rebuild-guide.js
|
|
52
|
+
git commit -m "feat: Major update — project loader, assembly resolver, rebuild guides, parametric ops"
|
|
53
|
+
git push origin main
|
|
54
|
+
```
|
|
55
|
+
- npm publish v0.1.4 after push
|
|
56
|
+
|
|
57
|
+
## Key Files
|
|
58
|
+
| File | Lines | What |
|
|
59
|
+
|------|-------|------|
|
|
60
|
+
| `index.html` | 14K | Landing page for cyclecad.com |
|
|
61
|
+
| `app/index.html` | 3,156 | Main CAD app — HTML + inline script wiring all 17 modules |
|
|
62
|
+
| `app/js/app.js` | 794 | App state, mode management, history, save/load |
|
|
63
|
+
| `app/js/viewport.js` | 751 | Three.js r170 scene, camera, lights, shadows, grid, selection highlight, OrbitControls, views |
|
|
64
|
+
| `app/js/sketch.js` | 899 | 2D canvas overlay, line/rect/circle/arc, grid snapping, constraints |
|
|
65
|
+
| `app/js/operations.js` | 1,078 | Extrude, revolve, fillet, chamfer, boolean, shell, pattern |
|
|
66
|
+
| `app/js/constraint-solver.js` | 1,047 | 2D constraint solver: 12 types, iterative relaxation, DOF analysis |
|
|
67
|
+
| `app/js/advanced-ops.js` | 763 | Sweep, loft, sheet metal (bend/flange/tab/slot/unfold), spring, thread |
|
|
68
|
+
| `app/js/assembly.js` | 1,103 | Assembly workspace: components, mate constraints, joints, explode/collapse |
|
|
69
|
+
| `app/js/dxf-export.js` | 1,174 | DXF export: 2D sketch, 3D projection, multi-view engineering drawing |
|
|
70
|
+
| `app/js/params.js` | 523 | Parameter editor, material selector (Steel/Al/ABS/Brass/Ti/Nylon) |
|
|
71
|
+
| `app/js/tree.js` | 479 | Feature tree panel with rename, suppress, delete, context menus |
|
|
72
|
+
| `app/js/inventor-parser.js` | 1,138 | OLE2/CFB binary parser for .ipt/.iam, 26 feature types, assembly constraints |
|
|
73
|
+
| `app/js/assembly-resolver.js` | 477 | Parse .iam references, resolve paths, generate BOM |
|
|
74
|
+
| `app/js/project-loader.js` | 579 | Parse .ipj, index project folders, categorize files |
|
|
75
|
+
| `app/js/project-browser.js` | 741 | Folder tree UI, file categories, search, stats |
|
|
76
|
+
| `app/js/rebuild-guide.js` | 743 | Step-by-step guides for cycleCAD + Fusion 360 |
|
|
77
|
+
| `app/js/reverse-engineer.js` | 1,275 | STL import, geometry analysis, feature detection |
|
|
78
|
+
| `app/js/ai-chat.js` | 992 | Gemini Flash + Groq + offline NLP fallback chatbot |
|
|
79
|
+
| `app/js/export.js` | 658 | STL (ASCII+binary), OBJ, glTF 2.0, cycleCAD JSON export |
|
|
80
|
+
| `app/js/shortcuts.js` | 350 | 25+ keyboard shortcuts |
|
|
81
|
+
| `MASTERPLAN.md` | ~200 | Full 10-phase roadmap with competitive analysis |
|
|
82
|
+
| `CLAUDE.md` | this file | Conversation memory |
|
|
83
|
+
| `screenshot.png` | 829KB | Hero image for npm/GitHub (2x retina UI mockup) |
|
|
84
|
+
| `CNAME` | — | cyclecad.com domain |
|
|
85
|
+
| `package.json` | — | npm config, v0.1.3 |
|
|
86
|
+
|
|
87
|
+
## DUO Inventor Project
|
|
88
|
+
Located at `~/cyclecad/example/DUO Durchgehend Inventor/` (gitignored — too large for repo).
|
|
89
|
+
|
|
90
|
+
| Stat | Value |
|
|
91
|
+
|------|-------|
|
|
92
|
+
| Total files | 482 |
|
|
93
|
+
| .ipt parts | 393 |
|
|
94
|
+
| .iam assemblies | 80 |
|
|
95
|
+
| Project file | `D-ZBG-DUO-Anlage.ipj` (UTF-16 XML) |
|
|
96
|
+
| Main assembly | `Zusatzoptionen/DUOdurch/D-ZBG-DUO-Anlage.iam` (9.1 MB) |
|
|
97
|
+
| Workspace path | `.\Workspaces\Arbeitsbereich` |
|
|
98
|
+
| Content Center | `.\Libraries\Content Center Files\` |
|
|
99
|
+
|
|
100
|
+
**Folder structure:**
|
|
101
|
+
- `DUO Anlage/` — main machine parts
|
|
102
|
+
- `Gestell/` — frame (Seitenträger, TrägerHöhe, TrägerBreite, etc.)
|
|
103
|
+
- `Lenkerhalterung/` — handlebar holder
|
|
104
|
+
- `Leistenbürstenblech.ipt` — strip brush plate (sheet metal)
|
|
105
|
+
- `Zukaufteile/` — bought-in parts (igus linear, Interroll rollers, WEG motors, Rittal enclosures)
|
|
106
|
+
- `Libraries/Content Center Files/de-DE/` — DIN/ISO standard hardware (ISO 4762, ISO 4035, DIN 6912, etc.)
|
|
107
|
+
- `Zusatzoptionen/` — add-on options with main assembly .iam
|
|
108
|
+
- `MiniDuo NX_11/` — smaller variant
|
|
109
|
+
- `Übernommen/` — legacy/transferred parts
|
|
110
|
+
|
|
111
|
+
## Architecture
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
115
|
+
│ cyclecad.com (GitHub Pages) │
|
|
116
|
+
├─────────────────────────────────────────────────────────────┤
|
|
117
|
+
│ Landing (/) → App (/app/) → Docs (/app/docs/) │
|
|
118
|
+
├─────────────────────────────────────────────────────────────┤
|
|
119
|
+
│ │
|
|
120
|
+
│ ┌──────────┐ ┌──────────────┐ ┌───────────────────────┐ │
|
|
121
|
+
│ │ Project │ │ 3D Viewport │ │ Right Panel │ │
|
|
122
|
+
│ │ Browser / │ │ (Three.js) │ │ - Properties tab │ │
|
|
123
|
+
│ │ Model │ │ │ │ - Chat tab (AI) │ │
|
|
124
|
+
│ │ Tree │ │ Sketch │ │ - Guide tab │ │
|
|
125
|
+
│ │ │ │ Canvas │ │ (rebuild guides) │ │
|
|
126
|
+
│ └──────────┘ └──────────────┘ └───────────────────────┘ │
|
|
127
|
+
│ │
|
|
128
|
+
│ 15 ES Modules (zero deps, CDN only): │
|
|
129
|
+
│ viewport ─ sketch ─ operations ─ tree ─ params ─ export │
|
|
130
|
+
│ inventor-parser ─ assembly-resolver ─ project-loader │
|
|
131
|
+
│ project-browser ─ rebuild-guide ─ reverse-engineer │
|
|
132
|
+
│ ai-chat ─ shortcuts ─ app │
|
|
133
|
+
│ │
|
|
134
|
+
│ AI: Gemini Flash + Groq Llama 3.1 + offline NLP fallback │
|
|
135
|
+
└─────────────────────────────────────────────────────────────┘
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Feature Status
|
|
139
|
+
|
|
140
|
+
### WORKING
|
|
141
|
+
- 3D viewport (Three.js r170, OrbitControls, preset views, grid, wireframe, fit-to-all)
|
|
142
|
+
- 2D sketch engine (line, rect, circle, arc, polyline, grid snap, constraint detection)
|
|
143
|
+
- Parametric operations (extrude, revolve, fillet, chamfer, boolean, shell, pattern)
|
|
144
|
+
- **Constraint solver** (12 types: coincident, horizontal, vertical, parallel, perpendicular, tangent, equal, fixed, concentric, symmetric, distance, angle)
|
|
145
|
+
- **Sweep** (profile along path with twist, scale interpolation, helix/line/arc paths)
|
|
146
|
+
- **Loft** (between profiles with automatic resampling, circle/rect/hexagon)
|
|
147
|
+
- **Sheet metal** (bend with k-factor, flange, tab, slot, unfold flat pattern)
|
|
148
|
+
- **Spring & thread generators** (helical sweep, screw thread geometry)
|
|
149
|
+
- Feature tree (rename, suppress, delete, context menus)
|
|
150
|
+
- Parameter editor (real-time updates, 6 materials with density data)
|
|
151
|
+
- Export (STL ASCII+binary, OBJ, glTF 2.0, cycleCAD JSON)
|
|
152
|
+
- AI chatbot (Gemini + Groq + local NLP, 15+ part types)
|
|
153
|
+
- Inventor parsing (OLE2/CFB, 26 feature types, constraints, metadata)
|
|
154
|
+
- Assembly resolver (reference extraction, path resolution, BOM)
|
|
155
|
+
- Project loader (.ipj parsing, folder indexing, file categorization)
|
|
156
|
+
- Project browser (tree UI + inline left panel, search, categories, stats)
|
|
157
|
+
- DUO manifest loader (474 files, instant load without File System Access API)
|
|
158
|
+
- Rebuild guides (cycleCAD + Fusion 360, per-step time estimates, HTML export)
|
|
159
|
+
- Reverse engineering (STL import, geometry analysis, feature inference)
|
|
160
|
+
- Keyboard shortcuts (25+)
|
|
161
|
+
- Undo/redo (history snapshots, Ctrl+Z/Y)
|
|
162
|
+
- Welcome splash with quick actions
|
|
163
|
+
- Left panel tabs (Model Tree / Project Browser)
|
|
164
|
+
- Dark theme UI (VS Code-style CSS variables)
|
|
165
|
+
|
|
166
|
+
### STUBS/APPROXIMATIONS
|
|
167
|
+
- Fillet/chamfer use torus/cone approximations (not true edge rounding)
|
|
168
|
+
- Boolean cut is visual indicator only (no real CSG)
|
|
169
|
+
- STEP export shows error (needs OpenCascade.js)
|
|
170
|
+
- Revolve doesn't fully rebuild on param change
|
|
171
|
+
- History restore is basic (feature list only, no geometry serialization)
|
|
172
|
+
- Bend/flange apply to selected mesh with default bend line (not edge-selected)
|
|
173
|
+
|
|
174
|
+
### NOT YET BUILT
|
|
175
|
+
- Real-time collaboration
|
|
176
|
+
- Plugin API
|
|
177
|
+
- STEP import via OpenCascade.js
|
|
178
|
+
- DWG export (DXF is done)
|
|
179
|
+
- Assembly workspace joint editing UI (module is built, needs UI panel)
|
|
180
|
+
|
|
181
|
+
## Competitive Landscape
|
|
182
|
+
| Competitor | What | Our Edge |
|
|
183
|
+
|-----------|------|----------|
|
|
184
|
+
| Fusion 360 | Cloud CAD, $$$, Autodesk | Free, open-source, opens Inventor natively |
|
|
185
|
+
| MecAgent (MIT) | AI learns CAD from demos | We ship product, not research |
|
|
186
|
+
| VideoCAD | 41K video dataset, AI training | Dataset only, no product. 186-action sequences |
|
|
187
|
+
| AurorInCAD | AI CAD startup | Closed-source, early stage |
|
|
188
|
+
| OnShape | Browser CAD (PTC) | Expensive, enterprise-only |
|
|
189
|
+
| FreeCAD | Desktop open-source | Desktop-only, no AI, no Inventor import |
|
|
190
|
+
|
|
191
|
+
## Publishing
|
|
192
|
+
- **npm**: `cyclecad` v0.1.3 published (v0.1.4 pending push)
|
|
193
|
+
- **GitHub**: https://github.com/vvlars-cmd/cyclecad
|
|
194
|
+
- **Domain**: cyclecad.com → GitHub Pages (CNAME in repo)
|
|
195
|
+
- **Hero image**: `screenshot.png` — 2x retina UI mockup, renders on npm + GitHub README
|
|
196
|
+
|
|
197
|
+
## Sachin's Working Style
|
|
198
|
+
- **Fast iteration, minimal questions** — prefers action over clarification
|
|
199
|
+
- **Direct communication** — "ok" to proceed, "go ahead" to authorize, short corrections
|
|
200
|
+
- **Corrects immediately** — "why are you in explodeview you should be in the cyclecad"
|
|
201
|
+
- **Expects me to figure things out** — "look at cyclecad in my home folder" not exact paths
|
|
202
|
+
- **Shares terminal output** — pastes errors/results directly
|
|
203
|
+
- **Runs git auth locally** — VM can't authenticate with GitHub
|
|
204
|
+
- **Long autonomous sessions** — expects me to keep building without stopping to ask
|
|
205
|
+
- **Cares about competitors** — wants to know what MecAgent, VideoCAD, AurorInCAD are doing
|
|
206
|
+
- **Backup before major changes** (for ExplodeView)
|
|
207
|
+
- **Cache bust bump on every change** (for ExplodeView)
|
|
208
|
+
|
|
209
|
+
## Collaboration Patterns
|
|
210
|
+
1. **Build first, show results** — don't ask what to build, just build it and show
|
|
211
|
+
2. **Use the right repo** — `~/cyclecad` for cycleCAD, `~/explodeview` for ExplodeView
|
|
212
|
+
3. **When git is blocked** — give exact copy-paste commands for Sachin's terminal
|
|
213
|
+
4. **Handle crashes gracefully** — check for lock files, explain fix, move on
|
|
214
|
+
5. **Commit with author** — `git -c user.name="Sachin Kumar" -c user.email="vvlars@googlemail.com"`
|
|
215
|
+
6. **Mount folders** — use `request_cowork_directory` with `~/cyclecad` path
|
|
216
|
+
7. **Test with real data** — always validate against actual DUO Inventor files
|
|
217
|
+
8. **Parallel agents** — use multiple agents for independent tasks to save time
|
|
218
|
+
|
|
219
|
+
## Processes Established
|
|
220
|
+
- **Hero image pipeline**: HTML mockup → Playwright 2x render → save as screenshot.png
|
|
221
|
+
- **Git in VM**: Set author via `-c` flags. Can't push (no GitHub creds). Sachin pushes locally.
|
|
222
|
+
- **Inventor testing**: Node.js script at `/sessions/sharp-modest-allen/test-parser.js` — standalone OLE2 parser for batch testing
|
|
223
|
+
- **Feature development**: Build module → wire into index.html inline script → test → commit
|
|
224
|
+
|
|
225
|
+
## Recurring Git Issues
|
|
226
|
+
- **Stale lock files** — sessions crash and leave `.git/index.lock` or `.git/HEAD.lock`
|
|
227
|
+
- **Fix**: Sachin runs `rm -f ~/cyclecad/.git/index.lock ~/cyclecad/.git/HEAD.lock`
|
|
228
|
+
- **Merge conflicts** — remote diverges when npm publish bumps version
|
|
229
|
+
- **Fix**: `git pull --rebase origin main`, resolve conflicts, `GIT_EDITOR=true git rebase --continue`
|
|
230
|
+
- **Vim pops up** — use `GIT_EDITOR=true` to skip editor on rebase continue
|
|
231
|
+
- **Swap files** — crash leaves `.COMMIT_EDITMSG.swp`, delete with `rm .git/.COMMIT_EDITMSG.swp`
|
|
232
|
+
|
|
233
|
+
## Pending / Next Steps
|
|
234
|
+
- [ ] **IMMEDIATE**: Remove git lock, commit, push (commands above)
|
|
235
|
+
- [ ] **npm publish** v0.1.4 after push
|
|
236
|
+
- [ ] Bump package.json to 0.1.4 before publish
|
|
237
|
+
- [ ] Test live site at cyclecad.com/app/ with new features
|
|
238
|
+
- [ ] Add DUO project as downloadable demo (ZIP or separate hosting, too big for git)
|
|
239
|
+
- [ ] Phase 5 from MASTERPLAN: Constraint solver, sweep, loft, sheet metal tools
|
|
240
|
+
- [ ] Phase 6: Assembly workspace with joint placement
|
|
241
|
+
- [ ] Phase 7: AI sketch-to-3D, smart autocomplete, design validation
|
|
242
|
+
- [ ] LinkedIn launch post for cycleCAD
|
|
243
|
+
- [ ] Clean up ExplodeView repo lock files too
|
package/MASTERPLAN.md
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# cycleCAD — Master Plan
|
|
2
|
+
|
|
3
|
+
## Vision
|
|
4
|
+
**The first open-source, browser-based parametric CAD modeler with native Inventor file support and AI-powered design tools.** No install, no license fees, no vendor lock-in. Opens your existing Inventor projects directly in the browser.
|
|
5
|
+
|
|
6
|
+
## Competitive Landscape
|
|
7
|
+
|
|
8
|
+
| Competitor | What They Do | Our Edge |
|
|
9
|
+
|-----------|-------------|----------|
|
|
10
|
+
| **Fusion 360** | Cloud CAD, $$$, Autodesk lock-in | Free, open-source, no install, opens Inventor natively |
|
|
11
|
+
| **MecAgent (MIT)** | AI agent that learns CAD from demos, LLM + CAD API | We ship a real product, not a research paper. AI is a feature, not the whole product |
|
|
12
|
+
| **VideoCAD** | 41K video dataset training AI to do CAD UI interactions | Dataset/model only — no user-facing product. We can integrate similar AI |
|
|
13
|
+
| **AurorInCAD** | AI-powered CAD startup | Closed-source, early stage. We're open-source with real Inventor parsing |
|
|
14
|
+
| **OnShape** | Browser CAD (PTC) | Expensive, enterprise-only. We're free and open-source |
|
|
15
|
+
| **FreeCAD** | Desktop open-source CAD | Desktop-only, Python-heavy, no AI, no Inventor import. We're browser-native |
|
|
16
|
+
|
|
17
|
+
## Architecture
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
21
|
+
│ cyclecad.com │
|
|
22
|
+
├─────────────────────────────────────────────────────────────┤
|
|
23
|
+
│ Landing Page (/) → App (/app/) → Docs (/app/docs/) │
|
|
24
|
+
├─────────────────────────────────────────────────────────────┤
|
|
25
|
+
│ │
|
|
26
|
+
│ ┌──────────┐ ┌──────────────┐ ┌───────────────────────┐ │
|
|
27
|
+
│ │ Project │ │ 3D Viewport │ │ Properties Panel │ │
|
|
28
|
+
│ │ Browser │ │ (Three.js) │ │ - Parameters │ │
|
|
29
|
+
│ │ │ │ │ │ - Materials │ │
|
|
30
|
+
│ │ Model │ │ Sketch │ │ - Operations │ │
|
|
31
|
+
│ │ Tree │ │ Canvas │ │ - AI Chat │ │
|
|
32
|
+
│ │ │ │ (2D overlay) │ │ - Rebuild Guide │ │
|
|
33
|
+
│ └──────────┘ └──────────────┘ └───────────────────────┘ │
|
|
34
|
+
│ │
|
|
35
|
+
│ ┌──────────────────────────────────────────────────────┐ │
|
|
36
|
+
│ │ Core Modules (ES Modules, zero deps) │ │
|
|
37
|
+
│ │ │ │
|
|
38
|
+
│ │ viewport.js ─── sketch.js ─── operations.js │ │
|
|
39
|
+
│ │ tree.js ─── params.js ─── export.js │ │
|
|
40
|
+
│ │ inventor-parser.js ─── assembly-resolver.js │ │
|
|
41
|
+
│ │ project-loader.js ─── project-browser.js │ │
|
|
42
|
+
│ │ rebuild-guide.js ─── reverse-engineer.js │ │
|
|
43
|
+
│ │ ai-chat.js ─── shortcuts.js ─── app.js │ │
|
|
44
|
+
│ └──────────────────────────────────────────────────────┘ │
|
|
45
|
+
│ │
|
|
46
|
+
│ ┌──────────────────────────────────────────────────────┐ │
|
|
47
|
+
│ │ AI Layer (Gemini Flash + Groq Llama 3.1) │ │
|
|
48
|
+
│ │ - Natural language → CAD commands │ │
|
|
49
|
+
│ │ - Part identification from geometry │ │
|
|
50
|
+
│ │ - Assembly instructions generation │ │
|
|
51
|
+
│ │ - Smart search with synonyms │ │
|
|
52
|
+
│ │ - Offline fallback (local NLP parser) │ │
|
|
53
|
+
│ └──────────────────────────────────────────────────────┘ │
|
|
54
|
+
└─────────────────────────────────────────────────────────────┘
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Feature Roadmap
|
|
58
|
+
|
|
59
|
+
### Phase 1: Foundation ✅ DONE
|
|
60
|
+
- [x] Three.js r170 viewport with OrbitControls
|
|
61
|
+
- [x] 2D sketch engine (line, rect, circle, arc, polyline)
|
|
62
|
+
- [x] Grid snapping + constraint detection
|
|
63
|
+
- [x] Extrude operation (parametric)
|
|
64
|
+
- [x] Feature tree panel
|
|
65
|
+
- [x] Parameter editor with materials
|
|
66
|
+
- [x] Export: STL, OBJ, glTF, JSON
|
|
67
|
+
- [x] AI chatbot (Gemini + Groq + offline fallback)
|
|
68
|
+
- [x] Keyboard shortcuts (25+)
|
|
69
|
+
- [x] Dark theme UI (VS Code-style)
|
|
70
|
+
- [x] Welcome splash with quick actions
|
|
71
|
+
|
|
72
|
+
### Phase 2: Inventor Integration ✅ DONE
|
|
73
|
+
- [x] OLE2/CFB binary parser for .ipt/.iam files
|
|
74
|
+
- [x] Feature detection (26 types: extrude, revolve, hole, fillet, etc.)
|
|
75
|
+
- [x] Assembly constraint detection (mate, flush, angle, insert, etc.)
|
|
76
|
+
- [x] Part type classification (solid, sheet metal, weldment)
|
|
77
|
+
- [x] Project loader (.ipj parser, folder indexing)
|
|
78
|
+
- [x] Project browser (folder tree, file categorization, search)
|
|
79
|
+
- [x] Assembly resolver (reference extraction, path resolution, BOM)
|
|
80
|
+
- [x] Rebuild guide generator (cycleCAD + Fusion 360 steps)
|
|
81
|
+
|
|
82
|
+
### Phase 3: Parametric Operations ✅ DONE
|
|
83
|
+
- [x] Revolve (with partial angle support)
|
|
84
|
+
- [x] Fillet (edge-based, parametric radius)
|
|
85
|
+
- [x] Chamfer (edge-based, parametric distance)
|
|
86
|
+
- [x] Boolean Union (geometry merge)
|
|
87
|
+
- [x] Boolean Cut (visual indicator + intersection)
|
|
88
|
+
- [x] Boolean Intersect (overlap volume)
|
|
89
|
+
- [x] Shell (hollow body generation)
|
|
90
|
+
- [x] Rectangular Pattern (N×M grid)
|
|
91
|
+
- [x] Circular Pattern (N copies around axis)
|
|
92
|
+
- [x] Undo/Redo (history snapshots)
|
|
93
|
+
- [x] Grid toggle, wireframe toggle, fit-to-all
|
|
94
|
+
|
|
95
|
+
### Phase 4: Real Project Testing 🔄 IN PROGRESS
|
|
96
|
+
- [ ] Test parser against all 393 DUO .ipt files
|
|
97
|
+
- [ ] Test assembly resolver against 80 .iam files
|
|
98
|
+
- [ ] Validate rebuild guides for real parts
|
|
99
|
+
- [ ] Performance testing (482 files, batch operations)
|
|
100
|
+
- [ ] Fix edge cases in OLE2 parsing
|
|
101
|
+
|
|
102
|
+
### Phase 5: Advanced Modeling (Next)
|
|
103
|
+
- [ ] **Constraint solver** — parametric sketch constraints (parallel, perpendicular, tangent, coincident, equal, fixed)
|
|
104
|
+
- [ ] **Dimension-driven design** — change a dimension, model updates
|
|
105
|
+
- [ ] **Sweep** — extrude along a path
|
|
106
|
+
- [ ] **Loft** — blend between profiles
|
|
107
|
+
- [ ] **Thread** — cosmetic + modeled threads
|
|
108
|
+
- [ ] **Sheet metal tools** — flange, bend, hem, fold, flat pattern, K-factor
|
|
109
|
+
- [ ] **Work features** — construction planes, axes, points
|
|
110
|
+
- [ ] **3D sketch** — sketch in 3D space, not just on planes
|
|
111
|
+
- [ ] **Direct edit** — push/pull faces without feature tree
|
|
112
|
+
- [ ] **Hole wizard** — counterbore, countersink, tapped holes with standard sizes
|
|
113
|
+
|
|
114
|
+
### Phase 6: Assembly Modeling
|
|
115
|
+
- [ ] **Assembly workspace** — place components, define joints
|
|
116
|
+
- [ ] **Joint types** — rigid, revolute, slider, cylindrical, planar, ball
|
|
117
|
+
- [ ] **Mate constraints** — Inventor-style mates (compatible with parsed .iam data)
|
|
118
|
+
- [ ] **Motion simulation** — animate joints, check interference
|
|
119
|
+
- [ ] **Exploded views** — automatic + manual explosion
|
|
120
|
+
- [ ] **Assembly BOM** — auto-generated from tree, export to CSV/Excel
|
|
121
|
+
- [ ] **Cross-references** — "where used" for any part
|
|
122
|
+
|
|
123
|
+
### Phase 7: AI-Powered Features
|
|
124
|
+
- [ ] **AI sketch-to-3D** — describe a part in words → get a parametric model
|
|
125
|
+
- [ ] **Smart autocomplete** — predict next operation based on context
|
|
126
|
+
- [ ] **Part recognition** — upload photo → identify standard part → suggest McMaster-Carr
|
|
127
|
+
- [ ] **Design validation** — check for manufacturability issues
|
|
128
|
+
- [ ] **Cost estimation** — estimate manufacturing cost from geometry + material
|
|
129
|
+
- [ ] **Natural language editing** — "make the hole 2mm larger" → parametric change
|
|
130
|
+
- [ ] **Assembly instructions** — auto-generate step-by-step from assembly tree
|
|
131
|
+
- [ ] **Maintenance scheduling** — predict part wear from material + usage patterns
|
|
132
|
+
|
|
133
|
+
### Phase 8: Manufacturing Integration
|
|
134
|
+
- [ ] **DXF/DWG export** — 2D drawings from 3D models
|
|
135
|
+
- [ ] **STEP export** — via OpenCascade.js or server-side
|
|
136
|
+
- [ ] **3D print slicer** — built-in G-code generation
|
|
137
|
+
- [ ] **CNC toolpath** — basic 2.5D milling paths
|
|
138
|
+
- [ ] **Laser/waterjet** — flat pattern → DXF for cutting
|
|
139
|
+
- [ ] **Kiri:Moto integration** — send to Kiri for advanced slicing
|
|
140
|
+
- [ ] **McMaster-Carr links** — direct purchase links for standard parts
|
|
141
|
+
- [ ] **Tolerance analysis** — GD&T annotations
|
|
142
|
+
|
|
143
|
+
### Phase 9: Collaboration & Sharing
|
|
144
|
+
- [ ] **Real-time collaboration** — multiple users editing same model (WebRTC)
|
|
145
|
+
- [ ] **Version control** — git-like branching for design iterations
|
|
146
|
+
- [ ] **Comments/annotations** — pin notes to features/faces
|
|
147
|
+
- [ ] **Share links** — public URL for any model
|
|
148
|
+
- [ ] **Embed widget** — `<iframe>` embed for websites/docs
|
|
149
|
+
- [ ] **PDF reports** — auto-generate technical documentation
|
|
150
|
+
|
|
151
|
+
### Phase 10: Platform
|
|
152
|
+
- [ ] **Plugin API** — extend cycleCAD with custom tools
|
|
153
|
+
- [ ] **Model library** — browse/search community models
|
|
154
|
+
- [ ] **Template gallery** — start from common templates
|
|
155
|
+
- [ ] **Multi-language** — EN, DE, FR, ES, IT, NL (already in ExplodeView)
|
|
156
|
+
- [ ] **Mobile/tablet** — responsive touch UI
|
|
157
|
+
- [ ] **PWA** — installable, works offline
|
|
158
|
+
- [ ] **Desktop app** — Electron wrapper for local file access
|
|
159
|
+
|
|
160
|
+
## Tech Stack
|
|
161
|
+
- **Rendering**: Three.js r170 (WebGL)
|
|
162
|
+
- **Geometry**: Custom + BufferGeometryUtils
|
|
163
|
+
- **File parsing**: Custom OLE2/CFB parser (zero deps)
|
|
164
|
+
- **AI**: Gemini Flash API + Groq (Llama 3.1 8B) + local NLP fallback
|
|
165
|
+
- **Hosting**: GitHub Pages (cyclecad.com)
|
|
166
|
+
- **Package**: npm `cyclecad`
|
|
167
|
+
- **License**: MIT
|
|
168
|
+
|
|
169
|
+
## Metrics (Current)
|
|
170
|
+
- npm: cyclecad v0.1.3
|
|
171
|
+
- 15 JS modules, ~10,000+ lines
|
|
172
|
+
- 482 real Inventor files in example project
|
|
173
|
+
- 393 .ipt parts, 80 .iam assemblies
|
|
174
|
+
- Zero dependencies (CDN only)
|
|
175
|
+
|
|
176
|
+
## What Makes cycleCAD Different
|
|
177
|
+
1. **Opens existing Inventor projects** — no other browser CAD does this
|
|
178
|
+
2. **Reverse engineers parts** — generates rebuild guides for Fusion 360 + cycleCAD
|
|
179
|
+
3. **AI-native** — not bolted on, integrated from day 1
|
|
180
|
+
4. **Zero install** — open a URL, start working
|
|
181
|
+
5. **Open source** — MIT license, community-driven
|
|
182
|
+
6. **Real-world tested** — built for the cycleWASH DUO (473 parts, production machine)
|