#include "SMESHDS_SubMesh.hxx"
//#include "SMESH_Algo.hxx"
#include "SMESH_Mesh.hxx"
-#include "SMESH_MeshEditor.hxx"
+#include "SMESH_MesherHelper.hxx"
#include "SMESH_ComputeError.hxx"
#include "SMESH_Block.hxx"
myMesh = theMesh;
myMissingVertexNodes = false;
myIgnoreMediumNodes = theIgnoreMediumNodes;
+ myDefaultPnt2d = gp_Pnt2d( 1e+100, 1e+100 );
if ( nbEdges == 0 ) return;
SMESHDS_Mesh* meshDS = theMesh->GetMeshDS();
//dump();
}
+//================================================================================
+/*!
+ * \brief Constructor of a side for vertex using data from other FaceSide
+ * \param theVertex - the vertex
+ * \param theSide - the side
+ */
+//================================================================================
+
+StdMeshers_FaceSide::StdMeshers_FaceSide(const SMDS_MeshNode* theNode,
+ const gp_Pnt2d thePnt2d,
+ const StdMeshers_FaceSide* theSide)
+{
+ myC2d.resize(1);
+ myLength = 0;
+ myMesh = theSide->GetMesh();
+ myDefaultPnt2d = thePnt2d;
+
+ myPoints = theSide->GetUVPtStruct();
+ myNbPonits = myNbSegments = myPoints.size();
+ std::vector<uvPtStruct>::iterator it = myPoints.begin();
+ for(; it!=myPoints.end(); it++) {
+ (*it).u = thePnt2d.X();
+ (*it).v = thePnt2d.Y();
+ (*it).y = 0.0;
+ (*it).node = theNode;
+ }
+}
+
//================================================================================
/*!
* \brief Return info on nodes on the side
map< double, const SMDS_MeshNode*> u2node;
//int nbOnDegen = 0;
- for ( int i = 0; i < myEdge.size(); ++i )
- {
+ for ( int i = 0; i < myEdge.size(); ++i ) {
// put 1st vertex node
TopoDS_Vertex VFirst, VLast;
TopExp::Vertices( myEdge[i], VFirst, VLast, true);
double prevNormPar = ( i == 0 ? 0 : myNormPar[ i-1 ]); // normalized param
if ( node ) { // internal nodes may be missing
u2node.insert( make_pair( prevNormPar, node ));
- } else if ( i == 0 ) {
+ }
+ else if ( i == 0 ) {
MESSAGE(" NO NODE on VERTEX" );
return myPoints;
}
double r = ( U - prevU )/ ( myNormPar[ i ] - prevU );
return myC2d[ i ]->Value( myFirst[i] * ( 1 - r ) + myLast[i] * r );
}
- return gp_Pnt2d( 1e+100, 1e+100 );
+ //return gp_Pnt2d( 1e+100, 1e+100 );
+ return myDefaultPnt2d;
}
//================================================================================