|
||||
File indexing completed on 2025-01-18 10:03:09
0001 // Created on: 1995-11-02 0002 // Created by: Jing Cheng MEI 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 _BRepBuilderAPI_FindPlane_HeaderFile 0018 #define _BRepBuilderAPI_FindPlane_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 class Geom_Plane; 0025 class TopoDS_Shape; 0026 0027 0028 //! Describes functions to find the plane in which the edges 0029 //! of a given shape are located. 0030 //! A FindPlane object provides a framework for: 0031 //! - extracting the edges of a given shape, 0032 //! - implementing the construction algorithm, and 0033 //! - consulting the result. 0034 class BRepBuilderAPI_FindPlane 0035 { 0036 public: 0037 0038 DEFINE_STANDARD_ALLOC 0039 0040 0041 //! Initializes an empty algorithm. The function Init is then used to define the shape. 0042 Standard_EXPORT BRepBuilderAPI_FindPlane(); 0043 0044 //! Constructs the plane containing the edges of the shape S. 0045 //! A plane is built only if all the edges are within a distance 0046 //! of less than or equal to tolerance from a planar surface. 0047 //! This tolerance value is equal to the larger of the following two values: 0048 //! - Tol, where the default value is negative, or 0049 //! - the largest of the tolerance values assigned to the individual edges of S. 0050 //! Use the function Found to verify that a plane is built. 0051 //! The resulting plane is then retrieved using the function Plane. 0052 Standard_EXPORT BRepBuilderAPI_FindPlane(const TopoDS_Shape& S, const Standard_Real Tol = -1); 0053 0054 //! Constructs the plane containing the edges of the shape S. 0055 //! A plane is built only if all the edges are within a distance 0056 //! of less than or equal to tolerance from a planar surface. 0057 //! This tolerance value is equal to the larger of the following two values: 0058 //! - Tol, where the default value is negative, or 0059 //! - the largest of the tolerance values assigned to the individual edges of S. 0060 //! Use the function Found to verify that a plane is built. 0061 //! The resulting plane is then retrieved using the function Plane. 0062 Standard_EXPORT void Init (const TopoDS_Shape& S, const Standard_Real Tol = -1); 0063 0064 //! Returns true if a plane containing the edges of the 0065 //! shape is found and built. Use the function Plane to consult the result. 0066 Standard_EXPORT Standard_Boolean Found() const; 0067 0068 //! Returns the plane containing the edges of the shape. 0069 //! Warning 0070 //! Use the function Found to verify that the plane is built. If 0071 //! a plane is not found, Plane returns a null handle. 0072 Standard_EXPORT Handle(Geom_Plane) Plane() const; 0073 0074 0075 0076 0077 protected: 0078 0079 0080 0081 0082 0083 private: 0084 0085 0086 0087 Handle(Geom_Plane) myPlane; 0088 0089 0090 }; 0091 0092 0093 0094 0095 0096 0097 0098 #endif // _BRepBuilderAPI_FindPlane_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |