Back to index

salome-smesh  6.5.0
Public Member Functions
StdMeshers::StdMeshers_ProjectionSource2D Interface Reference

interface of "ProjectionSource2D" hypothesis. More...

import "SMESH_BasicHypothesis.idl";

Inheritance diagram for StdMeshers::StdMeshers_ProjectionSource2D:
Inheritance graph
[legend]
Collaboration diagram for StdMeshers::StdMeshers_ProjectionSource2D:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void SetSourceFace (in GEOM::GEOM_Object face) raises (SALOME::SALOME_Exception)
 Sets a source <face> to take a mesh pattern from.
GEOM::GEOM_Object GetSourceFace ()
 Returns the source face.
void SetSourceMesh (in SMESH::SMESH_Mesh mesh)
 Sets source <mesh> to take a mesh pattern from.
SMESH::SMESH_Mesh GetSourceMesh ()
 Return source mesh.
void SetVertexAssociation (in GEOM::GEOM_Object sourceVertex1, in GEOM::GEOM_Object sourceVertex2, in GEOM::GEOM_Object targetVertex1, in GEOM::GEOM_Object targetVertex2) raises (SALOME::SALOME_Exception)
 Sets vertex association between the source face and the target one.
GEOM::GEOM_Object GetSourceVertex (in long i) raises (SALOME::SALOME_Exception)
 Returns the -th source vertex associated with the -th target vertex.
GEOM::GEOM_Object GetTargetVertex (in long i) raises (SALOME::SALOME_Exception)
 Returns the -th target vertex associated with the -th source vertex.
string GetName ()
 Get the Hypothesis typeName.
string GetLibName ()
 Get the Hypothesis plugin library Name.
long GetId ()
 Get the internal Id.
void SetVarParameter (in string parameter, in string method)
 Set the variable parameter.
string GetVarParameter (in string methodName)
 Return the variable parameter used for Hypothesis creation by name of method setting this parameter.
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 "ProjectionSource2D" hypothesis.

This hypothesis specifies a meshed face to take a mesh pattern from and optionally association of vertices between the source face and a target one (where a hipothesis is assigned to)

Definition at line 616 of file SMESH_BasicHypothesis.idl.


Member Function Documentation

void SMESH_Hypothesis::ClearParameters ( ) [inherited]

Clear parameters list.

Definition at line 196 of file SMESH_Hypothesis.cxx.

{
  _parameters = string();
}
long SMESH::SMESH_Hypothesis::GetId ( ) [inherited]

Get the internal Id.

char * SMESH_Hypothesis::GetLastParameters ( ) [inherited]

Return list of last notebook variables used for Hypothesis creation.

Definition at line 216 of file SMESH_Hypothesis.cxx.

{
  return (char*)_lastParameters.c_str();
}
const char * SMESH_Hypothesis::GetLibName ( ) [inherited]

Get the Hypothesis plugin library Name.

Definition at line 141 of file SMESH_Hypothesis.cxx.

{
  return _libName.c_str();
}
string SMESH::SMESH_Hypothesis::GetName ( ) [inherited]

Get the Hypothesis typeName.

Here is the caller graph for this function:

char * SMESH_Hypothesis::GetParameters ( ) [inherited]

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

Definition at line 206 of file SMESH_Hypothesis.cxx.

{
  return (char*)_parameters.c_str();
}

Returns the source face.

Definition at line 163 of file StdMeshers_ProjectionSource2D.cxx.

{
  return _sourceFace;
}

Return source mesh.

TopoDS_Vertex StdMeshers_ProjectionSource2D::GetSourceVertex ( in long  i) raises (SALOME::SALOME_Exception)

Returns the -th source vertex associated with the -th target vertex.

Returns the vertex associated with the target vertex.

Result may be nil if association not set. Valid indices are 1 and 2

Result may be nil if association not set

Definition at line 175 of file StdMeshers_ProjectionSource2D.cxx.

{
  if ( i == 1 )
    return _sourceVertex1;
  else if ( i == 2 )
    return _sourceVertex2;
  else
    throw SALOME_Exception(LOCALIZED("Wrong vertex index"));
}
TopoDS_Vertex StdMeshers_ProjectionSource2D::GetTargetVertex ( in long  i) raises (SALOME::SALOME_Exception)

Returns the -th target vertex associated with the -th source vertex.

Result may be nil if association not set. Valid indices are 1 and 2

Result may be nil if association not set.

Definition at line 193 of file StdMeshers_ProjectionSource2D.cxx.

{
  if ( i == 1 )
    return _targetVertex1;
  else if ( i == 2 )
    return _targetVertex2;
  else
    throw SALOME_Exception(LOCALIZED("Wrong vertex index"));
}
string SMESH::SMESH_Hypothesis::GetVarParameter ( in string  methodName) [inherited]

