|
||||
File indexing completed on 2025-01-18 10:03:12
0001 // Created on: 1994-07-22 0002 // Created by: Remi LEQUETTE 0003 // Copyright (c) 1994-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 _BRepLib_FindSurface_HeaderFile 0018 #define _BRepLib_FindSurface_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <TopLoc_Location.hxx> 0025 class Geom_Surface; 0026 class TopoDS_Shape; 0027 0028 0029 //! Provides an algorithm to find a Surface through a 0030 //! set of edges. 0031 //! 0032 //! The edges of the shape given as argument are 0033 //! explored if they are not coplanar at the required 0034 //! tolerance the method Found returns false. 0035 //! 0036 //! If a null tolerance is given the max of the edges 0037 //! tolerances is used. 0038 //! 0039 //! The method Tolerance returns the true distance of 0040 //! the edges to the Surface. 0041 //! 0042 //! The method Surface returns the Surface if found. 0043 //! 0044 //! The method Existed returns returns True if the 0045 //! Surface was already attached to some of the edges. 0046 //! 0047 //! When Existed returns True the Surface may have a 0048 //! location given by the Location method. 0049 class BRepLib_FindSurface 0050 { 0051 public: 0052 0053 DEFINE_STANDARD_ALLOC 0054 0055 0056 Standard_EXPORT BRepLib_FindSurface(); 0057 0058 //! Computes the Surface from the edges of <S> with the 0059 //! given tolerance. 0060 //! if <OnlyPlane> is true, the computed surface will be 0061 //! a plane. If it is not possible to find a plane, the 0062 //! flag NotDone will be set. 0063 //! If <OnlyClosed> is true, then S should be a wire 0064 //! and the existing surface, on which wire S is not 0065 //! closed in 2D, will be ignored. 0066 Standard_EXPORT BRepLib_FindSurface(const TopoDS_Shape& S, const Standard_Real Tol = -1, const Standard_Boolean OnlyPlane = Standard_False, const Standard_Boolean OnlyClosed = Standard_False); 0067 0068 //! Computes the Surface from the edges of <S> with the 0069 //! given tolerance. 0070 //! if <OnlyPlane> is true, the computed surface will be 0071 //! a plane. If it is not possible to find a plane, the 0072 //! flag NotDone will be set. 0073 //! If <OnlyClosed> is true, then S should be a wire 0074 //! and the existing surface, on which wire S is not 0075 //! closed in 2D, will be ignored. 0076 Standard_EXPORT void Init (const TopoDS_Shape& S, const Standard_Real Tol = -1, const Standard_Boolean OnlyPlane = Standard_False, const Standard_Boolean OnlyClosed = Standard_False); 0077 0078 Standard_EXPORT Standard_Boolean Found() const; 0079 0080 Standard_EXPORT Handle(Geom_Surface) Surface() const; 0081 0082 Standard_EXPORT Standard_Real Tolerance() const; 0083 0084 Standard_EXPORT Standard_Real ToleranceReached() const; 0085 0086 Standard_EXPORT Standard_Boolean Existed() const; 0087 0088 Standard_EXPORT TopLoc_Location Location() const; 0089 0090 0091 0092 0093 protected: 0094 0095 0096 0097 0098 0099 private: 0100 0101 0102 0103 Handle(Geom_Surface) mySurface; 0104 Standard_Real myTolerance; 0105 Standard_Real myTolReached; 0106 Standard_Boolean isExisted; 0107 TopLoc_Location myLocation; 0108 0109 0110 }; 0111 0112 0113 0114 0115 0116 0117 0118 #endif // _BRepLib_FindSurface_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |