cyclecad 1.0.7 → 1.0.9
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 +5 -5
- package/app/js/ai-copilot.js +6 -4
- package/package.json +1 -1
package/app/index.html
CHANGED
|
@@ -1419,7 +1419,7 @@
|
|
|
1419
1419
|
<span class="splash-logo-cycle">cycle</span><span class="splash-logo-cad">CAD</span>
|
|
1420
1420
|
</div>
|
|
1421
1421
|
<p class="splash-subtitle">Parametric 3D CAD Modeler for the Mechanical Designer</p>
|
|
1422
|
-
<p style="display:inline-block; color:#0066cc; font-size:1rem; margin:12px 0 0 0; letter-spacing:2px; font-family:monospace; font-weight:700; background:rgba(0,102,204,0.08); border:1.5px solid rgba(0,102,204,0.25); border-radius:8px; padding:5px 20px;">v1.0.
|
|
1422
|
+
<p style="display:inline-block; color:#0066cc; font-size:1rem; margin:12px 0 0 0; letter-spacing:2px; font-family:monospace; font-weight:700; background:rgba(0,102,204,0.08); border:1.5px solid rgba(0,102,204,0.25); border-radius:8px; padding:5px 20px;">v1.0.9</p>
|
|
1423
1423
|
</div>
|
|
1424
1424
|
<div class="splash-options">
|
|
1425
1425
|
<button class="splash-button splash-button-primary" id="btn-empty-project" style="grid-column: 1 / -1;">
|
|
@@ -2906,8 +2906,8 @@
|
|
|
2906
2906
|
const mesh = result.mesh || result;
|
|
2907
2907
|
// Apply position offset for multi-item placement (e.g., 4 holes around a part)
|
|
2908
2908
|
if (pParams._offsetX || pParams._offsetZ) {
|
|
2909
|
-
mesh.position.x += (pParams._offsetX || 0)
|
|
2910
|
-
mesh.position.z += (pParams._offsetZ || 0)
|
|
2909
|
+
mesh.position.x += (pParams._offsetX || 0);
|
|
2910
|
+
mesh.position.z += (pParams._offsetZ || 0);
|
|
2911
2911
|
}
|
|
2912
2912
|
addToScene(mesh);
|
|
2913
2913
|
if (result.wireframe) addToScene(result.wireframe);
|
|
@@ -3559,7 +3559,7 @@
|
|
|
3559
3559
|
init();
|
|
3560
3560
|
}
|
|
3561
3561
|
|
|
3562
|
-
window.cycleCAD = Object.assign(window.cycleCAD || {}, { version: '1.0.
|
|
3562
|
+
window.cycleCAD = Object.assign(window.cycleCAD || {}, { version: '1.0.8', APP, init });
|
|
3563
3563
|
|
|
3564
3564
|
// Expose dialog functions globally so inline onclick="" handlers work
|
|
3565
3565
|
window.openDialog = openDialog;
|
|
@@ -5272,6 +5272,6 @@
|
|
|
5272
5272
|
</div>
|
|
5273
5273
|
</div>
|
|
5274
5274
|
|
|
5275
|
-
<span id="version-badge" style="position:fixed;bottom:42px;left:50%;transform:translateX(-50%);z-index:999;font-size:0.9rem;color:rgba(255,255,255,0.9);letter-spacing:0.1em;white-space:nowrap;padding:6px 16px;user-select:all;pointer-events:auto;font-family:monospace;font-weight:700;background:rgba(0,0,0,0.7);border:1px solid rgba(88,166,255,0.4);border-radius:6px;text-shadow:0 1px 3px rgba(0,0,0,0.5);" title="cycleCAD version">cycleCAD v1.0.
|
|
5275
|
+
<span id="version-badge" style="position:fixed;bottom:42px;left:50%;transform:translateX(-50%);z-index:999;font-size:0.9rem;color:rgba(255,255,255,0.9);letter-spacing:0.1em;white-space:nowrap;padding:6px 16px;user-select:all;pointer-events:auto;font-family:monospace;font-weight:700;background:rgba(0,0,0,0.7);border:1px solid rgba(88,166,255,0.4);border-radius:6px;text-shadow:0 1px 3px rgba(0,0,0,0.5);" title="cycleCAD version">cycleCAD v1.0.9</span>
|
|
5276
5276
|
</body>
|
|
5277
5277
|
</html>
|
package/app/js/ai-copilot.js
CHANGED
|
@@ -820,13 +820,14 @@ function parseOperations(text, numbers) {
|
|
|
820
820
|
const commands = [];
|
|
821
821
|
|
|
822
822
|
// Holes
|
|
823
|
-
if (text.match(/hole|bore|drill/i)) {
|
|
823
|
+
if (text.match(/hole|bore|drill|mounting/i)) {
|
|
824
824
|
const holeRadius = text.match(/(\d+)\s*mm\s*hole/) ? parseFloat(RegExp.$1) / 2 : 5;
|
|
825
|
-
const
|
|
825
|
+
const countMatch = text.match(/(\d+)\s*(?:mounting\s+)?holes?/i) || text.match(/(\d+)\s+\w*\s*holes?/i);
|
|
826
|
+
const count = countMatch ? parseInt(countMatch[1]) : 1;
|
|
826
827
|
|
|
827
828
|
commands.push({
|
|
828
829
|
method: 'feature.hole',
|
|
829
|
-
params: { radius: holeRadius, count },
|
|
830
|
+
params: { radius: holeRadius, depth: 100, count },
|
|
830
831
|
});
|
|
831
832
|
}
|
|
832
833
|
|
|
@@ -955,7 +956,8 @@ export async function executeTextCommand(prompt) {
|
|
|
955
956
|
// Offset multiple items so they don't stack
|
|
956
957
|
if (count > 1) {
|
|
957
958
|
const angle = (ci / count) * Math.PI * 2;
|
|
958
|
-
|
|
959
|
+
// Spread holes across the cube face — SCALE is 0.1 so multiply by that
|
|
960
|
+
const spread = (p.radius || 5) * 3 * 0.1;
|
|
959
961
|
p._offsetX = Math.cos(angle) * spread;
|
|
960
962
|
p._offsetZ = Math.sin(angle) * spread;
|
|
961
963
|
}
|
package/package.json
CHANGED