mirror of https://github.com/CGAL/cgal
Add precondition that sizing field and remeshing vpmap must be the same
This commit is contained in:
parent
35153d509d
commit
040b9ab194
|
|
@ -223,12 +223,14 @@ public:
|
||||||
return boost::none;
|
return boost::none;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Point_3 split_placement(const halfedge_descriptor h, const PolygonMesh& pmesh) const
|
Point_3 split_placement(const halfedge_descriptor h, const PolygonMesh& pmesh) const
|
||||||
{
|
{
|
||||||
return midpoint(get(m_vpmap, target(h, pmesh)),
|
return midpoint(get(m_vpmap, target(h, pmesh)),
|
||||||
get(m_vpmap, source(h, pmesh)));
|
get(m_vpmap, source(h, pmesh)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const DefaultVPMap& get_vpmap() const { return m_vpmap; }
|
||||||
|
|
||||||
void update_sizing_map(const vertex_descriptor v, const PolygonMesh& pmesh)
|
void update_sizing_map(const vertex_descriptor v, const PolygonMesh& pmesh)
|
||||||
{
|
{
|
||||||
// calculating it as the average of two vertices on other ends
|
// calculating it as the average of two vertices on other ends
|
||||||
|
|
|
||||||
|
|
@ -126,12 +126,14 @@ public:
|
||||||
return boost::none;
|
return boost::none;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Point_3 split_placement(const halfedge_descriptor h, const PolygonMesh& pmesh) const
|
Point_3 split_placement(const halfedge_descriptor h, const PolygonMesh& pmesh) const
|
||||||
{
|
{
|
||||||
return midpoint(get(m_vpmap, target(h, pmesh)),
|
return midpoint(get(m_vpmap, target(h, pmesh)),
|
||||||
get(m_vpmap, source(h, pmesh)));
|
get(m_vpmap, source(h, pmesh)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const VPMap& get_vpmap() const { return m_vpmap; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FT m_sq_short;
|
FT m_sq_short;
|
||||||
FT m_sq_long;
|
FT m_sq_long;
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,8 @@ public:
|
||||||
const PolygonMesh& pmesh) const = 0;
|
const PolygonMesh& pmesh) const = 0;
|
||||||
virtual Point_3 split_placement(const halfedge_descriptor h, const PolygonMesh& pmesh) const = 0;
|
virtual Point_3 split_placement(const halfedge_descriptor h, const PolygonMesh& pmesh) const = 0;
|
||||||
|
|
||||||
|
virtual const VPMap& get_vpmap() const = 0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}//end namespace CGAL
|
}//end namespace CGAL
|
||||||
|
|
|
||||||
|
|
@ -277,6 +277,9 @@ void isotropic_remeshing(const FaceRange& faces
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
CGAL_precondition_msg((sizing.get_vpmap()) == vpmap, "Input mesh/vertex point map is not the same as the "
|
||||||
|
"one used for sizing field. Remeshing aborted.");
|
||||||
|
|
||||||
#ifdef CGAL_PMP_REMESHING_VERBOSE
|
#ifdef CGAL_PMP_REMESHING_VERBOSE
|
||||||
t.stop();
|
t.stop();
|
||||||
std::cout << "\rRemeshing parameters done ("<< t.time() <<" sec)" << std::endl;
|
std::cout << "\rRemeshing parameters done ("<< t.time() <<" sec)" << std::endl;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue