PolyBooleanParameters2D

Inherits: Resource < Reference < Object

A set of parameters to configure various polygon and polyline boolean related methods in PolyBoolean2D.

Enumerations

enum FillRule:

  • FILL_RULE_EVEN_ODD = 0 — Odd numbered sub-regions are filled, while even numbered sub-regions are not.
  • FILL_RULE_NON_ZERO = 1 — All non-zero sub-regions are filled.
  • FILL_RULE_POSITIVE = 2 — All sub-regions with winding counts greater than 0 are filled.
  • FILL_RULE_NEGATIVE = 3 — All sub-regions with winding counts less than 0 are filled.

Property Descriptions

Default 1
Setter set_clip_fill_rule(value)
Getter get_clip_fill_rule()

The specific FillRule used for polygons_b.


  • bool preserve_collinear
Default false
Setter set_preserve_collinear(value)
Getter is_preserve_collinear()

By default, when three or more vertices are collinear in the input polygons (subject or clip), the “inner” vertices are removed before clipping. If true, prevents this default behavior to allow these inner vertices to appear in the solution.

Note: this is only implemented in the clipper6 backend.


  • bool reverse_solution
Default false
Setter set_reverse_solution(value)
Getter is_reverse_solution()

If true, inverts the order of vertices in the clipping solution.

Note: this is only implemented in the clipper6 backend.


  • bool strictly_simple
Default false
Setter set_strictly_simple(value)
Getter is_strictly_simple()

If true, ensures that the returned solution are always non self-intersecting polygons that does not contain “touching” vertices nor “touching” edges.

Note: it’s computationally expensive ensuring polygons are strictly simple in clipper6 backend so this property is disabled by default. Yet clipper10 backend always returns strictly simple polygons without performance costs, so this property is ignored there.


Default 1
Setter set_subject_fill_rule(value)
Getter get_subject_fill_rule()

The specific FillRule used for polygons_a.


Default false
Setter set_subject_open(value)
Getter is_subject_open()

If true, the subject paths are treated as open polylines, otherwise they are treated as closed polygons. This property is usually set and overridden automatically, but can be fetched to tell whether the previous operation used polylines for clipping.