Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-04 09:15:58

0001 // Created on: 2000-06-07
0002 // Created by: Galina KULIKOVA
0003 // Copyright (c) 2000-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _ShapeUpgrade_FixSmallCurves_HeaderFile
0017 #define _ShapeUpgrade_FixSmallCurves_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 
0021 #include <Standard_Integer.hxx>
0022 #include <TopoDS_Edge.hxx>
0023 #include <TopoDS_Face.hxx>
0024 #include <ShapeUpgrade_Tool.hxx>
0025 #include <Standard_Real.hxx>
0026 #include <ShapeExtend_Status.hxx>
0027 class ShapeUpgrade_SplitCurve3d;
0028 class ShapeUpgrade_SplitCurve2d;
0029 class Geom_Curve;
0030 class Geom2d_Curve;
0031 
0032 // resolve name collisions with X11 headers
0033 #ifdef Status
0034   #undef Status
0035 #endif
0036 
0037 class ShapeUpgrade_FixSmallCurves : public ShapeUpgrade_Tool
0038 {
0039 
0040 public:
0041   Standard_EXPORT ShapeUpgrade_FixSmallCurves();
0042 
0043   Standard_EXPORT void Init(const TopoDS_Edge& theEdge, const TopoDS_Face& theFace);
0044 
0045   Standard_EXPORT virtual bool Approx(occ::handle<Geom_Curve>&   Curve3d,
0046                                       occ::handle<Geom2d_Curve>& Curve2d,
0047                                       occ::handle<Geom2d_Curve>& Curve2dR,
0048                                       double&                    First,
0049                                       double&                    Last);
0050 
0051   //! Sets the tool for splitting 3D curves.
0052   Standard_EXPORT void SetSplitCurve3dTool(
0053     const occ::handle<ShapeUpgrade_SplitCurve3d>& splitCurve3dTool);
0054 
0055   //! Sets the tool for splitting pcurves.
0056   Standard_EXPORT void SetSplitCurve2dTool(
0057     const occ::handle<ShapeUpgrade_SplitCurve2d>& splitCurve2dTool);
0058 
0059   //! Queries the status of last call to Perform
0060   //! OK   :
0061   //! DONE1:
0062   //! DONE2:
0063   //! FAIL1:
0064   Standard_EXPORT bool Status(const ShapeExtend_Status status) const;
0065 
0066   DEFINE_STANDARD_RTTIEXT(ShapeUpgrade_FixSmallCurves, ShapeUpgrade_Tool)
0067 
0068 protected:
0069   Standard_EXPORT virtual occ::handle<ShapeUpgrade_SplitCurve3d> GetSplitCurve3dTool() const;
0070 
0071   //! Returns the tool for splitting pcurves.
0072   Standard_EXPORT virtual occ::handle<ShapeUpgrade_SplitCurve2d> GetSplitCurve2dTool() const;
0073 
0074   int                                    myStatus;
0075   occ::handle<ShapeUpgrade_SplitCurve3d> mySplitCurve3dTool;
0076   occ::handle<ShapeUpgrade_SplitCurve2d> mySplitCurve2dTool;
0077   TopoDS_Edge                            myEdge;
0078   TopoDS_Face                            myFace;
0079 };
0080 
0081 #endif // _ShapeUpgrade_FixSmallCurves_HeaderFile