1 // Created on: 2001-05-03
2 // Created by: Igor FEOKTISTOV
3 // Copyright (c) 2001-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _QANewModTopOpe_Limitation_HeaderFile
17 #define _QANewModTopOpe_Limitation_HeaderFile
19 #include <Standard.hxx>
20 #include <Standard_DefineAlloc.hxx>
21 #include <Standard_Handle.hxx>
23 #include <TopoDS_Shape.hxx>
24 #include <QANewModTopOpe_CutPtr.hxx>
25 #include <QANewModTopOpe_CommonPtr.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <QANewModTopOpe_ModeOfLimitation.hxx>
28 #include <BRepBuilderAPI_MakeShape.hxx>
29 #include <TopTools_ListOfShape.hxx>
33 //! provides cutting shape by face or shell;
34 class QANewModTopOpe_Limitation : public BRepBuilderAPI_MakeShape
41 //! initializes and fills data structure for cutting and
42 //! makes cutting according to orientation theCutTool and
44 //! if theCutTool is not face or shell does nothing.
45 Standard_EXPORT QANewModTopOpe_Limitation(const TopoDS_Shape& theObjectToCut, const TopoDS_Shape& theCutTool, const QANewModTopOpe_ModeOfLimitation theMode = QANewModTopOpe_Forward);
47 //! makes cutting according to orientation theCutTool
48 //! and current value of myMode. Does nothing if
49 //! result already exists.
50 Standard_EXPORT void Cut();
52 Standard_EXPORT void SetMode (const QANewModTopOpe_ModeOfLimitation theMode);
54 Standard_EXPORT QANewModTopOpe_ModeOfLimitation GetMode() const;
56 //! Returns the first shape.
57 Standard_EXPORT const TopoDS_Shape& Shape1() const;
59 //! Returns the second shape.
60 Standard_EXPORT const TopoDS_Shape& Shape2() const;
62 //! Returns the list of shapes modified from the shape
64 Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& S) Standard_OVERRIDE;
66 //! Returns the list of shapes generated from the shape <S>.
67 //! For use in BRepNaming.
68 Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE;
70 //! Returns true if there is at least one modified shape.
71 //! For use in BRepNaming.
72 Standard_EXPORT virtual Standard_Boolean HasModified() const;
74 //! Returns true if there is at least one generated shape.
75 //! For use in BRepNaming.
76 Standard_EXPORT virtual Standard_Boolean HasGenerated() const;
78 //! Returns true if there is at least one deleted shape.
79 //! For use in BRepNaming.
80 Standard_EXPORT virtual Standard_Boolean HasDeleted() const;
82 Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& S) Standard_OVERRIDE;
84 Standard_EXPORT ~QANewModTopOpe_Limitation();
90 TopoDS_Shape myResultFwd;
91 TopoDS_Shape myResultRvs;
92 TopoDS_Shape myObjectToCut;
93 TopoDS_Shape myCutTool;
94 QANewModTopOpe_CutPtr myCut;
95 QANewModTopOpe_CommonPtr myCommon;
96 Standard_Boolean myFwdIsDone;
97 Standard_Boolean myRevIsDone;
98 QANewModTopOpe_ModeOfLimitation myMode;
109 #endif // _QANewModTopOpe_Limitation_HeaderFile