From: apo Date: Fri, 7 Apr 2006 06:02:53 +0000 (+0000) Subject: Porting on Mandriva 64 (without libtool modifications) X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=ba76cf6d9630185552eed5c251b05e887c28379b Porting on Mandriva 64 (without libtool modifications) --- diff --git a/src/OBJECT/SMESH_Actor.cxx b/src/OBJECT/SMESH_Actor.cxx index 7f2ee90d6..cd2cec46e 100644 --- a/src/OBJECT/SMESH_Actor.cxx +++ b/src/OBJECT/SMESH_Actor.cxx @@ -122,15 +122,15 @@ SMESH_ActorDef::SMESH_ActorDef() if ( mgr && mgr->booleanValue( "SMESH", "use_precision", false ) ) myControlsPrecision = (long)SMESH::GetFloat( "SMESH", "controls_precision", -1 ); - float aPointSize = SMESH::GetFloat("SMESH:node_size",3); - float aLineWidth = SMESH::GetFloat("SMESH:element_width",1); + vtkFloatingPointType aPointSize = SMESH::GetFloat("SMESH:node_size",3); + vtkFloatingPointType aLineWidth = SMESH::GetFloat("SMESH:element_width",1); vtkMatrix4x4 *aMatrix = vtkMatrix4x4::New(); VTKViewer_ExtractUnstructuredGrid* aFilter = NULL; //Definition 2D and 3D divices of the actor //----------------------------------------- - float anRGB[3] = {1,1,1}; + vtkFloatingPointType anRGB[3] = {1,1,1}; mySurfaceProp = vtkProperty::New(); SMESH::GetColor( "SMESH", "fill_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 170, 255 ) ); mySurfaceProp->SetColor( anRGB[0], anRGB[1], anRGB[2] ); @@ -748,7 +748,7 @@ bool SMESH_ActorDef::Init(TVisualObjPtr theVisualObj, my2DActor->GetMapper()->SetLookupTable(myLookupTable); my3DActor->GetMapper()->SetLookupTable(myLookupTable); - float aFactor, aUnits; + vtkFloatingPointType aFactor, aUnits; my2DActor->GetPolygonOffsetParameters(aFactor,aUnits); my2DActor->SetPolygonOffsetParameters(aFactor,aUnits*0.75); @@ -782,7 +782,7 @@ bool SMESH_ActorDef::Init(TVisualObjPtr theVisualObj, } -float* SMESH_ActorDef::GetBounds(){ +vtkFloatingPointType* SMESH_ActorDef::GetBounds(){ return myNodeActor->GetBounds(); } @@ -847,11 +847,11 @@ void SMESH_ActorDef::SetIsShrunkable(bool theShrunkable){ Modified(); } -float SMESH_ActorDef::GetShrinkFactor(){ +vtkFloatingPointType SMESH_ActorDef::GetShrinkFactor(){ return myBaseActor->GetShrinkFactor(); } -void SMESH_ActorDef::SetShrinkFactor(float theValue){ +void SMESH_ActorDef::SetShrinkFactor(vtkFloatingPointType theValue){ myBaseActor->SetShrinkFactor(theValue); my1DActor->SetShrinkFactor(theValue); @@ -898,7 +898,7 @@ int SMESH_ActorDef::GetNodeObjId(int theVtkID){ return myPickableActor->GetNodeObjId(theVtkID); } -float* SMESH_ActorDef::GetNodeCoord(int theObjID){ +vtkFloatingPointType* SMESH_ActorDef::GetNodeCoord(int theObjID){ return myPickableActor->GetNodeCoord(theObjID); } @@ -1269,15 +1269,15 @@ void SMESH_ActorDef::ReleaseGraphicsResources(vtkWindow *renWin){ } -static void GetColor(vtkProperty *theProperty, float& r,float& g,float& b){ - float* aColor = theProperty->GetColor(); +static void GetColor(vtkProperty *theProperty, vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b){ + vtkFloatingPointType* aColor = theProperty->GetColor(); r = aColor[0]; g = aColor[1]; b = aColor[2]; } -void SMESH_ActorDef::SetOpacity(float theValue){ +void SMESH_ActorDef::SetOpacity(vtkFloatingPointType theValue){ mySurfaceProp->SetOpacity(theValue); myBackSurfaceProp->SetOpacity(theValue); myEdgeProp->SetOpacity(theValue); @@ -1287,74 +1287,74 @@ void SMESH_ActorDef::SetOpacity(float theValue){ } -float SMESH_ActorDef::GetOpacity(){ +vtkFloatingPointType SMESH_ActorDef::GetOpacity(){ return mySurfaceProp->GetOpacity(); } -void SMESH_ActorDef::SetSufaceColor(float r,float g,float b){ +void SMESH_ActorDef::SetSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b){ mySurfaceProp->SetColor(r,g,b); Modified(); } -void SMESH_ActorDef::GetSufaceColor(float& r,float& g,float& b){ +void SMESH_ActorDef::GetSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b){ ::GetColor(mySurfaceProp,r,g,b); } -void SMESH_ActorDef::SetBackSufaceColor(float r,float g,float b){ +void SMESH_ActorDef::SetBackSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b){ myBackSurfaceProp->SetColor(r,g,b); Modified(); } -void SMESH_ActorDef::GetBackSufaceColor(float& r,float& g,float& b){ +void SMESH_ActorDef::GetBackSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b){ ::GetColor(myBackSurfaceProp,r,g,b); } -void SMESH_ActorDef::SetEdgeColor(float r,float g,float b){ +void SMESH_ActorDef::SetEdgeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b){ myEdgeProp->SetColor(r,g,b); my1DProp->SetColor(r,g,b); my1DExtProp->SetColor(1.0-r,1.0-g,1.0-b); Modified(); } -void SMESH_ActorDef::GetEdgeColor(float& r,float& g,float& b){ +void SMESH_ActorDef::GetEdgeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b){ ::GetColor(myEdgeProp,r,g,b); } -void SMESH_ActorDef::SetNodeColor(float r,float g,float b){ +void SMESH_ActorDef::SetNodeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b){ myNodeProp->SetColor(r,g,b); Modified(); } -void SMESH_ActorDef::GetNodeColor(float& r,float& g,float& b){ +void SMESH_ActorDef::GetNodeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b){ ::GetColor(myNodeProp,r,g,b); } -void SMESH_ActorDef::SetHighlightColor(float r,float g,float b){ +void SMESH_ActorDef::SetHighlightColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b){ myHighlightProp->SetColor(r,g,b); Modified(); } -void SMESH_ActorDef::GetHighlightColor(float& r,float& g,float& b){ +void SMESH_ActorDef::GetHighlightColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b){ ::GetColor(myHighlightProp,r,g,b); } -void SMESH_ActorDef::SetPreHighlightColor(float r,float g,float b){ +void SMESH_ActorDef::SetPreHighlightColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b){ myPreselectProp->SetColor(r,g,b); Modified(); } -void SMESH_ActorDef::GetPreHighlightColor(float& r,float& g,float& b){ +void SMESH_ActorDef::GetPreHighlightColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b){ ::GetColor(myPreselectProp,r,g,b); } -float SMESH_ActorDef::GetLineWidth(){ +vtkFloatingPointType SMESH_ActorDef::GetLineWidth(){ return myEdgeProp->GetLineWidth(); } -void SMESH_ActorDef::SetLineWidth(float theVal){ +void SMESH_ActorDef::SetLineWidth(vtkFloatingPointType theVal){ myEdgeProp->SetLineWidth(theVal); my1DProp->SetLineWidth(theVal + aLineWidthInc); @@ -1364,7 +1364,7 @@ void SMESH_ActorDef::SetLineWidth(float theVal){ } -void SMESH_ActorDef::SetNodeSize(float theVal){ +void SMESH_ActorDef::SetNodeSize(vtkFloatingPointType theVal){ myNodeProp->SetPointSize(theVal); myHighlightProp->SetPointSize(theVal); myPreselectProp->SetPointSize(theVal); @@ -1375,7 +1375,7 @@ void SMESH_ActorDef::SetNodeSize(float theVal){ Modified(); } -float SMESH_ActorDef::GetNodeSize(){ +vtkFloatingPointType SMESH_ActorDef::GetNodeSize(){ return myNodeProp->GetPointSize(); } @@ -1448,21 +1448,21 @@ GetClippingPlane(vtkIdType theID) static void ComputeBoundsParam(vtkDataSet* theDataSet, - float theDirection[3], float theMinPnt[3], - float& theMaxBoundPrj, float& theMinBoundPrj) + vtkFloatingPointType theDirection[3], vtkFloatingPointType theMinPnt[3], + vtkFloatingPointType& theMaxBoundPrj, vtkFloatingPointType& theMinBoundPrj) { - float aBounds[6]; + vtkFloatingPointType aBounds[6]; theDataSet->GetBounds(aBounds); //Enlarge bounds in order to avoid conflicts of precision for(int i = 0; i < 6; i += 2){ static double EPS = 1.0E-3; - float aDelta = (aBounds[i+1] - aBounds[i])*EPS; + vtkFloatingPointType aDelta = (aBounds[i+1] - aBounds[i])*EPS; aBounds[i] -= aDelta; aBounds[i+1] += aDelta; } - float aBoundPoints[8][3] = { {aBounds[0],aBounds[2],aBounds[4]}, + vtkFloatingPointType aBoundPoints[8][3] = { {aBounds[0],aBounds[2],aBounds[4]}, {aBounds[1],aBounds[2],aBounds[4]}, {aBounds[0],aBounds[3],aBounds[4]}, {aBounds[1],aBounds[3],aBounds[4]}, @@ -1475,7 +1475,7 @@ static void ComputeBoundsParam(vtkDataSet* theDataSet, theMaxBoundPrj = vtkMath::Dot(theDirection,aBoundPoints[aMaxId]); theMinBoundPrj = theMaxBoundPrj; for(int i = 1; i < 8; i++){ - float aTmp = vtkMath::Dot(theDirection,aBoundPoints[i]); + vtkFloatingPointType aTmp = vtkMath::Dot(theDirection,aBoundPoints[i]); if(theMaxBoundPrj < aTmp){ theMaxBoundPrj = aTmp; aMaxId = i; @@ -1485,7 +1485,7 @@ static void ComputeBoundsParam(vtkDataSet* theDataSet, aMinId = i; } } - float *aMinPnt = aBoundPoints[aMaxId]; + vtkFloatingPointType *aMinPnt = aBoundPoints[aMaxId]; theMinPnt[0] = aMinPnt[0]; theMinPnt[1] = aMinPnt[1]; theMinPnt[2] = aMinPnt[2]; @@ -1493,11 +1493,11 @@ static void ComputeBoundsParam(vtkDataSet* theDataSet, static void DistanceToPosition(vtkDataSet* theDataSet, - float theDirection[3], float theDist, float thePos[3]) + vtkFloatingPointType theDirection[3], vtkFloatingPointType theDist, vtkFloatingPointType thePos[3]) { - float aMaxBoundPrj, aMinBoundPrj, aMinPnt[3]; + vtkFloatingPointType aMaxBoundPrj, aMinBoundPrj, aMinPnt[3]; ComputeBoundsParam(theDataSet,theDirection,aMinPnt,aMaxBoundPrj,aMinBoundPrj); - float aLength = (aMaxBoundPrj-aMinBoundPrj)*theDist; + vtkFloatingPointType aLength = (aMaxBoundPrj-aMinBoundPrj)*theDist; thePos[0] = aMinPnt[0]-theDirection[0]*aLength; thePos[1] = aMinPnt[1]-theDirection[1]*aLength; thePos[2] = aMinPnt[2]-theDirection[2]*aLength; @@ -1505,29 +1505,29 @@ static void DistanceToPosition(vtkDataSet* theDataSet, static void PositionToDistance(vtkDataSet* theDataSet, - float theDirection[3], float thePos[3], float& theDist) + vtkFloatingPointType theDirection[3], vtkFloatingPointType thePos[3], vtkFloatingPointType& theDist) { - float aMaxBoundPrj, aMinBoundPrj, aMinPnt[3]; + vtkFloatingPointType aMaxBoundPrj, aMinBoundPrj, aMinPnt[3]; ComputeBoundsParam(theDataSet,theDirection,aMinPnt,aMaxBoundPrj,aMinBoundPrj); - float aPrj = vtkMath::Dot(theDirection,thePos); + vtkFloatingPointType aPrj = vtkMath::Dot(theDirection,thePos); theDist = (aPrj-aMinBoundPrj)/(aMaxBoundPrj-aMinBoundPrj); } -void SMESH_ActorDef::SetPlaneParam(float theDir[3], float theDist, vtkPlane* thePlane) +void SMESH_ActorDef::SetPlaneParam(vtkFloatingPointType theDir[3], vtkFloatingPointType theDist, vtkPlane* thePlane) { thePlane->SetNormal(theDir); - float anOrigin[3]; + vtkFloatingPointType anOrigin[3]; ::DistanceToPosition(GetUnstructuredGrid(),theDir,theDist,anOrigin); thePlane->SetOrigin(anOrigin); } -void SMESH_ActorDef::GetPlaneParam(float theDir[3], float& theDist, vtkPlane* thePlane) +void SMESH_ActorDef::GetPlaneParam(vtkFloatingPointType theDir[3], vtkFloatingPointType& theDist, vtkPlane* thePlane) { thePlane->GetNormal(theDir); - float anOrigin[3]; + vtkFloatingPointType anOrigin[3]; thePlane->GetOrigin(anOrigin); ::PositionToDistance(GetUnstructuredGrid(),theDir,anOrigin,theDist); } @@ -1617,21 +1617,21 @@ void SMESH_ActorDef::UpdateScalarBar() myScalarBarActor->SetOrientationToVertical(); - float aXVal = horiz ? 0.20 : 0.01; + vtkFloatingPointType aXVal = horiz ? 0.20 : 0.01; if( mgr->hasValue( "SMESH", name + "x" ) ) aXVal = mgr->doubleValue( "SMESH", name + "x", aXVal ); - float aYVal = horiz ? 0.01 : 0.1; + vtkFloatingPointType aYVal = horiz ? 0.01 : 0.1; if( mgr->hasValue( "SMESH", name + "y" ) ) aYVal = mgr->doubleValue( "SMESH", name + "y", aYVal ); myScalarBarActor->SetPosition( aXVal, aYVal ); - float aWVal = horiz ? 0.60 : 0.10; + vtkFloatingPointType aWVal = horiz ? 0.60 : 0.10; if( mgr->hasValue( "SMESH", name + "width" ) ) aWVal = mgr->doubleValue( "SMESH", name + "width", aWVal ); myScalarBarActor->SetWidth( aWVal ); - float aHVal = horiz ? 0.12 : 0.80; + vtkFloatingPointType aHVal = horiz ? 0.12 : 0.80; if( mgr->hasValue( "SMESH", name + "height" ) ) aHVal = mgr->doubleValue( "SMESH", name + "height", aHVal ); myScalarBarActor->SetHeight( aHVal ); diff --git a/src/OBJECT/SMESH_Actor.h b/src/OBJECT/SMESH_Actor.h index 7319914d7..977e1bdc0 100644 --- a/src/OBJECT/SMESH_Actor.h +++ b/src/OBJECT/SMESH_Actor.h @@ -50,29 +50,29 @@ class SMESH_Actor: public SALOME_Actor const char* theName, int theIsClear); - virtual void SetSufaceColor(float r,float g,float b) = 0; - virtual void GetSufaceColor(float& r,float& g,float& b) = 0; + virtual void SetSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0; + virtual void GetSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0; - virtual void SetBackSufaceColor(float r,float g,float b) = 0; - virtual void GetBackSufaceColor(float& r,float& g,float& b) = 0; + virtual void SetBackSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0; + virtual void GetBackSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0; - virtual void SetEdgeColor(float r,float g,float b) = 0; - virtual void GetEdgeColor(float& r,float& g,float& b) = 0; + virtual void SetEdgeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0; + virtual void GetEdgeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0; - virtual void SetNodeColor(float r,float g,float b) = 0; - virtual void GetNodeColor(float& r,float& g,float& b) = 0; + virtual void SetNodeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0; + virtual void GetNodeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0; - virtual void SetHighlightColor(float r,float g,float b) = 0; - virtual void GetHighlightColor(float& r,float& g,float& b) = 0; + virtual void SetHighlightColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0; + virtual void GetHighlightColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0; - virtual void SetPreHighlightColor(float r,float g,float b) = 0; - virtual void GetPreHighlightColor(float& r,float& g,float& b) = 0; + virtual void SetPreHighlightColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b) = 0; + virtual void GetPreHighlightColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b) = 0; - virtual float GetLineWidth() = 0; - virtual void SetLineWidth(float theVal) = 0; + virtual vtkFloatingPointType GetLineWidth() = 0; + virtual void SetLineWidth(vtkFloatingPointType theVal) = 0; - virtual void SetNodeSize(float size) = 0; - virtual float GetNodeSize() = 0; + virtual void SetNodeSize(vtkFloatingPointType size) = 0; + virtual vtkFloatingPointType GetNodeSize() = 0; enum EReperesent { ePoint, eEdge, eSurface}; @@ -85,7 +85,7 @@ class SMESH_Actor: public SALOME_Actor virtual vtkUnstructuredGrid* GetUnstructuredGrid() = 0; - virtual void SetShrinkFactor(float theValue) = 0; + virtual void SetShrinkFactor(vtkFloatingPointType theValue) = 0; virtual void SetPointsLabeled(bool theIsPointsLabeled) = 0; virtual bool GetPointsLabeled() = 0; @@ -101,8 +101,8 @@ class SMESH_Actor: public SALOME_Actor virtual vtkScalarBarActor* GetScalarBarActor() = 0; - virtual void SetPlaneParam(float theDir[3], float theDist, vtkPlane* thePlane) = 0; - virtual void GetPlaneParam(float theDir[3], float& theDist, vtkPlane* thePlane) = 0; + virtual void SetPlaneParam(vtkFloatingPointType theDir[3], vtkFloatingPointType theDist, vtkPlane* thePlane) = 0; + virtual void GetPlaneParam(vtkFloatingPointType theDir[3], vtkFloatingPointType& theDist, vtkPlane* thePlane) = 0; virtual void RemoveAllClippingPlanes() = 0; virtual vtkIdType GetNumberOfClippingPlanes() = 0; diff --git a/src/OBJECT/SMESH_ActorDef.h b/src/OBJECT/SMESH_ActorDef.h index 7ed5149f1..c23f97728 100644 --- a/src/OBJECT/SMESH_ActorDef.h +++ b/src/OBJECT/SMESH_ActorDef.h @@ -79,7 +79,8 @@ class vtkTimeStamp; class SMESH_DeviceActor; -class SMESH_ActorDef : public SMESH_Actor{ +class SMESH_ActorDef : public SMESH_Actor +{ friend class SMESH_VisualObj; friend class SMESH_Actor; @@ -100,35 +101,35 @@ class SMESH_ActorDef : public SMESH_Actor{ virtual bool IsInfinitive(); - virtual void SetOpacity(float theValue); - virtual float GetOpacity(); + virtual void SetOpacity(vtkFloatingPointType theValue); + virtual vtkFloatingPointType GetOpacity(); - virtual void SetSufaceColor(float r,float g,float b); - virtual void GetSufaceColor(float& r,float& g,float& b); + virtual void SetSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b); + virtual void GetSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b); - virtual void SetBackSufaceColor(float r,float g,float b); - virtual void GetBackSufaceColor(float& r,float& g,float& b); + virtual void SetBackSufaceColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b); + virtual void GetBackSufaceColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b); - virtual void SetEdgeColor(float r,float g,float b); - virtual void GetEdgeColor(float& r,float& g,float& b); + virtual void SetEdgeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b); + virtual void GetEdgeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b); - virtual void SetNodeColor(float r,float g,float b); - virtual void GetNodeColor(float& r,float& g,float& b); + virtual void SetNodeColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b); + virtual void GetNodeColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b); - virtual void SetHighlightColor(float r,float g,float b); - virtual void GetHighlightColor(float& r,float& g,float& b); + virtual void SetHighlightColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b); + virtual void GetHighlightColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b); - virtual void SetPreHighlightColor(float r,float g,float b); - virtual void GetPreHighlightColor(float& r,float& g,float& b); + virtual void SetPreHighlightColor(vtkFloatingPointType r,vtkFloatingPointType g,vtkFloatingPointType b); + virtual void GetPreHighlightColor(vtkFloatingPointType& r,vtkFloatingPointType& g,vtkFloatingPointType& b); - virtual float GetLineWidth(); - virtual void SetLineWidth(float theVal); + virtual vtkFloatingPointType GetLineWidth(); + virtual void SetLineWidth(vtkFloatingPointType theVal); - virtual void SetNodeSize(float size) ; - virtual float GetNodeSize() ; + virtual void SetNodeSize(vtkFloatingPointType size) ; + virtual vtkFloatingPointType GetNodeSize() ; virtual int GetNodeObjId(int theVtkID); - virtual float* GetNodeCoord(int theObjID); + virtual vtkFloatingPointType* GetNodeCoord(int theObjID); virtual int GetElemObjId(int theVtkID); virtual vtkCell* GetElemCell(int theObjID); @@ -146,15 +147,15 @@ class SMESH_ActorDef : public SMESH_Actor{ virtual void SetPointRepresentation(bool theIsPointsVisible); virtual bool GetPointRepresentation(); - virtual float* GetBounds(); + virtual vtkFloatingPointType* GetBounds(); virtual void SetTransform(VTKViewer_Transform* theTransform); virtual vtkUnstructuredGrid* GetUnstructuredGrid(); virtual vtkDataSet* GetInput(); virtual vtkMapper* GetMapper(); - virtual float GetShrinkFactor(); - virtual void SetShrinkFactor(float theValue); + virtual vtkFloatingPointType GetShrinkFactor(); + virtual void SetShrinkFactor(vtkFloatingPointType theValue); virtual bool IsShrunkable() { return myIsShrinkable;} virtual bool IsShrunk() { return myIsShrunk;} @@ -172,8 +173,8 @@ class SMESH_ActorDef : public SMESH_Actor{ virtual vtkScalarBarActor* GetScalarBarActor(){ return myScalarBarActor;} - virtual void SetPlaneParam(float theDir[3], float theDist, vtkPlane* thePlane); - virtual void GetPlaneParam(float theDir[3], float& theDist, vtkPlane* thePlane); + virtual void SetPlaneParam(vtkFloatingPointType theDir[3], vtkFloatingPointType theDist, vtkPlane* thePlane); + virtual void GetPlaneParam(vtkFloatingPointType theDir[3], vtkFloatingPointType& theDist, vtkPlane* thePlane); virtual void RemoveAllClippingPlanes(); virtual vtkIdType GetNumberOfClippingPlanes(); diff --git a/src/OBJECT/SMESH_ActorUtils.cxx b/src/OBJECT/SMESH_ActorUtils.cxx index feee143db..127f25a9e 100644 --- a/src/OBJECT/SMESH_ActorUtils.cxx +++ b/src/OBJECT/SMESH_ActorUtils.cxx @@ -35,12 +35,15 @@ static int MYDEBUG = 1; static int MYDEBUG = 0; #endif -namespace SMESH{ +namespace SMESH +{ - float GetFloat( const QString& theValue, float theDefault ) + vtkFloatingPointType + GetFloat( const QString& theValue, + vtkFloatingPointType theDefault ) { int pos = theValue.find( ":" ); - float val = theDefault; + vtkFloatingPointType val = theDefault; if( pos>=0 ) { QString name = theValue.right( theValue.length()-pos-1 ), @@ -51,17 +54,23 @@ namespace SMESH{ return val; } - float GetFloat( const QString& theValue, const QString& theSection, float theDefault ) + vtkFloatingPointType + GetFloat( const QString& theValue, + const QString& theSection, + vtkFloatingPointType theDefault ) { - float val = theDefault; + vtkFloatingPointType val = theDefault; SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr(); if( mgr ) - val = (float) mgr->doubleValue( theValue, theSection, theDefault ); + val = (vtkFloatingPointType) mgr->doubleValue( theValue, theSection, theDefault ); return val; } - void WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, const char* theFileName){ + void + WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, + const char* theFileName) + { vtkUnstructuredGridWriter* aWriter = vtkUnstructuredGridWriter::New(); aWriter->SetFileName(theFileName); aWriter->SetInput(theGrid); @@ -71,7 +80,10 @@ namespace SMESH{ aWriter->Delete(); } - QColor GetColor( const QString& theSect, const QString& theName, const QColor& def ) + QColor + GetColor( const QString& theSect, + const QString& theName, + const QColor& def ) { QColor c = def; SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr(); @@ -80,7 +92,13 @@ namespace SMESH{ return c; } - void GetColor( const QString& theSect, const QString& theName, int& r, int& g, int& b, const QColor& def ) + void + GetColor( const QString& theSect, + const QString& theName, + int& r, + int& g, + int& b, + const QColor& def ) { QColor c = def; SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr(); @@ -90,7 +108,13 @@ namespace SMESH{ SUIT_Tools::rgbSet( SUIT_Tools::rgbSet( c ), r, g, b ); } - void GetColor( const QString& theSect, const QString& theName, float& r, float& g, float& b, const QColor& def ) + void + GetColor( const QString& theSect, + const QString& theName, + vtkFloatingPointType& r, + vtkFloatingPointType& g, + vtkFloatingPointType& b, + const QColor& def ) { int ir( 0 ), ig( 0 ), ib( 0 ); GetColor( theSect, theName, ir, ig, ib, def ); diff --git a/src/OBJECT/SMESH_ActorUtils.h b/src/OBJECT/SMESH_ActorUtils.h index f28e8d6c9..58e72e0a9 100644 --- a/src/OBJECT/SMESH_ActorUtils.h +++ b/src/OBJECT/SMESH_ActorUtils.h @@ -23,18 +23,46 @@ #include #include +#include + class vtkUnstructuredGrid; -namespace SMESH{ +namespace SMESH +{ - float GetFloat( const QString& theValue, float theDefault = 0 ); - float GetFloat( const QString& theName, const QString& theSection, float theDefault = 0 ); + vtkFloatingPointType + GetFloat( const QString& theValue, + vtkFloatingPointType theDefault = 0 ); + + vtkFloatingPointType + GetFloat( const QString& theName, + const QString& theSection, + vtkFloatingPointType theDefault = 0 ); + + QColor + GetColor( const QString& theSect, + const QString& theName, + const QColor&t = QColor() ); + + void + GetColor( const QString& theSect, + const QString& theName, + int&, + int&, + int&, + const QColor&t = QColor() ); - QColor GetColor( const QString& theSect, const QString& theName, const QColor&t = QColor() ); - void GetColor( const QString& theSect, const QString& theName, int&, int&, int&, const QColor&t = QColor() ); - void GetColor( const QString& theSect, const QString& theName, float&, float&, float&, const QColor&t = QColor() ); + void + GetColor( const QString& theSect, + const QString& theName, + vtkFloatingPointType&, + vtkFloatingPointType&, + vtkFloatingPointType&, + const QColor&t = QColor() ); - void WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, const char* theFileName); + void + WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, + const char* theFileName); } diff --git a/src/OBJECT/SMESH_DeviceActor.cxx b/src/OBJECT/SMESH_DeviceActor.cxx index 0d3347ecb..92ea388d4 100644 --- a/src/OBJECT/SMESH_DeviceActor.cxx +++ b/src/OBJECT/SMESH_DeviceActor.cxx @@ -55,7 +55,7 @@ #include #include -#include +#include #include #include @@ -75,7 +75,8 @@ using namespace std; vtkStandardNewMacro(SMESH_DeviceActor); -SMESH_DeviceActor::SMESH_DeviceActor() +SMESH_DeviceActor +::SMESH_DeviceActor() { if(MYDEBUG) MESSAGE("SMESH_DeviceActor - "<Delete(); @@ -139,8 +142,8 @@ SMESH_DeviceActor::~SMESH_DeviceActor(){ void -SMESH_DeviceActor:: -SetStoreGemetryMapping(bool theStoreMapping) +SMESH_DeviceActor +::SetStoreGemetryMapping(bool theStoreMapping) { myGeomFilter->SetStoreMapping(theStoreMapping); SetStoreClippingMapping(theStoreMapping); @@ -148,8 +151,8 @@ SetStoreGemetryMapping(bool theStoreMapping) void -SMESH_DeviceActor:: -SetStoreClippingMapping(bool theStoreMapping) +SMESH_DeviceActor +::SetStoreClippingMapping(bool theStoreMapping) { myStoreClippingMapping = theStoreMapping; myExtractGeometry->SetStoreMapping(theStoreMapping && myIsImplicitFunctionUsed); @@ -158,15 +161,17 @@ SetStoreClippingMapping(bool theStoreMapping) void -SMESH_DeviceActor:: -SetStoreIDMapping(bool theStoreMapping) +SMESH_DeviceActor +::SetStoreIDMapping(bool theStoreMapping) { myExtractUnstructuredGrid->SetStoreMapping(theStoreMapping); } -void SMESH_DeviceActor::Init(TVisualObjPtr theVisualObj, - vtkImplicitBoolean* theImplicitBoolean) +void +SMESH_DeviceActor +::Init(TVisualObjPtr theVisualObj, + vtkImplicitBoolean* theImplicitBoolean) { myVisualObj = theVisualObj; myExtractGeometry->SetImplicitFunction(theImplicitBoolean); @@ -175,8 +180,8 @@ void SMESH_DeviceActor::Init(TVisualObjPtr theVisualObj, void -SMESH_DeviceActor:: -SetImplicitFunctionUsed(bool theIsImplicitFunctionUsed) +SMESH_DeviceActor +::SetImplicitFunctionUsed(bool theIsImplicitFunctionUsed) { int anId = 0; if(theIsImplicitFunctionUsed) @@ -189,7 +194,10 @@ SetImplicitFunctionUsed(bool theIsImplicitFunctionUsed) } -void SMESH_DeviceActor::SetUnstructuredGrid(vtkUnstructuredGrid* theGrid){ +void +SMESH_DeviceActor +::SetUnstructuredGrid(vtkUnstructuredGrid* theGrid) +{ if(theGrid){ //myIsShrinkable = theGrid->GetNumberOfCells() > 10; myIsShrinkable = true; @@ -231,20 +239,28 @@ void SMESH_DeviceActor::SetUnstructuredGrid(vtkUnstructuredGrid* theGrid){ } -VTKViewer_ExtractUnstructuredGrid* SMESH_DeviceActor::GetExtractUnstructuredGrid(){ +VTKViewer_ExtractUnstructuredGrid* +SMESH_DeviceActor +::GetExtractUnstructuredGrid() +{ return myExtractUnstructuredGrid; } -vtkUnstructuredGrid* SMESH_DeviceActor::GetUnstructuredGrid(){ +vtkUnstructuredGrid* +SMESH_DeviceActor +::GetUnstructuredGrid() +{ myExtractUnstructuredGrid->Update(); return myExtractUnstructuredGrid->GetOutput(); } -void SMESH_DeviceActor::SetControlMode(SMESH::Controls::FunctorPtr theFunctor, - vtkScalarBarActor* theScalarBarActor, - vtkLookupTable* theLookupTable) +void +SMESH_DeviceActor +::SetControlMode(SMESH::Controls::FunctorPtr theFunctor, + vtkScalarBarActor* theScalarBarActor, + vtkLookupTable* theLookupTable) { bool anIsInitialized = theFunctor; if(anIsInitialized){ @@ -294,9 +310,11 @@ void SMESH_DeviceActor::SetControlMode(SMESH::Controls::FunctorPtr theFunctor, theScalarBarActor->SetVisibility(anIsInitialized); } -void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor, - vtkScalarBarActor* theScalarBarActor, - vtkLookupTable* theLookupTable) +void +SMESH_DeviceActor +::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor, + vtkScalarBarActor* theScalarBarActor, + vtkLookupTable* theLookupTable) { bool anIsInitialized = theFunctor; myExtractUnstructuredGrid->ClearRegisteredCells(); @@ -348,7 +366,7 @@ void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor } } - vtkIntArray* aCellLocationsArray = vtkIntArray::New(); + vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New(); aCellLocationsArray->SetNumberOfComponents( 1 ); aCellLocationsArray->SetNumberOfTuples( aNbCells ); @@ -408,7 +426,7 @@ void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor } } - vtkIntArray* aCellLocationsArray = vtkIntArray::New(); + vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New(); aCellLocationsArray->SetNumberOfComponents( 1 ); aCellLocationsArray->SetNumberOfTuples( aNbCells ); @@ -433,7 +451,9 @@ void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor theScalarBarActor->SetVisibility(anIsInitialized); } -void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor) +void +SMESH_DeviceActor +::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor) { myExtractUnstructuredGrid->ClearRegisteredCells(); myExtractUnstructuredGrid->ClearRegisteredCellsWithType(); @@ -488,7 +508,7 @@ void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor } } - vtkIntArray* aCellLocationsArray = vtkIntArray::New(); + vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New(); aCellLocationsArray->SetNumberOfComponents( 1 ); aCellLocationsArray->SetNumberOfTuples( aNbCells ); @@ -506,7 +526,10 @@ void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor -unsigned long int SMESH_DeviceActor::GetMTime(){ +unsigned long int +SMESH_DeviceActor +::GetMTime() +{ unsigned long mTime = this->Superclass::GetMTime(); mTime = max(mTime,myExtractGeometry->GetMTime()); mTime = max(mTime,myExtractUnstructuredGrid->GetMTime()); @@ -517,12 +540,18 @@ unsigned long int SMESH_DeviceActor::GetMTime(){ } -void SMESH_DeviceActor::SetTransform(VTKViewer_Transform* theTransform){ +void +SMESH_DeviceActor +::SetTransform(VTKViewer_Transform* theTransform) +{ myTransformFilter->SetTransform(theTransform); } -void SMESH_DeviceActor::SetShrink() { +void +SMESH_DeviceActor +::SetShrink() +{ if ( !myIsShrinkable ) return; if ( vtkDataSet* aDataSet = myPassFilter[ 0 ]->GetOutput() ) { @@ -532,7 +561,10 @@ void SMESH_DeviceActor::SetShrink() { } } -void SMESH_DeviceActor::UnShrink() { +void +SMESH_DeviceActor +::UnShrink() +{ if ( !myIsShrunk ) return; if ( vtkDataSet* aDataSet = myPassFilter[ 0 ]->GetOutput() ) { @@ -544,7 +576,10 @@ void SMESH_DeviceActor::UnShrink() { } -void SMESH_DeviceActor::SetRepresentation(EReperesent theMode){ +void +SMESH_DeviceActor +::SetRepresentation(EReperesent theMode) +{ switch(theMode){ case ePoint: myGeomFilter->SetInside(true); @@ -573,7 +608,10 @@ void SMESH_DeviceActor::SetRepresentation(EReperesent theMode){ } -void SMESH_DeviceActor::SetVisibility(int theMode){ +void +SMESH_DeviceActor +::SetVisibility(int theMode) +{ if(!myExtractUnstructuredGrid->GetInput() || GetUnstructuredGrid()->GetNumberOfCells()) { @@ -584,7 +622,10 @@ void SMESH_DeviceActor::SetVisibility(int theMode){ } -int SMESH_DeviceActor::GetVisibility(){ +int +SMESH_DeviceActor +::GetVisibility() +{ if(!GetUnstructuredGrid()->GetNumberOfCells()){ vtkLODActor::SetVisibility(false); } @@ -592,7 +633,10 @@ int SMESH_DeviceActor::GetVisibility(){ } -int SMESH_DeviceActor::GetNodeObjId(int theVtkID){ +int +SMESH_DeviceActor +::GetNodeObjId(int theVtkID) +{ vtkIdType anID = theVtkID; if(IsImplicitFunctionUsed()) @@ -603,16 +647,22 @@ int SMESH_DeviceActor::GetNodeObjId(int theVtkID){ return aRetID; } -float* SMESH_DeviceActor::GetNodeCoord(int theObjID){ +vtkFloatingPointType* +SMESH_DeviceActor +::GetNodeCoord(int theObjID) +{ vtkDataSet* aDataSet = myMergeFilter->GetOutput(); vtkIdType anID = myVisualObj->GetNodeVTKId(theObjID); - float* aCoord = aDataSet->GetPoint(anID); + vtkFloatingPointType* aCoord = aDataSet->GetPoint(anID); if(MYDEBUG) MESSAGE("GetNodeCoord - theObjID = "<GetColor(3); QColor backfacecolor = aDlg->GetColor(4); /* actor color and backface color */ - anActor->SetSufaceColor(float (color.red()) / 255., - float (color.green()) / 255., - float (color.blue()) / 255.); - anActor->SetBackSufaceColor(float (backfacecolor.red()) / 255., - float (backfacecolor.green()) / 255., - float (backfacecolor.blue()) / 255.); + anActor->SetSufaceColor(vtkFloatingPointType (color.red()) / 255., + vtkFloatingPointType (color.green()) / 255., + vtkFloatingPointType (color.blue()) / 255.); + anActor->SetBackSufaceColor(vtkFloatingPointType (backfacecolor.red()) / 255., + vtkFloatingPointType (backfacecolor.green()) / 255., + vtkFloatingPointType (backfacecolor.blue()) / 255.); /* edge color */ - anActor->SetEdgeColor(float (edgecolor.red()) / 255., - float (edgecolor.green()) / 255., - float (edgecolor.blue()) / 255.); + anActor->SetEdgeColor(vtkFloatingPointType (edgecolor.red()) / 255., + vtkFloatingPointType (edgecolor.green()) / 255., + vtkFloatingPointType (edgecolor.blue()) / 255.); /* Shrink factor and size edges */ anActor->SetShrinkFactor(aDlg->GetIntValue(3) / 100.); anActor->SetLineWidth(aDlg->GetIntValue(1)); /* Nodes color and size */ - anActor->SetNodeColor(float (nodecolor.red()) / 255., - float (nodecolor.green()) / 255., - float (nodecolor.blue()) / 255.); + anActor->SetNodeColor(vtkFloatingPointType (nodecolor.red()) / 255., + vtkFloatingPointType (nodecolor.green()) / 255., + vtkFloatingPointType (nodecolor.blue()) / 255.); anActor->SetNodeSize(aDlg->GetIntValue(2)); delete aDlg; diff --git a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx index dcd66f976..28eba22e9 100644 --- a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx @@ -121,7 +121,7 @@ namespace SMESH { myPreviewActor->VisibilityOff(); myPreviewActor->SetMapper(myMapper); - float anRGB[3]; + vtkFloatingPointType anRGB[3]; vtkProperty* aProp = vtkProperty::New(); GetColor( "SMESH", "fill_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 170, 255 ) ); aProp->SetColor( anRGB[0], anRGB[1], anRGB[2] ); diff --git a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx index 5e10e5a80..ddc38ef4a 100644 --- a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx @@ -120,7 +120,7 @@ namespace SMESH { vtkUnstructuredGrid* myGrid; //vtkProperty* myBackProp, *myProp; - float anRGB[3], aBackRGB[3]; + vtkFloatingPointType myRGB[3], myBackRGB[3]; public: TElementSimulation (SalomeApp_Application* theApplication) @@ -143,14 +143,14 @@ namespace SMESH { myPreviewActor->SetMapper(myMapper); vtkProperty* myProp = vtkProperty::New(); - GetColor( "SMESH", "fill_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 170, 255 ) ); - myProp->SetColor( anRGB[0], anRGB[1], anRGB[2] ); + GetColor( "SMESH", "fill_color", myRGB[0], myRGB[1], myRGB[2], QColor( 0, 170, 255 ) ); + myProp->SetColor( myRGB[0], myRGB[1], myRGB[2] ); myPreviewActor->SetProperty( myProp ); myProp->Delete(); vtkProperty* myBackProp = vtkProperty::New(); - GetColor( "SMESH", "backface_color", aBackRGB[0], aBackRGB[1], aBackRGB[2], QColor( 0, 0, 255 ) ); - myBackProp->SetColor( aBackRGB[0], aBackRGB[1], aBackRGB[2] ); + GetColor( "SMESH", "backface_color", myBackRGB[0], myBackRGB[1], myBackRGB[2], QColor( 0, 0, 255 ) ); + myBackProp->SetColor( myBackRGB[0], myBackRGB[1], myBackRGB[2] ); myPreviewActor->SetBackfaceProperty( myBackProp ); myBackProp->Delete(); @@ -200,7 +200,7 @@ namespace SMESH { // take care of orientation if ( aType == VTK_CONVEX_POINT_SET ) { if ( theReverse && theMode == VTK_SURFACE ) { - //myPreviewActor->GetProperty()->SetColor( aBackRGB[0], aBackRGB[1], aBackRGB[2] ); + //myPreviewActor->GetProperty()->SetColor( myBackRGB[0], myBackRGB[1], myBackRGB[2] ); } } else { @@ -230,7 +230,7 @@ namespace SMESH { // restore normal orientation if ( aType == VTK_CONVEX_POINT_SET ) { if ( theReverse && theMode == VTK_SURFACE ) { - //myPreviewActor->GetProperty()->SetColor( anRGB[0], anRGB[1], anRGB[2] ); + //myPreviewActor->GetProperty()->SetColor( myRGB[0], myRGB[1], myRGB[2] ); } } } diff --git a/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx b/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx index 37679438c..7770056ac 100644 --- a/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx @@ -159,7 +159,7 @@ protected: myActor->SetInfinitive(true); myActor->SetMapper(myMapper); - float anRGB[3]; + vtkFloatingPointType anRGB[3]; vtkProperty* aProp = vtkProperty::New(); SMESH::GetColor( "SMESH", "fill_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 170, 255 ) ); aProp->SetColor(anRGB[0],anRGB[1],anRGB[2]); @@ -656,18 +656,18 @@ void SMESHGUI_ClippingDlg::SetCurrentPlaneParam() OrientedPlane* aPlane = myPlanes[aCurPlaneIndex].GetPointer(); - float aNormal[3]; + vtkFloatingPointType aNormal[3]; SMESH::Orientation anOrientation; - float aDir[3][3] = {{0, 0, 0}, {0, 0, 0}}; + vtkFloatingPointType aDir[3][3] = {{0, 0, 0}, {0, 0, 0}}; { static double aCoeff = vtkMath::Pi()/180.0; - float aRot[2] = {getRotation1(), getRotation2()}; + vtkFloatingPointType aRot[2] = {getRotation1(), getRotation2()}; aPlane->myAngle[0] = aRot[0]; aPlane->myAngle[1] = aRot[1]; - float anU[2] = {cos(aCoeff*aRot[0]), cos(aCoeff*aRot[1])}; - float aV[2] = {sqrt(1.0-anU[0]*anU[0]), sqrt(1.0-anU[1]*anU[1])}; + vtkFloatingPointType anU[2] = {cos(aCoeff*aRot[0]), cos(aCoeff*aRot[1])}; + vtkFloatingPointType aV[2] = {sqrt(1.0-anU[0]*anU[0]), sqrt(1.0-anU[1]*anU[1])}; aV[0] = aRot[0] > 0? aV[0]: -aV[0]; aV[1] = aRot[1] > 0? aV[1]: -aV[1]; @@ -715,37 +715,37 @@ void SMESHGUI_ClippingDlg::SetCurrentPlaneParam() myActor->SetPlaneParam(aNormal, getDistance(), aPlane); vtkDataSet* aDataSet = myActor->GetInput(); - float *aPnt = aDataSet->GetCenter(); + vtkFloatingPointType *aPnt = aDataSet->GetCenter(); - float* anOrigin = aPlane->GetOrigin(); - float aDel = aDataSet->GetLength()/2.0; + vtkFloatingPointType* anOrigin = aPlane->GetOrigin(); + vtkFloatingPointType aDel = aDataSet->GetLength()/2.0; - float aDelta[2][3] = {{aDir[0][0]*aDel, aDir[0][1]*aDel, aDir[0][2]*aDel}, - {aDir[1][0]*aDel, aDir[1][1]*aDel, aDir[1][2]*aDel}}; - float aParam, aPnt0[3], aPnt1[3], aPnt2[3]; + vtkFloatingPointType aDelta[2][3] = {{aDir[0][0]*aDel, aDir[0][1]*aDel, aDir[0][2]*aDel}, + {aDir[1][0]*aDel, aDir[1][1]*aDel, aDir[1][2]*aDel}}; + vtkFloatingPointType aParam, aPnt0[3], aPnt1[3], aPnt2[3]; - float aPnt01[3] = {aPnt[0] - aDelta[0][0] - aDelta[1][0], - aPnt[1] - aDelta[0][1] - aDelta[1][1], - aPnt[2] - aDelta[0][2] - aDelta[1][2]}; - float aPnt02[3] = {aPnt01[0] + aNormal[0], - aPnt01[1] + aNormal[1], - aPnt01[2] + aNormal[2]}; + vtkFloatingPointType aPnt01[3] = {aPnt[0] - aDelta[0][0] - aDelta[1][0], + aPnt[1] - aDelta[0][1] - aDelta[1][1], + aPnt[2] - aDelta[0][2] - aDelta[1][2]}; + vtkFloatingPointType aPnt02[3] = {aPnt01[0] + aNormal[0], + aPnt01[1] + aNormal[1], + aPnt01[2] + aNormal[2]}; vtkPlane::IntersectWithLine(aPnt01,aPnt02,aNormal,anOrigin,aParam,aPnt0); - float aPnt11[3] = {aPnt[0] - aDelta[0][0] + aDelta[1][0], - aPnt[1] - aDelta[0][1] + aDelta[1][1], - aPnt[2] - aDelta[0][2] + aDelta[1][2]}; - float aPnt12[3] = {aPnt11[0] + aNormal[0], - aPnt11[1] + aNormal[1], - aPnt11[2] + aNormal[2]}; + vtkFloatingPointType aPnt11[3] = {aPnt[0] - aDelta[0][0] + aDelta[1][0], + aPnt[1] - aDelta[0][1] + aDelta[1][1], + aPnt[2] - aDelta[0][2] + aDelta[1][2]}; + vtkFloatingPointType aPnt12[3] = {aPnt11[0] + aNormal[0], + aPnt11[1] + aNormal[1], + aPnt11[2] + aNormal[2]}; vtkPlane::IntersectWithLine(aPnt11,aPnt12,aNormal,anOrigin,aParam,aPnt1); - float aPnt21[3] = {aPnt[0] + aDelta[0][0] - aDelta[1][0], - aPnt[1] + aDelta[0][1] - aDelta[1][1], - aPnt[2] + aDelta[0][2] - aDelta[1][2]}; - float aPnt22[3] = {aPnt21[0] + aNormal[0], - aPnt21[1] + aNormal[1], - aPnt21[2] + aNormal[2]}; + vtkFloatingPointType aPnt21[3] = {aPnt[0] + aDelta[0][0] - aDelta[1][0], + aPnt[1] + aDelta[0][1] - aDelta[1][1], + aPnt[2] + aDelta[0][2] - aDelta[1][2]}; + vtkFloatingPointType aPnt22[3] = {aPnt21[0] + aNormal[0], + aPnt21[1] + aNormal[1], + aPnt21[2] + aNormal[2]}; vtkPlane::IntersectWithLine(aPnt21,aPnt22,aNormal,anOrigin,aParam,aPnt2); vtkPlaneSource* aPlaneSource = aPlane->myPlaneSource; diff --git a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx index f65c2394c..beeadb654 100644 --- a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx @@ -115,12 +115,12 @@ class TPolySimulation{ myPreviewActor->SetMapper( myMapper ); myPreviewActor->SetRepresentation( 3 ); - float anRGB[3]; + vtkFloatingPointType anRGB[3]; vtkProperty* aProp = vtkProperty::New(); GetColor( "SMESH", "selection_element_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 170, 255 ) ); aProp->SetColor(anRGB[0],anRGB[1],anRGB[2]); myPreviewActor->SetProperty( aProp ); - float aFactor,aUnits; + vtkFloatingPointType aFactor,aUnits; myPreviewActor->SetResolveCoincidentTopology(true); myPreviewActor->GetPolygonOffsetParameters(aFactor,aUnits); myPreviewActor->SetPolygonOffsetParameters(aFactor,0.2*aUnits); diff --git a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx index af0fd974d..ead5e655b 100755 --- a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx @@ -89,7 +89,7 @@ // VTK Includes #include #include -#include +#include #include #include #include @@ -1226,7 +1226,7 @@ vtkUnstructuredGrid* SMESHGUI_MeshPatternDlg::getGrid() else aCellTypesArray->InsertNextValue(VTK_EMPTY_CELL); } - vtkIntArray* aCellLocationsArray = vtkIntArray::New(); + vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New(); aCellLocationsArray->SetNumberOfComponents(1); aCellLocationsArray->SetNumberOfTuples(aNbCells); diff --git a/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx b/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx index 63d490242..48d82dbfe 100644 --- a/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MoveNodesDlg.cxx @@ -61,7 +61,7 @@ // VTK includes #include #include -#include +#include #include #include #include @@ -547,7 +547,7 @@ void SMESHGUI_MoveNodesDlg::redisplayPreview() aCellTypesArray->InsertNextValue(VTK_VERTEX); anIdList->Delete(); - vtkIntArray* aCellLocationsArray = vtkIntArray::New(); + vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New(); aCellLocationsArray->SetNumberOfComponents(1); aCellLocationsArray->SetNumberOfTuples(1); diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx index 26d6b94a3..32e1a59d1 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx @@ -68,7 +68,7 @@ #include #include #include -#include +#include #include #include #include @@ -1320,7 +1320,7 @@ void SMESHGUI_CuttingOfQuadsDlg::displayPreview() } } - vtkIntArray* aCellLocationsArray = vtkIntArray::New(); + vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New(); aCellLocationsArray->SetNumberOfComponents(1); aCellLocationsArray->SetNumberOfTuples(aNbCells); diff --git a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx index 11c4cf376..67206eca3 100644 --- a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx @@ -63,7 +63,7 @@ // VTK Includes #include #include -#include +#include #include #include #include @@ -148,7 +148,7 @@ namespace SMESH { aCells->InsertNextCell(anIdList); aCellTypesArray->InsertNextValue(VTK_VERTEX); - vtkIntArray* aCellLocationsArray = vtkIntArray::New(); + vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New(); aCellLocationsArray->SetNumberOfComponents(1); aCellLocationsArray->SetNumberOfTuples(1); @@ -179,11 +179,11 @@ namespace SMESH { vtkProperty* aProp = vtkProperty::New(); aProp->SetRepresentationToPoints(); - float anRGB[3]; + vtkFloatingPointType anRGB[3]; GetColor( "SMESH", "node_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 255, 0 ) ); aProp->SetColor( anRGB[0], anRGB[1], anRGB[2] ); - float aPointSize = GetFloat( "SMESH:node_size", 3 ); + vtkFloatingPointType aPointSize = GetFloat( "SMESH:node_size", 3 ); aProp->SetPointSize( aPointSize ); myPreviewActor->SetProperty( aProp ); diff --git a/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx b/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx index b8bf38fbb..21f4fc917 100644 --- a/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx @@ -640,13 +640,13 @@ void SMESHGUI_Preferences_ScalarBarDlg::onSelectionChanged() vtkScalarBarActor* myScalarBarActor = myActor->GetScalarBarActor(); if ( myScalarBarActor->GetLookupTable() ) { - float *range = myScalarBarActor->GetLookupTable()->GetRange(); + vtkFloatingPointType *range = myScalarBarActor->GetLookupTable()->GetRange(); myMinEdit->setText( QString::number( range[0],'g',12 ) ); myMaxEdit->setText( QString::number( range[1],'g',12 ) ); } vtkTextProperty* aTitleTextPrp = myScalarBarActor->GetTitleTextProperty(); - float aTColor[3]; + vtkFloatingPointType aTColor[3]; aTitleTextPrp->GetColor( aTColor ); myTitleColorBtn->setPaletteBackgroundColor( QColor( (int)( aTColor[0]*255 ), (int)( aTColor[1]*255 ), (int)( aTColor[2]*255 ) ) ); myTitleFontCombo->setCurrentItem( aTitleTextPrp->GetFontFamily() ); @@ -655,7 +655,7 @@ void SMESHGUI_Preferences_ScalarBarDlg::onSelectionChanged() myTitleShadowCheck->setChecked( aTitleTextPrp->GetShadow() ); vtkTextProperty* aLabelsTextPrp = myScalarBarActor->GetLabelTextProperty(); - float aLColor[3]; + vtkFloatingPointType aLColor[3]; aLabelsTextPrp->GetColor( aLColor ); myLabelsColorBtn->setPaletteBackgroundColor( QColor( (int)( aLColor[0]*255 ), (int)( aLColor[1]*255 ), (int)( aLColor[2]*255 ) ) ); myLabelsFontCombo->setCurrentItem( aLabelsTextPrp->GetFontFamily() ); diff --git a/src/SMESH_I/SMESH_DumpPython.cxx b/src/SMESH_I/SMESH_DumpPython.cxx index 97e49b2a1..b1d71f582 100644 --- a/src/SMESH_I/SMESH_DumpPython.cxx +++ b/src/SMESH_I/SMESH_DumpPython.cxx @@ -174,7 +174,7 @@ namespace SMESH myStream << aSObject->GetID(); } else if ( !CORBA::is_nil(theArg)) { if ( aSMESHGen->CanPublishInStudy( theArg )) // not published SMESH object - myStream << "smeshObj_" << (int) theArg; + myStream << "smeshObj_" << size_t(theArg); else myStream << NotPublishedObjectName(); } diff --git a/src/SMESH_I/SMESH_Filter_i.cxx b/src/SMESH_I/SMESH_Filter_i.cxx index 755b188ce..3691e881c 100644 --- a/src/SMESH_I/SMESH_Filter_i.cxx +++ b/src/SMESH_I/SMESH_Filter_i.cxx @@ -2511,11 +2511,12 @@ static LDOM_Element createFilterItem( const char* theName, { LDOM_Element aCriterionItem = theDoc.createElement( "criterion" ); - aCriterionItem.setAttribute( ATTR_TYPE , toString( aCriteria[ i ].Type ) ); - aCriterionItem.setAttribute( ATTR_COMPARE , toString( aCriteria[ i ].Compare ) ); - aCriterionItem.setAttribute( ATTR_THRESHOLD , toString( aCriteria[ i ].Threshold ) ); - aCriterionItem.setAttribute( ATTR_UNARY , toString( aCriteria[ i ].UnaryOp ) ); - aCriterionItem.setAttribute( ATTR_BINARY , toString( aCriteria[ i ].BinaryOp ) ); + typedef long int TLongParam; + aCriterionItem.setAttribute( ATTR_TYPE , toString( TLongParam( aCriteria[ i ].Type) ) ); + aCriterionItem.setAttribute( ATTR_COMPARE , toString( TLongParam( aCriteria[ i ].Compare ) ) ); + aCriterionItem.setAttribute( ATTR_THRESHOLD , toString( TLongParam( aCriteria[ i ].Threshold ) ) ); + aCriterionItem.setAttribute( ATTR_UNARY , toString( TLongParam( aCriteria[ i ].UnaryOp ) ) ); + aCriterionItem.setAttribute( ATTR_BINARY , toString( TLongParam( aCriteria[ i ].BinaryOp ) ) ); aCriterionItem.setAttribute( ATTR_THRESHOLD_STR, (const char*)aCriteria[ i ].ThresholdStr ); aCriterionItem.setAttribute( ATTR_TOLERANCE , toString( aCriteria[ i ].Tolerance ) ); diff --git a/src/SMESH_I/SMESH_MEDFamily_i.hxx b/src/SMESH_I/SMESH_MEDFamily_i.hxx index eeeef51ee..6baea0572 100644 --- a/src/SMESH_I/SMESH_MEDFamily_i.hxx +++ b/src/SMESH_I/SMESH_MEDFamily_i.hxx @@ -61,7 +61,7 @@ public : // IDL Methods void setProtocol(SALOME::TypeOfCommunication typ) {} void release() {} - SALOME::SenderInt_ptr getSenderForNumber(long int) {return SALOME::SenderInt::_nil();} + SALOME::SenderInt_ptr getSenderForNumber(SALOME_MED::medGeometryElement) {return SALOME::SenderInt::_nil();} SALOME::SenderInt_ptr getSenderForNumberIndex() {return SALOME::SenderInt::_nil();} CORBA::Long getIdentifier() diff --git a/src/SMESH_I/SMESH_MEDMesh_i.hxx b/src/SMESH_I/SMESH_MEDMesh_i.hxx index 3b0fedec9..53c0d35d7 100644 --- a/src/SMESH_I/SMESH_MEDMesh_i.hxx +++ b/src/SMESH_I/SMESH_MEDMesh_i.hxx @@ -45,195 +45,206 @@ class SMESH_Mesh_i; class SMESH_MEDMesh_i: - public virtual POA_SALOME_MED::MESH, public virtual SALOME::GenericObj_i + public virtual POA_SALOME_MED::MESH, + public virtual SALOME::GenericObj_i { - public: private: protected: - // C++ object containing values - ::SMESH_Mesh_i * _mesh_i; - SMESHDS_Mesh *_meshDS; - - string _meshId; - bool _compte; - bool _creeFamily; - int _indexElts; - int _indexEnts; - int _famIdent; - - map < SALOME_MED::medGeometryElement, int >_mapIndToSeqElts; - SALOME_MED::long_array_var _seq_elemId[MED_NBR_GEOMETRIE_MAILLE]; - - map < SALOME_MED::medEntityMesh, int >_mapNbTypes; - map < SALOME_MED::medEntityMesh, int >_mapIndToVectTypes; - vector < SALOME_MED::medGeometryElement > - _TypesId[MED_NBR_GEOMETRIE_MAILLE]; - - vector < SALOME_MED::FAMILY_ptr > _families; - public: - - // Constructors and associated internal methods - SMESH_MEDMesh_i(); - SMESH_MEDMesh_i(SMESH_Mesh_i * m); - ~SMESH_MEDMesh_i(); - - // IDL Methods - void setProtocol(SALOME::TypeOfCommunication typ) {} - void release() {} - SALOME::SenderDouble_ptr getSenderForCoordinates(long int) {return SALOME::SenderDouble::_nil();} - SALOME::SenderInt_ptr getSenderForConnectivity(long int, long int, long int, long int) {return SALOME::SenderInt::_nil();} - SALOME::SenderInt_ptr getSenderForPolygonsConnectivity(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();} - SALOME::SenderInt_ptr getSenderForPolygonsConnectivityIndex(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();} - SALOME::SenderInt_ptr getSenderForPolyhedronConnectivity(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();} - SALOME::SenderInt_ptr getSenderForPolyhedronIndex(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();} - SALOME::SenderInt_ptr getSenderForPolyhedronFacesIndex() {return SALOME::SenderInt::_nil();} - - char *getName() throw(SALOME::SALOME_Exception); - CORBA::Long getSpaceDimension() throw(SALOME::SALOME_Exception); - - CORBA::Long getMeshDimension() throw(SALOME::SALOME_Exception); - - CORBA::Boolean getIsAGrid() throw (SALOME::SALOME_Exception); - - CORBA::Boolean - existConnectivity(SALOME_MED::medConnectivity connectivityType, - SALOME_MED::medEntityMesh entity) - throw (SALOME::SALOME_Exception); - - char *getCoordinatesSystem() throw(SALOME::SALOME_Exception); - - CORBA::Double getCoordinate(CORBA::Long Number, CORBA::Long Axis) - throw (SALOME::SALOME_Exception); - - SALOME_MED::double_array * getCoordinates(SALOME_MED::medModeSwitch typeSwitch) - throw(SALOME::SALOME_Exception); - - SALOME_MED::string_array * getCoordinatesNames() - throw(SALOME::SALOME_Exception); - - SALOME_MED::string_array * getCoordinatesUnits() - throw(SALOME::SALOME_Exception); - - CORBA::Long getNumberOfNodes() throw(SALOME::SALOME_Exception); - - CORBA::Long getNumberOfTypes(SALOME_MED::medEntityMesh entity) - throw(SALOME::SALOME_Exception); - - SALOME_MED::medGeometryElement_array * - getTypes(SALOME_MED::medEntityMesh entity) throw(SALOME:: - SALOME_Exception); - - SALOME_MED::medGeometryElement - getElementType(SALOME_MED::medEntityMesh entity, - CORBA::Long number) - throw (SALOME::SALOME_Exception); - - CORBA::Long getNumberOfElements(SALOME_MED::medEntityMesh entity, - SALOME_MED::medGeometryElement geomElement) - throw(SALOME::SALOME_Exception); - - SALOME_MED::long_array * - getConnectivity(SALOME_MED::medModeSwitch typeSwitch, - SALOME_MED::medConnectivity mode, - SALOME_MED::medEntityMesh entity, - SALOME_MED::medGeometryElement geomElement) - throw(SALOME::SALOME_Exception); - - SALOME_MED::long_array * - getConnectivityIndex(SALOME_MED::medConnectivity mode, - SALOME_MED::medEntityMesh entity) - throw(SALOME::SALOME_Exception); - - SALOME_MED::long_array* - getGlobalNumberingIndex(SALOME_MED::medEntityMesh entity) - throw (SALOME::SALOME_Exception); - - CORBA::Long getElementNumber(SALOME_MED::medConnectivity mode, - SALOME_MED::medEntityMesh entity, - SALOME_MED::medGeometryElement type, - const SALOME_MED::long_array & connectivity) - throw(SALOME::SALOME_Exception); - - SALOME_MED::long_array * - getReverseConnectivity(SALOME_MED::medConnectivity mode) - throw(SALOME::SALOME_Exception); - - SALOME_MED::long_array * - getReverseConnectivityIndex(SALOME_MED:: - medConnectivity mode) throw(SALOME::SALOME_Exception); - - // Family and Group - CORBA::Long getNumberOfFamilies(SALOME_MED::medEntityMesh entity) - throw(SALOME::SALOME_Exception); - - CORBA::Long getNumberOfGroups(SALOME_MED::medEntityMesh entity) - throw(SALOME::SALOME_Exception); - - SALOME_MED::Family_array * - getFamilies(SALOME_MED::medEntityMesh entity) - throw(SALOME::SALOME_Exception); - - SALOME_MED::FAMILY_ptr getFamily(SALOME_MED::medEntityMesh entity, - CORBA::Long i) throw(SALOME::SALOME_Exception); - - SALOME_MED::Group_array * getGroups(SALOME_MED::medEntityMesh entity) - throw(SALOME::SALOME_Exception); - - SALOME_MED::GROUP_ptr getGroup(SALOME_MED::medEntityMesh entity, - CORBA::Long i) throw(SALOME::SALOME_Exception); - - SALOME_MED::SUPPORT_ptr - getBoundaryElements(SALOME_MED::medEntityMesh entity) - throw (SALOME::SALOME_Exception); - - SALOME_MED::SUPPORT_ptr getSkin(SALOME_MED::SUPPORT_ptr mySupport3D) - throw (SALOME::SALOME_Exception); - - SALOME_MED::FIELD_ptr getVolume(SALOME_MED::SUPPORT_ptr mySupport) - throw(SALOME::SALOME_Exception); - - SALOME_MED::FIELD_ptr getArea(SALOME_MED::SUPPORT_ptr mySupport) - throw(SALOME::SALOME_Exception); - - SALOME_MED::FIELD_ptr getLength(SALOME_MED::SUPPORT_ptr mySupport) - throw(SALOME::SALOME_Exception); - - SALOME_MED::FIELD_ptr getNormal(SALOME_MED::SUPPORT_ptr mySupport) - throw(SALOME::SALOME_Exception); - - SALOME_MED::FIELD_ptr getBarycenter(SALOME_MED::SUPPORT_ptr mySupport) - throw(SALOME::SALOME_Exception); - - SALOME_MED::FIELD_ptr getNeighbourhood(SALOME_MED::SUPPORT_ptr mySupport) - throw(SALOME::SALOME_Exception); - - // Others - void addInStudy(SALOMEDS::Study_ptr myStudy, - SALOME_MED::MESH_ptr myIor) throw(SALOME::SALOME_Exception); - CORBA::Long addDriver(SALOME_MED::medDriverTypes driverType, - const char *fileName, const char *meshName) - throw(SALOME::SALOME_Exception); - void rmDriver(CORBA::Long i) throw(SALOME::SALOME_Exception); - void read(CORBA::Long i) throw(SALOME::SALOME_Exception); - void write(CORBA::Long i, const char *driverMeshName) - throw(SALOME::SALOME_Exception); - - // Cuisine interne - CORBA::Long getCorbaIndex() throw(SALOME::SALOME_Exception); - - SALOME_MED::MESH::meshInfos * getMeshGlobal() - throw (SALOME::SALOME_Exception); - - bool areEquals(SALOME_MED::MESH_ptr other) { return false;}; - - SALOME_MED::MESH::coordinateInfos * getCoordGlobal() - throw (SALOME::SALOME_Exception); - - SALOME_MED::MESH::connectivityInfos * - getConnectGlobal(SALOME_MED::medEntityMesh entity) - throw (SALOME::SALOME_Exception); - - // - void calculeNbElts() throw(SALOME::SALOME_Exception); - void createFamilies() throw(SALOME::SALOME_Exception); +protected: + // C++ object containing values + ::SMESH_Mesh_i * _mesh_i; + SMESHDS_Mesh *_meshDS; + + string _meshId; + bool _compte; + bool _creeFamily; + int _indexElts; + int _indexEnts; + int _famIdent; + + map < SALOME_MED::medGeometryElement, int >_mapIndToSeqElts; + SALOME_MED::long_array_var _seq_elemId[MED_NBR_GEOMETRIE_MAILLE]; + + map < SALOME_MED::medEntityMesh, int >_mapNbTypes; + map < SALOME_MED::medEntityMesh, int >_mapIndToVectTypes; + vector < SALOME_MED::medGeometryElement > + _TypesId[MED_NBR_GEOMETRIE_MAILLE]; + + vector < SALOME_MED::FAMILY_ptr > _families; +public: + + // Constructors and associated internal methods + SMESH_MEDMesh_i(); + SMESH_MEDMesh_i(SMESH_Mesh_i * m); + ~SMESH_MEDMesh_i(); + + // IDL Methods + void setProtocol(SALOME::TypeOfCommunication typ) {} + void release() {} + SALOME::SenderDouble_ptr getSenderForCoordinates(SALOME_MED::medModeSwitch) {return SALOME::SenderDouble::_nil();} + SALOME::SenderInt_ptr getSenderForConnectivity(SALOME_MED::medModeSwitch, + SALOME_MED::medConnectivity, + SALOME_MED::medEntityMesh, + SALOME_MED::medGeometryElement) + { + return SALOME::SenderInt::_nil(); + } + SALOME::SenderInt_ptr getSenderForPolygonsConnectivity(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();} + SALOME::SenderInt_ptr getSenderForPolygonsConnectivityIndex(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();} + SALOME::SenderInt_ptr getSenderForPolyhedronConnectivity(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();} + SALOME::SenderInt_ptr getSenderForPolyhedronIndex(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();} + SALOME::SenderInt_ptr getSenderForPolyhedronFacesIndex() {return SALOME::SenderInt::_nil();} + + char *getName() throw(SALOME::SALOME_Exception); + CORBA::Long getSpaceDimension() throw(SALOME::SALOME_Exception); + + CORBA::Long getMeshDimension() throw(SALOME::SALOME_Exception); + + CORBA::Boolean getIsAGrid() throw (SALOME::SALOME_Exception); + + CORBA::Boolean + existConnectivity(SALOME_MED::medConnectivity connectivityType, + SALOME_MED::medEntityMesh entity) + throw (SALOME::SALOME_Exception); + + char *getCoordinatesSystem() throw(SALOME::SALOME_Exception); + + CORBA::Double getCoordinate(CORBA::Long Number, CORBA::Long Axis) + throw (SALOME::SALOME_Exception); + + SALOME_MED::double_array * getCoordinates(SALOME_MED::medModeSwitch typeSwitch) + throw(SALOME::SALOME_Exception); + + SALOME_MED::string_array * getCoordinatesNames() + throw(SALOME::SALOME_Exception); + + SALOME_MED::string_array * getCoordinatesUnits() + throw(SALOME::SALOME_Exception); + + CORBA::Long getNumberOfNodes() throw(SALOME::SALOME_Exception); + + CORBA::Long getNumberOfTypes(SALOME_MED::medEntityMesh entity) + throw(SALOME::SALOME_Exception); + + SALOME_MED::medGeometryElement_array * + getTypes(SALOME_MED::medEntityMesh entity) throw(SALOME:: + SALOME_Exception); + + SALOME_MED::medGeometryElement + getElementType(SALOME_MED::medEntityMesh entity, + CORBA::Long number) + throw (SALOME::SALOME_Exception); + + CORBA::Long getNumberOfElements(SALOME_MED::medEntityMesh entity, + SALOME_MED::medGeometryElement geomElement) + throw(SALOME::SALOME_Exception); + + SALOME_MED::long_array * + getConnectivity(SALOME_MED::medModeSwitch typeSwitch, + SALOME_MED::medConnectivity mode, + SALOME_MED::medEntityMesh entity, + SALOME_MED::medGeometryElement geomElement) + throw(SALOME::SALOME_Exception); + + SALOME_MED::long_array * + getConnectivityIndex(SALOME_MED::medConnectivity mode, + SALOME_MED::medEntityMesh entity) + throw(SALOME::SALOME_Exception); + + SALOME_MED::long_array* + getGlobalNumberingIndex(SALOME_MED::medEntityMesh entity) + throw (SALOME::SALOME_Exception); + + CORBA::Long getElementNumber(SALOME_MED::medConnectivity mode, + SALOME_MED::medEntityMesh entity, + SALOME_MED::medGeometryElement type, + const SALOME_MED::long_array & connectivity) + throw(SALOME::SALOME_Exception); + + SALOME_MED::long_array * + getReverseConnectivity(SALOME_MED::medConnectivity mode) + throw(SALOME::SALOME_Exception); + + SALOME_MED::long_array * + getReverseConnectivityIndex(SALOME_MED::medConnectivity mode) + throw(SALOME::SALOME_Exception); + + // Family and Group + CORBA::Long getNumberOfFamilies(SALOME_MED::medEntityMesh entity) + throw(SALOME::SALOME_Exception); + + CORBA::Long getNumberOfGroups(SALOME_MED::medEntityMesh entity) + throw(SALOME::SALOME_Exception); + + SALOME_MED::Family_array * + getFamilies(SALOME_MED::medEntityMesh entity) + throw(SALOME::SALOME_Exception); + + SALOME_MED::FAMILY_ptr getFamily(SALOME_MED::medEntityMesh entity, + CORBA::Long i) + throw(SALOME::SALOME_Exception); + + SALOME_MED::Group_array * getGroups(SALOME_MED::medEntityMesh entity) + throw(SALOME::SALOME_Exception); + + SALOME_MED::GROUP_ptr getGroup(SALOME_MED::medEntityMesh entity, + CORBA::Long i) + throw(SALOME::SALOME_Exception); + + SALOME_MED::SUPPORT_ptr + getBoundaryElements(SALOME_MED::medEntityMesh entity) + throw (SALOME::SALOME_Exception); + + SALOME_MED::SUPPORT_ptr getSkin(SALOME_MED::SUPPORT_ptr mySupport3D) + throw (SALOME::SALOME_Exception); + + SALOME_MED::FIELD_ptr getVolume(SALOME_MED::SUPPORT_ptr mySupport) + throw(SALOME::SALOME_Exception); + + SALOME_MED::FIELD_ptr getArea(SALOME_MED::SUPPORT_ptr mySupport) + throw(SALOME::SALOME_Exception); + + SALOME_MED::FIELD_ptr getLength(SALOME_MED::SUPPORT_ptr mySupport) + throw(SALOME::SALOME_Exception); + + SALOME_MED::FIELD_ptr getNormal(SALOME_MED::SUPPORT_ptr mySupport) + throw(SALOME::SALOME_Exception); + + SALOME_MED::FIELD_ptr getBarycenter(SALOME_MED::SUPPORT_ptr mySupport) + throw(SALOME::SALOME_Exception); + + SALOME_MED::FIELD_ptr getNeighbourhood(SALOME_MED::SUPPORT_ptr mySupport) + throw(SALOME::SALOME_Exception); + + // Others + void addInStudy(SALOMEDS::Study_ptr myStudy, + SALOME_MED::MESH_ptr myIor) + throw(SALOME::SALOME_Exception); + CORBA::Long addDriver(SALOME_MED::medDriverTypes driverType, + const char *fileName, const char *meshName) + throw(SALOME::SALOME_Exception); + void rmDriver(CORBA::Long i) throw(SALOME::SALOME_Exception); + void read(CORBA::Long i) throw(SALOME::SALOME_Exception); + void write(CORBA::Long i, const char *driverMeshName) + throw(SALOME::SALOME_Exception); + + // Cuisine interne + CORBA::Long getCorbaIndex() + throw(SALOME::SALOME_Exception); + + SALOME_MED::MESH::meshInfos * getMeshGlobal() + throw (SALOME::SALOME_Exception); + + bool areEquals(SALOME_MED::MESH_ptr other) { return false;}; + + SALOME_MED::MESH::coordinateInfos * getCoordGlobal() + throw (SALOME::SALOME_Exception); + + SALOME_MED::MESH::connectivityInfos * + getConnectGlobal(SALOME_MED::medEntityMesh entity) + throw (SALOME::SALOME_Exception); + + // + void calculeNbElts() throw(SALOME::SALOME_Exception); + void createFamilies() throw(SALOME::SALOME_Exception); }; #endif /* _MED_MESH_I_HXX_ */ diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index 16ee57c78..5ccd2e510 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -1639,7 +1639,7 @@ SMESH::ElementType SMESH_Mesh_i::GetElementType( const CORBA::Long id, const boo CORBA::Long SMESH_Mesh_i::GetMeshPtr() { - return (CORBA::Long)_impl; + return CORBA::Long(size_t(_impl)); } diff --git a/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx b/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx index 12d77a6dd..329b66af4 100644 --- a/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx +++ b/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx @@ -78,8 +78,10 @@ StdMeshers_NumberOfSegments_i::~StdMeshers_NumberOfSegments_i() * Builds point distribution according to passed function */ //============================================================================= -SMESH::double_array* StdMeshers_NumberOfSegments_i::BuildDistributionExpr( const char* func, long nbSeg, long conv ) -throw ( SALOME::SALOME_Exception ) +SMESH::double_array* StdMeshers_NumberOfSegments_i::BuildDistributionExpr( const char* func, + CORBA::Long nbSeg, + CORBA::Long conv ) + throw ( SALOME::SALOME_Exception ) { MESSAGE( "StdMeshers_NumberOfSegments_i::BuildDistribution" ); ASSERT( myBaseImpl ); @@ -99,8 +101,9 @@ throw ( SALOME::SALOME_Exception ) } SMESH::double_array* StdMeshers_NumberOfSegments_i::BuildDistributionTab( const SMESH::double_array& func, - long nbSeg, long conv ) -throw ( SALOME::SALOME_Exception ) + CORBA::Long nbSeg, + CORBA::Long conv ) + throw ( SALOME::SALOME_Exception ) { MESSAGE( "StdMeshers_NumberOfSegments_i::BuildDistribution" ); ASSERT( myBaseImpl );