|
||||
File indexing completed on 2025-01-18 10:03:09
0001 // Created on: 1993-07-21 0002 // Created by: Remi LEQUETTE 0003 // Copyright (c) 1993-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_MakeSolid_HeaderFile 0018 #define _BRepBuilderAPI_MakeSolid_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <BRepLib_MakeSolid.hxx> 0025 #include <BRepBuilderAPI_MakeShape.hxx> 0026 class TopoDS_CompSolid; 0027 class TopoDS_Shell; 0028 class TopoDS_Solid; 0029 class TopoDS_Shape; 0030 0031 0032 //! Describes functions to build a solid from shells. 0033 //! A solid is made of one shell, or a series of shells, which 0034 //! do not intersect each other. One of these shells 0035 //! constitutes the outside skin of the solid. It may be closed 0036 //! (a finite solid) or open (an infinite solid). Other shells 0037 //! form hollows (cavities) in these previous ones. Each 0038 //! must bound a closed volume. 0039 //! A MakeSolid object provides a framework for: 0040 //! - defining and implementing the construction of a solid, and 0041 //! - consulting the result. 0042 class BRepBuilderAPI_MakeSolid : public BRepBuilderAPI_MakeShape 0043 { 0044 public: 0045 0046 DEFINE_STANDARD_ALLOC 0047 0048 0049 //! Initializes the construction of a solid. An empty solid is 0050 //! considered to cover the whole space. The Add function 0051 //! is used to define shells to bound it. 0052 Standard_EXPORT BRepBuilderAPI_MakeSolid(); 0053 0054 //! Make a solid from a CompSolid. 0055 Standard_EXPORT BRepBuilderAPI_MakeSolid(const TopoDS_CompSolid& S); 0056 0057 //! Make a solid from a shell. 0058 Standard_EXPORT BRepBuilderAPI_MakeSolid(const TopoDS_Shell& S); 0059 0060 //! Make a solid from two shells. 0061 Standard_EXPORT BRepBuilderAPI_MakeSolid(const TopoDS_Shell& S1, const TopoDS_Shell& S2); 0062 0063 //! Make a solid from three shells. 0064 //! Constructs a solid 0065 //! - covering the whole space, or 0066 //! - from shell S, or 0067 //! - from two shells S1 and S2, or 0068 //! - from three shells S1, S2 and S3, or 0069 //! Warning 0070 //! No check is done to verify the conditions of coherence 0071 //! of the resulting solid. In particular, S1, S2 (and S3) must 0072 //! not intersect each other. 0073 //! Besides, after all shells have been added using the Add 0074 //! function, one of these shells should constitute the outside 0075 //! skin of the solid; it may be closed (a finite solid) or open 0076 //! (an infinite solid). Other shells form hollows (cavities) in 0077 //! these previous ones. Each must bound a closed volume. 0078 Standard_EXPORT BRepBuilderAPI_MakeSolid(const TopoDS_Shell& S1, const TopoDS_Shell& S2, const TopoDS_Shell& S3); 0079 0080 //! Make a solid from a solid. useful for adding later. 0081 Standard_EXPORT BRepBuilderAPI_MakeSolid(const TopoDS_Solid& So); 0082 0083 //! Add a shell to a solid. 0084 //! 0085 //! Constructs a solid: 0086 //! - from the solid So, to which shells can be added, or 0087 //! - by adding the shell S to the solid So. 0088 //! Warning 0089 //! No check is done to verify the conditions of coherence 0090 //! of the resulting solid. In particular S must not intersect the solid S0. 0091 //! Besides, after all shells have been added using the Add 0092 //! function, one of these shells should constitute the outside 0093 //! skin of the solid. It may be closed (a finite solid) or open 0094 //! (an infinite solid). Other shells form hollows (cavities) in 0095 //! the previous ones. Each must bound a closed volume. 0096 Standard_EXPORT BRepBuilderAPI_MakeSolid(const TopoDS_Solid& So, const TopoDS_Shell& S); 0097 0098 //! Adds the shell to the current solid. 0099 //! Warning 0100 //! No check is done to verify the conditions of coherence 0101 //! of the resulting solid. In particular, S must not intersect 0102 //! other shells of the solid under construction. 0103 //! Besides, after all shells have been added, one of 0104 //! these shells should constitute the outside skin of the 0105 //! solid. It may be closed (a finite solid) or open (an 0106 //! infinite solid). Other shells form hollows (cavities) in 0107 //! these previous ones. Each must bound a closed volume. 0108 Standard_EXPORT void Add (const TopoDS_Shell& S); 0109 0110 //! Returns true if the solid is built. 0111 //! For this class, a solid under construction is always valid. 0112 //! If no shell has been added, it could be a whole-space 0113 //! solid. However, no check was done to verify the 0114 //! conditions of coherence of the resulting solid. 0115 Standard_EXPORT virtual Standard_Boolean IsDone() const Standard_OVERRIDE; 0116 0117 //! Returns the new Solid. 0118 Standard_EXPORT const TopoDS_Solid& Solid(); 0119 Standard_EXPORT operator TopoDS_Solid(); 0120 0121 Standard_EXPORT virtual Standard_Boolean IsDeleted (const TopoDS_Shape& S) Standard_OVERRIDE; 0122 0123 0124 0125 0126 protected: 0127 0128 0129 0130 0131 0132 private: 0133 0134 0135 0136 BRepLib_MakeSolid myMakeSolid; 0137 0138 0139 }; 0140 0141 0142 0143 0144 0145 0146 0147 #endif // _BRepBuilderAPI_MakeSolid_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |