-// SMESH SMESH : implementaion of SMESH idl descriptions
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003 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.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// 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.
//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
// File : StdMeshers_FaceSide.hxx
// Created : Wed Jan 31 18:41:25 2007
// Author : Edward AGAPOV (eap)
// Module : SMESH
-
+//
#ifndef StdMeshers_FaceSide_HeaderFile
#define StdMeshers_FaceSide_HeaderFile
-#include <gp_Pnt2d.hxx>
+#include <Geom2d_Curve.hxx>
+#include <GeomAdaptor_Curve.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
-#include <Geom2d_Curve.hxx>
-#include <TopExp.hxx>
+#include <gp_Pnt2d.hxx>
#include "SMESH_StdMeshers.hxx"
-#include "SMESH_Algo.hxx"
#include <vector>
#include <list>
class Adaptor3d_Curve;
class BRepAdaptor_CompCurve;
class TopoDS_Face;
-class SMESH_ComputeError;
+struct SMESH_ComputeError;
typedef struct uvPtStruct
{
* \brief Wrap several edges. Edges must be properly ordered and oriented.
*/
StdMeshers_FaceSide(const TopoDS_Face& theFace,
- list<TopoDS_Edge>& theEdges,
+ std::list<TopoDS_Edge>& theEdges,
SMESH_Mesh* theMesh,
const bool theIsForward,
const bool theIgnoreMediumNodes);
-
+ /*!
+ * \brief Wrap for vertex using data from other FaceSide
+ */
+ StdMeshers_FaceSide(const SMDS_MeshNode* theNode,
+ const gp_Pnt2d thePnt2d,
+ const StdMeshers_FaceSide* theSide);
/*!
* \brief Return wires of a face as StdMeshers_FaceSide's
*/
*/
SMESH_Mesh* GetMesh() const { return myMesh; }
/*!
- * \brief Return true if there vertices without nodes
+ * \brief Return true if there are vertices without nodes
*/
bool MissVertexNode() const { return myMissingVertexNodes; }
/*!
*
* Missing nodes are allowed only on internal vertices
*/
- const vector<UVPtStruct>& GetUVPtStruct(bool isXConst =0, double constValue =0) const;
+ const std::vector<UVPtStruct>& GetUVPtStruct(bool isXConst =0, double constValue =0) const;
/*!
* \brief Simulates detailed data on nodes
* \param isXConst - true if normalized parameter X is constant
* \param constValue - constant parameter value
*/
- const vector<UVPtStruct>& SimulateUVPtStruct(int nbSeg,
+ const std::vector<UVPtStruct>& SimulateUVPtStruct(int nbSeg,
bool isXConst = 0,
double constValue = 0) const;
/*!
/*!
* \brief Return 1st vertex of the i-the edge (count starts from zero)
*/
- inline TopoDS_Vertex FirstVertex(int i=0) const;
+ TopoDS_Vertex FirstVertex(int i=0) const;
/*!
* \brief Return last vertex of the i-the edge (count starts from zero)
*/
- inline TopoDS_Vertex LastVertex(int i=-1) const;
+ TopoDS_Vertex LastVertex(int i=-1) const;
/*!
* \brief Return first normalized parameter of the i-the edge (count starts from zero)
*/
protected:
- vector<uvPtStruct> myPoints, myFalsePoints;
- vector<TopoDS_Edge> myEdge;
- vector<Handle(Geom2d_Curve)> myC2d;
- vector<double> myFirst, myLast;
- vector<double> myNormPar;
- double myLength;
- int myNbPonits, myNbSegments;
- SMESH_Mesh* myMesh;
- bool myMissingVertexNodes, myIgnoreMediumNodes;
+
+ // DON't FORGET tO update Reverse() when adding one more vector!
+ std::vector<uvPtStruct> myPoints, myFalsePoints;
+ std::vector<TopoDS_Edge> myEdge;
+ std::vector<int> myEdgeID;
+ std::vector<Handle(Geom2d_Curve)> myC2d;
+ std::vector<GeomAdaptor_Curve> myC3dAdaptor;
+ std::vector<double> myFirst, myLast;
+ std::vector<double> myNormPar;
+ std::vector<double> myEdgeLength;
+ std::vector<double> myIsUniform;
+ double myLength;
+ int myNbPonits, myNbSegments;
+ SMESH_Mesh* myMesh;
+ bool myMissingVertexNodes, myIgnoreMediumNodes;
+ gp_Pnt2d myDefaultPnt2d;
};
return myFirst[i] * ( 1 - r ) + myLast[i] * r;
}
-//================================================================================
-/*!
- * \brief Return 1st vertex of the i-the edge
- */
-//================================================================================
-
-inline TopoDS_Vertex StdMeshers_FaceSide::FirstVertex(int i) const
-{
- return i < myEdge.size() ? TopExp::FirstVertex( myEdge[i], 1 ) : TopoDS_Vertex();
-}
-
-//================================================================================
-/*!
- * \brief Return last vertex of the i-the edge
- */
-//================================================================================
-
-inline TopoDS_Vertex StdMeshers_FaceSide::LastVertex(int i) const
-{
- return i<0 ? TopExp::LastVertex( myEdge.back(), 1) : i<myEdge.size() ? TopExp::LastVertex( myEdge[i], 1 ) : TopoDS_Vertex();
-}
-
//================================================================================
/*!
* \brief Return first normalized parameter of the i-the edge