Skip to content

Public BuildTree64() equivalent? #927

@kintel

Description

@kintel

We (OpenSCAD) are using Clipper2 to perform 2D polygon offset operations.
When offsetting, we prefer writing the result to a PolyTree structure, as that allows us to later walk the tree and easily identify holes as we go.

However, we also want to perform the recommended simplification between offset operations, and I haven't found a convenient way of achieving that:

  • SimplifyPath() doesn't accept a PolyTree parameter (only Path and Paths).
  • BuildTree64(), which converts from Paths to PolyTree, is private.

Are there any recommended ways of obtaining a simplified PolyTree result from an offset result?
Barring a recommended way, what would be the best way forward, e.g. Add a new SimplifyPath() variant, make BuildTree64() public, or building a copy of one of those in user space?

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