0027065: BRepOffsetAPI_MakePipe misses definition of virtual method Generated()
[occt.git] / src / BRepFill / BRepFill_Pipe.hxx
CommitLineData
42cf5bc1 1// Created on: 1994-06-07
2// Created by: Bruno DUMORTIER
3// Copyright (c) 1994-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 _BRepFill_Pipe_HeaderFile
18#define _BRepFill_Pipe_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <TopoDS_Wire.hxx>
25#include <TopoDS_Shape.hxx>
26#include <gp_Trsf.hxx>
27#include <TopTools_HArray2OfShape.hxx>
28#include <TopTools_MapOfShape.hxx>
29#include <BRepFill_DataMapOfShapeHArray2OfShape.hxx>
5e9548e7 30#include <TopTools_DataMapOfShapeListOfShape.hxx>
42cf5bc1 31#include <Standard_Integer.hxx>
32#include <GeomAbs_Shape.hxx>
33#include <GeomFill_Trihedron.hxx>
34#include <Standard_Boolean.hxx>
35#include <Standard_Real.hxx>
36class BRepFill_LocationLaw;
37class Standard_DomainError;
38class StdFail_NotDone;
39class TopoDS_Wire;
40class TopoDS_Shape;
41class TopoDS_Face;
42class TopoDS_Edge;
43class TopoDS_Vertex;
44class gp_Pnt;
45
46
47//! Create a shape by sweeping a shape (the profile)
48//! along a wire (the spine).
49//!
50//! For each edge or vertex from the spine the user
51//! may ask for the shape generated from each subshape
52//! of the profile.
53class BRepFill_Pipe
54{
55public:
56
57 DEFINE_STANDARD_ALLOC
58
59
60 Standard_EXPORT BRepFill_Pipe();
61
62 Standard_EXPORT BRepFill_Pipe(const TopoDS_Wire& Spine, const TopoDS_Shape& Profile, const GeomFill_Trihedron aMode = GeomFill_IsCorrectedFrenet, const Standard_Boolean ForceApproxC1 = Standard_False, const Standard_Boolean GeneratePartCase = Standard_False);
63
64 Standard_EXPORT void Perform (const TopoDS_Wire& Spine, const TopoDS_Shape& Profile, const Standard_Boolean GeneratePartCase = Standard_False);
65
66 Standard_EXPORT const TopoDS_Shape& Spine() const;
67
68 Standard_EXPORT const TopoDS_Shape& Profile() const;
69
70 Standard_EXPORT const TopoDS_Shape& Shape() const;
71
72 Standard_EXPORT Standard_Real ErrorOnSurface() const;
73
74 Standard_EXPORT const TopoDS_Shape& FirstShape() const;
75
76 Standard_EXPORT const TopoDS_Shape& LastShape() const;
77
5e9548e7 78 //! Returns the list of shapes generated from the
79 //! shape <S>.
80 Standard_EXPORT void Generated (const TopoDS_Shape& S, TopTools_ListOfShape& L);
81
42cf5bc1 82 //! Returns the face created from an edge of the spine
83 //! and an edge of the profile.
84 //! if the edges are not in the spine or the profile
85 Standard_EXPORT TopoDS_Face Face (const TopoDS_Edge& ESpine, const TopoDS_Edge& EProfile);
86
87 //! Returns the edge created from an edge of the spine
88 //! and a vertex of the profile.
89 //! if the edge or the vertex are not in the spine or
90 //! the profile.
91 Standard_EXPORT TopoDS_Edge Edge (const TopoDS_Edge& ESpine, const TopoDS_Vertex& VProfile);
92
93 //! Returns the shape created from the profile at the
94 //! position of the vertex VSpine.
95 //! if the vertex is not in the Spine
96 Standard_EXPORT TopoDS_Shape Section (const TopoDS_Vertex& VSpine) const;
97
98 //! Create a Wire by sweeping the Point along the <spine>
99 //! if the <Spine> is undefined
100 Standard_EXPORT TopoDS_Wire PipeLine (const gp_Pnt& Point);
101
102
103
104
105protected:
106
107
108
109
110
111private:
112
113
114 //! Auxiliary recursive method used to build the
115 //! result.
116 Standard_EXPORT TopoDS_Shape MakeShape (const TopoDS_Shape& S, const TopoDS_Shape& FirstShape, const TopoDS_Shape& LastShape);
117
118 //! Auxiliary recursive method used to find the edge's index
119 Standard_EXPORT Standard_Integer FindEdge (const TopoDS_Shape& S, const TopoDS_Edge& E, Standard_Integer& Init) const;
120
121 Standard_EXPORT Standard_Integer FindVertex (const TopoDS_Shape& S, const TopoDS_Vertex& V, Standard_Integer& Init) const;
122
123 Standard_EXPORT void DefineRealSegmax();
124
125 Standard_EXPORT void RebuildTopOrBottomFace (const TopoDS_Shape& aFace, const Standard_Boolean IsTop) const;
126
127 //! Performs sharing coincident faces in theShape. Also modifies
128 //! myFaces, mySections and myEdges to contain shared shapes.
129 //! Returns the shared shape. If theShape is not modified this
130 //! method returns it.
131 Standard_EXPORT TopoDS_Shape ShareFaces (const TopoDS_Shape& theShape, const Standard_Integer theInitialFacesLen, const Standard_Integer theInitialEdgesLen, const Standard_Integer theInitialSectionsLen);
132
133
134 TopoDS_Wire mySpine;
135 TopoDS_Shape myProfile;
136 TopoDS_Shape myShape;
137 gp_Trsf myTrsf;
138 Handle(BRepFill_LocationLaw) myLoc;
139 Handle(TopTools_HArray2OfShape) mySections;
140 Handle(TopTools_HArray2OfShape) myFaces;
141 Handle(TopTools_HArray2OfShape) myEdges;
142 TopTools_MapOfShape myReversedEdges;
143 BRepFill_DataMapOfShapeHArray2OfShape myTapes;
144 BRepFill_DataMapOfShapeHArray2OfShape myRails;
145 Standard_Integer myCurIndexOfSectionEdge;
146 TopoDS_Shape myFirst;
147 TopoDS_Shape myLast;
5e9548e7 148 TopTools_DataMapOfShapeListOfShape myGenMap;
42cf5bc1 149 Standard_Integer myDegmax;
150 Standard_Integer mySegmax;
151 GeomAbs_Shape myContinuity;
152 GeomFill_Trihedron myMode;
153 Standard_Boolean myForceApproxC1;
154 Standard_Real myErrorOnSurf;
155
156
157};
158
159
160
161
162
163
164
165#endif // _BRepFill_Pipe_HeaderFile