27 #ifndef _SMESH_Prism_3D_HXX_ 
   28 #define _SMESH_Prism_3D_HXX_ 
   43 #include <Adaptor2d_Curve2d.hxx> 
   44 #include <Adaptor3d_Curve.hxx> 
   45 #include <Adaptor3d_Surface.hxx> 
   46 #include <BRepAdaptor_Surface.hxx> 
   47 #include <TopTools_IndexedMapOfOrientedShape.hxx> 
   48 #include <TopoDS_Face.hxx> 
   49 #include <gp_Trsf.hxx> 
   59 namespace StdMeshers_ProjectionUtils
 
  159   int VerticalSize()
 const { 
return myParam2ColumnMaps[0].begin()->second.size(); }
 
  177                                              bool &    isReverse)
 const 
  179     std::map< int, std::pair< TParam2ColumnMap*, bool > >
::const_iterator i_mo =
 
  180       myShapeIndex2ColumnMap.find( baseEdgeID );
 
  181     if ( i_mo == myShapeIndex2ColumnMap.end() ) 
return 0;
 
  183     const std::pair< TParam2ColumnMap*, bool >& col_frw = i_mo->second;
 
  184     isReverse = !col_frw.second;
 
  185     return col_frw.first;
 
  195     return myShapeIndex2ColumnMap.count( node->
getshapeId() );
 
  203   bool GetLayersTransformation(std::vector<gp_Trsf> &      trsf,
 
  224   { 
return Mesh()->GetSubMesh( Shape( shapeID )); }
 
  232   { 
return SubMesh(shapeID)->GetSubMeshDS(); }
 
  239   const TopoDS_Shape& Shape(
const int shapeID)
 const 
  240   { 
return myShapeIDMap( shapeID ); }
 
  247   int ShapeID(
const TopoDS_Shape& shape)
 const 
  248   { 
return myShapeIDMap.FindIndex( shape ); }
 
  260                             const TopoDS_Edge &     bottomEdge,
 
  261                             const int               sideFaceID);
 
  276     typedef boost::shared_ptr<BRepAdaptor_Surface> 
PSurface;
 
  285     std::vector< std::pair< double, double> > 
myParams; 
 
  293                const TopoDS_Edge&         baseEdge,
 
  295                const double               first = 0.0,
 
  296                const double               last  = 1.0);
 
  298                const std::vector< TSideFace* >&                  components,
 
  299                const std::vector< std::pair< double, double> > & params);
 
  302     bool IsComplex()
 const 
  303     { 
return ( NbComponents() > 0 || myParams[0].first != 0. || myParams[0].
second != 1. ); }
 
  309     const TopoDS_Edge & 
BaseEdge()
 const { 
return myBaseEdge; }
 
  311       if ( NbComponents() ) 
return GetComponent(0)->GetColumns()->begin()->second.size();
 
  312       else                  return GetColumns()->begin()->second.size(); }
 
  314     void GetNodesAtZ(
const int Z, std::map<double, const SMDS_MeshNode* >& nodes ) 
const;
 
  318     { 
if ( myComponents[i] ) 
delete myComponents[i]; myComponents[i]=c; }
 
  319     TSideFace* GetComponent(
const double U, 
double& localU) 
const;
 
  324     Adaptor2d_Curve2d* HorizPCurve(
const bool isTop, 
const TopoDS_Face& horFace) 
const;
 
  327     TopoDS_Edge GetEdge( 
const int edge ) 
const;
 
  330     gp_Pnt Value(
const Standard_Real U,
const Standard_Real V) 
const;
 
  332     void dumpNodes(
int nbNodes) 
const;
 
  345     gp_Pnt Value(
const Standard_Real U) 
const;
 
  349     void dumpNodes(
int nbNodes) 
const;
 
  363       :mySide(sideFace), myV( isTop ? 1.0 : 0.0 ) {}
 
  364     gp_Pnt Value(
const Standard_Real U) 
const;
 
  368     void dumpNodes(
int nbNodes) 
const;
 
  382                              const TopoDS_Face& horFace);
 
  383     gp_Pnt2d Value(
const Standard_Real U) 
const;
 
  405     return myError->IsOK();
 
  426                      const bool          allowHighBndError );
 
  437                                const std::vector< gp_XYZ >& toBndPoints,
 
  438                                const std::vector< gp_XYZ >& fromIntPoints,
 
  439                                std::vector< gp_XYZ >&       toIntPoints,
 
  441                                std::vector< gp_XYZ > *      bndError);
 
  444                                  const std::vector< gp_XYZ >& bndError1,
 
  445                                  const std::vector< gp_XYZ >& bndError2,
 
  447                                  std::vector< gp_XYZ >&       toIntPoints,
 
  448                                  std::vector< double >&       int2BndDist);
 
  462                                const TopoDS_Shape&                  aShape,
 
  485   static bool AddPrisms( std::vector<const TNodeColumn*> & nodeColumns,
 
  488   static bool IsApplicable(
const TopoDS_Shape & aShape, 
bool toCheckAll);
 
  497                  const TopoDS_Shape&   theSolid,
 
  498                  const bool            selectBottom = 
true);
 
  504                      const int             totalNbFaces);
 
  519   TopoDS_Edge findPropagationSource( 
const TopoDS_Edge& E );
 
  527   bool assocOrProjBottom2Top( 
const gp_Trsf & bottomToTopTrsf,
 
  535   bool projectBottomToTop( 
const gp_Trsf & bottomToTopTrsf,
 
  553   bool project2dMesh(
const TopoDS_Face& source, 
const TopoDS_Face& target);
 
  561   bool setFaceAndEdgesXYZ( 
const int faceID, 
const gp_XYZ& params, 
int z );
 
  566   bool toSM( 
bool isOK );
 
  571   int shapeID( 
const TopoDS_Shape& S );