0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / BRepBuilderAPI / BRepBuilderAPI.hxx
CommitLineData
42cf5bc1 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>
25class Geom_Plane;
26class BRepBuilderAPI_Command;
27class BRepBuilderAPI_MakeShape;
28class BRepBuilderAPI_MakeVertex;
29class BRepBuilderAPI_MakeEdge;
30class BRepBuilderAPI_MakeEdge2d;
31class BRepBuilderAPI_MakePolygon;
32class BRepBuilderAPI_MakeFace;
33class BRepBuilderAPI_FindPlane;
34class BRepBuilderAPI_Sewing;
35class BRepBuilderAPI_MakeWire;
36class BRepBuilderAPI_MakeShell;
37class BRepBuilderAPI_MakeSolid;
38class BRepBuilderAPI_ModifyShape;
39class BRepBuilderAPI_Transform;
40class BRepBuilderAPI_NurbsConvert;
41class BRepBuilderAPI_GTransform;
42class BRepBuilderAPI_Copy;
43class 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.
104class BRepBuilderAPI
105{
106public:
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
127protected:
128
129
130
131
132
133private:
134
135
136
137
138friend class BRepBuilderAPI_Command;
139friend class BRepBuilderAPI_MakeShape;
140friend class BRepBuilderAPI_MakeVertex;
141friend class BRepBuilderAPI_MakeEdge;
142friend class BRepBuilderAPI_MakeEdge2d;
143friend class BRepBuilderAPI_MakePolygon;
144friend class BRepBuilderAPI_MakeFace;
145friend class BRepBuilderAPI_FindPlane;
146friend class BRepBuilderAPI_Sewing;
147friend class BRepBuilderAPI_MakeWire;
148friend class BRepBuilderAPI_MakeShell;
149friend class BRepBuilderAPI_MakeSolid;
150friend class BRepBuilderAPI_ModifyShape;
151friend class BRepBuilderAPI_Transform;
152friend class BRepBuilderAPI_NurbsConvert;
153friend class BRepBuilderAPI_GTransform;
154friend class BRepBuilderAPI_Copy;
155friend class BRepBuilderAPI_Collect;
156
157};
158
159
160
161
162
163
164
165#endif // _BRepBuilderAPI_HeaderFile