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