b311480e |
1 | -- Created on: 1996-03-18 |
2 | -- Created by: Stagiaire Frederic CALOONE |
3 | -- Copyright (c) 1996-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
8 | -- This library is free software; you can redistribute it and/or modify it under |
9 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
10 | -- by the Free Software Foundation, with special exception defined in the file |
11 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
b311480e |
16 | |
7fd59977 |
17 | -- Modified: Wed Mar 5 09:45:42 1997 |
18 | -- by: Joelle CHAUVET |
19 | -- G1134 : convertion of a GeomPlate_Surface to a Geom_BSplineSurface |
20 | -- by approximation with G0 or G1 criterion |
21 | -- modification of Create, BasePlan and DefPlan for options |
7fd59977 |
22 | |
23 | class BuildAveragePlane from GeomPlate |
24 | |
25 | ---Purpose: This class computes an average inertial plane with an |
26 | -- array of points. |
ff8178ef |
27 | -- Computes the initial surface (average plane) in the cases |
28 | -- when the initial surface is not given. |
7fd59977 |
29 | |
30 | uses |
31 | Jacobi from math, |
32 | Matrix from math, |
33 | Vector from math, |
34 | Pnt from gp, |
35 | HArray1OfPnt from TColgp, |
36 | Plane from Geom, |
37 | Vec from gp, |
38 | Line from Geom, |
39 | |
40 | SequenceOfVec from TColgp, |
41 | SequenceOfAij from GeomPlate |
42 | |
43 | raises |
44 | NoSuchObject from Standard |
45 | |
46 | is |
47 | |
48 | Create ( Pts : HArray1OfPnt from TColgp; |
49 | NbBoundPoints : Integer from Standard; |
50 | Tol : Real from Standard; |
51 | POption : Integer from Standard ; |
52 | NOption : Integer from Standard ) |
53 | returns BuildAveragePlane from GeomPlate; |
54 | ---Purpose: Tol is a Tolerance to make the difference between |
55 | -- the result plane and the result line. |
56 | --- if POption = 1 : automatical parametrisation |
57 | --- if POption = 2 : parametrisation by eigen vectors |
58 | --- if NOption = 1 : the average plane is the inertial plane. |
59 | --- if NOption = 2 : the average plane is the plane of max. flux. |
60 | |
61 | Create ( Normals : SequenceOfVec from TColgp; |
62 | Pts : HArray1OfPnt from TColgp ) |
63 | returns BuildAveragePlane from GeomPlate; |
64 | ---Purpose: Creates the plane from the "best vector" |
65 | |
66 | |
67 | BasePlan ( me : in out ; N :Vec from gp) |
68 | ---Purpose: Computes a base of the average plane defined by (myG,N) |
69 | --- using eigen vectors |
70 | is private; |
71 | |
72 | DefPlan ( me : in out ; NOption : Integer from Standard ) |
73 | ---Purpose: Defines the average plane. |
74 | --- if NOption = 1 : the average plane is the inertial plane. |
75 | --- if NOption = 2 : the average plane is the plane of max. flux. |
76 | returns Vec from gp |
77 | is private; |
78 | |
79 | |
80 | Plane ( me ) returns Plane from Geom |
81 | ---Purpose: |
82 | -- Return the average Plane. |
83 | raises NoSuchObject from Standard; |
84 | -- Raises if the computed object is not a Plane. |
85 | |
86 | Line ( me ) returns Line from Geom |
87 | ---Purpose : |
88 | -- Return a Line when 2 eigenvalues are null. |
89 | raises NoSuchObject from Standard; |
90 | -- Raises if the computed object is not a Line. |
91 | |
92 | IsPlane ( me ) |
93 | ---Purpose: return OK if is a plane. |
94 | returns Boolean from Standard; |
95 | |
96 | |
97 | IsLine ( me ) |
98 | ---Purpose: return OK if is a line. |
99 | returns Boolean from Standard; |
100 | |
101 | |
102 | MinMaxBox ( me ; Umin,Umax,Vmin,Vmax : out Real from Standard); |
103 | ---Purpose: computes the minimal box to include all normal |
104 | -- projection points of the initial array on the plane. |
105 | |
106 | HalfSpace( myclass ; NewNormals : SequenceOfVec from TColgp; |
107 | Normals : in out SequenceOfVec from TColgp; |
108 | Bset : in out SequenceOfAij from GeomPlate; |
109 | LinTol : Real from Standard; |
110 | AngTol : Real from Standard ) |
111 | returns Boolean from Standard; |
112 | |
113 | fields |
114 | |
115 | myPts : HArray1OfPnt from TColgp; |
116 | myUmax : Real from Standard; |
117 | myVmax : Real from Standard; |
118 | myVmin : Real from Standard; |
119 | myUmin : Real from Standard; |
120 | myPlane: Plane from Geom; |
121 | myTol : Real from Standard; |
122 | myLine : Line from Geom; |
123 | myOX : Vec from gp; |
124 | myOY : Vec from gp; |
125 | myG : Pnt from gp; |
126 | |
127 | myNbBoundPoints : Integer from Standard; |
128 | |
129 | end; |