0028567: Get rid of the unused DRAW commands based on old Boolean Operations (BRepAlgo)
[occt.git] / src / QANewBRepNaming / QANewBRepNaming_BooleanOperation.hxx
CommitLineData
e45b5ff7 1// Created on: 1999-09-27
2// Created by: Open CASCADE Support
3// Copyright (c) 1999-1999 Matra Datavision
42cf5bc1 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 _QANewBRepNaming_BooleanOperation_HeaderFile
18#define _QANewBRepNaming_BooleanOperation_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <QANewBRepNaming_TopNaming.hxx>
e45b5ff7 25#include <Standard_Boolean.hxx>
26#include <TopAbs_ShapeEnum.hxx>
42cf5bc1 27class TDF_Label;
e45b5ff7 28class BRepAlgoAPI_BooleanOperation;
29class TopoDS_Shape;
42cf5bc1 30
31
32//! To load the BooleanOperation results
33class QANewBRepNaming_BooleanOperation : public QANewBRepNaming_TopNaming
34{
35public:
36
37 DEFINE_STANDARD_ALLOC
38
39
e45b5ff7 40 Standard_EXPORT void Init (const TDF_Label& ResultLabel);
42cf5bc1 41
e45b5ff7 42 //! Returns the label to insert modified faces of an Object.
43 Standard_EXPORT TDF_Label ModifiedFaces() const;
42cf5bc1 44
e45b5ff7 45 //! Returns the label to insert modified edges of an Object.
46 Standard_EXPORT TDF_Label ModifiedEdges() const;
47
48 //! Returns the label to insert deleted faces of an Object.
49 Standard_EXPORT TDF_Label DeletedFaces() const;
50
51 //! Returns the label to insert deleted edges of an Object.
52 Standard_EXPORT TDF_Label DeletedEdges() const;
42cf5bc1 53
e45b5ff7 54 //! Returns the label to insert deleted vertices of an Object.
55 Standard_EXPORT TDF_Label DeletedVertices() const;
42cf5bc1 56
e45b5ff7 57 //! Returns the label to insert added shapes to an Object
58 //! (given from tool).
59 Standard_EXPORT TDF_Label NewShapes() const;
42cf5bc1 60
e45b5ff7 61 Standard_EXPORT TDF_Label Content() const;
42cf5bc1 62
e45b5ff7 63 Standard_EXPORT TDF_Label DeletedDegeneratedEdges() const;
42cf5bc1 64
e45b5ff7 65 //! Returns true if the result is not the same as the object shape.
66 Standard_EXPORT Standard_Boolean IsResultChanged (BRepAlgoAPI_BooleanOperation& MakeShape) const;
42cf5bc1 67
e45b5ff7 68 //! If the shape is a compound the method
69 //! returns the underlying shape type.
70 Standard_EXPORT static TopAbs_ShapeEnum ShapeType (const TopoDS_Shape& theShape);
71
72 //! Returns true if workaround case identified
73 Standard_EXPORT static Standard_Boolean IsWRCase (const BRepAlgoAPI_BooleanOperation& theMS);
74
75 //! Returns true if workaround case identified
76 Standard_EXPORT static Standard_Boolean IsWRCase2 (BRepAlgoAPI_BooleanOperation& MS);
42cf5bc1 77
78
79
80
81protected:
82
e45b5ff7 83
84 Standard_EXPORT QANewBRepNaming_BooleanOperation();
85
86 Standard_EXPORT QANewBRepNaming_BooleanOperation(const TDF_Label& ResultLabel);
87
88 //! If the shape is a compound the method
89 //! returns the underlying shape.
90 Standard_EXPORT TopoDS_Shape GetShape (const TopoDS_Shape& theShape) const;
91
92 //! A default implementation for naming of a wire as an object of
93 //! a boolean operation.
94 Standard_EXPORT void LoadWire (BRepAlgoAPI_BooleanOperation& MakeShape) const;
95
96 //! A default implementation for naming of a shell as an object of
97 //! a boolean operation.
98 Standard_EXPORT void LoadShell (BRepAlgoAPI_BooleanOperation& MakeShape) const;
99
100 //! Loads the content of the result.
101 Standard_EXPORT void LoadContent (BRepAlgoAPI_BooleanOperation& MakeShape) const;
102
103 //! Loads the result.
104 Standard_EXPORT void LoadResult (BRepAlgoAPI_BooleanOperation& MakeShape) const;
105
106 //! Loads the deletion of the degenerated edges.
107 Standard_EXPORT void LoadDegenerated (BRepAlgoAPI_BooleanOperation& MakeShape) const;
108
109 //! To process special cases with evolution 1 to n
110 Standard_EXPORT void LoadModified1n (BRepAlgoAPI_BooleanOperation& theMS, const TopoDS_Shape& theShapeIn, const TopAbs_ShapeEnum theKindOfShape) const;
111
112 //! To process special cases with evolution 1 to 1
113 Standard_EXPORT void LoadModified11 (BRepAlgoAPI_BooleanOperation& theMS, const TopoDS_Shape& theShapeIn, const TopAbs_ShapeEnum theKindOfShape) const;
114
115 //! To process special case when result has symmetrical edges
116 Standard_EXPORT void LoadSymmetricalEdges (BRepAlgoAPI_BooleanOperation& theMS) const;
117
118 Standard_EXPORT void LoadWRCase (BRepAlgoAPI_BooleanOperation& theMS) const;
42cf5bc1 119
120
121
122
123private:
124
e45b5ff7 125
126 //! used inside LoadModified1n
127 Standard_EXPORT void Load1nFaces (BRepAlgoAPI_BooleanOperation& theMS, const TopoDS_Shape& theShapeIn) const;
42cf5bc1 128
129
130
131
132};
133
134
135
136
137
138
139
140#endif // _QANewBRepNaming_BooleanOperation_HeaderFile