Improve SMDS: porting to WNT

This commit is contained in:
msv 2005-01-14 13:32:49 +00:00
parent 61d5fb0e6a
commit e0e5b30f80
6 changed files with 24 additions and 5 deletions

View File

@ -19,11 +19,15 @@
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
#ifdef _MSC_VER
#pragma warning(disable:4786)
#endif
#include "SMDS_IteratorOfElements.hxx"
bool SMDS_IteratorOfElements::subMore()
{
if((t2Iterator==NULL)||(!t2Iterator->more()))
if((t2Iterator.get()==NULL)||(!t2Iterator->more()))
{
if(t1Iterator->more())
{
@ -37,7 +41,7 @@ bool SMDS_IteratorOfElements::subMore()
const SMDS_MeshElement * SMDS_IteratorOfElements::subNext()
{
if((t2Iterator==NULL)||(!t2Iterator->more()))
if((t2Iterator.get()==NULL)||(!t2Iterator->more()))
if(t1Iterator->more())
t2Iterator=t1Iterator->next()->elementsIterator(myType);
return t2Iterator->next();

View File

@ -25,6 +25,9 @@
// Author : Jean-Michel BOULCOURT
// Module : SMESH
#ifdef _MSC_VER
#pragma warning(disable:4786)
#endif
#include "SMDS_MeshEdge.hxx"
#include "SMDS_IteratorOfElements.hxx"

View File

@ -19,6 +19,10 @@
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
#ifdef _MSC_VER
#pragma warning(disable:4786)
#endif
#include "SMDS_MeshElement.hxx"
#include "SMDS_MeshNode.hxx"
#include "SMDS_MeshEdge.hxx"

View File

@ -24,6 +24,10 @@
// Author : Jean-Michel BOULCOURT
// Module : SMESH
#ifdef _MSC_VER
#pragma warning(disable:4786)
#endif
#include "SMDS_MeshGroup.hxx"
#include "utilities.h"

View File

@ -65,7 +65,7 @@ class SMDS_MeshGroup:public SMDS_MeshObject
SMDS_MeshGroup(SMDS_MeshGroup* theParent,
const SMDSAbs_ElementType theType = SMDSAbs_All);
typedef std::set<const SMDS_MeshElement *>::iterator TIterator;
typedef std::set<const SMDS_MeshElement *>::const_iterator TIterator;
const SMDS_Mesh * myMesh;
SMDSAbs_ElementType myType;
std::set<const SMDS_MeshElement *> myElements;

View File

@ -3,6 +3,9 @@
// Author : Edward AGAPOV (eap)
// Copyright : Open CASCADE
#ifdef _MSC_VER
#pragma warning(disable:4786)
#endif
#include "SMDS_VolumeTool.hxx"
@ -10,6 +13,7 @@
#include "SMDS_MeshNode.hxx"
#include <map>
#include <float.h>
#include <math.h>
using namespace std;
@ -389,7 +393,7 @@ bool SMDS_VolumeTool::GetFaceNodes (int faceIndex,
theFaceNodes.clear();
int iNode, nbNode = myFaceNbNodes[ faceIndex ];
for ( int iNode = 0; iNode < nbNode; iNode++ )
for ( iNode = 0; iNode < nbNode; iNode++ )
theFaceNodes.insert( myFaceNodes[ iNode ]);
return true;
@ -415,7 +419,7 @@ bool SMDS_VolumeTool::IsFaceExternal( int faceIndex )
return ( reversed ? faceIndex != 0 : faceIndex != 1 );
case 8: {
// in a forward hexahedron, odd face normal is external, else vice versa
bool odd = faceIndex % 2;
bool odd = (faceIndex % 2 != 0);
return ( reversed ? !odd : odd );
}
default:;