Skip to content

union with nonzero winding rule #64

@mbutterick

Description

@mbutterick

Suppose I’d like to reduce a list of Path objects into a single Path with overlaps removed, but winding preserved.

In example A, the crossbar overlaps the sides. If I convert this to an array of Path and reduce into a new Path using union, I get the right result.

In example Q, however, the same approach doesn’t work: union will remove the overlap correctly from the Q tail, but it will also remove the inner contour entirely.

  1. Is there a way to invoke union so that it takes account of nonzero winding?
  2. Is there a way to test the winding count of a Path? (I see there is an internal windingCount property)
  3. Is there a way to combine two Path objects into a new Path without applying any Boolean processing?

Screen Shot 2020-08-05 at Aug 05  10 56 12 AM

Screen Shot 2020-08-05 at Aug 05  11 20 53 AM

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