1 // Created on: 1993-11-10
2 // Created by: Jean Yves LEBEY
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 under
9 // the terms of the GNU Lesser General Public License 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
18 #include <gp_Pnt.hxx>
19 #include <gp_Pnt2d.hxx>
20 #include <IntSurf_PntOn2S.hxx>
21 #include <TopOpeBRep_WPointInter.hxx>
22
23 //=======================================================================
24 //function : WPointInter
25 //purpose :
26 //=======================================================================
TopOpeBRep_WPointInter()27 TopOpeBRep_WPointInter::TopOpeBRep_WPointInter()
28 {}
29
30 //=======================================================================
31 //function : Set
32 //purpose :
33 //=======================================================================
34
Set(const IntSurf_PntOn2S & P)35 void TopOpeBRep_WPointInter::Set(const IntSurf_PntOn2S& P)
36 {
37 myPP2S = (IntSurf_PntOn2S*)&P;
38 }
39
40 //=======================================================================
41 //function : ParametersOnS1
42 //purpose :
43 //=======================================================================
44
ParametersOnS1(Standard_Real & U1,Standard_Real & V1) const45 void TopOpeBRep_WPointInter::ParametersOnS1
46 (Standard_Real& U1, Standard_Real& V1) const
47 {
48 myPP2S->ParametersOnS1(U1,V1);
49 }
50
51 //=======================================================================
52 //function : ParametersOnS2
53 //purpose :
54 //=======================================================================
55
ParametersOnS2(Standard_Real & U2,Standard_Real & V2) const56 void TopOpeBRep_WPointInter::ParametersOnS2
57 (Standard_Real& U2, Standard_Real& V2) const
58 {
59 myPP2S->ParametersOnS2(U2,V2);
60 }
61
62 //=======================================================================
63 //function : Parameters
64 //purpose :
65 //=======================================================================
66
Parameters(Standard_Real & U1,Standard_Real & V1,Standard_Real & U2,Standard_Real & V2) const67 void TopOpeBRep_WPointInter::Parameters
68 (Standard_Real& U1, Standard_Real& V1,
69 Standard_Real& U2, Standard_Real& V2) const
70 {
71 myPP2S->Parameters(U1,V1,U2,V2);
72 }
73
74 //=======================================================================
75 //function : ValueOnS1
76 //purpose :
77 //=======================================================================
78
ValueOnS1() const79 gp_Pnt2d TopOpeBRep_WPointInter::ValueOnS1() const
80 {
81 Standard_Real u,v;
82 myPP2S->ParametersOnS1(u,v);
83 return gp_Pnt2d(u,v);
84 }
85
86 //=======================================================================
87 //function : ValueOnS2
88 //purpose :
89 //=======================================================================
90
ValueOnS2() const91 gp_Pnt2d TopOpeBRep_WPointInter::ValueOnS2() const
92 {
93 Standard_Real u,v;
94 myPP2S->ParametersOnS2(u,v);
95 return gp_Pnt2d(u,v);
96 }
97
98 //=======================================================================
99 //function : Value
100 //purpose :
101 //=======================================================================
102
Value() const103 const gp_Pnt& TopOpeBRep_WPointInter::Value() const
104 {
105 return myPP2S->Value();
106 }
107
PPntOn2SDummy() const108 TopOpeBRep_PPntOn2S TopOpeBRep_WPointInter::PPntOn2SDummy() const { return myPP2S; }
109