Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit c6662a5f authored by Sauvage's avatar Sauvage
Browse files

collector : ajout du bord dans le calcul des courbures par normal Cycles

parent 6041d67d
......@@ -165,6 +165,15 @@ void Collector_OneRing<PFP>::computeNormalCyclesTensor (const VertexAttribute<VE
tensor += Geom::transposed_vectors_mult(e,e) * edgeangle[*it] * (1 / e.norm()) ;
}
// collect edges on the border
// TODO : should be an option ?
// TODO : not boundary safe
for (std::vector<Dart>::const_iterator it = this->border.begin(); it != this->border.end(); ++it)
{
const VEC3 e = Algo::Geometry::vectorOutOfDart<PFP>(this->map, *it, pos) ;
tensor += Geom::transposed_vectors_mult(e,e) * edgeangle[*it] * (1 / e.norm()) ;
}
tensor /= computeArea(pos) ;
}
......@@ -182,6 +191,16 @@ void Collector_OneRing<PFP>::computeNormalCyclesTensor (const VertexAttribute<VE
tensor += Geom::transposed_vectors_mult(e,e) * edgeangle * (1 / e.norm()) ;
}
// collect edges on the border
// TODO : should be an option ?
// TODO : not boundary safe
for (std::vector<Dart>::const_iterator it = this->border.begin(); it != this->border.end(); ++it)
{
const VEC3 e = Algo::Geometry::vectorOutOfDart<PFP>(this->map, *it, pos) ;
const REAL edgeangle = Algo::Geometry::computeAngleBetweenNormalsOnEdge<PFP>(this->map, *it, pos) ;
tensor += Geom::transposed_vectors_mult(e,e) * edgeangle * (1 / e.norm()) ;
}
tensor /= computeArea(pos) ;
}
......@@ -271,6 +290,15 @@ void Collector_OneRing_AroundEdge<PFP>::computeNormalCyclesTensor (const VertexA
tensor += Geom::transposed_vectors_mult(e,e) * edgeangle[*it] * (1 / e.norm()) ;
}
// collect edges on the border
// TODO : should be an option ?
// TODO : not boundary safe
for (std::vector<Dart>::const_iterator it = this->border.begin(); it != this->border.end(); ++it)
{
const VEC3 e = Algo::Geometry::vectorOutOfDart<PFP>(this->map, *it, pos) ;
tensor += Geom::transposed_vectors_mult(e,e) * edgeangle[*it] * (1 / e.norm()) ;
}
tensor /= computeArea(pos) ;
}
......@@ -288,6 +316,16 @@ void Collector_OneRing_AroundEdge<PFP>::computeNormalCyclesTensor (const VertexA
tensor += Geom::transposed_vectors_mult(e,e) * edgeangle * (1 / e.norm()) ;
}
// collect edges on the border
// TODO : should be an option ?
// TODO : not boundary safe
for (std::vector<Dart>::const_iterator it = this->border.begin(); it != this->border.end(); ++it)
{
const VEC3 e = Algo::Geometry::vectorOutOfDart<PFP>(this->map, *it, pos) ;
const REAL edgeangle = Algo::Geometry::computeAngleBetweenNormalsOnEdge<PFP>(this->map, *it, pos) ;
tensor += Geom::transposed_vectors_mult(e,e) * edgeangle * (1 / e.norm()) ;
}
tensor /= computeArea(pos) ;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment