mirror of https://github.com/CGAL/cgal
use exception
This commit is contained in:
parent
0a462f3b90
commit
2a25a6080e
|
|
@ -0,0 +1,34 @@
|
|||
// Copyright (c) 2016 GeometryFactory (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org).
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||
//
|
||||
//
|
||||
// Author(s) : Sebastien Loriot
|
||||
|
||||
#ifndef CGAL_POLYGON_MESH_PROCESSING_INTERNAL_SELF_INTERSECTION_EXCEPTION_H
|
||||
#define CGAL_POLYGON_MESH_PROCESSING_INTERNAL_SELF_INTERSECTION_EXCEPTION_H
|
||||
|
||||
#include <CGAL/license/Polygon_mesh_processing/corefinement.h>
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
namespace CGAL {
|
||||
namespace Polygon_mesh_processing {
|
||||
namespace Corefinement {
|
||||
|
||||
struct Self_intersection_exception :
|
||||
public std::runtime_error
|
||||
{
|
||||
Self_intersection_exception()
|
||||
: std::runtime_error("Self-intersection detected in input mesh")
|
||||
{}
|
||||
};
|
||||
|
||||
} } } // end of CGAL::Polygon_mesh_processing::Corefinement
|
||||
|
||||
#endif // CGAL_POLYGON_MESH_PROCESSING_INTERNAL_SELF_INTERSECTION_EXCEPTION_H
|
||||
|
|
@ -19,6 +19,7 @@
|
|||
#include <CGAL/property_map.h>
|
||||
#include <CGAL/enum.h>
|
||||
#include <CGAL/Polygon_mesh_processing/self_intersections.h>
|
||||
#include <CGAL/Polygon_mesh_processing/internal/Corefinement/Self_intersection_exception.h>
|
||||
|
||||
#include <boost/graph/graph_traits.hpp>
|
||||
#include <memory>
|
||||
|
|
@ -28,14 +29,6 @@ namespace CGAL {
|
|||
namespace Polygon_mesh_processing {
|
||||
namespace Corefinement {
|
||||
|
||||
struct Self_intersection_exception :
|
||||
public std::runtime_error
|
||||
{
|
||||
Self_intersection_exception()
|
||||
: std::runtime_error("Self-intersection detected in input mesh")
|
||||
{}
|
||||
};
|
||||
|
||||
template<class TriangleMesh, class EdgeToFaces>
|
||||
class Collect_face_bbox_per_edge_bbox {
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#include <CGAL/boost/graph/named_params_helper.h>
|
||||
#include <CGAL/Polygon_mesh_processing/connected_components.h>
|
||||
#include <CGAL/Polygon_mesh_processing/border.h>
|
||||
#include <CGAL/Polygon_mesh_processing/internal/Corefinement/Self_intersection_exception.h>
|
||||
#ifndef CGAL_PLANE_CLIP_DO_NOT_USE_BOX_INTERSECTION_D
|
||||
#include <CGAL/Polygon_mesh_processing/self_intersections.h>
|
||||
#endif
|
||||
|
|
@ -353,7 +354,7 @@ void refine_with_plane(PolygonMesh& pm,
|
|||
auto last = std::unique(test_faces.begin(), test_faces.end());
|
||||
test_faces.erase(last, test_faces.end());
|
||||
if (does_self_intersect<Concurrency_tag>(test_faces, pm, np))
|
||||
throw std::runtime_error("TODO Corefinement::Self_intersection_exception");
|
||||
throw Corefinement::Self_intersection_exception();
|
||||
}
|
||||
|
||||
//TODO: parallel for
|
||||
|
|
|
|||
Loading…
Reference in New Issue