1 // Created on: 1992-05-27
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1992-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 <StdFail_NotDone.hxx>
18 #include <Standard_OutOfRange.hxx>
21 inline Standard_Boolean IntRes2d_Intersection::IsDone() const {
25 //----------------------------------------------------------------------
26 inline IntRes2d_Intersection::IntRes2d_Intersection() {
27 done=reverse=Standard_False;
29 //----------------------------------------------------------------------
30 inline IntRes2d_Intersection::IntRes2d_Intersection(const IntRes2d_Intersection& Other) {
31 done=reverse=Standard_False;
35 //----------------------------------------------------------------------
36 inline Standard_Boolean IntRes2d_Intersection::IsEmpty() const {
37 if (!done) {throw StdFail_NotDone();}
38 return ((lpnt.Length() == 0) && (lseg.Length() == 0));
40 //----------------------------------------------------------------------
41 inline Standard_Integer IntRes2d_Intersection::NbPoints() const {
42 if (!done) {throw StdFail_NotDone();}
45 //----------------------------------------------------------------------
46 inline const IntRes2d_IntersectionPoint&
47 IntRes2d_Intersection::Point( const Standard_Integer N) const {
48 if (!done) {throw StdFail_NotDone();}
51 //----------------------------------------------------------------------
52 inline Standard_Integer IntRes2d_Intersection::NbSegments() const {
53 if (!done) {throw StdFail_NotDone();}
56 //----------------------------------------------------------------------
57 inline const IntRes2d_IntersectionSegment&
58 IntRes2d_Intersection::Segment(const Standard_Integer N) const {
59 if (!done) {throw StdFail_NotDone();}
62 //----------------------------------------------------------------------
63 inline void IntRes2d_Intersection::Append(const IntRes2d_IntersectionSegment& Seg) {
66 //----------------------------------------------------------------------
67 inline void IntRes2d_Intersection::Append(const IntRes2d_IntersectionPoint& Pnt) {
70 //----------------------------------------------------------------------
71 inline void IntRes2d_Intersection::ResetFields() {
78 //----------------------------------------------------------------------
79 inline void IntRes2d_Intersection::SetReversedParameters(const Standard_Boolean flag) {
82 //----------------------------------------------------------------------
83 inline Standard_Boolean IntRes2d_Intersection::ReversedParameters() const {