7fd59977 |
1 | // File: Geom2dHatch_Intersector.lxx |
2 | // Created: Wed Mar 23 11:29:27 1994 |
3 | // Author: Jean Marc LACHAUME |
4 | // <jml@phylox> |
5 | |
6 | |
7 | //======================================================================= |
8 | // Function : Geom2dHatch_Intersector |
9 | // Purpose : Constructor. |
10 | //======================================================================= |
11 | |
12 | inline Geom2dHatch_Intersector::Geom2dHatch_Intersector |
13 | (const Standard_Real Confusion, |
14 | const Standard_Real Tangency) : |
15 | Geom2dInt_GInter () , |
16 | myConfusionTolerance (Confusion) , |
17 | myTangencyTolerance (Tangency) |
18 | { |
19 | } |
20 | |
21 | //======================================================================= |
22 | // Function : ConfusionTolerance |
23 | // Purpose : Returns the confusion tolerance of the intersector. |
24 | //======================================================================= |
25 | |
26 | inline Standard_Real Geom2dHatch_Intersector::ConfusionTolerance |
27 | () const |
28 | { |
29 | return myConfusionTolerance ; |
30 | } |
31 | |
32 | //======================================================================= |
33 | // Function : SetConfusionTolerance |
34 | // Purpose : Sets the confusion tolerance of the intersector. |
35 | //======================================================================= |
36 | |
37 | inline void Geom2dHatch_Intersector::SetConfusionTolerance |
38 | (const Standard_Real Confusion) |
39 | { |
40 | myConfusionTolerance = Confusion ; |
41 | } |
42 | |
43 | //======================================================================= |
44 | // Function : TangencyTolerance |
45 | // Purpose : Returns the tangency tolerance of the intersector. |
46 | //======================================================================= |
47 | |
48 | inline Standard_Real Geom2dHatch_Intersector::TangencyTolerance |
49 | () const |
50 | { |
51 | return myTangencyTolerance ; |
52 | } |
53 | |
54 | //======================================================================= |
55 | // Function : SetTangencyTolerance |
56 | // Purpose : Sets the tangency tolerance of the intersector. |
57 | //======================================================================= |
58 | |
59 | inline void Geom2dHatch_Intersector::SetTangencyTolerance |
60 | (const Standard_Real Tangency) |
61 | { |
62 | myTangencyTolerance = Tangency ; |
63 | } |
64 | |
65 | //======================================================================= |
66 | // Function : Intersect |
67 | // Purpose : Intersects the curves C1 and C2. |
68 | //======================================================================= |
69 | #include <Adaptor2d_Curve2d.hxx> |
70 | #include <Geom2dAdaptor_Curve.hxx> |
71 | |
72 | inline void Geom2dHatch_Intersector::Intersect |
73 | (const Geom2dAdaptor_Curve& C1, |
74 | const Geom2dAdaptor_Curve& C2) |
75 | { |
76 | Geom2dInt_GInter::Perform(C1, |
77 | C2, |
78 | myConfusionTolerance, myTangencyTolerance) ; |
79 | |
80 | } |