# doc-cache created by Octave 10.2.0
# name: cache
# type: cell
# rows: 3
# columns: 1
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
oc_polybool


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3225
 -- Function file[P,DETAILS] =oc_polybool(SUB,CLIP):
 -- Function file[P,DETAILS] =oc_polybool(SUB,CLIP,OP):
 -- Function file[P,DETAILS] =oc_polybool(SUB,CLIP,OP,HOR):

     This function performs boolean operations between two polygons
     using the Greiner-Hormann algorithm as it is presented in
     http://davis.wpi.edu/~matt/courses/clipping/

     SUB is a two column matrix containing the X and Y coordinates of
     the vertices for the subject polygon (it must be unique, although
     self-intersections are permitted).

     CLIP is a two column matrix containing the X and Y coordinates of
     the vertices for the clipper polygon(it must be unique, although
     self-intersections are permitted).

     OP is a text string containing the operation to perform between SUB
     and CLIP.  Possible values are:

        • 'AND' Intersection of SUB and CLIP.  This value is set by
          default.
        • 'OR' Union of SUB and CLIP.
        • 'AB' Operation SUB - CLIP.
        • 'BA' Operation of CLIP - SUB.
        • 'XOR' Exclusive disjunction between CLIP and SUB.  This
          operation is performed as the joining of 'AB' and 'BA'
          consecutively applied

     HOR is an identifier for performing (value 1, by default) or not
     (value 0) the searching for holes in the result of the operation
     OR. When OR is applied with non convex entities some of the
     resulting polygons can be actually holes.  Activating this argument
     the possible holes are identified.  If the operation is other than
     OR the value of this argument is irrelevant

     For the matrices SUB and CLIP, the first point is not needed to be
     repeated at the end (but is permitted).  Pairs of (NaN,NaN)
     coordinates in SUB and/or CLIP are omitted, so they are treated as
     if each one stored a single polygon, i.e., this function does not
     admit boolean operations between multiple polygons of between
     polygons with holes, although polygons containing
     self-intersections are permitted

     P is a two column matrix containing the X and Y coordinates of the
     vertices of the resultant polygon(s).  If the result consist of
     multiple polygons they are separated by rows os (NaN,NaN) values.

     DETAILS is a struct containing details of the computation.  Its
     fields (IN LOWERCASE!) are:

        • POLY Three-column matrix with a number of rows equal to the
          number of polygons stored in the matrix P.  The first column
          stores the row of P where the corresponding polygon starts,
          the second column the row of P where the polygon end, and the
          third column is a mark identifying if the polygon is a hole
          (value 0) or not (value 1).  The values of the third column
          are relevant only in the case of the OR operation
        • NINT Number of intersections between SUB and CLIP.
        • NPERT Number of perturbed points of the CLIP polygon if any
          particular case (points in the border of the other polygon)
          occurs see http://davis.wpi.edu/~matt/courses/clipping/ for
          details.

     This function does not check if the dimensions of SUB and CLIP are
     correct.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
This function performs boolean operations between two polygons using the
Grei...





