1 // Created on: 1993-07-06 2 // Created by: Remi LEQUETTE 3 // Copyright (c) 1993-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_HeaderFile 18 #define _BRepBuilderAPI_HeaderFile 19 20 #include <Standard.hxx> 21 #include <Standard_DefineAlloc.hxx> 22 #include <Standard_Handle.hxx> 23 24 #include <Standard_Real.hxx> 25 class Geom_Plane; 26 class BRepBuilderAPI_Command; 27 class BRepBuilderAPI_MakeShape; 28 class BRepBuilderAPI_MakeVertex; 29 class BRepBuilderAPI_MakeEdge; 30 class BRepBuilderAPI_MakeEdge2d; 31 class BRepBuilderAPI_MakePolygon; 32 class BRepBuilderAPI_MakeFace; 33 class BRepBuilderAPI_FindPlane; 34 class BRepBuilderAPI_Sewing; 35 class BRepBuilderAPI_MakeWire; 36 class BRepBuilderAPI_MakeShell; 37 class BRepBuilderAPI_MakeSolid; 38 class BRepBuilderAPI_ModifyShape; 39 class BRepBuilderAPI_Transform; 40 class BRepBuilderAPI_NurbsConvert; 41 class BRepBuilderAPI_GTransform; 42 class BRepBuilderAPI_Copy; 43 class BRepBuilderAPI_Collect; 44 45 46 //! The BRepBuilderAPI package provides an Application 47 //! Programming Interface for the BRep topology data 48 //! structure. 49 //! 50 //! The API is a set of classes aiming to provide : 51 //! 52 //! * High level and simple calls for the most common 53 //! operations. 54 //! 55 //! * Keeping an access on the low-level 56 //! implementation of high-level calls. 57 //! 58 //! * Examples of programming of high-level operations 59 //! from low-level operations. 60 //! 61 //! * A complete coverage of modelling : 62 //! 63 //! - Creating vertices ,edges, faces, solids. 64 //! 65 //! - Sweeping operations. 66 //! 67 //! - Boolean operations. 68 //! 69 //! - Global properties computation. 70 //! 71 //! The API provides classes to build objects: 72 //! 73 //! * The constructors of the classes provides the 74 //! different constructions methods. 75 //! 76 //! * The class keeps as fields the different tools 77 //! used to build the object. 78 //! 79 //! * The class provides a casting method to get 80 //! automatically the result with a function-like 81 //! call. 82 //! 83 //! For example to make a vertex <V> from a point <P> 84 //! one can writes : 85 //! 86 //! V = BRepBuilderAPI_MakeVertex(P); 87 //! 88 //! or 89 //! 90 //! BRepBuilderAPI_MakeVertex MV(P); 91 //! V = MV.Vertex(); 92 //! 93 //! For tolerances a default precision is used which 94 //! can be changed by the packahe method 95 //! BRepBuilderAPI::Precision. 96 //! 97 //! For error handling the BRepBuilderAPI commands raise only 98 //! the NotDone error. When Done is false on a command 99 //! the error description can be asked to the command. 100 //! 101 //! In theory the comands can be called with any 102 //! arguments, argument checking is performed by the 103 //! command. 104 class BRepBuilderAPI 105 { 106 public: 107 108 DEFINE_STANDARD_ALLOC 109 110 111 //! Sets the current plane. 112 Standard_EXPORT static void Plane (const Handle(Geom_Plane)& P); 113 114 //! Returns the current plane. 115 Standard_EXPORT static const Handle(Geom_Plane)& Plane(); 116 117 //! Sets the default precision. The current Precision 118 //! is returned. 119 Standard_EXPORT static void Precision (const Standard_Real P); 120 121 //! Returns the default precision. 122 Standard_EXPORT static Standard_Real Precision(); 123 124 125 126 127 protected: 128 129 130 131 132 133 private: 134 135 136 137 138 friend class BRepBuilderAPI_Command; 139 friend class BRepBuilderAPI_MakeShape; 140 friend class BRepBuilderAPI_MakeVertex; 141 friend class BRepBuilderAPI_MakeEdge; 142 friend class BRepBuilderAPI_MakeEdge2d; 143 friend class BRepBuilderAPI_MakePolygon; 144 friend class BRepBuilderAPI_MakeFace; 145 friend class BRepBuilderAPI_FindPlane; 146 friend class BRepBuilderAPI_Sewing; 147 friend class BRepBuilderAPI_MakeWire; 148 friend class BRepBuilderAPI_MakeShell; 149 friend class BRepBuilderAPI_MakeSolid; 150 friend class BRepBuilderAPI_ModifyShape; 151 friend class BRepBuilderAPI_Transform; 152 friend class BRepBuilderAPI_NurbsConvert; 153 friend class BRepBuilderAPI_GTransform; 154 friend class BRepBuilderAPI_Copy; 155 friend class BRepBuilderAPI_Collect; 156 157 }; 158 159 160 161 162 163 164 165 #endif // _BRepBuilderAPI_HeaderFile 166