summaryrefslogtreecommitdiff
path: root/inc/GeomInt_IntSS.lxx
blob: d38f3c0a133d6e4fe3ee745bc9b28f7d482dcc36 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
// File:      GeomInt_IntSS.lxx
// Created:   Fri Jan 27 10:40:51 1995
// Author:    Jacques GOUSSARD
// Copyright: OPEN CASCADE 1995

#include <IntPatch_Point.hxx>


//=======================================================================
//function : GeomInt_IntSS
//purpose  : 
//=======================================================================
  inline GeomInt_IntSS::GeomInt_IntSS ()
 : myNbrestr(0),
   myTolReached2d(0.0),
   myTolReached3d(0.0),
   myTolCheck(0.0000001),
   myTolAngCheck(0.3)
{}

//=======================================================================
//function : GeomInt_IntSS
//purpose  : 
//=======================================================================
  inline GeomInt_IntSS::GeomInt_IntSS (const Handle(Geom_Surface)& S1,
                                       const Handle(Geom_Surface)& S2,
                                       const Standard_Real Tol,
                                       const Standard_Boolean Approx,
                                       const Standard_Boolean ApproxS1,
                                       const Standard_Boolean ApproxS2)
 : myNbrestr(0),
   myTolReached2d(0.0),
   myTolReached3d(0.0),
   myTolCheck(0.0000001),
   myTolAngCheck(0.3)
{
  Perform(S1,S2,Tol,Approx,ApproxS1,ApproxS2);
}

//=======================================================================
//function : Perform
//purpose  : Intersection of Adapted surfaces
//=======================================================================
  inline void GeomInt_IntSS::Perform(const Handle(GeomAdaptor_HSurface)& HS1,
                                     const Handle(GeomAdaptor_HSurface)& HS2,
                                     const Standard_Real Tol,
                                     const Standard_Boolean Approx,
                                     const Standard_Boolean ApproxS1,
                                     const Standard_Boolean ApproxS2)
{
  myHS1 = HS1;
  myHS2 = HS2;
  InternalPerform(Tol,Approx,ApproxS1,ApproxS2,Standard_False,0.,0.,0.,0.);
}

//=======================================================================
//function : Perform
//purpose  : Intersection of Adapted surfaces with a Starting Point
//=======================================================================
  inline void GeomInt_IntSS::Perform(const Handle(GeomAdaptor_HSurface)& HS1,
                                     const Handle(GeomAdaptor_HSurface)& HS2,
                                     const Standard_Real Tol,
                                     const Standard_Real U1, const Standard_Real V1,
                                     const Standard_Real U2, const Standard_Real V2,
                                     const Standard_Boolean Approx,
                                     const Standard_Boolean ApproxS1,
                                     const Standard_Boolean ApproxS2)
{
  myHS1 = HS1;
  myHS2 = HS2;
  InternalPerform(Tol,Approx,ApproxS1,ApproxS2,Standard_True,U1,V1,U2,V2);
}

//=======================================================================
//function : IsDone
//purpose  : 
//=======================================================================
  inline Standard_Boolean GeomInt_IntSS::IsDone () const
{
  return myIntersector.IsDone();
}

//=======================================================================
//function : TolReached2d
//purpose  : 
//=======================================================================
  inline Standard_Real GeomInt_IntSS::TolReached2d () const
{
  return myTolReached2d;
}

//=======================================================================
//function : TolReached3d
//purpose  : 
//=======================================================================
  inline Standard_Real GeomInt_IntSS::TolReached3d () const
{
  return myTolReached3d;
}

//=======================================================================
//function : NbLines
//purpose  : 
//=======================================================================
  inline Standard_Integer GeomInt_IntSS::NbLines () const
{
  return sline.Length()-myNbrestr;
}

//=======================================================================
//function : NbBoundaries
//purpose  : 
//=======================================================================
  inline Standard_Integer GeomInt_IntSS::NbBoundaries () const
{
  StdFail_NotDone_Raise_if(!myIntersector.IsDone(),"");
  return myNbrestr;
}

//=======================================================================
//function : NbPoints
//purpose  : 
//=======================================================================
  inline Standard_Integer GeomInt_IntSS::NbPoints () const
{
  return myIntersector.NbPnts();
}

//=======================================================================
//function : Point
//purpose  : 
//=======================================================================
  inline gp_Pnt GeomInt_IntSS::Point (const Standard_Integer Index) const
{
  return myIntersector.Point(Index).Value();
}