Clpr
type clip_type = [
|
`None
|
`Intersection
AND -- regions covered by both subject and clip polygons
*)|
`Union
OR -- regions covered by subject or clip polygons, or both polygons
*)|
`Difference
NOT -- regions covered by subject, but not clip polygons
*)|
`Xor
exclusive or -- regions covered by subject or clip polygons, but not both
*) ]
Clipping types for boolean operations. See Clipper2's docs for visual demonstrations.
type fill_rule = [
|
`EvenOdd
only odd numbered sub-regions are filled
*)|
`NonZero
non-zero sub-regions are filled
*)|
`Positive
only sub-regions with winding counts > 0
are filled
|
`Negative
only sub-regions with winding counts < 0
are filled
]
Filling rules used by the clipping algorithm for boolean operations. See Clipper2's docs for a detailed explanation of how they differ).
type join_type = [
|
`Square
squaring applied uniformally at all joins where the internal join angle is less than 90 degrees. The squared edg will be at exactly the offset distance from the join vertex
*)|
`Round
rounding is appliedto all joins that have convex external angles, and it maintains the exact offset distance from the join vertex
*)|
`Miter
there's a necessary limit to mitered joins (to avoid narrow angled joins producing excessively long and narrow spikes)). The limit sets the maximum distance in multiples of the delta
specified for the offsetting operation (default is 2.
, which is the minimum allowed).
]
Defines the treatment of corners when offsetting paths. Visual examples are available in the Clipper2 docs.
type end_type = [
|
`Polygon
paths are assumed to be closed and treated as polygons
*)|
`Joined
ends are joined and the paths are treated as polylines
*)|
`Butt
ends are squared off without any extrusion
*)|
`Square
ends extend the offset amount while being squared off
*)|
`Round
ends extend the offset amount while being rounded off
*) ]
Sets whether paths are treated as closed (`Polygon
) when offsetting or open (and how to do so, if so). Visual examples are available in the Clipper2 docs.
module PointD : sig ... end
2d points (float)
module RectD : sig ... end
An axis-aligned rectangle used bounding box computations and quick rectangular clipping (boolean intersection) operations. (see PathsD.rect_clip
)
module PathD : sig ... end
Rectangular clipping, simplification, and other transformations on sequences of vertices (float) defining a single contour (open or closed path).
module PathsD : sig ... end
Clipping (boolean), offseting, simplification, and minkowski operations on sequences of PathD.t
.
module PolyTreeD : sig ... end
PolyTreeD.t
is a read-only data structure that receives solutions from clipping operations. It's an alternative to the PathsD.t
data structure which also receives solutions. However the principle advantage of PolyTreeD.t
over PathsD.t
is that it also represents the parent-child relationships of the polygons in the solution (where a parent's polygon will contain all its children polygons).
module ClipperD : sig ... end
Clipping (boolean) operations on float paths/polygons
module Point64 : sig ... end
2d points (int64)
module Rect64 : sig ... end
An axis-aligned rectangle used bounding box computations and quick rectangular clipping (boolean intersection) operations. (see Paths64.rect_clip
)
module Path64 : sig ... end
Rectangular clipping, simplification, and other transformations on sequences of vertices (int64) defining a single contour (open or closed path).
module Paths64 : sig ... end
Clipping (boolean), offseting, simplification, and minkowski operations on sequences of Path64.t
module PolyTree64 : sig ... end
PolyTree64.t
is a read-only data structure that receives solutions from clipping operations. It's an alternative to the Paths64.t
data structure which also receives solutions. However the principle advantage of PolyTree64.t
over Paths64.t
is that it also represents the parent-child relationships of the polygons in the solution (where a parent's polygon will contain all its children polygons).
module Clipper64 : sig ... end
Clipping (boolean) operations on int64 paths/polygons
module Offset : sig ... end
This class provides a mixed interface (float and int64). Unlike the purpose built ClipperD.t
it does not perform handle the conversion of incoming doubles to int64 using a precision set by the user -- they are simply truncated. Thus if you are working with floats, it is recommended that you make use of the helper function PathsD.inflate
at this time.
module SvgWriter : sig ... end
module SvgReader : sig ... end