Version: 6.3.1
Public Member Functions | Private Attributes

StdMeshers_PrismAsBlock.TSideFace Class Reference

Class representing a part of a geom face or a union of seleral faces. More...

Inheritance diagram for StdMeshers_PrismAsBlock.TSideFace:
Inheritance graph
[legend]

Public Member Functions

 TSideFace (SMESH_MesherHelper *helper, const int faceID, const TopoDS_Face &face, const TopoDS_Edge &baseEdge, TParam2ColumnMap *columnsMap, const double first=0.0, const double last=1.0)
 Constructor.
 TSideFace (const std::vector< TSideFace * > &components, const std::vector< std::pair< double, double > > &params)
 TSideFace (const TSideFace &other)
 Copy constructor.
 ~TSideFace ()
 Deletes myComponents.
bool IsComplex () const
int FaceID () const
TParam2ColumnMapGetColumns () const
gp_XY GetNodeUV (const TopoDS_Face &F, const SMDS_MeshNode *n) const
const TopoDS_Edge & BaseEdge () const
int ColumnHeight () const
double GetColumns (const double U, TParam2ColumnIt &col1, TParam2ColumnIt &col2) const
 Find node columns for a parameter.
int NbComponents () const
TSideFaceGetComponent (const int i) const
void SetComponent (const int i, TSideFace *c)
TSideFaceGetComponent (const double U, double &localU) const
 Return a component corresponding to parameter.
bool IsForward () const
Adaptor3d_SurfaceSurface () const
bool GetPCurves (Adaptor2d_Curve2d *pcurv[4]) const
 Return pcurves.
Adaptor2d_Curve2dHorizPCurve (const bool isTop, const TopoDS_Face &horFace) const
 Returns geometry of pcurve on a horizontal face.
Adaptor3d_CurveHorizCurve (const bool isTop) const
 Return geometry of the top or bottom curve.
Adaptor3d_CurveVertiCurve (const bool isMax) const
 Return geometry of the vertical curve.
TopoDS_Edge GetEdge (const int edge) const
 Return boundary edge.
int InsertSubShapes (TBlockShapes &shapeMap) const
 Fill block subshapes.
gp_Pnt Value (const Standard_Real U, const Standard_Real V) const
 Return coordinates by normalized params.
void dumpNodes (int nbNodes) const
 Dump ids of nodes of sides.

Private Attributes

int myID
 in-block ID
TParam2ColumnMapmyParamToColumnMap
BRepAdaptor_Surface mySurface
TopoDS_Edge myBaseEdge
std::vector< std::pair< double,
double > > 
myParams
bool myIsForward
std::vector< TSideFace * > myComponents
SMESH_MesherHelpermyHelper

Detailed Description

Class representing a part of a geom face or a union of seleral faces.

Or just an ordinary geom face

It's parametrization is within [0,1] range. It redefines Adaptor3d_Surface.Value(U,V) where U and V are within [0,1]

Definition at line 251 of file StdMeshers_Prism_3D.hxx.


Constructor & Destructor Documentation

StdMeshers_PrismAsBlock.TSideFace::TSideFace ( SMESH_MesherHelper helper,
const int  faceID,
const TopoDS_Face &  face,
const TopoDS_Edge &  baseEdge,
TParam2ColumnMap columnsMap,
const double  first = 0.0,
const double  last = 1.0 
)
StdMeshers_PrismAsBlock.TSideFace.TSideFace ( const std::vector< TSideFace * > &  components,
const std::vector< std::pair< double, double > > &  params 
)
StdMeshers_PrismAsBlock.TSideFace::TSideFace ( const TSideFace other)

Copy constructor.

Parameters:
other- other side

Definition at line 1887 of file StdMeshers_Prism_3D.cxx.

References StdMeshers_PrismAsBlock.TSideFace.myBaseEdge, StdMeshers_PrismAsBlock.TSideFace.myComponents, StdMeshers_PrismAsBlock.TSideFace.myHelper, StdMeshers_PrismAsBlock.myHelper, StdMeshers_PrismAsBlock.TSideFace.myID, StdMeshers_PrismAsBlock.TSideFace.myIsForward, StdMeshers_PrismAsBlock.TSideFace.myParams, StdMeshers_PrismAsBlock.TSideFace.myParamToColumnMap, and StdMeshers_PrismAsBlock.TSideFace.mySurface.

{
  myID               = other.myID;
  mySurface          = other.mySurface;
  myBaseEdge         = other.myBaseEdge;
  myParams           = other.myParams;
  myIsForward        = other.myIsForward;
  myHelper           = other.myHelper;
  myParamToColumnMap = other.myParamToColumnMap;

  myComponents.resize( other.myComponents.size());
  for (int i = 0 ; i < myComponents.size(); ++i )
    myComponents[ i ] = new TSideFace( *other.myComponents[ i ]);
}
StdMeshers_PrismAsBlock.TSideFace::~TSideFace ( )

Deletes myComponents.

Definition at line 1908 of file StdMeshers_Prism_3D.cxx.

{
  for (int i = 0 ; i < myComponents.size(); ++i )
    if ( myComponents[ i ] )
      delete myComponents[ i ];
}

Member Function Documentation

const TopoDS_Edge& StdMeshers_PrismAsBlock.TSideFace.BaseEdge ( ) const

Definition at line 281 of file StdMeshers_Prism_3D.hxx.

{ return myBaseEdge; }
int StdMeshers_PrismAsBlock.TSideFace.ColumnHeight ( ) const

Definition at line 282 of file StdMeshers_Prism_3D.hxx.

Referenced by StdMeshers_PrismAsBlock.THorizontalEdgeAdaptor.dumpNodes().

                             {
      if ( NbComponents() ) return GetComponent(0)->GetColumns()->begin()->second.size();
      else                  return GetColumns()->begin()->second.size(); }
void StdMeshers_PrismAsBlock.TSideFace::dumpNodes ( int  nbNodes) const

Dump ids of nodes of sides.

Definition at line 2319 of file StdMeshers_Prism_3D.cxx.

References StdMeshers_PrismAsBlock.TVerticalEdgeAdaptor.dumpNodes(), StdMeshers_PrismAsBlock.THorizontalEdgeAdaptor.dumpNodes(), and SMESH_Block.DumpShapeID().

{
#ifdef _DEBUG_
  cout << endl << "NODES OF FACE "; SMESH_Block::DumpShapeID( myID, cout ) << endl;
  THorizontalEdgeAdaptor* hSize0 = (THorizontalEdgeAdaptor*) HorizCurve(0);
  cout << "Horiz side 0: "; hSize0->dumpNodes(nbNodes); cout << endl;
  THorizontalEdgeAdaptor* hSize1 = (THorizontalEdgeAdaptor*) HorizCurve(1);
  cout << "Horiz side 1: "; hSize1->dumpNodes(nbNodes); cout << endl;
  TVerticalEdgeAdaptor* vSide0 = (TVerticalEdgeAdaptor*) VertiCurve(0);
  cout << "Verti side 0: "; vSide0->dumpNodes(nbNodes); cout << endl;
  TVerticalEdgeAdaptor* vSide1 = (TVerticalEdgeAdaptor*) VertiCurve(1);
  cout << "Verti side 1: "; vSide1->dumpNodes(nbNodes); cout << endl;
  delete hSize0; delete hSize1; delete vSide0; delete vSide1;
#endif
}
int StdMeshers_PrismAsBlock.TSideFace.FaceID ( ) const

Definition at line 277 of file StdMeshers_Prism_3D.hxx.

Referenced by StdMeshers_PrismAsBlock.Init().

{ return myID; }
TParam2ColumnMap* StdMeshers_PrismAsBlock.TSideFace.GetColumns ( ) const
double StdMeshers_PrismAsBlock.TSideFace::GetColumns ( const double  U,
TParam2ColumnIt col1,
TParam2ColumnIt col2 
) const

Find node columns for a parameter.

Parameters:
U- parameter along a horizontal edge
col1- the 1st found column
col2- the 2nd found column
Return values:
r- normalized position of U between the found columns

