1 // Created by: Peter KURNEV
2 // Copyright (c) 2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
15 #ifndef _BRepAlgoAPI_BuilderAlgo_HeaderFile
16 #define _BRepAlgoAPI_BuilderAlgo_HeaderFile
18 #include <Standard.hxx>
19 #include <Standard_DefineAlloc.hxx>
20 #include <Standard_Handle.hxx>
22 #include <Standard_Integer.hxx>
23 #include <BOPAlgo_PPaveFiller.hxx>
24 #include <BOPAlgo_PBuilder.hxx>
25 #include <BOPAlgo_GlueEnum.hxx>
26 #include <Standard_Real.hxx>
27 #include <TopTools_ListOfShape.hxx>
28 #include <BRepAlgoAPI_Algo.hxx>
29 #include <Standard_Boolean.hxx>
30 class BOPAlgo_PaveFiller;
35 //! The clsss contains API level of General Fuse algorithm
36 class BRepAlgoAPI_BuilderAlgo : public BRepAlgoAPI_Algo
44 Standard_EXPORT BRepAlgoAPI_BuilderAlgo();
45 Standard_EXPORT virtual ~BRepAlgoAPI_BuilderAlgo();
48 Standard_EXPORT BRepAlgoAPI_BuilderAlgo(const BOPAlgo_PaveFiller& thePF);
50 //! Sets the additional tolerance
51 Standard_EXPORT void SetFuzzyValue (const Standard_Real theFuzz);
53 //! Returns the additional tolerance
54 Standard_EXPORT Standard_Real FuzzyValue() const;
56 //! Sets the flag that defines the mode of treatment.
57 //! In non-destructive mode the argument shapes are not modified. Instead
58 //! a copy of a sub-shape is created in the result if it is needed to be updated.
59 Standard_EXPORT void SetNonDestructive(const Standard_Boolean theFlag);
61 //! Returns the flag that defines the mode of treatment.
62 //! In non-destructive mode the argument shapes are not modified. Instead
63 //! a copy of a sub-shape is created in the result if it is needed to be updated.
64 Standard_EXPORT Standard_Boolean NonDestructive() const;
66 //! Sets the glue option for the algorithm
67 Standard_EXPORT void SetGlue(const BOPAlgo_GlueEnum theGlue);
69 //! Returns the glue option of the algorithm
70 Standard_EXPORT BOPAlgo_GlueEnum Glue() const;
72 //! Sets the arguments
73 Standard_EXPORT void SetArguments (const TopTools_ListOfShape& theLS);
75 //! Gets the arguments
76 Standard_EXPORT const TopTools_ListOfShape& Arguments() const;
78 //! Performs the algorithm
81 Standard_EXPORT virtual void Build() Standard_OVERRIDE;
83 //! Returns the list of shapes modified from the shape <S>.
84 Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& aS) Standard_OVERRIDE;
86 //! Returns true if the shape S has been deleted. The
87 //! result shape of the operation does not contain the shape S.
88 Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& aS) Standard_OVERRIDE;
90 //! Returns the list of shapes generated from the shape <S>.
91 //! For use in BRepNaming.
92 Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE;
94 //! Returns true if there is at least one modified shape.
95 //! For use in BRepNaming.
96 Standard_EXPORT virtual Standard_Boolean HasModified() const;
98 //! Returns true if there is at least one generated shape.
99 //! For use in BRepNaming.
100 Standard_EXPORT virtual Standard_Boolean HasGenerated() const;
102 //! Returns true if there is at least one deleted shape.
103 //! For use in BRepNaming.
105 //! protected methods
106 Standard_EXPORT virtual Standard_Boolean HasDeleted() const;
114 Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
117 Standard_Integer myEntryType;
118 BOPAlgo_PPaveFiller myDSFiller;
119 BOPAlgo_PBuilder myBuilder;
120 Standard_Real myFuzzyValue;
121 Standard_Boolean myNonDestructive;
122 TopTools_ListOfShape myArguments;
123 BOPAlgo_GlueEnum myGlue;
140 #endif // _BRepAlgoAPI_BuilderAlgo_HeaderFile