*/
//================================================================================
-StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace,
- std::list<TopoDS_Edge>& theEdges,
- SMESH_Mesh* theMesh,
- const bool theIsForward,
- const bool theIgnoreMediumNodes,
- SMESH_MesherHelper* theFaceHelper,
- SMESH_ProxyMesh::Ptr theProxyMesh)
+StdMeshers_FaceSide::StdMeshers_FaceSide(const TopoDS_Face& theFace,
+ const std::list<TopoDS_Edge>& theEdges,
+ SMESH_Mesh* theMesh,
+ const bool theIsForward,
+ const bool theIgnoreMediumNodes,
+ SMESH_MesherHelper* theFaceHelper,
+ SMESH_ProxyMesh::Ptr theProxyMesh)
{
int nbEdges = theEdges.size();
myEdge.resize ( nbEdges );
SMESHDS_Mesh* meshDS = myProxyMesh->GetMeshDS();
int nbDegen = 0;
- std::list<TopoDS_Edge>::iterator edge = theEdges.begin();
+ std::list<TopoDS_Edge>::const_iterator edge = theEdges.begin();
for ( int index = 0; edge != theEdges.end(); ++index, ++edge )
{
int i = theIsForward ? index : nbEdges-index-1;
myC3dAdaptor[i].Load( C3d, 0, 0.5 * BRep_Tool::Tolerance( V ));
}
}
+ else if ( myEdgeLength[i] > DBL_MIN )
+ {
+ Handle(Geom_Curve) C3d = BRep_Tool::Curve(myEdge[i],myFirst[i], myLast[i] );
+ myC3dAdaptor[i].Load( C3d, myFirst[i], myLast[i] );
+ if ( myEdge[i].Orientation() == TopAbs_REVERSED )
+ std::swap( myFirst[i], myLast[i] );
+ }
+
// reverse a proxy sub-mesh
if ( !theIsForward )
reverseProxySubmesh( myEdge[i] );
// check parametrization of curve
if( !myIsUniform[i] )
{
- double aLen3dU = r * myEdgeLength[i] * ( myFirst[i]>myLast[i] ? -1. : 1.);
+ double aLen3dU = r * myEdgeLength[i] * ( myFirst[i] > myLast[i] ? -1. : 1. );
GCPnts_AbscissaPoint AbPnt
( const_cast<GeomAdaptor_Curve&>( myC3dAdaptor[i]), aLen3dU, myFirst[i] );
if( AbPnt.IsDone() ) {