1 -- File: InterferencePolygon3d.cdl
2 -- Created: Tue Sep 29 11:57:14 1992
3 -- Author: Didier PIFFAULT
5 ---Copyright: Matra Datavision 1992
8 generic class InterferencePolygon3d from Intf
10 ToolPolygon3d1 as any; -- as ToolPolygon(Pnt,Polygon3d1,Box)
12 ToolPolygon3d2 as any) -- as ToolPolygon(Pnt,Polygon3d2,Box)
13 inherits Interference from Intf
15 ---Purpose: Computes the interference between two polygons or the
16 -- self interference of a polygon in 3 dimensions . In 3
17 -- dimensions the result can be a common perpendicular ,
18 -- an orthogonal projection or a real intersections.
19 -- There are two different instantiation arguments to
20 -- authorize an interference between two polygons from
21 -- differents origin. Ex : to intersect a curve polygon
22 -- with an algorithmic curve from numerical walking
23 -- between two surfaces.
26 SectionPoint from Intf,
27 SeqOfSectionPoint from Intf,
28 SectionLine from Intf,
29 SeqOfSectionLine from Intf
31 raises OutOfRange from Standard
37 Create returns InterferencePolygon3d from Intf;
38 ---Purpose: Constructs an empty interference of 3d Polygon.
41 Create (Obje1 : in Polygon3d1 ;Obje2 : in Polygon3d2)
42 returns InterferencePolygon3d from Intf;
43 ---Purpose: Constructs and computes an interference between two Polygons.
46 Create (Obje : in Polygon3d1)
47 returns InterferencePolygon3d from Intf;
48 ---Purpose: Constructs and computes the self interference of a Polygon.
52 Obje1 : in Polygon3d1 ;Obje2 : in Polygon3d2);
53 ---Purpose: Computes an interference between two Polygons.
57 Obje : in Polygon3d1);
58 ---Purpose: Computes the auto interference of a Polygon.
62 returns Integer is static;
63 ---Purpose: Gives the number of common Perpendiculars or orthogonal
64 -- projections between the two polygons.
68 returns SectionLine from Intf
69 raises OutOfRange from Standard
71 ---Purpose: Gives the segment of address <Index> in the interference
72 -- representing the perpendicular or the orthogonal
75 ---C++: return const &
80 returns Real from Standard
81 raises OutOfRange from Standard
83 ---Purpose: Gives the distance between the two polygons
87 returns Real from Standard
89 ---Purpose: Gives the distance between the two polygon3d at the
90 -- perpendicular or projection of minimal length.
94 returns Integer from Standard
96 ---Purpose: Give the perpendicular or projection of minimal length.
97 -- WARNING : if there are points of intersection the minimal
98 -- result is one of them and this function is unusuable.
103 Interference (me : in out;
104 Obje1 : in Polygon3d1;
105 Obje2 : in Polygon3d2)
108 Interference (me : in out;
109 Obje : in Polygon3d1)
112 CommonPerpen (me : in out;
113 BegO : in Pnt from gp;
114 EndO : in Pnt from gp;
115 BegT : in Pnt from gp;
116 EndT : in Pnt from gp)
118 ---Purpose: Computes the common perpendicular between the two
119 -- segments <BegO><EndO> and <BegT><EndT>.
121 Projections (me : in out;
122 BegO : in Pnt from gp;
123 EndO : in Pnt from gp;
124 BegT : in Pnt from gp;
125 EndT : in Pnt from gp)
127 ---Purpose: Computes the different orthogonal projections between
128 -- segment <BegO><EndO> and points <BegT>,<EndT> and segment
129 -- <BegT><EndT> and points <BegO>,<EndO>.
132 fields IndexMin : Integer from Standard;
133 MinimalDist : Real from Standard;
135 end InterferencePolygon3d;