1497 |
const SurfaceMeshOfTriangles& surfmesh, |
const SurfaceMeshOfTriangles& surfmesh, |
1498 |
const Connectivity<Triangle>& connect, |
const Connectivity<Triangle>& connect, |
1499 |
const std::set<const Cell*>& toTreatHexahedra) { |
const std::set<const Cell*>& toTreatHexahedra) { |
1500 |
|
//pour etre sur qu'on traite bien tous les tr qu'il faut |
1501 |
|
std::map<const Triangle*,size_t> listTreat; |
1502 |
//to put the reference by front |
//to put the reference by front |
1503 |
std::list<const Triangle*> front; |
std::list<const Triangle*> front; |
1504 |
int frontSize = 0; |
int frontSize = 0; |
1518 |
or (*edgesRefVertex[numobject])[&(*T)(1)]==2 |
or (*edgesRefVertex[numobject])[&(*T)(1)]==2 |
1519 |
or (*edgesRefVertex[numobject])[&(*T)(2)]==2)) { |
or (*edgesRefVertex[numobject])[&(*T)(2)]==2)) { |
1520 |
front.push_front(T); |
front.push_front(T); |
1521 |
|
listTreat[T]=1; |
1522 |
frontSize++; |
frontSize++; |
1523 |
const Triangle*& TT=(*listOfTriangleMeshFront.find(T)).second; |
const Triangle*& TT=(*listOfTriangleMeshFront.find(T)).second; |
1524 |
// on traite le triangle du front |
// on traite le triangle du front |
1525 |
Vertex A(-0.000141,0.129744,0.110641); |
/*Vertex A(0.350000 ,0.068570, 0.368570); |
1526 |
if(Norm(A-(*T)(0))<1e-6 or Norm(A-(*T)(1))<1e-6 or Norm(A-(*T)(2))<1e-6 ){ |
if(Norm(A-(*T)(0))<1e-6 or Norm(A-(*T)(1))<1e-6 or Norm(A-(*T)(2))<1e-6 ){ |
1527 |
ffout(4)<<"=============\n"; |
ffout(4)<<"=============\n"; |
1528 |
ffout(4)<<(*T)(0)<<"\n"; |
ffout(4)<<(*T)(0)<<"\n"; |
1531 |
ffout(4)<<(*edgesRefVertex[numobject])[&(*T)(0)]<<"\n"; |
ffout(4)<<(*edgesRefVertex[numobject])[&(*T)(0)]<<"\n"; |
1532 |
ffout(4)<<(*edgesRefVertex[numobject])[&(*T)(1)]<<"\n"; |
ffout(4)<<(*edgesRefVertex[numobject])[&(*T)(1)]<<"\n"; |
1533 |
ffout(4)<<(*edgesRefVertex[numobject])[&(*T)(2)]<<"\n"; |
ffout(4)<<(*edgesRefVertex[numobject])[&(*T)(2)]<<"\n"; |
1534 |
} |
}*/ |
1535 |
|
|
1536 |
__putEdgeRef(T,TT,numobject,O1,O2); |
__putEdgeRef(T,TT,numobject,O1,O2); |
1537 |
if(Norm(A-(*T)(0))<1e-6 or Norm(A-(*T)(1))<1e-6 or Norm(A-(*T)(2))<1e-6 ){ |
/* if(Norm(A-(*T)(0))<1e-6 or Norm(A-(*T)(1))<1e-6 or Norm(A-(*T)(2))<1e-6 ){ |
1538 |
ffout(4)<<(*edgesRefVertex[numobject])[&(*T)(0)]<<"\n"; |
ffout(4)<<(*edgesRefVertex[numobject])[&(*T)(0)]<<"\n"; |
1539 |
ffout(4)<<(*edgesRefVertex[numobject])[&(*T)(1)]<<"\n"; |
ffout(4)<<(*edgesRefVertex[numobject])[&(*T)(1)]<<"\n"; |
1540 |
ffout(4)<<(*edgesRefVertex[numobject])[&(*T)(2)]<<"\n"; |
ffout(4)<<(*edgesRefVertex[numobject])[&(*T)(2)]<<"\n"; |
1541 |
ffout(4)<<"=============\n"; |
ffout(4)<<"=============\n"; |
1542 |
|
|
1543 |
} |
}*/ |
1544 |
} |
} |
1545 |
++i; |
++i; |
1546 |
} |
} |
1576 |
size_t& refo0=(*edgesRefVertex[numobject])[&(*T)(0)]; |
size_t& refo0=(*edgesRefVertex[numobject])[&(*T)(0)]; |
1577 |
size_t& refo1=(*edgesRefVertex[numobject])[&(*T)(1)]; |
size_t& refo1=(*edgesRefVertex[numobject])[&(*T)(1)]; |
1578 |
size_t& refo2=(*edgesRefVertex[numobject])[&(*T)(2)]; |
size_t& refo2=(*edgesRefVertex[numobject])[&(*T)(2)]; |
|
|
|
1579 |
if(((refo0==2 or refo1==2 or refo2==2) and refo0+refo1+refo2<6 and edgeo0+edgeo1+edgeo2==0) |
if(((refo0==2 or refo1==2 or refo2==2) and refo0+refo1+refo2<6 and edgeo0+edgeo1+edgeo2==0) |
1580 |
/* or (refo0+refo1+refo2!=6 and edgeo0+edgeo1+edgeo2==0 and refo0+refo1+refo2>0)*/ |
/*or (refo0+refo1+refo2!=6 and edgeo0+edgeo1+edgeo2==0 and refo0+refo1+refo2>0)*/ |
1581 |
/*or (edgeo0[0]==1 and refo0+refo1!=2 and refo0+refo1+refo2!=0) |
/*or (edgeo0[0]==1 and refo0+refo1!=2 and refo0+refo1+refo2!=0) |
1582 |
or (edgeo1[0]==1 and refo0+refo2!=2 and refo0+refo1+refo2!=0) |
or (edgeo1[0]==1 and refo0+refo2!=2 and refo0+refo1+refo2!=0) |
1583 |
or (edgeo2[0]==1 and refo2+refo1!=2 and refo0+refo1+refo2!=0)*/) { |
or (edgeo2[0]==1 and refo2+refo1!=2 and refo0+refo1+refo2!=0)*/) { |
1585 |
refo0=2; |
refo0=2; |
1586 |
refo1=2; |
refo1=2; |
1587 |
refo2=2; |
refo2=2; |
1588 |
erase=1; |
//erase=1; |
1589 |
} else { |
} else { |
1590 |
erase=1; |
erase=1; |
1591 |
} |
} |
1605 |
size_t& ref0=(*edgesRefVertex[numobject])[&(*triangle)(0)]; |
size_t& ref0=(*edgesRefVertex[numobject])[&(*triangle)(0)]; |
1606 |
size_t& ref1=(*edgesRefVertex[numobject])[&(*triangle)(1)]; |
size_t& ref1=(*edgesRefVertex[numobject])[&(*triangle)(1)]; |
1607 |
size_t& ref2=(*edgesRefVertex[numobject])[&(*triangle)(2)]; |
size_t& ref2=(*edgesRefVertex[numobject])[&(*triangle)(2)]; |
|
|
|
1608 |
if(ref0+ref1+ref2!=6) { |
if(ref0+ref1+ref2!=6) { |
1609 |
//ffout(0)<<"le voisin n'est pas de ref 2\n"; |
//ffout(0)<<"le voisin n'est pas de ref 2\n"; |
1610 |
//ffout(0)<<"avt "<<ref0<<" "<<ref1<<" "<<ref2<<"\n"; |
//ffout(0)<<"avt "<<ref0<<" "<<ref1<<" "<<ref2<<"\n"; |
1615 |
size_t sum=edge0[0]+edge1[0]+edge2[0]; |
size_t sum=edge0[0]+edge1[0]+edge2[0]; |
1616 |
if((ref0==2 or ref1==2 or ref2==2) and |
if((ref0==2 or ref1==2 or ref2==2) and |
1617 |
(ref0!=1 and ref1!=1 and ref2!=1) and sum==0) { |
(ref0!=1 and ref1!=1 and ref2!=1) and sum==0) { |
1618 |
ffout(4)<<"ref 2 partout\n"; |
//ffout(4)<<"ref 2 partout\n"; |
1619 |
test=1; |
test=1; |
1620 |
ref0=2; |
ref0=2; |
1621 |
ref1=2; |
ref1=2; |
1622 |
ref2=2; |
ref2=2; |
1623 |
} else { |
} else { |
1624 |
if((ref1==2 or ref0==2) and edge0==0 and (ref1!=1 and ref0!=1)) { |
if((ref1==2 xor ref0==2) and edge0==0 and (ref1!=1 and ref0!=1)) { |
1625 |
ref1=2; |
ref1=2; |
1626 |
ref0=2; |
ref0=2; |
1627 |
|
test=1; |
1628 |
} |
} |
1629 |
if((ref2==2 or ref0==2) and edge1==0 and (ref2!=1 and ref0!=1)) { |
if((ref2==2 xor ref0==2) and edge1==0 and (ref2!=1 and ref0!=1)) { |
1630 |
ref2=2; |
ref2=2; |
1631 |
ref0=2; |
ref0=2; |
1632 |
|
test=1; |
1633 |
} |
} |
1634 |
if((ref1==2 or ref2==2) and edge2==0 and (ref1!=1 and ref2!=1)) { |
if((ref1==2 xor ref2==2) and edge2==0 and (ref1!=1 and ref2!=1)) { |
1635 |
ref1=2; |
ref1=2; |
1636 |
ref2=2; |
ref2=2; |
1637 |
|
test=1; |
1638 |
} |
} |
1639 |
if((ref1==2 or ref0==2) and edge0==1 and sum>1 and ref0+ref1!=4){ |
if((ref1==2 xor ref0==2) and edge0==1 and sum>1 ){ |
|
|
|
1640 |
//ffout(4)<<"ref 1 2 0 partout\n"; |
//ffout(4)<<"ref 1 2 0 partout\n"; |
1641 |
//ffout(4)<<ref0<<" "<<ref1<<"\n"; |
//ffout(4)<<ref0<<" "<<ref1<<"\n"; |
1642 |
if(ref1+ref0!=3) { |
if(ref1+ref0!=3) { |
1648 |
ref0=1; |
ref0=1; |
1649 |
} |
} |
1650 |
} |
} |
1651 |
if((ref2==2 or ref0==2) and edge1==1){ |
if((ref2==2 xor ref0==2) and edge1==1 and sum>1){ |
1652 |
//ffout(0)<<"ref 1 2 1 partout\n"; |
//ffout(0)<<"ref 1 2 1 partout\n"; |
1653 |
//ffout(4)<<ref0<<" "<<ref2<<"\n"; |
//ffout(4)<<ref0<<" "<<ref2<<"\n"; |
1654 |
if(ref2+ref0!=3) { |
if(ref2+ref0!=3) { |
1660 |
ref0=1; |
ref0=1; |
1661 |
} |
} |
1662 |
} |
} |
1663 |
if((ref2==2 or ref1==2) and edge2==1){ |
if((ref2==2 xor ref1==2) and edge2==1 and sum>1){ |
1664 |
//ffout(0)<<"ref 1 2 2 partout\n"; |
//ffout(0)<<"ref 1 2 2 partout\n"; |
1665 |
//ffout(4)<<ref1<<" "<<ref2<<"\n"; |
//ffout(4)<<ref1<<" "<<ref2<<"\n"; |
1666 |
if(ref1+ref2!=3) { |
if(ref1+ref2!=3) { |
1675 |
} |
} |
1676 |
if(test==1/*ref0+ref1+ref2==6 *//*or edge0[0]+edge1[0]+edge2[0]==1*/) { |
if(test==1/*ref0+ref1+ref2==6 *//*or edge0[0]+edge1[0]+edge2[0]==1*/) { |
1677 |
front.push_front(triangle); |
front.push_front(triangle); |
1678 |
|
listTreat[triangle]=1; |
1679 |
frontSize++; |
frontSize++; |
1680 |
|
} else if(listTreat.find(triangle)==listTreat.end()) { |
1681 |
|
//ffout(4)<<"pas encore traite\n"; |
1682 |
|
front.push_front(triangle); |
1683 |
|
listTreat[triangle]=1; |
1684 |
|
frontSize++; |
1685 |
} |
} |
1686 |
//ffout(0)<<ref0<<" "<<ref1<<" "<<ref2<<"\n"; |
//ffout(0)<<ref0<<" "<<ref1<<" "<<ref2<<"\n"; |
1687 |
} |
} |
1725 |
ref1=2; |
ref1=2; |
1726 |
ref2=2; |
ref2=2; |
1727 |
} else { |
} else { |
1728 |
if((ref1==2 or ref0==2) and edge0==1){ |
if((ref1==2 xor ref0==2) and edge0==1 and sum>1){ |
1729 |
if(ref0==2) { |
if(ref0==2) { |
1730 |
ref1=1; |
ref1=1; |
1731 |
} else { |
} else { |
1732 |
ref0=1; |
ref0=1; |
1733 |
} |
} |
1734 |
} |
} |
1735 |
if((ref2==2 or ref0==2) and edge1==1 and sum>1 and ref0+ref2!=4){ |
if((ref2==2 xor ref0==2) and edge1==1 and sum>1 ){ |
|
|
|
1736 |
if(ref0==2) { |
if(ref0==2) { |
1737 |
ref2=1; |
ref2=1; |
1738 |
} else { |
} else { |
1739 |
ref0=1; |
ref0=1; |
1740 |
} |
} |
1741 |
} |
} |
1742 |
if((ref2==2 or ref1==2) and edge2==1 and sum>1 and ref2+ref1!=4){ |
if((ref2==2 xor ref1==2) and edge2==1 and sum>1 ){ |
|
|
|
1743 |
if(ref2==2) { |
if(ref2==2) { |
1744 |
ref1=1; |
ref1=1; |
1745 |
} else { |
} else { |
1825 |
break; |
break; |
1826 |
} |
} |
1827 |
case 3: { |
case 3: { |
1828 |
if(K.isInTriangle[0]==1) { |
if(K.edgecut[0]==1) { |
1829 |
place[0]=0; |
place[0]=0; |
1830 |
if(K.isInTriangle[1]==1) { |
in1=2; |
1831 |
|
in=0; |
1832 |
|
if(K.edgecut[1]==1) { |
1833 |
place[1]=1; |
place[1]=1; |
1834 |
place[2]=2; |
place[2]=2; |
1835 |
} else { |
} else { |
1836 |
place[1]=2; |
place[1]=2; |
1837 |
place[2]=1; |
place[2]=1; |
1838 |
} |
} |
1839 |
} else if(K.isInTriangle[1]==1) { |
} else if(K.edgecut[1]==1) { |
1840 |
|
in1=1; |
1841 |
|
in=2; |
1842 |
place[0]=1; |
place[0]=1; |
1843 |
place[1]=2; |
place[1]=2; |
1844 |
place[2]=0; |
place[2]=0; |
1845 |
} else { |
} else { |
1846 |
|
in1=0; |
1847 |
|
in=1; |
1848 |
place[0]=2; |
place[0]=2; |
1849 |
place[1]=1; |
place[1]=1; |
1850 |
place[2]=0; |
place[2]=0; |
1991 |
size_t numberIn=K.isInTriangle[0]+K.isInTriangle[1]+K.isInTriangle[2]; |
size_t numberIn=K.isInTriangle[0]+K.isInTriangle[1]+K.isInTriangle[2]; |
1992 |
size_t stop=0,iInter=0,iCut=0; |
size_t stop=0,iInter=0,iCut=0; |
1993 |
//initialisation |
//initialisation |
1994 |
if(numberIn==3) { |
//if(numberIn==3) { |
1995 |
points.push_back(&K(1)); |
// points.push_back(&K(1)); |
1996 |
points.push_back(&K(2)); |
// points.push_back(&K(2)); |
1997 |
} |
//} |
1998 |
if(numberIn==2 and stop==0) { |
if((numberIn==3 or numberIn==2) and stop==0) { |
1999 |
points.push_back(&K(in1)); |
points.push_back(&K(in1)); |
2000 |
} |
} |
2001 |
const Vertex* A=&K(in); |
const Vertex* A=&K(in); |
2037 |
ffout(4)<<"P0 = "<<P[0]<<*P[0]<<"\n"; |
ffout(4)<<"P0 = "<<P[0]<<*P[0]<<"\n"; |
2038 |
ffout(4)<<"K(2) = "<<K(2)<<&K(2)<<"\n"; |
ffout(4)<<"K(2) = "<<K(2)<<&K(2)<<"\n"; |
2039 |
ffout(4)<<"pbs 0 existe pas\n"; |
ffout(4)<<"pbs 0 existe pas\n"; |
2040 |
ffout(4)<<*K.pointsIntersection[0][0]<<"\n"; |
ffout(4)<<place<<"\n"; |
2041 |
ffout(4)<<*K.pointsIntersection[1][0]<<"\n"; |
//ffout(4)<<*K.pointsIntersection[0][0]<<"\n"; |
2042 |
|
//ffout(4)<<*K.pointsIntersection[1][0]<<"\n"; |
2043 |
ffout(4)<<K(0)<<"\n"; |
ffout(4)<<K(0)<<"\n"; |
2044 |
ffout(4)<<K(1)<<"\n"; |
ffout(4)<<K(1)<<"\n"; |
2045 |
ffout(4)<<K(2)<<"\n"; |
ffout(4)<<K(2)<<"\n"; |
2320 |
std::vector<Triangulation::CurveVertex> curves(0); |
std::vector<Triangulation::CurveVertex> curves(0); |
2321 |
|
|
2322 |
if(taille>3) { |
if(taille>3) { |
2323 |
ffout(4)<<"je triangule\n"; |
//ffout(4)<<"je triangule\n"; |
2324 |
ffout(4)<<"num = "<<++toto<<"\n"; |
ffout(4)<<"num = "<<++toto<<"\n"; |
2325 |
//verifions que les points ne s'intersectent pas avant de lancer la triangulation |
//verifions que les points ne s'intersectent pas avant de lancer la triangulation |
2326 |
bool isOK=false; |
bool isOK=false; |
2345 |
ffout(4)<<"isok est vraie-----------\n"; |
ffout(4)<<"isok est vraie-----------\n"; |
2346 |
} |
} |
2347 |
if(!isOK) { |
if(!isOK) { |
2348 |
|
ffout(4)<<"je triangule\n"; |
2349 |
trgen.triangulize(pointstrian, |
trgen.triangulize(pointstrian, |
2350 |
envVertex, |
envVertex, |
2351 |
holes, |
holes, |
2374 |
//ffout(4)<<L.size()<<" ecrit\n"; |
//ffout(4)<<L.size()<<" ecrit\n"; |
2375 |
} else if(taille==3) { |
} else if(taille==3) { |
2376 |
ffout(4)<<"je cree un triangle\n"; |
ffout(4)<<"je cree un triangle\n"; |
2377 |
|
ffout(4)<<*points[0]<<"\n"; |
2378 |
|
ffout(4)<<*points[1]<<"\n"; |
2379 |
|
ffout(4)<<*points[2]<<"\n"; |
2380 |
__addTriangle(Triangle(*points[0], |
__addTriangle(Triangle(*points[0], |
2381 |
*points[1], |
*points[1], |
2382 |
*points[2], |
*points[2], |
2423 |
} |
} |
2424 |
|
|
2425 |
///////////////////////////////////////////////////////////////////////////// |
///////////////////////////////////////////////////////////////////////////// |
2426 |
Vertex A(-0.000141,0.129744,0.110641); |
//Vertex A(-0.000141,0.129744,0.110641); |
2427 |
if(Norm(A-K(0))<1e-6 or Norm(A-K(1))<1e-6 or Norm(A-K(2))<1e-6 ){ |
//if(Norm(A-K(0))<1e-6 or Norm(A-K(1))<1e-6 or Norm(A-K(2))<1e-6 ){ |
2428 |
ffout(4)<<"=============\n"; |
// ffout(4)<<"=============\n"; |
2429 |
ffout(4)<<K(0)<<"\n"; |
// ffout(4)<<K(0)<<"\n"; |
2430 |
ffout(4)<<K(1)<<"\n"; |
// ffout(4)<<K(1)<<"\n"; |
2431 |
ffout(4)<<K(2)<<"\n"; |
// ffout(4)<<K(2)<<"\n"; |
2432 |
ffout(4)<<K.isInTriangle<<"\n"; |
// ffout(4)<<K.isInTriangle<<"\n"; |
2433 |
ffout(4)<<K.edgecut<<"\n"; |
// ffout(4)<<K.edgecut<<"\n"; |
2434 |
ffout(4)<<place<<"\n"; |
// ffout(4)<<place<<"\n"; |
2435 |
} |
// } |
2436 |
|
|
|
/* if(K.edgecut[0][0]+K.edgecut[1][0]+K.edgecut[2][0]==3 |
|
|
and K.isInTriangle[0]+K.isInTriangle[1]+K.isInTriangle[2]==1 ) { |
|
|
ffout(4)<<norm01<<" "<<norm02<<" "<<norm21<<"\n"; |
|
|
ffout(4)<<in<<"\n"; |
|
|
ffout(4)<<place[0]<<" "<<place[1]<<" "<<place[2]<<"\n"; |
|
|
ffout(4)<<K(0)<<"\n"; |
|
|
ffout(4)<<K(1)<<"\n"; |
|
|
ffout(4)<<K(2)<<"\n"; |
|
|
ffout(4)<<"points in "<<&K(in)<<"\n"; |
|
|
ffout(4)<<K.pointsIntersection[place[0]][0]<<"\n"; |
|
|
ffout(4)<<K.pointsIntersection[place[1]][0]<<"\n"; |
|
|
ffout(4)<<K.pointsIntersection[place[2]][0]<<"\n"; |
|
|
ffout(4)<<"inter 0 "<<*K.pointsIntersection[place[0]][0]<<"\n"; |
|
|
ffout(4)<<"inter 1"<<*K.pointsIntersection[place[1]][0]<<"\n"; |
|
|
ffout(4)<<*K.pointsIntersection[place[2]][0]<<"\n"; |
|
|
ffout(4)<<"inter 0 1 "<<K.pointsIntersection[place[0]][1]<<"\n"; |
|
|
ffout(4)<<"inter 1 1"<<K.pointsIntersection[place[1]][1]<<"\n"; |
|
|
ffout(4)<<"inter 0 1 "<<*K.pointsIntersection[place[0]][1]<<"\n"; |
|
|
ffout(4)<<"inter 1 1"<<*K.pointsIntersection[place[1]][1]<<"\n"; |
|
|
|
|
|
}*/ |
|
2437 |
///////////////////////////////////////////////////////////////////////////// |
///////////////////////////////////////////////////////////////////////////// |
2438 |
|
|
2439 |
//add vertex to vertexInTriangles if need |
//add vertex to vertexInTriangles if need |
2450 |
for(std::map<const Vertex*,TinyVector<2,const Triangle*> >::iterator jt=vertexInTriangles.begin() |
for(std::map<const Vertex*,TinyVector<2,const Triangle*> >::iterator jt=vertexInTriangles.begin() |
2451 |
; jt!=vertexInTriangles.end() ; jt++) { |
; jt!=vertexInTriangles.end() ; jt++) { |
2452 |
PP.push_back((*jt).first); |
PP.push_back((*jt).first); |
2453 |
|
//ffout(4)<<*(*jt).first<<"\n"; |
2454 |
} |
} |
2455 |
if(K.isInTriangle[0]==1) { |
for(size_t i=0 ; i<3 ; ++i) { |
2456 |
PP.push_back(&K(0)); |
if(K.isInTriangle[i]==1) { |
2457 |
} |
PP.push_back(&K(i)); |
2458 |
if(K.isInTriangle[1]==1) { |
} |
|
PP.push_back(&K(1)); |
|
|
} |
|
|
if(K.isInTriangle[2]==1) { |
|
|
PP.push_back(&K(2)); |
|
2459 |
} |
} |
2460 |
assert(PP.size()==3); |
assert(PP.size()==3); |
2461 |
real_t norm0=Norm(*PP[0]-*PP[1]); |
real_t norm0=Norm(*PP[0]-*PP[1]); |
2535 |
} |
} |
2536 |
pointslist2.push_back(points[0]); |
pointslist2.push_back(points[0]); |
2537 |
//verif des listes |
//verif des listes |
2538 |
ffout(4)<<"taille de list1 = "<<pointslist1.size()<<"\n"; |
//ffout(4)<<"taille de list1 = "<<pointslist1.size()<<"\n"; |
2539 |
for(unsigned ie=0;ie<pointslist1.size();++ie) { |
//for(unsigned ie=0;ie<pointslist1.size();++ie) { |
2540 |
ffout(4)<<*pointslist1[ie]<<"\n"; |
// ffout(4)<<*pointslist1[ie]<<"\n"; |
2541 |
} |
//} |
2542 |
ffout(4)<<"taille de list2 = "<<pointslist2.size()<<"\n"; |
//ffout(4)<<"taille de list2 = "<<pointslist2.size()<<"\n"; |
2543 |
for(unsigned ie=0;ie<pointslist2.size();++ie) { |
//for(unsigned ie=0;ie<pointslist2.size();++ie) { |
2544 |
ffout(4)<<*pointslist2[ie]<<"\n"; |
// ffout(4)<<*pointslist2[ie]<<"\n"; |
2545 |
} |
//} |
2546 |
//on cree les 2 maillages |
//on cree les 2 maillages |
2547 |
if(pointslist1.size()>=3) { |
if(pointslist1.size()>=3) { |
2548 |
std::vector<Vertex> pointslist1plan(pointslist1.size()); |
std::vector<Vertex> pointslist1plan(pointslist1.size()); |
2603 |
} |
} |
2604 |
} |
} |
2605 |
} |
} |
2606 |
|
//on rajoute le 3e sommets |
2607 |
|
size_t in2=0; |
2608 |
|
if(in+in1==1) { |
2609 |
|
in2=2; |
2610 |
|
} else if(in+in1==2) { |
2611 |
|
in2=1; |
2612 |
|
} |
2613 |
|
pointslist2.push_back(&K(in2)); |
2614 |
|
//on rajoute le point oppose a l'arete cut |
2615 |
pointslist2.push_back(points[0]); |
pointslist2.push_back(points[0]); |
2616 |
pointslist2.push_back(points[1]); |
pointslist1.push_back(points[0]); |
2617 |
pointslist2.push_back(P[0]); |
//on rajoute le premier point d'inter a la 2e liste |
2618 |
|
if(!__verifExist(P[0],pointslist2)) { |
2619 |
|
pointslist2.push_back(P[0]); |
2620 |
|
} else { |
2621 |
|
pointslist2.push_back(P[1]); |
2622 |
|
} |
2623 |
|
|
2624 |
//on cree les 2 maillages |
//on cree les 2 maillages |
2625 |
if(pointslist1.size()>=3) { |
if(pointslist1.size()>=3) { |
2626 |
std::vector<Vertex> pointslist1plan(pointslist1.size()); |
std::vector<Vertex> pointslist1plan(pointslist1.size()); |
2770 |
ffout(4)<<"cas pbssssss\n"; |
ffout(4)<<"cas pbssssss\n"; |
2771 |
ffout(4)<<(*edgesRefVertex[numobject])[&K(0)]<<" "<<(*edgesRefVertex[numobject])[&K(1)]<< |
ffout(4)<<(*edgesRefVertex[numobject])[&K(0)]<<" "<<(*edgesRefVertex[numobject])[&K(1)]<< |
2772 |
" "<<(*edgesRefVertex[numobject])[&K(2)]<<" "<<K.edgecut<<"\n"; |
" "<<(*edgesRefVertex[numobject])[&K(2)]<<" "<<K.edgecut<<"\n"; |
2773 |
|
ffout(4)<<K(0)<<"\n"; |
2774 |
|
ffout(4)<<K(1)<<"\n"; |
2775 |
|
ffout(4)<<K(2)<<"\n"; |
2776 |
|
|
2777 |
// __addTriangle(Triangle(K(0),K(1),K(2),K.reference()),*i,triangleListIntersectionNew); |
// __addTriangle(Triangle(K(0),K(1),K(2),K.reference()),*i,triangleListIntersectionNew); |
2778 |
|
|
2779 |
} |
} |
2838 |
__addTriangle(*T,*i,triangleListIntersectionNew); |
__addTriangle(*T,*i,triangleListIntersectionNew); |
2839 |
} else { |
} else { |
2840 |
ffout(4)<<"------------ 3 in cas traite\n"; |
ffout(4)<<"------------ 3 in cas traite\n"; |
2841 |
|
ffout(4)<<K.edgecut[0]<<" "<<K.edgecut[1]<<" "<<K.edgecut[2]<<"\n"; |
2842 |
__createGeneral(K, *i, triangleListIntersectionNew); |
__createGeneral(K, *i, triangleListIntersectionNew); |
2843 |
} |
} |
2844 |
break; |
break; |