0026619: Tolerances of operands are modified using bop
[occt.git] / src / BRepAlgoAPI / BRepAlgoAPI_BuilderAlgo.hxx
CommitLineData
42cf5bc1 1// Created by: Peter KURNEV
2// Copyright (c) 2014 OPEN CASCADE SAS
3//
4// This file is part of Open CASCADE Technology software library.
5//
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.
11//
12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
14
15#ifndef _BRepAlgoAPI_BuilderAlgo_HeaderFile
16#define _BRepAlgoAPI_BuilderAlgo_HeaderFile
17
18#include <Standard.hxx>
19#include <Standard_DefineAlloc.hxx>
20#include <Standard_Handle.hxx>
21
22#include <Standard_Integer.hxx>
23#include <BOPAlgo_PPaveFiller.hxx>
24#include <BOPAlgo_PBuilder.hxx>
25#include <Standard_Real.hxx>
26#include <TopTools_ListOfShape.hxx>
27#include <BRepAlgoAPI_Algo.hxx>
28#include <Standard_Boolean.hxx>
29class BOPAlgo_PaveFiller;
30class TopoDS_Shape;
31
32
33
34//! The clsss contains API level of General Fuse algorithm
35class BRepAlgoAPI_BuilderAlgo : public BRepAlgoAPI_Algo
36{
37public:
38
39 DEFINE_STANDARD_ALLOC
40
41
42 //! Empty constructor
43 Standard_EXPORT BRepAlgoAPI_BuilderAlgo();
44Standard_EXPORT virtual ~BRepAlgoAPI_BuilderAlgo();
45
46 //! Empty constructor
47 Standard_EXPORT BRepAlgoAPI_BuilderAlgo(const BOPAlgo_PaveFiller& thePF);
48
49 //! Sets the additional tolerance
50 Standard_EXPORT void SetFuzzyValue (const Standard_Real theFuzz);
51
52 //! Returns the additional tolerance
53 Standard_EXPORT Standard_Real FuzzyValue() const;
3510db62 54
55 //! Sets the flag that defines the mode of treatment.
56 //! In non-destructive mode the argument shapes are not modified. Instead
57 //! a copy of a sub-shape is created in the result if it is needed to be updated.
58 Standard_EXPORT void SetNonDestructive(const Standard_Boolean theFlag);
59
60 //! Returns the flag that defines the mode of treatment.
61 //! In non-destructive mode the argument shapes are not modified. Instead
62 //! a copy of a sub-shape is created in the result if it is needed to be updated.
63 Standard_EXPORT Standard_Boolean NonDestructive() const;
64
42cf5bc1 65 //! Sets the arguments
66 Standard_EXPORT void SetArguments (const TopTools_ListOfShape& theLS);
67
68 //! Gets the arguments
69 Standard_EXPORT const TopTools_ListOfShape& Arguments() const;
70
71 //! Performs the algorithm
72 //!
73 //! H I S T O R Y
74 Standard_EXPORT virtual void Build() Standard_OVERRIDE;
75
76 //! Returns the list of shapes modified from the shape <S>.
77 Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& aS) Standard_OVERRIDE;
78
79 //! Returns true if the shape S has been deleted. The
80 //! result shape of the operation does not contain the shape S.
81 Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& aS) Standard_OVERRIDE;
82
83 //! Returns the list of shapes generated from the shape <S>.
84 //! For use in BRepNaming.
85 Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE;
86
87 //! Returns true if there is at least one modified shape.
88 //! For use in BRepNaming.
89 Standard_EXPORT virtual Standard_Boolean HasModified() const;
90
91 //! Returns true if there is at least one generated shape.
92 //! For use in BRepNaming.
93 Standard_EXPORT virtual Standard_Boolean HasGenerated() const;
94
95 //! Returns true if there is at least one deleted shape.
96 //! For use in BRepNaming.
97 //!
98 //! protected methods
99 Standard_EXPORT virtual Standard_Boolean HasDeleted() const;
100
101
102
103
104protected:
105
106
107 Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
108
109
110 Standard_Integer myEntryType;
111 BOPAlgo_PPaveFiller myDSFiller;
112 BOPAlgo_PBuilder myBuilder;
113 Standard_Real myFuzzyValue;
3510db62 114 Standard_Boolean myNonDestructive;
42cf5bc1 115 TopTools_ListOfShape myArguments;
116
117
118private:
119
120
121
122
123
124};
125
126
127
128
129
130
131
132#endif // _BRepAlgoAPI_BuilderAlgo_HeaderFile