0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / AppParCurves / AppParCurves_ResolConstraint.cdl
CommitLineData
b311480e 1-- Created on: 1991-07-25
2-- Created by: Laurent PAINNOT
3-- Copyright (c) 1991-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
17generic class ResolConstraint from AppParCurves
7fd59977 18 (MultiLine as any;
19 ToolLine as any) -- as ToolLine(MultiLine)
20
21
22 ---Purpose: This classe describes the algorithm to find the approximate
23 -- solution of a MultiLine with constraints. The resolution
24 -- algorithm is the Uzawa method. See the math package
25 -- for more information.
26 -- All the tangencies of MultiPointConstraint's points
27 -- will be colinear.
28 -- Be careful of the curvature: it is possible to have some
29 -- curvAature points only for one curve. In this case, the Uzawa
30 -- method is used with a non-linear resolution, much more longer.
31
32
33uses Matrix from math,
34 Vector from math,
35 Array1OfInteger from TColStd,
36 MultiCurve from AppParCurves,
37 HArray1OfConstraintCouple from AppParCurves
38
39
40raises OutOfRange from Standard
41
42is
43
44 Create(SSP: MultiLine; SCurv: in out MultiCurve;
45 FirstPoint, LastPoint: Integer;
46 Constraints: HArray1OfConstraintCouple;
47 Bern, DerivativeBern: Matrix; Tolerance: Real = 1.0e-10)
48 ---Purpose: Given a MultiLine SSP with constraints points, this
49 -- algorithm finds the best curve solution to approximate it.
50 -- The poles from SCurv issued for example from the least
51 -- squares are used as a guess solution for the uzawa
52 -- algorithm. The tolerance used in the Uzawa algorithms
53 -- is Tolerance.
54 -- A is the Bernstein matrix associated to the MultiLine
55 -- and DA is the derivative bernstein matrix.(They can come
56 -- from an approximation with ParLeastSquare.)
57 -- The MultiCurve is modified. New MultiPoles are given.
58
59
60 returns ResolConstraint from AppParCurves;
61
62
63 IsDone(me)
64 ---Purpose: returns True if all has been correctly done.
65
66 returns Boolean
67 is static;
68
69
70 Error(me)
71 ---Purpose: returns the maximum difference value between the curve
72 -- and the given points.
73
74 returns Real
75 is static;
76
77
78 ConstraintMatrix(me)
79 ---Purpose:
80 ---C++: return const&
81
82 returns Matrix
83 is static;
84
85
86 Duale(me)
87 ---Purpose: returns the duale variables of the system.
88 ---C++: return const&
89 returns Vector
90 is static;
91
92
93 ConstraintDerivative(me: in out; SSP: MultiLine; Parameters: Vector;
94 Deg: Integer; DA: Matrix)
95 ---Purpose: Returns the derivative of the constraint matrix.
96 ---C++: return const&
97 returns Matrix
98 is static;
99
100
101 InverseMatrix(me)
102 ---Purpose: returns the Inverse of Cont*Transposed(Cont), where
103 -- Cont is the constraint matrix for the algorithm.
104 ---C++: return const&
105
106 returns Matrix
107 is static;
108
109 NbConstraints(me; SSP: MultiLine; FirstPoint, LastPoint: Integer;
110 TheConstraints: HArray1OfConstraintCouple)
111 ---Purpose: is used internally to create the fields.
112
113 returns Integer
114 is static protected;
115
116
117 NbColumns(me; SSP: MultiLine; Deg: Integer)
118 ---Purpose: is internally used for the fields creation.
119
120 returns Integer
121 is static protected;
122
123
124fields
125
126Done: Boolean;
127Err: Real;
128Cont: Matrix;
129DeCont: Matrix;
130Secont: Vector;
131CTCinv: Matrix;
132Vardua: Vector;
133IncPass: Integer;
134IncTan: Integer;
135IncCurv: Integer;
136IPas: Array1OfInteger;
137ITan: Array1OfInteger;
138ICurv: Array1OfInteger;
139
140end ResolConstraint;