summaryrefslogtreecommitdiff
path: root/src/Prs2d/Prs2d_ToleranceFrame.cdl
blob: a58531fab2b13d21cdea193aedc7bf13707c2693 (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
-- File      : Prs2d_ToleranceFrame.cdl
-- Created   : October 2000
-- Author    : TCL
---Copyright : Matra Datavision 2000

class ToleranceFrame from Prs2d inherits Line from Graphic2d

uses

	GraphicObject     from Graphic2d,
	Drawer            from Graphic2d,
	Length	          from Quantity,
	ExtendedString    from TCollection,
	TypeOfTolerance   from Prs2d,
	Tolerance         from Prs2d,
        Array1OfShortReal from TShort,
        FStream           from Aspect,
	Pnt2d             from gp,
	HArray1OfPnt2d    from TColgp
is
	-------------------------
	-- Category: Constructors
	-------------------------

	Create( aGO                   : GraphicObject   from Graphic2d;
        	aX, aY                : Length          from Quantity;
		aHeight               : Length          from Quantity;
            	aTolType              : TypeOfTolerance from Prs2d = Prs2d_TOT_NONE;
            	aTolTxt               : CString         from Standard = "";
		aTxt1                 : CString         from Standard = "";
		aTxt2                 : CString         from Standard = "";
            	anAngle               : Real            from Standard = 0.0;
     	    	aScale                : Real            from Standard = 1.0 );

	---Level: Public
	---Purpose: Creates a frame with a type of tolerance <aTolType>, 
	--          tolerance <aTolTxt>, the reference point is <aXPosition>, <aYPosition
	--          <aX>, <aY> - the center of left vertical edge of this frame
	---Category: Constructor

	--------------------------
	-- Category: Draw and Pick
	--------------------------

	Draw( me : mutable; aDrawer: Drawer from Graphic2d )
    	is static protected;
	---Level: Internal
	---Purpose: Draws the angle <me>.

	Pick( me : mutable; X, Y: ShortReal from Standard;
		  aPrecision: ShortReal from Standard;
		  aDrawer: Drawer from Graphic2d)
	    returns Boolean from Standard
	is static protected;
	---Level: Internal
	---Purpose: Returns Standard_True if the tolerance frame <me> is picked,
	--	    Standard_False if not.
	
	SetHeight( me: mutable; aHSize: Real from Standard );
	---Level: Public
	---Purpose: Defines the height of the frame 

	Height( me ) returns Real from Standard;
	---Level: Public
	---Purpose: Indicates the current height of the frame

 	---------------------------------------------------

	Save( me; aFStream: in out FStream from Aspect ) is virtual;

	ArrayOfPnt2d( me ) returns HArray1OfPnt2d from TColgp;
	---Level: Public
    	---C++: return const
	---Purpose: Returns array of 2d points, which produce frame for tolerance
	--          Size of array == 4

	SetTolText( me: mutable; aText: CString from Standard );
   	---Level: Public
	---Purpose: Sets the text to this tolerance

	SetText1( me: mutable; aText: CString from Standard );
   	---Level: Public

	SetText2( me: mutable; aText: CString from Standard );
   	---Level: Public


	TolText( me ) returns ExtendedString from TCollection;
	---Level: Public
	---Purpose: Returns text and array, which contain points of cell 
        --          which separates the text from other parameters

	Text1( me ) returns ExtendedString from TCollection;
	---Level: Public

	Text2( me ) returns ExtendedString from TCollection;
	---Level: Public

	TextScale( me ) returns Real from Standard;
        ---Level: Public
	

fields

	myX          : ShortReal         from Standard;
    	myY          : ShortReal         from Standard;
    	myTolTxt     : ExtendedString    from TCollection; 
  	myTxt1       : ExtendedString    from TCollection;
	myTxt2       : ExtendedString    from TCollection;
    	myHeight     : ShortReal         from Standard;
    	myAngle      : ShortReal         from Standard;
    	myScale      : ShortReal         from Standard;
	myHTol       : Tolerance         from Prs2d;

  	myXVert      : Array1OfShortReal from TShort;
	myYVert      : Array1OfShortReal from TShort;
	
    
end ToleranceFrame from Prs2d;