| 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 | -- xab:19Nov96 correction de doc |
| 18 | |
| 19 | |
| 20 | |
| 21 | class MakeShell from BRepBuilderAPI inherits MakeShape from BRepBuilderAPI |
| 22 | |
| 23 | ---Purpose: Describes functions to build a |
| 24 | -- shape corresponding to the skin of a surface. |
| 25 | -- Note that the term shell in the class name has the same definition |
| 26 | -- as that of a shell in STEP, in other words the skin of a shape, |
| 27 | -- and not a solid model defined by surface and thickness. If you want |
| 28 | -- to build the second sort of shell, you must use |
| 29 | -- BRepOffsetAPI_MakeOffsetShape. A shell is made of a series of |
| 30 | -- faces connected by their common edges. |
| 31 | -- If the underlying surface of a face is not C2 continuous and |
| 32 | -- the flag Segment is True, MakeShell breaks the surface down into |
| 33 | -- several faces which are all C2 continuous and which are |
| 34 | -- connected along the non-regular curves on the surface. |
| 35 | -- The resulting shell contains all these faces. |
| 36 | -- Construction of a Shell from a non-C2 continuous Surface |
| 37 | -- A MakeShell object provides a framework for: |
| 38 | -- - defining the construction of a shell, |
| 39 | -- - implementing the construction algorithm, and |
| 40 | -- - consulting the result. |
| 41 | -- Warning |
| 42 | -- The connected C2 faces in the shell resulting from a decomposition of |
| 43 | -- the surface are not sewn. For a sewn result, you need to use |
| 44 | -- BRepOffsetAPI_Sewing. For a shell with thickness, you need to use |
| 45 | -- BRepOffsetAPI_MakeOffsetShape. |
| 46 | |
| 47 | uses |
| 48 | |
| 49 | Surface from Geom, |
| 50 | Shell from TopoDS, |
| 51 | Face from TopoDS, |
| 52 | ShellError from BRepBuilderAPI, |
| 53 | MakeShell from BRepLib |
| 54 | |
| 55 | |
| 56 | raises |
| 57 | NotDone from StdFail |
| 58 | |
| 59 | is |
| 60 | Create |
| 61 | ---Purpose: Constructs an empty shell framework. The Init |
| 62 | -- function is used to define the construction arguments. |
| 63 | -- Warning |
| 64 | -- The function Error will return |
| 65 | -- BRepBuilderAPI_EmptyShell if it is called before the function Init. |
| 66 | returns MakeShell from BRepBuilderAPI; |
| 67 | |
| 68 | ---------------------------------------------- |
| 69 | -- From a set of face |
| 70 | ---------------------------------------------- |
| 71 | |
| 72 | ---------------------------------------------- |
| 73 | -- From a surface |
| 74 | ---------------------------------------------- |
| 75 | |
| 76 | Create(S : Surface from Geom; |
| 77 | Segment : Boolean from Standard = Standard_False) |
| 78 | ---Purpose: Constructs a shell from the surface S. |
| 79 | returns MakeShell from BRepBuilderAPI; |
| 80 | |
| 81 | Create(S : Surface from Geom; UMin, UMax, VMin, VMax : Real; |
| 82 | Segment : Boolean from Standard = Standard_False) |
| 83 | |
| 84 | ---Purpose: Constructs a shell from the surface S, |
| 85 | -- limited in the u parametric direction by the two |
| 86 | -- parameter values UMin and UMax, and limited in the v |
| 87 | -- parametric direction by the two parameter values VMin and VMax. |
| 88 | returns MakeShell from BRepBuilderAPI; |
| 89 | |
| 90 | Init(me : in out; S : Surface from Geom; UMin, UMax, VMin, VMax : Real; |
| 91 | Segment : Boolean from Standard = Standard_False) |
| 92 | ---Purpose: Defines or redefines the arguments |
| 93 | -- for the construction of a shell. The construction is initialized |
| 94 | -- with the surface S, limited in the u parametric direction by the |
| 95 | -- two parameter values UMin and UMax, and in the v parametric |
| 96 | -- direction by the two parameter values VMin and VMax. |
| 97 | -- Warning |
| 98 | -- The function Error returns: |
| 99 | -- - BRepBuilderAPI_ShellParametersOutOfRange |
| 100 | -- when the given parameters are outside the bounds of the |
| 101 | -- surface or the basis surface if S is trimmed |
| 102 | is static; |
| 103 | |
| 104 | |
| 105 | ---------------------------------------------- |
| 106 | -- Results |
| 107 | ---------------------------------------------- |
| 108 | |
| 109 | IsDone(me) returns Boolean |
| 110 | ---Purpose: Returns true if the shell is built. |
| 111 | is redefined; |
| 112 | |
| 113 | Error(me) returns ShellError from BRepBuilderAPI |
| 114 | ---Purpose: Returns the construction status: |
| 115 | -- - BRepBuilderAPI_ShellDone if the shell is built, or |
| 116 | -- - another value of the BRepBuilderAPI_ShellError |
| 117 | -- enumeration indicating why the construction failed. |
| 118 | -- This is frequently BRepBuilderAPI_ShellParametersOutOfRange |
| 119 | -- indicating that the given parameters are outside the bounds of the surface. |
| 120 | is static; |
| 121 | |
| 122 | Shell(me) returns Shell from TopoDS |
| 123 | ---Purpose: Returns the new Shell. |
| 124 | -- |
| 125 | ---C++: return const & |
| 126 | ---C++: alias "Standard_EXPORT operator TopoDS_Shell() const;" |
| 127 | ---Level: Public |
| 128 | raises |
| 129 | NotDone from StdFail |
| 130 | is static; |
| 131 | |
| 132 | fields |
| 133 | myMakeShell : MakeShell from BRepLib; |
| 134 | |
| 135 | end MakeShell; |