mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-22 02:15:38 +05:00
Move from StdMeshers_ProjectionUtils
+ static bool IsSubShape( const TopoDS_Shape& shape, const TopoDS_Shape& mainShape ); + + static bool IsSubShape( const TopoDS_Shape& shape, SMESH_Mesh* aMesh );
This commit is contained in:
parent
3a82c6685b
commit
8951a46238
@ -1451,6 +1451,42 @@ TopAbs_Orientation SMESH_MesherHelper::GetSubShapeOri(const TopoDS_Shape& shape,
|
|||||||
return ori;
|
return ori;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : IsSubShape
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
bool SMESH_MesherHelper::IsSubShape( const TopoDS_Shape& shape,
|
||||||
|
const TopoDS_Shape& mainShape )
|
||||||
|
{
|
||||||
|
if ( !shape.IsNull() && !mainShape.IsNull() )
|
||||||
|
{
|
||||||
|
for ( TopExp_Explorer exp( mainShape, shape.ShapeType());
|
||||||
|
exp.More();
|
||||||
|
exp.Next() )
|
||||||
|
if ( shape.IsSame( exp.Current() ))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
SCRUTE((shape.IsNull()));
|
||||||
|
SCRUTE((mainShape.IsNull()));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : IsSubShape
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
bool SMESH_MesherHelper::IsSubShape( const TopoDS_Shape& shape, SMESH_Mesh* aMesh )
|
||||||
|
{
|
||||||
|
if ( shape.IsNull() || !aMesh )
|
||||||
|
return false;
|
||||||
|
return
|
||||||
|
aMesh->GetMeshDS()->ShapeToIndex( shape ) ||
|
||||||
|
// PAL16202
|
||||||
|
shape.ShapeType() == TopAbs_COMPOUND && aMesh->GetMeshDS()->IsGroupOfSubShapes( shape );
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : IsQuadraticMesh
|
//function : IsQuadraticMesh
|
||||||
//purpose : Check mesh without geometry for: if all elements on this shape are quadratic,
|
//purpose : Check mesh without geometry for: if all elements on this shape are quadratic,
|
||||||
|
@ -134,6 +134,11 @@ public:
|
|||||||
static TopAbs_Orientation GetSubShapeOri(const TopoDS_Shape& shape,
|
static TopAbs_Orientation GetSubShapeOri(const TopoDS_Shape& shape,
|
||||||
const TopoDS_Shape& subShape);
|
const TopoDS_Shape& subShape);
|
||||||
|
|
||||||
|
static bool IsSubShape( const TopoDS_Shape& shape, const TopoDS_Shape& mainShape );
|
||||||
|
|
||||||
|
static bool IsSubShape( const TopoDS_Shape& shape, SMESH_Mesh* aMesh );
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// ---------- PUBLIC INSTANCE METHODS ----------
|
// ---------- PUBLIC INSTANCE METHODS ----------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user