Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1998-07-22
0002 // Created by: data exchange team
0003 // Copyright (c) 1998-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 _ShapeFix_ShapeTolerance_HeaderFile
0018 #define _ShapeFix_ShapeTolerance_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <TopAbs_ShapeEnum.hxx>
0024 class TopoDS_Shape;
0025 
0026 
0027 //! Modifies tolerances of sub-shapes (vertices, edges, faces)
0028 class ShapeFix_ShapeTolerance 
0029 {
0030 public:
0031 
0032   DEFINE_STANDARD_ALLOC
0033 
0034   
0035   Standard_EXPORT ShapeFix_ShapeTolerance();
0036   
0037   //! Limits tolerances in a shape as follows :
0038   //! tmin = tmax -> as SetTolerance (forces)
0039   //! tmin = 0   -> maximum tolerance will be <tmax>
0040   //! tmax = 0 or not given (more generally, tmax < tmin) ->
0041   //! <tmax> ignored, minimum will be <tmin>
0042   //! else, maximum will be <max> and minimum will be <min>
0043   //! styp = VERTEX : only vertices are set
0044   //! styp = EDGE   : only edges are set
0045   //! styp = FACE   : only faces are set
0046   //! styp = WIRE   : to have edges and their vertices set
0047   //! styp = other value : all (vertices,edges,faces) are set
0048   //! Returns True if at least one tolerance of the sub-shape has
0049   //! been modified
0050   Standard_EXPORT Standard_Boolean LimitTolerance (const TopoDS_Shape& shape, const Standard_Real tmin, const Standard_Real tmax = 0.0, const TopAbs_ShapeEnum styp = TopAbs_SHAPE) const;
0051   
0052   //! Sets (enforces) tolerances in a shape to the given value
0053   //! styp = VERTEX : only vertices are set
0054   //! styp = EDGE   : only edges are set
0055   //! styp = FACE   : only faces are set
0056   //! styp = WIRE   : to have edges and their vertices set
0057   //! styp = other value : all (vertices,edges,faces) are set
0058   Standard_EXPORT void SetTolerance (const TopoDS_Shape& shape, const Standard_Real preci, const TopAbs_ShapeEnum styp = TopAbs_SHAPE) const;
0059 
0060 
0061 
0062 
0063 protected:
0064 
0065 
0066 
0067 
0068 
0069 private:
0070 
0071 
0072 
0073 
0074 
0075 };
0076 
0077 
0078 
0079 
0080 
0081 
0082 
0083 #endif // _ShapeFix_ShapeTolerance_HeaderFile