This hypothesis is used by "Radial prism" algorithm. More...
#include <StdMeshers_LayerDistribution_i.hxx>

This hypothesis is used by "Radial prism" algorithm.
It specifies 1D hypothesis defining distribution of segments between the internal and the external surfaces.
Definition at line 48 of file StdMeshers_LayerDistribution_i.hxx.
| StdMeshers_LayerDistribution_i::StdMeshers_LayerDistribution_i | ( | PortableServer::POA_ptr | thePOA, |
| int | theStudyId, | ||
| ::SMESH_Gen * | theGenImpl | ||
| ) |
StdMeshers_LayerDistribution_i.StdMeshers_LayerDistribution_i.
Constructor
Definition at line 49 of file StdMeshers_LayerDistribution_i.cxx.
References MESSAGE, and SMESH_Hypothesis_i.myBaseImpl.
: SALOME::GenericObj_i( thePOA ),
SMESH_Hypothesis_i( thePOA )
{
MESSAGE( "StdMeshers_LayerDistribution_i::StdMeshers_LayerDistribution_i" );
myBaseImpl = new ::StdMeshers_LayerDistribution( theGenImpl->GetANewId(),
theStudyId,
theGenImpl );
}
| StdMeshers_LayerDistribution_i::~StdMeshers_LayerDistribution_i | ( | ) | [virtual] |
StdMeshers_LayerDistribution_i.~StdMeshers_LayerDistribution_i.
Destructor
Definition at line 69 of file StdMeshers_LayerDistribution_i.cxx.
References MESSAGE.
{
MESSAGE( "StdMeshers_LayerDistribution_i::~StdMeshers_LayerDistribution_i" );
}
| void SMESH_Hypothesis_i::ClearParameters | ( | ) | [inherited] |
SMESH_Hypothesis_i.ClearParameters()
Definition at line 232 of file SMESH_Hypothesis_i.cxx.
References SMESH_Hypothesis_i.IsPublished(), and SMESH_Hypothesis_i.myBaseImpl.
{
if(!IsPublished()) {
myBaseImpl->ClearParameters();
}
}
| CORBA::Long SMESH_Hypothesis_i::GetId | ( | ) | [inherited] |
Get unique id of hypothesis
Definition at line 119 of file SMESH_Hypothesis_i.cxx.
References MESSAGE, and SMESH_Hypothesis_i.myBaseImpl.
{
MESSAGE( "SMESH_Hypothesis_i::GetId" );
return myBaseImpl->GetID();
}
| StdMeshers_LayerDistribution * StdMeshers_LayerDistribution_i::GetImpl | ( | ) |
StdMeshers_LayerDistribution_i.GetImpl.
Get implementation
Reimplemented from SMESH_Hypothesis_i.
Reimplemented in StdMeshers_LayerDistribution2D_i.
Definition at line 134 of file StdMeshers_LayerDistribution_i.cxx.
References SMESH_Hypothesis_i.myBaseImpl.
Referenced by LoadFrom(), and SaveTo().
{
return ( ::StdMeshers_LayerDistribution* )myBaseImpl;
}
| SMESH::ListOfParameters * SMESH_Hypothesis_i::GetLastParameters | ( | ) | [inherited] |
SMESH_Hypothesis_i.GetLastParameters()
Definition at line 189 of file SMESH_Hypothesis_i.cxx.
References SMESH_Gen_i.GetCurrentStudy(), SMESH_Hypothesis_i.GetParameters(), SMESH_Gen_i.GetSMESHGen(), SMESH_Hypothesis_i.IsPublished(), and SMESH_Hypothesis_i.myBaseImpl.
{
SMESH::ListOfParameters_var aResult = new SMESH::ListOfParameters();
SMESH_Gen_i *gen = SMESH_Gen_i::GetSMESHGen();
if(gen) {
char *aParameters;
if(IsPublished())
aParameters = GetParameters();
else
aParameters = myBaseImpl->GetLastParameters();
SALOMEDS::Study_ptr aStudy = gen->GetCurrentStudy();
if(!aStudy->_is_nil()) {
SALOMEDS::ListOfListOfStrings_var aSections = aStudy->ParseVariables(aParameters);
if(aSections->length() > 0) {
SALOMEDS::ListOfStrings aVars = aSections[aSections->length()-1];
aResult->length(aVars.length());
for(int i = 0;i < aVars.length();i++)
aResult[i] = CORBA::string_dup( aVars[i]);
}
}
}
return aResult._retn();
}
| SMESH::SMESH_Hypothesis_ptr StdMeshers_LayerDistribution_i::GetLayerDistribution | ( | ) |
Returns 1D hypothesis specifying distribution of layers.
StdMeshers_LayerDistribution_i.GetLayerDistribution.
| SMESH.SMESH_Hypothesis_ptr | - 1D hypothesis |
Returns <number of="" layers>=""> parameter value
Definition at line 120 of file StdMeshers_LayerDistribution_i.cxx.
References SMESH_demo_hexa2_upd.hyp, and myHyp.
| char * SMESH_Hypothesis_i::GetLibName | ( | ) | [inherited] |
SMESH_Hypothesis_i.GetLibName.
Get plugin library name of hypothesis (required by persistency mechanism)
Definition at line 91 of file SMESH_Hypothesis_i.cxx.
References MESSAGE, and SMESH_Hypothesis_i.myBaseImpl.
Referenced by SetLayerDistribution().
{
MESSAGE( "SMESH_Hypothesis_i::GetLibName" );
return CORBA::string_dup( myBaseImpl->GetLibName() );
};
| char * SMESH_Hypothesis_i::GetName | ( | ) | [inherited] |
Get type name of hypothesis
Definition at line 77 of file SMESH_Hypothesis_i.cxx.
References SMESH_Hypothesis_i.myBaseImpl.
Referenced by SaveTo(), and SetLayerDistribution().
{
//MESSAGE( "SMESH_Hypothesis_i::GetName" );
return CORBA::string_dup( myBaseImpl->GetName() );
};
| char * SMESH_Hypothesis_i::GetParameters | ( | ) | [inherited] |
SMESH_Hypothesis_i.GetParameters()
Definition at line 168 of file SMESH_Hypothesis_i.cxx.
References SMESH_Gen_i.GetParameters(), SMESH_Gen_i.GetSMESHGen(), SMESH_Hypothesis_i.IsPublished(), MESSAGE, and SMESH_Hypothesis_i.myBaseImpl.
Referenced by SMESH_Hypothesis_i.GetLastParameters().
{
SMESH_Gen_i *gen = SMESH_Gen_i::GetSMESHGen();
char* aResult;
if(IsPublished()) {
MESSAGE("SMESH_Hypothesis_i::GetParameters() : Get Parameters from SObject");
aResult = gen->GetParameters(SMESH::SMESH_Hypothesis::_narrow(_this()));
}
else {
MESSAGE("SMESH_Hypothesis_i::GetParameters() : Get local parameters");
aResult = myBaseImpl->GetParameters();
}
return CORBA::string_dup(aResult);
}
| CORBA::Boolean StdMeshers_LayerDistribution_i::IsDimSupported | ( | SMESH::Dimension | type | ) |
Verify whether hypothesis supports given entity type.
| type | - dimension (see SMESH.Dimension enumeration) |
| CORBA.Boolean | - TRUE if dimension is supported, FALSE otherwise |
Verify whether hypothesis supports given entity type (see SMESH.Dimension enumeration)
Reimplemented in StdMeshers_LayerDistribution2D_i.
Definition at line 148 of file StdMeshers_LayerDistribution_i.cxx.
References SMESH.DIM_3D.
{
return type == SMESH::DIM_3D;
}
| bool SMESH_Hypothesis_i::IsPublished | ( | ) | [inherited] |
SMESH_Hypothesis_i.IsPublished()
Definition at line 131 of file SMESH_Hypothesis_i.cxx.
References SMESH_Gen_i.GetCurrentStudy(), SMESH_Gen_i.GetSMESHGen(), SMESH_Gen_i.ObjectToSObject(), and SMESH_AdvancedEditor.res.
Referenced by SMESH_Hypothesis_i.ClearParameters(), SMESH_Hypothesis_i.GetLastParameters(), SMESH_Hypothesis_i.GetParameters(), SMESH_Hypothesis_i.SetLastParameters(), and SMESH_Hypothesis_i.SetParameters().
{
bool res = false;
SMESH_Gen_i *gen = SMESH_Gen_i::GetSMESHGen();
if(gen){
SALOMEDS::SObject_var SO =
SMESH_Gen_i::ObjectToSObject(gen->GetCurrentStudy() , SMESH::SMESH_Hypothesis::_narrow(_this()));
res = !SO->_is_nil();
}
return res;
}
| void StdMeshers_LayerDistribution_i::LoadFrom | ( | const char * | theStream | ) | [virtual] |
Retrieve parameters from the string.
| theStream | - the input string |
Reimplemented from SMESH_Hypothesis_i.
Definition at line 186 of file StdMeshers_LayerDistribution_i.cxx.
References SMESH_Gen_i.CreateHypothesis(), SMESH_Gen_i.GetCurrentStudy(), SMESH_Hypothesis_i.GetImpl(), GetImpl(), SMESH_Gen_i.GetSMESHGen(), SMESH_Hypothesis_i.LoadFrom(), SMESH_Hypothesis_i.myBaseImpl, myHyp, and SMESH_Gen_i.SetCurrentStudy().
{
ASSERT( myBaseImpl );
std::istringstream is( theStream );
string typeName, libName;
if ( is >> typeName &&
is >> libName )
{
SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen();
SALOMEDS::Study_var curStudy = gen->GetCurrentStudy();
gen->SetCurrentStudy( SALOMEDS::Study::_nil() ); // prevent hypo publishing
try {
SMESH::SMESH_Hypothesis_var hyp1D =
gen->CreateHypothesis( typeName.c_str(), libName.c_str() );
SMESH_Hypothesis_i* hyp1D_i = SMESH::DownCast< SMESH_Hypothesis_i*>( hyp1D );
if ( hyp1D_i ) {
hyp1D_i->LoadFrom( & theStream[ is.tellg() ]);
this->GetImpl()->SetLayerDistribution( hyp1D_i->GetImpl() );
myHyp = hyp1D;
// as hyp1D is not published, its ID changes
//SMESH::TPythonDump() << _this() << ".SetLayerDistribution( " << hyp1D << " )";
}
}
catch (...) {
}
gen->SetCurrentStudy( curStudy ); // enable hypo publishing
}
}
| char * StdMeshers_LayerDistribution_i::SaveTo | ( | ) | [virtual] |
Write parameters in a string.
| char* | - resulting string |
Reimplemented from SMESH_Hypothesis_i.
Definition at line 160 of file StdMeshers_LayerDistribution_i.cxx.
References GetImpl(), SMESH_Hypothesis_i.GetName(), SMESH_Hypothesis_i.myBaseImpl, myHyp, and SMESH_Hypothesis_i.SaveTo().
{
ASSERT( myBaseImpl );
std::ostringstream os;
::SMESH_Hypothesis* hyp1D = GetImpl()->GetLayerDistribution();
SMESH_Hypothesis_i* hyp1D_i = SMESH::DownCast< SMESH_Hypothesis_i*>( myHyp );
if ( !hyp1D || !hyp1D_i )
os << "NULL_HYPO ";
else {
os << hyp1D->GetName() << " "
<< hyp1D->GetLibName() << " "
<< hyp1D_i->SaveTo();
}
//myBaseImpl->SaveTo( os );
return CORBA::string_dup( os.str().c_str() );
}
| void SMESH_Hypothesis_i::SetLastParameters | ( | const char * | theParameters | ) | [inherited] |
SMESH_Hypothesis_i.SetLastParameters()
Definition at line 220 of file SMESH_Hypothesis_i.cxx.
References SMESH_Hypothesis_i.IsPublished(), and SMESH_Hypothesis_i.myBaseImpl.
{
if(!IsPublished()) {
myBaseImpl->SetLastParameters(theParameters);
}
}
| void StdMeshers_LayerDistribution_i::SetLayerDistribution | ( | SMESH::SMESH_Hypothesis_ptr | hyp1D | ) | throw ( SALOME::SALOME_Exception ) |
Sets 1D hypothesis specifying distribution of layers.
StdMeshers_LayerDistribution_i.SetLayerDistribution.
| hyp1D | - 1D hypothesis |
Definition at line 82 of file StdMeshers_LayerDistribution_i.cxx.
References SMESH_Hypothesis_i.GetImpl(), SMESH_Hypothesis_i.GetLibName(), SMESH_Hypothesis_i.GetName(), and SMESH_Gen_i.GetSMESHGen().
{
ASSERT( myBaseImpl );
try {
SMESH_Hypothesis_i * hyp_i = SMESH::DownCast< SMESH_Hypothesis_i*>( hyp1D );
bool isNewHyp = ( hyp_i->GetImpl() != this->GetImpl()->GetLayerDistribution() );
this->GetImpl()->SetLayerDistribution( hyp_i->GetImpl() );
myHyp = SMESH::SMESH_Hypothesis::_duplicate( hyp1D );
// Remove SO of 1D hypothesis if it was published
if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) {
SALOMEDS::Study_var study = gen->GetCurrentStudy();
SALOMEDS::SObject_var SO = gen->ObjectToSObject( study, hyp1D );
if ( ! SO->_is_nil() )
study->NewBuilder()->RemoveObjectWithChildren( SO );
}
// Update Python script: write creation of 1D hyp as it is not published and
// for this, SMESH_Gen does not write it's creation
if ( isNewHyp )
SMESH::TPythonDump() << hyp1D << " = "
<< SMESH_Gen_i::GetSMESHGen() << ".CreateHypothesis('"
<< hyp_i->GetName() << "', '" << hyp_i->GetLibName() << "')";
}
catch ( SALOME_Exception& S_ex ) {
THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM );
}
// Update Python script
SMESH::TPythonDump() << _this() << ".SetLayerDistribution( " << hyp1D << " )";
}
| void SMESH_Hypothesis_i::SetLibName | ( | const char * | theLibName | ) | [inherited] |
SMESH_Hypothesis_i.SetLibName.
Set plugin library name of hypothesis (required by persistency mechanism)
Definition at line 150 of file SMESH_Hypothesis.cxx.
Referenced by SMESH_Gen_i.createHypothesis().
{
_libName = string(theLibName);
}
| void SMESH_Hypothesis_i::SetParameters | ( | const char * | theParameters | ) | [inherited] |
SMESH_Hypothesis_i.SetParameters()
Definition at line 148 of file SMESH_Hypothesis_i.cxx.
References SMESH_Gen_i.GetSMESHGen(), SMESH_Hypothesis_i.IsPublished(), SMESH_Hypothesis_i.myBaseImpl, SMESH_Gen_i.ParseParameters(), and SMESH_Gen_i.UpdateParameters().
{
SMESH_Gen_i *gen = SMESH_Gen_i::GetSMESHGen();
char * aParameters = CORBA::string_dup(theParameters);
if(gen){
if(IsPublished()) {
SMESH_Gen_i::GetSMESHGen()->UpdateParameters(SMESH::SMESH_Hypothesis::_narrow(_this()),aParameters);
}
else {
myBaseImpl->SetParameters(gen->ParseParameters(aParameters));
}
}
}
| void SMESH_Hypothesis_i::UpdateAsMeshesRestored | ( | ) | [virtual, inherited] |
This mesthod is called after completion of loading a study.
Reimplemented in StdMeshers_ImportSource1D_i, and StdMeshers_ImportSource2D_i.
Definition at line 292 of file SMESH_Hypothesis_i.cxx.
Referenced by SMESH_Gen_i.Load().
{
// for hyps needing full data restored
}
::SMESH_Hypothesis* SMESH_Hypothesis_i.myBaseImpl [protected, inherited] |
Definition at line 97 of file SMESH_Hypothesis_i.hxx.
Referenced by SMESH_Hypothesis_i.ClearParameters(), StdMeshers_NumberOfSegments_i.ConversionMode(), SMESH_Algo_i.GetCompatibleHypothesis(), StdMeshers_Deflection1D_i.GetDeflection(), StdMeshers_NumberOfSegments_i.GetDistrType(), StdMeshers_NumberOfSegments_i.GetExpressionFunction(), StdMeshers_AutomaticLength_i.GetFineness(), SMESH_Hypothesis_i.GetId(), StdMeshers_ViscousLayers_i.GetImpl(), StdMeshers_UseExisting_2D_i.GetImpl(), StdMeshers_UseExisting_1D_i.GetImpl(), StdMeshers_StartEndLength_i.GetImpl(), StdMeshers_Regular_1D_i.GetImpl(), StdMeshers_Quadrangle_2D_i.GetImpl(), StdMeshers_Propagation_i.GetImpl(), StdMeshers_Projection_1D_i.GetImpl(), StdMeshers_Projection_2D_i.GetImpl(), StdMeshers_Projection_3D_i.GetImpl(), StdMeshers_RadialPrism_3D_i.GetImpl(), StdMeshers_Prism_3D_i.GetImpl(), StdMeshers_NumberOfSegments_i.GetImpl(), StdMeshers_NumberOfLayers_i.GetImpl(), StdMeshers_NumberOfLayers2D_i.GetImpl(), StdMeshers_MEFISTO_2D_i.GetImpl(), StdMeshers_MaxLength_i.GetImpl(), StdMeshers_MaxElementVolume_i.GetImpl(), StdMeshers_MaxElementArea_i.GetImpl(), StdMeshers_LocalLength_i.GetImpl(), StdMeshers_LengthFromEdges_i.GetImpl(), GetImpl(), StdMeshers_LayerDistribution2D_i.GetImpl(), StdMeshers_ImportSource2D_i.GetImpl(), StdMeshers_ImportSource1D_i.GetImpl(), StdMeshers_Import_1D_i.GetImpl(), StdMeshers_Import_1D2D_i.GetImpl(), StdMeshers_Hexa_3D_i.GetImpl(), StdMeshers_FixedPoints1D_i.GetImpl(), StdMeshers_Deflection1D_i.GetImpl(), StdMeshers_AutomaticLength_i.GetImpl(), StdMeshers_Arithmetic1D_i.GetImpl(), SMESH_Hypothesis_i.GetImpl(), SMESH_Hypothesis_i.GetLastParameters(), StdMeshers_StartEndLength_i.GetLength(), StdMeshers_MaxLength_i.GetLength(), StdMeshers_LocalLength_i.GetLength(), StdMeshers_Arithmetic1D_i.GetLength(), SMESH_Hypothesis_i.GetLibName(), StdMeshers_MaxElementArea_i.GetMaxElementArea(), StdMeshers_MaxElementVolume_i.GetMaxElementVolume(), StdMeshers_LengthFromEdges_i.GetMode(), SMESH_Hypothesis_i.GetName(), StdMeshers_FixedPoints1D_i.GetNbSegments(), StdMeshers_NumberOfLayers_i.GetNumberOfLayers(), StdMeshers_NumberOfSegments_i.GetNumberOfSegments(), StdMeshers_StartEndLength_i.GetObjectEntry(), StdMeshers_NumberOfSegments_i.GetObjectEntry(), StdMeshers_FixedPoints1D_i.GetObjectEntry(), StdMeshers_Arithmetic1D_i.GetObjectEntry(), SMESH_Hypothesis_i.GetParameters(), StdMeshers_FixedPoints1D_i.GetPoints(), StdMeshers_LocalLength_i.GetPrecision(), StdMeshers_MaxLength_i.GetPreestimatedLength(), StdMeshers_StartEndLength_i.GetReversedEdges(), StdMeshers_NumberOfSegments_i.GetReversedEdges(), StdMeshers_FixedPoints1D_i.GetReversedEdges(), StdMeshers_Arithmetic1D_i.GetReversedEdges(), StdMeshers_NumberOfSegments_i.GetScaleFactor(), StdMeshers_NumberOfSegments_i.GetTableFunction(), StdMeshers_MaxLength_i.GetUsePreestimatedLength(), StdMeshers_MaxLength_i.HavePreestimatedLength(), LoadFrom(), StdMeshers_ImportSource2D_i.LoadFrom(), StdMeshers_ImportSource1D_i.LoadFrom(), SMESH_Hypothesis_i.LoadFrom(), SaveTo(), StdMeshers_ImportSource2D_i.SaveTo(), StdMeshers_ImportSource1D_i.SaveTo(), SMESH_Hypothesis_i.SaveTo(), SMESH_Hypothesis_i.SetLastParameters(), StdMeshers_StartEndLength_i.SetObjectEntry(), StdMeshers_NumberOfSegments_i.SetObjectEntry(), StdMeshers_FixedPoints1D_i.SetObjectEntry(), StdMeshers_Arithmetic1D_i.SetObjectEntry(), SMESH_Hypothesis_i.SetParameters(), StdMeshers_MaxLength_i.SetPreestimatedLength(), StdMeshers_StartEndLength_i.SetReversedEdges(), StdMeshers_NumberOfSegments_i.SetReversedEdges(), StdMeshers_FixedPoints1D_i.SetReversedEdges(), StdMeshers_Arithmetic1D_i.SetReversedEdges(), StdMeshers.StdMeshers_ImportSource1D.SetSourceEdges(), StdMeshers.StdMeshers_ImportSource2D.SetSourceFaces(), SMESH_Hypothesis_i.SMESH_Hypothesis_i(), StdMeshers_Arithmetic1D_i.StdMeshers_Arithmetic1D_i(), StdMeshers_AutomaticLength_i.StdMeshers_AutomaticLength_i(), StdMeshers_Deflection1D_i.StdMeshers_Deflection1D_i(), StdMeshers_FixedPoints1D_i.StdMeshers_FixedPoints1D_i(), StdMeshers_Hexa_3D_i.StdMeshers_Hexa_3D_i(), StdMeshers_Import_1D2D_i.StdMeshers_Import_1D2D_i(), StdMeshers_Import_1D_i.StdMeshers_Import_1D_i(), StdMeshers_ImportSource1D_i.StdMeshers_ImportSource1D_i(), StdMeshers_ImportSource2D_i.StdMeshers_ImportSource2D_i(), StdMeshers_LayerDistribution_i(), StdMeshers_LengthFromEdges_i.StdMeshers_LengthFromEdges_i(), StdMeshers_LocalLength_i.StdMeshers_LocalLength_i(), StdMeshers_MaxElementArea_i.StdMeshers_MaxElementArea_i(), StdMeshers_MaxElementVolume_i.StdMeshers_MaxElementVolume_i(), StdMeshers_MaxLength_i.StdMeshers_MaxLength_i(), StdMeshers_MEFISTO_2D_i.StdMeshers_MEFISTO_2D_i(), StdMeshers_NumberOfLayers_i.StdMeshers_NumberOfLayers_i(), StdMeshers_NumberOfSegments_i.StdMeshers_NumberOfSegments_i(), StdMeshers_Prism_3D_i.StdMeshers_Prism_3D_i(), StdMeshers_Projection_1D_i.StdMeshers_Projection_1D_i(), StdMeshers_Projection_2D_i.StdMeshers_Projection_2D_i(), StdMeshers_Projection_3D_i.StdMeshers_Projection_3D_i(), StdMeshers_Propagation_i.StdMeshers_Propagation_i(), StdMeshers_Quadrangle_2D_i.StdMeshers_Quadrangle_2D_i(), StdMeshers_RadialPrism_3D_i.StdMeshers_RadialPrism_3D_i(), StdMeshers_Regular_1D_i.StdMeshers_Regular_1D_i(), StdMeshers_StartEndLength_i.StdMeshers_StartEndLength_i(), StdMeshers_ViscousLayers_i.StdMeshers_ViscousLayers_i(), and SMESH_Hypothesis_i.~SMESH_Hypothesis_i().
SMESH::SMESH_Hypothesis_var StdMeshers_LayerDistribution_i.myHyp [private] |
Definition at line 84 of file StdMeshers_LayerDistribution_i.hxx.
Referenced by GetLayerDistribution(), LoadFrom(), and SaveTo().