b311480e |
1 | // Created on: 2000-06-07 |
2 | // Created by: Galina KULIKOVA |
973c2be1 |
3 | // Copyright (c) 2000-2014 OPEN CASCADE SAS |
b311480e |
4 | // |
973c2be1 |
5 | // This file is part of Open CASCADE Technology software library. |
b311480e |
6 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
12 | // |
973c2be1 |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
7fd59977 |
15 | |
42cf5bc1 |
16 | |
17 | #include <Geom2d_Curve.hxx> |
18 | #include <Geom_Curve.hxx> |
19 | #include <ShapeUpgrade_FixSmallCurves.hxx> |
20 | #include <ShapeUpgrade_SplitCurve2d.hxx> |
21 | #include <ShapeUpgrade_SplitCurve3d.hxx> |
22 | #include <Standard_Type.hxx> |
23 | #include <TopoDS_Edge.hxx> |
24 | #include <TopoDS_Face.hxx> |
25 | |
92efcf78 |
26 | IMPLEMENT_STANDARD_RTTIEXT(ShapeUpgrade_FixSmallCurves,ShapeUpgrade_Tool) |
27 | |
7fd59977 |
28 | //#include <TColGeom_HArray1OfCurve.hxx> |
29 | //#include <TColStd_HSequenceOfReal.hxx> |
30 | #//include <TColGeom2d_HArray1OfCurve.hxx> |
31 | //#include <TColStd_HSequenceOfReal.hxx> |
32 | #include <ShapeExtend.hxx> |
33 | #include <TopoDS_Edge.hxx> |
34 | #include <TopoDS_Face.hxx> |
35 | #include <Geom_Curve.hxx> |
36 | #include <Geom2d_Curve.hxx> |
37 | #include <ShapeUpgrade_SplitCurve3d.hxx> |
38 | #include <ShapeUpgrade_SplitCurve2d.hxx> |
39 | |
40 | //======================================================================= |
41 | //function : ShapeUpgrade_FixSmallCurves |
42 | //purpose : |
43 | //======================================================================= |
44 | |
45 | ShapeUpgrade_FixSmallCurves::ShapeUpgrade_FixSmallCurves() |
46 | { |
47 | myStatus = ShapeExtend::EncodeStatus ( ShapeExtend_OK ); |
48 | } |
49 | //======================================================================= |
50 | //function : Init |
51 | //purpose : |
52 | //======================================================================= |
53 | |
54 | void ShapeUpgrade_FixSmallCurves::Init(const TopoDS_Edge& theEdge,const TopoDS_Face& theFace) |
55 | { |
56 | myEdge = theEdge; |
57 | myFace = theFace; |
58 | } |
59 | |
60 | |
61 | //======================================================================= |
62 | //function : Perform |
63 | //purpose : |
64 | //======================================================================= |
65 | |
66 | Standard_Boolean ShapeUpgrade_FixSmallCurves::Approx(Handle(Geom_Curve)& /*Curve3d*/, |
67 | Handle(Geom2d_Curve)& /*Curve2d*/, |
68 | Handle(Geom2d_Curve)& /*Curve2dR*/, |
69 | Standard_Real& /*First*/, |
70 | Standard_Real& /*Last*/) |
71 | { |
72 | return Standard_False; |
73 | } |
74 | |
75 | //======================================================================= |
76 | //function : SetSplitCurve3dTool |
77 | //purpose : |
78 | //======================================================================= |
79 | |
80 | void ShapeUpgrade_FixSmallCurves::SetSplitCurve3dTool(const Handle(ShapeUpgrade_SplitCurve3d)& splitCurve3dTool) |
81 | { |
82 | mySplitCurve3dTool = splitCurve3dTool; |
83 | } |
84 | |
85 | //======================================================================= |
86 | //function : SetSplitCurve2dTool |
87 | //purpose : |
88 | //======================================================================= |
89 | |
90 | void ShapeUpgrade_FixSmallCurves::SetSplitCurve2dTool(const Handle(ShapeUpgrade_SplitCurve2d)& splitCurve2dTool) |
91 | { |
92 | mySplitCurve2dTool = splitCurve2dTool; |
93 | } |
94 | |
95 | //======================================================================= |
96 | //function : GetSplitCurve3dTool |
97 | //purpose : |
98 | //======================================================================= |
99 | |
100 | Handle(ShapeUpgrade_SplitCurve3d) ShapeUpgrade_FixSmallCurves::GetSplitCurve3dTool() const |
101 | { |
102 | return mySplitCurve3dTool; |
103 | } |
104 | |
105 | //======================================================================= |
106 | //function : GetSplitCurve2dTool |
107 | //purpose : |
108 | //======================================================================= |
109 | |
110 | Handle(ShapeUpgrade_SplitCurve2d) ShapeUpgrade_FixSmallCurves::GetSplitCurve2dTool() const |
111 | { |
112 | return mySplitCurve2dTool; |
113 | } |
114 | //======================================================================= |
115 | //function : Status |
116 | //purpose : |
117 | //======================================================================= |
118 | |
119 | Standard_Boolean ShapeUpgrade_FixSmallCurves::Status(const ShapeExtend_Status status) const |
120 | { |
121 | return ShapeExtend::DecodeStatus ( myStatus, status ); |
122 | } |