|
||||
File indexing completed on 2025-01-18 10:03:03
0001 // Created on: 1995-07-24 0002 // Created by: Modelistation 0003 // Copyright (c) 1995-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 _BndLib_AddSurface_HeaderFile 0018 #define _BndLib_AddSurface_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 0023 class Adaptor3d_Surface; 0024 class Bnd_Box; 0025 0026 //! computes the box from a surface 0027 //! Functions to add a surface to a bounding box. 0028 //! The surface is defined from a Geom surface. 0029 class BndLib_AddSurface 0030 { 0031 public: 0032 0033 DEFINE_STANDARD_ALLOC 0034 0035 0036 //! Adds to the bounding box B the surface S 0037 //! B is then enlarged by the tolerance value Tol. 0038 //! Note: depending on the type of curve, one of the following 0039 //! representations of the surface S is used to include it in the bounding box B: 0040 //! - an exact representation if S is built from a plane, a 0041 //! cylinder, a cone, a sphere or a torus, 0042 //! - the poles of the surface if S is built from a Bezier 0043 //! surface or a BSpline surface, 0044 //! - the points of an approximation of the surface S in 0045 //! cases other than offset surfaces; 0046 //! - in the case of an offset surface, the basis surface is first 0047 //! included according to the previous rules; then the 0048 //! bounding box is enlarged by the offset value. 0049 //! Warning 0050 //! Do not use these functions to add a non-finite surface to 0051 //! the bounding box B. 0052 //! If UMin, UMax, VMin or VMax is an infinite value B will become WholeSpace. 0053 //! S is an adapted surface, that is, an object which is an interface between: 0054 //! - the services provided by a surface from the package Geom 0055 //! - and those required of the surface by the computation algorithm. 0056 //! The adapted surface is created in the following way: 0057 //! Handle(Geom_Surface) mysurface = ... ; 0058 //! GeomAdaptor_Surface S(mysurface); 0059 //! The bounding box B is then enlarged by adding this surface: 0060 //! Bnd_Box B; 0061 //! // ... 0062 //! Standard_Real Tol = ... ; 0063 //! AddSurface::Add ( S, Tol, B ); 0064 Standard_EXPORT static void Add (const Adaptor3d_Surface& S, const Standard_Real Tol, Bnd_Box& B); 0065 0066 //! Adds to the bounding box B the surface S 0067 //! the patch of the surface S limited in the u parametric 0068 //! direction by the two parameter values UMin, UMax, and 0069 //! in the v parametric direction by the two parameter 0070 //! values VMin, VMax. 0071 //! Note: depending on the type of curve, one of the following 0072 //! representations of the surface S is used to include it in the bounding box B: 0073 //! - an exact representation if S is built from a plane, a 0074 //! cylinder, a cone, a sphere or a torus, 0075 //! - the poles of the surface if S is built from a Bezier 0076 //! surface or a BSpline surface, 0077 //! - the points of an approximation of the surface S in 0078 //! cases other than offset surfaces; 0079 //! - in the case of an offset surface, the basis surface is first 0080 //! included according to the previous rules; then the 0081 //! bounding box is enlarged by the offset value. 0082 //! Warning 0083 //! Do not use these functions to add a non-finite surface to 0084 //! the bounding box B. 0085 //! If UMin, UMax, VMin or VMax is an infinite value B will become WholeSpace. 0086 //! S is an adapted surface, that is, an object which is an interface between: 0087 //! - the services provided by a surface from the package Geom 0088 //! - and those required of the surface by the computation algorithm. 0089 //! The adapted surface is created in the following way: 0090 //! Handle(Geom_Surface) mysurface = ... ; 0091 //! GeomAdaptor_Surface S(mysurface); 0092 //! The bounding box B is then enlarged by adding this surface: 0093 //! Bnd_Box B; 0094 //! // ... 0095 //! Standard_Real Tol = ... ; 0096 //! AddSurface::Add ( S, Tol, B ); 0097 Standard_EXPORT static void Add (const Adaptor3d_Surface& S, const Standard_Real UMin, const Standard_Real UMax, const Standard_Real VMin, const Standard_Real VMax, const Standard_Real Tol, Bnd_Box& B); 0098 0099 //! Adds the surface S to the bounding box B. 0100 //! This algorithm builds precise bounding box 0101 0102 Standard_EXPORT static void AddOptimal (const Adaptor3d_Surface& S, const Standard_Real Tol, Bnd_Box& B); 0103 0104 Standard_EXPORT static void AddOptimal (const Adaptor3d_Surface& S, 0105 const Standard_Real UMin, const Standard_Real UMax, 0106 const Standard_Real VMin, const Standard_Real VMax, 0107 const Standard_Real Tol, Bnd_Box& B); 0108 0109 0110 //! Adds to the bounding box B the surface S 0111 //! using numerical minimization algorithms 0112 //! This method is used in AddOptimal for not analytical surfaces and torus. 0113 //! if Tol < Precision::Confusion(), Precision::Confusion is used as computation tolerance 0114 Standard_EXPORT static void AddGenSurf(const Adaptor3d_Surface& S, 0115 const Standard_Real UMin, 0116 const Standard_Real UMax, 0117 const Standard_Real VMin, 0118 const Standard_Real VMax, 0119 const Standard_Real Tol, 0120 Bnd_Box& B); 0121 0122 protected: 0123 0124 0125 0126 0127 0128 private: 0129 0130 0131 0132 }; 0133 0134 0135 0136 0137 0138 0139 0140 #endif // _BndLib_AddSurface_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |