1 // Created on: 1992-04-06
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <Standard_DomainError.hxx>
18 #include <IntSurf_LineOn2S.hxx>
19 #include <IntPatch_Point.hxx>
22 inline const Handle(Adaptor2d_Curve2d)& IntPatch_RLine::ArcOnS1() const
27 inline const Handle(Adaptor2d_Curve2d)& IntPatch_RLine::ArcOnS2() const
32 //-- Il faut mettre cet include ici , car l include fait un define Handle(Adaptor2d_Curve2d) ...
33 //-- et en fin de fichier un undef Handle(Adaptor2d_Curve2d) ...
35 inline void IntPatch_RLine::AddVertex (const IntPatch_Point& thePnt,
36 const Standard_Boolean theIsPrepend)
44 inline void IntPatch_RLine::Replace (const Standard_Integer Index,
45 const IntPatch_Point& Pnt)
50 inline void IntPatch_RLine::SetFirstPoint (const Standard_Integer IndFirst)
56 inline void IntPatch_RLine::SetLastPoint (const Standard_Integer IndLast)
62 inline void IntPatch_RLine::Add(const Handle(IntSurf_LineOn2S)& L)
67 inline Standard_Boolean IntPatch_RLine::IsArcOnS1() const
72 inline Standard_Boolean IntPatch_RLine::IsArcOnS2() const
77 inline Standard_Boolean IntPatch_RLine::HasFirstPoint () const
82 inline Standard_Boolean IntPatch_RLine::HasLastPoint () const
87 inline const IntPatch_Point& IntPatch_RLine::FirstPoint () const
89 if (!fipt) {throw Standard_DomainError();}
93 inline const IntPatch_Point& IntPatch_RLine::LastPoint () const
95 if (!lapt) {throw Standard_DomainError();}
99 inline Standard_Integer IntPatch_RLine::NbVertex () const
101 return svtx.Length();
104 inline const IntPatch_Point& IntPatch_RLine::Vertex (const Standard_Integer Index) const
109 inline IntPatch_Point& IntPatch_RLine::ChangeVertex (const Standard_Integer Index)
114 inline void IntPatch_RLine::RemoveVertex(const Standard_Integer theIndex)
116 if((theIndex < 1) || (theIndex > NbVertex()))
117 throw Standard_OutOfRange("Cannot delete not existing vertex");
118 svtx.Remove(theIndex);
121 inline Standard_Boolean IntPatch_RLine::HasPolygon () const
123 return (!curv.IsNull());
126 inline Standard_Integer IntPatch_RLine::NbPnts () const
128 if (curv.IsNull()) {throw Standard_DomainError();}
129 return curv->NbPoints();
132 inline const IntSurf_PntOn2S& IntPatch_RLine::Point (const Standard_Integer Index) const
134 if (curv.IsNull()) {throw Standard_DomainError();}
135 return curv->Value(Index);
138 inline Handle(IntSurf_LineOn2S) IntPatch_RLine::Curve() const