1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
16 #include <IntSurf_LineOn2S.hxx>
17 #include <IntSurf_PntOn2S.hxx>
18 #include <Standard_OutOfRange.hxx>
19 #include <Standard_Type.hxx>
21 IMPLEMENT_STANDARD_RTTIEXT(IntSurf_LineOn2S,Standard_Transient)
23 IntSurf_LineOn2S::IntSurf_LineOn2S (const IntSurf_Allocator& theAllocator) :
28 Handle(IntSurf_LineOn2S) IntSurf_LineOn2S::Split (const Standard_Integer Index)
30 IntSurf_SequenceOfPntOn2S SS;
31 mySeq.Split(Index,SS);
32 Handle(IntSurf_LineOn2S) NS = new IntSurf_LineOn2S ();
34 Standard_Integer leng = SS.Length();
35 for (i=1; i<=leng; i++) {
42 void IntSurf_LineOn2S::InsertBefore(const Standard_Integer index, const IntSurf_PntOn2S& P) {
43 if(index>mySeq.Length()) {
47 mySeq.InsertBefore(index,P);
51 void IntSurf_LineOn2S::RemovePoint(const Standard_Integer index) {