Definition at line 2032 of file StdMeshers_Prism_3D.cxx.

References SMESH_Partition1_tetra.comp, and StdMeshers_PrismAsBlock.TSideFace.GetColumns().

{
  double u = U, r = 0;
  if ( !myComponents.empty() ) {
    TSideFace * comp = GetComponent(U,u);
    return comp->GetColumns( u, col1, col2 );
  }

  if ( !myIsForward )
    u = 1 - u;
  double f = myParams[0].first, l = myParams[0].second;
  u = f + u * ( l - f );

  col1 = col2 = getColumn( myParamToColumnMap, u );
  if ( ++col2 == myParamToColumnMap->end() ) {
    --col2;
    r = 0.5;
  }
  else {
    double uf = col1->first;
    double ul = col2->first;
    r = ( u - uf ) / ( ul - uf );
  }
  return r;
}
TSideFace* StdMeshers_PrismAsBlock.TSideFace.GetComponent ( const int  i) const
StdMeshers_PrismAsBlock::TSideFace * StdMeshers_PrismAsBlock.TSideFace::GetComponent ( const double  U,
double &  localU 
) const

Return a component corresponding to parameter.

Parameters:
U- parameter along a horizontal size
localU- parameter along a horizontal size of a component
Return values:
TSideFace*- found component

Definition at line 2004 of file StdMeshers_Prism_3D.cxx.

{
  localU = U;
  if ( myComponents.empty() )
    return const_cast<TSideFace*>( this );

  int i;
  for ( i = 0; i < myComponents.size(); ++i )
    if ( U < myParams[ i ].second )
      break;
  if ( i >= myComponents.size() )
    i = myComponents.size() - 1;

  double f = myParams[ i ].first, l = myParams[ i ].second;
  localU = ( U - f ) / ( l - f );
  return myComponents[ i ];
}
TopoDS_Edge StdMeshers_PrismAsBlock.TSideFace::GetEdge ( const int  iEdge) const

Return boundary edge.

Parameters:
edge- edge index
Return values:
TopoDS_Edge- found edge

Definition at line 2147 of file StdMeshers_Prism_3D.cxx.

References BOTTOM_EDGE, SMESH_test.edge, SMESH_MesherHelper.GetMesh(), SMESH_MesherHelper.GetSubShapeByNode(), StdMeshers_PrismAsBlock.myHelper, TOP_EDGE, V0_EDGE, and V1_EDGE.

{
  if ( !myComponents.empty() ) {
    switch ( iEdge ) {
    case V0_EDGE : return myComponents.front()->GetEdge( iEdge );
    case V1_EDGE : return myComponents.back() ->GetEdge( iEdge );
    default: return TopoDS_Edge();
    }
  }
  TopoDS_Shape edge;
  const SMDS_MeshNode* node = 0;
  SMESHDS_Mesh * meshDS = myHelper->GetMesh()->GetMeshDS();
  TNodeColumn* column;

  switch ( iEdge ) {
  case TOP_EDGE:
  case BOTTOM_EDGE:
    column = & (( ++myParamToColumnMap->begin())->second );
    node = ( iEdge == TOP_EDGE ) ? column->back() : column->front();
    edge = myHelper->GetSubShapeByNode ( node, meshDS );
    if ( edge.ShapeType() == TopAbs_VERTEX ) {
      column = & ( myParamToColumnMap->begin()->second );
      node = ( iEdge == TOP_EDGE ) ? column->back() : column->front();
    }
    break;
  case V0_EDGE:
  case V1_EDGE: {
    bool back = ( iEdge == V1_EDGE );
    if ( !myIsForward ) back = !back;
    if ( back )
      column = & ( myParamToColumnMap->rbegin()->second );
    else
      column = & ( myParamToColumnMap->begin()->second );
    if ( column->size() > 0 )
      edge = myHelper->GetSubShapeByNode( (*column)[ 1 ], meshDS );
    if ( edge.IsNull() || edge.ShapeType() == TopAbs_VERTEX )
      node = column->front();
    break;
  }
  default:;
  }
  if ( !edge.IsNull() && edge.ShapeType() == TopAbs_EDGE )
    return TopoDS::Edge( edge );

  // find edge by 2 vertices
  TopoDS_Shape V1 = edge;
  TopoDS_Shape V2 = myHelper->GetSubShapeByNode( node, meshDS );
  if ( V2.ShapeType() == TopAbs_VERTEX && !V2.IsSame( V1 ))
  {
    TopTools_ListIteratorOfListOfShape ancestIt =
      myHelper->GetMesh()->GetAncestors( V1 );
    for ( ; ancestIt.More(); ancestIt.Next() )
    {
      const TopoDS_Shape & ancestor = ancestIt.Value();
      if ( ancestor.ShapeType() == TopAbs_EDGE )
        for ( TopExp_Explorer e( ancestor, TopAbs_VERTEX ); e.More(); e.Next() )
          if ( V2.IsSame( e.Current() ))
            return TopoDS::Edge( ancestor );
    }
  }
  return TopoDS_Edge();
}
gp_XY StdMeshers_PrismAsBlock.TSideFace.GetNodeUV ( const TopoDS_Face &  F,
const SMDS_MeshNode n 
) const

