First determine the task mode
For models with many fillets/chamfers, the main risks are topology changes, incorrect edge selection, and unmanufacturable parameters, not the API parameters themselves.
- When creating a new CNC mounting base or verifying parameters, first use the template script's
--dry-run; connect to SolidWorks only after the plan passes. - When modifying an existing part, first read Detailed experience the "existing model edge selection" section, and do not apply the template's fixed expected edge count.
- When the user requests variable radius, face fillet, full-round, or setback, first run this sub-skill's advanced capability probe; when the SolidWorks version or input topology differs from the verified samples, keep
pilot, and do not directly claim stability across versions. - Multi-control-point, surface combination, and width-width chamfer already have independent real-machine evidence on SW2026 SP1.1, but must still be rerun when changing versions or topology; hold-line fillet has already been retested across Python, C# PIA, SWBasic, and in-process unmanaged C++, and the failure boundary converges on this machine's SW2026 SP1.1
ISetHoldLinescall, rather than being a Python-only language limitation. This build must keeppilot/blocked, and must not degrade into an ordinary face fillet and then claim success.
Template entry point
First do a COM-free pre-check:
python subskills\solidworks-fillet-chamfer-cnc\scripts\create_cnc_mount_template.py `
--dry-run `
--set base_corner_radius=6 `
--set chamfer_angle_deg=30 `
--output-dir C:\CADAutomationWorkbench\cnc_mount
Confirm that *_plan.json in validation.errors is empty, the semantic targets and expected_edge_count match the design, then delete --dry-run to execute native modeling. Put large numbers of parameters into JSON first:
python subskills\solidworks-fillet-chamfer-cnc\scripts\create_cnc_mount_template.py `
--params-json subskills\solidworks-fillet-chamfer-cnc\examples\cnc_mount_precision_params.json `
--failure-policy strict `
--output-dir C:\CADAutomationWorkbench\cnc_mount
strict only accepts the requested dimensions;progressive try at 100%/75%/50%. When degradation occurs, the actual dimensions must be stated in the delivery summary, and it must not still claim to precisely satisfy the original values.
Non-skippable gates
- Run the parent skill before native modeling
scripts/sw_preflight.py;--dry-rundoes not require SolidWorks. - Parameter pre-checks must cover finite values, fillet/chamfer upper limits, hole-slot collisions, minimum edge wall, inter-feature clearance, counterbore/pocket bottom wall, and output base name safety.
- New templates execute in the order "base body → vertical corner fillets → outer contour chamfers → holes/slots/pockets → hole-mouth chamfers"; existing models determine the order based on dependencies.
- Edge selection uses geometric signatures and expected counts as evidence. When the count does not match, stop; do not guess edges by expanding coordinate tolerances,
Edge1, or screen clicks. - Every fillet/chamfer must be read back from the feature tree after rebuild; a non-empty COM return does not equal successful persistence.
- After generation, save the SLDPRT, export STEP, run
sw_review.run_review(), and manually inspect the isometric and top-view previews.
Advanced fillet entry point
First read-only probe this machine's type library, without starting SolidWorks:
python subskills\solidworks-fillet-chamfer-cnc\scripts\verify_advanced_fillets.py `
--output-dir C:\CADAutomationWorkbench\advanced_fillet_probe
Execute the current six independently passed real-machine regressions:
python subskills\solidworks-fillet-chamfer-cnc\scripts\verify_advanced_fillets.py `
--verify-solidworks `
--modes variable face surface_combo full_round setback width_width_chamfer `
--output-dir C:\CADAutomationWorkbench\advanced_fillet_verified
Only when the capability status in the report is verified, and the corresponding SLDPRT, STEP, reopen evidence, and review report all exist, may it be declared that the environment supports it. The current minimum samples verified on SolidWorks 2026 SP1.1 are:
- Single-edge endpoint variable radius R2→R5, feature type read back as
VarFillet。 - The three intermediate control points at 25%/50%/75% on the same edge read back R3/R6/R4 respectively;
GetControlPointRadiusAtIndexthe position values of25/50/75are interpreted as percentages - R4 face fillet for two sets of adjacent faces,
ISimpleFilletFeatureData2.Type=2。 - R3 G2 face fillet for a plane-cylinder combination, after reopening
CurvatureContinuous=true。 - full-round for one face in each of three face groups,
ISimpleFilletFeatureData2.Type=3。 - three-edge fillet R3 with per-edge setback 1 mm; read back setback vertex count as 1.
- C2/C4 distance-distance chamfer,
IChamferFeatureData2.Type=2, the two-side distances according to side0/1read back as2/4 mm。
the setback distance array must be explicitly wrapped as VT_ARRAY | VT_R8. Ordinary Python tuple may not throw a COM exception, yet cause FeatureFillet to return None, and such a result must not be downgraded to an ordinary fillet.
Hold-line mode uses projected split lines, two face groups with mark 2/4 and hold-line mark 8, and requires GetHoldLineCount=1. The official ISetHoldLines only supports in-process unmanaged C++ for SolidWorks, so the script provides an MSVC x64 DLL + SWBasic main-thread scheduler; the C# PIA and Python paths are retained as comparisons. On this machine with SW2026 SP1.1 / Revision 34.1.1, Python ordinary arrays read back as 0, an explicit SAFEARRAY server fault occurs, and C#, SWBasic, and native C++ also fail to obtain a persistable hold line; the native call furthermore at ISetHoldLines boundary triggers a server fault. Therefore by default it returns only structured blocked/known_server_fault, and does not execute dangerous calls.
Only when other service packs need to be retested in an isolated, self-owned SolidWorks instance, explicitly add --unsafe-native-hold-line; this switch may cause the instance to exit and must not be used for sessions with existing unsaved documents. The success criterion is still after creating the feature and after reopening, both GetHoldLineCount=1。
Open-source complex-case regression
Add MIT-licensed CadQuery parametric-bracket-library/l_gusset regression. This part contains two mutually perpendicular mounting plates, a triangular stiffening rib, and six mounting holes; the SW2026 import baseline is 1 solid / 18 faces / 49 edges. On the same complex solid, create a variable-radius fillet with four intermediate control points at 20/40/60/80%, as well as a C0.8/C1.4 width-width chamfer:
python subskills\solidworks-fillet-chamfer-cnc\scripts\verify_open_source_bracket.py `
--source C:\CADAutomationWorkbench\sources\l_gusset.step `
--source-commit 5b285130bff480cda282499e83604b295dd0aa4d `
--version 2026 `
--output-dir C:\CADAutomationWorkbench\opensource_l_gusset
Only if the fixed commit, the SHA-256 of the CadQuery 2.8.0 generated artifact, the complexity gate, the percentage/radius of the four control points, the two-side distances of the unequal-width chamfer, the post-processing topology, rebuild, SLDPRT, STEP, reopen, and four-view review all pass, mark verified. The input STEP can be generated with CadQuery 2.8.0 according to that repository README; the script will not perform unlocked network downloads at runtime.
The original FreeCAD-library complex corner bracket continues as the second independent chamfer regression:
The complex-model regression fixedly uses FreeCAD-library's 2020_corner_bracket-Corner.step, locking the commit, SHA-256, and CC BY 3.0 attribution; do not use bare links that change with the main branch:
python subskills\solidworks-fillet-chamfer-cnc\scripts\verify_open_source_complex_case.py `
--version 2026 `
--output-dir C:\CADAutomationWorkbench\opensource_corner_bracket
The script selects the 24.041631 mm hypotenuse by the unique endpoint/length signature in the manifest, and actually applies a C0.2/C0.4 width-width chamfer. Only if the download hash, source topology exactly 1 solid / 40 faces / 98 edges, chamfer FeatureData readback, post-processing 41 faces / 101 edges / 66 vertices reopen persistence, SLDPRT/STEP, and four-view review all pass, the case is marked verified. When the network is unavailable, cached files may be reused, but the SHA-256 must still be recalculated.
CNC geometry defaults
- Weight-reduction pockets use by default
rounded_slot, avoiding treating unmachinable zero-radius internal corners as finished; userectangleonly when corner cleanup in a subsequent operation is explicitly required, and retain the DFM warning. - Locating holes, center slots, and weight-reduction pockets must use the same parameter source for two-dimensional envelope checks. Template v2 places locating holes along Y by default to avoid the old layout intersecting the center slot.
- Constant-radius fillets and angle chamfers are general stable paths; multi-control-point variable radius, face/full-round/setback, planar-to-cylindrical G2 combinations, and width-to-width chamfers already have minimal real-machine regression on SolidWorks 2026 SP1.1, but when applied to other topologies or versions, the capability script must still be rerun. Complex transitions must record the API, SolidWorks version, input topology, rebuild results, and preview evidence before the capability level can be upgraded.
For detailed edge selection signatures, failure semantics, existing model strategies, and extension routes, see CNC multi-fillet/chamfer experience。
Verification requirements
After each completion, output:
*.SLDPRT*.step*_parameters.json*_review_report.json*_isometric.bmpor the converted PNG
During review, at least check:
evaluation.statuswhether it ispassor an explainablewarnexpected_outputs_existwhether it isTruepreviews_not_blankwhether it isTruevalidation.errorswhether it is emptytreatment_evidencewhether the requested value, actual value, each attempt, and the selected edge signature are recordedfeature_evidence.missing_nameswhether it is empty- whether the feature tree contains the expected
Fillet/Chamfer/Cutfeature