0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / BRepFeat / BRepFeat_RibSlot.hxx
1 // Created on: 1997-10-08
2 // Created by: Olga KOULECHOVA
3 // Copyright (c) 1997-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_RibSlot_HeaderFile
18 #define _BRepFeat_RibSlot_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <gp_Pnt.hxx>
25 #include <TopTools_DataMapOfShapeListOfShape.hxx>
26 #include <TopoDS_Shape.hxx>
27 #include <BRepFeat_PerfSelection.hxx>
28 #include <TopoDS_Wire.hxx>
29 #include <TopoDS_Face.hxx>
30 #include <TopTools_DataMapOfShapeShape.hxx>
31 #include <TopTools_ListOfShape.hxx>
32 #include <BRepFeat_StatusError.hxx>
33 #include <BRepBuilderAPI_MakeShape.hxx>
34 #include <Standard_Integer.hxx>
35 class TopoDS_Edge;
36 class Geom_Plane;
37 class gp_Dir;
38 class Geom_Curve;
39 class TopoDS_Vertex;
40 class LocOpe_Gluer;
41 class BRepAlgoAPI_BooleanOperation;
42
43
44 //! Provides functions to build mechanical features.
45 //! Mechanical features include ribs - protrusions and grooves (or slots) - depressions along
46 //! planar (linear) surfaces or revolution surfaces. The semantics of mechanical features is built
47 //! around giving thickness to a contour. This thickness can either be unilateral - on one side
48 //! of the contour - or bilateral - on both sides.
49 //! As in the semantics of form features, the thickness is defined by construction of shapes
50 //! in specific contexts. The development contexts differ, however,in case of mechanical features.
51 //! Here they include extrusion:
52 //! -   to a limiting face of the basis shape
53 //! -   to or from a limiting plane
54 //! -   to a height.
55 class BRepFeat_RibSlot  : public BRepBuilderAPI_MakeShape
56 {
57 public:
58
59   DEFINE_STANDARD_ALLOC
60
61   
62   //! Returns true if F a TopoDS_Shape of type edge or face has been deleted.
63   Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& F) Standard_OVERRIDE;
64   
65   //! Returns the list of generated Faces F. This list may be empty.
66   Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& F) Standard_OVERRIDE;
67   
68   //! Returns a list TopTools_ListOfShape of the faces S created in the shape.
69   Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE;
70   
71   //! Returns the list  of shapes created  at the bottom  of
72   //! the created form.  It may be an empty list.
73   Standard_EXPORT const TopTools_ListOfShape& FirstShape() const;
74   
75   //! Returns  the list of shapes  created at the top of the
76   //! created form.  It may be an empty list.
77   Standard_EXPORT const TopTools_ListOfShape& LastShape() const;
78   
79   //! Returns a list of the limiting and glueing faces
80   //! generated by the feature. These faces did not originally exist in the basis shape.
81   //! The list provides the information necessary for
82   //! subsequent addition of a draft to a face. It may be an empty list.
83   //! If a face has tangent edges, no draft is possible, and the tangent edges must
84   //! subsequently be removed if you want to add a draft to the face.
85   Standard_EXPORT const TopTools_ListOfShape& FacesForDraft() const;
86   
87   //! Returns a list of the limiting and glueing edges
88   //! generated by the feature. These edges did not originally exist in the basis shape.
89   //! The list provides the information necessary for
90   //! subsequent addition of fillets. It may be an empty list.
91   Standard_EXPORT const TopTools_ListOfShape& NewEdges() const;
92   
93   //! Returns a list of the tangent edges among the
94   //! limiting and glueing edges generated by the
95   //! feature. These edges did not originally exist in
96   //! the basis shape and are tangent to the face
97   //! against which the feature is built.
98   //! The list provides the information necessary for
99   //! subsequent addition of fillets. It may be an empty list.
100   //! If an edge is tangent, no fillet is possible, and
101   //! the edge must subsequently be removed if you want to add a fillet.
102   Standard_EXPORT const TopTools_ListOfShape& TgtEdges() const;
103   
104   Standard_EXPORT static Standard_Real IntPar (const Handle(Geom_Curve)& C, const gp_Pnt& P);
105   
106   Standard_EXPORT static TopoDS_Face ChoiceOfFaces (TopTools_ListOfShape& faces, const Handle(Geom_Curve)& cc, const Standard_Real par, const Standard_Real bnd, const Handle(Geom_Plane)& Pln);
107   
108   Standard_EXPORT BRepFeat_StatusError CurrentStatusError() const;
109
110
111
112
113 protected:
114
115   
116   //! Redefines the empty constructor.
117     BRepFeat_RibSlot();
118   
119   //! General perform method...
120   Standard_EXPORT void LFPerform();
121   
122   Standard_EXPORT gp_Pnt CheckPoint (const TopoDS_Edge& e, const Standard_Real bnd, const Handle(Geom_Plane)& Pln);
123   
124   Standard_EXPORT gp_Dir Normal (const TopoDS_Face& F, const gp_Pnt& P);
125   
126   Standard_EXPORT void EdgeExtention (TopoDS_Edge& e, const Standard_Real bnd, const Standard_Boolean FirstLast);
127   
128   Standard_EXPORT Standard_Real HeightMax (const TopoDS_Shape& theSbase, const TopoDS_Shape& theSUntil, gp_Pnt& p1, gp_Pnt& p2);
129   
130   Standard_EXPORT Standard_Boolean ExtremeFaces (const Standard_Boolean RevolRib, const Standard_Real bnd, const Handle(Geom_Plane)& Pln, TopoDS_Edge& FirstEdge, TopoDS_Edge& LastEdge, TopoDS_Face& FirstFace, TopoDS_Face& LastFace, TopoDS_Vertex& FirstVertex, TopoDS_Vertex& LastVertex, Standard_Boolean& OnFirstFace, Standard_Boolean& OnLastFace, Standard_Boolean& PtOnFirstEdge, Standard_Boolean& PtOnLastEdge, TopoDS_Edge& OnFirstEdge, TopoDS_Edge& OnLastEdge);
131   
132   Standard_EXPORT void PtOnEdgeVertex (const Standard_Boolean RevolRib, const TopoDS_Shape& shape, const gp_Pnt& point, const TopoDS_Vertex& FirstVertex, const TopoDS_Vertex& LastVertex, Standard_Boolean& PtOnEdge, TopoDS_Edge& OnEdge, Standard_Boolean& PtOnVertex, TopoDS_Vertex& OnVertex);
133   
134   Standard_EXPORT Standard_Boolean SlidingProfile (TopoDS_Face& Prof, const Standard_Boolean RevolRib, const Standard_Real myTol, Standard_Integer& Concavite, const Handle(Geom_Plane)& myPln, const TopoDS_Face& BndFace, const gp_Pnt& CheckPnt, const TopoDS_Face& FirstFace, const TopoDS_Face& LastFace, const TopoDS_Vertex& FirstVertex, const TopoDS_Vertex& LastVertex, const TopoDS_Edge& FirstEdge, const TopoDS_Edge& LastEdge);
135   
136   Standard_EXPORT Standard_Boolean NoSlidingProfile (TopoDS_Face& Prof, const Standard_Boolean RevolRib, const Standard_Real myTol, Standard_Integer& Concavite, const Handle(Geom_Plane)& myPln, const Standard_Real bnd, const TopoDS_Face& BndFace, const gp_Pnt& CheckPnt, const TopoDS_Face& FirstFace, const TopoDS_Face& LastFace, const TopoDS_Vertex& FirstVertex, const TopoDS_Vertex& LastVertex, const TopoDS_Edge& FirstEdge, const TopoDS_Edge& LastEdge, const Standard_Boolean OnFirstFace, const Standard_Boolean OnLastFace);
137   
138   //! Updates the data structures of descendant
139   //! shapes during the glueing operation.Returns the modified, generated
140   //! and deleted faces during the course of the glueing operation.
141   Standard_EXPORT void UpdateDescendants (const LocOpe_Gluer& G);
142   
143   Standard_EXPORT void UpdateDescendants (const BRepAlgoAPI_BooleanOperation& aBOP, const TopoDS_Shape& SResult, const Standard_Boolean SkipFace = Standard_False);
144
145
146   gp_Pnt myFirstPnt;
147   gp_Pnt myLastPnt;
148   Standard_Boolean myFuse;
149   Standard_Boolean mySliding;
150   TopTools_DataMapOfShapeListOfShape myMap;
151   TopTools_DataMapOfShapeListOfShape myLFMap;
152   TopoDS_Shape myFShape;
153   TopoDS_Shape myLShape;
154   BRepFeat_PerfSelection myPerfSelection;
155   TopoDS_Wire myWire;
156   TopoDS_Shape mySbase;
157   TopoDS_Face mySkface;
158   TopoDS_Face myPbase;
159   TopoDS_Shape myGShape;
160   TopoDS_Shape mySUntil;
161   TopTools_DataMapOfShapeShape myGluedF;
162   TopTools_ListOfShape myNewEdges;
163   TopTools_ListOfShape myTgtEdges;
164   TopTools_ListOfShape myFacesForDraft;
165   BRepFeat_StatusError myStatusError;
166
167
168 private:
169
170
171
172
173
174 };
175
176
177 #include <BRepFeat_RibSlot.lxx>
178
179
180
181
182
183 #endif // _BRepFeat_RibSlot_HeaderFile