@@ -1437,9 +1437,9 @@ priv::CutAOIs priv::cut_from_model(CutMesh &cgal_model,
14371437 // detect anomalities in visitor.
14381438 bool is_valid = true ;
14391439 // NOTE: map are created when convert shapes to cgal model
1440- const EdgeShapeMap& edge_shape_map = cgal_shape.property_map <EI, IntersectingElement>(edge_shape_map_name). first ;
1441- const FaceShapeMap& face_shape_map = cgal_shape.property_map <FI, IntersectingElement>(face_shape_map_name). first ;
1442- Visitor visitor{cgal_model, cgal_shape, edge_shape_map, face_shape_map, vert_shape_map, &is_valid};
1440+ auto edge_shape_map = cgal_shape.property_map <EI, IntersectingElement>(edge_shape_map_name);
1441+ auto face_shape_map = cgal_shape.property_map <FI, IntersectingElement>(face_shape_map_name);
1442+ Visitor visitor{cgal_model, cgal_shape, edge_shape_map. value () , face_shape_map. value () , vert_shape_map, &is_valid};
14431443
14441444 // a property map containing the constrained-or-not status of each edge
14451445 EdgeBoolMap ecm = cgal_model.add_property_map <EI, bool >(is_constrained_edge_name, false ).first ;
@@ -1587,8 +1587,10 @@ void priv::collect_surface_data(std::queue<FI> &process,
15871587
15881588void priv::create_reduce_map (ReductionMap &reduction_map, const CutMesh &mesh)
15891589{
1590- const VertexShapeMap &vert_shape_map = mesh.property_map <VI, const IntersectingElement*>(vert_shape_map_name).first ;
1591- const EdgeBoolMap &ecm = mesh.property_map <EI, bool >(is_constrained_edge_name).first ;
1590+ auto optional_vert_shape_map = mesh.property_map <VI, const IntersectingElement*>(vert_shape_map_name);
1591+ const VertexShapeMap &vert_shape_map = optional_vert_shape_map.value ();
1592+ auto optional_ecm = mesh.property_map <EI, bool >(is_constrained_edge_name);
1593+ const EdgeBoolMap &ecm = optional_ecm.value ();
15921594
15931595 // check if vertex was made by edge_2 which is diagonal of quad
15941596 auto is_reducible_vertex = [&vert_shape_map](VI reduction_from) -> bool {
@@ -1772,11 +1774,13 @@ priv::VDistances priv::calc_distances(const SurfacePatches &patches,
17721774 priv::VDistances result (count_shapes_points);
17731775 for (const SurfacePatch &patch : patches) {
17741776 // map is created during intersection by corefine visitor
1775- const VertexShapeMap &vert_shape_map =
1776- models[patch.model_id ].property_map <VI, const IntersectingElement *>(vert_shape_map_name).first ;
1777+ auto optional_vert_shape_map =
1778+ models[patch.model_id ].property_map <VI, const IntersectingElement *>(vert_shape_map_name);
1779+ const VertexShapeMap &vert_shape_map = optional_vert_shape_map.value ();
17771780 uint32_t patch_index = &patch - &patches.front ();
17781781 // map is created during patch creation / dividing
1779- const CvtVI2VI& cvt = patch.mesh .property_map <VI, VI>(patch_source_name).first ;
1782+ auto optional_cvt = patch.mesh .property_map <VI, VI>(patch_source_name);
1783+ const CvtVI2VI& cvt = optional_cvt.value ();
17801784 // for each point on outline
17811785 for (const Loop &loop : patch.loops )
17821786 for (const VI &vi_patch : loop) {
@@ -2785,7 +2789,7 @@ using BBS = std::vector<BoundingBoxf3>;
27852789BBS create_bbs (const VCutAOIs &cuts, const CutMeshes &cut_models);
27862790
27872791using Primitive = CGAL::AABB_face_graph_triangle_primitive<CutMesh>;
2788- using Traits = CGAL::AABB_traits <EpicKernel, Primitive>;
2792+ using Traits = CGAL::AABB_traits_3 <EpicKernel, Primitive>;
27892793using Ray = EpicKernel::Ray_3;
27902794using Tree = CGAL::AABB_tree<Traits>;
27912795using Trees = std::vector<Tree>;
@@ -2939,7 +2943,8 @@ bool priv::is_patch_inside_of_model(const SurfacePatch &patch,
29392943uint32_t priv::get_shape_point_index (const CutAOI &cut, const CutMesh &model)
29402944{
29412945 // map is created during intersection by corefine visitor
2942- const VertexShapeMap &vert_shape_map = model.property_map <VI, const IntersectingElement *>(vert_shape_map_name).first ;
2946+ auto optional_vert_shape_map = model.property_map <VI, const IntersectingElement *>(vert_shape_map_name);
2947+ const VertexShapeMap &vert_shape_map = optional_vert_shape_map.value ();
29432948 // for each half edge of outline
29442949 for (HI hi : cut.second ) {
29452950 VI vi = model.source (hi);
@@ -2964,7 +2969,7 @@ priv::SurfacePatch priv::separate_patch(const std::vector<FI>& fis,
29642969 patch_new.model_id = patch.model_id ;
29652970 patch_new.shape_id = patch.shape_id ;
29662971 // fix cvt
2967- CvtVI2VI cvt = patch_new.mesh .property_map <VI, VI>(patch_source_name).first ;
2972+ CvtVI2VI cvt = patch_new.mesh .property_map <VI, VI>(patch_source_name).value () ;
29682973 for (VI &vi : cvt) {
29692974 if (!vi.is_valid ()) continue ;
29702975 vi = cvt_from[vi];
@@ -2984,7 +2989,8 @@ void priv::divide_patch(size_t i, SurfacePatchesEx &patches)
29842989 std::string patch_number_name = " f:patch_number" ;
29852990 CutMesh::Property_map<FI,bool > is_processed = cm.add_property_map <FI, bool >(patch_number_name, false ).first ;
29862991
2987- const CvtVI2VI& cvt_from = patch.mesh .property_map <VI, VI>(patch_source_name).first ;
2992+ auto optional_cvt_from = patch.mesh .property_map <VI, VI>(patch_source_name);
2993+ const CvtVI2VI& cvt_from = optional_cvt_from.value ();
29882994
29892995 std::vector<FI> fis;
29902996 fis.reserve (cm.faces ().size ());
@@ -3171,7 +3177,8 @@ bool priv::is_over_whole_expoly(const CutAOI &cutAOI,
31713177 const CutMesh &mesh)
31723178{
31733179 // NonInterupted contour is without other point and contain all from shape
3174- const VertexShapeMap &vert_shape_map = mesh.property_map <VI, const IntersectingElement*>(vert_shape_map_name).first ;
3180+ auto optional_vert_shape_map = mesh.property_map <VI, const IntersectingElement*>(vert_shape_map_name);
3181+ const VertexShapeMap &vert_shape_map = optional_vert_shape_map.value ();
31753182 for (HI hi : cutAOI.second ) {
31763183 const IntersectingElement *ie_s = vert_shape_map[mesh.source (hi)];
31773184 const IntersectingElement *ie_t = vert_shape_map[mesh.target (hi)];
0 commit comments