0024890: Result of uniform scaling is invalid
[occt.git] / src / BRepBuilderAPI / BRepBuilderAPI_MakeShell.hxx
CommitLineData
42cf5bc1 1// Created on: 1994-02-16
2// Created by: Remi LEQUETTE
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 _BRepBuilderAPI_MakeShell_HeaderFile
18#define _BRepBuilderAPI_MakeShell_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <BRepLib_MakeShell.hxx>
25#include <BRepBuilderAPI_MakeShape.hxx>
26#include <Standard_Boolean.hxx>
27#include <Standard_Real.hxx>
28#include <BRepBuilderAPI_ShellError.hxx>
29class StdFail_NotDone;
30class Geom_Surface;
31class TopoDS_Shell;
32
33
34//! Describes functions to build a
35//! shape corresponding to the skin of a surface.
36//! Note that the term shell in the class name has the same definition
37//! as that of a shell in STEP, in other words the skin of a shape,
38//! and not a solid model defined by surface and thickness. If you want
39//! to build the second sort of shell, you must use
40//! BRepOffsetAPI_MakeOffsetShape. A shell is made of a series of
41//! faces connected by their common edges.
42//! If the underlying surface of a face is not C2 continuous and
43//! the flag Segment is True, MakeShell breaks the surface down into
44//! several faces which are all C2 continuous and which are
45//! connected along the non-regular curves on the surface.
46//! The resulting shell contains all these faces.
47//! Construction of a Shell from a non-C2 continuous Surface
48//! A MakeShell object provides a framework for:
49//! - defining the construction of a shell,
50//! - implementing the construction algorithm, and
51//! - consulting the result.
52//! Warning
53//! The connected C2 faces in the shell resulting from a decomposition of
54//! the surface are not sewn. For a sewn result, you need to use
55//! BRepOffsetAPI_Sewing. For a shell with thickness, you need to use
56//! BRepOffsetAPI_MakeOffsetShape.
57class BRepBuilderAPI_MakeShell : public BRepBuilderAPI_MakeShape
58{
59public:
60
61 DEFINE_STANDARD_ALLOC
62
63
64 //! Constructs an empty shell framework. The Init
65 //! function is used to define the construction arguments.
66 //! Warning
67 //! The function Error will return
68 //! BRepBuilderAPI_EmptyShell if it is called before the function Init.
69 Standard_EXPORT BRepBuilderAPI_MakeShell();
70
71 //! Constructs a shell from the surface S.
72 Standard_EXPORT BRepBuilderAPI_MakeShell(const Handle(Geom_Surface)& S, const Standard_Boolean Segment = Standard_False);
73
74 //! Constructs a shell from the surface S,
75 //! limited in the u parametric direction by the two
76 //! parameter values UMin and UMax, and limited in the v
77 //! parametric direction by the two parameter values VMin and VMax.
78 Standard_EXPORT BRepBuilderAPI_MakeShell(const Handle(Geom_Surface)& S, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax, const Standard_Boolean Segment = Standard_False);
79
80 //! Defines or redefines the arguments
81 //! for the construction of a shell. The construction is initialized
82 //! with the surface S, limited in the u parametric direction by the
83 //! two parameter values UMin and UMax, and in the v parametric
84 //! direction by the two parameter values VMin and VMax.
85 //! Warning
86 //! The function Error returns:
87 //! - BRepBuilderAPI_ShellParametersOutOfRange
88 //! when the given parameters are outside the bounds of the
89 //! surface or the basis surface if S is trimmed
90 Standard_EXPORT void Init (const Handle(Geom_Surface)& S, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax, const Standard_Boolean Segment = Standard_False);
91
92 //! Returns true if the shell is built.
93 Standard_EXPORT virtual Standard_Boolean IsDone() const Standard_OVERRIDE;
94
95 //! Returns the construction status:
96 //! - BRepBuilderAPI_ShellDone if the shell is built, or
97 //! - another value of the BRepBuilderAPI_ShellError
98 //! enumeration indicating why the construction failed.
99 //! This is frequently BRepBuilderAPI_ShellParametersOutOfRange
100 //! indicating that the given parameters are outside the bounds of the surface.
101 Standard_EXPORT BRepBuilderAPI_ShellError Error() const;
102
103 //! Returns the new Shell.
104 Standard_EXPORT const TopoDS_Shell& Shell() const;
105Standard_EXPORT operator TopoDS_Shell() const;
106
107
108
109
110protected:
111
112
113
114
115
116private:
117
118
119
120 BRepLib_MakeShell myMakeShell;
121
122
123};
124
125
126
127
128
129
130
131#endif // _BRepBuilderAPI_MakeShell_HeaderFile