Skip to content

Feature Request: True Swept Solid for Tool Paths #4

@gsdali

Description

@gsdali

Background

PadCAM needs to represent cutting tools as 3D objects for:

  1. Generating tool shapes for visualization
  2. Creating swept volumes for WIP (Work In Progress) simulation
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions