|
||||
File indexing completed on 2025-01-18 10:05:23
0001 // Created on: 1991-02-21 0002 // Created by: Remi Lequette 0003 // Copyright (c) 1991-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 _TopoDS_Builder_HeaderFile 0018 #define _TopoDS_Builder_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 class TopoDS_Shape; 0025 class TopoDS_TShape; 0026 class TopoDS_Wire; 0027 class TopoDS_Shell; 0028 class TopoDS_Solid; 0029 class TopoDS_CompSolid; 0030 class TopoDS_Compound; 0031 0032 0033 //! A Builder is used to create Topological Data 0034 //! Structures.It is the root of the Builder class hierarchy. 0035 //! 0036 //! There are three groups of methods in the Builder : 0037 //! 0038 //! The Make methods create Shapes. 0039 //! 0040 //! The Add method includes a Shape in another Shape. 0041 //! 0042 //! The Remove method removes a Shape from an other 0043 //! Shape. 0044 //! 0045 //! The methods in Builder are not static. They can be 0046 //! redefined in inherited builders. 0047 //! 0048 //! This Builder does not provide methods to Make 0049 //! Vertices, Edges, Faces, Shells or Solids. These 0050 //! methods are provided in the inherited Builders 0051 //! as they must provide the geometry. 0052 //! 0053 //! The Add method check for the following rules : 0054 //! 0055 //! - Any SHAPE can be added in a COMPOUND. 0056 //! 0057 //! - Only SOLID can be added in a COMPSOLID. 0058 //! 0059 //! - Only SHELL, EDGE and VERTEX can be added in a SOLID. 0060 //! EDGE and VERTEX as to be INTERNAL or EXTERNAL. 0061 //! 0062 //! - Only FACE can be added in a SHELL. 0063 //! 0064 //! - Only WIRE and VERTEX can be added in a FACE. 0065 //! VERTEX as to be INTERNAL or EXTERNAL. 0066 //! 0067 //! - Only EDGE can be added in a WIRE. 0068 //! 0069 //! - Only VERTEX can be added in an EDGE. 0070 //! 0071 //! - Nothing can be added in a VERTEX. 0072 class TopoDS_Builder 0073 { 0074 public: 0075 0076 DEFINE_STANDARD_ALLOC 0077 0078 0079 //! Make an empty Wire. 0080 void MakeWire (TopoDS_Wire& W) const; 0081 0082 //! Make an empty Shell. 0083 void MakeShell (TopoDS_Shell& S) const; 0084 0085 //! Make a Solid covering the whole 3D space. 0086 void MakeSolid (TopoDS_Solid& S) const; 0087 0088 //! Make an empty Composite Solid. 0089 void MakeCompSolid (TopoDS_CompSolid& C) const; 0090 0091 //! Make an empty Compound. 0092 void MakeCompound (TopoDS_Compound& C) const; 0093 0094 //! Add the Shape C in the Shape S. 0095 //! Exceptions 0096 //! - TopoDS_FrozenShape if S is not free and cannot be modified. 0097 //! - TopoDS__UnCompatibleShapes if S and C are not compatible. 0098 Standard_EXPORT void Add (TopoDS_Shape& S, const TopoDS_Shape& C) const; 0099 0100 //! Remove the Shape C from the Shape S. 0101 //! Exceptions 0102 //! TopoDS_FrozenShape if S is frozen and cannot be modified. 0103 Standard_EXPORT void Remove (TopoDS_Shape& S, const TopoDS_Shape& C) const; 0104 0105 0106 0107 0108 protected: 0109 0110 0111 //! The basic method to make a Shape, used by all the 0112 //! Make methods. 0113 Standard_EXPORT void MakeShape (TopoDS_Shape& S, const Handle(TopoDS_TShape)& T) const; 0114 0115 0116 0117 0118 private: 0119 0120 0121 0122 0123 0124 }; 0125 0126 0127 #include <TopoDS_Builder.lxx> 0128 0129 0130 0131 0132 0133 #endif // _TopoDS_Builder_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |