Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-17 09:21:53

0001 // Created on: 1999-03-09
0002 // Created by: Roman LYGIN
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 _ShapeCustom_TrsfModification_HeaderFile
0018 #define _ShapeCustom_TrsfModification_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <BRepTools_TrsfModification.hxx>
0024 class gp_Trsf;
0025 class TopoDS_Face;
0026 class Geom_Surface;
0027 class TopLoc_Location;
0028 class TopoDS_Edge;
0029 class Geom_Curve;
0030 class TopoDS_Vertex;
0031 class gp_Pnt;
0032 class Geom2d_Curve;
0033 
0034 //! Complements BRepTools_TrsfModification to provide reversible
0035 //! scaling regarding tolerances.
0036 //! Uses actual tolerances (attached to the shapes) not ones
0037 //! returned by BRep_Tool::Tolerance to work with tolerances
0038 //! lower than Precision::Confusion.
0039 class ShapeCustom_TrsfModification : public BRepTools_TrsfModification
0040 {
0041 
0042 public:
0043   //! Empty constructor
0044   Standard_EXPORT ShapeCustom_TrsfModification(const gp_Trsf& T);
0045 
0046   //! Calls inherited method.
0047   //! Sets <Tol> as actual tolerance of <F> multiplied with scale
0048   //! factor.
0049   Standard_EXPORT bool NewSurface(const TopoDS_Face&         F,
0050                                   occ::handle<Geom_Surface>& S,
0051                                   TopLoc_Location&           L,
0052                                   double&                    Tol,
0053                                   bool&                      RevWires,
0054                                   bool&                      RevFace) override;
0055 
0056   //! Calls inherited method.
0057   //! Sets <Tol> as actual tolerance of <E> multiplied with scale
0058   //! factor.
0059   Standard_EXPORT bool NewCurve(const TopoDS_Edge&       E,
0060                                 occ::handle<Geom_Curve>& C,
0061                                 TopLoc_Location&         L,
0062                                 double&                  Tol) override;
0063 
0064   //! Calls inherited method.
0065   //! Sets <Tol> as actual tolerance of <V> multiplied with scale
0066   //! factor.
0067   Standard_EXPORT bool NewPoint(const TopoDS_Vertex& V, gp_Pnt& P, double& Tol) override;
0068 
0069   //! Calls inherited method.
0070   //! Sets <Tol> as actual tolerance of <E> multiplied with scale
0071   //! factor.
0072   Standard_EXPORT bool NewCurve2d(const TopoDS_Edge&         E,
0073                                   const TopoDS_Face&         F,
0074                                   const TopoDS_Edge&         NewE,
0075                                   const TopoDS_Face&         NewF,
0076                                   occ::handle<Geom2d_Curve>& C,
0077                                   double&                    Tol) override;
0078 
0079   //! Calls inherited method.
0080   //! Sets <Tol> as actual tolerance of <V> multiplied with scale
0081   //! factor.
0082   Standard_EXPORT bool NewParameter(const TopoDS_Vertex& V,
0083                                     const TopoDS_Edge&   E,
0084                                     double&              P,
0085                                     double&              Tol) override;
0086 
0087   DEFINE_STANDARD_RTTIEXT(ShapeCustom_TrsfModification, BRepTools_TrsfModification)
0088 };
0089 
0090 #endif // _ShapeCustom_TrsfModification_HeaderFile