Skip to content

[wishlist] Batch (multi scan) API #84

@gwicke

Description

@gwicke

CAM applications like FreeCAD often need control over transitions between independent OCL scans. For this reason, a typical pattern is to submit one scan line or contour to an OCL dropcutter at a time, and then retrieve the results. While there is some scope for parallelization within such a "scan task" (using BatchDropCutter, for example), this parallelization is fairly fine grained, and suffers from high overheads.

It would be desirable to instead exploit parallelism between independent scans all sharing the same STL. This would allow an application like FreeCAD to schedule all scans for a high level CAM operation in parallel, and then retrieve the corresponding (separate) results for each of those scans. Doing the same while sharing the same STL and internal kd-tree is difficult for Python clients, especially when forking is not available (typically Windows).

API sketch

  • Expose a single dropcutter like object, with a single STL and corresponding kd-tree. Ideally, support plain dropcutter, adaptive dropcutter, and waterline algorithms. Use non-parallel but efficient implementations by default.
  • Scan API:
    • Accept multiple scan line segments, either as a key-value dict, or as an array.
    • Return corresponding results, either identified by original keys, or in the identical array order as the inputs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions