// two special cases will improve the computations speed
if(face.getIndexes().size()==3){
@ -287,10 +288,12 @@ public class Face implements Comparator<Integer> {
LOGGER.finer("Veryfying improper triangulation of the temporal mesh.");
if(indexes[0]<0||indexes[1]<0||indexes[2]<0){
thrownewBlenderFileException("Unable to find two closest vertices while triangulating face in mesh: "+temporalMesh+"Please apply triangulation modifier in blender as a workaround and load again!");
thrownewBlenderFileException("Infinite loop detected during triangulation of mesh: "+temporalMesh+"Please apply triangulation modifier in blender as a workaround and load again!");
warning=TriangulationWarning.INFINITE_LOOP;
break;
}
previousIndex1=indexes[0];
previousIndex2=indexes[1];
@ -304,6 +307,10 @@ public class Face implements Comparator<Integer> {
}
}catch(BlenderFileExceptione){
LOGGER.log(Level.WARNING,"Errors occured during face triangulation: {0}. The face will be triangulated with the most direct algorithm, but the results might not be identical to blender.",e.getLocalizedMessage());
warning=TriangulationWarning.UNKNOWN;
}
if(warning!=TriangulationWarning.NONE){
LOGGER.finest("Triangulation the face using the most direct algorithm.");
indexes[0]=this.getIndex(0);
for(inti=1;i<this.vertexCount()-1;++i){
indexes[1]=this.getIndex(i);
@ -311,6 +318,32 @@ public class Face implements Comparator<Integer> {