swpilotcli-feature-extrude-cut
Cut-extrude the currently active sketch to create a Cut-Extrude feature (removes material).
Prerequisites
- SolidWorks is running with an active Part document
- A sketch must be active in editing mode (run
sketch-on-facethensketch-drawfirst)
Usage
dotnet run --project ./sup_tools/swpilotcli-feature-extrude-cut/scripts/ExtrudeCut/ExtrudeCut.csproj -- <depth_mm | through_all>
Arguments
| Arg | Description |
|-----|-------------|
| depth_mm | Cut depth in millimetres (e.g. 5) |
| through_all | Cut through the entire solid |
Examples
# Cut 5mm deep pocket
dotnet run ... -- 5
# Through-all hole
dotnet run ... -- through_all
How it works
- Reads depth from command-line argument
- Calls
FeatureCut3(Blind or ThroughAll, single direction) - Traverses feature tree to find the newly created cut feature
- Calls
EditRebuild3andGraphicsRedraw2
Notes
- This tool exits sketch mode as part of creating the feature
- For adding material instead of removing it, use
extrude-boss - Typical flow:
sketch-on-face→sketch-draw→extrude-cut - The sketch profile must be a closed contour on the face