b311480e |
1 | // Created on: 1993-07-06 |
2 | // Created by: Remi LEQUETTE |
3 | // Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | // |
973c2be1 |
6 | // This file is part of Open CASCADE Technology software library. |
b311480e |
7 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | // |
973c2be1 |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | #include <BRep_CurveOn2Surfaces.ixx> |
18 | |
19 | |
20 | //======================================================================= |
21 | //function : BRep_CurveOn2Surfaces |
22 | //purpose : |
23 | //======================================================================= |
24 | |
25 | BRep_CurveOn2Surfaces::BRep_CurveOn2Surfaces(const Handle(Geom_Surface)& S1, |
26 | const Handle(Geom_Surface)& S2, |
27 | const TopLoc_Location& L1, |
28 | const TopLoc_Location& L2, |
29 | const GeomAbs_Shape C) : |
30 | BRep_CurveRepresentation(L1), |
31 | mySurface(S1), |
32 | mySurface2(S2), |
33 | myLocation2(L2), |
34 | myContinuity(C) |
35 | { |
36 | } |
37 | |
38 | //======================================================================= |
39 | //function : D0 |
40 | //purpose : |
41 | //======================================================================= |
42 | |
43 | void BRep_CurveOn2Surfaces::D0(const Standard_Real , gp_Pnt& )const |
44 | { |
45 | Standard_NullObject::Raise("BRep_CurveOn2Surfaces::D0"); |
46 | } |
47 | |
48 | |
49 | //======================================================================= |
50 | //function : IsRegularity |
51 | //purpose : |
52 | //======================================================================= |
53 | |
54 | Standard_Boolean BRep_CurveOn2Surfaces::IsRegularity()const |
55 | { |
56 | return Standard_True; |
57 | } |
58 | |
59 | |
60 | //======================================================================= |
61 | //function : IsRegularity |
62 | //purpose : |
63 | //======================================================================= |
64 | |
65 | Standard_Boolean BRep_CurveOn2Surfaces::IsRegularity |
857ffd5e |
66 | (const Handle(Geom_Surface)& S1, |
67 | const Handle(Geom_Surface)& S2, |
7fd59977 |
68 | const TopLoc_Location& L1, |
69 | const TopLoc_Location& L2)const |
70 | { |
71 | return ((mySurface == S1 && mySurface2 == S2 && |
72 | myLocation == L1 && myLocation2 == L2) || |
73 | (mySurface == S2 && mySurface2 == S1 && |
74 | myLocation == L2 && myLocation2 == L1)); |
75 | } |
76 | |
77 | |
78 | //======================================================================= |
79 | //function : Surface |
80 | //purpose : |
81 | //======================================================================= |
82 | |
83 | const Handle(Geom_Surface)& BRep_CurveOn2Surfaces::Surface()const |
84 | { |
85 | return mySurface; |
86 | } |
87 | |
88 | //======================================================================= |
89 | //function : Surface2 |
90 | //purpose : |
91 | //======================================================================= |
92 | |
93 | const Handle(Geom_Surface)& BRep_CurveOn2Surfaces::Surface2()const |
94 | { |
95 | return mySurface2; |
96 | } |
97 | |
98 | |
99 | //======================================================================= |
100 | //function : Location2 |
101 | //purpose : |
102 | //======================================================================= |
103 | |
104 | const TopLoc_Location& BRep_CurveOn2Surfaces::Location2()const |
105 | { |
106 | return myLocation2; |
107 | } |
108 | |
109 | //======================================================================= |
110 | //function : Continuity |
111 | //purpose : |
112 | //======================================================================= |
113 | |
114 | const GeomAbs_Shape& BRep_CurveOn2Surfaces::Continuity()const |
115 | { |
116 | return myContinuity; |
117 | } |
118 | |
119 | //======================================================================= |
120 | //function : Continuity |
121 | //purpose : |
122 | //======================================================================= |
123 | |
124 | void BRep_CurveOn2Surfaces::Continuity(const GeomAbs_Shape C) |
125 | { |
126 | myContinuity = C; |
127 | } |
128 | |
129 | |
130 | //======================================================================= |
131 | //function : Copy |
132 | //purpose : |
133 | //======================================================================= |
134 | |
135 | Handle(BRep_CurveRepresentation) BRep_CurveOn2Surfaces::Copy() const |
136 | { |
137 | Handle(BRep_CurveOn2Surfaces) C = new |
138 | BRep_CurveOn2Surfaces(Surface(),Surface2(), |
139 | Location(),Location2(), |
140 | myContinuity); |
141 | return C; |
142 | } |