cyclecad 3.4.0 → 3.6.0

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 CHANGED
@@ -799,5 +799,159 @@ rm -f ~/[repo]/.git/HEAD.lock ~/[repo]/.git/index.lock && cd ~/[repo] && git add
799
799
  | Gone for hours | User leaves for hours expecting autonomous work. Build everything, commit, provide push commands. |
800
800
  | Short confirmations | "ok", "i did", terminal output pasted = confirmation that git commands were run |
801
801
 
802
+ ## Session 2026-03-31 — Full Fusion 360 Parity + Killer Features + Tests + npm
803
+
804
+ ### What was built (massive session):
805
+
806
+ #### 10 Fusion 360-Parity Modules (~10,000 lines total)
807
+ | Module | Lines | What |
808
+ |--------|-------|------|
809
+ | `app/js/modules/fusion-sketch.js` | 1,044 | 13 sketch tools, 12 constraints, iterative solver, grid snap |
810
+ | `app/js/modules/fusion-solid.js` | 1,095 | 16 solid ops (extrude/revolve/sweep/loft/hole/thread/fillet/chamfer/shell/draft/scale/combine/split/mirror/pattern) |
811
+ | `app/js/modules/fusion-surface.js` | 949 | 13 surface ops, T-spline sculpt, NURBS, DoubleSide |
812
+ | `app/js/modules/fusion-assembly.js` | 1,200 | 7 joint types, motion study, explode, interference, contact sets |
813
+ | `app/js/modules/fusion-cam.js` | 1,200 | 22 CAM ops, tool library 20+ tools, G-code (Fanuc/GRBL/LinuxCNC), feeds+speeds |
814
+ | `app/js/modules/fusion-drawing.js` | 1,000 | 6 paper sizes, 5 view types, GD&T, title blocks, BOM, PDF/DXF export |
815
+ | `app/js/modules/fusion-render.js` | 800 | 100+ PBR materials, 4 HDRI envs, decals, turntable, storyboard animation |
816
+ | `app/js/modules/fusion-simulation.js` | 1,200 | FEA (Von Mises), thermal, modal frequency, buckling, shape optimization |
817
+ | `app/js/modules/fusion-inspection.js` | 800 | Measure, section, curvature, draft, zebra, accessibility, interference |
818
+ | `app/js/modules/fusion-data.js` | 800 | Version control, import/export 20+ formats, share links, team mgmt, IndexedDB |
819
+
820
+ #### 10 Killer Features (killer-features.js, 1,508 lines)
821
+ 1. AI Design Copilot — NL to CAD geometry
822
+ 2. Physics Simulation — drop test + stress heatmap
823
+ 3. Generative Design — topology optimization
824
+ 4. Real-time Cost Estimator — CNC/3DP/injection pricing
825
+ 5. Smart Snap & Auto-Dimension
826
+ 6. Version Control Visual Diff — git-like CAD branching
827
+ 7. Parametric Table — Excel-like with formulas
828
+ 8. Smart Assembly Mating — drag-to-snap
829
+ 9. Manufacturing Drawings Generator — ISO 128
830
+ 10. Digital Twin Live Data — IoT sensor overlay
831
+
832
+ #### 5 ExplodeView Killer Features (2,847 lines added to app.js)
833
+ 1. AR Mode with Plane Detection (WebXR)
834
+ 2. AI Part Narrator (geometry-based analysis)
835
+ 3. Animated Assembly Instructions (IKEA-style)
836
+ 4. Collaborative Annotations (3D notes, localStorage)
837
+ 5. Smart Part Search (NL spatial fuzzy matching)
838
+
839
+ #### ExplodeView Bug Fixes
840
+ - Home button added to right sidebar
841
+ - Grid toggle button added and working
842
+ - Right sidebar scrollable
843
+ - Cache bust v=300
844
+
845
+ #### Critical Fixes
846
+ - Canvas resolution fixed (300x150 → full viewport via immediate resizeViewport() call)
847
+ - killer-features.js wired into app/index.html
848
+ - token-engine.js wired into app/index.html
849
+ - marketplace.js wired into app/index.html
850
+ - ExplodeView route redirects created (root → /docs/, /app/ → /demo/)
851
+ - Version bumped to v3.4.0
852
+
853
+ #### Test Suites (103 tests across 5 suites)
854
+ | File | Tests | Covers |
855
+ |------|-------|--------|
856
+ | `app/tests/fusion-sketch-tests.html` | 30 | All sketch tools + constraints |
857
+ | `app/tests/fusion-solid-tests.html` | 22 | All solid operations |
858
+ | `app/tests/fusion-assembly-tests.html` | 17 | All joint types + analysis |
859
+ | `app/tests/fusion-cam-tests.html` | 17 | CAM setup + toolpaths + G-code |
860
+ | `app/tests/fusion-simulation-tests.html` | 17 | FEA + thermal + modal + buckling |
861
+ | `app/tests/fusion-all-tests.html` | master | Aggregates all 5 suites |
862
+ | `app/tests/index.html` | hub | Landing page with links + stats |
863
+
864
+ #### Docker Test Infrastructure
865
+ | File | What |
866
+ |------|------|
867
+ | `scripts/docker-health-check.sh` | Quick 3-5s health verification, colored output |
868
+ | `scripts/integration-test.sh` | 20+ tests, JUnit XML output |
869
+ | `app/tests/docker-integration-test.html` | Browser-based service test dashboard |
870
+
871
+ #### Comprehensive Documentation
872
+ | File | Lines | What |
873
+ |------|-------|------|
874
+ | `docs/FUSION-FEATURES-GUIDE.md` | ~2000 | Complete reference for all Fusion parity features |
875
+ | `docs/FUSION-TUTORIAL.md` | ~1500 | 30 step-by-step tutorials (beginner→advanced) |
876
+ | `docs/API-REFERENCE.md` | ~1000 | 55+ Agent API commands, 9 namespaces |
877
+ | `docs/KEYBOARD-SHORTCUTS.md` | 100+ | Every shortcut across all workspaces |
878
+ | `app/js/fusion-help.json` | 140+ entries | Searchable help database |
879
+ | `architecture-dashboard.html` | ~2000 | 5-tab interactive dashboard (arch/features/fusion comparison/todos/stats) |
880
+
881
+ #### Live Site Status (tested via Chrome MCP)
882
+ - **cyclecad.com/app/** — ✅ Working, full CAD UI, v0.9.0
883
+ - **explodeview.com** — ✅ HTTPS working, landing page good
884
+ - **explodeview.com/docs/demo/** — ❌ 404 (redirects created, needs push)
885
+
886
+ #### npm Versions
887
+ - cyclecad: v3.4.0 (committed, needs push + publish)
888
+ - explodeview: v1.0.18 (v1.0.17 published, v1.0.18 bumped)
889
+
890
+ ### Pending Push Commands
891
+ **cycleCAD:**
892
+ ```bash
893
+ rm -f ~/cyclecad/.git/index.lock ~/cyclecad/.git/HEAD.lock && cd ~/cyclecad && git add app/js/modules/fusion-sketch.js app/js/modules/fusion-solid.js app/js/modules/fusion-surface.js app/js/modules/fusion-assembly.js app/js/modules/fusion-cam.js app/js/modules/fusion-drawing.js app/js/modules/fusion-render.js app/js/modules/fusion-simulation.js app/js/modules/fusion-inspection.js app/js/modules/fusion-data.js app/js/fusion-help.json app/index.html package.json app/tests/fusion-sketch-tests.html app/tests/fusion-solid-tests.html app/tests/fusion-assembly-tests.html app/tests/fusion-cam-tests.html app/tests/fusion-simulation-tests.html app/tests/fusion-all-tests.html app/tests/index.html app/tests/FUSION_TEST_SUITE.md app/tests/TEST_SUITE_SUMMARY.txt docs/FUSION-FEATURES-GUIDE.md docs/FUSION-TUTORIAL.md docs/KEYBOARD-SHORTCUTS.md docs/API-REFERENCE.md docs/architecture-dashboard.html architecture-dashboard.html && git commit -m "v3.4.0: Full Fusion 360 feature parity - 10 modules, 103 tests, complete docs" && git push origin main && npm publish
894
+ ```
895
+
896
+ **ExplodeView:**
897
+ ```bash
898
+ rm -f ~/explodeview/.git/index.lock ~/explodeview/.git/HEAD.lock && cd ~/explodeview && git add index.html docs/app/ && git commit -m "Add route redirects" && git push origin main
899
+ ```
900
+
901
+ ### Next Killer Features to Build (discussed)
902
+ 1. **Text-to-CAD with Live Preview** — type description → geometry materializes in real-time
903
+ 2. **Photo-to-CAD Reverse Engineering** — phone photo → parametric model
904
+ 3. **Instant Manufacturability Feedback** — live DFM warnings as you model
905
+ 4. **Multi-Physics Real-Time** — GPU-accelerated instant FEA (WebGPU)
906
+ 5. **Smart Part Library with AI Search** — unified McMaster/Misumi/RS search
907
+ 6. **Collaborative Design Review in AR** — multi-user WebXR walk-around
908
+ 7. **Automatic Assembly from Parts** — AI geometry matching for auto-mating
909
+ 8. **Parametric from Example** — infer constraints from 2 design variants
910
+ 9. **Built-in CNC/3D Printer Control** — direct machine connection from browser
911
+ 10. **Engineering Notebook with AI** — auto-log every design decision
912
+
913
+ ## Key Files (Updated v3.4.0)
914
+ | File | Lines | What |
915
+ |------|-------|------|
916
+ | `app/index.html` | ~1,845 | Main app with Fusion 360 clone UI, Three.js viewport, all modules wired |
917
+ | `app/js/app.js` | 21,340 | Main JS (all features, tree, selection, tools) |
918
+ | `app/js/killer-features.js` | 1,508 | 10 killer differentiator features |
919
+ | `app/js/modules/fusion-*.js` | ~10,000 | 10 Fusion 360-parity modules |
920
+ | `app/js/token-engine.js` | 743 | $CYCLE Token Engine |
921
+ | `app/js/marketplace.js` | 1,994 | Model Marketplace |
922
+ | `app/js/fusion-help.json` | 140+ entries | Searchable help |
923
+ | `server/mcp-server.js` | 1,161 | MCP Server — 55+ commands |
924
+ | `server/api-server.js` | 1,120 | REST API — HTTP + WebSocket |
925
+ | `server/converter.py` | 500+ | FastAPI STEP→GLB server |
926
+ | `bin/cyclecad-cli.js` | 662 | CLI tool — REPL + batch mode |
927
+ | `architecture-dashboard.html` | ~2000 | 5-tab interactive dashboard |
928
+ | `docs/FUSION-FEATURES-GUIDE.md` | ~2000 | Complete feature reference |
929
+ | `docs/FUSION-TUTORIAL.md` | ~1500 | 30 tutorials |
930
+ | `docs/API-REFERENCE.md` | ~1000 | Full API reference |
931
+ | `package.json` | — | v3.4.0 |
932
+
933
+ ## Total Code Stats (v3.4.0)
934
+ - **cycleCAD app.js**: 21,340 lines
935
+ - **Fusion modules**: ~10,000 lines (10 files)
936
+ - **Killer features**: 1,508 lines
937
+ - **Token engine + marketplace**: 2,737 lines
938
+ - **MCP + REST + CLI**: 2,943 lines
939
+ - **Test suites**: ~4,000 lines (103 tests)
940
+ - **Documentation**: ~7,000 lines
941
+ - **Total project**: ~70,000+ lines
942
+
943
+ ## Near-term Tasks (Updated 2026-03-31)
944
+ - [ ] Push v3.4.0 to GitHub (command above)
945
+ - [ ] npm publish cyclecad v3.4.0
946
+ - [ ] Push ExplodeView route redirects
947
+ - [ ] Run test agents in Chrome and fix failures
948
+ - [ ] Test B-Rep live (OpenCascade.js WASM)
949
+ - [ ] Test STEP import with 138MB file
950
+ - [ ] Docker compose local test
951
+ - [ ] Post LinkedIn announcement
952
+ - [ ] Build Text-to-CAD with Live Preview
953
+ - [ ] Build Photo-to-CAD Reverse Engineering
954
+ - [ ] Build Instant Manufacturability Feedback
955
+
802
956
  # currentDate
803
- Today's date is 2026-03-26.
957
+ Today's date is 2026-03-31.
package/app/index.html CHANGED
@@ -966,6 +966,10 @@
966
966
  <button class="menu-item-link" data-action="tools-addins">Add-ins...</button>
967
967
  <button class="menu-item-link" data-action="tools-marketplace">Marketplace...</button>
968
968
  <div class="menu-separator"></div>
969
+ <button class="menu-item-link" data-action="tools-text-to-cad">Text-to-CAD (AI)</button>
970
+ <button class="menu-item-link" data-action="tools-photo-to-cad">Photo-to-CAD</button>
971
+ <button class="menu-item-link" data-action="tools-dfm">Manufacturability Check</button>
972
+ <div class="menu-separator"></div>
969
973
  <button class="menu-item-link" data-action="tools-settings">Settings...</button>
970
974
  </div>
971
975
  </div>
@@ -1366,6 +1370,11 @@
1366
1370
  <script src="js/token-engine.js"></script>
1367
1371
  <script src="js/marketplace.js"></script>
1368
1372
 
1373
+ <!-- Killer Feature Modules -->
1374
+ <script src="js/modules/text-to-cad.js"></script>
1375
+ <script src="js/modules/photo-to-cad.js"></script>
1376
+ <script src="js/modules/manufacturability.js"></script>
1377
+
1369
1378
  <script type="module">
1370
1379
  // ===== Three.js Imports =====
1371
1380
  import * as THREE from 'three';
@@ -1533,6 +1542,30 @@
1533
1542
  case 'help-about':
1534
1543
  showDialog('About cycleCAD', 'cycleCAD v0.9.0 - Fusion 360 Clone<br>Open-source parametric 3D CAD modeler<br><br>Built with Three.js, supporting STEP/IGES import, full parametric modeling, and AI-powered design assistance.');
1535
1544
  break;
1545
+ case 'tools-text-to-cad':
1546
+ if (window.CycleCAD && window.CycleCAD.TextToCAD) {
1547
+ const ttcPanel = window.CycleCAD.TextToCAD.getUI();
1548
+ showDialog('Text-to-CAD (AI)', '');
1549
+ const dlg = document.querySelector('.dialog-content');
1550
+ if (dlg) { dlg.innerHTML = ''; dlg.appendChild(ttcPanel); dlg.style.maxHeight = '500px'; dlg.style.overflow = 'auto'; }
1551
+ }
1552
+ break;
1553
+ case 'tools-photo-to-cad':
1554
+ if (window.CycleCAD && window.CycleCAD.PhotoToCAD) {
1555
+ const ptcPanel = window.CycleCAD.PhotoToCAD.getUI();
1556
+ showDialog('Photo-to-CAD', '');
1557
+ const dlg2 = document.querySelector('.dialog-content');
1558
+ if (dlg2) { dlg2.innerHTML = ''; dlg2.appendChild(ptcPanel); dlg2.style.maxHeight = '500px'; dlg2.style.overflow = 'auto'; }
1559
+ }
1560
+ break;
1561
+ case 'tools-dfm':
1562
+ if (window.CycleCAD && window.CycleCAD.Manufacturability) {
1563
+ const dfmPanel = window.CycleCAD.Manufacturability.getUI();
1564
+ showDialog('Manufacturability Check', '');
1565
+ const dlg3 = document.querySelector('.dialog-content');
1566
+ if (dlg3) { dlg3.innerHTML = ''; dlg3.appendChild(dfmPanel); dlg3.style.maxHeight = '500px'; dlg3.style.overflow = 'auto'; }
1567
+ }
1568
+ break;
1536
1569
  default:
1537
1570
  showToast(`${action}`, 'success');
1538
1571
  }
@@ -1838,6 +1871,24 @@
1838
1871
 
1839
1872
  // Token engine and marketplace are auto-initialized via global scripts
1840
1873
  // They expose APIs at window.cycleCAD.tokens, window.cycleCAD.marketplace
1874
+
1875
+ // Initialize Text-to-CAD module
1876
+ if (window.CycleCAD && window.CycleCAD.TextToCAD) {
1877
+ window.CycleCAD.TextToCAD.init(scene, renderer);
1878
+ console.log('[cycleCAD] Text-to-CAD module initialized');
1879
+ }
1880
+
1881
+ // Initialize Photo-to-CAD module
1882
+ if (window.CycleCAD && window.CycleCAD.PhotoToCAD) {
1883
+ window.CycleCAD.PhotoToCAD.init();
1884
+ console.log('[cycleCAD] Photo-to-CAD module initialized');
1885
+ }
1886
+
1887
+ // Initialize Manufacturability module
1888
+ if (window.CycleCAD && window.CycleCAD.Manufacturability) {
1889
+ window.CycleCAD.Manufacturability.init(scene);
1890
+ console.log('[cycleCAD] Manufacturability (DFM) module initialized');
1891
+ }
1841
1892
  }
1842
1893
 
1843
1894
  // ===== Export Global Functions =====