X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSMDS%2FSMDS_VtkVolume.cxx;fp=src%2FSMDS%2FSMDS_VtkVolume.cxx;h=d4f4a9abc4dbd76de601aba20c02f25c0871fb47;hb=c59b4d47bba8ace240f769c35f1bb75d029a3465;hp=bc561a20b5593f70b0f44bb27a03c6ea91df2184;hpb=e6c63f002f6cd73a2ee19142884e057fb1a2e106;p=modules%2Fsmesh.git diff --git a/src/SMDS/SMDS_VtkVolume.cxx b/src/SMDS/SMDS_VtkVolume.cxx index bc561a20b..d4f4a9abc 100644 --- a/src/SMDS/SMDS_VtkVolume.cxx +++ b/src/SMDS/SMDS_VtkVolume.cxx @@ -95,21 +95,27 @@ void SMDS_VtkVolume::initPoly(std::vector nodeIds, std::vector n { int nf = nbNodesPerFace[i]; ptIds.push_back(nf); - double a[3]; - double b[3]; - double c[3]; - grid->GetPoints()->GetPoint(nodeIds[k], a); - grid->GetPoints()->GetPoint(nodeIds[k + 1], b); - grid->GetPoints()->GetPoint(nodeIds[k + 2], c); - bool isFaceForward = this->isForward(a, b, c, center); + // EAP: a right approach is: + // - either the user should care of order of nodes or + // - the user should use a service method arranging nodes if he + // don't want or can't to do it by him-self + // The method below works OK only with planar faces + // + // double a[3]; + // double b[3]; + // double c[3]; + // grid->GetPoints()->GetPoint(nodeIds[k], a); + // grid->GetPoints()->GetPoint(nodeIds[k + 1], b); + // grid->GetPoints()->GetPoint(nodeIds[k + 2], c); + // bool isFaceForward = this->isForward(a, b, c, center); //MESSAGE("isFaceForward " << i << " " << isFaceForward); vtkIdType *facePts = &nodeIds[k]; - if (isFaceForward) + //if (isFaceForward) for (int n = 0; n < nf; n++) ptIds.push_back(facePts[n]); - else - for (int n = nf - 1; n >= 0; n--) - ptIds.push_back(facePts[n]); + // else + // for (int n = nf - 1; n >= 0; n--) + // ptIds.push_back(facePts[n]); k += nf; } myVtkID = grid->InsertNextLinkedCell(VTK_POLYHEDRON, nbFaces, &ptIds[0]);