Definition at line 279 of file StdMeshers_Prism_3D.hxx.

Referenced by StdMeshers_PrismAsBlock.TPCurveOnHorFaceAdaptor.Value().

    { return myHelper->GetNodeUV( F, n ); }
bool StdMeshers_PrismAsBlock.TSideFace::GetPCurves ( Adaptor2d_Curve2d pcurv[4]) const

Return pcurves.

Parameters:
pcurv- array of 4 pcurves
Return values:
bool- is a success

Definition at line 1957 of file StdMeshers_Prism_3D.cxx.

References BOTTOM_EDGE, Handle(), TOP_EDGE, V0_EDGE, and V1_EDGE.

Referenced by StdMeshers_PrismAsBlock.Init().

{
  int iEdge[ 4 ] = { BOTTOM_EDGE, TOP_EDGE, V0_EDGE, V1_EDGE };

  for ( int i = 0 ; i < 4 ; ++i ) {
    Handle(Geom2d_Line) line;
    switch ( iEdge[ i ] ) {
    case TOP_EDGE:
      line = new Geom2d_Line( gp_Pnt2d( 0, 1 ), gp::DX2d() ); break;
    case BOTTOM_EDGE:
      line = new Geom2d_Line( gp::Origin2d(), gp::DX2d() ); break;
    case V0_EDGE:
      line = new Geom2d_Line( gp::Origin2d(), gp::DY2d() ); break;
    case V1_EDGE:
      line = new Geom2d_Line( gp_Pnt2d( 1, 0 ), gp::DY2d() ); break;
    }
    pcurv[ i ] = new Geom2dAdaptor_Curve( line, 0, 1 );
  }
  return true;
}
Adaptor3d_Curve * StdMeshers_PrismAsBlock.TSideFace::HorizCurve ( const bool  isTop) const

Return geometry of the top or bottom curve.

Parameters:
isTop-
Return values:
Adaptor3d_Curve*-

Definition at line 1944 of file StdMeshers_Prism_3D.cxx.

Referenced by StdMeshers_PrismAsBlock.Init().

{
  return new THorizontalEdgeAdaptor( this, isTop );
}
Adaptor2d_Curve2d * StdMeshers_PrismAsBlock.TSideFace::HorizPCurve ( const bool  isTop,
const TopoDS_Face &  horFace 
) const

Returns geometry of pcurve on a horizontal face.

Parameters:
isTop- is top or bottom face
horFace- a horizontal face
Return values:
Adaptor2d_Curve2d*- curve adaptor

Definition at line 1988 of file StdMeshers_Prism_3D.cxx.

Referenced by StdMeshers_PrismAsBlock.Init().

{
  return new TPCurveOnHorFaceAdaptor( this, isTop, horFace );
}
int StdMeshers_PrismAsBlock.TSideFace::InsertSubShapes ( TBlockShapes shapeMap) const

