mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-18 11:50:32 +05:00
0020832: EDF 1359 SMESH : Automatic meshing of boundary layers
Move IsClosedEdge() to SMESH_MesherHelper from StdMeshers_ProjectionUtils
This commit is contained in:
parent
bb52dc60e8
commit
e5bb05c0df
@ -1724,7 +1724,7 @@ bool StdMeshers_PrismAsBlock::IsForwardEdge(SMESHDS_Mesh* meshDS,
|
|||||||
const int sideFaceID)
|
const int sideFaceID)
|
||||||
{
|
{
|
||||||
bool isForward = false;
|
bool isForward = false;
|
||||||
if ( TAssocTool::IsClosedEdge( bottomEdge ))
|
if ( SMESH_MesherHelper::IsClosedEdge( bottomEdge ))
|
||||||
{
|
{
|
||||||
isForward = ( bottomEdge.Orientation() == TopAbs_FORWARD );
|
isForward = ( bottomEdge.Orientation() == TopAbs_FORWARD );
|
||||||
}
|
}
|
||||||
|
@ -936,7 +936,8 @@ bool StdMeshers_ProjectionUtils::FindSubShapeAssociation(const TopoDS_Shape& the
|
|||||||
return true; // done
|
return true; // done
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( IsClosedEdge( edge1 ) && IsClosedEdge( edge2 ))
|
if ( SMESH_MesherHelper::IsClosedEdge( edge1 ) &&
|
||||||
|
SMESH_MesherHelper::IsClosedEdge( edge2 ))
|
||||||
{
|
{
|
||||||
// TODO: find out a proper orientation (is it possible?)
|
// TODO: find out a proper orientation (is it possible?)
|
||||||
InsertAssociation( edge1, edge2, theMap, bidirect); // insert with a proper orientation
|
InsertAssociation( edge1, edge2, theMap, bidirect); // insert with a proper orientation
|
||||||
@ -1151,7 +1152,7 @@ bool StdMeshers_ProjectionUtils::FindSubShapeAssociation(const TopoDS_Shape& the
|
|||||||
edge.Nullify();
|
edge.Nullify();
|
||||||
TopoDS_Shape wire = OuterShape( TopoDS::Face( expF.Current() ), TopAbs_WIRE );
|
TopoDS_Shape wire = OuterShape( TopoDS::Face( expF.Current() ), TopAbs_WIRE );
|
||||||
for ( expE.Init( wire, TopAbs_EDGE ); edge.IsNull() && expE.More(); expE.Next() )
|
for ( expE.Init( wire, TopAbs_EDGE ); edge.IsNull() && expE.More(); expE.Next() )
|
||||||
if ( !IsClosedEdge( TopoDS::Edge( expE.Current() )))
|
if ( !SMESH_MesherHelper::IsClosedEdge( TopoDS::Edge( expE.Current() )))
|
||||||
edge = expE.Current();
|
edge = expE.Current();
|
||||||
if ( !edge.IsNull() )
|
if ( !edge.IsNull() )
|
||||||
break;
|
break;
|
||||||
@ -1159,7 +1160,7 @@ bool StdMeshers_ProjectionUtils::FindSubShapeAssociation(const TopoDS_Shape& the
|
|||||||
} else if (edge.ShapeType() != TopAbs_EDGE) { // no faces
|
} else if (edge.ShapeType() != TopAbs_EDGE) { // no faces
|
||||||
edge.Nullify();
|
edge.Nullify();
|
||||||
for ( expE.Init( theShape1, TopAbs_EDGE ); edge.IsNull() && expE.More(); expE.Next() )
|
for ( expE.Init( theShape1, TopAbs_EDGE ); edge.IsNull() && expE.More(); expE.Next() )
|
||||||
if ( !IsClosedEdge( TopoDS::Edge( expE.Current() )))
|
if ( !SMESH_MesherHelper::IsClosedEdge( TopoDS::Edge( expE.Current() )))
|
||||||
edge = expE.Current();
|
edge = expE.Current();
|
||||||
}
|
}
|
||||||
if ( edge.IsNull() || edge.ShapeType() != TopAbs_EDGE )
|
if ( edge.IsNull() || edge.ShapeType() != TopAbs_EDGE )
|
||||||
@ -1691,7 +1692,7 @@ FindMatchingNodesOnFaces( const TopoDS_Face& face1,
|
|||||||
if ( hasNodesOnEdge )
|
if ( hasNodesOnEdge )
|
||||||
{
|
{
|
||||||
int nbNodeToGet = 1;
|
int nbNodeToGet = 1;
|
||||||
if ( IsClosedEdge( edge1 ) || IsClosedEdge( edge2 ) )
|
if ( helper1.IsClosedEdge( edge1 ) || helper2.IsClosedEdge( edge2 ) )
|
||||||
nbNodeToGet = 2;
|
nbNodeToGet = 2;
|
||||||
for ( int is2 = 0; is2 < 2; ++is2 )
|
for ( int is2 = 0; is2 < 2; ++is2 )
|
||||||
{
|
{
|
||||||
@ -1899,19 +1900,6 @@ FindMatchingNodesOnFaces( const TopoDS_Face& face1,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//================================================================================
|
|
||||||
/*!
|
|
||||||
* \brief Check if the first and last vertices of an edge are the same
|
|
||||||
* \param anEdge - the edge to check
|
|
||||||
* \retval bool - true if same
|
|
||||||
*/
|
|
||||||
//================================================================================
|
|
||||||
|
|
||||||
bool StdMeshers_ProjectionUtils::IsClosedEdge( const TopoDS_Edge& anEdge )
|
|
||||||
{
|
|
||||||
return TopExp::FirstVertex( anEdge ).IsSame( TopExp::LastVertex( anEdge ));
|
|
||||||
}
|
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Return any subshape of a face belonging to the outer wire
|
* \brief Return any subshape of a face belonging to the outer wire
|
||||||
|
@ -158,13 +158,6 @@ class StdMeshers_ProjectionUtils
|
|||||||
SMESH_Mesh* mesh2,
|
SMESH_Mesh* mesh2,
|
||||||
const TShapeShapeMap & assocMap,
|
const TShapeShapeMap & assocMap,
|
||||||
TNodeNodeMap & nodeIn2OutMap);
|
TNodeNodeMap & nodeIn2OutMap);
|
||||||
/*!
|
|
||||||
* \brief Check if the first and last vertices of an edge are the same
|
|
||||||
* \param anEdge - the edge to check
|
|
||||||
* \retval bool - true if same
|
|
||||||
*/
|
|
||||||
static bool IsClosedEdge( const TopoDS_Edge& anEdge );
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Return any subshape of a face belonging to the outer wire
|
* \brief Return any subshape of a face belonging to the outer wire
|
||||||
* \param face - the face
|
* \param face - the face
|
||||||
|
Loading…
Reference in New Issue
Block a user