1 // File: BRep_CurveOnClosedSurface.cxx
2 // Created: Tue Jul 6 19:21:18 1993
3 // Author: Remi LEQUETTE
7 #include <BRep_CurveOnClosedSurface.ixx>
8 #include <Precision.hxx>
12 //=======================================================================
13 //function : BRep_CurveOnClosedSurface
15 //=======================================================================
17 BRep_CurveOnClosedSurface::BRep_CurveOnClosedSurface
18 (const Handle(Geom2d_Curve)& PC1,
19 const Handle(Geom2d_Curve)& PC2,
20 const Handle(Geom_Surface)& S,
21 const TopLoc_Location& L,
22 const GeomAbs_Shape C) :
23 BRep_CurveOnSurface(PC1,S,L),
30 //=======================================================================
31 //function : IsCurveOnClosedSurface
33 //=======================================================================
35 Standard_Boolean BRep_CurveOnClosedSurface::IsCurveOnClosedSurface()const
40 //=======================================================================
41 //function : IsRegularity
43 //=======================================================================
45 Standard_Boolean BRep_CurveOnClosedSurface::IsRegularity()const
51 //=======================================================================
52 //function : IsRegularity
54 //=======================================================================
56 Standard_Boolean BRep_CurveOnClosedSurface::IsRegularity
57 (const Handle(Geom_Surface)& S1,
58 const Handle(Geom_Surface)& S2,
59 const TopLoc_Location& L1,
60 const TopLoc_Location& L2)const
62 return ((Surface() == S1) &&
70 //=======================================================================
73 //=======================================================================
75 const Handle(Geom2d_Curve)& BRep_CurveOnClosedSurface::PCurve2()const
81 //=======================================================================
82 //function : Continuity
84 //=======================================================================
86 const GeomAbs_Shape& BRep_CurveOnClosedSurface::Continuity()const
91 //=======================================================================
94 //=======================================================================
96 const Handle(Geom_Surface)& BRep_CurveOnClosedSurface::Surface2()const
102 //=======================================================================
103 //function : Location2
105 //=======================================================================
107 const TopLoc_Location& BRep_CurveOnClosedSurface::Location2()const
112 //=======================================================================
115 //=======================================================================
117 void BRep_CurveOnClosedSurface::PCurve2(const Handle(Geom2d_Curve)& C)
123 //=======================================================================
124 //function : Continuity
126 //=======================================================================
128 void BRep_CurveOnClosedSurface::Continuity(const GeomAbs_Shape C)
134 //=======================================================================
137 //=======================================================================
139 Handle(BRep_CurveRepresentation) BRep_CurveOnClosedSurface::Copy() const
141 Handle(BRep_CurveOnClosedSurface) C =
142 new BRep_CurveOnClosedSurface(PCurve(),PCurve2(),
143 Surface(),Location(),myContinuity);
145 C->SetRange(First(), Last());
146 C->SetUVPoints(myUV1,myUV2);
147 C->SetUVPoints2(myUV21,myUV22);
153 //=======================================================================
156 //=======================================================================
158 void BRep_CurveOnClosedSurface::Update()
160 if (!Precision::IsNegativeInfinite(First()))
161 myPCurve2->D0(First(),myUV21);
162 if (!Precision::IsPositiveInfinite(Last()))
163 myPCurve2->D0(Last(),myUV22);
164 BRep_CurveOnSurface::Update();