0022627: Change OCCT memory management defaults
[occt.git] / src / IntSurf / IntSurf_LineOn2S.cxx
CommitLineData
7fd59977 1#include <IntSurf_LineOn2S.ixx>
2
3
4IntSurf_LineOn2S::IntSurf_LineOn2S ()
5{}
6
7
8Handle(IntSurf_LineOn2S) IntSurf_LineOn2S::Split (const Standard_Integer Index)
9{
10 IntSurf_SequenceOfPntOn2S SS;
11 mySeq.Split(Index,SS);
12 Handle(IntSurf_LineOn2S) NS = new IntSurf_LineOn2S ();
13 Standard_Integer i;
14 Standard_Integer leng = SS.Length();
15 for (i=1; i<=leng; i++) {
16 NS->Add(SS(i));
17 }
18 return NS;
19}
20
21
22void IntSurf_LineOn2S::InsertBefore(const Standard_Integer index, const IntSurf_PntOn2S& P) {
23 if(index>mySeq.Length()) {
24 mySeq.Append(P);
25 }
26 else {
27 mySeq.InsertBefore(index,P);
28 }
29}
30
31void IntSurf_LineOn2S::RemovePoint(const Standard_Integer index) {
32 mySeq.Remove(index);
33}