diff --git a/src/libslic3r/CutSurface.cpp b/src/libslic3r/CutSurface.cpp index c229ff246b..89d3955b29 100644 --- a/src/libslic3r/CutSurface.cpp +++ b/src/libslic3r/CutSurface.cpp @@ -3,6 +3,7 @@ ///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher ///|/ #include "CutSurface.hpp" +#include /// models_input.obj - Check transormation of model to each others /// projection_center.obj - circle representing center of projection with correct distance @@ -1429,8 +1430,8 @@ priv::CutAOIs priv::cut_from_model(CutMesh &cgal_model, // detect anomalities in visitor. bool is_valid = true; // NOTE: map are created when convert shapes to cgal model - const EdgeShapeMap& edge_shape_map = cgal_shape.property_map(edge_shape_map_name).first; - const FaceShapeMap& face_shape_map = cgal_shape.property_map(face_shape_map_name).first; + const EdgeShapeMap& edge_shape_map = cgal_shape.property_map(edge_shape_map_name).value(); + const FaceShapeMap& face_shape_map = cgal_shape.property_map(face_shape_map_name).value(); Visitor visitor{cgal_model, cgal_shape, edge_shape_map, face_shape_map, vert_shape_map, &is_valid}; // a property map containing the constrained-or-not status of each edge @@ -1579,8 +1580,8 @@ void priv::collect_surface_data(std::queue &process, void priv::create_reduce_map(ReductionMap &reduction_map, const CutMesh &mesh) { - const VertexShapeMap &vert_shape_map = mesh.property_map(vert_shape_map_name).first; - const EdgeBoolMap &ecm = mesh.property_map(is_constrained_edge_name).first; + const VertexShapeMap &vert_shape_map = mesh.property_map(vert_shape_map_name).value(); + const EdgeBoolMap &ecm = mesh.property_map(is_constrained_edge_name).value(); // check if vertex was made by edge_2 which is diagonal of quad auto is_reducible_vertex = [&vert_shape_map](VI reduction_from) -> bool { @@ -1765,10 +1766,10 @@ priv::VDistances priv::calc_distances(const SurfacePatches &patches, for (const SurfacePatch &patch : patches) { // map is created during intersection by corefine visitor const VertexShapeMap &vert_shape_map = - models[patch.model_id].property_map(vert_shape_map_name).first; + models[patch.model_id].property_map(vert_shape_map_name).value(); uint32_t patch_index = &patch - &patches.front(); // map is created during patch creation / dividing - const CvtVI2VI& cvt = patch.mesh.property_map(patch_source_name).first; + const CvtVI2VI& cvt = patch.mesh.property_map(patch_source_name).value(); // for each point on outline for (const Loop &loop : patch.loops) for (const VI &vi_patch : loop) { @@ -2929,7 +2930,7 @@ bool priv::is_patch_inside_of_model(const SurfacePatch &patch, uint32_t priv::get_shape_point_index(const CutAOI &cut, const CutMesh &model) { // map is created during intersection by corefine visitor - const VertexShapeMap &vert_shape_map = model.property_map(vert_shape_map_name).first; + const VertexShapeMap &vert_shape_map = model.property_map(vert_shape_map_name).value(); // for each half edge of outline for (HI hi : cut.second) { VI vi = model.source(hi); @@ -2954,7 +2955,7 @@ priv::SurfacePatch priv::separate_patch(const std::vector& fis, patch_new.model_id = patch.model_id; patch_new.shape_id = patch.shape_id; // fix cvt - CvtVI2VI cvt = patch_new.mesh.property_map(patch_source_name).first; + CvtVI2VI cvt = patch_new.mesh.property_map(patch_source_name).value(); for (VI &vi : cvt) { if (!vi.is_valid()) continue; vi = cvt_from[vi]; @@ -2974,7 +2975,7 @@ void priv::divide_patch(size_t i, SurfacePatchesEx &patches) std::string patch_number_name = "f:patch_number"; CutMesh::Property_map is_processed = access_pmap(cm.add_property_map(patch_number_name, false)); - const CvtVI2VI& cvt_from = patch.mesh.property_map(patch_source_name).first; + const CvtVI2VI& cvt_from = patch.mesh.property_map(patch_source_name).value(); std::vector fis; fis.reserve(cm.faces().size()); @@ -3161,7 +3162,7 @@ bool priv::is_over_whole_expoly(const CutAOI &cutAOI, const CutMesh &mesh) { // NonInterupted contour is without other point and contain all from shape - const VertexShapeMap &vert_shape_map = mesh.property_map(vert_shape_map_name).first; + const VertexShapeMap &vert_shape_map = mesh.property_map(vert_shape_map_name).value(); for (HI hi : cutAOI.second) { const IntersectingElement *ie_s = vert_shape_map[mesh.source(hi)]; const IntersectingElement *ie_t = vert_shape_map[mesh.target(hi)];