summaryrefslogtreecommitdiff
path: root/inc/IntAna2d_AnaIntersection.lxx
blob: 16190df21f0440575c4e227d13f70c9cc1c91064 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// File IntAna2d_AnaIntersection.lxx, JAG le 6 Juin 1991

#include <StdFail_NotDone.hxx>
#include <Standard_OutOfRange.hxx>

inline Standard_Boolean IntAna2d_AnaIntersection::IsDone () const {
  return done;
}

inline Standard_Boolean IntAna2d_AnaIntersection::IsEmpty () const {
  
  if (!done) {
    StdFail_NotDone::Raise();
  }
  return ((nbp==0)&&(!iden));
}

inline Standard_Boolean IntAna2d_AnaIntersection::IdenticalElements () const {
  
  if (!done) {
    StdFail_NotDone::Raise();
  }
  return iden ;
}

inline Standard_Boolean IntAna2d_AnaIntersection::ParallelElements () const {
  
  if (!done) {
    StdFail_NotDone::Raise();
  }
  return para ;
}

inline Standard_Integer IntAna2d_AnaIntersection::NbPoints () const {
  
  if (!done) {
    StdFail_NotDone::Raise();
  }
  return nbp ;
}

inline const IntAna2d_IntPoint& IntAna2d_AnaIntersection::Point (const Standard_Integer N) const {
  
  if (!done) {
    StdFail_NotDone::Raise();
    return lpnt[0];
  }
  else {
    if ((N<=0)||(N>nbp)) {
      Standard_OutOfRange::Raise();
      return lpnt[0];
    }
    else {
      return lpnt[N-1];
    }
  }
}