28 #ifndef StdMeshers_FaceSide_HeaderFile
29 #define StdMeshers_FaceSide_HeaderFile
31 #include <gp_Pnt2d.hxx>
32 #include <TopoDS_Edge.hxx>
33 #include <TopoDS_Vertex.hxx>
34 #include <Geom2d_Curve.hxx>
42 #include <boost/shared_ptr.hpp>
48 class BRepAdaptor_CompCurve;
68 typedef boost::shared_ptr< SMESH_ComputeError >
TError;
84 const TopoDS_Edge& theEdge,
86 const bool theIsForward,
87 const bool theIgnoreMediumNodes);
92 std::list<TopoDS_Edge>& theEdges,
94 const bool theIsForward,
95 const bool theIgnoreMediumNodes);
100 const gp_Pnt2d thePnt2d,
107 const bool theIgnoreMediumNodes,
137 const std::vector<UVPtStruct>&
GetUVPtStruct(
bool isXConst =0,
double constValue =0)
const;
145 double constValue = 0)
const;
149 inline double Parameter(
double U, TopoDS_Edge & edge)
const;
169 const TopoDS_Edge&
Edge(
int i)
const {
return myEdge[i]; }
173 inline TopoDS_Vertex FirstVertex(
int i=0)
const;
177 inline TopoDS_Vertex LastVertex(
int i=-1)
const;
181 inline double FirstParameter(
int i)
const;
185 inline double LastParameter(
int i)
const;
189 double Length()
const {
return myLength; }
193 inline int EdgeIndex(
double U )
const;
197 void dump(
const char* msg=0)
const;
225 while ( i > 0 && U <
myNormPar[ i-1 ] ) --i;
242 double r = ( U - prevU )/ (
myNormPar[ i ] - prevU );
254 return i <
myEdge.size() ? TopExp::FirstVertex(
myEdge[i], 1 ) : TopoDS_Vertex();
265 return i<0 ? TopExp::LastVertex(
myEdge.back(), 1) : i<
myEdge.size() ? TopExp::LastVertex(
myEdge[i], 1 ) : TopoDS_Vertex();
class Handle(MeshVS_DataSource3D)
#define STDMESHERS_EXPORT
boost::shared_ptr< uvPtStruct > UVPtStructPtr
std::vector< StdMeshers_FaceSidePtr > TSideVector
boost::shared_ptr< SMESH_ComputeError > TError
struct uvPtStruct UVPtStruct
boost::shared_ptr< StdMeshers_FaceSide > StdMeshers_FaceSidePtr
Represents a side of a quasi quadrilateral face. It can be composed of several edges....
std::vector< TopoDS_Edge > myEdge
int EdgeIndex(double U) const
Return edge index corresponding to normalized parameter.
std::vector< Handle(Geom2d_Curve)> myC2d
int NbPoints() const
Return nb nodes on edges and vertices (+1 to be == GetUVPtStruct().size() )
double FirstParameter(int i) const
Return first normalized parameter of the i-the edge (count starts from zero)
const std::vector< UVPtStruct > & GetUVPtStruct(bool isXConst=0, double constValue=0) const
Return detailed data on nodes.
StdMeshers_FaceSide(const TopoDS_Face &theFace, std::list< TopoDS_Edge > &theEdges, SMESH_Mesh *theMesh, const bool theIsForward, const bool theIgnoreMediumNodes)
Wrap several edges. Edges must be properly ordered and oriented.
std::vector< double > myNormPar
bool MissVertexNode() const
Return true if there vertices without nodes.
const TopoDS_Edge & Edge(int i) const
Return i-th wrapped edge (count starts from zero)
SMESH_Mesh * GetMesh() const
Return mesh.
double Parameter(double U, TopoDS_Edge &edge) const
Return edge and parameter on edge by normalized parameter.
void dump(const char *msg=0) const
StdMeshers_FaceSide(const TopoDS_Face &theFace, const TopoDS_Edge &theEdge, SMESH_Mesh *theMesh, const bool theIsForward, const bool theIgnoreMediumNodes)
Wrap one edge.
std::vector< double > myLast
TopoDS_Vertex FirstVertex(int i=0) const
Return 1st vertex of the i-the edge (count starts from zero)
BRepAdaptor_CompCurve * GetCurve3d() const
Creates a fully functional Adaptor_Curve.
std::vector< double > myFirst
double Length() const
Return side length.
int NbEdges() const
Return nb of wrapped edges.
std::vector< uvPtStruct > myFalsePoints
gp_Pnt2d Value2d(double U) const
Return UV by normalized parameter.
Adaptor2d_Curve2d * GetCurve2d() const
Creates a Adaptor2d_Curve2d to be used in SMESH_Block.
double LastParameter(int i) const
Return ast normalized parameter of the i-the edge (count starts from zero)
TopoDS_Vertex LastVertex(int i=-1) const
Return last vertex of the i-the edge (count starts from zero)
int NbSegments() const
Return nb edges.
static TSideVector GetFaceWires(const TopoDS_Face &theFace, SMESH_Mesh &theMesh, const bool theIgnoreMediumNodes, TError &theError)
Return wires of a face as StdMeshers_FaceSide's.
const std::vector< UVPtStruct > & SimulateUVPtStruct(int nbSeg, bool isXConst=0, double constValue=0) const
Simulates detailed data on nodes.
void Reverse()
Change orientation of side geometry.
StdMeshers_FaceSide(const SMDS_MeshNode *theNode, const gp_Pnt2d thePnt2d, const StdMeshers_FaceSide *theSide)
Wrap for vertex using data from other FaceSide.
Contains algorithm and description of occured error.
const SMDS_MeshNode * node