@@ -216,19 +216,8 @@ void FdFEGroupPartKit::generateShapeIndexes()
216216
217217 SoIndexedShape * aShape = this -> getShape (!myGroupPartData -> isLineShape );
218218
219- // Calculate needed storage from input
220-
221- int nIndexEntries = 0 ;
222- if (myGroupPartData -> isIndexShape )
223- for (const IntVec & shape : myGroupPartData -> shapeIndexes )
224- nIndexEntries += shape .size () + 1 ;
225- else if (myGroupPartData -> isLineShape )
226- nIndexEntries = myGroupPartData -> edgePointers .size ()* 3 ;
227- else
228- nIndexEntries = myGroupPartData -> facePointers .size () + myGroupPartData -> nVisiblePrimitiveVertexes ;
229-
230219 // Set the face indexes into the shape node
231- aShape -> coordIndex .setNum (nIndexEntries );
220+ aShape -> coordIndex .setNum (myGroupPartData -> getNoVisibleVertices (true) );
232221 myGroupPartData -> getShapeIndexes (aShape -> coordIndex .startEditing ());
233222 aShape -> coordIndex .finishEditing ();
234223}
@@ -419,10 +408,7 @@ void FdFEGroupPartKit::remapLookResults(ResultsFrame* frame, const FFaLegendMapp
419408 nColors = myGroupPartData -> facePointers .size ();
420409 break ;
421410 case PR_FACE_VERTEX :
422- if (myGroupPartData -> isLineShape )
423- nColors = myGroupPartData -> edgePointers .size ()* 2 ;
424- else
425- nColors = myGroupPartData -> nVisiblePrimitiveVertexes ;
411+ nColors = myGroupPartData -> getNoVisibleVertices ();
426412 break ;
427413 default :
428414 break ;
@@ -514,16 +500,8 @@ float FdFEGroupPartKit::getResultFromMaterialIndex(unsigned int matIdx) const
514500 break ;
515501
516502 case PR_FACE_VERTEX :
517- if (myGroupPartData -> isLineShape )
518- {
519- if (matIdx < myGroupPartData -> edgePointers .size ()* 2 )
520- resIdx = matIdx ;
521- }
522- else
523- {
524- if ((int )matIdx < myGroupPartData -> nVisiblePrimitiveVertexes )
525- resIdx = matIdx ;
526- }
503+ if (matIdx < myGroupPartData -> getNoVisibleVertices ())
504+ resIdx = matIdx ;
527505 break ;
528506
529507 default :
0 commit comments