|
|
|||
File indexing completed on 2026-09-28 09:19:24
0001 // Created on: 1993-07-08 0002 // Created by: Isabelle GRIGNON 0003 // Copyright (c) 1993-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_Add3dCurve_HeaderFile 0018 #define _BndLib_Add3dCurve_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 0023 // 0024 class Adaptor3d_Curve; 0025 class Bnd_Box; 0026 0027 //! Computes the bounding box for a curve in 3d. 0028 //! Functions to add a 3D curve to a bounding box. 0029 //! The 3D curve is defined from a Geom curve. 0030 class BndLib_Add3dCurve 0031 { 0032 public: 0033 DEFINE_STANDARD_ALLOC 0034 0035 //! Adds to the bounding box B the curve C 0036 //! B is then enlarged by the tolerance value Tol. 0037 //! Note: depending on the type of curve, one of the following 0038 //! representations of the curve C is used to include it in the bounding box B: 0039 //! - an exact representation if C is built from a line, a circle or a conic curve, 0040 //! - the poles of the curve if C is built from a Bezier curve or a BSpline curve, 0041 //! if not, the points of an approximation of the curve C. 0042 //! Warning 0043 //! C is an adapted curve, that is, an object which is an interface between: 0044 //! - the services provided by a 3D curve from the package Geom 0045 //! - and those required of the curve by the computation algorithm. 0046 //! The adapted curve is created in the following way: 0047 //! occ::handle<Geom_Curve> mycurve = ... ; 0048 //! GeomAdaptor_Curve C(mycurve); 0049 //! The bounding box B is then enlarged by adding it: 0050 //! Bnd_Box B; 0051 //! // ... 0052 //! double Tol = ... ; 0053 //! Add3dCurve::Add ( C, Tol, B ); 0054 //! Exceptions 0055 //! Standard_Failure if the curve is built from: 0056 //! - a Geom_Line, or 0057 //! - a Geom_Parabola, or 0058 //! - a Geom_Hyperbola, 0059 //! and P1 and P2 are either two negative infinite real 0060 //! numbers, or two positive infinite real numbers. 0061 Standard_EXPORT static void Add(const Adaptor3d_Curve& C, const double Tol, Bnd_Box& B); 0062 0063 //! Adds to the bounding box B the curve C 0064 //! the arc of the curve C limited by the two parameter values P1 and P2. 0065 //! Note: depending on the type of curve, one of the following 0066 //! representations of the curve C is used to include it in the bounding box B: 0067 //! - an exact representation if C is built from a line, a circle or a conic curve, 0068 //! - the poles of the curve if C is built from a Bezier curve or a BSpline curve, 0069 //! if not, the points of an approximation of the curve C. 0070 //! Warning 0071 //! C is an adapted curve, that is, an object which is an interface between: 0072 //! - the services provided by a 3D curve from the package Geom 0073 //! - and those required of the curve by the computation algorithm. 0074 //! The adapted curve is created in the following way: 0075 //! occ::handle<Geom_Curve> mycurve = ... ; 0076 //! GeomAdaptor_Curve C(mycurve); 0077 //! The bounding box B is then enlarged by adding it: 0078 //! Bnd_Box B; 0079 //! // ... 0080 //! double Tol = ... ; 0081 //! Add3dCurve::Add ( C, Tol, B ); 0082 //! Exceptions 0083 //! Standard_Failure if the curve is built from: 0084 //! - a Geom_Line, or 0085 //! - a Geom_Parabola, or 0086 //! - a Geom_Hyperbola, 0087 //! and P1 and P2 are either two negative infinite real 0088 //! numbers, or two positive infinite real numbers. 0089 Standard_EXPORT static void Add(const Adaptor3d_Curve& C, 0090 const double U1, 0091 const double U2, 0092 const double Tol, 0093 Bnd_Box& B); 0094 0095 //! Adds to the bounding box B the curve C 0096 //! These methods use more precise algorithms for building bnd box 0097 //! then methods Add(...) 0098 Standard_EXPORT static void AddOptimal(const Adaptor3d_Curve& C, const double Tol, Bnd_Box& B); 0099 Standard_EXPORT static void AddOptimal(const Adaptor3d_Curve& C, 0100 const double U1, 0101 const double U2, 0102 const double Tol, 0103 Bnd_Box& B); 0104 }; 0105 0106 #endif // _BndLib_Add3dCurve_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|