mirror of https://github.com/CGAL/cgal
Fix some errors and warnings
This commit is contained in:
parent
fa11cf6fce
commit
e63550d503
|
|
@ -320,7 +320,7 @@ public:
|
||||||
using Segment_2 = typename Traits::Segment_2;
|
using Segment_2 = typename Traits::Segment_2;
|
||||||
using Segment_3 = typename Traits::Segment_3;
|
using Segment_3 = typename Traits::Segment_3;
|
||||||
|
|
||||||
using Color = CGAL::Color;
|
using Color = CGAL::IO::Color;
|
||||||
using Surface_mesh = CGAL::Surface_mesh<Point_3>;
|
using Surface_mesh = CGAL::Surface_mesh<Point_3>;
|
||||||
using Random = CGAL::Random;
|
using Random = CGAL::Random;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,7 @@ template<typename ResultType, typename Type1, typename Type2>
|
||||||
inline const ResultType intersection(const Type1& t1, const Type2& t2) {
|
inline const ResultType intersection(const Type1& t1, const Type2& t2) {
|
||||||
|
|
||||||
ResultType out;
|
ResultType out;
|
||||||
const bool is_intersection_found = intersection(t1, t2, out);
|
CGAL_assertion_code(const bool is_intersection_found =) intersection(t1, t2, out);
|
||||||
CGAL_assertion(is_intersection_found);
|
CGAL_assertion(is_intersection_found);
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,10 +39,10 @@ public:
|
||||||
typedef typename Kernel::Segment_2 Segment_2;
|
typedef typename Kernel::Segment_2 Segment_2;
|
||||||
|
|
||||||
typedef Support_line<Kernel> Support_line_DS;
|
typedef Support_line<Kernel> Support_line_DS;
|
||||||
typedef Segment Segment;
|
|
||||||
typedef Vertex<FT> Vertex;
|
|
||||||
|
|
||||||
typedef Meta_vertex<Point_2> Meta_vertex;
|
typedef CGAL::KSP_2::internal::Vertex<FT> Vertex;
|
||||||
|
typedef CGAL::KSP_2::internal::Segment Segment;
|
||||||
|
typedef CGAL::KSP_2::internal::Meta_vertex<Point_2> Meta_vertex;
|
||||||
|
|
||||||
typedef std::vector<Support_line_DS> Support_lines;
|
typedef std::vector<Support_line_DS> Support_lines;
|
||||||
typedef std::vector<Segment> Segments;
|
typedef std::vector<Segment> Segments;
|
||||||
|
|
@ -573,9 +573,6 @@ public:
|
||||||
< position_of_meta_vertex_on_support_line(b, support_line_idx));
|
< position_of_meta_vertex_on_support_line(b, support_line_idx));
|
||||||
});
|
});
|
||||||
|
|
||||||
std::size_t nb_segments_before = m_segments.size();
|
|
||||||
std::size_t nb_vertices_before = m_vertices.size();
|
|
||||||
|
|
||||||
// Attach to existing endpoint
|
// Attach to existing endpoint
|
||||||
std::size_t new_target_idx = m_vertices.size();
|
std::size_t new_target_idx = m_vertices.size();
|
||||||
m_vertices.push_back(Vertex(position_of_meta_vertex_on_support_line(meta_vertices_idx.front(),
|
m_vertices.push_back(Vertex(position_of_meta_vertex_on_support_line(meta_vertices_idx.front(),
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ public:
|
||||||
typedef GeomTraits Kernel;
|
typedef GeomTraits Kernel;
|
||||||
typedef typename Kernel::FT FT;
|
typedef typename Kernel::FT FT;
|
||||||
|
|
||||||
typedef Event<GeomTraits> Event;
|
typedef CGAL::KSP_2::internal::Event<GeomTraits> Event;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -816,7 +816,7 @@ public:
|
||||||
const bool is_inserted = pair.second;
|
const bool is_inserted = pair.second;
|
||||||
if (is_inserted) {
|
if (is_inserted) {
|
||||||
typename Intersection_kernel::Line_3 line;
|
typename Intersection_kernel::Line_3 line;
|
||||||
bool intersect = intersection(plane, m_support_planes[common_bbox_plane_idx].exact_plane(), line);
|
CGAL_assertion_code(bool intersect =) intersection(plane, m_support_planes[common_bbox_plane_idx].exact_plane(), line);
|
||||||
CGAL_assertion(intersect);
|
CGAL_assertion(intersect);
|
||||||
pair.first->second = m_intersection_graph.add_line(line);
|
pair.first->second = m_intersection_graph.add_line(line);
|
||||||
}
|
}
|
||||||
|
|
@ -1251,7 +1251,7 @@ public:
|
||||||
|
|
||||||
typename Intersection_kernel::Line_3 line;
|
typename Intersection_kernel::Line_3 line;
|
||||||
auto it = support_planes_idx.begin();
|
auto it = support_planes_idx.begin();
|
||||||
bool intersect = intersection(m_support_planes[*it++].exact_plane(), m_support_planes[*it++].exact_plane(), line);
|
CGAL_assertion_code(bool intersect =) intersection(m_support_planes[*it++].exact_plane(), m_support_planes[*it++].exact_plane(), line);
|
||||||
CGAL_assertion(intersect);
|
CGAL_assertion(intersect);
|
||||||
|
|
||||||
std::size_t line_idx = m_intersection_graph.add_line(line);
|
std::size_t line_idx = m_intersection_graph.add_line(line);
|
||||||
|
|
|
||||||
|
|
@ -192,8 +192,8 @@ private:
|
||||||
// Loop complete, connecting face with all edges.
|
// Loop complete, connecting face with all edges.
|
||||||
for (IEdge edge : face.edges) {
|
for (IEdge edge : face.edges) {
|
||||||
m_data.support_plane(sp_idx).add_neighbor(edge, face_idx);
|
m_data.support_plane(sp_idx).add_neighbor(edge, face_idx);
|
||||||
IFace f1 = m_data.support_plane(sp_idx).iface(edge);
|
CGAL_assertion_code(IFace f1 = m_data.support_plane(sp_idx).iface(edge);)
|
||||||
IFace f2 = m_data.support_plane(sp_idx).other(edge, f1);
|
CGAL_assertion_code(IFace f2 = m_data.support_plane(sp_idx).other(edge, f1);)
|
||||||
CGAL_assertion(f1 == face_idx || f2 == face_idx);
|
CGAL_assertion(f1 == face_idx || f2 == face_idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -590,14 +590,14 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!outside) {
|
if (!outside) {
|
||||||
if (face == -1)
|
if (face == IFace(-1))
|
||||||
face = f;
|
face = f;
|
||||||
else {
|
else {
|
||||||
std::cout << "Two faces found for " << sp_idx << " sp, f1 " << face << " f2 " << f << std::endl;
|
std::cout << "Two faces found for " << sp_idx << " sp, f1 " << face << " f2 " << f << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (face != -1) {
|
if (face != IFace(-1)) {
|
||||||
if (!m_data.igraph().face(face).part_of_partition) {
|
if (!m_data.igraph().face(face).part_of_partition) {
|
||||||
auto pface = m_data.add_iface_to_mesh(sp_idx, face);
|
auto pface = m_data.add_iface_to_mesh(sp_idx, face);
|
||||||
sp.data().initial_ifaces.push_back(face);
|
sp.data().initial_ifaces.push_back(face);
|
||||||
|
|
|
||||||
|
|
@ -150,8 +150,7 @@ public:
|
||||||
static_cast<FT>(point.y()),
|
static_cast<FT>(point.y()),
|
||||||
static_cast<FT>(point.z())));
|
static_cast<FT>(point.z())));
|
||||||
}
|
}
|
||||||
const std::size_t n = points.size();
|
CGAL_assertion(points.size() == polygon.size());
|
||||||
CGAL_assertion(n == polygon.size());
|
|
||||||
|
|
||||||
From_exact from_exact;
|
From_exact from_exact;
|
||||||
|
|
||||||
|
|
@ -232,7 +231,7 @@ public:
|
||||||
from_exact(point.y()),
|
from_exact(point.y()),
|
||||||
from_exact(point.z())));
|
from_exact(point.z())));
|
||||||
}
|
}
|
||||||
const std::size_t n = points.size();
|
CGAL_assertion_code(const std::size_t n = points.size();)
|
||||||
CGAL_assertion(n == polygon.size());
|
CGAL_assertion(n == polygon.size());
|
||||||
CGAL_assertion(n != 0);
|
CGAL_assertion(n != 0);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue