1 // Created on: 2000-06-07
2 // Created by: Galina KULIKOVA
3 // Copyright (c) 2000-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15 
16 #ifndef _ShapeUpgrade_FixSmallCurves_HeaderFile
17 #define _ShapeUpgrade_FixSmallCurves_HeaderFile
18 
19 #include <Standard.hxx>
20 #include <Standard_Type.hxx>
21 
22 #include <Standard_Integer.hxx>
23 #include <TopoDS_Edge.hxx>
24 #include <TopoDS_Face.hxx>
25 #include <ShapeUpgrade_Tool.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <Standard_Real.hxx>
28 #include <ShapeExtend_Status.hxx>
29 class ShapeUpgrade_SplitCurve3d;
30 class ShapeUpgrade_SplitCurve2d;
31 class Geom_Curve;
32 class Geom2d_Curve;
33 
34 // resolve name collisions with X11 headers
35 #ifdef Status
36   #undef Status
37 #endif
38 
39 class ShapeUpgrade_FixSmallCurves;
40 DEFINE_STANDARD_HANDLE(ShapeUpgrade_FixSmallCurves, ShapeUpgrade_Tool)
41 
42 
43 class ShapeUpgrade_FixSmallCurves : public ShapeUpgrade_Tool
44 {
45 
46 public:
47 
48 
49   Standard_EXPORT ShapeUpgrade_FixSmallCurves();
50 
51   Standard_EXPORT void Init (const TopoDS_Edge& theEdge, const TopoDS_Face& theFace);
52 
53   Standard_EXPORT virtual Standard_Boolean Approx (Handle(Geom_Curve)& Curve3d, Handle(Geom2d_Curve)& Curve2d, Handle(Geom2d_Curve)& Curve2dR, Standard_Real& First, Standard_Real& Last);
54 
55   //! Sets the tool for splitting 3D curves.
56   Standard_EXPORT void SetSplitCurve3dTool (const Handle(ShapeUpgrade_SplitCurve3d)& splitCurve3dTool);
57 
58   //! Sets the tool for splitting pcurves.
59   Standard_EXPORT void SetSplitCurve2dTool (const Handle(ShapeUpgrade_SplitCurve2d)& splitCurve2dTool);
60 
61   //! Queries the status of last call to Perform
62   //! OK   :
63   //! DONE1:
64   //! DONE2:
65   //! FAIL1:
66   Standard_EXPORT Standard_Boolean Status (const ShapeExtend_Status status) const;
67 
68 
69 
70 
71   DEFINE_STANDARD_RTTIEXT(ShapeUpgrade_FixSmallCurves,ShapeUpgrade_Tool)
72 
73 protected:
74 
75 
76   Standard_EXPORT virtual Handle(ShapeUpgrade_SplitCurve3d) GetSplitCurve3dTool() const;
77 
78   //! Returns the tool for splitting pcurves.
79   Standard_EXPORT virtual Handle(ShapeUpgrade_SplitCurve2d) GetSplitCurve2dTool() const;
80 
81   Standard_Integer myStatus;
82   Handle(ShapeUpgrade_SplitCurve3d) mySplitCurve3dTool;
83   Handle(ShapeUpgrade_SplitCurve2d) mySplitCurve2dTool;
84   TopoDS_Edge myEdge;
85   TopoDS_Face myFace;
86 
87 
88 private:
89 
90 
91 
92 
93 };
94 
95 
96 
97 
98 
99 
100 
101 #endif // _ShapeUpgrade_FixSmallCurves_HeaderFile
102