Background
PadCAM needs to represent cutting tools as 3D objects for:
- Generating tool shapes for visualization
- Creating swept volumes for WIP (Work In Progress) simulation
- Collision detection
The current Shape.toolSweep() function works well for flat end mills but uses an approximation (cylinders + box). This is conservative and safe for CAM.
Current Capabilities (Sufficient for All Phases)
OCCTSwift already has everything needed for tool geometry:
| Feature |
Method |
Use Case |
| Cylinder |
Shape.cylinder() |
Tool body, flat end mill |
| Sphere |
Shape.sphere() |
Ball nose tip |
| Torus |
Shape.torus() |
Corner radius construction |
| Revolution |
Shape.revolve() |
Tool from 2D profile |
| Tool Sweep |
Shape.toolSweep() |
Swept volume (approximation) |
| Booleans |
union, subtracting, intersection |
Constructing complex shapes |
Nice-to-Have Feature (Low Priority)
True Swept Solid Along Path
For more accurate tool engagement simulation with complex toolpaths:
extension Shape {
/// Create a swept solid by moving a profile along a path
/// Uses BRepOffsetAPI_MakePipeShell for accurate swept volumes
static func sweep(
profile: Shape,
along path: Wire,
keepContact: Bool = true
) -> Shape?
}
OCCT Class: BRepOffsetAPI_MakePipeShell
This would enable:
- Exact swept volumes for curved toolpaths
- Better tool engagement analysis
- More accurate collision detection
Priority: Low
This feature is not blocking. The existing toolSweep() approximation is:
- Conservative (removes slightly more material than actual)
- Safe for CAM (real tool will always fit in simulated WIP)
- Sufficient for all planned operations
References
Background
PadCAM needs to represent cutting tools as 3D objects for:
The current
Shape.toolSweep()function works well for flat end mills but uses an approximation (cylinders + box). This is conservative and safe for CAM.Current Capabilities (Sufficient for All Phases)
OCCTSwift already has everything needed for tool geometry:
Shape.cylinder()Shape.sphere()Shape.torus()Shape.revolve()Shape.toolSweep()union,subtracting,intersectionNice-to-Have Feature (Low Priority)
True Swept Solid Along Path
For more accurate tool engagement simulation with complex toolpaths:
OCCT Class:
BRepOffsetAPI_MakePipeShellThis would enable:
Priority: Low
This feature is not blocking. The existing
toolSweep()approximation is:References
Documentation/Tool_Geometry_Reference.md