Return the variable parameter used for Hypothesis creation by name of method setting this parameter.

boolean SMESH::SMESH_Hypothesis::IsDimSupported ( in Dimension  type) [inherited]

Verify whether hypothesis supports given entity type.

void 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

Definition at line 226 of file SMESH_Hypothesis.cxx.

{
  _lastParameters = string(theParameters);
}
void 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

Definition at line 180 of file SMESH_Hypothesis.cxx.

{
  string aNewParameters(theParameters);
  if(aNewParameters.size()==0 && _parameters.size()==0)
    aNewParameters = " ";
  if(_parameters.size()>0)
    _parameters +="|";
  _parameters +=aNewParameters;
  SetLastParameters(theParameters);
}

Here is the call graph for this function:

void StdMeshers_ProjectionSource2D::SetSourceFace ( in GEOM::GEOM_Object  face) raises (SALOME::SALOME_Exception)

Sets a source <face> to take a mesh pattern from.

Definition at line 75 of file StdMeshers_ProjectionSource2D.cxx.

{
  if ( Face.IsNull() )
    throw SALOME_Exception(LOCALIZED("Null Face is not allowed"));

  if ( Face.ShapeType() != TopAbs_FACE && Face.ShapeType() != TopAbs_COMPOUND )
    throw SALOME_Exception(LOCALIZED("Wrong shape type"));

  if ( !_sourceFace.IsSame( Face ) )
  {
    _sourceFace = Face;

    NotifySubMeshesHypothesisModification();
  }
}

Sets source <mesh> to take a mesh pattern from.

Definition at line 149 of file StdMeshers_ProjectionSource2D.cxx.

{
  if ( _sourceMesh != mesh ) {
    _sourceMesh = mesh;
    NotifySubMeshesHypothesisModification();
  }
}
void SMESH::SMESH_Hypothesis::SetVarParameter ( in string  parameter,
in string  method 
) [inherited]

Set the variable parameter.

Parameters:
parameteris a string containing the notebook variable used for Hypothesis creation
methodis a name of Hypothesis method setting this parameter

This method must be called before calling method()

void StdMeshers_ProjectionSource2D::SetVertexAssociation ( in GEOM::GEOM_Object  sourceVertex1,
in GEOM::GEOM_Object  sourceVertex2,
in GEOM::GEOM_Object  targetVertex1,
in GEOM::GEOM_Object  targetVertex2 
) raises (SALOME::SALOME_Exception)

Sets vertex association between the source face and the target one.

This parameter is optional. Two vertices must belong to one edge of a face

Definition at line 100 of file StdMeshers_ProjectionSource2D.cxx.

{
  if ( sourceVertex1.IsNull() != targetVertex1.IsNull() ||
       sourceVertex2.IsNull() != targetVertex2.IsNull() )
    throw SALOME_Exception(LOCALIZED("Vertices must be provided in couples"));

  if ( sourceVertex1.IsNull() != sourceVertex2.IsNull() )
  {
    // possibly there is only 1 vertex in the face
    if ( !_sourceFace.IsNull() &&
         StdMeshers_ProjectionUtils::Count( _sourceFace, TopAbs_VERTEX, /*ignoreSame=*/true) != 1 )
      throw SALOME_Exception(LOCALIZED("Two or none pairs of vertices must be provided"));
  }

  if ( !sourceVertex1.IsNull() )
    if ( sourceVertex1.ShapeType() != TopAbs_VERTEX ||
         targetVertex1.ShapeType() != TopAbs_VERTEX )
      throw SALOME_Exception(LOCALIZED("Wrong shape type"));

  if ( !sourceVertex2.IsNull() )
    if ( sourceVertex2.ShapeType() != TopAbs_VERTEX ||
         targetVertex2.ShapeType() != TopAbs_VERTEX )
      throw SALOME_Exception(LOCALIZED("Wrong shape type"));


  if ( !_sourceVertex1.IsSame( sourceVertex1 ) ||
       !_sourceVertex2.IsSame( sourceVertex2 ) ||
       !_targetVertex1.IsSame( targetVertex1 ) ||
       !_targetVertex2.IsSame( targetVertex2 ) )
  {
    _sourceVertex1 = TopoDS::Vertex( sourceVertex1 );
    _sourceVertex2 = TopoDS::Vertex( sourceVertex2 );
    _targetVertex1 = TopoDS::Vertex( targetVertex1 );
    _targetVertex2 = TopoDS::Vertex( targetVertex2 );

    NotifySubMeshesHypothesisModification();
  }
}

Here is the call graph for this function:


The documentation for this interface was generated from the following files: