0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / BRep / BRep_CurveOn2Surfaces.cxx
CommitLineData
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
7fd59977 17
42cf5bc1 18#include <BRep_CurveOn2Surfaces.hxx>
19#include <BRep_CurveRepresentation.hxx>
20#include <Geom_Surface.hxx>
21#include <gp_Pnt.hxx>
22#include <Standard_NullObject.hxx>
23#include <Standard_Type.hxx>
24#include <TopLoc_Location.hxx>
7fd59977 25
26//=======================================================================
27//function : BRep_CurveOn2Surfaces
28//purpose :
29//=======================================================================
7fd59977 30BRep_CurveOn2Surfaces::BRep_CurveOn2Surfaces(const Handle(Geom_Surface)& S1,
31 const Handle(Geom_Surface)& S2,
32 const TopLoc_Location& L1,
33 const TopLoc_Location& L2,
34 const GeomAbs_Shape C) :
35 BRep_CurveRepresentation(L1),
36 mySurface(S1),
37 mySurface2(S2),
38 myLocation2(L2),
39 myContinuity(C)
40{
41}
42
43//=======================================================================
44//function : D0
45//purpose :
46//=======================================================================
47
48void BRep_CurveOn2Surfaces::D0(const Standard_Real , gp_Pnt& )const
49{
50 Standard_NullObject::Raise("BRep_CurveOn2Surfaces::D0");
51}
52
53
54//=======================================================================
55//function : IsRegularity
56//purpose :
57//=======================================================================
58
59Standard_Boolean BRep_CurveOn2Surfaces::IsRegularity()const
60{
61 return Standard_True;
62}
63
64
65//=======================================================================
66//function : IsRegularity
67//purpose :
68//=======================================================================
69
70Standard_Boolean BRep_CurveOn2Surfaces::IsRegularity
857ffd5e 71 (const Handle(Geom_Surface)& S1,
72 const Handle(Geom_Surface)& S2,
7fd59977 73 const TopLoc_Location& L1,
74 const TopLoc_Location& L2)const
75{
76 return ((mySurface == S1 && mySurface2 == S2 &&
77 myLocation == L1 && myLocation2 == L2) ||
78 (mySurface == S2 && mySurface2 == S1 &&
79 myLocation == L2 && myLocation2 == L1));
80}
81
82
83//=======================================================================
84//function : Surface
85//purpose :
86//=======================================================================
87
88const Handle(Geom_Surface)& BRep_CurveOn2Surfaces::Surface()const
89{
90 return mySurface;
91}
92
93//=======================================================================
94//function : Surface2
95//purpose :
96//=======================================================================
97
98const Handle(Geom_Surface)& BRep_CurveOn2Surfaces::Surface2()const
99{
100 return mySurface2;
101}
102
103
104//=======================================================================
105//function : Location2
106//purpose :
107//=======================================================================
108
109const TopLoc_Location& BRep_CurveOn2Surfaces::Location2()const
110{
111 return myLocation2;
112}
113
114//=======================================================================
115//function : Continuity
116//purpose :
117//=======================================================================
118
119const GeomAbs_Shape& BRep_CurveOn2Surfaces::Continuity()const
120{
121 return myContinuity;
122}
123
124//=======================================================================
125//function : Continuity
126//purpose :
127//=======================================================================
128
129void BRep_CurveOn2Surfaces::Continuity(const GeomAbs_Shape C)
130{
131 myContinuity = C;
132}
133
134
135//=======================================================================
136//function : Copy
137//purpose :
138//=======================================================================
139
140Handle(BRep_CurveRepresentation) BRep_CurveOn2Surfaces::Copy() const
141{
142 Handle(BRep_CurveOn2Surfaces) C = new
143 BRep_CurveOn2Surfaces(Surface(),Surface2(),
144 Location(),Location2(),
145 myContinuity);
146 return C;
147}