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
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 <TColgp_HSequenceOfPnt.hxx>
20 #include <gp_Circ.hxx>
21 #include <IntSurf_PntOn2S.hxx>
22 #include <IntSurf_LineOn2S.hxx>
24 #include <Contap_Point.hxx>
25 #include <Contap_TheHSequenceOfPoint.hxx>
27 inline const Handle(IntSurf_LineOn2S)& Contap_Line::LineOn2S () const
32 inline void Contap_Line::Add(const IntSurf_PntOn2S& POn2S)
37 inline Standard_Integer Contap_Line::NbVertex () const
39 return svtx->Length();
42 inline Contap_Point& Contap_Line::Vertex (const Standard_Integer Index) const
44 return svtx->ChangeSequence()(Index);
47 inline Contap_IType Contap_Line::TypeContour () const
52 inline Standard_Integer Contap_Line::NbPnts () const {
53 if (typL != Contap_Walking) {throw Standard_DomainError();}
54 return(curv->NbPoints());
57 inline const IntSurf_PntOn2S& Contap_Line::Point (const Standard_Integer Index) const {
58 if (typL != Contap_Walking) {throw Standard_DomainError();}
59 return(curv->Value(Index));
62 inline gp_Lin Contap_Line::Line () const
64 if (typL != Contap_Lin) {throw Standard_DomainError();}
65 return gp_Lin(pt,dir1);
68 inline gp_Circ Contap_Line::Circle () const
70 if (typL != Contap_Circle) {throw Standard_DomainError();}
71 return gp_Circ(gp_Ax2(pt,dir1,dir2),rad);