// HOMARD HOMARD : implementation of HOMARD idl descriptions
//
-// Copyright (C) 2011-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2011-2024 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File : HOMARD_Boundary.cxx
-// Author : Paul RASCLE, EDF
+// Author : Gerald NICOLAS, EDF
// Module : HOMARD
//
// Remarques :
//
switch (_Type)
{
+ case -1:
+ {
+ aScript << "CAO boundary " << _Name << "\n";
+ aScript << "\t" << _Name << " = homard.CreateBoundaryCAO(\"" << _Name << "\", ";
+ aScript << "\"" << _DataFile << "\")\n";
+ break ;
+ }
case 0:
{
aScript << "discrete boundary " << _Name << "\n";
aScript << "\t" << _Name << " = homard.CreateBoundaryDi(\"" << _Name << "\", ";
aScript << "\"" << _MeshName << "\", ";
- aScript << "\"" << _MeshFile << "\")\n";
+ aScript << "\"" << _DataFile << "\")\n";
break ;
}
case 1:
aScript << _Xcentre1 << ", " << _Ycentre1 << ", " << _Zcentre1 << ", " << _Rayon1 << ", " << _Xcentre2 << ", " << _Ycentre2 << ", " << _Zcentre2 << ", " << _Rayon2 << ")\n";
break ;
}
+ case 5:
+ {
+ aScript << "tore " << _Name << "\n";
+ aScript << "\t" << _Name << " = homard.CreateBoundaryTorus(\"" << _Name << "\", ";
+ aScript << _Xcentre << ", " << _Ycentre << ", " << _Zcentre << ", " << _Xaxe << ", " << _Yaxe << ", " << _Zaxe << ", " << _Rayon1 << ", " << _Rayon2 << ")\n";
+ break ;
+ }
}
return aScript.str();
return _MeshName;
}
//=============================================================================
-void HOMARD_Boundary::SetMeshFile( const char* MeshFile )
+void HOMARD_Boundary::SetDataFile( const char* DataFile )
{
- _MeshFile = std::string( MeshFile );
+ _DataFile = std::string( DataFile );
}
//=============================================================================
-std::string HOMARD_Boundary::GetMeshFile() const
+std::string HOMARD_Boundary::GetDataFile() const
{
- return _MeshFile;
+ return _DataFile;
}
//=======================================================================================
void HOMARD_Boundary::SetCylinder( double X0, double X1, double X2,
_Xcentre = Xcentre; _Ycentre = Ycentre; _Zcentre = Zcentre;
}
//=======================================================================================
+void HOMARD_Boundary::SetTorus( double X0, double X1, double X2,
+ double X3, double X4, double X5, double X6, double X7 )
+{
+ _Xcentre = X0; _Ycentre = X1; _Zcentre = X2;
+ _Xaxe = X3; _Yaxe = X4; _Zaxe = X5;
+ _Rayon1 = X6;
+ _Rayon2 = X7;
+}
+//=======================================================================================
std::vector<double> HOMARD_Boundary::GetCoords() const
{
std::vector<double> mesCoor;
mesCoor.push_back( _Rayon2 );
break ;
}
- VERIFICATION( (_Type>=1) && (_Type<=4) ) ;
+// Tore
+ case 5:
+ {
+ mesCoor.push_back( _Xcentre );
+ mesCoor.push_back( _Ycentre );
+ mesCoor.push_back( _Zcentre );
+ mesCoor.push_back( _Xaxe );
+ mesCoor.push_back( _Yaxe );
+ mesCoor.push_back( _Zaxe );
+ mesCoor.push_back( _Rayon1 );
+ mesCoor.push_back( _Rayon2 );
+ break ;
+ }
+ VERIFICATION( (_Type>=1) && (_Type<=5) ) ;
}
return mesCoor;
}