-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include <Geom2d_Curve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <TopoDS_Edge.hxx>
+#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
#include <gp_Pnt2d.hxx>
class Adaptor2d_Curve2d;
class Adaptor3d_Curve;
class BRepAdaptor_CompCurve;
-class TopoDS_Face;
struct SMESH_ComputeError;
class StdMeshers_FaceSide;
/*!
* \brief Simulate a side from a vertex using data from other FaceSide
*/
- StdMeshers_FaceSide(const SMDS_MeshNode* theNode,
- const gp_Pnt2d thePnt2d,
- const StdMeshers_FaceSide* theSide);
+ StdMeshers_FaceSide(const StdMeshers_FaceSide* theSide,
+ const SMDS_MeshNode* theNode,
+ const gp_Pnt2d* thePnt2d1,
+ const gp_Pnt2d* thePnt2d2=NULL,
+ const Handle(Geom2d_Curve)& theC2d=NULL,
+ const double theUFirst=0.,
+ const double theULast=1.);
+ /*!
+ * \brief Create a side from an UVPtStructVec
+ */
+ StdMeshers_FaceSide(UVPtStructVec& theSideNodes,
+ const TopoDS_Face& theFace = TopoDS_Face());
+
+ // static "consrtuctors"
+ static StdMeshers_FaceSidePtr New(const TopoDS_Face& Face,
+ const TopoDS_Edge& Edge,
+ SMESH_Mesh* Mesh,
+ const bool IsForward,
+ const bool IgnoreMediumNodes,
+ SMESH_ProxyMesh::Ptr ProxyMesh = SMESH_ProxyMesh::Ptr())
+ { return StdMeshers_FaceSidePtr
+ ( new StdMeshers_FaceSide( Face,Edge,Mesh,IsForward,IgnoreMediumNodes,ProxyMesh ));
+ }
+ static StdMeshers_FaceSidePtr New (const TopoDS_Face& Face,
+ std::list<TopoDS_Edge>& Edges,
+ SMESH_Mesh* Mesh,
+ const bool IsForward,
+ const bool IgnoreMediumNodes,
+ SMESH_ProxyMesh::Ptr ProxyMesh = SMESH_ProxyMesh::Ptr())
+ { return StdMeshers_FaceSidePtr
+ ( new StdMeshers_FaceSide( Face,Edges,Mesh,IsForward,IgnoreMediumNodes,ProxyMesh ));
+ }
+ 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.)
+ { return StdMeshers_FaceSidePtr
+ ( new StdMeshers_FaceSide( Side,Node,Pnt2d1,Pnt2d2,C2d,UFirst,ULast ));
+ }
+ static StdMeshers_FaceSidePtr New (UVPtStructVec& theSideNodes,
+ const TopoDS_Face& theFace = TopoDS_Face())
+ {
+ return StdMeshers_FaceSidePtr( new StdMeshers_FaceSide( theSideNodes, theFace ));
+ }
+
/*!
* \brief Return wires of a face as StdMeshers_FaceSide's
*/
*/
void Reverse();
/*!
- * \brief Return nb nodes on edges and vertices (+1 to be == GetUVPtStruct().size() )
+ * \brief Make ignore medium nodes
+ */
+ void SetIgnoreMediumNodes(bool toIgnore);
+
+ /*!
+ * \brief Return nb nodes on edges and vertices (+1 to be == GetUVPtStruct().size() ).
+ * Call it with update == true if mesh of this side can be recomputed
+ * since creation of this side
*/
- int NbPoints() const { return myNbPonits; }
+ int NbPoints(const bool update = false) const;
/*!
* \brief Return nb edges
+ * Call it with update == true if mesh of this side can be recomputed
+ * since creation of this side
*/
- int NbSegments() const { return myNbSegments; }
+ int NbSegments(const bool update = false) const;
/*!
* \brief Return mesh
*/
* \brief Return true if there are vertices without nodes
*/
bool MissVertexNode() const { return myMissingVertexNodes; }
+
/*!
* \brief Return detailed data on nodes
* \param isXConst - true if normalized parameter X is constant
* For a closed side, the 1st point repeats at end
*/
std::vector<const SMDS_MeshNode*> GetOrderedNodes() const;
+
/*!
* \brief Return edge and parameter on edge by normalized parameter
*/
* \brief Return UV by normalized parameter
*/
gp_Pnt2d Value2d(double U) const;
+ /*!
+ * \brief Return XYZ by normalized parameter
+ */
+ gp_Pnt Value3d(double U) const;
/*!
* \brief Creates a Adaptor2d_Curve2d to be used in SMESH_Block
*/
std::vector<double> myFirst, myLast;
std::vector<double> myNormPar;
std::vector<double> myEdgeLength;
- std::vector<double> myIsUniform;
+ std::vector<int> myIsUniform;
double myLength;
int myNbPonits, myNbSegments;
SMESH_ProxyMesh::Ptr myProxyMesh;