cyclecad 3.5.0 → 3.7.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/app/index.html CHANGED
@@ -966,6 +966,13 @@
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
+ <button class="menu-item-link" data-action="tools-generative">Generative Design</button>
973
+ <button class="menu-item-link" data-action="tools-physics">Multi-Physics Simulation</button>
974
+ <button class="menu-item-link" data-action="tools-parts">Smart Parts Library</button>
975
+ <div class="menu-separator"></div>
969
976
  <button class="menu-item-link" data-action="tools-settings">Settings...</button>
970
977
  </div>
971
978
  </div>
@@ -1366,6 +1373,14 @@
1366
1373
  <script src="js/token-engine.js"></script>
1367
1374
  <script src="js/marketplace.js"></script>
1368
1375
 
1376
+ <!-- Killer Feature Modules -->
1377
+ <script src="js/modules/text-to-cad.js"></script>
1378
+ <script src="js/modules/photo-to-cad.js"></script>
1379
+ <script src="js/modules/manufacturability.js"></script>
1380
+ <script src="js/modules/generative-design.js"></script>
1381
+ <script src="js/modules/multi-physics.js"></script>
1382
+ <script src="js/modules/smart-parts.js"></script>
1383
+
1369
1384
  <script type="module">
1370
1385
  // ===== Three.js Imports =====
1371
1386
  import * as THREE from 'three';
@@ -1533,6 +1548,54 @@
1533
1548
  case 'help-about':
1534
1549
  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
1550
  break;
1551
+ case 'tools-text-to-cad':
1552
+ if (window.CycleCAD && window.CycleCAD.TextToCAD) {
1553
+ const ttcPanel = window.CycleCAD.TextToCAD.getUI();
1554
+ showDialog('Text-to-CAD (AI)', '');
1555
+ const dlg = document.querySelector('.dialog-content');
1556
+ if (dlg) { dlg.innerHTML = ''; dlg.appendChild(ttcPanel); dlg.style.maxHeight = '500px'; dlg.style.overflow = 'auto'; }
1557
+ }
1558
+ break;
1559
+ case 'tools-photo-to-cad':
1560
+ if (window.CycleCAD && window.CycleCAD.PhotoToCAD) {
1561
+ const ptcPanel = window.CycleCAD.PhotoToCAD.getUI();
1562
+ showDialog('Photo-to-CAD', '');
1563
+ const dlg2 = document.querySelector('.dialog-content');
1564
+ if (dlg2) { dlg2.innerHTML = ''; dlg2.appendChild(ptcPanel); dlg2.style.maxHeight = '500px'; dlg2.style.overflow = 'auto'; }
1565
+ }
1566
+ break;
1567
+ case 'tools-dfm':
1568
+ if (window.CycleCAD && window.CycleCAD.Manufacturability) {
1569
+ const dfmPanel = window.CycleCAD.Manufacturability.getUI();
1570
+ showDialog('Manufacturability Check', '');
1571
+ const dlg3 = document.querySelector('.dialog-content');
1572
+ if (dlg3) { dlg3.innerHTML = ''; dlg3.appendChild(dfmPanel); dlg3.style.maxHeight = '500px'; dlg3.style.overflow = 'auto'; }
1573
+ }
1574
+ break;
1575
+ case 'tools-generative':
1576
+ if (window.CycleCAD && window.CycleCAD.GenerativeDesign) {
1577
+ const genPanel = window.CycleCAD.GenerativeDesign.getUI();
1578
+ showDialog('Generative Design', '');
1579
+ const dlg4 = document.querySelector('.dialog-content');
1580
+ if (dlg4) { dlg4.innerHTML = ''; dlg4.appendChild(genPanel); dlg4.style.maxHeight = '500px'; dlg4.style.overflow = 'auto'; }
1581
+ }
1582
+ break;
1583
+ case 'tools-physics':
1584
+ if (window.CycleCAD && window.CycleCAD.MultiPhysics) {
1585
+ const physPanel = window.CycleCAD.MultiPhysics.getUI();
1586
+ showDialog('Multi-Physics Simulation', '');
1587
+ const dlg5 = document.querySelector('.dialog-content');
1588
+ if (dlg5) { dlg5.innerHTML = ''; dlg5.appendChild(physPanel); dlg5.style.maxHeight = '500px'; dlg5.style.overflow = 'auto'; }
1589
+ }
1590
+ break;
1591
+ case 'tools-parts':
1592
+ if (window.CycleCAD && window.CycleCAD.SmartParts) {
1593
+ const partsPanel = window.CycleCAD.SmartParts.getUI();
1594
+ showDialog('Smart Parts Library', '');
1595
+ const dlg6 = document.querySelector('.dialog-content');
1596
+ if (dlg6) { dlg6.innerHTML = ''; dlg6.appendChild(partsPanel); dlg6.style.maxHeight = '500px'; dlg6.style.overflow = 'auto'; }
1597
+ }
1598
+ break;
1536
1599
  default:
1537
1600
  showToast(`${action}`, 'success');
1538
1601
  }
@@ -1838,6 +1901,42 @@
1838
1901
 
1839
1902
  // Token engine and marketplace are auto-initialized via global scripts
1840
1903
  // They expose APIs at window.cycleCAD.tokens, window.cycleCAD.marketplace
1904
+
1905
+ // Initialize Text-to-CAD module
1906
+ if (window.CycleCAD && window.CycleCAD.TextToCAD) {
1907
+ window.CycleCAD.TextToCAD.init(scene, renderer);
1908
+ console.log('[cycleCAD] Text-to-CAD module initialized');
1909
+ }
1910
+
1911
+ // Initialize Photo-to-CAD module
1912
+ if (window.CycleCAD && window.CycleCAD.PhotoToCAD) {
1913
+ window.CycleCAD.PhotoToCAD.init();
1914
+ console.log('[cycleCAD] Photo-to-CAD module initialized');
1915
+ }
1916
+
1917
+ // Initialize Manufacturability module
1918
+ if (window.CycleCAD && window.CycleCAD.Manufacturability) {
1919
+ window.CycleCAD.Manufacturability.init(scene);
1920
+ console.log('[cycleCAD] Manufacturability (DFM) module initialized');
1921
+ }
1922
+
1923
+ // Initialize Generative Design module
1924
+ if (window.CycleCAD && window.CycleCAD.GenerativeDesign) {
1925
+ window.CycleCAD.GenerativeDesign.init(scene);
1926
+ console.log('[cycleCAD] Generative Design module initialized');
1927
+ }
1928
+
1929
+ // Initialize Multi-Physics module
1930
+ if (window.CycleCAD && window.CycleCAD.MultiPhysics) {
1931
+ window.CycleCAD.MultiPhysics.init(scene);
1932
+ console.log('[cycleCAD] Multi-Physics simulation module initialized');
1933
+ }
1934
+
1935
+ // Initialize Smart Parts Library
1936
+ if (window.CycleCAD && window.CycleCAD.SmartParts) {
1937
+ window.CycleCAD.SmartParts.init(scene);
1938
+ console.log('[cycleCAD] Smart Parts Library initialized');
1939
+ }
1841
1940
  }
1842
1941
 
1843
1942
  // ===== Export Global Functions =====