CGAL 6.1 - 2D Polygon Repair

Loading...
Searching...
No Matches
Functions
Functions
Reference Manual

##

## Functions
template<class Kernel , class Container , class Rule = Even_odd_rule>
Multipolygon_with_holes_2< Kernel, Container > | CGAL::Polygon_repair::repair (const Polygon_2< Kernel, Container > &p, Rule=Rule())
| repairs polygon `p` using the given rule
template<class Kernel , class Container , class Rule = Even_odd_rule>
Multipolygon_with_holes_2< Kernel, Container > | CGAL::Polygon_repair::repair (const Polygon_with_holes_2< Kernel, Container > &p, Rule=Rule())
| repairs polygon with holes `p` using the given rule
template<class Kernel , class Container , class Rule = Even_odd_rule>
Multipolygon_with_holes_2< Kernel, Container > | CGAL::Polygon_repair::repair (const Multipolygon_with_holes_2< Kernel, Container > &p, Rule=Rule())
| repairs multipolygon with holes `p` using the given rule
template<typename Kernel , typename Container >
Multipolygon_with_holes_2< Kernel, Container > | CGAL::Polygon_repair::join (const Multipolygon_with_holes_2< Kernel, Container > &pa)
| computes the union of all polygons with holes in `p`
template<typename PA , typename PB , typename Kernel = Default, typename Container = Default>
Multipolygon_with_holes_2< Kernel, Container > | CGAL::Polygon_repair::join (const PA &pa, const PB &pb, const Kernel &=Default(), const Container &=Default())
| computes the union of two polygonal domains
template<typename Kernel , typename Container >
Multipolygon_with_holes_2< Kernel, Container > | CGAL::Polygon_repair::intersect (const Multipolygon_with_holes_2< Kernel, Container > &p)
| computes the intersection of all polygons with holes in `p`
template<typename PA , typename PB , typename Kernel = Default, typename Container = Default>
Multipolygon_with_holes_2< Kernel, Container > | CGAL::Polygon_repair::intersect (const PA &pa, const PB &pb, const Kernel &=Default(), const Container &=Default())
| computes the intersection of two polygonal domains

## Function Documentation

## ◆ intersect() [1/2]

template<typename Kernel , typename Container >

Multipolygon_with_holes_2< Kernel, Container > CGAL::Polygon_repair::intersect | ( | const Multipolygon_with_holes_2< Kernel, Container > & | p | ) |

`#include <CGAL/Polygon_repair/repair.h>`

computes the intersection of all polygons with holes in `p`

Template Parameters

  Kernel | parameter of the input and output polygons. Must be model of `ConstrainedDelaunayTriangulationTraits_2`
  Container | parameter of the input and output polygons

Precondition
  Each polygon with holes must be free of self-intersections the outer boundaries must be counterclockwise and the holes clockwise oriented.

## ◆ intersect() [2/2]

template<typename PA , typename PB , typename Kernel = Default, typename Container = Default>

Multipolygon_with_holes_2< Kernel, Container > CGAL::Polygon_repair::intersect | ( | const PA & | pa,
|  | const PB & | pb,
|  | const Kernel & | = `Default()`,
|  | const Container & | = `Default()`
| ) |  |

`#include <CGAL/Polygon_repair/repair.h>`

computes the intersection of two polygonal domains

Template Parameters

  Kernel | parameter of the output polygon. Must be model of `ConstrainedDelaunayTriangulationTraits_2`
  Container | parameter of the input and output polygons
  PA | must be `Polygon_2<Kernel, Container>`, or `Polygon_with_holes_2<Kernel, Container>`, or `Multipolygon_with_holes_2<Kernel, Container>`
  PB | must be `Polygon_2<Kernel, Container>`, or `Polygon_with_holes_2<Kernel, Container>`, or `Multipolygon_with_holes_2<Kernel, Container>`

Precondition
  The polygons `pa` and `pb` must be free of self-intersections the outer boundaries must be counterclockwise and the holes clockwise oriented.

## ◆ join() [1/2]

template<typename Kernel , typename Container >

Multipolygon_with_holes_2< Kernel, Container > CGAL::Polygon_repair::join | ( | const Multipolygon_with_holes_2< Kernel, Container > & | pa | ) |

