-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016 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
// find trsf
const int totNbSeg = 50;
vector< gp_XY > srcPnts, tgtPnts;
- srcPnts.resize( totNbSeg );
- tgtPnts.resize( totNbSeg );
+ srcPnts.reserve( totNbSeg );
+ tgtPnts.reserve( totNbSeg );
for ( size_t iW = 0; iW < srcWires.size(); ++iW )
{
const double minSegLen = srcWires[iW]->Length() / totNbSeg;
}
}
}
- else if ( nbEdgesInWires.front() == 1 )
+ else if ( nbEdgesInWires.front() == 1 ) // a sole edge in a wire
{
- // TODO::Compare orientation of curves in a sole edge
- //RETURN_BAD_RESULT("Not implemented case");
+ TopoDS_Edge srcE1 = srcEdges.front(), tgtE1 = tgtEdges.front();
+ for ( size_t iW = 0; iW < srcWires.size(); ++iW )
+ {
+ StdMeshers_FaceSidePtr srcWire = srcWires[iW];
+ for ( int iE = 0; iE < srcWire->NbEdges(); ++iE )
+ if ( srcE1.IsSame( srcWire->Edge( iE )))
+ {
+ reverse = ( tgtE1.Orientation() != tgtWires[iW]->Edge( iE ).Orientation() );
+ break;
+ }
+ }
}
else
{
if ( mapper.GetErrorCode() != SMESH_Pattern::ERR_OK )
return error("Can't make mesh by source mesh pattern");
+ } // end of projection using Pattern mapping
+
+ {
// -------------------------------------------------------------------------
// mapper doesn't take care of nodes already existing on edges and vertices,
// so we must merge nodes created by it with existing ones
continue; // do not treat sm of degen VERTEX
}
- // Sort new and old nodes of a submesh separately
+ // Sort new and old nodes of a sub-mesh separately
bool isSeam = helper.IsRealSeam( sm->GetId() );
// The mapper can't create quadratic elements, so convert if needed
// ----------------------------------------------------------------
+ SMDS_ElemIteratorPtr faceIt;
faceIt = srcSubMesh->GetSubMeshDS()->GetElements();
bool srcIsQuad = faceIt->next()->IsQuadratic();
faceIt = tgtSubMesh->GetSubMeshDS()->GetElements();
editor.ConvertToQuadratic(/*theForce3d=*/false, tgtFaces, false);
}
-
- } // end of projection using Pattern mapping
+ } // end of coincident nodes and quadratic elements treatment
if ( !projDone || is1DComputed )