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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _BRepFill_Pipe_HeaderFile
18 #define _BRepFill_Pipe_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
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>
30 #include <TopTools_DataMapOfShapeListOfShape.hxx>
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>
36 class BRepFill_LocationLaw;
37 class Standard_DomainError;
38 class StdFail_NotDone;
48 //! Create a shape by sweeping a shape (the profile)
49 //! along a wire (the spine).
51 //! For each edge or vertex from the spine the user
52 //! may ask for the shape generated from each subshape
61 Standard_EXPORT BRepFill_Pipe();
63 Standard_EXPORT BRepFill_Pipe(const TopoDS_Wire& Spine,
64 const TopoDS_Shape& Profile,
65 const GeomFill_Trihedron aMode = GeomFill_IsCorrectedFrenet,
66 const Standard_Boolean ForceApproxC1 = Standard_False,
67 const Standard_Boolean GeneratePartCase = Standard_False);
69 Standard_EXPORT void Perform (const TopoDS_Wire& Spine,
70 const TopoDS_Shape& Profile,
71 const Standard_Boolean GeneratePartCase = Standard_False);
73 Standard_EXPORT const TopoDS_Shape& Spine() const;
75 Standard_EXPORT const TopoDS_Shape& Profile() const;
77 Standard_EXPORT const TopoDS_Shape& Shape() const;
79 Standard_EXPORT Standard_Real ErrorOnSurface() const;
81 Standard_EXPORT const TopoDS_Shape& FirstShape() const;
83 Standard_EXPORT const TopoDS_Shape& LastShape() const;
85 //! Returns the list of shapes generated from the
87 Standard_EXPORT void Generated (const TopoDS_Shape& S, TopTools_ListOfShape& L);
89 //! Returns the face created from an edge of the spine
90 //! and an edge of the profile.
91 //! if the edges are not in the spine or the profile
92 Standard_EXPORT TopoDS_Face Face (const TopoDS_Edge& ESpine, const TopoDS_Edge& EProfile);
94 //! Returns the edge created from an edge of the spine
95 //! and a vertex of the profile.
96 //! if the edge or the vertex are not in the spine or
98 Standard_EXPORT TopoDS_Edge Edge (const TopoDS_Edge& ESpine, const TopoDS_Vertex& VProfile);
100 //! Returns the shape created from the profile at the
101 //! position of the vertex VSpine.
102 //! if the vertex is not in the Spine
103 Standard_EXPORT TopoDS_Shape Section (const TopoDS_Vertex& VSpine) const;
105 //! Create a Wire by sweeping the Point along the <spine>
106 //! if the <Spine> is undefined
107 Standard_EXPORT TopoDS_Wire PipeLine (const gp_Pnt& Point);
121 //! Auxiliary recursive method used to build the
123 Standard_EXPORT TopoDS_Shape MakeShape (const TopoDS_Shape& S,
124 const TopoDS_Shape& theOriginalS,
125 const TopoDS_Shape& FirstShape,
126 const TopoDS_Shape& LastShape);
128 //! Auxiliary recursive method used to find the edge's index
129 Standard_EXPORT Standard_Integer FindEdge (const TopoDS_Shape& S,
130 const TopoDS_Edge& E,
131 Standard_Integer& Init) const;
133 Standard_EXPORT Standard_Integer FindVertex (const TopoDS_Shape& S, const
135 Standard_Integer& Init) const;
137 Standard_EXPORT void DefineRealSegmax();
139 Standard_EXPORT void RebuildTopOrBottomFace (const TopoDS_Shape& aFace,
140 const Standard_Boolean IsTop) const;
142 Standard_EXPORT void BuildHistory (const BRepFill_Sweep& theSweep,
143 const TopoDS_Shape& theSection);
147 TopoDS_Shape myProfile;
148 TopoDS_Shape myShape;
150 Handle(BRepFill_LocationLaw) myLoc;
151 Handle(TopTools_HArray2OfShape) mySections;
152 Handle(TopTools_HArray2OfShape) myFaces;
153 Handle(TopTools_HArray2OfShape) myEdges;
154 TopTools_MapOfShape myReversedEdges;
155 BRepFill_DataMapOfShapeHArray2OfShape myTapes;
156 BRepFill_DataMapOfShapeHArray2OfShape myRails;
157 Standard_Integer myCurIndexOfSectionEdge;
158 TopoDS_Shape myFirst;
160 TopTools_DataMapOfShapeListOfShape myGenMap;
161 Standard_Integer myDegmax;
162 Standard_Integer mySegmax;
163 GeomAbs_Shape myContinuity;
164 GeomFill_Trihedron myMode;
165 Standard_Boolean myForceApproxC1;
166 Standard_Real myErrorOnSurf;
177 #endif // _BRepFill_Pipe_HeaderFile