0026583: Eliminate compile warnings obtained by building occt with vc14: declaration...
[occt.git] / src / BRepFeat / BRepFeat_SplitShape.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-09-04
2// Created by: Jacques GOUSSARD
3// Copyright (c) 1995-1999 Matra Datavision
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 _BRepFeat_SplitShape_HeaderFile
18#define _BRepFeat_SplitShape_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <LocOpe_Spliter.hxx>
25#include <BRepBuilderAPI_MakeShape.hxx>
26#include <Standard_Boolean.hxx>
27#include <TopTools_ListOfShape.hxx>
28class LocOpe_WiresOnShape;
29class StdFail_NotDone;
30class Standard_ConstructionError;
31class Standard_NoSuchObject;
32class TopoDS_Shape;
33class TopoDS_Wire;
34class TopoDS_Face;
35class TopoDS_Edge;
36class TopoDS_Compound;
37
38
39//! One of the most significant aspects of BRepFeat functionality is the use of local
40//! operations as opposed to global ones. In a global operation, you would first construct a
41//! form of the type you wanted in your final feature, and then remove matter so that it could
42//! fit into your initial basis object. In a local operation, however, you specify the domain of
43//! the feature construction with aspects of the shape on which the feature is being created.
44//! These semantics are expressed in terms of a member shape of the basis shape from which -
45//! or up to which - matter will be added or removed. As a result, local operations make
46//! calculations simpler and faster than global operations.
47//! In BRepFeat, the semantics of local operations define features constructed from a contour or a
48//! part of the basis shape referred to as the tool. In a SplitShape object, wires or edges of a
49//! face in the basis shape to be used as a part of the feature are cut out and projected to a plane
50//! outside or inside the basis shape. By rebuilding the initial shape incorporating the edges and
51//! the faces of the tool, protrusion or depression features can be constructed.
52class BRepFeat_SplitShape : public BRepBuilderAPI_MakeShape
53{
54public:
55
56 DEFINE_STANDARD_ALLOC
57
58
59 //! Empty constructor
60 BRepFeat_SplitShape();
61
62 //! Creates the process with the shape <S>.
63 BRepFeat_SplitShape(const TopoDS_Shape& S);
64
65 //! Initializes the process on the shape <S>.
66 void Init (const TopoDS_Shape& S);
67
68 //! Set the flag of check internal intersections
69 //! default value is True (to check)
70 void SetCheckInterior (const Standard_Boolean ToCheckInterior);
71
72 //! Adds the wire <W> on the face <F>.
73 //! Raises NoSuchObject if <F> does not belong to the original shape.
74 void Add (const TopoDS_Wire& W, const TopoDS_Face& F);
75
76 //! Adds the edge <E> on the face <F>.
77 void Add (const TopoDS_Edge& E, const TopoDS_Face& F);
78
79 //! Adds the compound <Comp> on the face <F>. The
80 //! compound <Comp> must consist of edges lying on the
81 //! face <F>. If edges are geometrically connected,
82 //! they must be connected topologically, i.e. they
83 //! must share common vertices.
84 //!
85 //! Raises NoSuchObject if <F> does not belong to the original shape.
86 void Add (const TopoDS_Compound& Comp, const TopoDS_Face& F);
87
88 //! Adds the edge <E> on the existing edge <EOn>.
89 void Add (const TopoDS_Edge& E, const TopoDS_Edge& EOn);
90
91 //! Returns the faces which are the left of the
92 //! projected wires.
93 Standard_EXPORT const TopTools_ListOfShape& DirectLeft() const;
94
95 //! Returns the faces of the "left" part on the shape.
96 //! (It is build from DirectLeft, with the faces
97 //! connected to this set, and so on...).
98 //! Raises NotDone if IsDone returns <Standard_False>.
99 Standard_EXPORT const TopTools_ListOfShape& Left() const;
100
101 //! Builds the cut and the resulting faces and edges as well.
102 Standard_EXPORT void Build() Standard_OVERRIDE;
103
104 //! Returns true if the shape has been deleted.
105 Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& S) Standard_OVERRIDE;
106
107 //! Returns the list of generated Faces.
108 Standard_EXPORT const TopTools_ListOfShape& Modified (const TopoDS_Shape& F) Standard_OVERRIDE;
109
110
111
112
113protected:
114
115
116
117
118
119private:
120
121
122
123 LocOpe_Spliter mySShape;
124 Handle(LocOpe_WiresOnShape) myWOnShape;
125
126
127};
128
129
130#include <BRepFeat_SplitShape.lxx>
131
132
133
134
135
136#endif // _BRepFeat_SplitShape_HeaderFile