Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PAL7935. In Load(face), load from a forward face
[modules/smesh.git]
/
src
/
SMESH
/
SMESH_Pattern.cxx
diff --git
a/src/SMESH/SMESH_Pattern.cxx
b/src/SMESH/SMESH_Pattern.cxx
index 432e5416115ec9f4fe5cd3e141e12f8a09cd06e1..0aeffec35e495ac8023ea97466360befeea2adcd 100644
(file)
--- a/
src/SMESH/SMESH_Pattern.cxx
+++ b/
src/SMESH/SMESH_Pattern.cxx
@@
-561,18
+561,20
@@
bool SMESH_Pattern::Load (SMESH_Mesh* theMesh,
return setErrorCode( ERR_LOAD_EMPTY_SUBMESH );
}
return setErrorCode( ERR_LOAD_EMPTY_SUBMESH );
}
+ TopoDS_Face face = TopoDS::Face( theFace.Oriented( TopAbs_FORWARD ));
+
// check that face is not closed
TopoDS_Vertex bidon;
list<TopoDS_Edge> eList;
// check that face is not closed
TopoDS_Vertex bidon;
list<TopoDS_Edge> eList;
- getOrderedEdges(
theF
ace, bidon, eList, myNbKeyPntInBoundary );
+ getOrderedEdges(
f
ace, bidon, eList, myNbKeyPntInBoundary );
list<TopoDS_Edge>::iterator elIt = eList.begin();
for ( ; elIt != eList.end() ; elIt++ )
list<TopoDS_Edge>::iterator elIt = eList.begin();
for ( ; elIt != eList.end() ; elIt++ )
- if ( BRep_Tool::IsClosed( *elIt ,
theF
ace ))
+ if ( BRep_Tool::IsClosed( *elIt ,
f
ace ))
return setErrorCode( ERR_LOADF_CLOSED_FACE );
Extrema_GenExtPS projector;
return setErrorCode( ERR_LOADF_CLOSED_FACE );
Extrema_GenExtPS projector;
- GeomAdaptor_Surface aSurface( BRep_Tool::Surface(
theF
ace ));
+ GeomAdaptor_Surface aSurface( BRep_Tool::Surface(
f
ace ));
if ( theProject || nbElems == 0 )
projector.Initialize( aSurface, 20,20, 1e-5,1e-5 );
if ( theProject || nbElems == 0 )
projector.Initialize( aSurface, 20,20, 1e-5,1e-5 );
@@
-580,7
+582,7
@@
bool SMESH_Pattern::Load (SMESH_Mesh* theMesh,
TNodePointIDMap nodePointIDMap;
if ( nbElems == 0 || (theProject &&
TNodePointIDMap nodePointIDMap;
if ( nbElems == 0 || (theProject &&
- theMesh->IsMainShape(
theF
ace ) &&
+ theMesh->IsMainShape(
f
ace ) &&
!isMeshBoundToShape( theMesh )))
{
MESSAGE("Project the whole mesh");
!isMeshBoundToShape( theMesh )))
{
MESSAGE("Project the whole mesh");
@@
-621,11
+623,11
@@
bool SMESH_Pattern::Load (SMESH_Mesh* theMesh,
p->myInitXYZ.SetCoord( p->myInitUV.X(), p->myInitUV.Y(), 0 );
}
// find key-points: the points most close to UV of vertices
p->myInitXYZ.SetCoord( p->myInitUV.X(), p->myInitUV.Y(), 0 );
}
// find key-points: the points most close to UV of vertices
- TopExp_Explorer vExp(
theF
ace, TopAbs_VERTEX );
+ TopExp_Explorer vExp(
f
ace, TopAbs_VERTEX );
set<int> foundIndices;
for ( ; vExp.More(); vExp.Next() ) {
const TopoDS_Vertex v = TopoDS::Vertex( vExp.Current() );
set<int> foundIndices;
for ( ; vExp.More(); vExp.Next() ) {
const TopoDS_Vertex v = TopoDS::Vertex( vExp.Current() );
- gp_Pnt2d uv = BRep_Tool::Parameters( v,
theF
ace );
+ gp_Pnt2d uv = BRep_Tool::Parameters( v,
f
ace );
double minDist = DBL_MAX;
int index;
vector< TPoint >::const_iterator pVecIt = myPoints.begin();
double minDist = DBL_MAX;
int index;
vector< TPoint >::const_iterator pVecIt = myPoints.begin();
@@
-661,7
+663,7
@@
bool SMESH_Pattern::Load (SMESH_Mesh* theMesh,
for ( elIt = eList.begin(); elIt != eList.end(); elIt++ )
myShapeIDMap.Add( *elIt );
// the face
for ( elIt = eList.begin(); elIt != eList.end(); elIt++ )
myShapeIDMap.Add( *elIt );
// the face
- myShapeIDMap.Add(
theF
ace );
+ myShapeIDMap.Add(
f
ace );
myPoints.resize( nbNodes );
myPoints.resize( nbNodes );
@@
-674,7
+676,7
@@
bool SMESH_Pattern::Load (SMESH_Mesh* theMesh,
double f, l;
Handle(Geom2d_Curve) C2d;
if ( !theProject )
double f, l;
Handle(Geom2d_Curve) C2d;
if ( !theProject )
- C2d = BRep_Tool::CurveOnSurface( edge,
theF
ace, f, l );
+ C2d = BRep_Tool::CurveOnSurface( edge,
f
ace, f, l );
bool isForward = ( edge.Orientation() == TopAbs_FORWARD );
// the forward key-point
bool isForward = ( edge.Orientation() == TopAbs_FORWARD );
// the forward key-point
@@
-790,7
+792,7
@@
bool SMESH_Pattern::Load (SMESH_Mesh* theMesh,
if ( fSubMesh && fSubMesh->NbElements() )
{
if ( fSubMesh && fSubMesh->NbElements() )
{
- list< TPoint* > & fPoints = getShapePoints(
theF
ace );
+ list< TPoint* > & fPoints = getShapePoints(
f
ace );
SMDS_NodeIteratorPtr nIt = fSubMesh->GetNodes();
while ( nIt->more() )
{
SMDS_NodeIteratorPtr nIt = fSubMesh->GetNodes();
while ( nIt->more() )
{