1 // Created on: 1994-08-25
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1994-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _BRepTools_Modifier_HeaderFile
18 #define _BRepTools_Modifier_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <TopTools_DataMapOfShapeShape.hxx>
25 #include <TopoDS_Shape.hxx>
26 #include <Standard_Boolean.hxx>
28 #include <Message_ProgressIndicator.hxx>
30 class Standard_NullObject;
31 class Standard_NoSuchObject;
33 class BRepTools_Modification;
34 class Message_ProgressIndicator;
37 //! Performs geometric modifications on a shape.
38 class BRepTools_Modifier
45 //! Creates an empty Modifier.
46 Standard_EXPORT BRepTools_Modifier();
48 //! Creates a modifier on the shape <S>.
49 Standard_EXPORT BRepTools_Modifier(const TopoDS_Shape& S);
51 //! Creates a modifier on the shape <S>, and performs
52 //! the modifications described by <M>.
53 Standard_EXPORT BRepTools_Modifier(const TopoDS_Shape& S, const Handle(BRepTools_Modification)& M);
55 //! Initializes the modifier with the shape <S>.
56 Standard_EXPORT void Init (const TopoDS_Shape& S);
58 //! Performs the modifications described by <M>.
59 Standard_EXPORT void Perform (const Handle(BRepTools_Modification)& M, const Handle(Message_ProgressIndicator)& aProgress = NULL);
61 //! Returns Standard_True if the modification has
62 //! been computed successfully.
63 Standard_Boolean IsDone() const;
65 //! Returns the modified shape corresponding to <S>.
66 const TopoDS_Shape& ModifiedShape (const TopoDS_Shape& S) const;
80 Standard_EXPORT void Put (const TopoDS_Shape& S);
82 Standard_EXPORT Standard_Boolean Rebuild (const TopoDS_Shape& S, const Handle(BRepTools_Modification)& M, const Handle(Message_ProgressIndicator)& aProgress = NULL);
85 TopTools_DataMapOfShapeShape myMap;
87 Standard_Boolean myDone;
93 #include <BRepTools_Modifier.lxx>
99 #endif // _BRepTools_Modifier_HeaderFile