mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 10:20:34 +05:00
Updated for NPAL19665.
This commit is contained in:
parent
e4ca575902
commit
38beeccb16
@ -773,6 +773,59 @@ bool StdMeshers_ProjectionUtils::FindSubShapeAssociation(const TopoDS_Shape& the
|
||||
}
|
||||
break; // try by vertex closeness
|
||||
}
|
||||
case TopAbs_COMPOUND: {
|
||||
if ( IsPropagationPossible( theMesh1, theMesh2 )) {
|
||||
// find boundary(for theShape1) edge
|
||||
TopoDS_Edge E;
|
||||
for(TopExp_Explorer exp(theShape1, TopAbs_EDGE); exp.More(); exp.Next() ) {
|
||||
E = TopoDS::Edge( exp.Current() );
|
||||
int NbFacesFromShape1 = 0;
|
||||
const TopTools_ListOfShape& EAncestors = theMesh1->GetAncestors(E);
|
||||
TopTools_ListIteratorOfListOfShape itea(EAncestors);
|
||||
for(; itea.More(); itea.Next()) {
|
||||
if( itea.Value().ShapeType() != TopAbs_FACE ) continue;
|
||||
TopoDS_Face face = TopoDS::Face(itea.Value());
|
||||
for(TopExp_Explorer expf(theShape1, TopAbs_FACE); expf.More(); expf.Next() ) {
|
||||
if(face.IsSame(expf.Current())) {
|
||||
NbFacesFromShape1++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(NbFacesFromShape1==1) break;
|
||||
}
|
||||
// find association for vertices from edge E
|
||||
for(TopExp_Explorer eexp(E, TopAbs_VERTEX); eexp.More(); eexp.Next()) {
|
||||
TopoDS_Vertex V1 = TopoDS::Vertex( eexp.Current() );
|
||||
const TopTools_ListOfShape& Ancestors = theMesh1->GetAncestors(V1);
|
||||
TopTools_ListIteratorOfListOfShape ita(Ancestors);
|
||||
for(; ita.More(); ita.Next()) {
|
||||
if( ita.Value().ShapeType() != TopAbs_EDGE ) continue;
|
||||
TopoDS_Edge edge = TopoDS::Edge(ita.Value());
|
||||
bool FromShape1 = false;
|
||||
for(TopExp_Explorer expe(theShape1, TopAbs_EDGE); expe.More(); expe.Next() ) {
|
||||
if(edge.IsSame(expe.Current())) {
|
||||
FromShape1 = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!FromShape1) {
|
||||
// it is an edge between theShape1 and theShape2
|
||||
TopExp_Explorer expv(edge, TopAbs_VERTEX);
|
||||
TopoDS_Vertex V2 = TopoDS::Vertex( expv.Current() );
|
||||
if(V2.IsSame(V1)) {
|
||||
expv.Next();
|
||||
V2 = TopoDS::Vertex( expv.Current() );
|
||||
}
|
||||
InsertAssociation( V1, V2, theMap, bidirect);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return FindSubShapeAssociation( theShape1, theMesh1, theShape2, theMesh2, theMap);
|
||||
}
|
||||
break; // try by vertex closeness
|
||||
}
|
||||
default:;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user