b311480e |
1 | -- Created on: 1992-12-16 |
2 | -- Created by: Jean Louis FRENKEL |
3 | -- Copyright (c) 1992-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | -- |
6 | -- The content of this file is subject to the Open CASCADE Technology Public |
7 | -- License Version 6.5 (the "License"). You may not use the content of this file |
8 | -- except in compliance with the License. Please obtain a copy of the License |
9 | -- at http://www.opencascade.org and read it completely before using this file. |
10 | -- |
11 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | -- |
14 | -- The Original Code and all software distributed under the License is |
15 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | -- Initial Developer hereby disclaims all such warranties, including without |
17 | -- limitation, any warranties of merchantability, fitness for a particular |
18 | -- purpose or non-infringement. Please see the License for the specific terms |
19 | -- and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | |
22 | generic class Line from Prs3d |
23 | (anyLine as any; |
24 | LineTool as any) -- as LineTool from Prs3d |
25 | inherits Root from Prs3d |
26 | |
27 | ---Purpose: draws a broken line. |
28 | -- |
29 | |
30 | uses |
31 | Presentation from Prs3d, |
32 | Drawer from Prs3d, |
33 | TypeOfLinePicking from Prs3d, |
34 | Length from Quantity |
35 | |
36 | is |
37 | Add(myclass; aPresentation: Presentation from Prs3d; |
38 | aLine: anyLine; |
39 | aDrawer: Drawer from Prs3d); |
40 | |
41 | ---Purpose: adds to the presentation aPresentation the drawing of the |
42 | -- broken line aLine. |
43 | -- The aspect is defined by LineAspect in aDrawer. |
44 | |
45 | |
46 | Add(myclass; aPresentation: Presentation from Prs3d; |
47 | aLine: anyLine); |
48 | |
49 | ---Purpose: adds to the presentation aPresentation the drawing of the |
50 | -- broken line aLine. |
51 | -- The aspect is the current aspect. |
52 | |
53 | |
54 | |
55 | Pick(myclass; X,Y,Z: Length from Quantity; |
56 | aDistance: Length from Quantity; |
57 | aLine: anyLine; |
58 | aDrawer: Drawer from Prs3d; |
59 | TypeOfPicking: TypeOfLinePicking from Prs3d) |
60 | returns Integer from Standard; |
61 | |
62 | ---Purpose: if TypeOfLinePicking is set to Prs3d_TOLP_Point |
63 | -- returns the number of the point the most near of the |
64 | -- point (X,Y,Z). The distance between the point and |
65 | -- (X,Y,Z) must be less then aDistance. If no point corresponds, |
66 | -- 0 is returned. |
67 | -- if TypeOfLinePicking is set to Prs3d_TOLP_Segment returns |
68 | -- the number of the segment the most near of the point (X,Y,Z). |
69 | -- The distance between the segment and (X,Y,Z) must be less |
70 | -- then aDistance. If no segment corresponds, 0 is returned. |
71 | |
72 | |
73 | end Line; |