PAL8330. In sweepElement(): fix volume orientation

This commit is contained in:
eap 2005-04-01 11:26:44 +00:00
parent 01ec976777
commit ebe9f34644

View File

@ -1615,8 +1615,8 @@ static void sweepElement(SMESHDS_Mesh* aMesh,
nextNod[ i0 ], nextNod[ 1 ], nextNod[ i2 ] ); nextNod[ i0 ], nextNod[ 1 ], nextNod[ i2 ] );
else if ( nbSame == 1 ) // --- pyramid else if ( nbSame == 1 ) // --- pyramid
aNewElem = aMesh->AddVolume (prevNod[ iAfterSame ], prevNod[ iBeforeSame ], aNewElem = aMesh->AddVolume (prevNod[ iBeforeSame ], prevNod[ iAfterSame ],
nextNod[ iBeforeSame ], nextNod[ iAfterSame ], nextNod[ iAfterSame ], nextNod[ iBeforeSame ],
nextNod[ iSameNode ]); nextNod[ iSameNode ]);
else // 2 same nodes: --- tetrahedron else // 2 same nodes: --- tetrahedron
@ -1632,26 +1632,26 @@ static void sweepElement(SMESHDS_Mesh* aMesh,
else if ( nbSame == 1 ) // --- pyramid + pentahedron else if ( nbSame == 1 ) // --- pyramid + pentahedron
{ {
aNewElem = aMesh->AddVolume (prevNod[ iAfterSame ], prevNod[ iBeforeSame ], aNewElem = aMesh->AddVolume (prevNod[ iBeforeSame ], prevNod[ iAfterSame ],
nextNod[ iBeforeSame ], nextNod[ iAfterSame ], nextNod[ iAfterSame ], nextNod[ iBeforeSame ],
nextNod[ iSameNode ]); nextNod[ iSameNode ]);
newElems.push_back( aNewElem ); newElems.push_back( aNewElem );
aNewElem = aMesh->AddVolume (prevNod[ iBeforeSame ], prevNod[ iOpposSame ], aNewElem = aMesh->AddVolume (prevNod[ iAfterSame ], prevNod[ iOpposSame ],
prevNod[ iAfterSame ], nextNod[ iBeforeSame ], prevNod[ iBeforeSame ], nextNod[ iAfterSame ],
nextNod[ iOpposSame ], nextNod[ iAfterSame ] ); nextNod[ iOpposSame ], nextNod[ iBeforeSame ] );
} }
else if ( nbSame == 2 ) // pentahedron else if ( nbSame == 2 ) // pentahedron
{ {
if ( prevNod[ iBeforeSame ] == nextNod[ iBeforeSame ] ) if ( prevNod[ iBeforeSame ] == nextNod[ iBeforeSame ] )
// iBeforeSame is same too // iBeforeSame is same too
aNewElem = aMesh->AddVolume (prevNod[ iOpposSame ], prevNod[ iBeforeSame ], aNewElem = aMesh->AddVolume (prevNod[ iBeforeSame ], prevNod[ iOpposSame ],
nextNod[ iOpposSame ], prevNod[ iAfterSame ], nextNod[ iOpposSame ], prevNod[ iSameNode ],
prevNod[ iSameNode ], nextNod[ iAfterSame ]); prevNod[ iAfterSame ], nextNod[ iAfterSame ]);
else else
// iAfterSame is same too // iAfterSame is same too
aNewElem = aMesh->AddVolume (prevNod[ iBeforeSame ], prevNod[ iSameNode ], aNewElem = aMesh->AddVolume (prevNod[ iSameNode ], prevNod[ iBeforeSame ],
nextNod[ iBeforeSame ], prevNod[ iOpposSame ], nextNod[ iBeforeSame ], prevNod[ iAfterSame ],
prevNod[ iAfterSame ], nextNod[ iOpposSame ]); prevNod[ iOpposSame ], nextNod[ iOpposSame ]);
} }
break; break;
} }