Version: 6.3.1
Public Member Functions | Private Attributes

SMESH_Block.TEdge Class Reference

#include <SMESH_Block.hxx>

Public Member Functions

void Set (const int edgeID, Adaptor3d_Curve *curve, const bool isForward)
 Set edge data.
void Set (const int edgeID, const gp_XYZ &node1, const gp_XYZ &node2)
 Set coordinates of nodes at edge ends to work with mesh block.
Adaptor3d_CurveGetCurve () const
double EndParam (int i) const
int CoordInd () const
const gp_XYZ & NodeXYZ (int i) const
gp_XYZ Point (const gp_XYZ &theParams) const
double GetU (const gp_XYZ &theParams) const
 TEdge ()
 ~TEdge ()
 Destructor.

Private Attributes

int myCoordInd
double myFirst
double myLast
Adaptor3d_CurvemyC3d
gp_XYZ myNodes [2]

Detailed Description

Definition at line 314 of file SMESH_Block.hxx.


Constructor & Destructor Documentation

SMESH_Block.TEdge.TEdge ( )

Definition at line 330 of file SMESH_Block.hxx.

: myC3d(0) {}
SMESH_Block.TEdge::~TEdge ( )

Destructor.

Definition at line 138 of file SMESH_Block.cxx.

{
  if ( myC3d ) delete myC3d;
}

Member Function Documentation

int SMESH_Block.TEdge.CoordInd ( ) const

Definition at line 326 of file SMESH_Block.hxx.

Referenced by SMESH_Block.EdgeParameters().

{ return myCoordInd; }
double SMESH_Block.TEdge.EndParam ( int  i) const

Definition at line 325 of file SMESH_Block.hxx.

Referenced by SMESH_Block.EdgeParameters().

{ return i ? myLast : myFirst; }
Adaptor3d_Curve* SMESH_Block.TEdge.GetCurve ( ) const

Definition at line 324 of file SMESH_Block.hxx.

Referenced by SMESH_Block.ComputeParameters(), and StdMeshers_PrismAsBlock.Init().

{ return myC3d; }
double SMESH_Block.TEdge::GetU ( const gp_XYZ &  theParams) const

Definition at line 111 of file SMESH_Block.cxx.

{
  double u = theParams.Coord( myCoordInd );
  if ( !myC3d ) // if mesh block
    return u;
  return ( 1 - u ) * myFirst + u * myLast;
}
const gp_XYZ& SMESH_Block.TEdge.NodeXYZ ( int  i) const

Definition at line 327 of file SMESH_Block.hxx.

Referenced by SMESH_Block.TFace.Set().

{ return i ? myNodes[1] : myNodes[0]; }
gp_XYZ SMESH_Block.TEdge::Point ( const gp_XYZ &  theParams) const

Definition at line 124 of file SMESH_Block.cxx.

Referenced by SMESH_Block.ComputeParameters().

{
  double u = GetU( theParams );
  if ( myC3d ) return myC3d->Value( u ).XYZ();
  // mesh block
  return myNodes[0] * ( 1 - u ) + myNodes[1] * u;
}
void SMESH_Block.TEdge::Set ( const int  edgeID,
const gp_XYZ &  node1,
const gp_XYZ &  node2 
)

Set coordinates of nodes at edge ends to work with mesh block.

Parameters:
edgeID- block subshape ID
node1- coordinates of node with lower ID
node2- coordinates of node with upper ID

Definition at line 96 of file SMESH_Block.cxx.

References SMESH_Block.GetCoordIndOnEdge().

{
  myCoordInd = SMESH_Block::GetCoordIndOnEdge( edgeID );
  myNodes[ 0 ] = node1;
  myNodes[ 1 ] = node2;

  if ( myC3d ) delete myC3d;
  myC3d = 0;
}
void SMESH_Block.TEdge::Set ( const int  edgeID,
Adaptor3d_Curve curve,
const bool  isForward 
)

Set edge data.

Parameters:
edgeID- block subshape ID
curve- edge geometry
isForward- is curve orientation coincides with edge orientation in the block

Definition at line 76 of file SMESH_Block.cxx.

References SMESH_Block.GetCoordIndOnEdge().

Referenced by StdMeshers_PrismAsBlock.Init(), SMESH_Block.LoadBlockShapes(), and SMESH_Block.LoadMeshBlock().

{
  myCoordInd = SMESH_Block::GetCoordIndOnEdge( edgeID );
  if ( myC3d ) delete myC3d;
  myC3d = curve;
  myFirst = curve->FirstParameter();
  myLast = curve->LastParameter();
  if ( !isForward )
    std::swap( myFirst, myLast );
}

Field Documentation

Definition at line 318 of file SMESH_Block.hxx.

Definition at line 315 of file SMESH_Block.hxx.

double SMESH_Block.TEdge.myFirst [private]

Definition at line 316 of file SMESH_Block.hxx.

double SMESH_Block.TEdge.myLast [private]

Definition at line 317 of file SMESH_Block.hxx.

gp_XYZ SMESH_Block.TEdge.myNodes[2] [private]

Definition at line 320 of file SMESH_Block.hxx.

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