Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:58

0001 // Created on: 1999-08-31
0002 // Created by: Pavel DURANDIN
0003 // Copyright (c) 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 _ShapeUpgrade_Tool_HeaderFile
0018 #define _ShapeUpgrade_Tool_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Transient.hxx>
0024 class ShapeBuild_ReShape;
0025 
0026 
0027 class ShapeUpgrade_Tool;
0028 DEFINE_STANDARD_HANDLE(ShapeUpgrade_Tool, Standard_Transient)
0029 
0030 //! Tool is a root class for splitting classes
0031 //! Provides context for recording changes, basic
0032 //! precision value and limit (minimal and maximal)
0033 //! values for tolerances
0034 class ShapeUpgrade_Tool : public Standard_Transient
0035 {
0036 
0037 public:
0038 
0039   
0040   //! Empty constructor
0041   Standard_EXPORT ShapeUpgrade_Tool();
0042   
0043   //! Copy all fields from another Root object
0044   Standard_EXPORT void Set (const Handle(ShapeUpgrade_Tool)& tool);
0045   
0046   //! Sets context
0047     void SetContext (const Handle(ShapeBuild_ReShape)& context);
0048   
0049   //! Returns context
0050     Handle(ShapeBuild_ReShape) Context() const;
0051   
0052   //! Sets basic precision value
0053     void SetPrecision (const Standard_Real preci);
0054   
0055   //! Returns basic precision value
0056     Standard_Real Precision() const;
0057   
0058   //! Sets minimal allowed tolerance
0059     void SetMinTolerance (const Standard_Real mintol);
0060   
0061   //! Returns minimal allowed tolerance
0062     Standard_Real MinTolerance() const;
0063   
0064   //! Sets maximal allowed tolerance
0065     void SetMaxTolerance (const Standard_Real maxtol);
0066   
0067   //! Returns maximal allowed tolerance
0068     Standard_Real MaxTolerance() const;
0069   
0070   //! Returns tolerance limited by [myMinTol,myMaxTol]
0071     Standard_Real LimitTolerance (const Standard_Real toler) const;
0072 
0073 
0074 
0075 
0076   DEFINE_STANDARD_RTTIEXT(ShapeUpgrade_Tool,Standard_Transient)
0077 
0078 protected:
0079 
0080 
0081 
0082 
0083 private:
0084 
0085 
0086   Handle(ShapeBuild_ReShape) myContext;
0087   Standard_Real myPrecision;
0088   Standard_Real myMinTol;
0089   Standard_Real myMaxTol;
0090 
0091 
0092 };
0093 
0094 
0095 #include <ShapeUpgrade_Tool.lxx>
0096 
0097 
0098 
0099 
0100 
0101 #endif // _ShapeUpgrade_Tool_HeaderFile