bool face1open = lstX[0] != lstX[lastId1] && lstY[0] != lstY[lastId1] && lstZ[0] != lstZ[lastId1];
bool face2open = lstX[firstId2] != lstX[lastId2] && lstY[firstId2] != lstY[lastId2] && lstZ[firstId2] != lstZ[lastId2];
bool face1open = lstX[0] != lstX[lastId1] && lstY[0] != lstY[lastId1] && lstZ[0] != lstZ[lastId1];
bool face2open = lstX[firstId2] != lstX[lastId2] && lstY[firstId2] != lstY[lastId2] && lstZ[firstId2] != lstZ[lastId2];
+ bool altFace1open = lstX[0] != lstX[firstId2] && lstY[0] != lstY[firstId2] && lstZ[0] != lstZ[firstId2];
+ bool altFace2open = lstX[lastId1] != lstX[lastId2] && lstY[lastId1] != lstY[lastId2] && lstZ[lastId1] != lstZ[lastId2];
+
+ //bool closedLineOrd = !altFace1open && !altFace2open;
+
+ //isClosedCont = !face1open && !face2open;
+ isClosedCont = false;
bool normalOrder = isPointingCorrectly(firstIndex, firstIndex+increment, centroid, contraryId);
centroidId = points->InsertNextPoint(centroid[0], centroid[1], centroid[2]);
vtkSmartPointer<vtkTriangleStrip> triangleStrip1 = vtkSmartPointer<vtkTriangleStrip>::New();
bool normalOrder = isPointingCorrectly(firstIndex, firstIndex+increment, centroid, contraryId);
centroidId = points->InsertNextPoint(centroid[0], centroid[1], centroid[2]);
vtkSmartPointer<vtkTriangleStrip> triangleStrip1 = vtkSmartPointer<vtkTriangleStrip>::New();
if( normalOrder )
{
int initial = firstIndex;
int triangleIndex = 0;
for(int index = initial; index < end; index+=increment){
triangleStrip1->GetPointIds()->SetId(triangleIndex,index);
if( normalOrder )
{
int initial = firstIndex;
int triangleIndex = 0;
for(int index = initial; index < end; index+=increment){
triangleStrip1->GetPointIds()->SetId(triangleIndex,index);
- if(index+increment >= end){
- triangleStrip1->GetPointIds()->SetId(triangleIndex+1,initial);//2
- triangleStrip1->GetPointIds()->SetId(triangleIndex+2,centroidId);//3
- }
- else{
- triangleStrip1->GetPointIds()->SetId(triangleIndex+1,centroidId);//1
+ triangleStrip1->GetPointIds()->SetId(triangleIndex+1,centroidId);//1
+ if(index+increment >= end && !isClosedCont){
+ triangleStrip1->GetPointIds()->SetId(triangleIndex+2,initial);//2
+ triangleStrip1->GetPointIds()->SetId(triangleIndex+3,centroidId);//3
int triangleStripStart = end-1;
for(int index = triangleStripStart; index > initial; index-=increment){
triangleStrip1->GetPointIds()->SetId(triangleIndex,index);
int triangleStripStart = end-1;
for(int index = triangleStripStart; index > initial; index-=increment){
triangleStrip1->GetPointIds()->SetId(triangleIndex,index);
- if(index-increment <= initial){
- triangleStrip1->GetPointIds()->SetId(triangleIndex+1,triangleStripStart);
- triangleStrip1->GetPointIds()->SetId(triangleIndex+2,centroidId);
- }else{
- triangleStrip1->GetPointIds()->SetId(triangleIndex+1,centroidId);
+ triangleStrip1->GetPointIds()->SetId(triangleIndex+1,centroidId);
+ if(index-increment <= initial && !isClosedCont){
+ triangleStrip1->GetPointIds()->SetId(triangleIndex+2,triangleStripStart);
+ triangleStrip1->GetPointIds()->SetId(triangleIndex+3,centroidId);
secondRadiusSum += vtkMath::Solve3PointCircle(point1, point2, point3, center);
}
}
secondRadiusSum += vtkMath::Solve3PointCircle(point1, point2, point3, center);
}
}