7fd59977 |
1 | -- File: InterferencePolygon2d.cdl |
2 | -- Created: Mon Sep 28 17:09:45 1992 |
3 | -- Author: Didier PIFFAULT |
4 | -- <dpf@phylox> |
5 | ---Copyright: Matra Datavision 1992 |
6 | |
7 | |
8 | generic class InterferencePolygon2d from Intf |
9 | (Polygon2d1 as any; |
10 | ToolPolygon2d1 as any; -- as ToolPolygon(Pnt2d, Polygon2d1, Box2d) |
11 | Polygon2d2 as any; |
12 | ToolPolygon2d2 as any) -- as ToolPolygon(Pnt2d, Polygon2d2, Box2d) |
13 | inherits Interference from Intf |
14 | |
15 | |
16 | ---Purpose: Computes the interference between two polygons or |
17 | -- the self intersection of a polygon in two |
18 | -- dimensions. |
19 | |
20 | |
21 | uses Pnt2d from gp, |
22 | SectionPoint from Intf, |
23 | SeqOfSectionPoint from Intf, |
24 | TangentZone from Intf, |
25 | SeqOfTangentZone from Intf |
26 | |
27 | |
28 | raises OutOfRange from Standard |
29 | |
30 | is |
31 | |
32 | -- Interface : |
33 | |
34 | Create returns InterferencePolygon2d from Intf; |
35 | ---Purpose: Constructs an empty interference of Polygon. |
36 | |
37 | |
38 | Create (Obje1: in Polygon2d1 ;Obje2 : in Polygon2d2) |
39 | returns InterferencePolygon2d from Intf; |
40 | ---Purpose: Constructs and computes an interference between two Polygons. |
41 | |
42 | |
43 | Create (Obje : in Polygon2d1) |
44 | returns InterferencePolygon2d from Intf; |
45 | ---Purpose: Constructs and computes the auto interference of a Polygon. |
46 | |
47 | |
48 | Perform (me : in out; |
49 | Obje1: Polygon2d1 ;Obje2 : in Polygon2d2); |
50 | ---Purpose: Computes an interference between two Polygons. |
51 | |
52 | |
53 | Perform (me : in out; |
54 | Obje : in Polygon2d1); |
55 | ---Purpose: Computes the self interference of a Polygon. |
56 | |
57 | |
58 | Pnt2dValue (me; |
59 | Index : in Integer) |
60 | returns Pnt2d from gp |
61 | raises OutOfRange from Standard |
62 | is static; |
63 | ---Purpose: Gives the geometrical 2d point of the intersection |
64 | -- point at address <Index> in the interference. |
65 | |
66 | |
67 | -- Implementation : |
68 | |
69 | Interference (me : in out; |
70 | Obje1 : in Polygon2d1; |
71 | Obje2 : in Polygon2d2) |
72 | is private; |
73 | |
74 | Interference (me : in out; |
75 | Obje : in Polygon2d1) |
76 | is private; |
77 | |
78 | Clean (me : in out) is private; |
79 | |
80 | Intersect (me : in out; |
81 | BegO : in Pnt2d from gp; |
82 | EndO : in Pnt2d from gp; |
83 | BegT : in Pnt2d from gp; |
84 | EndT : in Pnt2d from gp) |
85 | is private; |
86 | ---Purpose: Computes the intersection between two segments |
87 | -- <BegO><EndO> et <BegT><EndT>. |
88 | |
89 | end InterferencePolygon2d; |