From: eap Date: Wed, 19 Dec 2007 14:56:13 +0000 (+0000) Subject: PAL18328 SMESH_AdvancedEditor.py don't work in Debug version X-Git-Tag: for_M2008_07022008~30 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dcdf3c5ef8f0e43ecf91bc976e866f7ad691f1c3;p=modules%2Fsmesh.git PAL18328 SMESH_AdvancedEditor.py don't work in Debug version + const SMDS_MeshVolume* Get() const; + // return element + + int ID() const; + // return element ID --- diff --git a/src/SMDS/SMDS_VolumeTool.cxx b/src/SMDS/SMDS_VolumeTool.cxx index 142da59cb..3094a761f 100644 --- a/src/SMDS/SMDS_VolumeTool.cxx +++ b/src/SMDS/SMDS_VolumeTool.cxx @@ -1326,7 +1326,7 @@ bool SMDS_VolumeTool::IsFreeFace( int faceIndex ) if ( IsFaceExternal( faceIndex )) intNormal = XYZ( -intNormal.x, -intNormal.y, -intNormal.z ); XYZ p0 ( nodes[0] ), baryCenter; - for ( vNbIt = volNbShared.begin(); vNbIt != volNbShared.end();vNbIt++ ) { + for ( vNbIt = volNbShared.begin(); vNbIt != volNbShared.end(); vNbIt++ ) { int nbShared = (*vNbIt).second; if ( nbShared >= 3 ) { SMDS_VolumeTool volume( (*vNbIt).first ); @@ -1651,3 +1651,22 @@ int SMDS_VolumeTool::NbFaceNodes(VolumeType type, return 0; } +//======================================================================= +//function : Get +//purpose : return element +//======================================================================= + +const SMDS_MeshVolume* SMDS_VolumeTool::Get() const +{ + return static_cast( myVolume ); +} + +//======================================================================= +//function : ID +//purpose : return element ID +//======================================================================= + +int SMDS_VolumeTool::ID() const +{ + return myVolume ? myVolume->GetID() : 0; +} diff --git a/src/SMDS/SMDS_VolumeTool.hxx b/src/SMDS/SMDS_VolumeTool.hxx index 8a1c77d43..5eb5a0755 100644 --- a/src/SMDS/SMDS_VolumeTool.hxx +++ b/src/SMDS/SMDS_VolumeTool.hxx @@ -35,6 +35,7 @@ class SMDS_MeshElement; class SMDS_MeshNode; class SMDS_PolyhedralVolumeOfNodes; +class SMDS_MeshVolume; #include #include @@ -62,6 +63,12 @@ class SMDS_EXPORT SMDS_VolumeTool // Set volume. // Return false if theVolume is not of type SMDSAbs_Volume + const SMDS_MeshVolume* Get() const; + // return element + + int ID() const; + // return element ID + // ----------------------- // general info // -----------------------