28 #ifndef StdMeshers_FaceSide_HeaderFile
29 #define StdMeshers_FaceSide_HeaderFile
35 #include <Geom2d_Curve.hxx>
36 #include <GeomAdaptor_Curve.hxx>
37 #include <TopoDS_Edge.hxx>
38 #include <TopoDS_Face.hxx>
39 #include <TopoDS_Vertex.hxx>
40 #include <gp_Pnt2d.hxx>
44 #include <boost/shared_ptr.hpp>
48 class BRepAdaptor_CompCurve;
55 typedef boost::shared_ptr< SMESH_ComputeError >
TError;
70 enum { ALL_EDGES = -1, LAST_EDGE = -1 };
76 const TopoDS_Edge& theEdge,
78 const bool theIsForward,
79 const bool theIgnoreMediumNodes,
86 const std::list<TopoDS_Edge>& theEdges,
88 const bool theIsForward,
89 const bool theIgnoreMediumNodes,
97 const gp_Pnt2d* thePnt2d1,
98 const gp_Pnt2d* thePnt2d2 = NULL,
99 const Handle(Geom2d_Curve)& theC2d = NULL,
100 const double theUFirst = 0.,
101 const double theULast = 1.);
106 const TopoDS_Face& theFace = TopoDS_Face(),
107 const TopoDS_Edge& theEdge = TopoDS_Edge(),
114 const TopoDS_Edge&
Edge,
116 const bool IsForward,
117 const bool IgnoreMediumNodes,
124 const std::list<TopoDS_Edge>& Edges,
126 const bool IsForward,
127 const bool IgnoreMediumNodes,
135 const gp_Pnt2d* Pnt2d1,
136 const gp_Pnt2d* Pnt2d2 = NULL,
137 const Handle(Geom2d_Curve)& C2d = NULL,
138 const double UFirst = 0.,
139 const double ULast = 1.)
144 const TopoDS_Face& theFace = TopoDS_Face(),
145 const TopoDS_Edge& theEdge = TopoDS_Edge(),
154 static TSideVector GetFaceWires(
const TopoDS_Face& theFace,
156 const bool theIgnoreMediumNodes,
160 const bool theCheckVertexNodes =
true);
168 void SetIgnoreMediumNodes(
bool toIgnore);
175 smIdType NbPoints(
const bool update =
false)
const;
181 smIdType NbSegments(
const bool update =
false)
const;
199 const UVPtStructVec& GetUVPtStruct(
bool isXConst = 0,
double constValue = 0 )
const;
207 double constValue = 0)
const;
213 std::vector<const SMDS_MeshNode*> GetOrderedNodes(
int iE = ALL_EDGES )
const;
221 std::vector<const SMDS_MeshNode*>& nodes,
222 bool inlude1stVertex=
true,
223 bool inludeLastVertex=
true)
const;
229 const SMDS_MeshNode* VertexNode(std::size_t i,
bool* isMoved = 0)
const;
234 inline double Parameter(
double U, TopoDS_Edge & edge)
const;
238 inline double Parameter(
double U,
int & edgeID)
const;
242 gp_Pnt2d Value2d(
double U)
const;
246 gp_Pnt Value3d(
double U)
const;
254 BRepAdaptor_CompCurve* GetCurve3d()
const;
258 int NbEdges()
const {
return (
int)myEdge.size(); }
262 const TopoDS_Edge&
Edge(
int i)
const {
return myEdge[i]; }
266 const std::vector<TopoDS_Edge>&
Edges()
const {
return myEdge; }
270 const TopoDS_Face&
Face()
const {
return myFace; }
274 TopoDS_Vertex FirstVertex(
int i=0)
const;
278 TopoDS_Vertex LastVertex(
int i = LAST_EDGE)
const;
282 bool IsClosed()
const;
286 double Length()
const {
return myLength; }
290 inline int EdgeIndex(
double U )
const;
292 void dump(
const char* msg=0)
const;
297 inline int EdgeID(
int i)
const;
301 inline Handle(Geom2d_Curve) Curve2d(
int i)
const;
305 inline double FirstParameter(
int i)
const;
309 inline double LastParameter(
int i)
const;
314 inline double FirstU(
int i)
const;
319 inline double LastU(
int i)
const;
335 void reverseProxySubmesh(
const TopoDS_Edge& E );
368 while ( i > 0 && U <
myNormPar[ i-1 ] ) --i;
387 double r = ( U - prevU )/ (
myNormPar[ i ] - prevU );
406 double r = ( U - prevU )/ (
myNormPar[ i ] - prevU );
471 inline Handle(Geom2d_Curve) StdMeshers_FaceSide::Curve2d(
int i)
const
#define STDMESHERS_EXPORT
Definition: SMESH_StdMeshers.hxx:38
std::vector< UVPtStruct > UVPtStructVec
Definition: SMESH_TypeDefs.hxx:256
std::vector< StdMeshers_FaceSidePtr > TSideVector
Definition: StdMeshers_FaceSide.hxx:57
boost::shared_ptr< SMESH_ComputeError > TError
Definition: StdMeshers_FaceSide.hxx:53
boost::shared_ptr< StdMeshers_FaceSide > StdMeshers_FaceSidePtr
Definition: StdMeshers_FaceSide.hxx:56
Definition: SMDS_MeshNode.hxx:36
Definition: SMESH_Mesh.hxx:80
It helps meshers to add elements and provides other utilities.
Definition: SMESH_MesherHelper.hxx:84
boost::shared_ptr< SMESH_ProxyMesh > Ptr
Definition: SMESH_ProxyMesh.hxx:54
Represents a side of a quasi quadrilateral face.
Definition: StdMeshers_FaceSide.hxx:67
int EdgeID(int i) const
Return ID of i-th wrapped edge (count starts from zero)
Definition: StdMeshers_FaceSide.hxx:460
double myLength
Definition: StdMeshers_FaceSide.hxx:348
std::vector< TopoDS_Edge > myEdge
Definition: StdMeshers_FaceSide.hxx:340
int EdgeIndex(double U) const
Return edge index corresponding to normalized parameter.
Definition: StdMeshers_FaceSide.hxx:365
std::vector< double > myEdgeLength
Definition: StdMeshers_FaceSide.hxx:346
double LastU(int i) const
Return last parameter of the i-th edge (count starts from zero).
Definition: StdMeshers_FaceSide.hxx:449
std::vector< Handle(Geom2d_Curve)> myC2d
Definition: StdMeshers_FaceSide.hxx:342
const std::vector< TopoDS_Edge > & Edges() const
Return all edges.
Definition: StdMeshers_FaceSide.hxx:266
gp_Pnt2d myDefaultPnt2d
Definition: StdMeshers_FaceSide.hxx:352
double FirstParameter(int i) const
Return first normalized parameter of the i-th edge (count starts from zero)
Definition: StdMeshers_FaceSide.hxx:416
static StdMeshers_FaceSidePtr New(const TopoDS_Face &Face, const TopoDS_Edge &Edge, SMESH_Mesh *Mesh, const bool IsForward, const bool IgnoreMediumNodes, SMESH_MesherHelper *FaceHelper=NULL, SMESH_ProxyMesh::Ptr ProxyMesh=SMESH_ProxyMesh::Ptr())
Definition: StdMeshers_FaceSide.hxx:113
TopoDS_Face myFace
Definition: StdMeshers_FaceSide.hxx:338
static StdMeshers_FaceSidePtr New(const StdMeshers_FaceSide *Side, const SMDS_MeshNode *Node, const gp_Pnt2d *Pnt2d1, const gp_Pnt2d *Pnt2d2=NULL, const Handle(Geom2d_Curve)&C2d=NULL, const double UFirst=0., const double ULast=1.)
Definition: StdMeshers_FaceSide.hxx:133
std::vector< double > myNormPar
Definition: StdMeshers_FaceSide.hxx:345
bool MissVertexNode() const
Return true if there are vertices without nodes.
Definition: StdMeshers_FaceSide.hxx:189
const TopoDS_Edge & Edge(int i) const
Return i-th edge (count starts from zero)
Definition: StdMeshers_FaceSide.hxx:262
std::vector< int > myEdgeID
Definition: StdMeshers_FaceSide.hxx:341
const TopoDS_Face & Face() const
Return the FACE.
Definition: StdMeshers_FaceSide.hxx:270
bool IsReversed(int i) const
Return orientation of i-th wrapped edge (count starts from zero)
double EdgeLength(int i) const
Return length of i-th wrapped edge (count starts from zero)
SMESH_Mesh * GetMesh() const
Return mesh.
Definition: StdMeshers_FaceSide.hxx:185
double Parameter(double U, TopoDS_Edge &edge) const
Return an edge and parameter on the edge by a normalized parameter.
Definition: StdMeshers_FaceSide.hxx:382
bool myIgnoreMediumNodes
Definition: StdMeshers_FaceSide.hxx:351
static StdMeshers_FaceSidePtr New(const TopoDS_Face &Face, const std::list< TopoDS_Edge > &Edges, SMESH_Mesh *Mesh, const bool IsForward, const bool IgnoreMediumNodes, SMESH_MesherHelper *FaceHelper=NULL, SMESH_ProxyMesh::Ptr ProxyMesh=SMESH_ProxyMesh::Ptr())
Definition: StdMeshers_FaceSide.hxx:123
double FirstU(int i) const
Return first parameter of the i-th edge (count starts from zero).
Definition: StdMeshers_FaceSide.hxx:438
SMESH_MesherHelper * myHelper
Definition: StdMeshers_FaceSide.hxx:353
std::vector< double > myLast
Definition: StdMeshers_FaceSide.hxx:344
std::vector< double > myFirst
Definition: StdMeshers_FaceSide.hxx:344
double Length() const
Return side length.
Definition: StdMeshers_FaceSide.hxx:286
int NbEdges() const
Return nb of wrapped edges.
Definition: StdMeshers_FaceSide.hxx:258
std::vector< uvPtStruct > myFalsePoints
Definition: StdMeshers_FaceSide.hxx:339
smIdType myNbPonits
Definition: StdMeshers_FaceSide.hxx:349
static StdMeshers_FaceSidePtr New(UVPtStructVec &theSideNodes, const TopoDS_Face &theFace=TopoDS_Face(), const TopoDS_Edge &theEdge=TopoDS_Edge(), SMESH_Mesh *theMesh=0)
Definition: StdMeshers_FaceSide.hxx:143
double LastParameter(int i) const
Return last normalized parameter of the i-th edge (count starts from zero)
Definition: StdMeshers_FaceSide.hxx:427
std::vector< GeomAdaptor_Curve > myC3dAdaptor
Definition: StdMeshers_FaceSide.hxx:343
Handle(Geom2d_Curve) Curve2d(int i) const
Return p-curve of i-th wrapped edge (count starts from zero)
std::vector< int > myIsUniform
Definition: StdMeshers_FaceSide.hxx:347
SMESH_ProxyMesh::Ptr myProxyMesh
Definition: StdMeshers_FaceSide.hxx:350
@ Face
Selection of faces.
Definition: libSMESH_Swig.h:56
@ Edge
Selection of edges.
Definition: libSMESH_Swig.h:55
@ Node
Selection of mesh nodes.
Definition: libSMESH_Swig.h:52
int GetEdgeNodes(SVTK_Selector *theSelector, const TVisualObjPtr &theVisualObject, ::smIdType &theId1, ::smIdType &theId2)
Definition: SMESHGUI_VTKUtils.cxx:1228
Contains an algorithm and description of an occurred error.
Definition: SMESH_ComputeError.hxx:74