Commit f00797e5 authored by untereiner's avatar untereiner

q corrections bug

parent 8ce52f3c
......@@ -61,7 +61,7 @@ int main(int argc, char **argv)
PFP::MAP myMap;
std::vector<std::string> attrNames ;
Algo::Import::importMesh<PFP>(myMap, argv[1], attrNames);
Algo::Surface::Import::importMesh<PFP>(myMap, argv[1], attrNames);
// get a handler to the 3D vector attribute created by the import
VertexAttribute<PFP::VEC3> position = myMap.getAttribute<PFP::VEC3, VERTEX>(attrNames[0]);
......@@ -70,7 +70,7 @@ int main(int argc, char **argv)
if(!positionF.isValid())
positionF = myMap.addAttribute<PFP::VEC3, FACE>("position") ;
Algo::Geometry::computeCentroidFaces<PFP>(myMap, position, positionF) ;
Algo::Surface::Geometry::computeCentroidFaces<PFP>(myMap, position, positionF) ;
myMap.computeDual();
......@@ -84,7 +84,7 @@ int main(int argc, char **argv)
//const std::type_info &t1 = typeid(&positionF);
//std::cout << "type name : " << t1.name() << std::endl;
Algo::Export::exportOFF<PFP>(myMap, position, "result.off");
Algo::Surface::Export::exportOFF<PFP>(myMap, position, "result.off");
std::cout << "Exported" << std::endl;
return 0;
......
......@@ -61,7 +61,7 @@ int main(int argc, char **argv)
PFP::MAP myMap;
std::vector<std::string> attrNames ;
Algo::Import::importMeshV<PFP>(myMap, argv[1], attrNames, Algo::Import::ImportVolumique::NODE);
Algo::Volume::Import::importMeshV<PFP>(myMap, argv[1], attrNames, Algo::Volume::Import::NODE);
// get a handler to the 3D vector attribute created by the import
VertexAttribute<PFP::VEC3> position = myMap.getAttribute<PFP::VEC3, VERTEX>(attrNames[0]);
......@@ -70,12 +70,12 @@ int main(int argc, char **argv)
if(!positionV.isValid())
positionV = myMap.addAttribute<PFP::VEC3, VOLUME>("position") ;
Algo::Geometry::computeCentroidVolumes<PFP>(myMap, position, positionV) ;
Algo::Volume::Geometry::computeCentroidVolumes<PFP>(myMap, position, positionV) ;
Dart dsave = NIL;
for(Dart d = myMap.begin() ; d != myMap.end() ; myMap.next(d))
{
if(myMap.isBoundaryMarked(d))
if(myMap.isBoundaryMarked3(d))
{
dsave = d;
break;
......
......@@ -31,6 +31,9 @@ namespace CGoGN
namespace Algo
{
namespace Surface
{
namespace Geometry
{
......@@ -42,6 +45,8 @@ bool isEdgeConvexe(typename PFP::MAP& map, Dart d, const VertexAttribute<typenam
} // namespace Geometry
} // namespace Surface
} // namespace Algo
} // namespace CGoGN
......
......@@ -33,6 +33,9 @@ namespace CGoGN
namespace Algo
{
namespace Surface
{
namespace Geometry
{
......@@ -42,7 +45,7 @@ bool isEdgeConvexe(typename PFP::MAP& map, Dart d, const VertexAttribute<typenam
typedef typename PFP::VEC3 VEC3 ;
const VEC3 n = faceNormal<PFP>(map, d, position);
const VEC3 e = Algo::Geometry::vectorOutOfDart<PFP>(map, map.phi1(map.phi2(d)), position) ;
const VEC3 e = vectorOutOfDart<PFP>(map, map.phi1(map.phi2(d)), position) ;
if((e * n) > 0)
return true;
......@@ -52,6 +55,8 @@ bool isEdgeConvexe(typename PFP::MAP& map, Dart d, const VertexAttribute<typenam
} // namespace Geometry
} // namespace Surface
} // namespace Algo
} // namespace CGoGN
......@@ -93,20 +93,6 @@ public:
*/
AttributeHandler() ;
template <unsigned int ORBIT2>
AttributeHandler(const AttributeHandler<T, ORBIT2>& h):
AttributeHandlerGen(h.m_map, h.valid)
{
m_attrib = h.m_attrib;
if(m_attrib->getOrbit() == ORBIT2)
{
if(valid)
registerInMap() ;
}
else
valid = false;
}
/**
* Constructor
* @param m the map which belong attribute
......
......@@ -945,9 +945,9 @@ void Map2::computeDual()
//boundary management
for(Dart d = begin(); d != end(); next(d))
{
if(isBoundaryMarked(d))
if(isBoundaryMarked2(d))
{
boundaryMarkOrbit<FACE>(deleteVertex(phi2(d)));
boundaryMarkOrbit<FACE,2>(deleteVertex(phi2(d)));
}
}
}
......@@ -959,10 +959,10 @@ void Map2::computeDualBorderConstraint()
std::vector<Dart> oldb;
for(Dart d = begin(); d != end(); next(d))
{
if(isBoundaryMarked(d))
if(isBoundaryMarked2(d))
{
oldb.push_back(d);
boundaryUnmarkOrbit<FACE>(d);
boundaryUnmarkOrbit<FACE,2>(d);
}
}
......@@ -1014,9 +1014,9 @@ void Map2::computeDualBorderConstraint()
//boundary management
for(Dart d = begin(); d != end(); next(d))
{
if(isBoundaryMarked(d))
if(isBoundaryMarked2(d))
{
boundaryMarkOrbit<FACE>(deleteVertex(phi2(d)));
boundaryMarkOrbit<FACE,2>(deleteVertex(phi2(d)));
}
}
......
......@@ -945,7 +945,7 @@ bool Map3::check()
Dart d2 = phi2(d);
if (phi2(d2) != d) // phi2 involution ?
{
if(isBoundaryMarked(d))
if(isBoundaryMarked3(d))
std::cout << "Boundary case - ";
std::cout << "Check: phi2 is not an involution" << std::endl;
......@@ -955,7 +955,7 @@ bool Map3::check()
Dart d1 = phi1(d);
if (phi_1(d1) != d) // phi1 a une image correcte ?
{
if(isBoundaryMarked(d))
if(isBoundaryMarked3(d))
std::cout << "Boundary case - ";
std::cout << "Check: unconsistent phi_1 link" << std::endl;
......@@ -964,7 +964,7 @@ bool Map3::check()
if (m.isMarked(d1)) // phi1 a un seul antécédent ?
{
if(isBoundaryMarked(d))
if(isBoundaryMarked3(d))
std::cout << "Boundary case - ";
std::cout << "Check: dart with two phi1 predecessors" << std::endl;
......@@ -974,7 +974,7 @@ bool Map3::check()
if (d1 == d)
{
if(isBoundaryMarked(d))
if(isBoundaryMarked3(d))
std::cout << "Boundary case - ";
std::cout << "Check: (warning) face loop (one edge)" << std::endl;
......@@ -982,7 +982,7 @@ bool Map3::check()
if (phi1(d1) == d)
{
if(isBoundaryMarked(d))
if(isBoundaryMarked3(d))
std::cout << "Boundary case - ";
std::cout << "Check: (warning) face with only two edges" << std::endl;
......@@ -990,7 +990,7 @@ bool Map3::check()
if (phi2(d1) == d)
{
if(isBoundaryMarked(d))
if(isBoundaryMarked3(d))
std::cout << "Boundary case - ";
std::cout << "Check: (warning) dandling edge (phi2)" << std::endl;
......@@ -998,7 +998,7 @@ bool Map3::check()
if (phi3(d1) == d)
{
if(isBoundaryMarked(d))
if(isBoundaryMarked3(d))
std::cout << "Boundary case - ";
std::cout << "Check: (warning) dandling edge (phi3)" << std::endl;
......@@ -1009,7 +1009,7 @@ bool Map3::check()
{
if (!m.isMarked(d)) // phi1 a au moins un antécédent ?
{
if(isBoundaryMarked(d))
if(isBoundaryMarked3(d))
std::cout << "Boundary case - ";
std::cout << "Check: dart with no phi1 predecessor" << std::endl;
......@@ -1208,7 +1208,7 @@ void Map3::computeDual()
std::vector<Dart> v;
for(Dart d = begin(); d != end(); next(d))
{
if(!cv.isMarked(d) && isBoundaryMarked(d))
if(!cv.isMarked(d) && isBoundaryMarked3(d))
{
++count;
v.push_back(d);
......@@ -1259,7 +1259,7 @@ void Map3::computeDual()
for(std::vector<Dart>::iterator it = v.begin() ; it != v.end() ; ++it)
{
boundaryUnmarkOrbit<VOLUME>(*it);
boundaryUnmarkOrbit<VOLUME,3>(*it);
}
for(std::vector<Dart>::iterator it = v.begin() ; it != v.end() ; ++it)
......
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