1 -- Created on: 1992-09-29
2 -- Created by: Didier PIFFAULT
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
23 generic class InterferencePolygon3d from Intf
25 ToolPolygon3d1 as any; -- as ToolPolygon(Pnt,Polygon3d1,Box)
27 ToolPolygon3d2 as any) -- as ToolPolygon(Pnt,Polygon3d2,Box)
28 inherits Interference from Intf
30 ---Purpose: Computes the interference between two polygons or the
31 -- self interference of a polygon in 3 dimensions . In 3
32 -- dimensions the result can be a common perpendicular ,
33 -- an orthogonal projection or a real intersections.
34 -- There are two different instantiation arguments to
35 -- authorize an interference between two polygons from
36 -- differents origin. Ex : to intersect a curve polygon
37 -- with an algorithmic curve from numerical walking
38 -- between two surfaces.
41 SectionPoint from Intf,
42 SeqOfSectionPoint from Intf,
43 SectionLine from Intf,
44 SeqOfSectionLine from Intf
46 raises OutOfRange from Standard
52 Create returns InterferencePolygon3d from Intf;
53 ---Purpose: Constructs an empty interference of 3d Polygon.
56 Create (Obje1 : in Polygon3d1 ;Obje2 : in Polygon3d2)
57 returns InterferencePolygon3d from Intf;
58 ---Purpose: Constructs and computes an interference between two Polygons.
61 Create (Obje : in Polygon3d1)
62 returns InterferencePolygon3d from Intf;
63 ---Purpose: Constructs and computes the self interference of a Polygon.
67 Obje1 : in Polygon3d1 ;Obje2 : in Polygon3d2);
68 ---Purpose: Computes an interference between two Polygons.
72 Obje : in Polygon3d1);
73 ---Purpose: Computes the auto interference of a Polygon.
77 returns Integer is static;
78 ---Purpose: Gives the number of common Perpendiculars or orthogonal
79 -- projections between the two polygons.
83 returns SectionLine from Intf
84 raises OutOfRange from Standard
86 ---Purpose: Gives the segment of address <Index> in the interference
87 -- representing the perpendicular or the orthogonal
90 ---C++: return const &
95 returns Real from Standard
96 raises OutOfRange from Standard
98 ---Purpose: Gives the distance between the two polygons
102 returns Real from Standard
104 ---Purpose: Gives the distance between the two polygon3d at the
105 -- perpendicular or projection of minimal length.
109 returns Integer from Standard
111 ---Purpose: Give the perpendicular or projection of minimal length.
112 -- WARNING : if there are points of intersection the minimal
113 -- result is one of them and this function is unusuable.
118 Interference (me : in out;
119 Obje1 : in Polygon3d1;
120 Obje2 : in Polygon3d2)
123 Interference (me : in out;
124 Obje : in Polygon3d1)
127 CommonPerpen (me : in out;
128 BegO : in Pnt from gp;
129 EndO : in Pnt from gp;
130 BegT : in Pnt from gp;
131 EndT : in Pnt from gp)
133 ---Purpose: Computes the common perpendicular between the two
134 -- segments <BegO><EndO> and <BegT><EndT>.
136 Projections (me : in out;
137 BegO : in Pnt from gp;
138 EndO : in Pnt from gp;
139 BegT : in Pnt from gp;
140 EndT : in Pnt from gp)
142 ---Purpose: Computes the different orthogonal projections between
143 -- segment <BegO><EndO> and points <BegT>,<EndT> and segment
144 -- <BegT><EndT> and points <BegO>,<EndO>.
147 fields IndexMin : Integer from Standard;
148 MinimalDist : Real from Standard;
149 iObje1, iObje2 : Integer from Standard;
150 beginOfNotClosedFirst: Boolean from Standard;
151 beginOfNotClosedSecon: Boolean from Standard;
154 end InterferencePolygon3d;