Fill block subshapes.

Parameters:
shapeMap- map to fill in
Return values:
int- nb inserted subshapes

Definition at line 2218 of file StdMeshers_Prism_3D.cxx.

References BOTTOM_EDGE, SMESH_Block.GetEdgeVertexIDs(), SMESH_Block.GetFaceEdgesIDs(), SMESH_MesherHelper.GetMeshDS(), SMESH_MesherHelper.GetSubShapeByNode(), SMESH_Block.Insert(), StdMeshers_PrismAsBlock.myHelper, V0_EDGE, and V1_EDGE.

Referenced by StdMeshers_PrismAsBlock.Init().

{
  int nbInserted = 0;

  // Insert edges
  vector< int > edgeIdVec;
  SMESH_Block::GetFaceEdgesIDs( myID, edgeIdVec );

  for ( int i = BOTTOM_EDGE; i <=V1_EDGE ; ++i ) {
    TopoDS_Edge e = GetEdge( i );
    if ( !e.IsNull() ) {
      nbInserted += SMESH_Block::Insert( e, edgeIdVec[ i ], shapeMap);
    }
  }

  // Insert corner vertices

  TParam2ColumnIt col1, col2 ;
  vector< int > vertIdVec;

  // from V0 column
  SMESH_Block::GetEdgeVertexIDs( edgeIdVec[ V0_EDGE ], vertIdVec);
  GetColumns(0, col1, col2 );
  const SMDS_MeshNode* node0 = col1->second.front();
  const SMDS_MeshNode* node1 = col1->second.back();
  TopoDS_Shape v0 = myHelper->GetSubShapeByNode( node0, myHelper->GetMeshDS());
  TopoDS_Shape v1 = myHelper->GetSubShapeByNode( node1, myHelper->GetMeshDS());
  if ( v0.ShapeType() == TopAbs_VERTEX ) {
    nbInserted += SMESH_Block::Insert( v0, vertIdVec[ 0 ], shapeMap);
  }
  if ( v1.ShapeType() == TopAbs_VERTEX ) {
    nbInserted += SMESH_Block::Insert( v1, vertIdVec[ 1 ], shapeMap);
  }
  
  // from V1 column
  SMESH_Block::GetEdgeVertexIDs( edgeIdVec[ V1_EDGE ], vertIdVec);
  GetColumns(1, col1, col2 );
  node0 = col2->second.front();
  node1 = col2->second.back();
  v0 = myHelper->GetSubShapeByNode( node0, myHelper->GetMeshDS());
  v1 = myHelper->GetSubShapeByNode( node1, myHelper->GetMeshDS());
  if ( v0.ShapeType() == TopAbs_VERTEX ) {
    nbInserted += SMESH_Block::Insert( v0, vertIdVec[ 0 ], shapeMap);
  }
  if ( v1.ShapeType() == TopAbs_VERTEX ) {
    nbInserted += SMESH_Block::Insert( v1, vertIdVec[ 1 ], shapeMap);
  }

//   TopoDS_Vertex V0, V1, Vcom;
//   TopExp::Vertices( myBaseEdge, V0, V1, true );
//   if ( !myIsForward ) std::swap( V0, V1 );

//   // bottom vertex IDs
//   SMESH_Block::GetEdgeVertexIDs( edgeIdVec[ _u0 ], vertIdVec);
//   SMESH_Block::Insert( V0, vertIdVec[ 0 ], shapeMap);
//   SMESH_Block::Insert( V1, vertIdVec[ 1 ], shapeMap);

//   TopoDS_Edge sideEdge = GetEdge( V0_EDGE );
//   if ( sideEdge.IsNull() || !TopExp::CommonVertex( botEdge, sideEdge, Vcom ))
//     return false;

//   // insert one side edge
//   int edgeID;
//   if ( Vcom.IsSame( V0 )) edgeID = edgeIdVec[ _v0 ];
//   else                    edgeID = edgeIdVec[ _v1 ];
//   SMESH_Block::Insert( sideEdge, edgeID, shapeMap);

//   // top vertex of the side edge
//   SMESH_Block::GetEdgeVertexIDs( edgeID, vertIdVec);
//   TopoDS_Vertex Vtop = TopExp::FirstVertex( sideEdge );
//   if ( Vcom.IsSame( Vtop ))
//     Vtop = TopExp::LastVertex( sideEdge );
//   SMESH_Block::Insert( Vtop, vertIdVec[ 1 ], shapeMap);

//   // other side edge
//   sideEdge = GetEdge( V1_EDGE );
//   if ( sideEdge.IsNull() )
//     return false;
//   if ( edgeID = edgeIdVec[ _v1 ]) edgeID = edgeIdVec[ _v0 ];
//   else                            edgeID = edgeIdVec[ _v1 ];
//   SMESH_Block::Insert( sideEdge, edgeID, shapeMap);
  
//   // top edge
//   TopoDS_Edge topEdge = GetEdge( TOP_EDGE );
//   SMESH_Block::Insert( topEdge, edgeIdVec[ _u1 ], shapeMap);

//   // top vertex of the other side edge
//   if ( !TopExp::CommonVertex( topEdge, sideEdge, Vcom ))
//     return false;
//   SMESH_Block::GetEdgeVertexIDs( edgeID, vertIdVec );
//   SMESH_Block::Insert( Vcom, vertIdVec[ 1 ], shapeMap);

  return nbInserted;
}
bool StdMeshers_PrismAsBlock.TSideFace.IsComplex ( ) const

