b311480e |
1 | -- Created on: 1991-06-24 |
2 | -- Created by: Didier PIFFAULT |
3 | -- Copyright (c) 1991-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 | deferred class Interference from Intf |
18 | |
19 | ---Purpose: Describes the Interference computation result |
ff8178ef |
20 | -- between polygon2d or polygon3d or polyhedron |
21 | -- (as three sequences of points of intersection, |
22 | -- polylines of intersection and zones de tangence). |
7fd59977 |
23 | |
24 | uses SectionPoint from Intf, |
25 | SeqOfSectionPoint from Intf, |
26 | SectionLine from Intf, |
27 | SeqOfSectionLine from Intf, |
28 | TangentZone from Intf, |
29 | SeqOfTangentZone from Intf |
30 | |
31 | |
32 | raises OutOfRange from Standard |
33 | |
34 | |
35 | is Initialize(Self : Boolean from Standard); |
36 | |
37 | SelfInterference(me : in out; |
38 | Self : Boolean from Standard) is protected; |
39 | ---Purpose: Only one argument for the intersection. |
40 | |
41 | NbSectionPoints(me) |
42 | returns Integer is static; |
43 | ---Purpose: Gives the number of points of intersection in the |
44 | -- interference. |
9530af27 |
45 | ---C++: inline |
7fd59977 |
46 | |
47 | PntValue (me; |
48 | Index : in Integer) |
49 | returns SectionPoint from Intf |
50 | raises OutOfRange from Standard |
51 | is static; |
52 | ---Purpose: Gives the point of intersection of address Index in |
53 | -- the interference. |
54 | -- |
55 | ---C++: return const & |
9530af27 |
56 | ---C++: inline |
7fd59977 |
57 | |
58 | NbSectionLines (me) |
59 | returns Integer is static; |
60 | ---Purpose: Gives the number of polylines of intersection in the |
61 | -- interference. |
9530af27 |
62 | ---C++: inline |
7fd59977 |
63 | |
64 | LineValue (me; |
65 | Index : in Integer) |
66 | returns SectionLine from Intf |
67 | raises OutOfRange from Standard |
68 | is static; |
69 | ---Purpose: Gives the polyline of intersection at address <Index> in |
70 | -- the interference. |
71 | -- |
72 | ---C++: return const & |
9530af27 |
73 | ---C++: inline |
7fd59977 |
74 | |
75 | NbTangentZones (me) |
76 | returns Integer is static; |
77 | ---Purpose: Gives the number of zones of tangence in the interference. |
9530af27 |
78 | ---C++: inline |
7fd59977 |
79 | |
80 | ZoneValue (me; |
81 | Index : in Integer) |
82 | returns TangentZone from Intf |
83 | raises OutOfRange from Standard |
84 | is static; |
85 | ---Purpose: Gives the zone of tangence at address Index in the |
86 | -- interference. |
87 | -- |
88 | ---C++: return const & |
9530af27 |
89 | ---C++: inline |
7fd59977 |
90 | |
91 | GetTolerance (me) |
92 | returns Real |
93 | is static; |
94 | ---Purpose: Gives the tolerance used for the calculation. |
9530af27 |
95 | ---C++: inline |
7fd59977 |
96 | |
97 | -- Implementation functions : |
98 | |
99 | Contains (me; |
100 | ThePnt : in SectionPoint from Intf) |
101 | returns Boolean |
102 | is static; |
103 | ---Purpose: Tests if the polylines of intersection or the zones of |
104 | -- tangence contain the point of intersection <ThePnt>. |
105 | |
106 | |
107 | Insert (me : in out; |
108 | TheZone : in TangentZone from Intf) |
109 | returns Boolean |
110 | is static; |
111 | ---Purpose: Inserts a new zone of tangence in the current list of |
112 | -- tangent zones of the interference and returns True |
113 | -- when done. |
114 | |
115 | |
116 | Insert (me : in out; |
117 | pdeb : in SectionPoint from Intf; |
118 | pfin : in SectionPoint from Intf) |
119 | is static; |
120 | ---Purpose: Insert a new segment of intersection in the current list of |
121 | -- polylines of intersection of the interference. |
122 | |
123 | |
124 | Dump (me) is static; |
125 | |
126 | |
127 | fields mySPoins : SeqOfSectionPoint from Intf is protected; |
128 | mySLines : SeqOfSectionLine from Intf is protected; |
129 | myTZones : SeqOfTangentZone from Intf is protected; |
130 | SelfIntf : Boolean from Standard is protected; |
9530af27 |
131 | Tolerance : Real from Standard is protected; |
7fd59977 |
132 | |
133 | end Interference; |