0024660: Removing unused "generic" classes. Part 1
[occt.git] / src / Contap / Contap_Line.lxx
1 // Created on: 1993-02-05
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #include <Standard_DomainError.hxx>
18 #include <TColgp_HSequenceOfPnt.hxx>
19 #include <gp_Lin.hxx>
20 #include <gp_Circ.hxx>
21 #include <IntSurf_PntOn2S.hxx>
22 #include <IntSurf_LineOn2S.hxx>
23
24 #include TheHSequenceOfPoint_hxx
25
26 inline const Handle(IntSurf_LineOn2S)& Contap_Line::LineOn2S () const
27 {
28   return curv;
29 }
30
31 inline void Contap_Line::Add(const IntSurf_PntOn2S& POn2S)
32 {
33   curv->Add(POn2S);
34 }
35
36 inline Standard_Integer Contap_Line::NbVertex () const
37 {
38   return svtx->Length();
39 }
40
41 inline ThePoint& Contap_Line::Vertex (const Standard_Integer Index) const
42 {
43   return svtx->ChangeSequence()(Index);
44 }
45
46 inline Contap_IType Contap_Line::TypeContour () const
47 {
48   return typL;
49 }
50
51 inline Standard_Integer Contap_Line::NbPnts () const {
52   if (typL != Contap_Walking) {Standard_DomainError::Raise();}
53   return(curv->NbPoints());
54 }
55
56 inline const IntSurf_PntOn2S& Contap_Line::Point (const Standard_Integer Index) const {
57   if (typL != Contap_Walking) {Standard_DomainError::Raise();}
58   return(curv->Value(Index));
59 }
60
61 inline gp_Lin Contap_Line::Line () const
62 {
63   if (typL != Contap_Lin) {Standard_DomainError::Raise();}
64   return gp_Lin(pt,dir1);
65 }
66
67 inline gp_Circ Contap_Line::Circle () const
68 {
69   if (typL != Contap_Circle) {Standard_DomainError::Raise();}
70   return gp_Circ(gp_Ax2(pt,dir1,dir2),rad);
71 }