Definition at line 275 of file StdMeshers_Prism_3D.hxx.

Referenced by StdMeshers_PrismAsBlock.THorizontalEdgeAdaptor.dumpNodes(), and StdMeshers_PrismAsBlock.Init().

    { return ( NbComponents() > 0 || myParams[0].first != 0. || myParams[0].second != 1. ); }
bool StdMeshers_PrismAsBlock.TSideFace.IsForward ( ) const
int StdMeshers_PrismAsBlock.TSideFace.NbComponents ( ) const

Definition at line 286 of file StdMeshers_Prism_3D.hxx.

{ return myComponents.size(); }
void StdMeshers_PrismAsBlock.TSideFace.SetComponent ( const int  i,
TSideFace c 
)

Definition at line 288 of file StdMeshers_Prism_3D.hxx.

    { if ( myComponents[i] ) delete myComponents[i]; myComponents[i]=c; }
Adaptor3d_Surface* StdMeshers_PrismAsBlock.TSideFace.Surface ( ) const

Definition at line 293 of file StdMeshers_Prism_3D.hxx.

Referenced by StdMeshers_PrismAsBlock.Init().

{ return new TSideFace( *this ); }
gp_Pnt StdMeshers_PrismAsBlock.TSideFace::Value ( const Standard_Real  U,
const Standard_Real  V 
) const

Return coordinates by normalized params.

Parameters:
U- horizontal param
V- vertical param
Return values:
gp_Pnt- result point

Definition at line 2069 of file StdMeshers_Prism_3D.cxx.

References SMESH_Partition1_tetra.comp, SMESH_test.edge, SMESH_MesherHelper.GetMeshDS(), SMESH_MesherHelper.GetNodeU(), SMESH_MesherHelper.GetNodeUV(), SMESH_MesherHelper.GetSubShapeByNode(), Handle(), StdMeshers_PrismAsBlock.myHelper, SMESH_AdvancedEditor.n1, SMESH_AdvancedEditor.n2, SMESH_AdvancedEditor.n3, SMESH_AdvancedEditor.n4, SMESH_AdvancedEditor.tol, and StdMeshers_PrismAsBlock.TSideFace.Value().

Referenced by StdMeshers_PrismAsBlock.Init(), and StdMeshers_PrismAsBlock.TSideFace.Value().

