mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 17:05:53 +08:00
fix:
../src/libslic3r/CutSurface.cpp:368:110: error: cannot bind non-const lvalue reference of type 'CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epick> >::Property_map<CGAL::SM_Edge_index, priv::IntersectingElement>&' to an rvalue of type 'CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epick> >::Property_map<CGAL::SM_Edge_index, priv::IntersectingElement>' ../src/libslic3r/CutSurface.cpp:369:110: error: cannot bind non-const lvalue reference of type 'CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epick> >::Property_map<CGAL::SM_Face_index, priv::IntersectingElement>&' to an rvalue of type 'CGAL::Surface_mesh<CGAL::Point_3<CGAL::Epick> >::Property_map<CGAL::SM_Face_index, priv::IntersectingElement>' ../src/libslic3r/CutSurface.cpp:482:41: warning: comparison of integer expressions of different signedness: 'int32_t' {aka 'int'} and 'std::vector<CGAL::SM_Vertex_index, std::allocator<CGAL::SM_Vertex_index> >::size_type' {aka 'long unsigned int'} [-Wsign-compare] ../src/libslic3r/CutSurface.cpp:522:12: warning: unused variable 'count' [-Wunused-variable] ../src/libslic3r/CutSurface.cpp:1041:15: warning: unused variable 'color' [-Wunused-variable]
This commit is contained in:
parent
a7d3195ec0
commit
d9249024ba
@ -367,8 +367,8 @@ void store(const SurfaceCuts &cut, const std::string &file_prefix);
|
||||
} // namespace privat
|
||||
|
||||
SurfaceCuts Slic3r::cut_surface(const indexed_triangle_set &model,
|
||||
const ExPolygons &shapes,
|
||||
const Emboss::IProject &projection)
|
||||
const ExPolygons &shapes,
|
||||
const Emboss::IProject &projection)
|
||||
{
|
||||
priv::CutMesh cgal_model = priv::to_cgal(model);
|
||||
|
||||
@ -376,8 +376,8 @@ SurfaceCuts Slic3r::cut_surface(const indexed_triangle_set &model,
|
||||
std::string face_shape_map_name = "f:IntersectingElement";
|
||||
priv::CutMesh cgal_shape = priv::to_cgal(shapes, projection, edge_shape_map_name, face_shape_map_name);
|
||||
|
||||
auto& edge_shape_map = cgal_shape.property_map<priv::EI, priv::IntersectingElement>(edge_shape_map_name).first;
|
||||
auto& face_shape_map = cgal_shape.property_map<priv::FI, priv::IntersectingElement>(face_shape_map_name).first;
|
||||
auto edge_shape_map = cgal_shape.property_map<priv::EI, priv::IntersectingElement>(edge_shape_map_name).first;
|
||||
auto face_shape_map = cgal_shape.property_map<priv::FI, priv::IntersectingElement>(face_shape_map_name).first;
|
||||
|
||||
std::string vert_shape_map_name = "v:IntersectingElement";
|
||||
// pointer to edge or face shape_map
|
||||
@ -490,7 +490,7 @@ priv::CutMesh priv::to_cgal(const ExPolygons &shapes,
|
||||
uint32_t contour_index = 0;
|
||||
for (int32_t i = 0; i < int32_t(indices.size()); i += 2) {
|
||||
bool is_first = i == 0;
|
||||
bool is_last = (i + 2) >= indices.size();
|
||||
bool is_last = size_t(i + 2) >= indices.size();
|
||||
int32_t j = is_last ? 0 : (i + 2);
|
||||
|
||||
auto fi1 = result.add_face(indices[i], indices[i + 1], indices[j]);
|
||||
@ -530,7 +530,6 @@ void priv::set_face_type(FaceTypeMap &face_type_map,
|
||||
const Project &project,
|
||||
const CutMesh &shape_mesh)
|
||||
{
|
||||
size_t count = 0;
|
||||
for (auto& fi : mesh.faces()) {
|
||||
FaceType face_type = FaceType::not_constrained;
|
||||
auto hi_end = mesh.halfedge(fi);
|
||||
@ -1049,7 +1048,6 @@ void priv::store(CutMesh &mesh, const ReductionMap &reduction_map, const std::st
|
||||
vertex_colors[vi] = CGAL::Color{127, 127, 127};
|
||||
|
||||
for (VI reduction_from : mesh.vertices()) {
|
||||
auto &color = vertex_colors[reduction_from];
|
||||
VI reduction_to = reduction_map[reduction_from];
|
||||
if (reduction_to != reduction_from) {
|
||||
vertex_colors[reduction_from] = CGAL::Color{255, 0, 0};
|
||||
|
Loading…
x
Reference in New Issue
Block a user