solidworks-mcp-server 2.0.1 → 2.2.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.
Files changed (62) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +75 -8
  3. package/dist/db/connection.d.ts.map +1 -1
  4. package/dist/db/connection.js.map +1 -1
  5. package/dist/knowledge/chromadb.js +1 -1
  6. package/dist/knowledge/chromadb.js.map +1 -1
  7. package/dist/resources/design-table.d.ts +16 -16
  8. package/dist/resources/design-table.d.ts.map +1 -1
  9. package/dist/resources/design-table.js +2 -2
  10. package/dist/resources/design-table.js.map +1 -1
  11. package/dist/resources/pdm.d.ts +43 -43
  12. package/dist/resources/pdm.d.ts.map +1 -1
  13. package/dist/resources/pdm.js +8 -8
  14. package/dist/resources/pdm.js.map +1 -1
  15. package/dist/solidworks/api.d.ts +15 -14
  16. package/dist/solidworks/api.d.ts.map +1 -1
  17. package/dist/solidworks/api.js +343 -71
  18. package/dist/solidworks/api.js.map +1 -1
  19. package/dist/tools/analysis.d.ts +4 -4
  20. package/dist/tools/analysis.d.ts.map +1 -1
  21. package/dist/tools/analysis.js +10 -15
  22. package/dist/tools/analysis.js.map +1 -1
  23. package/dist/tools/drawing.d.ts +5 -5
  24. package/dist/tools/drawing.d.ts.map +1 -1
  25. package/dist/tools/drawing.js +5 -5
  26. package/dist/tools/drawing.js.map +1 -1
  27. package/dist/tools/export.d.ts +4 -4
  28. package/dist/tools/export.d.ts.map +1 -1
  29. package/dist/tools/export.js +8 -8
  30. package/dist/tools/export.js.map +1 -1
  31. package/dist/tools/modeling.d.ts +1 -1
  32. package/dist/tools/modeling.d.ts.map +1 -1
  33. package/dist/tools/modeling.js +71 -15
  34. package/dist/tools/modeling.js.map +1 -1
  35. package/dist/tools/vba-advanced.d.ts +228 -0
  36. package/dist/tools/vba-advanced.d.ts.map +1 -0
  37. package/dist/tools/vba-advanced.js +787 -0
  38. package/dist/tools/vba-advanced.js.map +1 -0
  39. package/dist/tools/vba-assembly.d.ts +143 -0
  40. package/dist/tools/vba-assembly.d.ts.map +1 -0
  41. package/dist/tools/vba-assembly.js +588 -0
  42. package/dist/tools/vba-assembly.js.map +1 -0
  43. package/dist/tools/vba-drawing.d.ts +350 -0
  44. package/dist/tools/vba-drawing.d.ts.map +1 -0
  45. package/dist/tools/vba-drawing.js +695 -0
  46. package/dist/tools/vba-drawing.js.map +1 -0
  47. package/dist/tools/vba-file-management.d.ts +156 -0
  48. package/dist/tools/vba-file-management.d.ts.map +1 -0
  49. package/dist/tools/vba-file-management.js +655 -0
  50. package/dist/tools/vba-file-management.js.map +1 -0
  51. package/dist/tools/vba-part.d.ts +187 -0
  52. package/dist/tools/vba-part.d.ts.map +1 -0
  53. package/dist/tools/vba-part.js +516 -0
  54. package/dist/tools/vba-part.js.map +1 -0
  55. package/dist/tools/vba.d.ts +1037 -9
  56. package/dist/tools/vba.d.ts.map +1 -1
  57. package/dist/tools/vba.js +94 -26
  58. package/dist/tools/vba.js.map +1 -1
  59. package/dist/utils/logger.js +2 -2
  60. package/dist/utils/logger.js.map +1 -1
  61. package/package.json +6 -3
  62. package/scripts/setup.js +71 -0
