0024530: TKMesh - remove unused package IntPoly
[occt.git] / src / BRepAdaptor / BRepAdaptor_Curve2d.cxx
1 // Created on: 1993-07-13
2 // Created by: Remi LEQUETTE
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and / or modify it
9 // under the terms of the GNU Lesser General Public version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #include <BRepAdaptor_Curve2d.ixx>
18 #include <BRep_Tool.hxx>
19
20 //=======================================================================
21 //function : BRepAdaptor_Curve2d
22 //purpose  : 
23 //=======================================================================
24
25 BRepAdaptor_Curve2d::BRepAdaptor_Curve2d() 
26 {
27 }
28
29
30 //=======================================================================
31 //function : BRepAdaptor_Curve2d
32 //purpose  : 
33 //=======================================================================
34
35 BRepAdaptor_Curve2d::BRepAdaptor_Curve2d(const TopoDS_Edge& E, 
36                                          const TopoDS_Face& F) 
37 {
38   Initialize(E,F);
39 }
40
41
42 //=======================================================================
43 //function : Initialize
44 //purpose  : 
45 //=======================================================================
46
47 void  BRepAdaptor_Curve2d::Initialize(const TopoDS_Edge& E, 
48                                       const TopoDS_Face& F)
49 {
50   myEdge = E;
51   myFace = F;
52   Standard_Real pf,pl;
53   const Handle(Geom2d_Curve) PC = BRep_Tool::CurveOnSurface(E,F,pf,pl);
54   Geom2dAdaptor_Curve::Load(PC,pf,pl);
55 }
56
57 //=======================================================================
58 //function : Edge
59 //purpose  : 
60 //=======================================================================
61
62 const TopoDS_Edge& BRepAdaptor_Curve2d::Edge() const
63 {
64   return myEdge;
65 }
66
67 //=======================================================================
68 //function : Face
69 //purpose  : 
70 //=======================================================================
71
72 const TopoDS_Face& BRepAdaptor_Curve2d::Face() const
73 {
74   return myFace;
75 }
76
77