`#include <CGAL/Polygon_repair/repair.h>`

computes the union of all polygons with holes in `p`

Template Parameters

  Kernel | parameter of the input and output polygons. Must be model of `ConstrainedDelaunayTriangulationTraits_2`
  Container | parameter of the input and output polygons

Precondition
  Each polygon with holes must be free of self-intersections, the outer boundaries must be counterclockwise and the holes clockwise oriented.

Examples
  Polygon_repair/repair_union_intersect_2.cpp.

## ◆ join() [2/2]

template<typename PA , typename PB , typename Kernel = Default, typename Container = Default>

Multipolygon_with_holes_2< Kernel, Container > CGAL::Polygon_repair::join | ( | const PA & | pa,
|  | const PB & | pb,
|  | const Kernel & | = `Default()`,
|  | const Container & | = `Default()`
| ) |  |

`#include <CGAL/Polygon_repair/repair.h>`

computes the union of two polygonal domains

Template Parameters

  Kernel | parameter of the output polygons. Must be model of `ConstrainedDelaunayTriangulationTraits_2`
  Container | parameter of the input and output polygons
  PA | must be `Polygon_2<Kernel, Container>`, or `Polygon_with_holes_2<Kernel, Container>`, or `Multipolygon_with_holes_2<Kernel, Container>`
  PB | must be `Polygon_2<Kernel, Container>`, or `Polygon_with_holes_2<Kernel, Container>`, or `Multipolygon_with_holes_2<Kernel, Container>`

Precondition
  The polygons `pa` and `pb` must be free of self-intersections, the outer boundaries must be counterclockwise and the holes clockwise oriented.

## ◆ repair() [1/3]

template<class Kernel , class Container , class Rule = Even_odd_rule>

Multipolygon_with_holes_2< Kernel, Container > CGAL::Polygon_repair::repair | ( | const Multipolygon_with_holes_2< Kernel, Container > & | p,
|  | Rule | = `Rule()`
| ) |  |

`#include <CGAL/Polygon_repair/repair.h>`

repairs multipolygon with holes `p` using the given rule

Template Parameters

  Kernel | parameter of the input and output polygons. Must be model of `ConstrainedDelaunayTriangulationTraits_2`
  Container | parameter of the input and output polygons
  Rule | may be any Repair Rules

Precondition
  If the rule is the `Union_rule` or `Non_zero_rule`, each polygon with hole must be free of self-intersections, the outer boundary of each polygon with holes must be counterclockwise and the holes clockwise oriented.

## ◆ repair() [2/3]

template<class Kernel , class Container , class Rule = Even_odd_rule>

Multipolygon_with_holes_2< Kernel, Container > CGAL::Polygon_repair::repair | ( | const Polygon_2< Kernel, Container > & | p,
|  | Rule | = `Rule()`
| ) |  |

`#include <CGAL/Polygon_repair/repair.h>`

repairs polygon `p` using the given rule

Template Parameters

  Kernel | parameter of the input and output polygons. Must be model of `ConstrainedDelaunayTriangulationTraits_2`
  Container | parameter of the input and output polygons
  Rule | must be `Even_odd_rule` or `Non_zero_rule`

Examples
  Polygon_repair/repair_multipolygon_2.cpp, Polygon_repair/repair_non_zero_polygon_2.cpp, Polygon_repair/repair_polygon_2.cpp, and Polygon_repair/repair_union_intersect_2.cpp.

## ◆ repair() [3/3]

template<class Kernel , class Container , class Rule = Even_odd_rule>

Multipolygon_with_holes_2< Kernel, Container > CGAL::Polygon_repair::repair | ( | const Polygon_with_holes_2< Kernel, Container > & | p,
|  | Rule | = `Rule()`
| ) |  |

`#include <CGAL/Polygon_repair/repair.h>`

repairs polygon with holes `p` using the given rule

Template Parameters

  Kernel | parameter of the input and output polygons. Must be model of `ConstrainedDelaunayTriangulationTraits_2`
  Container | parameter of the input and output polygons
  Rule | must be `Even_odd_rule` or `Non_zero_rule`