mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-16 04:11:26 +05:00
+//=======================================================================
+/*! + * \brief SMESH_TLink knowing its orientation + */ +//======================================================================= + +struct SMESH_OrientedLink: public SMESH_TLink +{ + bool _reversed; + SMESH_OrientedLink(const SMDS_MeshNode* n1, const SMDS_MeshNode* n2 ) + : SMESH_TLink( n1, n2 ), _reversed( n1 != node1() ) {} +};
This commit is contained in:
parent
22395fddea
commit
8baf98a974
@ -109,6 +109,18 @@ struct SMESH_TLink: public NLink
|
|||||||
const SMDS_MeshNode* node2() const { return second; }
|
const SMDS_MeshNode* node2() const { return second; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
/*!
|
||||||
|
* \brief SMESH_TLink knowing its orientation
|
||||||
|
*/
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
struct SMESH_OrientedLink: public SMESH_TLink
|
||||||
|
{
|
||||||
|
bool _reversed;
|
||||||
|
SMESH_OrientedLink(const SMDS_MeshNode* n1, const SMDS_MeshNode* n2 )
|
||||||
|
: SMESH_TLink( n1, n2 ), _reversed( n1 != node1() ) {}
|
||||||
|
};
|
||||||
|
|
||||||
// ============================================================
|
// ============================================================
|
||||||
/*!
|
/*!
|
||||||
@ -540,6 +552,11 @@ public:
|
|||||||
SMESHDS_Mesh * aMesh);
|
SMESHDS_Mesh * aMesh);
|
||||||
// replace elemToRm by elemToAdd in the all groups
|
// replace elemToRm by elemToAdd in the all groups
|
||||||
|
|
||||||
|
// static void ReplaceElemInGroups (const SMDS_MeshElement* elemToRm,
|
||||||
|
// const std::vector<const SMDS_MeshElement*>& elemToAdd,
|
||||||
|
// SMESHDS_Mesh * aMesh);
|
||||||
|
// replace elemToRm by elemToAdd in the all groups
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Return nodes linked to the given one in elements of the type
|
* \brief Return nodes linked to the given one in elements of the type
|
||||||
*/
|
*/
|
||||||
|
@ -1366,6 +1366,27 @@ int SMESH_MesherHelper::NbAncestors(const TopoDS_Shape& shape,
|
|||||||
return ancestors.Extent();
|
return ancestors.Extent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetSubShapeOri
|
||||||
|
//purpose : Return orientation of sub-shape in the main shape
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
TopAbs_Orientation SMESH_MesherHelper::GetSubShapeOri(const TopoDS_Shape& shape,
|
||||||
|
const TopoDS_Shape& subShape)
|
||||||
|
{
|
||||||
|
TopAbs_Orientation ori = TopAbs_Orientation(-1);
|
||||||
|
if ( !shape.IsNull() && !subShape.IsNull() )
|
||||||
|
{
|
||||||
|
TopExp_Explorer e( shape, subShape.ShapeType() );
|
||||||
|
for ( ; e.More(); e.Next())
|
||||||
|
if ( subShape.IsSame( e.Current() ))
|
||||||
|
break;
|
||||||
|
if ( e.More() )
|
||||||
|
ori = e.Current().Orientation();
|
||||||
|
}
|
||||||
|
return ori;
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//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,
|
||||||
|
@ -113,6 +113,12 @@ public:
|
|||||||
const SMESH_Mesh& mesh,
|
const SMESH_Mesh& mesh,
|
||||||
TopAbs_ShapeEnum ancestorType=TopAbs_SHAPE);
|
TopAbs_ShapeEnum ancestorType=TopAbs_SHAPE);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Return orientation of sub-shape in the main shape
|
||||||
|
*/
|
||||||
|
static TopAbs_Orientation GetSubShapeOri(const TopoDS_Shape& shape,
|
||||||
|
const TopoDS_Shape& subShape);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// ---------- PUBLIC INSTANCE METHODS ----------
|
// ---------- PUBLIC INSTANCE METHODS ----------
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user