1 -- Created on: 1993-07-22
2 -- Created by: Isabelle GRIGNON
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public 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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
19 ---Purpose: This package provides the bounding boxes for curves
20 -- and surfaces from BRepAdaptor.
21 -- Functions to add a topological shape to a bounding box
33 -- Package methods for shapes
36 Add(S : Shape from TopoDS;
37 B : in out Box from Bnd;
38 useTriangulation: Boolean from Standard = Standard_True);
39 ---Purpose:Adds the shape S to the bounding box B.
40 -- More precisely are successively added to B:
41 -- - each face of S; the triangulation of the face is used if it exists,
42 -- - then each edge of S which does not belong to a face,
43 -- the polygon of the edge is used if it exists
44 -- - and last each vertex of S which does not belong to an edge.
45 -- After each elementary operation, the bounding box B is
46 -- enlarged by the tolerance value of the relative sub-shape.
47 -- When working with the triangulation of a face this value of
48 -- enlargement is the sum of the triangulation deflection and
49 -- the face tolerance. When working with the
50 -- polygon of an edge this value of enlargement is
51 -- the sum of the polygon deflection and the edge tolerance.
53 -- - This algorithm is time consuming if triangulation has not
54 -- been inserted inside the data structure of the shape S.
55 -- - The resulting bounding box may be somewhat larger than the object.
58 AddClose(S : Shape from TopoDS; B : in out Box from Bnd);
59 ---Purpose: Adds the shape S to the bounding box B.
60 -- This is a quick algorithm but only works if the shape S is
61 -- composed of polygonal planar faces, as is the case if S is
62 -- an approached polyhedral representation of an exact
63 -- shape. Pay particular attention to this because this
64 -- condition is not checked and, if it not respected, an error
65 -- may occur in the algorithm for which the bounding box is built.
66 -- Note that the resulting bounding box is not enlarged by the
67 -- tolerance value of the sub-shapes as is the case with the
68 -- Add function. So the added part of the resulting bounding
69 -- box is closer to the shape S.