+ reverse( myEdgeLength );
+ reverse( myIsUniform );
+ }
+ if ( nbEdges > 0 )
+ {
+ myNormPar[nbEdges-1]=1.;
+ if ( !myEdge[0].IsNull() )
+ {
+ for ( size_t i = 0; i < myEdge.size(); ++i )
+ reverseProxySubmesh( myEdge[i] );
+ myPoints.clear();
+ myFalsePoints.clear();
+ }
+ else
+ {
+ for ( size_t i = 0; i < myPoints.size(); ++i )
+ {
+ UVPtStruct & uvPt = myPoints[i];
+ uvPt.normParam = 1 - uvPt.normParam;
+ uvPt.x = 1 - uvPt.x;
+ uvPt.y = 1 - uvPt.y;
+ }
+ reverse( myPoints );
+
+ for ( size_t i = 0; i < myFalsePoints.size(); ++i )
+ {
+ UVPtStruct & uvPt = myFalsePoints[i];
+ uvPt.normParam = 1 - uvPt.normParam;
+ uvPt.x = 1 - uvPt.x;
+ uvPt.y = 1 - uvPt.y;
+ }
+ reverse( myFalsePoints );
+ }
+ }
+ for ( size_t i = 0; i < myEdge.size(); ++i )
+ {
+ if ( myEdge[i].IsNull() ) continue; // for a side on points only
+ double fp,lp;
+ Handle(Geom_Curve) C3d = BRep_Tool::Curve(myEdge[i],fp,lp);
+ if ( !C3d.IsNull() )
+ myC3dAdaptor[i].Load( C3d, fp,lp );
+ }
+}
+
+//=======================================================================
+//function : SetIgnoreMediumNodes
+//purpose : Make ignore medium nodes
+//=======================================================================
+
+void StdMeshers_FaceSide::SetIgnoreMediumNodes(bool toIgnore)
+{
+ if ( myIgnoreMediumNodes != toIgnore )
+ {
+ myIgnoreMediumNodes = toIgnore;
+
+ if ( !myPoints.empty() )
+ {
+ UVPtStructVec newPoints;
+ newPoints.reserve( myPoints.size()/2 + 1 );
+ for ( size_t i = 0; i < myPoints.size(); i += 2 )
+ newPoints.push_back( myPoints[i] );
+
+ myPoints.swap( newPoints );
+ }
+ else
+ {
+ NbPoints( /*update=*/true );
+ }
+ }
+}
+
+//=======================================================================
+//function : NbPoints
+//purpose : 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 StdMeshers_FaceSide::NbPoints(const bool update) const
+{
+ if ( !myPoints.empty() )
+ return myPoints.size();
+
+ // if ( !myFalsePoints.empty() )
+ // return myFalsePoints.size();
+
+ if ( update && myEdge.size() > 0 )
+ {
+ StdMeshers_FaceSide* me = (StdMeshers_FaceSide*) this;
+ me->myNbPonits = 0;
+ me->myNbSegments = 0;
+ me->myMissingVertexNodes = false;
+
+ vector<const SMDS_MeshNode*> nodes;
+ for ( int i = 0; i < NbEdges(); ++i )
+ {
+ if ( const SMESHDS_SubMesh* sm = myProxyMesh->GetSubMesh( Edge(i) ))
+ {
+ if ( sm->NbNodes() == sm->NbElements()-1 || sm->NbElements() == 0 )
+ {
+ me->myNbPonits += sm->NbNodes();
+ if ( myIgnoreMediumNodes && sm->IsQuadratic() )
+ me->myNbPonits -= sm->NbElements();
+ }
+ else // nodes can be moved to other shapes by MergeNodes()
+ {
+ nodes.clear();
+ GetEdgeNodes( i, nodes, /*v1=*/false, /*v2=*/false );
+ me->myNbPonits += nodes.size();
+ }
+ me->myNbSegments += sm->NbElements();
+ }
+ }
+
+ SMESH_MesherHelper* helper = FaceHelper();
+
+ std::set< const SMDS_MeshNode* > vNodes;
+ const int nbV = NbEdges() + !IsClosed();
+ for ( int i = 0; i < nbV; ++i )
+ if ( const SMDS_MeshNode* n = VertexNode( i ))
+ {
+ if ( !vNodes.insert( n ).second &&
+ ( helper->IsRealSeam ( n->getshapeId() ) ||
+ helper->IsDegenShape( n->getshapeId() )))
+ me->myNbPonits++;
+ }
+ else
+ {
+ me->myMissingVertexNodes = true;
+ }
+ me->myNbPonits += vNodes.size();
+
+ if ( IsClosed() )
+ me->myNbPonits++; // closing node is repeated
+ }
+ return myNbPonits;
+}
+
+//=======================================================================
+//function : NbSegments
+//purpose : Return nb edges
+// Call it with update == true if mesh of this side can be recomputed
+// since creation of this side
+//=======================================================================
+
+int StdMeshers_FaceSide::NbSegments(const bool update) const
+{
+ return NbPoints( update ), myNbSegments;
+}
+
+//================================================================================
+/*!
+ * \brief Reverse UVPtStructVec if a proxy sub-mesh of E
+ */
+//================================================================================
+
+void StdMeshers_FaceSide::reverseProxySubmesh( const TopoDS_Edge& E )
+{
+ if ( !myProxyMesh ) return;
+ if ( const SMESH_ProxyMesh::SubMesh* sm = myProxyMesh->GetProxySubMesh( E ))
+ {
+ UVPtStructVec& edgeUVPtStruct = (UVPtStructVec& ) sm->GetUVPtStructVec();
+ for ( size_t i = 0; i < edgeUVPtStruct.size(); ++i )
+ {
+ UVPtStruct & uvPt = edgeUVPtStruct[i];
+ uvPt.normParam = 1 - uvPt.normParam;
+ uvPt.x = 1 - uvPt.x;
+ uvPt.y = 1 - uvPt.y;
+ }
+ reverse( edgeUVPtStruct );