blob: 12cf83ff09dc5386984a4e234412c8bd3b0e4ff8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
-- File: AdvApprox_PrefAndRec.cdl
-- Created: Thu Nov 14 11:29:36 1996
-- Author: Philippe MANGIN
-- <pmn@sgi29>
---Copyright: Matra Datavision 1996
class PrefAndRec from AdvApprox inherits Cutting from AdvApprox
---Purpose :
-- inherits class Cutting; contains a list of preferential points (pi)i
-- and a list of Recommended points used in cutting management.
uses Array1OfReal from TColStd
raises DomainError from Standard
is
Create(RecomendedCut : Array1OfReal;
PrefferedCut : Array1OfReal;
Weight : Real = 5 )
returns PrefAndRec
raises DomainError; -- if Weight <= 1
Value(me; a,b : Real;
cuttingvalue : out Real)
returns Boolean
---Purpose:
-- cuting value is
-- - the recommended point nerest of (a+b)/2
-- if pi is in ]a,b[ or else
-- - the preferential point nearest of (a+b) / 2
-- if pi is in ](r*a+b)/(r+1) , (a+r*b)/(r+1)[ where r = Weight
-- - or (a+b)/2 else.
is redefined;
fields
myRecCutting : Array1OfReal from TColStd;
myPrefCutting: Array1OfReal from TColStd;
myWeight : Real;
end PrefAndRec;
|