-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2023 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File: GEOMAlgo_Splitter.hxx
-//
-// Author: Peter KURNEV
#ifndef GEOMAlgo_Splitter_HeaderFile
#define GEOMAlgo_Splitter_HeaderFile
#include <TopoDS_Shape.hxx>
-#include <BOPCol_ListOfShape.hxx>
-#include <BOPCol_MapOfShape.hxx>
-
#include <BOPAlgo_Builder.hxx>
+#include <Basics_OCCTVersion.hxx>
+
//=======================================================================
//class : GEOMAlgo_Splitter
//purpose :
//=======================================================================
-class GEOMAlgo_Splitter : public BOPAlgo_Builder
+/*!
+ * \class GEOMAlgo_Splitter
+ * \ingroup DataAlgo
+ * A class for shapes partitioning
+ */
+ class GEOMAlgo_Splitter : public BOPAlgo_Builder
{
public:
-
- GEOMALGOIMPL_EXPORT
- GEOMAlgo_Splitter();
+ /// Constructor
+ GEOMALGOIMPL_EXPORT GEOMAlgo_Splitter();
- GEOMALGOIMPL_EXPORT
- GEOMAlgo_Splitter(const Handle(NCollection_BaseAllocator)& theAllocator);
+ /// Constructor
+ /// \param theAllocator an allocator object
+ GEOMALGOIMPL_EXPORT GEOMAlgo_Splitter(const Handle(NCollection_BaseAllocator)& theAllocator);
- GEOMALGOIMPL_EXPORT
- virtual ~GEOMAlgo_Splitter();
+ GEOMALGOIMPL_EXPORT virtual ~GEOMAlgo_Splitter();
- GEOMALGOIMPL_EXPORT
- void AddTool(const TopoDS_Shape& theShape);
+ /// Add a tool shape
+ /// \param theShape a tool shape
+ GEOMALGOIMPL_EXPORT void AddTool(const TopoDS_Shape& theShape);
- GEOMALGOIMPL_EXPORT
- const BOPCol_ListOfShape& Tools()const;
+ /// Returns list of tool shapes
+ GEOMALGOIMPL_EXPORT const NCollection_List<TopoDS_Shape>& Tools()const;
- GEOMALGOIMPL_EXPORT
- void SetLimit(const TopAbs_ShapeEnum aLimit);
+ /// Set type of used shapes
+ /// \param aLimit a shape type
+ GEOMALGOIMPL_EXPORT void SetLimit(const TopAbs_ShapeEnum aLimit);
- GEOMALGOIMPL_EXPORT
- TopAbs_ShapeEnum Limit()const;
+ /// Returns defined limit type
+ GEOMALGOIMPL_EXPORT TopAbs_ShapeEnum Limit()const;
- GEOMALGOIMPL_EXPORT
- void SetLimitMode(const Standard_Integer aMode);
+ /// Set mode (0 or 1) of limit
+ /// \param aMode the mode value
+ GEOMALGOIMPL_EXPORT void SetLimitMode(const Standard_Integer aMode);
- GEOMALGOIMPL_EXPORT
- Standard_Integer LimitMode()const;
+ /// Returns mode of limit
+ GEOMALGOIMPL_EXPORT Standard_Integer LimitMode()const;
- GEOMALGOIMPL_EXPORT
- virtual void Clear();
+ /// Clears all tool shapes
+ GEOMALGOIMPL_EXPORT virtual void Clear();
protected:
- GEOMALGOIMPL_EXPORT
- virtual void BuildResult(const TopAbs_ShapeEnum theType);
-
- GEOMALGOIMPL_EXPORT
- virtual void PostTreat();
+ /// Build result.
+ /// \param theType a type of limit
+ GEOMALGOIMPL_EXPORT virtual void BuildResult(const TopAbs_ShapeEnum theType);
+
+ /// Post processing of the calculation
+#if OCC_VERSION_LARGE < 0x07070000
+ GEOMALGOIMPL_EXPORT virtual void PostTreat();
+#else
+ GEOMALGOIMPL_EXPORT virtual void PostTreat(const Message_ProgressRange& theRange);
+#endif
protected:
- BOPCol_ListOfShape myTools;
- BOPCol_MapOfShape myMapTools;
+ /// List of tools
+ NCollection_List<TopoDS_Shape> myTools;
+
+ /// Map of tools
+ NCollection_Map<TopoDS_Shape> myMapTools;
+
+ /// A limit type
TopAbs_ShapeEnum myLimit;
+
+ /// A limit mode
Standard_Integer myLimitMode;
};