1 // Created on: 1994-07-12
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 _BRepOffsetAPI_MakePipe_HeaderFile
18 #define _BRepOffsetAPI_MakePipe_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <BRepFill_Pipe.hxx>
25 #include <BRepPrimAPI_MakeSweep.hxx>
26 #include <GeomFill_Trihedron.hxx>
27 #include <Standard_Boolean.hxx>
28 #include <Standard_Real.hxx>
34 //! Describes functions to build pipes.
35 //! A pipe is built a basis shape (called the profile) along
36 //! a wire (called the spine) by sweeping.
37 //! The profile must not contain solids.
38 //! A MakePipe object provides a framework for:
39 //! - defining the construction of a pipe,
40 //! - implementing the construction algorithm, and
41 //! - consulting the result.
43 //! The MakePipe class implements pipe constructions
44 //! with G1 continuous spines only.
45 class BRepOffsetAPI_MakePipe : public BRepPrimAPI_MakeSweep
52 //! Constructs a pipe by sweeping the shape Profile along
53 //! the wire Spine.The angle made by the spine with the profile is
54 //! maintained along the length of the pipe.
56 //! Spine must be G1 continuous; that is, on the connection
57 //! vertex of two edges of the wire, the tangent vectors on
58 //! the left and on the right must have the same direction,
59 //! though not necessarily the same magnitude.
61 //! Standard_DomainError if the profile is a solid or a
63 Standard_EXPORT BRepOffsetAPI_MakePipe(const TopoDS_Wire& Spine, const TopoDS_Shape& Profile);
65 //! the same as previous but with setting of
66 //! mode of sweep and the flag that indicates attempt
67 //! to approximate a C1-continuous surface if a swept
68 //! surface proved to be C0.
69 Standard_EXPORT BRepOffsetAPI_MakePipe(const TopoDS_Wire& Spine, const TopoDS_Shape& Profile, const GeomFill_Trihedron aMode, const Standard_Boolean ForceApproxC1 = Standard_False);
71 Standard_EXPORT const BRepFill_Pipe& Pipe() const;
73 //! Builds the resulting shape (redefined from MakeShape).
74 Standard_EXPORT virtual void Build() Standard_OVERRIDE;
76 //! Returns the TopoDS Shape of the bottom of the prism.
77 Standard_EXPORT TopoDS_Shape FirstShape() Standard_OVERRIDE;
79 //! Returns the TopoDS Shape of the top of the prism.
80 Standard_EXPORT TopoDS_Shape LastShape() Standard_OVERRIDE;
82 Standard_EXPORT virtual const TopTools_ListOfShape& Generated (const TopoDS_Shape& S) Standard_OVERRIDE;
84 Standard_EXPORT TopoDS_Shape Generated(const TopoDS_Shape& SSpine, const TopoDS_Shape& SProfile);
86 Standard_EXPORT Standard_Real ErrorOnSurface() const;
101 BRepFill_Pipe myPipe;
112 #endif // _BRepOffsetAPI_MakePipe_HeaderFile