b311480e |
1 | // Created on: 1994-03-23 |
2 | // Created by: Jean Marc LACHAUME |
3 | // Copyright (c) 1994-1999 Matra Datavision |
973c2be1 |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | // |
973c2be1 |
6 | // This file is part of Open CASCADE Technology software library. |
b311480e |
7 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | // |
973c2be1 |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | //======================================================================= |
18 | // Function : Geom2dHatch_Intersector |
19 | // Purpose : Constructor. |
20 | //======================================================================= |
21 | |
22 | inline Geom2dHatch_Intersector::Geom2dHatch_Intersector |
23 | (const Standard_Real Confusion, |
24 | const Standard_Real Tangency) : |
25 | Geom2dInt_GInter () , |
26 | myConfusionTolerance (Confusion) , |
27 | myTangencyTolerance (Tangency) |
28 | { |
29 | } |
30 | |
31 | //======================================================================= |
32 | // Function : ConfusionTolerance |
33 | // Purpose : Returns the confusion tolerance of the intersector. |
34 | //======================================================================= |
35 | |
36 | inline Standard_Real Geom2dHatch_Intersector::ConfusionTolerance |
37 | () const |
38 | { |
39 | return myConfusionTolerance ; |
40 | } |
41 | |
42 | //======================================================================= |
43 | // Function : SetConfusionTolerance |
44 | // Purpose : Sets the confusion tolerance of the intersector. |
45 | //======================================================================= |
46 | |
47 | inline void Geom2dHatch_Intersector::SetConfusionTolerance |
48 | (const Standard_Real Confusion) |
49 | { |
50 | myConfusionTolerance = Confusion ; |
51 | } |
52 | |
53 | //======================================================================= |
54 | // Function : TangencyTolerance |
55 | // Purpose : Returns the tangency tolerance of the intersector. |
56 | //======================================================================= |
57 | |
58 | inline Standard_Real Geom2dHatch_Intersector::TangencyTolerance |
59 | () const |
60 | { |
61 | return myTangencyTolerance ; |
62 | } |
63 | |
64 | //======================================================================= |
65 | // Function : SetTangencyTolerance |
66 | // Purpose : Sets the tangency tolerance of the intersector. |
67 | //======================================================================= |
68 | |
69 | inline void Geom2dHatch_Intersector::SetTangencyTolerance |
70 | (const Standard_Real Tangency) |
71 | { |
72 | myTangencyTolerance = Tangency ; |
73 | } |
74 | |
75 | //======================================================================= |
76 | // Function : Intersect |
77 | // Purpose : Intersects the curves C1 and C2. |
78 | //======================================================================= |
79 | #include <Adaptor2d_Curve2d.hxx> |
80 | #include <Geom2dAdaptor_Curve.hxx> |
81 | |
82 | inline void Geom2dHatch_Intersector::Intersect |
83 | (const Geom2dAdaptor_Curve& C1, |
84 | const Geom2dAdaptor_Curve& C2) |
85 | { |
86 | Geom2dInt_GInter::Perform(C1, |
87 | C2, |
88 | myConfusionTolerance, myTangencyTolerance) ; |
89 | |
90 | } |