b311480e |
1 | -- Created on: 2003-10-10 |
2 | -- Created by: Alexander SOLOVYOV |
3 | -- Copyright (c) 2003-2012 OPEN CASCADE SAS |
4 | -- |
5 | -- The content of this file is subject to the Open CASCADE Technology Public |
6 | -- License Version 6.5 (the "License"). You may not use the content of this file |
7 | -- except in compliance with the License. Please obtain a copy of the License |
8 | -- at http://www.opencascade.org and read it completely before using this file. |
9 | -- |
10 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
11 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
12 | -- |
13 | -- The Original Code and all software distributed under the License is |
14 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
15 | -- Initial Developer hereby disclaims all such warranties, including without |
16 | -- limitation, any warranties of merchantability, fitness for a particular |
17 | -- purpose or non-infringement. Please see the License for the specific terms |
18 | -- and conditions governing the rights and limitations under the License. |
19 | |
7fd59977 |
20 | |
21 | package MeshVS |
22 | |
23 | ---Purpose: This package provides classes and simple methods of flexible presentation object |
24 | -- that is responsible for the following tasks: |
25 | -- 1) Displaying mesh ( some mesh elements and nodes may be hidden ) |
26 | -- 2) Results of calculations and analysis are shown through the single common interface. |
27 | -- 3) The data can be shown with different visual styles: colors, vectors, texts and deformed mesh. |
28 | -- 4) Selection of mesh entities (except hidden ones) |
29 | |
30 | uses |
31 | Quantity, AIS, PrsMgr, Prs3d, SelectMgr, TColStd, SelectBasics, |
32 | Graphic3d, gp, TCollection, Bnd, TColgp, Select3D, TopLoc, Aspect, AlienImage |
33 | |
34 | is |
35 | ---Purpose: The integer keys for most useful constants attuning mesh presentation appearence |
36 | -- WARNING: DA_TextExpansionFactor, DA_TextSpace, DA_TextDisplayType have no effect and might be removed |
37 | -- in the future. |
38 | |
39 | enumeration DrawerAttribute is |
40 | |
41 | -- Attributes of AspectFillArea3d |
42 | DA_InteriorStyle, |
43 | DA_InteriorColor, |
44 | DA_BackInteriorColor, |
45 | DA_EdgeColor, |
46 | DA_EdgeType, |
47 | DA_EdgeWidth, |
48 | DA_HatchStyle, |
49 | DA_FrontMaterial, |
50 | DA_BackMaterial, |
51 | -- Attributes of AspectLine3d |
52 | DA_BeamType, |
53 | DA_BeamWidth, |
54 | DA_BeamColor, |
55 | -- Attributes of AspectMarker3d |
56 | DA_MarkerType, |
57 | DA_MarkerColor, |
58 | DA_MarkerScale, |
59 | -- Attributes of AspectText3d |
60 | DA_TextColor, |
61 | DA_TextHeight, |
62 | DA_TextFont, |
63 | DA_TextExpansionFactor, |
64 | DA_TextSpace, |
65 | DA_TextStyle, |
66 | DA_TextDisplayType, |
67 | DA_TextTexFont, |
68 | DA_TextFontAspect, |
69 | -- Attributes of vector presentation |
70 | DA_VectorColor, |
71 | DA_VectorMaxLength, |
72 | DA_VectorArrowPart, |
73 | |
74 | -- Attributes of MeshVS_Mesh |
75 | DA_IsAllowOverlapped, |
76 | ---Purpose: Is it allowed to draw beam and face's edge overlapping with this beam. |
77 | |
78 | DA_Reflection, |
79 | ---Purpose: Is mesh drawn with reflective material |
80 | |
81 | DA_ColorReflection, |
82 | ---Purpose: Is colored mesh data representation drawn with reflective material |
83 | |
84 | DA_ShrinkCoeff, |
85 | ---Purpose: What part of face or link will be shown if shrink mode. It is recommended this coeff to be between 0 and 1. |
86 | |
87 | DA_MaxFaceNodes, |
88 | ---Purpose: How many nodes is possible to be in face |
89 | |
90 | DA_ComputeTime, |
91 | ---Purpose: If this parameter is true, the compute method CPU time will be displayed in console window |
92 | |
93 | DA_ComputeSelectionTime, |
94 | ---Purpose: If this parameter is true, the compute selection method CPU time will be displayed in console window |
95 | |
96 | DA_DisplayNodes, |
97 | ---Purpose: If this parameter is false, the nodes won't be shown in viewer, otherwise will be. |
98 | |
99 | DA_SelectableAuto, |
100 | ---Purpose: If this parameter is true, the selectable nodes map will be updated automatically when hidden elements change |
101 | |
102 | DA_ShowEdges, |
103 | ---Purpose: If this parameter is false, the face's edges are not shown |
104 | -- Warning: in wireframe mode this parameter is ignored |
105 | |
106 | DA_SmoothShading, |
107 | ---Purpose: Is mesh drawing in smooth shading mode |
108 | |
109 | DA_SupressBackFaces, |
110 | ---Purpose: Is back faces of volume elements should be supressed |
111 | |
112 | DA_User |
113 | |
114 | end DrawerAttribute; |
115 | |
116 | ---Purpose: this enumeration describe what type of sensitive entity will be built |
117 | -- in 0-th selection mode (it means that whole mesh is selected ) |
118 | enumeration MeshSelectionMethod is |
119 | |
120 | MSM_PRECISE, -- the list of sensitive entities according to nodes and elements (the slowest method) |
121 | MSM_NODES, -- only set of sensitive points of nodes |
122 | MSM_BOX -- mesh bounding box (the fastest method) |
123 | |
124 | end MeshSelectionMethod; |
125 | |
126 | class Mesh; |
127 | pointer MeshPtr to Mesh from MeshVS; |
128 | class Drawer; |
129 | deferred class DataSource; |
130 | deferred class DataSource3D; |
131 | class DeformedDataSource; |
132 | |
133 | ---Category: Presentation builders for some ordinary types of data |
134 | |
135 | deferred class PrsBuilder; |
136 | class MeshPrsBuilder; |
137 | class NodalColorPrsBuilder; |
138 | class ElementalColorPrsBuilder; |
139 | class TextPrsBuilder; |
140 | class VectorPrsBuilder; |
141 | |
142 | ---Category: Classes for selection: special owner and sensitive entities |
143 | |
144 | class MeshOwner; |
145 | class MeshEntityOwner; |
146 | |
147 | class DummySensitiveEntity; |
148 | class SensitiveMesh; |
149 | class SensitiveFace; |
150 | class SensitiveSegment; |
151 | class SensitivePolyhedron; |
152 | |
153 | ---Category: miscellaneous types: data maps, enumerations and other |
154 | |
155 | imported EntityType; |
156 | imported DisplayModeFlags; |
157 | imported SelectionModeFlags; |
158 | imported TwoColors; |
159 | imported BuilderPriority; |
160 | imported TwoNodes; |
161 | imported Buffer; |
162 | |
163 | class Tool; |
164 | |
165 | class SequenceOfPrsBuilder instantiates Sequence from TCollection ( PrsBuilder ); |
166 | |
167 | class DataMapOfIntegerColor instantiates DataMap from TCollection |
168 | ( Integer, Color from Quantity, MapIntegerHasher from TColStd ); |
169 | |
170 | class DataMapOfIntegerMaterial instantiates DataMap from TCollection |
171 | ( Integer, MaterialAspect from Graphic3d, MapIntegerHasher from TColStd ); |
172 | |
173 | class DataMapOfIntegerBoolean instantiates DataMap from TCollection |
174 | ( Integer, Boolean, MapIntegerHasher from TColStd ); |
175 | |
176 | class DataMapOfIntegerOwner instantiates DataMap from TCollection |
177 | ( Integer, EntityOwner from SelectMgr, MapIntegerHasher from TColStd ); |
178 | |
179 | class DataMapOfIntegerMeshEntityOwner instantiates DataMap from TCollection |
180 | ( Integer, MeshEntityOwner from MeshVS, MapIntegerHasher from TColStd ); |
181 | |
182 | class DataMapOfIntegerAsciiString instantiates DataMap from TCollection |
183 | ( Integer, AsciiString from TCollection, MapIntegerHasher from TColStd ); |
184 | |
185 | class DataMapOfIntegerTwoColors instantiates DataMap from TCollection |
186 | ( Integer, TwoColors from MeshVS, MapIntegerHasher from TColStd ); |
187 | |
188 | class DataMapOfIntegerVector instantiates DataMap from TCollection |
189 | ( Integer, Vec from gp, MapIntegerHasher from TColStd ); |
190 | |
191 | class TwoColorsHasher instantiates MapHasher from TCollection( TwoColors ); |
192 | |
193 | class ColorHasher; |
194 | |
195 | class DataMapOfTwoColorsMapOfInteger instantiates DataMap from TCollection |
196 | ( TwoColors from MeshVS, MapOfInteger from TColStd, TwoColorsHasher ); |
197 | |
198 | class DataMapOfColorMapOfInteger instantiates DataMap from TCollection |
199 | ( Color from Quantity, MapOfInteger from TColStd, ColorHasher ); |
200 | |
201 | class Array1OfSequenceOfInteger instantiates Array1 from TCollection( SequenceOfInteger from TColStd ); |
202 | |
203 | class HArray1OfSequenceOfInteger instantiates HArray1 from TCollection |
204 | ( SequenceOfInteger from TColStd, Array1OfSequenceOfInteger ); |
205 | |
206 | class DataMapOfHArray1OfSequenceOfInteger instantiates DataMap from TCollection |
207 | ( Integer, HArray1OfSequenceOfInteger from MeshVS, MapIntegerHasher from TColStd ); |
208 | |
209 | class TwoNodesHasher instantiates MapHasher from TCollection( TwoNodes ); |
210 | |
211 | class MapOfTwoNodes instantiates Map from TCollection( TwoNodes, TwoNodesHasher ); |
212 | |
213 | end MeshVS; |