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] );
my2DActor->GetMapper()->SetLookupTable(myLookupTable);
my3DActor->GetMapper()->SetLookupTable(myLookupTable);
- float aFactor, aUnits;
+ vtkFloatingPointType aFactor, aUnits;
my2DActor->GetPolygonOffsetParameters(aFactor,aUnits);
my2DActor->SetPolygonOffsetParameters(aFactor,aUnits*0.75);
}
-float* SMESH_ActorDef::GetBounds(){
+vtkFloatingPointType* SMESH_ActorDef::GetBounds(){
return myNodeActor->GetBounds();
}
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);
return myPickableActor->GetNodeObjId(theVtkID);
}
-float* SMESH_ActorDef::GetNodeCoord(int theObjID){
+vtkFloatingPointType* SMESH_ActorDef::GetNodeCoord(int theObjID){
return myPickableActor->GetNodeCoord(theObjID);
}
}
-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);
}
-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);
}
-void SMESH_ActorDef::SetNodeSize(float theVal){
+void SMESH_ActorDef::SetNodeSize(vtkFloatingPointType theVal){
myNodeProp->SetPointSize(theVal);
myHighlightProp->SetPointSize(theVal);
myPreselectProp->SetPointSize(theVal);
Modified();
}
-float SMESH_ActorDef::GetNodeSize(){
+vtkFloatingPointType SMESH_ActorDef::GetNodeSize(){
return myNodeProp->GetPointSize();
}
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]},
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;
aMinId = i;
}
}
- float *aMinPnt = aBoundPoints[aMaxId];
+ vtkFloatingPointType *aMinPnt = aBoundPoints[aMaxId];
theMinPnt[0] = aMinPnt[0];
theMinPnt[1] = aMinPnt[1];
theMinPnt[2] = aMinPnt[2];
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;
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);
}
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 );
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};
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;
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;
class SMESH_DeviceActor;
-class SMESH_ActorDef : public SMESH_Actor{
+class SMESH_ActorDef : public SMESH_Actor
+{
friend class SMESH_VisualObj;
friend class 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);
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;}
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();
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 ),
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);
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();
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();
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 );
#include <qcolor.h>
#include <qstring.h>
+#include <vtkSystemIncludes.h>
+
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);
}
#include "SMESH_ExtractGeometry.h"
#include "SMESH_ControlsDef.hxx"
#include "SMESH_ActorUtils.h"
+#include "VTKViewer_CellLocationsArray.h"
#include <VTKViewer_Transform.h>
#include <VTKViewer_TransformFilter.h>
#include <vtkCell.h>
#include <vtkIdList.h>
-#include <vtkIntArray.h>
#include <vtkCellArray.h>
#include <vtkUnsignedCharArray.h>
vtkStandardNewMacro(SMESH_DeviceActor);
-SMESH_DeviceActor::SMESH_DeviceActor()
+SMESH_DeviceActor
+::SMESH_DeviceActor()
{
if(MYDEBUG) MESSAGE("SMESH_DeviceActor - "<<this);
}
-SMESH_DeviceActor::~SMESH_DeviceActor(){
+SMESH_DeviceActor
+::~SMESH_DeviceActor()
+{
if(MYDEBUG) MESSAGE("~SMESH_DeviceActor - "<<this);
myProperty->Delete();
void
-SMESH_DeviceActor::
-SetStoreGemetryMapping(bool theStoreMapping)
+SMESH_DeviceActor
+::SetStoreGemetryMapping(bool theStoreMapping)
{
myGeomFilter->SetStoreMapping(theStoreMapping);
SetStoreClippingMapping(theStoreMapping);
void
-SMESH_DeviceActor::
-SetStoreClippingMapping(bool theStoreMapping)
+SMESH_DeviceActor
+::SetStoreClippingMapping(bool theStoreMapping)
{
myStoreClippingMapping = theStoreMapping;
myExtractGeometry->SetStoreMapping(theStoreMapping && myIsImplicitFunctionUsed);
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);
void
-SMESH_DeviceActor::
-SetImplicitFunctionUsed(bool theIsImplicitFunctionUsed)
+SMESH_DeviceActor
+::SetImplicitFunctionUsed(bool theIsImplicitFunctionUsed)
{
int anId = 0;
if(theIsImplicitFunctionUsed)
}
-void SMESH_DeviceActor::SetUnstructuredGrid(vtkUnstructuredGrid* theGrid){
+void
+SMESH_DeviceActor
+::SetUnstructuredGrid(vtkUnstructuredGrid* theGrid)
+{
if(theGrid){
//myIsShrinkable = theGrid->GetNumberOfCells() > 10;
myIsShrinkable = true;
}
-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){
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();
}
}
- vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+ VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New();
aCellLocationsArray->SetNumberOfComponents( 1 );
aCellLocationsArray->SetNumberOfTuples( aNbCells );
}
}
- vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+ VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New();
aCellLocationsArray->SetNumberOfComponents( 1 );
aCellLocationsArray->SetNumberOfTuples( aNbCells );
theScalarBarActor->SetVisibility(anIsInitialized);
}
-void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor)
+void
+SMESH_DeviceActor
+::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor)
{
myExtractUnstructuredGrid->ClearRegisteredCells();
myExtractUnstructuredGrid->ClearRegisteredCellsWithType();
}
}
- vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+ VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New();
aCellLocationsArray->SetNumberOfComponents( 1 );
aCellLocationsArray->SetNumberOfTuples( aNbCells );
-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());
}
-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() )
{
}
}
-void SMESH_DeviceActor::UnShrink() {
+void
+SMESH_DeviceActor
+::UnShrink()
+{
if ( !myIsShrunk ) return;
if ( vtkDataSet* aDataSet = myPassFilter[ 0 ]->GetOutput() )
{
}
-void SMESH_DeviceActor::SetRepresentation(EReperesent theMode){
+void
+SMESH_DeviceActor
+::SetRepresentation(EReperesent theMode)
+{
switch(theMode){
case ePoint:
myGeomFilter->SetInside(true);
}
-void SMESH_DeviceActor::SetVisibility(int theMode){
+void
+SMESH_DeviceActor
+::SetVisibility(int theMode)
+{
if(!myExtractUnstructuredGrid->GetInput() ||
GetUnstructuredGrid()->GetNumberOfCells())
{
}
-int SMESH_DeviceActor::GetVisibility(){
+int
+SMESH_DeviceActor
+::GetVisibility()
+{
if(!GetUnstructuredGrid()->GetNumberOfCells()){
vtkLODActor::SetVisibility(false);
}
}
-int SMESH_DeviceActor::GetNodeObjId(int theVtkID){
+int
+SMESH_DeviceActor
+::GetNodeObjId(int theVtkID)
+{
vtkIdType anID = theVtkID;
if(IsImplicitFunctionUsed())
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 = "<<theObjID<<"; anID = "<<anID);
return aCoord;
}
-int SMESH_DeviceActor::GetElemObjId(int theVtkID){
+int
+SMESH_DeviceActor
+::GetElemObjId(int theVtkID)
+{
vtkIdType anId = myGeomFilter->GetElemObjId(theVtkID);
if(anId < 0)
return -1;
return aRetID;
}
-vtkCell* SMESH_DeviceActor::GetElemCell(int theObjID){
+vtkCell*
+SMESH_DeviceActor
+::GetElemCell(int theObjID)
+{
vtkDataSet* aDataSet = myVisualObj->GetUnstructuredGrid();
vtkIdType aGridID = myVisualObj->GetElemVTKId(theObjID);
vtkCell* aCell = aDataSet->GetCell(aGridID);
}
-float SMESH_DeviceActor::GetShrinkFactor(){
+vtkFloatingPointType
+SMESH_DeviceActor
+::GetShrinkFactor()
+{
return myShrinkFilter->GetShrinkFactor();
}
-void SMESH_DeviceActor::SetShrinkFactor(float theValue){
+void
+SMESH_DeviceActor
+::SetShrinkFactor(vtkFloatingPointType theValue)
+{
theValue = theValue > 0.1? theValue: 0.8;
myShrinkFilter->SetShrinkFactor(theValue);
Modified();
}
-void SMESH_DeviceActor::SetHighlited(bool theIsHighlited){
+void
+SMESH_DeviceActor
+::SetHighlited(bool theIsHighlited)
+{
if ( myIsHighlited == theIsHighlited )
return;
myIsHighlited = theIsHighlited;
Modified();
}
-void SMESH_DeviceActor::Render(vtkRenderer *ren, vtkMapper* m){
+void
+SMESH_DeviceActor
+::Render(vtkRenderer *ren, vtkMapper* m)
+{
int aResolveCoincidentTopology = vtkMapper::GetResolveCoincidentTopology();
- float aStoredFactor, aStoredUnit;
+ vtkFloatingPointType aStoredFactor, aStoredUnit;
vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(aStoredFactor,aStoredUnit);
vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
- float aFactor = myPolygonOffsetFactor, aUnits = myPolygonOffsetUnits;
+ vtkFloatingPointType aFactor = myPolygonOffsetFactor, aUnits = myPolygonOffsetUnits;
if(myIsHighlited){
- static float EPS = .01;
+ static vtkFloatingPointType EPS = .01;
aUnits *= (1.0-EPS);
}
vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnits);
}
-void SMESH_DeviceActor::SetPolygonOffsetParameters(float factor, float units){
+void
+SMESH_DeviceActor
+::SetPolygonOffsetParameters(vtkFloatingPointType factor,
+ vtkFloatingPointType units)
+{
myPolygonOffsetFactor = factor;
myPolygonOffsetUnits = units;
}
void SetStoreIDMapping(bool theStoreMapping);
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);
virtual void SetTransform(VTKViewer_Transform* theTransform);
virtual unsigned long int GetMTime();
- float GetShrinkFactor();
- void SetShrinkFactor(float value);
+ vtkFloatingPointType GetShrinkFactor();
+ void SetShrinkFactor(vtkFloatingPointType value);
bool IsShrunkable() { return myIsShrinkable;}
bool IsShrunk() { return myIsShrunk;}
bool myIsHighlited;
- float myPolygonOffsetFactor;
- float myPolygonOffsetUnits;
+ vtkFloatingPointType myPolygonOffsetFactor;
+ vtkFloatingPointType myPolygonOffsetUnits;
- void SetPolygonOffsetParameters(float factor, float units);
- void GetPolygonOffsetParameters(float& factor, float& units){
+ void
+ SetPolygonOffsetParameters(vtkFloatingPointType factor,
+ vtkFloatingPointType units);
+
+ void
+ GetPolygonOffsetParameters(vtkFloatingPointType& factor,
+ vtkFloatingPointType& units)
+ {
factor = myPolygonOffsetFactor;
units = myPolygonOffsetUnits;
}
vtkIdList *cellPts;
vtkCell *cell;
int numCellPts;
- float *x;
- float multiplier;
+ vtkFloatingPointType *x;
+ vtkFloatingPointType multiplier;
vtkPoints *newPts;
vtkIdList *newCellPts;
vtkDataSet *input = this->GetInput();
// To extract boundary cells, we have to create supplemental information
if ( this->ExtractBoundaryCells )
{
- float val;
+ vtkFloatingPointType val;
newScalars = vtkFloatArray::New();
newScalars->SetNumberOfValues(numPts);
#include "SMESH_ControlsDef.hxx"
#include "SalomeApp_Application.h"
#include "VTKViewer_ExtractUnstructuredGrid.h"
+#include "VTKViewer_CellLocationsArray.h"
#include CORBA_SERVER_HEADER(SMESH_Gen)
#include CORBA_SERVER_HEADER(SALOME_Exception)
#include <vtkCell.h>
#include <vtkIdList.h>
-#include <vtkIntArray.h>
#include <vtkCellArray.h>
#include <vtkUnsignedCharArray.h>
// Insert cells in grid
- vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+ VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New();
aCellLocationsArray->SetNumberOfComponents( 1 );
aCellLocationsArray->SetNumberOfTuples( aNbCells );
anActor->SetRepresentation(SMESH_Actor::ePoint);
break;
case 1132:{
- float color[3];
+ vtkFloatingPointType color[3];
anActor->GetSufaceColor(color[0], color[1], color[2]);
int c0 = int (color[0] * 255);
int c1 = int (color[1] * 255);
int c2 = int (color[2] * 255);
QColor c(c0, c1, c2);
- float edgecolor[3];
+ vtkFloatingPointType edgecolor[3];
anActor->GetEdgeColor(edgecolor[0], edgecolor[1], edgecolor[2]);
c0 = int (edgecolor[0] * 255);
c1 = int (edgecolor[1] * 255);
c2 = int (edgecolor[2] * 255);
QColor e(c0, c1, c2);
- float backfacecolor[3];
+ vtkFloatingPointType backfacecolor[3];
anActor->GetBackSufaceColor(backfacecolor[0], backfacecolor[1], backfacecolor[2]);
c0 = int (backfacecolor[0] * 255);
c1 = int (backfacecolor[1] * 255);
c2 = int (backfacecolor[2] * 255);
QColor b(c0, c1, c2);
- float nodecolor[3];
+ vtkFloatingPointType nodecolor[3];
anActor->GetNodeColor(nodecolor[0], nodecolor[1], nodecolor[2]);
c0 = int (nodecolor[0] * 255);
c1 = int (nodecolor[1] * 255);
if(Edgewidth == 0)
Edgewidth = 1;
int intValue = int(anActor->GetNodeSize());
- float Shrink = anActor->GetShrinkFactor();
+ vtkFloatingPointType Shrink = anActor->GetShrinkFactor();
SMESHGUI_Preferences_ColorDlg *aDlg =
new SMESHGUI_Preferences_ColorDlg( SMESHGUI::GetSMESHGUI(), "" );
QColor nodecolor = aDlg->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;
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] );
vtkUnstructuredGrid* myGrid;
//vtkProperty* myBackProp, *myProp;
- float anRGB[3], aBackRGB[3];
+ vtkFloatingPointType myRGB[3], myBackRGB[3];
public:
TElementSimulation (SalomeApp_Application* theApplication)
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();
// 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 {
// 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] );
}
}
}
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]);
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];
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;
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);
#include "SVTK_ViewModel.h"
#include "SVTK_Selector.h"
#include "SVTK_ViewWindow.h"
+#include "VTKViewer_CellLocationsArray.h"
// OCCT Includes
#include <TColStd_MapOfInteger.hxx>
// VTK Includes
#include <vtkCell.h>
#include <vtkIdList.h>
-#include <vtkIntArray.h>
#include <vtkCellArray.h>
#include <vtkUnsignedCharArray.h>
#include <vtkUnstructuredGrid.h>
else aCellTypesArray->InsertNextValue(VTK_EMPTY_CELL);
}
- vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+ VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New();
aCellLocationsArray->SetNumberOfComponents(1);
aCellLocationsArray->SetNumberOfTuples(aNbCells);
#include "SALOME_ListIO.hxx"
#include "SVTK_ViewWindow.h"
+#include "VTKViewer_CellLocationsArray.h"
#include "utilities.h"
// VTK includes
#include <vtkCell.h>
#include <vtkIdList.h>
-#include <vtkIntArray.h>
#include <vtkCellArray.h>
#include <vtkUnsignedCharArray.h>
#include <vtkUnstructuredGrid.h>
aCellTypesArray->InsertNextValue(VTK_VERTEX);
anIdList->Delete();
- vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+ VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New();
aCellLocationsArray->SetNumberOfComponents(1);
aCellLocationsArray->SetNumberOfTuples(1);
#include "SVTK_Selector.h"
#include "SVTK_ViewModel.h"
#include "SVTK_ViewWindow.h"
+#include "VTKViewer_CellLocationsArray.h"
// OCCT Includes
#include <Precision.hxx>
#include <vtkPolygon.h>
#include <vtkConvexPointSet.h>
#include <vtkIdList.h>
-#include <vtkIntArray.h>
#include <vtkCellArray.h>
#include <vtkUnsignedCharArray.h>
#include <vtkUnstructuredGrid.h>
}
}
- vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+ VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New();
aCellLocationsArray->SetNumberOfComponents(1);
aCellLocationsArray->SetNumberOfTuples(aNbCells);
#include "SVTK_Selector.h"
#include "SVTK_ViewWindow.h"
+#include "VTKViewer_CellLocationsArray.h"
#include "SALOME_Actor.h"
#include "SALOME_ListIO.hxx"
// VTK Includes
#include <vtkCell.h>
#include <vtkIdList.h>
-#include <vtkIntArray.h>
#include <vtkCellArray.h>
#include <vtkUnsignedCharArray.h>
#include <vtkUnstructuredGrid.h>
aCells->InsertNextCell(anIdList);
aCellTypesArray->InsertNextValue(VTK_VERTEX);
- vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+ VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New();
aCellLocationsArray->SetNumberOfComponents(1);
aCellLocationsArray->SetNumberOfTuples(1);
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 );
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() );
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() );
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();
}
{
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 ) );
// 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()
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_ */
CORBA::Long SMESH_Mesh_i::GetMeshPtr()
{
- return (CORBA::Long)_impl;
+ return CORBA::Long(size_t(_impl));
}
* 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 );
}
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 );