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() ) {}
+};
// ============================================================
/*!
SMESHDS_Mesh * aMesh);
// 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
*/
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
//purpose : Check mesh without geometry for: if all elements on this shape are quadratic,
const SMESH_Mesh& mesh,
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 INSTANCE METHODS ----------