b311480e |
1 | -- Created on: 2000-08-11 |
2 | -- Created by: Andrey BETENEV |
973c2be1 |
3 | -- Copyright (c) 2000-2014 OPEN CASCADE SAS |
b311480e |
4 | -- |
973c2be1 |
5 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
6 | -- |
d5f74e42 |
7 | -- This library is free software; you can redistribute it and/or modify it under |
8 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
9 | -- by the Free Software Foundation, with special exception defined in the file |
10 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
12 | -- |
973c2be1 |
13 | -- Alternatively, this file may be used under the terms of Open CASCADE |
14 | -- commercial license or contractual agreement. |
7fd59977 |
15 | |
16 | package XCAFPrs |
17 | |
18 | ---Purpose: Presentation (visualiation, selection etc.) tools for |
19 | -- DECAF documents |
20 | |
21 | uses |
22 | Quantity, |
23 | TCollection, |
24 | TopAbs, |
25 | TopLoc, |
26 | TopoDS, |
27 | TopTools, |
5cbef0fe |
28 | Graphic3d, |
7fd59977 |
29 | Prs3d, |
30 | PrsMgr, |
31 | TPrsStd, |
32 | AIS, |
33 | TDF, |
34 | XCAFDoc |
35 | |
36 | is |
37 | |
38 | class Driver; |
7fd59977 |
39 | |
74618acf |
40 | imported AISObject; |
7fd59977 |
41 | |
42 | class Style; |
7fd59977 |
43 | |
44 | class DataMapOfShapeStyle instantiates |
45 | DataMap from TCollection(Shape from TopoDS, |
46 | Style from XCAFPrs, |
47 | ShapeMapHasher from TopTools); |
48 | |
49 | class DataMapOfStyleShape instantiates |
50 | DataMap from TCollection(Style from XCAFPrs, |
51 | Shape from TopoDS, |
52 | Style from XCAFPrs); |
53 | |
54 | class DataMapOfStyleTransient instantiates |
55 | DataMap from TCollection(Style from XCAFPrs, |
56 | Transient from Standard, |
57 | Style from XCAFPrs); |
58 | |
59 | ---Methods: Work with styles of the document |
60 | |
61 | CollectStyleSettings (L: Label from TDF; |
62 | loc: Location from TopLoc; |
63 | settings: in out DataMapOfShapeStyle from XCAFPrs); |
64 | ---Purpose: Collect styles defined for shape on label L |
65 | -- and its components and subshapes and fills a map of |
66 | -- shape - style correspondence |
67 | -- The location <loc> is for internal use, it |
68 | -- should be Null location for external call |
69 | |
70 | DispatchStyles (shape: Shape from TopoDS; |
71 | settings: DataMapOfShapeStyle from XCAFPrs; |
72 | items: in out DataMapOfStyleShape from XCAFPrs; |
73 | DefStyle: Style from XCAFPrs; |
74 | force: Boolean = Standard_True; |
75 | context: ShapeEnum from TopAbs = TopAbs_SHAPE) |
76 | returns Boolean; |
77 | ---Purpose: Iterates on shape (recursively) and splits it |
78 | -- on parts each of which has its own style |
79 | -- (basing on settings collected by CollectStyleSettings()) |
80 | -- The DefStyle is default style applied to a shape if |
81 | -- no specific style assignment is applied to it |
82 | -- If force is True, the <shape> is added to a map |
83 | -- even if no styles are redefined for it or its |
84 | -- subshapes |
85 | -- The context is for internal use, it indicates |
86 | -- the type of the shape to which <shape> belongs |
87 | |
88 | SetViewNameMode ( viewNameMode: Boolean from Standard); |
89 | |
90 | ---Purpose: Set ViewNameMode for indicate display names or not. |
91 | |
92 | GetViewNameMode returns Boolean; |
93 | |
94 | |
95 | end XCAFPrs; |