mirror of https://github.com/CGAL/cgal
cleanup
This commit is contained in:
parent
7710492e9f
commit
7c643baa6f
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
/*! \file test_connect_holes.cpp
|
||||
* Connecting a polygon with holes.
|
||||
*/
|
||||
|
|
@ -21,7 +19,6 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/connect_holes.h>
|
||||
#include <list>
|
||||
|
|
@ -38,7 +35,8 @@ typedef Polygon_with_holes_2::Hole_const_iterator Hole_const_iterator;
|
|||
typedef Polygon_with_holes_2::Hole_iterator Hole_iterator;
|
||||
|
||||
//compute the area of a polygon with holes
|
||||
FT pwh_area(Polygon_with_holes_2 pwh) {
|
||||
FT pwh_area(Polygon_with_holes_2 pwh)
|
||||
{
|
||||
Polygon_2 outerP = pwh.outer_boundary();
|
||||
FT result = outerP.area();
|
||||
if (! pwh.has_holes())
|
||||
|
|
@ -53,9 +51,8 @@ FT pwh_area(Polygon_with_holes_2 pwh) {
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
bool testExampleFile(const char* filename) {
|
||||
|
||||
bool testExampleFile(const char* filename)
|
||||
{
|
||||
// Read a polygon with holes from a file.
|
||||
std::ifstream input_file (filename);
|
||||
if (! input_file.is_open())
|
||||
|
|
@ -97,12 +94,12 @@ signature. The input polygon with holes area is calculated, and then
|
|||
after the holes are connected, an output polygon is created, and its
|
||||
area is calculated
|
||||
*/
|
||||
int main (int argc, char **argv)
|
||||
int main()
|
||||
{
|
||||
std::string testfilePrefix = "data/pgn_holes";
|
||||
std::string testfileSuffix = ".dat";
|
||||
int result = 0;
|
||||
for (int i=1;i<6;i++) {
|
||||
for (int i = 1; i < 6; ++i) {
|
||||
std::stringstream strs;
|
||||
std::string si;
|
||||
strs << i;
|
||||
|
|
|
|||
Loading…
Reference in New Issue