{
  if ( !myComponents.empty() ) {
    double u;
    TSideFace * comp = GetComponent(U,u);
    return comp->Value( u, V );
  }

  TParam2ColumnIt u_col1, u_col2;
  double vR, hR = GetColumns( U, u_col1, u_col2 );

  const SMDS_MeshNode* n1 = 0;
  const SMDS_MeshNode* n2 = 0;
  const SMDS_MeshNode* n3 = 0;
  const SMDS_MeshNode* n4 = 0;

  // BEGIN issue 0020680: EDF 1252 SMESH: Bad cell created by Radial prism in center of torus
  // Workaround for a wrongly located point returned by mySurface.Value() for
  // UV located near boundary of BSpline surface.
  // To bypass the problem, we take point from 3D curve of edge.
  // It solves pb of the bloc_fiss_new.py
  const double tol = 1e-3;
  if ( V < tol || V+tol >= 1. )
  {
    n1 = V < tol ? u_col1->second.front() : u_col1->second.back();
    n3 = V < tol ? u_col2->second.front() : u_col2->second.back();
    TopoDS_Edge edge;
    if ( V < tol )
    {
      edge = myBaseEdge;
    }
    else
    {
      TopoDS_Shape s = myHelper->GetSubShapeByNode( n1, myHelper->GetMeshDS() );
      if ( s.ShapeType() != TopAbs_EDGE )
        s = myHelper->GetSubShapeByNode( n3, myHelper->GetMeshDS() );
      if ( s.ShapeType() == TopAbs_EDGE )
        edge = TopoDS::Edge( s );
    }
    if ( !edge.IsNull() )
    {
      double u1 = myHelper->GetNodeU( edge, n1 );
      double u3 = myHelper->GetNodeU( edge, n3 );
      double u = u1 * ( 1 - hR ) + u3 * hR;
      TopLoc_Location loc; double f,l;
      Handle(Geom_Curve) curve = BRep_Tool::Curve( edge,loc,f,l );
      return curve->Value( u ).Transformed( loc );
    }
  }
  // END issue 0020680: EDF 1252 SMESH: Bad cell created by Radial prism in center of torus

  vR = getRAndNodes( & u_col1->second, V, n1, n2 );
  vR = getRAndNodes( & u_col2->second, V, n3, n4 );
  
  gp_XY uv1 = myHelper->GetNodeUV( mySurface.Face(), n1, n4);
  gp_XY uv2 = myHelper->GetNodeUV( mySurface.Face(), n2, n3);
  gp_XY uv12 = uv1 * ( 1 - vR ) + uv2 * vR;

  gp_XY uv3 = myHelper->GetNodeUV( mySurface.Face(), n3, n2);
  gp_XY uv4 = myHelper->GetNodeUV( mySurface.Face(), n4, n1);
  gp_XY uv34 = uv3 * ( 1 - vR ) + uv4 * vR;

  gp_XY uv = uv12 * ( 1 - hR ) + uv34 * hR;

  gp_Pnt p = mySurface.Value( uv.X(), uv.Y() );
  return p;
}
Adaptor3d_Curve * StdMeshers_PrismAsBlock.TSideFace::VertiCurve ( const bool  isMax) const

Return geometry of the vertical curve.

Parameters:
isMax- true means curve located closer to (1,1,1) block point
Return values:
Adaptor3d_Curve*- curve adaptor

Definition at line 1923 of file StdMeshers_Prism_3D.cxx.

Referenced by StdMeshers_PrismAsBlock.Init().

{
  if ( !myComponents.empty() ) {
    if ( isMax )
      return myComponents.back()->VertiCurve(isMax);
    else
      return myComponents.front()->VertiCurve(isMax);
  }
  double f = myParams[0].first, l = myParams[0].second;
  if ( !myIsForward ) std::swap( f, l );
  return new TVerticalEdgeAdaptor( myParamToColumnMap, isMax ? l : f );
}

Field Documentation

in-block ID

Definition at line 253 of file StdMeshers_Prism_3D.hxx.

Referenced by StdMeshers_PrismAsBlock.TSideFace.TSideFace().

std::vector< std::pair< double, double> > StdMeshers_PrismAsBlock.TSideFace.myParams [private]
BRepAdaptor_Surface StdMeshers_PrismAsBlock.TSideFace.mySurface [private]
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