Go to the documentation of this file.
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)
const TopoDS_Edge & Edge(int i) const
Return i-th wrapped edge (count starts from zero)
TopoDS_Vertex LastVertex(int i=-1) const
Return last vertex of the i-the edge (count starts from zero)
double Parameter(double U, TopoDS_Edge &edge) const
Return edge and parameter on edge by normalized parameter.
bool myMissingVertexNodes
double Length() const
Return side length.
boost::shared_ptr< StdMeshers_FaceSide > StdMeshers_FaceSidePtr
std::vector< uvPtStruct > myPoints
gp_Pnt2d Value2d(double U) const
Return UV by normalized parameter.
std::vector< StdMeshers_FaceSidePtr > TSideVector
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.
StdMeshers_FaceSide(const SMDS_MeshNode *theNode, const gp_Pnt2d thePnt2d, const StdMeshers_FaceSide *theSide)
Wrap for vertex using data from other FaceSide.
void Reverse()
Change orientation of side geometry.
double FirstParameter(int i) const
Return first normalized parameter of the i-the edge (count starts from zero)
Represents a side of a quasi quadrilateral face. It can be composed of several edges....
void dump(const char *msg=0) const
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 SMDS_MeshNode * node
double LastParameter(int i) const
Return ast normalized parameter of the i-the edge (count starts from zero)
bool MissVertexNode() const
Return true if there vertices without nodes.
int EdgeIndex(double U) const
Return edge index corresponding to normalized parameter.
struct uvPtStruct UVPtStruct
const std::vector< UVPtStruct > & GetUVPtStruct(bool isXConst=0, double constValue=0) const
Return detailed data on nodes.
BRepAdaptor_CompCurve * GetCurve3d() const
Creates a fully functional Adaptor_Curve.
boost::shared_ptr< uvPtStruct > UVPtStructPtr
boost::shared_ptr< SMESH_ComputeError > TError
Contains algorithm and description of occured error.
int NbPoints() const
Return nb nodes on edges and vertices (+1 to be == GetUVPtStruct().size() )
#define STDMESHERS_EXPORT
std::vector< Handle(Geom2d_Curve)> myC2d
Adaptor2d_Curve2d * GetCurve2d() const
Creates a Adaptor2d_Curve2d to be used in SMESH_Block.
TopoDS_Vertex FirstVertex(int i=0) const
Return 1st vertex of the i-the edge (count starts from zero)
SMESH_Mesh * GetMesh() const
Return mesh.
int NbEdges() const
Return nb of wrapped edges.
std::vector< double > myFirst
int NbSegments() const
Return nb edges.
StdMeshers_FaceSide(const TopoDS_Face &theFace, const TopoDS_Edge &theEdge, SMESH_Mesh *theMesh, const bool theIsForward, const bool theIgnoreMediumNodes)
Wrap one edge.
std::vector< TopoDS_Edge > myEdge
const std::vector< UVPtStruct > & SimulateUVPtStruct(int nbSeg, bool isXConst=0, double constValue=0) const
Simulates detailed data on nodes.
std::vector< double > myLast
std::vector< double > myNormPar