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>
20 #include <gp_Circ.hxx>
21 #include <gp_Elips.hxx>
22 #include <gp_Parab.hxx>
23 #include <gp_Hypr.hxx>
25 #include <Precision.hxx>
28 inline void IntPatch_GLine::SetFirstPoint (const Standard_Integer IndFirst)
35 inline void IntPatch_GLine::SetLastPoint (const Standard_Integer IndLast)
42 inline gp_Lin IntPatch_GLine::Line () const
44 if (typ != IntPatch_Lin) {Standard_DomainError::Raise();}
45 return gp_Lin(pos.Axis());
49 inline gp_Circ IntPatch_GLine::Circle () const
51 if (typ != IntPatch_Circle) {Standard_DomainError::Raise();}
52 return gp_Circ(pos,par1);
56 inline gp_Elips IntPatch_GLine::Ellipse () const
58 if (typ != IntPatch_Ellipse) {Standard_DomainError::Raise();}
59 return gp_Elips(pos,par1,par2);
63 inline gp_Parab IntPatch_GLine::Parabola () const
65 if (typ != IntPatch_Parabola) {Standard_DomainError::Raise();}
66 return gp_Parab(pos,par1);
70 inline gp_Hypr IntPatch_GLine::Hyperbola () const
72 if (typ != IntPatch_Hyperbola) {Standard_DomainError::Raise();}
73 return gp_Hypr(pos,par1,par2);
77 inline Standard_Boolean IntPatch_GLine::HasFirstPoint () const
83 inline Standard_Boolean IntPatch_GLine::HasLastPoint () const
89 inline const IntPatch_Point& IntPatch_GLine::FirstPoint () const
91 if (!fipt) {Standard_DomainError::Raise();}
96 inline const IntPatch_Point& IntPatch_GLine::LastPoint () const
98 if (!lapt) {Standard_DomainError::Raise();}
103 inline Standard_Integer IntPatch_GLine::NbVertex () const
105 return svtx.Length();
109 inline const IntPatch_Point& IntPatch_GLine::Vertex (const Standard_Integer Index) const