1 // Created on: 1996-01-12 2 // Created by: Jacques GOUSSARD 3 // Copyright (c) 1996-1999 Matra Datavision 4 // Copyright (c) 1999-2014 OPEN CASCADE SAS 5 // 6 // This file is part of Open CASCADE Technology software library. 7 // 8 // This library is free software; you can redistribute it and/or modify it under 9 // the terms of the GNU Lesser General Public License version 2.1 as published 10 // by the Free Software Foundation, with special exception defined in the file 11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 12 // distribution for complete text of the license and disclaimer of any warranty. 13 // 14 // Alternatively, this file may be used under the terms of Open CASCADE 15 // commercial license or contractual agreement. 16 17 #ifndef _LocOpe_Spliter_HeaderFile 18 #define _LocOpe_Spliter_HeaderFile 19 20 #include <Standard.hxx> 21 #include <Standard_DefineAlloc.hxx> 22 #include <Standard_Handle.hxx> 23 24 #include <TopoDS_Shape.hxx> 25 #include <Standard_Boolean.hxx> 26 #include <TopTools_DataMapOfShapeListOfShape.hxx> 27 #include <TopTools_ListOfShape.hxx> 28 class StdFail_NotDone; 29 class Standard_NullObject; 30 class Standard_NoSuchObject; 31 class TopoDS_Shape; 32 class LocOpe_WiresOnShape; 33 34 35 36 class LocOpe_Spliter 37 { 38 public: 39 40 DEFINE_STANDARD_ALLOC 41 42 43 //! Empty constructor. 44 LocOpe_Spliter(); 45 46 //! Creates the algorithm on the shape <S>. 47 LocOpe_Spliter(const TopoDS_Shape& S); 48 49 //! Initializes the algorithm on the shape <S>. 50 void Init (const TopoDS_Shape& S); 51 52 Standard_EXPORT void Perform (const Handle(LocOpe_WiresOnShape)& PW); 53 54 Standard_Boolean IsDone() const; 55 56 //! Returns the new shape 57 const TopoDS_Shape& ResultingShape() const; 58 59 //! Returns the initial shape 60 const TopoDS_Shape& Shape() const; 61 62 //! Returns the faces which are the left of the 63 //! projected wires and which are 64 Standard_EXPORT const TopTools_ListOfShape& DirectLeft() const; 65 66 //! Returns the faces of the "left" part on the shape. 67 //! (It is build from DirectLeft, with the faces 68 //! connected to this set, and so on...). 69 Standard_EXPORT const TopTools_ListOfShape& Left() const; 70 71 //! Returns the list of descendant shapes of <S>. 72 Standard_EXPORT const TopTools_ListOfShape& DescendantShapes (const TopoDS_Shape& S); 73 74 75 76 77 protected: 78 79 80 81 82 83 private: 84 85 86 87 TopoDS_Shape myShape; 88 Standard_Boolean myDone; 89 TopoDS_Shape myRes; 90 TopTools_DataMapOfShapeListOfShape myMap; 91 TopTools_ListOfShape myDLeft; 92 TopTools_ListOfShape myLeft; 93 94 95 }; 96 97 98 #include <LocOpe_Spliter.lxx> 99 100 101 102 103 104 #endif // _LocOpe_Spliter_HeaderFile 105