summaryrefslogtreecommitdiff
path: root/src/Select2D/Select2D_SensitiveArc.cdl
blob: 2238309fb8c7b1401bab69b6e9e58da9a11dd645 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
-- File:	Select2D_SensitiveArc.cdl
-- Created:	Tue May 23 10:46:48 1995
-- Author:	Robert COUBLANC
--		<rob@photon>
---Copyright:	 Matra Datavision 1995



class SensitiveArc from Select2D 
inherits SensitiveEntity from Select2D

	---Purpose: sensitive Areas for an Arc Of Circle
	--          One gives Radius and center,and limits.
	--          or a geometric circle.

uses
    Ax2d from gp,
    EntityOwner from SelectBasics,
    ListOfBox2d from SelectBasics

is
    Create (OwnerId      : EntityOwner from SelectBasics;
    	    OriginAxis   : Ax2d from gp;
	    Angle        : Real from Standard;
	    Radius       : Real from Standard;
    	    MaxPoints    : Integer=9)
    returns mutable SensitiveArc ;
    	---Level: Public 
    	---Purpose: Constructs a 2D sensitive arc object defined by the
    	-- owner OwnerId, the axis of origin OriginAxis, the
    	-- angle Angle, the radius Radius, and the maximum
    	-- number of points MaxPoints.
    	--          
    	--               _.
    	--       \ angle /|
    	--        \_____/
    	--         \   /  direction
    	--          \ /
    	--	         *

    Areas (me:mutable ; aresul : in out ListOfBox2d from SelectBasics) is static;
    	---Level: Public 
    	---Purpose: returns the sensitive areas for a circle...    
    
    Matches (me  : mutable ;
             X,Y : Real from Standard;
             aTol: Real from Standard;
             DMin: out Real from Standard) 
    returns Boolean is static;     
    	---Purpose: returns true if the minimum distance DMin
    	--          between the postion x,y and the circle is less than aTol..

	     
    Matches (me  :mutable; 
             XMin,YMin,XMax,YMax : Real from Standard;
             aTol: Real from Standard) 
    returns Boolean
    is static;

fields

    myradius : Real;
    myax2d   : Ax2d from gp;
    myangle  : Real;
    mynbpt   : Integer;
end SensitiveArc;