@@ -0,0 +1,516 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * VBA Generation for Part Modeling Operations
4
+ * Comprehensive SolidWorks part modeling automation
5
+ */
6
+ export const partModelingVBATools = [
7
+ {
8
+ name: 'vba_create_reference_geometry',
9
+ description: 'Generate VBA for creating reference geometry (planes, axes, points)',
10
+ inputSchema: z.object({
11
+ geometryType: z.enum(['plane', 'axis', 'point', 'coordinate_system']),
12
+ referenceType: z.enum(['offset', 'angle', 'parallel', 'perpendicular', 'midplane', '3points']),
13
+ references: z.array(z.string()).describe('Names of reference entities'),
14
+ offset: z.number().optional().describe('Offset distance in mm'),
15
+ angle: z.number().optional().describe('Angle in degrees'),
16
+ flipDirection: z.boolean().optional()
17
+ }),
18
+ handler: (args, swApi) => {
19
+ const templates = {
20
+ plane: `
21
+ Sub CreateReferencePlane()
22
+ Dim swApp As SldWorks.SldWorks
23
+ Dim swModel As SldWorks.ModelDoc2
24
+ Dim swFeatureMgr As SldWorks.FeatureManager
25
+ Dim swRefPlane As SldWorks.RefPlane
26
+ Dim swFeature As SldWorks.Feature
27
+
28
+ Set swApp = Application.SldWorks
29
+ Set swModel = swApp.ActiveDoc
30
+
31
+ If swModel Is Nothing Then
32
+ MsgBox "No active document found"
33
+ Exit Sub
34
+ End If
35
+
36
+ Set swFeatureMgr = swModel.FeatureManager
37
+
38
+ ' Select reference entities
39
+ ${args.references.map((ref, i) => `
40
+ swModel.ClearSelection2 True
41
+ swModel.Extension.SelectByID2 "${ref}", "PLANE", 0, 0, 0, ${i === 0 ? 'False' : 'True'}, 0, Nothing, 0`).join('')}
42
+
43
+ ' Create reference plane
44
+ ${args.referenceType === 'offset' ? `
45
+ Set swRefPlane = swFeatureMgr.InsertRefPlane( _
46
+ swRefPlaneReferenceConstraint_Distance, ${args.offset || 10} / 1000, _
47
+ 0, 0, 0, 0)` : ''}
48
+ ${args.referenceType === 'angle' ? `
49
+ Set swRefPlane = swFeatureMgr.InsertRefPlane( _
50
+ swRefPlaneReferenceConstraint_Angle, ${args.angle || 45} * 3.14159 / 180, _
51
+ 0, 0, 0, 0)` : ''}
52
+ ${args.referenceType === 'parallel' ? `
53
+ Set swRefPlane = swFeatureMgr.InsertRefPlane( _
54
+ swRefPlaneReferenceConstraint_Parallel, 0, _
55
+ 0, 0, 0, 0)` : ''}
56
+
57
+ If Not swRefPlane Is Nothing Then
58
+ MsgBox "Reference plane created successfully"
59
+ Else
60
+ MsgBox "Failed to create reference plane"
61
+ End If
62
+
63
+ swModel.ClearSelection2 True
64
+ End Sub`,
65
+ axis: `
66
+ Sub CreateReferenceAxis()
67
+ Dim swApp As SldWorks.SldWorks
68
+ Dim swModel As SldWorks.ModelDoc2
69
+ Dim swFeatureMgr As SldWorks.FeatureManager
70
+ Dim swFeature As SldWorks.Feature
71
+
72
+ Set swApp = Application.SldWorks
73
+ Set swModel = swApp.ActiveDoc
74
+
75
+ If swModel Is Nothing Then Exit Sub
76
+
77
+ Set swFeatureMgr = swModel.FeatureManager
78
+
79
+ ' Select reference entities for axis
80
+ ${args.references.map((ref, i) => `
81
+ swModel.Extension.SelectByID2 "${ref}", "PLANE", 0, 0, 0, ${i === 0 ? 'False' : 'True'}, 0, Nothing, 0`).join('')}
82
+
83
+ ' Create axis
84
+ Set swFeature = swFeatureMgr.InsertAxis2(True)
85
+
86
+ If Not swFeature Is Nothing Then
87
+ swFeature.Name = "Reference Axis"
88
+ MsgBox "Reference axis created: " & swFeature.Name
89
+ End If
90
+ End Sub`,
91
+ point: `
92
+ Sub CreateReferencePoint()
93
+ Dim swApp As SldWorks.SldWorks
94
+ Dim swModel As SldWorks.ModelDoc2
95
+ Dim swFeatureMgr As SldWorks.FeatureManager
96
+ Dim swRefPoint As SldWorks.RefPoint
97
+
98
+ Set swApp = Application.SldWorks
99
+ Set swModel = swApp.ActiveDoc
100
+
101
+ If swModel Is Nothing Then Exit Sub
102
+
103
+ Set swFeatureMgr = swModel.FeatureManager
104
+
105
+ ' Select reference for point
106
+ ${args.references.map((ref) => `
107
+ swModel.Extension.SelectByID2 "${ref}", "", 0, 0, 0, False, 0, Nothing, 0`).join('')}
108
+
109
+ ' Create reference point
110
+ Set swRefPoint = swFeatureMgr.InsertReferencePoint(4, 0, ${args.offset || 0} / 1000, 1)
111
+
112
+ If Not swRefPoint Is Nothing Then
113
+ MsgBox "Reference point created"
114
+ End If
115
+ End Sub`
116
+ };
117
+ return templates[args.geometryType] || 'Geometry type not supported';
118
+ }
119
+ },
120
+ {
121
+ name: 'vba_advanced_features',
122
+ description: 'Generate VBA for advanced features (sweep, loft, boundary)',
123
+ inputSchema: z.object({
124
+ featureType: z.enum(['sweep', 'loft', 'boundary', 'wrap', 'flex', 'deform']),
125
+ profiles: z.array(z.string()).describe('Sketch names for profiles'),
126
+ guideCurves: z.array(z.string()).optional().describe('Guide curve names'),
127
+ path: z.string().optional().describe('Path for sweep'),
128
+ twistAngle: z.number().optional(),
129
+ thinFeature: z.boolean().optional(),
130
+ thickness: z.number().optional().describe('Thickness in mm for thin features')
131
+ }),
132
+ handler: (args) => {
133
+ const templates = {
134
+ sweep: `
135
+ Sub CreateSweepFeature()
136
+ Dim swApp As SldWorks.SldWorks
137
+ Dim swModel As SldWorks.ModelDoc2
138
+ Dim swFeatureMgr As SldWorks.FeatureManager
139
+ Dim swFeature As SldWorks.Feature
140
+ Dim swSweep As SldWorks.SweepFeatureData
141
+
142
+ Set swApp = Application.SldWorks
143
+ Set swModel = swApp.ActiveDoc
144
+
145
+ If swModel Is Nothing Then Exit Sub
146
+
147
+ Set swFeatureMgr = swModel.FeatureManager
148
+
149
+ ' Select profile
150
+ swModel.Extension.SelectByID2 "${args.profiles[0] || 'Sketch1'}", "SKETCH", 0, 0, 0, False, 1, Nothing, 0
151
+
152
+ ' Select path
153
+ swModel.Extension.SelectByID2 "${args.path || 'Sketch2'}", "SKETCH", 0, 0, 0, True, 4, Nothing, 0
154
+
155
+ ${args.guideCurves && args.guideCurves.length > 0 ? `
156
+ ' Select guide curves
157
+ ${args.guideCurves.map((guide, i) => `
158
+ swModel.Extension.SelectByID2 "${guide}", "SKETCH", 0, 0, 0, True, 2, Nothing, 0`).join('')}` : ''}
159
+
160
+ ' Create sweep
161
+ Set swSweep = swFeatureMgr.CreateDefinition(swFeatureNameID_e.swFmSweep)
162
+
163
+ swSweep.TwistAngle = ${args.twistAngle || 0} * 3.14159 / 180
164
+ swSweep.MaintainTangency = True
165
+ swSweep.AdvancedSmoothing = True
166
+ ${args.thinFeature ? `
167
+ swSweep.ThinFeature = True
168
+ swSweep.ThinWallThickness = ${args.thickness || 1} / 1000` : ''}
169
+
170
+ Set swFeature = swFeatureMgr.CreateFeature(swSweep)
171
+
172
+ If Not swFeature Is Nothing Then
173
+ swFeature.Name = "Sweep_${Date.now()}"
174
+ MsgBox "Sweep feature created: " & swFeature.Name
175
+ End If
176
+ End Sub`,
177
+ loft: `
178
+ Sub CreateLoftFeature()
179
+ Dim swApp As SldWorks.SldWorks
180
+ Dim swModel As SldWorks.ModelDoc2
181
+ Dim swFeatureMgr As SldWorks.FeatureManager
182
+ Dim swFeature As SldWorks.Feature
183
+ Dim swLoft As SldWorks.LoftFeatureData
184
+
185
+ Set swApp = Application.SldWorks
186
+ Set swModel = swApp.ActiveDoc
187
+
188
+ If swModel Is Nothing Then Exit Sub
189
+
190
+ Set swFeatureMgr = swModel.FeatureManager
191
+
192
+ ' Select profiles
193
+ ${args.profiles.map((profile, i) => `
194
+ swModel.Extension.SelectByID2 "${profile}", "SKETCH", 0, 0, 0, ${i === 0 ? 'False' : 'True'}, 1, Nothing, 0`).join('')}
195
+
196
+ ${args.guideCurves && args.guideCurves.length > 0 ? `
197
+ ' Select guide curves
198
+ ${args.guideCurves.map((guide) => `
199
+ swModel.Extension.SelectByID2 "${guide}", "SKETCH", 0, 0, 0, True, 2, Nothing, 0`).join('')}` : ''}
200
+
201
+ ' Create loft
202
+ Set swLoft = swFeatureMgr.CreateDefinition(swFeatureNameID_e.swFmLoft)
203
+
204
+ swLoft.Merge = True
205
+ swLoft.Close = False
206
+ swLoft.PreserveTangency = True
207
+ ${args.thinFeature ? `
208
+ swLoft.ThinFeature = True
209
+ swLoft.Thickness = ${args.thickness || 1} / 1000` : ''}
210
+
211
+ Set swFeature = swFeatureMgr.CreateFeature(swLoft)
212
+
213
+ If Not swFeature Is Nothing Then
214
+ swFeature.Name = "Loft_${Date.now()}"
215
+ MsgBox "Loft feature created: " & swFeature.Name
216
+ End If
217
+ End Sub`,
218
+ boundary: `
219
+ Sub CreateBoundaryFeature()
220
+ Dim swApp As SldWorks.SldWorks
221
+ Dim swModel As SldWorks.ModelDoc2
222
+ Dim swFeatureMgr As SldWorks.FeatureManager
223
+ Dim swFeature As SldWorks.Feature
224
+
225
+ Set swApp = Application.SldWorks
226
+ Set swModel = swApp.ActiveDoc
227
+
228
+ If swModel Is Nothing Then Exit Sub
229
+
230
+ Set swFeatureMgr = swModel.FeatureManager
231
+
232
+ ' Select boundary curves in Direction 1
233
+ ${args.profiles.slice(0, Math.ceil(args.profiles.length / 2)).map((profile, i) => `
234
+ swModel.Extension.SelectByID2 "${profile}", "SKETCH", 0, 0, 0, ${i === 0 ? 'False' : 'True'}, 1, Nothing, 0`).join('')}
235
+
236
+ ' Select boundary curves in Direction 2
237
+ ${args.profiles.slice(Math.ceil(args.profiles.length / 2)).map((profile) => `
238
+ swModel.Extension.SelectByID2 "${profile}", "SKETCH", 0, 0, 0, True, 2, Nothing, 0`).join('')}
239
+
240
+ ' Create boundary surface/boss
241
+ Set swFeature = swFeatureMgr.InsertBoundaryBoss2( _
242
+ ${args.profiles.length}, 0, 0, 1, 1, _
243
+ ${args.thinFeature ? 'True' : 'False'}, ${args.thinFeature ? (args.thickness || 1) / 1000 : 0})
244
+
245
+ If Not swFeature Is Nothing Then
246
+ swFeature.Name = "Boundary_${Date.now()}"
247
+ MsgBox "Boundary feature created: " & swFeature.Name
248
+ End If
249
+ End Sub`
250
+ };
251
+ return templates[args.featureType] || 'Feature type not supported';
252
+ }
253
+ },
254
+ {
255
+ name: 'vba_pattern_features',
256
+ description: 'Generate VBA for pattern features',
257
+ inputSchema: z.object({
258
+ patternType: z.enum(['linear', 'circular', 'curve', 'fill', 'variable']),
259
+ featureNames: z.array(z.string()).describe('Features to pattern'),
260
+ direction1: z.object({
261
+ spacing: z.number().describe('Spacing in mm'),
262
+ instances: z.number(),
263
+ reverseDirection: z.boolean().optional()
264
+ }),
265
+ direction2: z.object({
266
+ spacing: z.number().describe('Spacing in mm'),
267
+ instances: z.number(),
268
+ reverseDirection: z.boolean().optional()
269
+ }).optional(),
270
+ axis: z.string().optional().describe('Axis for circular pattern'),
271
+ angle: z.number().optional().describe('Total angle for circular pattern'),
272
+ seedPoint: z.array(z.number()).optional().describe('[x, y, z] for fill pattern')
273
+ }),
274
+ handler: (args) => {
275
+ const templates = {
276
+ linear: `
277
+ Sub CreateLinearPattern()
278
+ Dim swApp As SldWorks.SldWorks
279
+ Dim swModel As SldWorks.ModelDoc2
280
+ Dim swFeatureMgr As SldWorks.FeatureManager
281
+ Dim swFeature As SldWorks.Feature
282
+
283
+ Set swApp = Application.SldWorks
284
+ Set swModel = swApp.ActiveDoc
285
+
286
+ If swModel Is Nothing Then Exit Sub
287
+
288
+ Set swFeatureMgr = swModel.FeatureManager
289
+
290
+ ' Select features to pattern
291
+ ${args.featureNames.map((name, i) => `
292
+ swModel.Extension.SelectByID2 "${name}", "BODYFEATURE", 0, 0, 0, ${i === 0 ? 'False' : 'True'}, 0, Nothing, 0`).join('')}
293
+
294
+ ' Select direction references
295
+ swModel.Extension.SelectByID2 "Right Plane", "PLANE", 0, 0, 0, True, 1, Nothing, 0
296
+ ${args.direction2 ? `swModel.Extension.SelectByID2 "Top Plane", "PLANE", 0, 0, 0, True, 2, Nothing, 0` : ''}
297
+
298
+ ' Create linear pattern
299
+ Set swFeature = swFeatureMgr.FeatureLinearPattern4( _
300
+ ${args.direction1.instances}, ${args.direction1.spacing / 1000}, _
301
+ ${args.direction2 ? args.direction2.instances : 1}, ${args.direction2 ? args.direction2.spacing / 1000 : 0}, _
302
+ False, ${args.direction1.reverseDirection ? 'True' : 'False'}, _
303
+ "NULL", "NULL", False, False, False, False, False, False, _
304
+ True, True, False, False, 0, 0)
305
+
306
+ If Not swFeature Is Nothing Then
307
+ swFeature.Name = "LinearPattern_${Date.now()}"
308
+ MsgBox "Linear pattern created: " & swFeature.Name
309
+ End If
310
+ End Sub`,
311
+ circular: `
312
+ Sub CreateCircularPattern()
313
+ Dim swApp As SldWorks.SldWorks
314
+ Dim swModel As SldWorks.ModelDoc2
315
+ Dim swFeatureMgr As SldWorks.FeatureManager
316
+ Dim swFeature As SldWorks.Feature
317
+
318
+ Set swApp = Application.SldWorks
319
+ Set swModel = swApp.ActiveDoc
320
+
321
+ If swModel Is Nothing Then Exit Sub
322
+
323
+ Set swFeatureMgr = swModel.FeatureManager
324
+
325
+ ' Select features to pattern
326
+ ${args.featureNames.map((name, i) => `
327
+ swModel.Extension.SelectByID2 "${name}", "BODYFEATURE", 0, 0, 0, ${i === 0 ? 'False' : 'True'}, 0, Nothing, 0`).join('')}
328
+
329
+ ' Select axis
330
+ swModel.Extension.SelectByID2 "${args.axis || 'Axis1'}", "AXIS", 0, 0, 0, True, 1, Nothing, 0
331
+
332
+ ' Create circular pattern
333
+ Set swFeature = swFeatureMgr.FeatureCircularPattern5( _
334
+ ${args.direction1.instances}, ${(args.angle || 360) * Math.PI / 180}, _
335
+ False, "NULL", False, True, False, False)
336
+
337
+ If Not swFeature Is Nothing Then
338
+ swFeature.Name = "CircularPattern_${Date.now()}"
339
+ MsgBox "Circular pattern created: " & swFeature.Name
340
+ End If
341
+ End Sub`,
342
+ curve: `
343
+ Sub CreateCurveDrivenPattern()
344
+ Dim swApp As SldWorks.SldWorks
345
+ Dim swModel As SldWorks.ModelDoc2
346
+ Dim swFeatureMgr As SldWorks.FeatureManager
347
+ Dim swFeature As SldWorks.Feature
348
+
349
+ Set swApp = Application.SldWorks
350
+ Set swModel = swApp.ActiveDoc
351
+
352
+ If swModel Is Nothing Then Exit Sub
353
+
354
+ Set swFeatureMgr = swModel.FeatureManager
355
+
356
+ ' Select features to pattern
357
+ ${args.featureNames.map((name, i) => `
358
+ swModel.Extension.SelectByID2 "${name}", "BODYFEATURE", 0, 0, 0, ${i === 0 ? 'False' : 'True'}, 0, Nothing, 0`).join('')}
359
+
360
+ ' Select curve
361
+ swModel.Extension.SelectByID2 "Sketch_Curve", "SKETCH", 0, 0, 0, True, 1, Nothing, 0
362
+
363
+ ' Create curve driven pattern
364
+ Set swFeature = swFeatureMgr.InsertCurveDrivenPattern( _
365
+ False, ${args.direction1.instances}, ${args.direction1.spacing / 1000}, _
366
+ True, False, False, 0, True, True, _
367
+ False, 0, 0, False, False)
368
+
369
+ If Not swFeature Is Nothing Then
370
+ swFeature.Name = "CurvePattern_${Date.now()}"
371
+ MsgBox "Curve driven pattern created: " & swFeature.Name
372
+ End If
373
+ End Sub`
374
+ };
375
+ return templates[args.patternType] || 'Pattern type not supported';
376
+ }
377
+ },
378
+ {
379
+ name: 'vba_sheet_metal',
380
+ description: 'Generate VBA for sheet metal operations',
381
+ inputSchema: z.object({
382
+ operation: z.enum(['base_flange', 'edge_flange', 'miter_flange', 'hem', 'jog', 'fold', 'unfold']),
383
+ thickness: z.number().describe('Material thickness in mm'),
384
+ bendRadius: z.number().optional().describe('Bend radius in mm'),
385
+ bendAngle: z.number().optional().describe('Bend angle in degrees'),
386
+ kFactor: z.number().optional().default(0.5),
387
+ reliefType: z.enum(['rectangular', 'obround', 'tear']).optional(),
388
+ reliefRatio: z.number().optional().default(0.5)
389
+ }),
390
+ handler: (args) => {
391
+ return `
392
+ Sub CreateSheetMetalFeature_${args.operation}()
393
+ Dim swApp As SldWorks.SldWorks
394
+ Dim swModel As SldWorks.ModelDoc2
395
+ Dim swFeatureMgr As SldWorks.FeatureManager
396
+ Dim swFeature As SldWorks.Feature
397
+ Dim swSheetMetal As SldWorks.SheetMetalFeatureData
398
+
399
+ Set swApp = Application.SldWorks
400
+ Set swModel = swApp.ActiveDoc
401
+
402
+ If swModel Is Nothing Then
403
+ MsgBox "No active document"
404
+ Exit Sub
405
+ End If
406
+
407
+ Set swFeatureMgr = swModel.FeatureManager
408
+
409
+ ' Initialize sheet metal parameters
410
+ swModel.SetSheetMetalDefaultParameters _
411
+ ${args.thickness / 1000}, ${(args.bendRadius || args.thickness) / 1000}, _
412
+ ${args.kFactor}, ${args.reliefRatio}, _
413
+ ${args.reliefType === 'rectangular' ? '0' : args.reliefType === 'obround' ? '1' : '2'}
414
+
415
+ ${args.operation === 'base_flange' ? `
416
+ ' Create base flange
417
+ swModel.Extension.SelectByID2 "Sketch1", "SKETCH", 0, 0, 0, False, 0, Nothing, 0
418
+ Set swFeature = swFeatureMgr.InsertSheetMetalBaseFlange2( _
419
+ ${args.thickness / 1000}, False, ${(args.bendRadius || args.thickness) / 1000}, _
420
+ 0, ${args.kFactor}, True, False, True, _
421
+ 0, 0, 0, False, 0, 0, 0, 0)` : ''}
422
+
423
+ ${args.operation === 'edge_flange' ? `
424
+ ' Create edge flange
425
+ swModel.Extension.SelectByID2 "Edge1", "EDGE", 0, 0, 0, False, 0, Nothing, 0
426
+ Set swFeature = swFeatureMgr.InsertSheetMetalEdgeFlange2( _
427
+ 0, False, ${(args.bendAngle || 90) * Math.PI / 180}, _
428
+ 50 / 1000, 0, 0, ${(args.bendRadius || args.thickness) / 1000}, _
429
+ 0, 0, False, False, False, False, True, _
430
+ 0, 0, 0, 0, 0)` : ''}
431
+
432
+ ${args.operation === 'hem' ? `
433
+ ' Create hem
434
+ swModel.Extension.SelectByID2 "Edge1", "EDGE", 0, 0, 0, False, 0, Nothing, 0
435
+ Set swFeature = swFeatureMgr.InsertSheetMetalHem2( _
436
+ 1, 1, False, ${args.thickness * 2 / 1000}, _
437
+ ${(args.bendRadius || args.thickness) / 1000}, 0, 0, _
438
+ 0, 0, False, False, 0)` : ''}
439
+
440
+ If Not swFeature Is Nothing Then
441
+ swFeature.Name = "SheetMetal_${args.operation}_${Date.now()}"
442
+ MsgBox "Sheet metal feature created: " & swFeature.Name
443
+ Else
444
+ MsgBox "Failed to create sheet metal feature"
445
+ End If
446
+ End Sub`;
447
+ }
448
+ },
449
+ {
450
+ name: 'vba_surface_modeling',
451
+ description: 'Generate VBA for surface modeling operations',
452
+ inputSchema: z.object({
453
+ surfaceType: z.enum(['extrude', 'revolve', 'sweep', 'loft', 'boundary', 'offset', 'thicken', 'knit']),
454
+ sketches: z.array(z.string()).describe('Sketch names'),
455
+ distance: z.number().optional().describe('Distance in mm'),
456
+ angle: z.number().optional().describe('Angle in degrees'),
457
+ offsetDistance: z.number().optional().describe('Offset distance in mm'),
458
+ thickenDepth: z.number().optional().describe('Thicken depth in mm')
459
+ }),
460
+ handler: (args) => {
461
+ return `
462
+ Sub CreateSurfaceFeature_${args.surfaceType}()
463
+ Dim swApp As SldWorks.SldWorks
464
+ Dim swModel As SldWorks.ModelDoc2
465
+ Dim swFeatureMgr As SldWorks.FeatureManager
466
+ Dim swFeature As SldWorks.Feature
467
+
468
+ Set swApp = Application.SldWorks
469
+ Set swModel = swApp.ActiveDoc
470
+
471
+ If swModel Is Nothing Then Exit Sub
472
+
473
+ Set swFeatureMgr = swModel.FeatureManager
474
+
475
+ ${args.surfaceType === 'extrude' ? `
476
+ ' Surface extrude
477
+ swModel.Extension.SelectByID2 "${args.sketches[0]}", "SKETCH", 0, 0, 0, False, 0, Nothing, 0
478
+ Set swFeature = swFeatureMgr.FeatureExtruRefSurface2( _
479
+ True, False, False, 0, 0, ${(args.distance || 10) / 1000}, 0, _
480
+ False, False, False, False, 0, 0, False, False, False, False, False)` : ''}
481
+
482
+ ${args.surfaceType === 'revolve' ? `
483
+ ' Surface revolve
484
+ swModel.Extension.SelectByID2 "${args.sketches[0]}", "SKETCH", 0, 0, 0, False, 0, Nothing, 0
485
+ swModel.Extension.SelectByID2 "Axis1", "AXIS", 0, 0, 0, True, 1, Nothing, 0
486
+ Set swFeature = swFeatureMgr.FeatureRevolve2( _
487
+ True, True, False, False, False, False, 0, 0, _
488
+ ${(args.angle || 360) * Math.PI / 180}, 0, False, False, 0, 0, 0, 0, 0, True, True, True)` : ''}
489
+
490
+ ${args.surfaceType === 'offset' ? `
491
+ ' Offset surface
492
+ swModel.Extension.SelectByID2 "Surface1", "SURFACE", 0, 0, 0, False, 0, Nothing, 0
493
+ Set swFeature = swFeatureMgr.InsertOffsetSurface( _
494
+ ${(args.offsetDistance || 5) / 1000}, False)` : ''}
495
+
496
+ ${args.surfaceType === 'thicken' ? `
497
+ ' Thicken surface
498
+ swModel.Extension.SelectByID2 "Surface1", "SURFACE", 0, 0, 0, False, 0, Nothing, 0
499
+ Set swFeature = swFeatureMgr.FeatureThicken( _
500
+ ${(args.thickenDepth || 2) / 1000}, 0, 0, False, True, True, True)` : ''}
501
+
502
+ ${args.surfaceType === 'knit' ? `
503
+ ' Knit surfaces
504
+ ${args.sketches.map((sketch, i) => `
505
+ swModel.Extension.SelectByID2 "${sketch}", "SURFACE", 0, 0, 0, ${i === 0 ? 'False' : 'True'}, 0, Nothing, 0`).join('')}
506
+ Set swFeature = swFeatureMgr.InsertKnitSurface2(0.0001, True, False, True)` : ''}
507
+
508
+ If Not swFeature Is Nothing Then
509
+ swFeature.Name = "Surface_${args.surfaceType}_${Date.now()}"
510
+ MsgBox "Surface created: " & swFeature.Name
511
+ End If
512
+ End Sub`;
513
+ }
514
+ }
515
+ ];
516
+ //# sourceMappingURL=vba-part.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vba-part.js","sourceRoot":"","sources":["../../src/tools/vba-part.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;GAGG;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC;QACE,IAAI,EAAE,+BAA+B;QACrC,WAAW,EAAE,qEAAqE;QAClF,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACpB,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,CAAC,CAAC;YACrE,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;YAC9F,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,6BAA6B,CAAC;YACvE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;YAC/D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;YACzD,aAA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