TriangleMeshSlicer.cpp: Fixed compilation of debug output
This commit is contained in:
parent
f2f9b89096
commit
c585aaa1cb
@ -34,6 +34,10 @@
|
|||||||
|
|
||||||
// #define SLIC3R_DEBUG_SLICE_PROCESSING
|
// #define SLIC3R_DEBUG_SLICE_PROCESSING
|
||||||
|
|
||||||
|
#ifdef SLIC3R_DEBUG_SLICE_PROCESSING
|
||||||
|
#define DEBUG_INTERSECTIONLINE
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(SLIC3R_DEBUG) || defined(SLIC3R_DEBUG_SLICE_PROCESSING)
|
#if defined(SLIC3R_DEBUG) || defined(SLIC3R_DEBUG_SLICE_PROCESSING)
|
||||||
#include "SVG.hpp"
|
#include "SVG.hpp"
|
||||||
#endif
|
#endif
|
||||||
@ -125,7 +129,7 @@ public:
|
|||||||
};
|
};
|
||||||
uint32_t flags { 0 };
|
uint32_t flags { 0 };
|
||||||
|
|
||||||
#if DEBUG_INTERSECTIONLINE
|
#ifdef DEBUG_INTERSECTIONLINE
|
||||||
enum class Source {
|
enum class Source {
|
||||||
BottomPlane,
|
BottomPlane,
|
||||||
TopPlane,
|
TopPlane,
|
||||||
@ -1446,19 +1450,19 @@ static std::vector<Polygons> make_slab_loops(
|
|||||||
for (const IntersectionLine &l : lines.at_slice[slice_below])
|
for (const IntersectionLine &l : lines.at_slice[slice_below])
|
||||||
if (l.edge_type != IntersectionLine::FacetEdgeType::Top) {
|
if (l.edge_type != IntersectionLine::FacetEdgeType::Top) {
|
||||||
in.emplace_back(l);
|
in.emplace_back(l);
|
||||||
#if DEBUG_INTERSECTIONLINE
|
#ifdef DEBUG_INTERSECTIONLINE
|
||||||
in.back().source = IntersectionLine::Source::BottomPlane;
|
in.back().source = IntersectionLine::Source::BottomPlane;
|
||||||
#endif // DEBUG_INTERSECTIONLINE
|
#endif // DEBUG_INTERSECTIONLINE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
// Edges in between slice_below and slice_above.
|
// Edges in between slice_below and slice_above.
|
||||||
#if DEBUG_INTERSECTIONLINE
|
#ifdef DEBUG_INTERSECTIONLINE
|
||||||
size_t old_size = in.size();
|
size_t old_size = in.size();
|
||||||
#endif // DEBUG_INTERSECTIONLINE
|
#endif // DEBUG_INTERSECTIONLINE
|
||||||
// Edge IDs of end points on in-between lines that touch the layer above are already increased with num_edges.
|
// Edge IDs of end points on in-between lines that touch the layer above are already increased with num_edges.
|
||||||
append(in, lines.between_slices[line_idx]);
|
append(in, lines.between_slices[line_idx]);
|
||||||
#if DEBUG_INTERSECTIONLINE
|
#ifdef DEBUG_INTERSECTIONLINE
|
||||||
for (auto it = in.begin() + old_size; it != in.end(); ++ it) {
|
for (auto it = in.begin() + old_size; it != in.end(); ++ it) {
|
||||||
assert(it->edge_type == IntersectionLine::FacetEdgeType::Slab);
|
assert(it->edge_type == IntersectionLine::FacetEdgeType::Slab);
|
||||||
it->source = IntersectionLine::Source::Slab;
|
it->source = IntersectionLine::Source::Slab;
|
||||||
@ -1476,7 +1480,7 @@ static std::vector<Polygons> make_slab_loops(
|
|||||||
l.edge_a_id += num_edges;
|
l.edge_a_id += num_edges;
|
||||||
if (l.edge_b_id >= 0)
|
if (l.edge_b_id >= 0)
|
||||||
l.edge_b_id += num_edges;
|
l.edge_b_id += num_edges;
|
||||||
#if DEBUG_INTERSECTIONLINE
|
#ifdef DEBUG_INTERSECTIONLINE
|
||||||
l.source = IntersectionLine::Source::TopPlane;
|
l.source = IntersectionLine::Source::TopPlane;
|
||||||
#endif // DEBUG_INTERSECTIONLINE
|
#endif // DEBUG_INTERSECTIONLINE
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user