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 <Standard_Integer.hxx>
31 #include <GeomAbs_Shape.hxx>
32 #include <GeomFill_Trihedron.hxx>
33 #include <Standard_Boolean.hxx>
34 #include <Standard_Real.hxx>
35 class BRepFill_LocationLaw;
36 class Standard_DomainError;
37 class StdFail_NotDone;
46 //! Create a shape by sweeping a shape (the profile)
47 //! along a wire (the spine).
49 //! For each edge or vertex from the spine the user
50 //! may ask for the shape generated from each subshape
59 Standard_EXPORT BRepFill_Pipe();
61 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 Standard_EXPORT void Perform (const TopoDS_Wire& Spine, const TopoDS_Shape& Profile, const Standard_Boolean GeneratePartCase = Standard_False);
65 Standard_EXPORT const TopoDS_Shape& Spine() const;
67 Standard_EXPORT const TopoDS_Shape& Profile() const;
69 Standard_EXPORT const TopoDS_Shape& Shape() const;
71 Standard_EXPORT Standard_Real ErrorOnSurface() const;
73 Standard_EXPORT const TopoDS_Shape& FirstShape() const;
75 Standard_EXPORT const TopoDS_Shape& LastShape() const;
77 //! Returns the face created from an edge of the spine
78 //! and an edge of the profile.
79 //! if the edges are not in the spine or the profile
80 Standard_EXPORT TopoDS_Face Face (const TopoDS_Edge& ESpine, const TopoDS_Edge& EProfile);
82 //! Returns the edge created from an edge of the spine
83 //! and a vertex of the profile.
84 //! if the edge or the vertex are not in the spine or
86 Standard_EXPORT TopoDS_Edge Edge (const TopoDS_Edge& ESpine, const TopoDS_Vertex& VProfile);
88 //! Returns the shape created from the profile at the
89 //! position of the vertex VSpine.
90 //! if the vertex is not in the Spine
91 Standard_EXPORT TopoDS_Shape Section (const TopoDS_Vertex& VSpine) const;
93 //! Create a Wire by sweeping the Point along the <spine>
94 //! if the <Spine> is undefined
95 Standard_EXPORT TopoDS_Wire PipeLine (const gp_Pnt& Point);
109 //! Auxiliary recursive method used to build the
111 Standard_EXPORT TopoDS_Shape MakeShape (const TopoDS_Shape& S, const TopoDS_Shape& FirstShape, const TopoDS_Shape& LastShape);
113 //! Auxiliary recursive method used to find the edge's index
114 Standard_EXPORT Standard_Integer FindEdge (const TopoDS_Shape& S, const TopoDS_Edge& E, Standard_Integer& Init) const;
116 Standard_EXPORT Standard_Integer FindVertex (const TopoDS_Shape& S, const TopoDS_Vertex& V, Standard_Integer& Init) const;
118 Standard_EXPORT void DefineRealSegmax();
120 Standard_EXPORT void RebuildTopOrBottomFace (const TopoDS_Shape& aFace, const Standard_Boolean IsTop) const;
122 //! Performs sharing coincident faces in theShape. Also modifies
123 //! myFaces, mySections and myEdges to contain shared shapes.
124 //! Returns the shared shape. If theShape is not modified this
125 //! method returns it.
126 Standard_EXPORT TopoDS_Shape ShareFaces (const TopoDS_Shape& theShape, const Standard_Integer theInitialFacesLen, const Standard_Integer theInitialEdgesLen, const Standard_Integer theInitialSectionsLen);
130 TopoDS_Shape myProfile;
131 TopoDS_Shape myShape;
133 Handle(BRepFill_LocationLaw) myLoc;
134 Handle(TopTools_HArray2OfShape) mySections;
135 Handle(TopTools_HArray2OfShape) myFaces;
136 Handle(TopTools_HArray2OfShape) myEdges;
137 TopTools_MapOfShape myReversedEdges;
138 BRepFill_DataMapOfShapeHArray2OfShape myTapes;
139 BRepFill_DataMapOfShapeHArray2OfShape myRails;
140 Standard_Integer myCurIndexOfSectionEdge;
141 TopoDS_Shape myFirst;
143 Standard_Integer myDegmax;
144 Standard_Integer mySegmax;
145 GeomAbs_Shape myContinuity;
146 GeomFill_Trihedron myMode;
147 Standard_Boolean myForceApproxC1;
148 Standard_Real myErrorOnSurf;
159 #endif // _BRepFill_Pipe_HeaderFile