1 // Created on: 1993-11-16
2 // Created by: Jean Yves LEBEY
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.
18 #include <Standard_ProgramError.hxx>
19 #include <TopOpeBRep_LineInter.hxx>
20 #include <TopOpeBRep_WPointInter.hxx>
21 #include <TopOpeBRep_WPointInterIterator.hxx>
23 //=======================================================================
24 //function : WPointIterator
26 //=======================================================================
27 TopOpeBRep_WPointInterIterator::TopOpeBRep_WPointInterIterator() :
28 myLineInter(NULL),myWPointIndex(0),myWPointNb(0)
32 //=======================================================================
33 //function : WPointIterator
35 //=======================================================================
37 TopOpeBRep_WPointInterIterator::TopOpeBRep_WPointInterIterator
38 (const TopOpeBRep_LineInter& LI)
44 //=======================================================================
47 //=======================================================================
49 void TopOpeBRep_WPointInterIterator::Init(const TopOpeBRep_LineInter& LI)
51 myLineInter = (TopOpeBRep_LineInter*)&LI;
56 //=======================================================================
59 //=======================================================================
61 void TopOpeBRep_WPointInterIterator::Init()
64 myWPointNb = myLineInter->NbWPoint();
68 //=======================================================================
71 //=======================================================================
73 Standard_Boolean TopOpeBRep_WPointInterIterator::More() const
75 return (myWPointIndex <= myWPointNb);
78 //=======================================================================
81 //=======================================================================
83 void TopOpeBRep_WPointInterIterator::Next()
88 //=======================================================================
89 //function : CurrentWP
91 //=======================================================================
93 const TopOpeBRep_WPointInter& TopOpeBRep_WPointInterIterator::CurrentWP()
96 throw Standard_ProgramError("TopOpeBRep_WPointInterIterator::Current");
97 const TopOpeBRep_WPointInter& WP = myLineInter->WPoint(myWPointIndex);
101 TopOpeBRep_PLineInter TopOpeBRep_WPointInterIterator::PLineInterDummy() const {return myLineInter;}