a8b9669db1ae3061151cf575b7cc4a0132e6bfee
[occt.git] / src / Intf / Intf_InterferencePolygon3d.cdl
1 -- File:        InterferencePolygon3d.cdl
2 -- Created:     Tue Sep 29 11:57:14 1992
3 -- Author:      Didier PIFFAULT
4 --              <dpf@phylox>
5 ---Copyright:    Matra Datavision 1992
6
7
8 generic class InterferencePolygon3d from Intf 
9     (Polygon3d1 as any;
10      ToolPolygon3d1 as any;         -- as ToolPolygon(Pnt,Polygon3d1,Box)
11      Polygon3d2 as any;
12      ToolPolygon3d2 as any)         -- as ToolPolygon(Pnt,Polygon3d2,Box)
13     inherits Interference from Intf
14         
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.
24
25 uses    Pnt from gp,
26         SectionPoint      from Intf,
27         SeqOfSectionPoint from Intf,
28         SectionLine       from Intf,
29         SeqOfSectionLine  from Intf
30
31 raises  OutOfRange from Standard
32
33
34 is
35 -- Interface :
36
37     Create          returns InterferencePolygon3d from Intf;
38     ---Purpose: Constructs an empty interference of 3d Polygon.
39
40
41     Create         (Obje1 : in Polygon3d1 ;Obje2 : in Polygon3d2) 
42                     returns InterferencePolygon3d from Intf;
43     ---Purpose: Constructs and computes an interference between two Polygons.
44
45
46     Create         (Obje : in Polygon3d1) 
47                     returns InterferencePolygon3d from Intf;
48     ---Purpose: Constructs and computes the self interference of a Polygon.
49
50
51     Perform        (me   : in out;
52                     Obje1 : in Polygon3d1 ;Obje2 : in Polygon3d2);
53     ---Purpose: Computes an interference between two Polygons.
54
55
56     Perform        (me   : in out;
57                     Obje : in Polygon3d1);
58     ---Purpose: Computes the auto interference of a Polygon.
59
60
61     NbResults      (me)
62                     returns Integer is static;
63     ---Purpose: Gives  the number  of common  Perpendiculars or orthogonal
64     --          projections between the two polygons.
65
66     ResultLine     (me;
67                     Index      : in Integer)
68                     returns SectionLine from Intf
69                     raises OutOfRange from Standard
70                     is static;
71     ---Purpose: Gives the  segment of address  <Index> in the interference
72     --          representing    the     perpendicular  or the   orthogonal
73     --          projection .
74     --          
75     ---C++: return const &
76
77
78     ResultValue    (me;
79                     Index      : in Integer)
80                     returns Real from Standard
81                     raises OutOfRange from Standard
82                     is static;
83     ---Purpose: Gives the distance between the two polygons 
84
85
86     MinimalDistance(me)
87                     returns Real from Standard
88                     is static;
89     ---Purpose: Gives   the distance  between  the  two  polygon3d at  the
90     --          perpendicular or projection of minimal length.
91
92
93     MinimalResult  (me)
94                     returns Integer from Standard
95                     is static;
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.
99
100
101 -- Implementation :
102
103     Interference   (me         : in out;
104                     Obje1      : in Polygon3d1;
105                     Obje2      : in Polygon3d2)
106                     is private;
107
108     Interference   (me         : in out;
109                     Obje       : in Polygon3d1)
110                     is private;
111
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)
117                     is private;
118     ---Purpose: Computes   the common  perpendicular   between the two
119     --          segments <BegO><EndO> and <BegT><EndT>.
120
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)
126                     is private;
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>.
130
131
132 fields  IndexMin    : Integer from Standard;
133         MinimalDist : Real from Standard;
134
135 end InterferencePolygon3d;