Commit 294531ab authored by Thomas's avatar Thomas
Browse files

embeddedMap3 : unsewVolume, mauvais brin en param

parent 9aed1375
...@@ -32,24 +32,31 @@ SimpleGMap3::SimpleGMap3() ...@@ -32,24 +32,31 @@ SimpleGMap3::SimpleGMap3()
{ {
position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position"); position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position");
Algo::Modelisation::Primitive3D<PFP> prim(myMap,position); // Algo::Modelisation::Primitive3D<PFP> prim(myMap,position);
Dart d = prim.hexaGrid_topo(2,2,1); // Dart d = prim.hexaGrid_topo(2,2,1);
prim.embedHexaGrid(1,1,1); // prim.embedHexaGrid(1,1,1);
//
Dart d1 = myMap.phi1(myMap.phi1(myMap.phi2(myMap.phi1(myMap.phi1(d))))); // Dart d1 = myMap.phi1(myMap.phi1(myMap.phi2(myMap.phi1(myMap.phi1(d)))));
VEC3 mid0 = (position[d1]+position[myMap.phi1(d1)])/2.0f; // VEC3 mid0 = (position[d1]+position[myMap.phi1(d1)])/2.0f;
myMap.cutEdge(d1); // myMap.cutEdge(d1);
position[myMap.phi1(d1)] = mid0; // position[myMap.phi1(d1)] = mid0;
//
VEC3 mid1 = (position[d]+position[myMap.phi1(d)])/2.0f; // VEC3 mid1 = (position[d]+position[myMap.phi1(d)])/2.0f;
myMap.cutEdge(d); // myMap.cutEdge(d);
position[myMap.phi1(d)] = mid1; // position[myMap.phi1(d)] = mid1;
//
// d = myMap.phi1(myMap.phi1(d)); //// d = myMap.phi1(myMap.phi1(d));
d = myMap.phi1(myMap.phi1(myMap.phi2(myMap.phi1(myMap.phi1(d))))); // d = myMap.phi1(myMap.phi1(myMap.phi2(myMap.phi1(myMap.phi1(d)))));
VEC3 mid = (position[d]+position[myMap.phi1(d)])/2.0f; // VEC3 mid = (position[d]+position[myMap.phi1(d)])/2.0f;
myMap.cutEdge(d); // myMap.cutEdge(d);
position[myMap.phi1(d)] = mid; // position[myMap.phi1(d)] = mid;
Algo::Modelisation::Primitive3D<PFP> prim2(myMap,position);
Dart d = prim2.hexaGrid_topo(2,1,1);
prim2.embedHexaGrid(1,1,1);
d = myMap.phi2(myMap.phi1(myMap.phi1(myMap.phi2(d))));
myMap.unsewVolumes(d);
} }
void SimpleGMap3::initGUI() void SimpleGMap3::initGUI()
......
...@@ -80,10 +80,10 @@ void EmbeddedMap3<MAP3>::unsewVolumes(Dart d) ...@@ -80,10 +80,10 @@ void EmbeddedMap3<MAP3>::unsewVolumes(Dart d)
{ {
if(MAP3::isOrbitEmbedded(VERTEX)) if(MAP3::isOrbitEmbedded(VERTEX))
{ {
if(!MAP3::sameVertex(d,dd)) if(!MAP3::sameVertex(ddd,dd))
{ {
MAP3::embedNewCell(VERTEX, dd); MAP3::embedNewCell(VERTEX, dd);
MAP3::copyCell(VERTEX, dd, d); MAP3::copyCell(VERTEX, dd, ddd);
} }
} }
...@@ -91,10 +91,10 @@ void EmbeddedMap3<MAP3>::unsewVolumes(Dart d) ...@@ -91,10 +91,10 @@ void EmbeddedMap3<MAP3>::unsewVolumes(Dart d)
if(MAP3::isOrbitEmbedded(EDGE)) if(MAP3::isOrbitEmbedded(EDGE))
{ {
if(!MAP3::sameEdge(d,dd)) if(!MAP3::sameEdge(ddd,dd))
{ {
MAP3::embedNewCell(EDGE, dd); MAP3::embedNewCell(EDGE, dd);
MAP3::copyCell(VERTEX, dd, d); MAP3::copyCell(VERTEX, dd, ddd);
} }
} }
...@@ -104,6 +104,8 @@ void EmbeddedMap3<MAP3>::unsewVolumes(Dart d) ...@@ -104,6 +104,8 @@ void EmbeddedMap3<MAP3>::unsewVolumes(Dart d)
if (MAP3::isOrbitEmbedded(FACE)) if (MAP3::isOrbitEmbedded(FACE))
{ {
std::cout << "newCell f" << std::endl;
MAP3::embedNewCell(FACE, dd); MAP3::embedNewCell(FACE, dd);
MAP3::copyCell(FACE, dd, d); MAP3::copyCell(FACE, dd, d);
} }
......
Supports Markdown
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