|
||||
File indexing completed on 2025-01-18 10:03:09
0001 // Created on: 1994-02-16 0002 // Created by: Remi LEQUETTE 0003 // Copyright (c) 1994-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _BRepBuilderAPI_MakeShell_HeaderFile 0018 #define _BRepBuilderAPI_MakeShell_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <BRepLib_MakeShell.hxx> 0025 #include <BRepBuilderAPI_MakeShape.hxx> 0026 #include <Standard_Real.hxx> 0027 #include <BRepBuilderAPI_ShellError.hxx> 0028 class Geom_Surface; 0029 class TopoDS_Shell; 0030 0031 0032 //! Describes functions to build a 0033 //! shape corresponding to the skin of a surface. 0034 //! Note that the term shell in the class name has the same definition 0035 //! as that of a shell in STEP, in other words the skin of a shape, 0036 //! and not a solid model defined by surface and thickness. If you want 0037 //! to build the second sort of shell, you must use 0038 //! BRepOffsetAPI_MakeOffsetShape. A shell is made of a series of 0039 //! faces connected by their common edges. 0040 //! If the underlying surface of a face is not C2 continuous and 0041 //! the flag Segment is True, MakeShell breaks the surface down into 0042 //! several faces which are all C2 continuous and which are 0043 //! connected along the non-regular curves on the surface. 0044 //! The resulting shell contains all these faces. 0045 //! Construction of a Shell from a non-C2 continuous Surface 0046 //! A MakeShell object provides a framework for: 0047 //! - defining the construction of a shell, 0048 //! - implementing the construction algorithm, and 0049 //! - consulting the result. 0050 //! Warning 0051 //! The connected C2 faces in the shell resulting from a decomposition of 0052 //! the surface are not sewn. For a sewn result, you need to use 0053 //! BRepOffsetAPI_Sewing. For a shell with thickness, you need to use 0054 //! BRepOffsetAPI_MakeOffsetShape. 0055 class BRepBuilderAPI_MakeShell : public BRepBuilderAPI_MakeShape 0056 { 0057 public: 0058 0059 DEFINE_STANDARD_ALLOC 0060 0061 0062 //! Constructs an empty shell framework. The Init 0063 //! function is used to define the construction arguments. 0064 //! Warning 0065 //! The function Error will return 0066 //! BRepBuilderAPI_EmptyShell if it is called before the function Init. 0067 Standard_EXPORT BRepBuilderAPI_MakeShell(); 0068 0069 //! Constructs a shell from the surface S. 0070 Standard_EXPORT BRepBuilderAPI_MakeShell(const Handle(Geom_Surface)& S, const Standard_Boolean Segment = Standard_False); 0071 0072 //! Constructs a shell from the surface S, 0073 //! limited in the u parametric direction by the two 0074 //! parameter values UMin and UMax, and limited in the v 0075 //! parametric direction by the two parameter values VMin and VMax. 0076 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); 0077 0078 //! Defines or redefines the arguments 0079 //! for the construction of a shell. The construction is initialized 0080 //! with the surface S, limited in the u parametric direction by the 0081 //! two parameter values UMin and UMax, and in the v parametric 0082 //! direction by the two parameter values VMin and VMax. 0083 //! Warning 0084 //! The function Error returns: 0085 //! - BRepBuilderAPI_ShellParametersOutOfRange 0086 //! when the given parameters are outside the bounds of the 0087 //! surface or the basis surface if S is trimmed 0088 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); 0089 0090 //! Returns true if the shell is built. 0091 Standard_EXPORT virtual Standard_Boolean IsDone() const Standard_OVERRIDE; 0092 0093 //! Returns the construction status: 0094 //! - BRepBuilderAPI_ShellDone if the shell is built, or 0095 //! - another value of the BRepBuilderAPI_ShellError 0096 //! enumeration indicating why the construction failed. 0097 //! This is frequently BRepBuilderAPI_ShellParametersOutOfRange 0098 //! indicating that the given parameters are outside the bounds of the surface. 0099 Standard_EXPORT BRepBuilderAPI_ShellError Error() const; 0100 0101 //! Returns the new Shell. 0102 Standard_EXPORT const TopoDS_Shell& Shell() const; 0103 Standard_EXPORT operator TopoDS_Shell() const; 0104 0105 0106 0107 0108 protected: 0109 0110 0111 0112 0113 0114 private: 0115 0116 0117 0118 BRepLib_MakeShell myMakeShell; 0119 0120 0121 }; 0122 0123 0124 0125 0126 0127 0128 0129 #endif // _BRepBuilderAPI_MakeShell_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |