0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / BRepOffsetAPI / BRepOffsetAPI_MakePipe.hxx
CommitLineData
42cf5bc1 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
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 _BRepOffsetAPI_MakePipe_HeaderFile
18#define _BRepOffsetAPI_MakePipe_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
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>
29class TopoDS_Wire;
30class TopoDS_Shape;
31class BRepFill_Pipe;
32
33
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.
42//! Warning
43//! The MakePipe class implements pipe constructions
44//! with G1 continuous spines only.
45class BRepOffsetAPI_MakePipe : public BRepPrimAPI_MakeSweep
46{
47public:
48
49 DEFINE_STANDARD_ALLOC
50
51
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.
55 //! Warning
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.
60 //! Exceptions
61 //! Standard_DomainError if the profile is a solid or a
62 //! composite solid.
63 Standard_EXPORT BRepOffsetAPI_MakePipe(const TopoDS_Wire& Spine, const TopoDS_Shape& Profile);
64
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);
70
71 Standard_EXPORT const BRepFill_Pipe& Pipe() const;
72
73 //! Builds the resulting shape (redefined from MakeShape).
74 Standard_EXPORT virtual void Build() Standard_OVERRIDE;
75
76 //! Returns the TopoDS Shape of the bottom of the prism.
77 Standard_EXPORT TopoDS_Shape FirstShape();
78
79 //! Returns the TopoDS Shape of the top of the prism.
80 Standard_EXPORT TopoDS_Shape LastShape();
81
82 Standard_EXPORT TopoDS_Shape Generated (const TopoDS_Shape& SSpine, const TopoDS_Shape& SProfile);
83
84 Standard_EXPORT Standard_Real ErrorOnSurface() const;
85
86
87
88
89protected:
90
91
92
93
94
95private:
96
97
98
99 BRepFill_Pipe myPipe;
100
101
102};
103
104
105
106
107
108
109
110#endif // _BRepOffsetAPI_MakePipe_HeaderFile