Version: 6.3.1
Public Member Functions

StdMeshers.StdMeshers_ImportSource2D Interface Reference

interface of "Source faces" hypothesis. More...

import "SMESH_BasicHypothesis.idl";

Inheritance diagram for StdMeshers.StdMeshers_ImportSource2D:
Inheritance graph
[legend]

Public Member Functions

void SetSourceFaces (in SMESH::ListOfGroups groups)
 Set faces to import from other mesh.
SMESH::string_array GetSourceFaces ()
void SetCopySourceMesh (in boolean toCopyMesh, in boolean toCopyGroups)
 Set to import the whole other mesh or not, and if yes, to copy groups of not.
void GetCopySourceMesh (out boolean toCopyMesh, out boolean toCopyGroups)
 Return "to copy mesh and groups".
string GetName ()
 Get the Hypothesis typeName.
string GetLibName ()
 Get the Hypothesis plugin library Name.
long GetId ()
 Get the internal Id.
void SetParameters (in string theParameters)
 Set list of parameters.
string GetParameters ()
 Return list of notebook variables used for Hypothesis creation separated by ":" symbol.
ListOfParameters GetLastParameters ()
 Return list of last notebook variables used for Hypothesis creation.
void SetLastParameters (in string theParameters)
 Set list of parameters.
void ClearParameters ()
 Clear parameters list.
boolean IsDimSupported (in Dimension type)
 Verify whether hypothesis supports given entity type.

Detailed Description

interface of "Source faces" hypothesis.

This hypothesis specifies groups of faces of other mesh to be imported in this mesh

Definition at line 827 of file SMESH_BasicHypothesis.idl.


Member Function Documentation

void SMESH_Hypothesis::ClearParameters ( ) [inherited]

Clear parameters list.

Definition at line 194 of file SMESH_Hypothesis.cxx.

{
  _parameters = string();
}
void StdMeshers_ImportSource2D_i::GetCopySourceMesh ( out boolean  toCopyMesh,
out boolean  toCopyGroups 
)

Return "to copy mesh and groups".

Definition at line 156 of file StdMeshers_ImportSource1D_i.cxx.

References StdMeshers.StdMeshers_ImportSource1D.GetCopySourceMesh(), and StdMeshers_ImportSource1D_i.GetImpl().

{
  GetImpl()->GetCopySourceMesh(toCopyMesh,toCopyGroups);
}
long SMESH.SMESH_Hypothesis.GetId ( ) [inherited]

Get the internal Id.

ListOfParameters SMESH.SMESH_Hypothesis.GetLastParameters ( ) [inherited]

Return list of last notebook variables used for Hypothesis creation.

string SMESH.SMESH_Hypothesis.GetLibName ( ) [inherited]

Get the Hypothesis plugin library Name.

string SMESH.SMESH_Hypothesis.GetName ( ) [inherited]

Get the Hypothesis typeName.

string SMESH.SMESH_Hypothesis.GetParameters ( ) [inherited]

Return list of notebook variables used for Hypothesis creation separated by ":" symbol.

SMESH::string_array StdMeshers.StdMeshers_ImportSource2D.GetSourceFaces ( )
boolean SMESH.SMESH_Hypothesis.IsDimSupported ( in Dimension  type) [inherited]

Verify whether hypothesis supports given entity type.

void StdMeshers_ImportSource2D_i::SetCopySourceMesh ( in boolean  toCopyMesh,
in boolean  toCopyGroups 
)

Set to import the whole other mesh or not, and if yes, to copy groups of not.

Set to copy mesh and groups.

By default the mesh is not copied.

Definition at line 142 of file StdMeshers_ImportSource1D_i.cxx.

References StdMeshers_ImportSource1D_i.GetImpl(), and StdMeshers.StdMeshers_ImportSource1D.SetCopySourceMesh().

{
  GetImpl()->SetCopySourceMesh(toCopyMesh,toCopyGroups);
  SMESH::TPythonDump() << _this() << ".SetCopySourceMesh( "
                       << toCopyMesh << ", " << toCopyGroups << " )";
}
void SMESH.SMESH_Hypothesis.SetLastParameters ( in string  theParameters) [inherited]

Set list of parameters.

Parameters:
theParametersis a string containing the last notebook variables separated by ":" symbol, used for Hypothesis creation
void SMESH.SMESH_Hypothesis.SetParameters ( in string  theParameters) [inherited]

Set list of parameters.

Parameters:
theParametersis a string containing the notebook variables separated by ":" symbol, used for Hypothesis creation
void StdMeshers_ImportSource2D_i::SetSourceFaces ( in SMESH::ListOfGroups  groups)

Set faces to import from other mesh.

SetSourceFaces.

Definition at line 84 of file StdMeshers_ImportSource2D_i.cxx.

References StdMeshers_ImportSource2D_i._groupEntries, FACE, SMESH_Gen_i.GetCurrentStudy(), StdMeshers_ImportSource2D_i.GetImpl(), SMESH_Gen_i.GetSMESHGen(), MESSAGE, SMESH_Hypothesis_i.myBaseImpl, and SMESH_Gen_i.ObjectToSObject().

{
  MESSAGE( "StdMeshers_ImportSource2D_i::SetSourceFaces" );
  ASSERT( myBaseImpl );
  try
  {
    std::vector<SMESH_Group*> smesh_groups;
    std::vector<string> entries;
    SALOMEDS::Study_var study = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy();
    for ( int i = 0; i < groups.length(); ++i )
      if ( SMESH_GroupBase_i* gp_i = SMESH::DownCast<SMESH_GroupBase_i*>( groups[i] ))
      {
        if ( gp_i->GetType() != SMESH::FACE )
          THROW_SALOME_CORBA_EXCEPTION("Wrong group type", SALOME::BAD_PARAM);
        smesh_groups.push_back( gp_i->GetSmeshGroup() );

        SALOMEDS::SObject_var so = SMESH_Gen_i::GetSMESHGen()->ObjectToSObject(study, groups[i]);
        if ( !so->_is_nil())
        {
          CORBA::String_var entry = so->GetID();
          entries.push_back( entry.in() );
        }
      }
    this->GetImpl()->SetGroups( smesh_groups );

    _groupEntries = new SMESH::string_array;
    _groupEntries->length( entries.size ());
    for ( int i = 0; i < entries.size(); ++i )
      _groupEntries[i] = entries[i].c_str();
  }
  catch ( SALOME_Exception& S_ex )
  {
    THROW_SALOME_CORBA_EXCEPTION( S_ex.what(), SALOME::BAD_PARAM );
  }

  // Update Python script
  SMESH::TPythonDump() << _this() << ".SetSourceFaces( " << groups << " )";
}
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS