From 87c6240def6556a5da096fb7668354285dc192b6 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 12 Jan 2005 06:43:01 +0000 Subject: [PATCH] PAL7451. Correct orientation defining in Set() --- src/SMDS/SMDS_VolumeTool.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/SMDS/SMDS_VolumeTool.cxx b/src/SMDS/SMDS_VolumeTool.cxx index 7acb3f054..9ee35fd19 100644 --- a/src/SMDS/SMDS_VolumeTool.cxx +++ b/src/SMDS/SMDS_VolumeTool.cxx @@ -98,14 +98,14 @@ static int Penta_nbN [] = { 3, 3, 4, 4, 4 }; static int Hexa_F [6][5] = { // FORWARD { 0, 1, 2, 3, 0 }, // opposite faces are neighbouring, { 4, 5, 6, 7, 4 }, // even face normal is internal, odd - external - { 1, 0, 4, 5, 1 }, // same index nodes nodes of opposite faces are linked + { 1, 0, 4, 5, 1 }, // same index nodes of opposite faces are linked { 2, 3, 7, 6, 2 }, { 0, 3, 7, 4, 0 }, { 1, 2, 6, 5, 1 }}; static int Hexa_R [6][5] = { // REVERSED { 0, 3, 2, 1, 0 }, // opposite faces are neighbouring, { 4, 7, 6, 5, 4 }, // even face normal is external, odd - internal - { 1, 5, 4, 0, 1 }, // same index nodes nodes of opposite faces are linked + { 1, 5, 4, 0, 1 }, // same index nodes of opposite faces are linked { 2, 6, 7, 3, 2 }, { 0, 4, 7, 3, 0 }, { 1, 5, 6, 2, 1 }}; @@ -227,7 +227,7 @@ bool SMDS_VolumeTool::Set (const SMDS_MeshElement* theVolume) myFaceNbNodes = Penta_nbN; else myFaceNbNodes = Hexa_nbN; - break; + // define volume orientation XYZ botNormal; GetFaceNormal( 0, botNormal.x, botNormal.y, botNormal.z ); @@ -238,7 +238,7 @@ bool SMDS_VolumeTool::Set (const SMDS_MeshElement* theVolume) topNode->Z() - botNode->Z() ); bool diffDir = ( botNormal.Dot( upDir ) < 0 ); myVolForward = ( myVolumeNbNodes == 6 ? diffDir : !diffDir ); - + break; } default: myVolume = 0; } @@ -251,10 +251,10 @@ bool SMDS_VolumeTool::Set (const SMDS_MeshElement* theVolume) //purpose : Return nodes vector of an inverse volume //======================================================================= -#define SWAP_NODES(nodes,i1,i2) \ -{ \ +#define SWAP_NODES(nodes,i1,i2) \ +{ \ const SMDS_MeshNode* tmp = nodes[ i1 ]; \ - nodes[ i1 ] = nodes[ i2 ]; \ + nodes[ i1 ] = nodes[ i2 ]; \ nodes[ i2 ] = tmp; \ } void SMDS_VolumeTool::Inverse () -- 2.39.2