mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-05-06 12:30:48 +05:00
0021336: EDF 1717 SMESH: New algorithm "body fitting" cartesian unstructured
in initPoly(), do not orient faces of polyhedron as it is just wasting time if the user cares him-self of orientation of faces, on the other hand the commented code works only for planar faces and convex polyherdons.
This commit is contained in:
parent
e6c63f002f
commit
c59b4d47bb
@ -95,21 +95,27 @@ void SMDS_VtkVolume::initPoly(std::vector<vtkIdType> nodeIds, std::vector<int> n
|
|||||||
{
|
{
|
||||||
int nf = nbNodesPerFace[i];
|
int nf = nbNodesPerFace[i];
|
||||||
ptIds.push_back(nf);
|
ptIds.push_back(nf);
|
||||||
double a[3];
|
// EAP: a right approach is:
|
||||||
double b[3];
|
// - either the user should care of order of nodes or
|
||||||
double c[3];
|
// - the user should use a service method arranging nodes if he
|
||||||
grid->GetPoints()->GetPoint(nodeIds[k], a);
|
// don't want or can't to do it by him-self
|
||||||
grid->GetPoints()->GetPoint(nodeIds[k + 1], b);
|
// The method below works OK only with planar faces
|
||||||
grid->GetPoints()->GetPoint(nodeIds[k + 2], c);
|
//
|
||||||
bool isFaceForward = this->isForward(a, b, c, center);
|
// 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);
|
//MESSAGE("isFaceForward " << i << " " << isFaceForward);
|
||||||
vtkIdType *facePts = &nodeIds[k];
|
vtkIdType *facePts = &nodeIds[k];
|
||||||
if (isFaceForward)
|
//if (isFaceForward)
|
||||||
for (int n = 0; n < nf; n++)
|
for (int n = 0; n < nf; n++)
|
||||||
ptIds.push_back(facePts[n]);
|
ptIds.push_back(facePts[n]);
|
||||||
else
|
// else
|
||||||
for (int n = nf - 1; n >= 0; n--)
|
// for (int n = nf - 1; n >= 0; n--)
|
||||||
ptIds.push_back(facePts[n]);
|
// ptIds.push_back(facePts[n]);
|
||||||
k += nf;
|
k += nf;
|
||||||
}
|
}
|
||||||
myVtkID = grid->InsertNextLinkedCell(VTK_POLYHEDRON, nbFaces, &ptIds[0]);
|
myVtkID = grid->InsertNextLinkedCell(VTK_POLYHEDRON, nbFaces, &ptIds[0]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user