cyclecad 2.0.0 → 2.1.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/IMPLEMENTATION_GUIDE.md +502 -0
- package/INTEGRATION-GUIDE.md +377 -0
- package/MODULES_PHASES_6_7.md +780 -0
- package/app/index.html +106 -2
- package/app/js/brep-kernel.js +1353 -455
- package/app/js/help-module.js +1437 -0
- package/app/js/kernel.js +364 -40
- package/app/js/modules/animation-module.js +967 -0
- package/app/js/modules/assembly-module.js +47 -3
- package/app/js/modules/cam-module.js +1067 -0
- package/app/js/modules/collaboration-module.js +1102 -0
- package/app/js/modules/data-module.js +1656 -0
- package/app/js/modules/drawing-module.js +54 -8
- package/app/js/modules/formats-module.js +1173 -0
- package/app/js/modules/inspection-module.js +937 -0
- package/app/js/modules/mesh-module.js +968 -0
- package/app/js/modules/operations-module.js +40 -7
- package/app/js/modules/plugin-module.js +957 -0
- package/app/js/modules/rendering-module.js +1306 -0
- package/app/js/modules/scripting-module.js +955 -0
- package/app/js/modules/simulation-module.js +60 -3
- package/app/js/modules/sketch-module.js +1032 -90
- package/app/js/modules/step-module.js +47 -6
- package/app/js/modules/surface-module.js +728 -0
- package/app/js/modules/version-module.js +1410 -0
- package/app/js/modules/viewport-module.js +95 -8
- package/app/test-agent-v2.html +881 -1316
- package/docs/ARCHITECTURE.html +838 -1408
- package/docs/DEVELOPER-GUIDE.md +1504 -0
- package/docs/TUTORIAL.md +740 -0
- package/package.json +1 -1
- package/.github/scripts/cad-diff.js +0 -590
- package/.github/workflows/cad-diff.yml +0 -117
package/docs/TUTORIAL.md
ADDED
|
@@ -0,0 +1,740 @@
|
|
|
1
|
+
# cycleCAD Getting Started Tutorial
|
|
2
|
+
|
|
3
|
+
A friendly, step-by-step guide to learning cycleCAD from zero to building your first 3D parts, assemblies, and drawings.
|
|
4
|
+
|
|
5
|
+
**Time to complete:** ~45 minutes
|
|
6
|
+
|
|
7
|
+
**Prerequisites:** Nothing — cycleCAD runs in your browser.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Part 1: Your First 3D Part (5 minutes)
|
|
12
|
+
|
|
13
|
+
Learn the fundamentals: sketch → extrude → fillet → export.
|
|
14
|
+
|
|
15
|
+
### Step 1.1: Open the App
|
|
16
|
+
|
|
17
|
+
Navigate to:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
https://cyclecad.com/app
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
You'll see:
|
|
24
|
+
- **Left panel:** Feature tree (currently empty)
|
|
25
|
+
- **Center:** 3D viewport with grid floor
|
|
26
|
+
- **Right panel:** Properties, Chat, Help tabs
|
|
27
|
+
|
|
28
|
+
### Step 1.2: Create a New Part
|
|
29
|
+
|
|
30
|
+
Click **File → New Part** (or press `Ctrl+N`)
|
|
31
|
+
|
|
32
|
+
The app is ready for your first feature.
|
|
33
|
+
|
|
34
|
+
### Step 1.3: Sketch a Rectangle
|
|
35
|
+
|
|
36
|
+
The sketch is active (you're in 2D mode, shown at bottom).
|
|
37
|
+
|
|
38
|
+
1. Click the **Rectangle** tool (right panel, Sketch tab)
|
|
39
|
+
2. Click and drag to create a rectangle:
|
|
40
|
+
- Start at: `0, 0`
|
|
41
|
+
- Drag to: `100, 50`
|
|
42
|
+
3. You should see a blue rectangle on the grid
|
|
43
|
+
|
|
44
|
+
Your sketch now has one entity: a 100×50 rectangle.
|
|
45
|
+
|
|
46
|
+
### Step 1.4: Exit the Sketch
|
|
47
|
+
|
|
48
|
+
Click **Finish Sketch** (or press `Esc`)
|
|
49
|
+
|
|
50
|
+
The rectangle is now a closed profile ready for extrusion.
|
|
51
|
+
|
|
52
|
+
### Step 1.5: Extrude to 3D
|
|
53
|
+
|
|
54
|
+
1. Click the **Extrude** button (Analyze tab, or press `E`)
|
|
55
|
+
2. In the properties panel, set:
|
|
56
|
+
- **Distance:** `50` mm
|
|
57
|
+
- **Direction:** Default (up the Z axis)
|
|
58
|
+
3. Click **Apply**
|
|
59
|
+
|
|
60
|
+
You now have a 100×50×50 mm rectangular block! The 3D viewport shows it at an isometric angle.
|
|
61
|
+
|
|
62
|
+
**Tip:** Use middle-click to rotate the view, right-click to pan, scroll to zoom.
|
|
63
|
+
|
|
64
|
+
### Step 1.6: Fillet the Edges
|
|
65
|
+
|
|
66
|
+
Sharp corners look ugly. Let's round them.
|
|
67
|
+
|
|
68
|
+
1. Click **Fillet** (Analyze tab, or press `F`)
|
|
69
|
+
2. In the properties panel:
|
|
70
|
+
- **Radius:** `5` mm
|
|
71
|
+
- **Edges:** Click "Select All" to round all edges
|
|
72
|
+
3. Click **Apply**
|
|
73
|
+
|
|
74
|
+
Your block now has smooth rounded corners!
|
|
75
|
+
|
|
76
|
+
### Step 1.7: Export as STL
|
|
77
|
+
|
|
78
|
+
Ready to 3D print?
|
|
79
|
+
|
|
80
|
+
1. Click **File → Export → STL**
|
|
81
|
+
2. Choose format:
|
|
82
|
+
- **ASCII** (larger file, human-readable)
|
|
83
|
+
- **Binary** (smaller file, better)
|
|
84
|
+
3. Name it: `my-first-part.stl`
|
|
85
|
+
4. Save
|
|
86
|
+
|
|
87
|
+
You've exported your first 3D model! You can now upload it to Thingiverse, Printables, or send to a 3D printer.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Part 2: Using the AI Copilot (3 minutes)
|
|
92
|
+
|
|
93
|
+
Let the AI do the heavy lifting.
|
|
94
|
+
|
|
95
|
+
### Step 2.1: Open Chat
|
|
96
|
+
|
|
97
|
+
Click the **Chat** tab on the right panel.
|
|
98
|
+
|
|
99
|
+
You'll see an empty chat history and an input box.
|
|
100
|
+
|
|
101
|
+
### Step 2.2: Ask the AI to Create a Cube
|
|
102
|
+
|
|
103
|
+
Type in the chat box:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
create a 100mm cube
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Press Enter.
|
|
110
|
+
|
|
111
|
+
**What happens:**
|
|
112
|
+
- The AI reads your request
|
|
113
|
+
- Recognizes "100mm cube"
|
|
114
|
+
- Automatically creates the 3D part for you
|
|
115
|
+
- A new feature appears in the tree: "Cube (100×100×100)"
|
|
116
|
+
|
|
117
|
+
The viewport shows a perfect cube!
|
|
118
|
+
|
|
119
|
+
### Step 2.3: Add Holes in the Corners
|
|
120
|
+
|
|
121
|
+
Type:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
add 4 holes in the corners, 10mm radius
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
The AI:
|
|
128
|
+
- Understands "4 holes", "corners", "10mm radius"
|
|
129
|
+
- Calculates corner positions automatically
|
|
130
|
+
- Creates 4 holes from the top face
|
|
131
|
+
- Updates your model
|
|
132
|
+
|
|
133
|
+
You now have a cube with 4 corner holes!
|
|
134
|
+
|
|
135
|
+
### Step 2.4: Fillet All Edges
|
|
136
|
+
|
|
137
|
+
Type:
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
fillet all edges 3mm
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
The AI:
|
|
144
|
+
- Detects "fillet", "all edges", "3mm"
|
|
145
|
+
- Applies a 3mm radius to all 12 edges
|
|
146
|
+
- Smooth, professional appearance
|
|
147
|
+
|
|
148
|
+
### Step 2.5: Export
|
|
149
|
+
|
|
150
|
+
Type:
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
export as STEP
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
The AI exports the model as `cube-with-holes.step` — a professional CAD format compatible with Fusion 360, SolidWorks, and other tools.
|
|
157
|
+
|
|
158
|
+
**AI copilot is useful for:**
|
|
159
|
+
- Quick prototyping
|
|
160
|
+
- Complex shapes (gears, springs, threads)
|
|
161
|
+
- Batch operations
|
|
162
|
+
- Learning syntax
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Part 3: Working with Assemblies (10 minutes)
|
|
167
|
+
|
|
168
|
+
Combine multiple parts into a machine.
|
|
169
|
+
|
|
170
|
+
### Step 3.1: Create a Base Plate
|
|
171
|
+
|
|
172
|
+
Start fresh: **File → New Part**
|
|
173
|
+
|
|
174
|
+
Create a base plate:
|
|
175
|
+
1. **Sketch → Rectangle:** 200×200 mm
|
|
176
|
+
2. **Finish Sketch**
|
|
177
|
+
3. **Extrude:** 10 mm
|
|
178
|
+
4. **File → Save as:** `base-plate.ccad` (cycleCAD native format)
|
|
179
|
+
|
|
180
|
+
You now have a thick rectangular base.
|
|
181
|
+
|
|
182
|
+
### Step 3.2: Create a Mounting Bracket
|
|
183
|
+
|
|
184
|
+
In a new tab/window, open cycleCAD again.
|
|
185
|
+
|
|
186
|
+
Create a bracket:
|
|
187
|
+
1. **Sketch → Rectangle:** 50×100 mm
|
|
188
|
+
2. **Finish Sketch**
|
|
189
|
+
3. **Extrude:** 20 mm
|
|
190
|
+
4. **Save as:** `bracket.ccad`
|
|
191
|
+
|
|
192
|
+
### Step 3.3: Create an Assembly
|
|
193
|
+
|
|
194
|
+
**File → New Assembly**
|
|
195
|
+
|
|
196
|
+
You're now in assembly mode (shown at bottom: "Assembly Workspace").
|
|
197
|
+
|
|
198
|
+
The left panel now shows:
|
|
199
|
+
- **Components** (empty)
|
|
200
|
+
- **Joints** (empty)
|
|
201
|
+
- **BOM** (bill of materials)
|
|
202
|
+
|
|
203
|
+
### Step 3.4: Insert Components
|
|
204
|
+
|
|
205
|
+
1. Click **Insert Component**
|
|
206
|
+
2. Select `base-plate.ccad` from your files
|
|
207
|
+
3. Click **OK**
|
|
208
|
+
|
|
209
|
+
The base plate appears in the 3D viewport.
|
|
210
|
+
|
|
211
|
+
4. Click **Insert Component** again
|
|
212
|
+
5. Select `bracket.ccad`
|
|
213
|
+
6. Position it: Drag it to the top-left corner of the base plate
|
|
214
|
+
7. Click **OK**
|
|
215
|
+
|
|
216
|
+
Now you have two parts in one assembly!
|
|
217
|
+
|
|
218
|
+
### Step 3.5: Create a Joint
|
|
219
|
+
|
|
220
|
+
Let's say the bracket should rotate on a pin. Create a revolute joint:
|
|
221
|
+
|
|
222
|
+
1. Click **Create Joint** (right panel, Joints tab)
|
|
223
|
+
2. **Joint Type:** Revolute (rotation)
|
|
224
|
+
3. **Component 1:** bracket
|
|
225
|
+
4. **Component 2:** base-plate
|
|
226
|
+
5. **Axis:** Z (vertical)
|
|
227
|
+
6. Click **Create**
|
|
228
|
+
|
|
229
|
+
The bracket is now constrained to rotate around the Z axis.
|
|
230
|
+
|
|
231
|
+
### Step 3.6: Animate the Joint
|
|
232
|
+
|
|
233
|
+
Let's see it move!
|
|
234
|
+
|
|
235
|
+
1. **Assembly → Animate Joint** (or press `Shift+A`)
|
|
236
|
+
2. Drag the slider to rotate the bracket from 0° to 90°
|
|
237
|
+
3. Watch the 3D view update in real-time
|
|
238
|
+
|
|
239
|
+
Cool! The assembly animates smoothly.
|
|
240
|
+
|
|
241
|
+
### Step 3.7: Generate a BOM
|
|
242
|
+
|
|
243
|
+
Generate a bill of materials (parts list):
|
|
244
|
+
|
|
245
|
+
1. **Assembly → Export BOM**
|
|
246
|
+
2. Format: CSV or PDF
|
|
247
|
+
3. Name: `assembly-bom.csv`
|
|
248
|
+
|
|
249
|
+
The BOM shows:
|
|
250
|
+
```
|
|
251
|
+
Part Number | Name | Quantity | Material
|
|
252
|
+
1 | base-plate | 1 | Steel
|
|
253
|
+
2 | bracket | 1 | Steel
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
This can be sent to suppliers for ordering!
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Part 4: Engineering Drawings (10 minutes)
|
|
261
|
+
|
|
262
|
+
Create professional 2D drawings for manufacturing.
|
|
263
|
+
|
|
264
|
+
### Step 4.1: Open Drawing Workspace
|
|
265
|
+
|
|
266
|
+
**File → New Drawing**
|
|
267
|
+
|
|
268
|
+
The left panel now shows:
|
|
269
|
+
- **Views** (empty)
|
|
270
|
+
- **Dimensions** (empty)
|
|
271
|
+
- **Annotations** (empty)
|
|
272
|
+
|
|
273
|
+
### Step 4.2: Add Orthographic Views
|
|
274
|
+
|
|
275
|
+
Create standard front, top, right views:
|
|
276
|
+
|
|
277
|
+
1. **Drawing → Add View**
|
|
278
|
+
- Type: **Front**
|
|
279
|
+
- Position: Drag to the center-left of the canvas
|
|
280
|
+
2. **Drawing → Add View**
|
|
281
|
+
- Type: **Top**
|
|
282
|
+
- Position: Above the front view
|
|
283
|
+
3. **Drawing → Add View**
|
|
284
|
+
- Type: **Right**
|
|
285
|
+
- Position: To the right of the front view
|
|
286
|
+
|
|
287
|
+
You now have three aligned views showing your model from different angles.
|
|
288
|
+
|
|
289
|
+
### Step 4.3: Add a Section View
|
|
290
|
+
|
|
291
|
+
Show the internal holes:
|
|
292
|
+
|
|
293
|
+
1. **Drawing → Add View**
|
|
294
|
+
- Type: **Section**
|
|
295
|
+
- Plane: **A-A** (a line you'll draw)
|
|
296
|
+
2. Draw a line through the front view (left to right)
|
|
297
|
+
3. The section view appears showing the internal cross-section
|
|
298
|
+
|
|
299
|
+
### Step 4.4: Add Dimensions
|
|
300
|
+
|
|
301
|
+
Professional drawings show measurements:
|
|
302
|
+
|
|
303
|
+
1. **Drawing → Dimension Tool** (or press `D`)
|
|
304
|
+
2. Click the width of the front view
|
|
305
|
+
- Annotation: `100 mm`
|
|
306
|
+
3. Click the height
|
|
307
|
+
- Annotation: `50 mm`
|
|
308
|
+
4. Click the holes
|
|
309
|
+
- Annotation: `Ø 10 mm` (diameter)
|
|
310
|
+
|
|
311
|
+
Dimensions appear as labeled lines on your views.
|
|
312
|
+
|
|
313
|
+
### Step 4.5: Add a Title Block
|
|
314
|
+
|
|
315
|
+
Every drawing needs a title block:
|
|
316
|
+
|
|
317
|
+
1. **Drawing → Add Title Block**
|
|
318
|
+
2. Fill in:
|
|
319
|
+
- **Part Name:** cube-with-holes
|
|
320
|
+
- **Revision:** 1.0
|
|
321
|
+
- **Date:** Today's date
|
|
322
|
+
- **Scale:** 1:1
|
|
323
|
+
- **Units:** mm
|
|
324
|
+
|
|
325
|
+
A title block appears in the bottom-right corner.
|
|
326
|
+
|
|
327
|
+
### Step 4.6: Export to PDF
|
|
328
|
+
|
|
329
|
+
Time to share:
|
|
330
|
+
|
|
331
|
+
1. **File → Export**
|
|
332
|
+
2. Format: **PDF**
|
|
333
|
+
3. Name: `drawing.pdf`
|
|
334
|
+
4. Download
|
|
335
|
+
|
|
336
|
+
Open the PDF in your browser or print it for your shop floor!
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Part 5: Using the Agent API (5 minutes)
|
|
341
|
+
|
|
342
|
+
Power users can control cycleCAD from JavaScript.
|
|
343
|
+
|
|
344
|
+
### Step 5.1: Open the Browser Console
|
|
345
|
+
|
|
346
|
+
In cycleCAD, press `F12` to open Developer Tools.
|
|
347
|
+
|
|
348
|
+
Click the **Console** tab.
|
|
349
|
+
|
|
350
|
+
You're now in the JavaScript REPL where you can control cycleCAD programmatically.
|
|
351
|
+
|
|
352
|
+
### Step 5.2: Create a Box via Code
|
|
353
|
+
|
|
354
|
+
Type:
|
|
355
|
+
|
|
356
|
+
```javascript
|
|
357
|
+
await kernel.exec('ops.box', { width: 100, height: 50, depth: 30 });
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
Press Enter.
|
|
361
|
+
|
|
362
|
+
**Result:** A 100×50×30 box appears in the 3D viewport!
|
|
363
|
+
|
|
364
|
+
The kernel is the heart of cycleCAD — it manages all modules (viewport, sketch, operations, etc.) and coordinates them via an event bus.
|
|
365
|
+
|
|
366
|
+
### Step 5.3: Add a Fillet
|
|
367
|
+
|
|
368
|
+
```javascript
|
|
369
|
+
await kernel.exec('ops.fillet', { edges: 'all', radius: 5 });
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
All edges of the box are now rounded with a 5 mm radius.
|
|
373
|
+
|
|
374
|
+
### Step 5.4: Export
|
|
375
|
+
|
|
376
|
+
```javascript
|
|
377
|
+
await kernel.exec('step.export', { filename: 'my-part.step' });
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
The model is exported as a STEP file and downloaded automatically.
|
|
381
|
+
|
|
382
|
+
### Step 5.5: Get the Current Part Info
|
|
383
|
+
|
|
384
|
+
```javascript
|
|
385
|
+
const part = kernel.state.get('current-part');
|
|
386
|
+
console.log(part);
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
**Output:**
|
|
390
|
+
```javascript
|
|
391
|
+
{
|
|
392
|
+
id: 'part_123',
|
|
393
|
+
name: 'Untitled Part',
|
|
394
|
+
features: [
|
|
395
|
+
{ id: 'feat_1', type: 'box', ... },
|
|
396
|
+
{ id: 'feat_2', type: 'fillet', ... }
|
|
397
|
+
],
|
|
398
|
+
material: 'Steel',
|
|
399
|
+
...
|
|
400
|
+
}
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
The Agent API exposes the full power of cycleCAD to scripts, AI agents, external tools, and custom automation.
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
## Part 6: Building a Custom Module (15 minutes)
|
|
408
|
+
|
|
409
|
+
Want to extend cycleCAD with your own tools? Modules are easy.
|
|
410
|
+
|
|
411
|
+
### Step 6.1: Create the Module File
|
|
412
|
+
|
|
413
|
+
In your text editor, create `part-counter.js`:
|
|
414
|
+
|
|
415
|
+
```javascript
|
|
416
|
+
const PartCounterModule = {
|
|
417
|
+
id: 'part-counter',
|
|
418
|
+
name: 'Part Counter',
|
|
419
|
+
version: '1.0.0',
|
|
420
|
+
category: 'tool',
|
|
421
|
+
dependencies: ['viewport'],
|
|
422
|
+
memoryEstimate: 2,
|
|
423
|
+
|
|
424
|
+
async load(kernel) {
|
|
425
|
+
console.log('[PartCounter] Loading...');
|
|
426
|
+
this.count = 0;
|
|
427
|
+
},
|
|
428
|
+
|
|
429
|
+
async activate(kernel) {
|
|
430
|
+
console.log('[PartCounter] Activating...');
|
|
431
|
+
|
|
432
|
+
// Subscribe to feature creation
|
|
433
|
+
kernel.on('feature:created', (data) => {
|
|
434
|
+
this.count++;
|
|
435
|
+
console.log(`[PartCounter] Part count: ${this.count}`);
|
|
436
|
+
|
|
437
|
+
// Update badge
|
|
438
|
+
const badge = document.querySelector('#pc-badge');
|
|
439
|
+
if (badge) badge.textContent = `📊 ${this.count} Parts`;
|
|
440
|
+
});
|
|
441
|
+
|
|
442
|
+
// Inject a badge into the UI
|
|
443
|
+
const badge = document.createElement('div');
|
|
444
|
+
badge.id = 'pc-badge';
|
|
445
|
+
badge.textContent = `📊 ${this.count} Parts`;
|
|
446
|
+
badge.style.cssText = `
|
|
447
|
+
position: fixed;
|
|
448
|
+
top: 20px;
|
|
449
|
+
right: 20px;
|
|
450
|
+
background: #2563eb;
|
|
451
|
+
color: white;
|
|
452
|
+
padding: 12px 16px;
|
|
453
|
+
border-radius: 8px;
|
|
454
|
+
font-weight: bold;
|
|
455
|
+
z-index: 1000;
|
|
456
|
+
`;
|
|
457
|
+
document.body.appendChild(badge);
|
|
458
|
+
},
|
|
459
|
+
|
|
460
|
+
async deactivate(kernel) {
|
|
461
|
+
console.log('[PartCounter] Deactivating...');
|
|
462
|
+
kernel.off('feature:created');
|
|
463
|
+
const badge = document.querySelector('#pc-badge');
|
|
464
|
+
if (badge) badge.remove();
|
|
465
|
+
},
|
|
466
|
+
|
|
467
|
+
async unload(kernel) {
|
|
468
|
+
this.count = 0;
|
|
469
|
+
},
|
|
470
|
+
|
|
471
|
+
provides: {
|
|
472
|
+
commands: {
|
|
473
|
+
'part-counter.getCount': async () => {
|
|
474
|
+
return { count: this.count };
|
|
475
|
+
},
|
|
476
|
+
},
|
|
477
|
+
},
|
|
478
|
+
};
|
|
479
|
+
|
|
480
|
+
export default PartCounterModule;
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
### Step 6.2: Register and Load It
|
|
484
|
+
|
|
485
|
+
In the browser console:
|
|
486
|
+
|
|
487
|
+
```javascript
|
|
488
|
+
// Import the module
|
|
489
|
+
import PartCounterModule from './part-counter.js';
|
|
490
|
+
|
|
491
|
+
// Register it with the kernel
|
|
492
|
+
await kernel.register(PartCounterModule);
|
|
493
|
+
|
|
494
|
+
// Activate it
|
|
495
|
+
await kernel.activate('part-counter');
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
**What you'll see:**
|
|
499
|
+
- A blue badge in the top-right corner showing "📊 0 Parts"
|
|
500
|
+
- Console logs when you create features
|
|
501
|
+
|
|
502
|
+
### Step 6.3: Test It
|
|
503
|
+
|
|
504
|
+
Create a new box:
|
|
505
|
+
|
|
506
|
+
```javascript
|
|
507
|
+
await kernel.exec('ops.box', { width: 50, height: 50, depth: 50 });
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
Watch the badge update: "📊 1 Parts"
|
|
511
|
+
|
|
512
|
+
Create a fillet:
|
|
513
|
+
|
|
514
|
+
```javascript
|
|
515
|
+
await kernel.exec('ops.fillet', { edges: 'all', radius: 2 });
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
Badge updates: "📊 2 Parts"
|
|
519
|
+
|
|
520
|
+
### Step 6.4: Use the Command
|
|
521
|
+
|
|
522
|
+
```javascript
|
|
523
|
+
const result = await kernel.exec('part-counter.getCount');
|
|
524
|
+
console.log(result); // { count: 2 }
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
That's it! You've written your first cycleCAD module.
|
|
528
|
+
|
|
529
|
+
**Next steps:**
|
|
530
|
+
- Add more commands (reset counter, export CSV, etc.)
|
|
531
|
+
- Add a UI panel for options
|
|
532
|
+
- Subscribe to other events (part:selected, sketch:finished, etc.)
|
|
533
|
+
- Read the [Developer Guide](./DEVELOPER-GUIDE.md) for full API details
|
|
534
|
+
|
|
535
|
+
---
|
|
536
|
+
|
|
537
|
+
## Part 7: Keyboard Shortcuts Reference
|
|
538
|
+
|
|
539
|
+
Fast keyboard shortcuts for power users.
|
|
540
|
+
|
|
541
|
+
### View & Navigation
|
|
542
|
+
|
|
543
|
+
| Shortcut | Action |
|
|
544
|
+
|----------|--------|
|
|
545
|
+
| `V` | Toggle viewport background (light/dark) |
|
|
546
|
+
| `G` | Toggle grid floor |
|
|
547
|
+
| `W` | Toggle wireframe mode |
|
|
548
|
+
| `1` | Front view |
|
|
549
|
+
| `2` | Top view |
|
|
550
|
+
| `3` | Right view |
|
|
551
|
+
| `4` | Isometric view |
|
|
552
|
+
| `5` | Fit all objects in view |
|
|
553
|
+
| `.` (period) | Reset camera to origin |
|
|
554
|
+
| `Mouse 3 (scroll)` | Zoom in/out |
|
|
555
|
+
| `Middle + drag` | Rotate view |
|
|
556
|
+
| `Right + drag` | Pan view |
|
|
557
|
+
|
|
558
|
+
### Sketching
|
|
559
|
+
|
|
560
|
+
| Shortcut | Action |
|
|
561
|
+
|----------|--------|
|
|
562
|
+
| `S` | Enter sketch mode |
|
|
563
|
+
| `Esc` | Exit sketch (finish) |
|
|
564
|
+
| `L` | Line tool |
|
|
565
|
+
| `C` | Circle tool |
|
|
566
|
+
| `R` | Rectangle tool |
|
|
567
|
+
| `A` | Arc tool |
|
|
568
|
+
| `P` | Polyline tool |
|
|
569
|
+
| `H` | Horizontal constraint |
|
|
570
|
+
| `V` | Vertical constraint |
|
|
571
|
+
| `T` | Tangent constraint |
|
|
572
|
+
| `E` | Equal constraint |
|
|
573
|
+
| `D` | Distance constraint |
|
|
574
|
+
| `Shift+D` | Delete constraint |
|
|
575
|
+
| `Space` | Finish current entity (line, arc, etc.) |
|
|
576
|
+
|
|
577
|
+
### 3D Modeling
|
|
578
|
+
|
|
579
|
+
| Shortcut | Action |
|
|
580
|
+
|----------|--------|
|
|
581
|
+
| `E` | Extrude feature |
|
|
582
|
+
| `R` | Revolve feature |
|
|
583
|
+
| `F` | Fillet edges |
|
|
584
|
+
| `Shift+C` | Chamfer edges |
|
|
585
|
+
| `H` | Create hole |
|
|
586
|
+
| `B` | Boolean operation (union, cut, intersect) |
|
|
587
|
+
| `Shift+P` | Pattern (rectangular/circular) |
|
|
588
|
+
| `Shift+U` | Undo last feature |
|
|
589
|
+
| `Shift+Y` | Redo last feature |
|
|
590
|
+
| `Shift+S` | Suppress feature (hide without deleting) |
|
|
591
|
+
| `Del` | Delete selected feature |
|
|
592
|
+
| `Tab` | Next feature in tree |
|
|
593
|
+
| `Shift+Tab` | Previous feature in tree |
|
|
594
|
+
|
|
595
|
+
### Workspace
|
|
596
|
+
|
|
597
|
+
| Shortcut | Action |
|
|
598
|
+
|----------|--------|
|
|
599
|
+
| `Ctrl+N` | New part |
|
|
600
|
+
| `Ctrl+O` | Open part |
|
|
601
|
+
| `Ctrl+S` | Save part |
|
|
602
|
+
| `Ctrl+E` | Export |
|
|
603
|
+
| `Ctrl+P` | Print/Preview |
|
|
604
|
+
| `Ctrl+Z` | Undo |
|
|
605
|
+
| `Ctrl+Y` | Redo |
|
|
606
|
+
| `Ctrl+A` | Select all |
|
|
607
|
+
| `Escape` | Deselect all |
|
|
608
|
+
| `?` | Show help panel |
|
|
609
|
+
| `F12` | Developer console |
|
|
610
|
+
| `Ctrl+Shift+T` | Open test agent |
|
|
611
|
+
|
|
612
|
+
### Assembly (Assembly Mode)
|
|
613
|
+
|
|
614
|
+
| Shortcut | Action |
|
|
615
|
+
|----------|--------|
|
|
616
|
+
| `Shift+A` | Animate selected joint |
|
|
617
|
+
| `Shift+E` | Explode/collapse assembly |
|
|
618
|
+
| `Shift+B` | Generate BOM |
|
|
619
|
+
| `Shift+I` | Interference check |
|
|
620
|
+
| `J` | Create new joint |
|
|
621
|
+
|
|
622
|
+
### Drawing (Drawing Mode)
|
|
623
|
+
|
|
624
|
+
| Shortcut | Action |
|
|
625
|
+
|----------|--------|
|
|
626
|
+
| `D` | Dimension tool |
|
|
627
|
+
| `N` | Add note/annotation |
|
|
628
|
+
| `T` | Add text |
|
|
629
|
+
| `Shift+V` | Add view |
|
|
630
|
+
| `Shift+L` | Add section line |
|
|
631
|
+
| `Ctrl+E` | Export to PDF/PNG |
|
|
632
|
+
|
|
633
|
+
### AI Copilot
|
|
634
|
+
|
|
635
|
+
| Shortcut | Action |
|
|
636
|
+
|----------|--------|
|
|
637
|
+
| `Alt+A` | Focus chat input |
|
|
638
|
+
| `Alt+/` | Show AI command suggestions |
|
|
639
|
+
| `Enter` (in chat) | Send message |
|
|
640
|
+
| `Shift+Enter` | New line in chat |
|
|
641
|
+
|
|
642
|
+
---
|
|
643
|
+
|
|
644
|
+
## Troubleshooting & Common Questions
|
|
645
|
+
|
|
646
|
+
### Q: The 3D view is blank / rotated weirdly
|
|
647
|
+
|
|
648
|
+
**Solution:**
|
|
649
|
+
- Press `5` to fit all objects
|
|
650
|
+
- Press `1` for front view to reset orientation
|
|
651
|
+
- Scroll to zoom out if you're too close
|
|
652
|
+
|
|
653
|
+
### Q: I created a sketch but can't see it
|
|
654
|
+
|
|
655
|
+
**Solution:**
|
|
656
|
+
- Press `S` to enter sketch mode
|
|
657
|
+
- Sketches are 2D (flat) — view from above: press `2`
|
|
658
|
+
- Exit sketch with `Esc` before extruding
|
|
659
|
+
|
|
660
|
+
### Q: Extrude didn't work
|
|
661
|
+
|
|
662
|
+
**Solution:**
|
|
663
|
+
- Make sure you finished the sketch (press `Esc`)
|
|
664
|
+
- Sketch must be closed (connected lines forming a profile)
|
|
665
|
+
- If sketch has constraints issues, the solver will warn you
|
|
666
|
+
|
|
667
|
+
### Q: How do I undo a mistake?
|
|
668
|
+
|
|
669
|
+
**Solution:**
|
|
670
|
+
- Press `Ctrl+Z` to undo
|
|
671
|
+
- Press `Ctrl+Y` to redo
|
|
672
|
+
- You can undo/redo multiple times to go back in history
|
|
673
|
+
|
|
674
|
+
### Q: Can I import my SolidWorks/Fusion 360 file?
|
|
675
|
+
|
|
676
|
+
**Solution:**
|
|
677
|
+
- Export your file as **STEP** (`.step` or `.stp`)
|
|
678
|
+
- In cycleCAD: **File → Import → STEP**
|
|
679
|
+
- The model will load (may take a few seconds for large files)
|
|
680
|
+
|
|
681
|
+
### Q: How do I share my design with others?
|
|
682
|
+
|
|
683
|
+
**Solution:**
|
|
684
|
+
- **File → Share** generates a link
|
|
685
|
+
- Others can view (not edit) your design
|
|
686
|
+
- For full collaboration, upgrade to **Pro** tier
|
|
687
|
+
|
|
688
|
+
### Q: Can I 3D print my model?
|
|
689
|
+
|
|
690
|
+
**Solution:**
|
|
691
|
+
- **File → Export → STL** (preferred for 3D printing)
|
|
692
|
+
- Upload the `.stl` file to Thingiverse, Printables, or your slicer software
|
|
693
|
+
- Or send directly to a 3D printing service
|
|
694
|
+
|
|
695
|
+
### Q: My assembly has collision issues
|
|
696
|
+
|
|
697
|
+
**Solution:**
|
|
698
|
+
- **Assembly → Interference Check** shows colliding parts
|
|
699
|
+
- Adjust joint angles or component positions
|
|
700
|
+
- Add additional constraints to prevent collisions
|
|
701
|
+
|
|
702
|
+
---
|
|
703
|
+
|
|
704
|
+
## Next Steps
|
|
705
|
+
|
|
706
|
+
Congratulations! You've learned cycleCAD's core features:
|
|
707
|
+
|
|
708
|
+
1. ✅ Sketch → Extrude → Fillet → Export
|
|
709
|
+
2. ✅ AI Copilot for rapid prototyping
|
|
710
|
+
3. ✅ Assemblies with joints
|
|
711
|
+
4. ✅ Engineering drawings
|
|
712
|
+
5. ✅ Agent API for automation
|
|
713
|
+
6. ✅ Custom modules to extend functionality
|
|
714
|
+
|
|
715
|
+
### Continue Learning
|
|
716
|
+
|
|
717
|
+
- **Advanced modeling:** Read `docs/ADVANCED-MODELING.md` for sweep, loft, sheet metal, springs, threads
|
|
718
|
+
- **AI workflows:** Explore more Chat commands like "create a bearing", "add threads M10", "stress analysis"
|
|
719
|
+
- **Custom modules:** Build your own tools following the [Developer Guide](./DEVELOPER-GUIDE.md)
|
|
720
|
+
- **Community:** Share designs on GitHub, ask questions in Discussions
|
|
721
|
+
- **Video tutorials:** Watch walkthroughs at cyclecad.com/learn
|
|
722
|
+
|
|
723
|
+
### Get Help
|
|
724
|
+
|
|
725
|
+
- **In-app Help:** Press `?` to open the help panel
|
|
726
|
+
- **GitHub Issues:** github.com/vvlars-cmd/cyclecad/issues
|
|
727
|
+
- **Community Discord:** (coming soon)
|
|
728
|
+
- **Email:** support@cyclecad.com
|
|
729
|
+
|
|
730
|
+
### Feedback
|
|
731
|
+
|
|
732
|
+
Found a bug? Have a feature request? Your feedback makes cycleCAD better.
|
|
733
|
+
|
|
734
|
+
Create an issue: https://github.com/vvlars-cmd/cyclecad/issues/new
|
|
735
|
+
|
|
736
|
+
---
|
|
737
|
+
|
|
738
|
+
**Happy designing!** 🚀
|
|
739
|
+
|
|
740
|
+
Built with ❤️ by the cycleCAD community.
|