0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / XCAFDoc / XCAFDoc.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14 #include <XCAFDoc.hxx>
15 #include <XCAFDoc_ColorType.hxx>
16
17 #include <TCollection_HAsciiString.hxx>
18 #include <TDF_Reference.hxx>
19 #include <TDF_Tool.hxx>
20 #include <TDataStd_AsciiString.hxx>
21 #include <TDataStd_Integer.hxx>
22 #include <TDataStd_Comment.hxx>
23 #include <TDataStd_ByteArray.hxx>
24 #include <TDataStd_IntegerArray.hxx>
25 #include <TDataStd_Name.hxx>
26 #include <XCAFDoc_LengthUnit.hxx>
27 #include <TDataStd_RealArray.hxx>
28 #include <TDataStd_TreeNode.hxx>
29 #include <TDataStd_UAttribute.hxx>
30 #include <TDocStd_Document.hxx>
31 #include <TNaming_NamedShape.hxx>
32 #include <XCAFDoc_Area.hxx>
33 #include <XCAFDoc_Centroid.hxx>
34 #include <XCAFDoc_Color.hxx>
35 #include <XCAFDoc_DimTol.hxx>
36 #include <XCAFDoc_GraphNode.hxx>
37 #include <XCAFDoc_Material.hxx>
38 #include <XCAFDoc_ShapeMapTool.hxx>
39 #include <XCAFDoc_Volume.hxx>
40
41 //=======================================================================
42 //function : ShapeRefGUID
43 //purpose  : 
44 //=======================================================================
45
46 const Standard_GUID& XCAFDoc::ShapeRefGUID ()
47 {
48   static const Standard_GUID ID ("5b896afe-3adf-11d4-b9b7-0060b0ee281b");
49   return ID;
50 }
51
52
53 //=======================================================================
54 //function : AssemblyGUID
55 //purpose  : 
56 //=======================================================================
57
58 const Standard_GUID& XCAFDoc::AssemblyGUID ()
59 {
60   static const Standard_GUID ID ("5b896b00-3adf-11d4-b9b7-0060b0ee281b");
61   return ID;
62 }
63
64
65 //=======================================================================
66 //function : ExternRefGUID
67 //purpose  : 
68 //=======================================================================
69
70 const Standard_GUID& XCAFDoc::ExternRefGUID ()
71 {
72   static const Standard_GUID ID ("6b896b01-3adf-11d4-b9b7-0060b0ee281b");
73   return ID;
74 }
75
76
77 //=======================================================================
78 //function : ColorRefGUID
79 //purpose  : 
80 //=======================================================================
81
82 const Standard_GUID& XCAFDoc::ColorRefGUID (const XCAFDoc_ColorType type)
83 {
84   static const Standard_GUID IDcol     ("efd212e4-6dfd-11d4-b9c8-0060b0ee281b");
85   static const Standard_GUID IDcolSurf ("efd212e5-6dfd-11d4-b9c8-0060b0ee281b");
86   static const Standard_GUID IDcolCurv ("efd212e6-6dfd-11d4-b9c8-0060b0ee281b");
87
88   switch ( type ) {
89   default:
90   case XCAFDoc_ColorGen : return IDcol;
91   case XCAFDoc_ColorSurf: return IDcolSurf;
92   case XCAFDoc_ColorCurv: return IDcolCurv;
93   }
94 }
95
96
97 //=======================================================================
98 //function : DimTolRefGUID
99 //purpose  : 
100 //=======================================================================
101
102 const Standard_GUID& XCAFDoc::DimTolRefGUID()
103 {
104   //static const Standard_GUID IDDimTol("58ed092d-44de-11d8-8776-001083004c77");
105   static const Standard_GUID ID("efd212e9-6dfd-11d4-b9c8-0060b0ee281b");
106   //return IDDimTol;
107   return ID;
108 }
109
110 //=======================================================================
111 //function : DimensionRefGUID
112 //purpose  : 
113 //=======================================================================
114
115 const Standard_GUID& XCAFDoc::DimensionRefFirstGUID()
116 {
117   static const Standard_GUID ID("efd212e3-6dfd-11d4-b9c8-0060b0ee281b");
118   return ID;
119 }
120
121 //=======================================================================
122 //function : DimensionRefGUID
123 //purpose  : 
124 //=======================================================================
125
126 const Standard_GUID& XCAFDoc::DimensionRefSecondGUID()
127 {
128   static const Standard_GUID ID("efd212e0-6dfd-11d4-b9c8-0060b0ee281b");
129   return ID;
130 }
131
132 //=======================================================================
133 //function : GeomToleranceRefGUID
134 //purpose  : 
135 //=======================================================================
136
137 const Standard_GUID& XCAFDoc::GeomToleranceRefGUID()
138 {
139   static const Standard_GUID ID("efd213e3-6dfd-11d4-b9c8-0060b0ee281b");
140   return ID;
141 }
142
143 //=======================================================================
144 //function : DatumRefGUID
145 //purpose  : 
146 //=======================================================================
147
148 const Standard_GUID& XCAFDoc::DatumRefGUID()
149 {
150   static const Standard_GUID ID("efd212e2-6dfd-11d4-b9c8-0060b0ee281b");
151   return ID;
152 }
153
154
155 //=======================================================================
156 //function : DatumTolRefGUID
157 //purpose  : 
158 //=======================================================================
159
160 const Standard_GUID& XCAFDoc::DatumTolRefGUID()
161 {
162   //static const Standard_GUID IDDimTol("58ed092d-44de-11d8-8776-001083004c77");
163   static const Standard_GUID ID("efd212e7-6dfd-11d4-b9c8-0060b0ee281b");
164   //return IDDimTol;
165   return ID;
166 }
167
168
169 //=======================================================================
170 //function : LayerRefGUID
171 //purpose  : 
172 //=======================================================================
173
174 const Standard_GUID& XCAFDoc::LayerRefGUID ()
175 {
176   static const Standard_GUID ID ("efd212e8-6dfd-11d4-b9c8-0060b0ee281b");
177   return ID;
178 }
179
180
181 //=======================================================================
182 //function : MaterialRefGUID
183 //purpose  : 
184 //=======================================================================
185
186 const Standard_GUID& XCAFDoc::MaterialRefGUID ()
187 {
188   static const Standard_GUID ID ("efd212f7-6dfd-11d4-b9c8-0060b0ee281b");
189   return ID;
190 }
191
192 //=======================================================================
193 //function : VisMaterialRefGUID
194 //purpose  :
195 //=======================================================================
196 const Standard_GUID& XCAFDoc::VisMaterialRefGUID()
197 {
198   static const Standard_GUID ID ("936F4070-5369-405D-A7AD-2AC76C860EC8");
199   return ID;
200 }
201
202 //=======================================================================
203 //function : NoteRefGUID
204 //purpose  : 
205 //=======================================================================
206
207 const Standard_GUID& XCAFDoc::NoteRefGUID()
208 {
209   static const Standard_GUID ID ("F3599E50-F84A-493e-8D1B-1284E79322F1");
210   return ID;
211 }
212
213 //=======================================================================
214 //function : InvisibleGUID
215 //purpose  : 
216 //=======================================================================
217
218 const Standard_GUID& XCAFDoc::InvisibleGUID ()
219 {
220   static const Standard_GUID ID ("5b896aff-3adf-11d4-b9b7-0060b0ee281b");
221   return ID;
222 }
223
224
225 //=======================================================================
226 //function : ColorByLayerGUID
227 //purpose  : 
228 //=======================================================================
229
230 const Standard_GUID& XCAFDoc::ColorByLayerGUID ()
231 {
232   static const Standard_GUID ID ("279e8c1e-70af-4130-b626-9cc52a537db8");
233   return ID;
234 }
235
236
237 //=======================================================================
238 //function : SHUORefGUID
239 //purpose  : 
240 //=======================================================================
241
242 const Standard_GUID& XCAFDoc::SHUORefGUID ()
243 {
244   static const Standard_GUID ID ("efd212ea-6dfd-11d4-b9c8-0060b0ee281b");
245   return ID;
246 }
247
248 //=======================================================================
249 //function : ViewRefGUID
250 //purpose  : 
251 //=======================================================================
252
253 const Standard_GUID& XCAFDoc::ViewRefGUID()
254 {
255   static const Standard_GUID ID("efd213e5-6dfd-11d4-b9c8-0060b0ee281b");
256   return ID;
257 }
258
259 //=======================================================================
260 //function : ViewRefShapeGUID
261 //purpose  : 
262 //=======================================================================
263
264 const Standard_GUID& XCAFDoc::ViewRefShapeGUID()
265 {
266   static const Standard_GUID ID("efd213e6-6dfd-11d4-b9c8-0060b0ee281b");
267   return ID;
268 }
269
270 //=======================================================================
271 //function : ViewRefGDTGUID
272 //purpose  : 
273 //=======================================================================
274
275 const Standard_GUID& XCAFDoc::ViewRefGDTGUID()
276 {
277   static const Standard_GUID ID("efd213e7-6dfd-11d4-b9c8-0060b0ee281b");
278   return ID;
279 }
280
281 //=======================================================================
282 //function : ViewRefPlaneGUID
283 //purpose  : 
284 //=======================================================================
285
286 const Standard_GUID& XCAFDoc::ViewRefPlaneGUID()
287 {
288   static const Standard_GUID ID("efd213e9-6dfd-11d4-b9c8-0060b0ee281b");
289   return ID;
290 }
291
292 //=======================================================================
293 //function : ViewRefPlaneGUID
294 //purpose  : 
295 //=======================================================================
296
297 const Standard_GUID& XCAFDoc::ViewRefNoteGUID()
298 {
299   static const Standard_GUID ID("C814ACC6-43AC-4812-9B2A-4E9A2A549354");
300   return ID;
301 }
302
303 //=======================================================================
304 //function : ViewRefPlaneGUID
305 //purpose  : 
306 //=======================================================================
307
308 const Standard_GUID& XCAFDoc::ViewRefAnnotationGUID()
309 {
310   static const Standard_GUID ID("A2B5BA42-DD00-43f5-8882-4B5F8E76B9D2");
311   return ID;
312 }
313
314 //=======================================================================
315 //function : LockGUID
316 //purpose  : 
317 //=======================================================================
318
319 const Standard_GUID& XCAFDoc::LockGUID()
320 {
321   static const Standard_GUID ID("efd213eb-6dfd-11d4-b9c8-0060b0ee281b");
322   return ID;
323 }
324
325 //=======================================================================
326 //function : AttributeInfo
327 //purpose  :
328 //=======================================================================
329 TCollection_AsciiString XCAFDoc::AttributeInfo (const Handle(TDF_Attribute)& theAtt)
330 {
331   TCollection_AsciiString anInfo;
332
333   if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_TreeNode)) ) {
334     Standard_CString type = "";
335     if ( theAtt->ID() == XCAFDoc::ShapeRefGUID() ) type = "Shape Instance Link";
336     else if ( theAtt->ID() == XCAFDoc::ColorRefGUID(XCAFDoc_ColorGen) ) type = "Generic Color Link";
337     else if ( theAtt->ID() == XCAFDoc::ColorRefGUID(XCAFDoc_ColorSurf) ) type = "Surface Color Link";
338     else if ( theAtt->ID() == XCAFDoc::ColorRefGUID(XCAFDoc_ColorCurv) ) type = "Curve Color Link";
339     else if ( theAtt->ID() == XCAFDoc::DimTolRefGUID() ) type = "DGT Link";
340     else if ( theAtt->ID() == XCAFDoc::DatumRefGUID() ) type = "Datum Link";
341     else if ( theAtt->ID() == XCAFDoc::MaterialRefGUID() ) type = "Material Link";
342     Handle(TDataStd_TreeNode) TN = Handle(TDataStd_TreeNode)::DownCast(theAtt);
343     TCollection_AsciiString ref;
344     if ( TN->HasFather() ) {
345       TDF_Tool::Entry ( TN->Father()->Label(), ref );
346       anInfo = type;
347       anInfo += TCollection_AsciiString (" ==> ") + ref;
348     }
349     else {
350       anInfo = type;
351       anInfo += TCollection_AsciiString (" <== (") + ref;
352       Handle(TDataStd_TreeNode) child = TN->First();
353       while ( ! child.IsNull() ) {
354         TDF_Tool::Entry ( child->Label(), ref );
355         if ( child != TN->First() ) anInfo +=  ", " ;
356         anInfo += ref;
357         child = child->Next();
358       }
359       anInfo += ")";
360     }
361   }
362   else if ( theAtt->IsKind(STANDARD_TYPE(TDF_Reference)) ) {
363     Handle(TDF_Reference) val = Handle(TDF_Reference)::DownCast ( theAtt );
364     TCollection_AsciiString ref;
365     TDF_Tool::Entry ( val->Get(), ref );
366     anInfo += TCollection_AsciiString ("==> ") + ref;
367   }
368   else if ( theAtt->IsKind(STANDARD_TYPE(TDF_TagSource)) ) {
369     Handle(TDF_TagSource) val = Handle(TDF_TagSource)::DownCast ( theAtt );
370     anInfo += TCollection_AsciiString ( val->Get() );
371   }
372   else if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_Integer)) ) {
373     Handle(TDataStd_Integer) val = Handle(TDataStd_Integer)::DownCast ( theAtt );
374     anInfo = TCollection_AsciiString ( val->Get() );
375   }
376   else if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_Real)) ) {
377     Handle(TDataStd_Real) val = Handle(TDataStd_Real)::DownCast ( theAtt );
378     anInfo = TCollection_AsciiString ( val->Get() );
379   }
380   else if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_Name)) ) {
381     Handle(TDataStd_Name) val = Handle(TDataStd_Name)::DownCast ( theAtt );
382     anInfo = TCollection_AsciiString ( val->Get(), '?' );
383   }
384   else if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_Comment)) ) {
385     Handle(TDataStd_Comment) val = Handle(TDataStd_Comment)::DownCast ( theAtt );
386     anInfo = TCollection_AsciiString ( val->Get(), '?' );
387   }
388   else if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_AsciiString)) ) {
389     Handle(TDataStd_AsciiString) val = Handle(TDataStd_AsciiString)::DownCast ( theAtt );
390     anInfo = TCollection_AsciiString ( val->Get(), '?' );
391   }
392   else if (theAtt->IsKind(STANDARD_TYPE(XCAFDoc_LengthUnit))) {
393     Handle(XCAFDoc_LengthUnit) aVal = Handle(XCAFDoc_LengthUnit)::DownCast(theAtt);
394     anInfo = TCollection_AsciiString(aVal->GetUnitValue());
395     anInfo += " ";  anInfo += aVal->GetUnitName();
396   }
397   else if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_IntegerArray)) ) {
398     Handle(TDataStd_IntegerArray) val = Handle(TDataStd_IntegerArray)::DownCast ( theAtt );
399     for ( Standard_Integer j=val->Lower(); j <= val->Upper(); j++ ) {
400       if ( j > val->Lower() ) anInfo += TCollection_AsciiString ( ", " );
401       anInfo += TCollection_AsciiString ( val->Value(j) );
402     }
403   }
404   else if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_RealArray)) ) {
405     Handle(TDataStd_RealArray) val = Handle(TDataStd_RealArray)::DownCast ( theAtt );
406     for ( Standard_Integer j=val->Lower(); j <= val->Upper(); j++ ) {
407       if ( j > val->Lower() ) anInfo += TCollection_AsciiString ( ", " );
408       anInfo += TCollection_AsciiString ( val->Value(j) );
409     }
410   }
411   else if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_ByteArray)) ) {
412     Handle(TDataStd_ByteArray) val = Handle(TDataStd_ByteArray)::DownCast ( theAtt );
413     for ( Standard_Integer j=val->Lower(); j <= val->Upper(); j++ ) {
414       if ( j > val->Lower() ) anInfo += TCollection_AsciiString ( ", " );
415       anInfo += TCollection_AsciiString ( val->Value(j) );
416     }
417   }
418   else if ( theAtt->IsKind(STANDARD_TYPE(TNaming_NamedShape)) ) {
419     Handle(TNaming_NamedShape) val = Handle(TNaming_NamedShape)::DownCast ( theAtt );
420     TopoDS_Shape S = val->Get();
421     if (!S.IsNull())
422       anInfo = S.TShape()->DynamicType()->Name();
423     else
424       anInfo = "Empty Shape";
425     if ( ! S.Location().IsIdentity() ) anInfo += TCollection_AsciiString ( "(located)" );
426   }
427   else if ( theAtt->IsKind(STANDARD_TYPE(XCAFDoc_ShapeMapTool)) ) {
428
429     Handle(XCAFDoc_ShapeMapTool) anAttr = Handle(XCAFDoc_ShapeMapTool)::DownCast ( theAtt );
430     anInfo += TCollection_AsciiString (anAttr->GetMap().Extent());
431   }
432   else if ( theAtt->IsKind(STANDARD_TYPE(XCAFDoc_Volume)) ) {
433     Handle(XCAFDoc_Volume) val = Handle(XCAFDoc_Volume)::DownCast ( theAtt );
434     anInfo += TCollection_AsciiString ( val->Get() );
435   }
436   else if ( theAtt->IsKind(STANDARD_TYPE(XCAFDoc_Area)) ) {
437     Handle(XCAFDoc_Area) val = Handle(XCAFDoc_Area)::DownCast ( theAtt );
438     anInfo = TCollection_AsciiString ( val->Get() );
439   }
440   else if ( theAtt->IsKind(STANDARD_TYPE(XCAFDoc_Centroid)) ) {
441     Handle(XCAFDoc_Centroid) val = Handle(XCAFDoc_Centroid)::DownCast ( theAtt );
442     gp_Pnt myCentroid = val->Get();
443     anInfo = "(" ;
444     anInfo += TCollection_AsciiString ( myCentroid.X() );
445     anInfo += TCollection_AsciiString ( " , " );
446     anInfo += TCollection_AsciiString ( TCollection_AsciiString ( myCentroid.Y() ) );
447     anInfo += TCollection_AsciiString ( " , " );
448     anInfo += TCollection_AsciiString ( myCentroid.Z() );
449     anInfo += TCollection_AsciiString ( ")" );
450   }
451   else if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_UAttribute)) ) {
452     if ( theAtt->ID() == XCAFDoc::AssemblyGUID() ) anInfo += TCollection_AsciiString ( "is assembly" );
453     if ( theAtt->ID() == XCAFDoc::InvisibleGUID() ) anInfo += TCollection_AsciiString ( "invisible" );
454   }
455   else if ( theAtt->IsKind(STANDARD_TYPE(XCAFDoc_Color)) ) {
456     Handle(XCAFDoc_Color) val = Handle(XCAFDoc_Color)::DownCast ( theAtt );
457     Quantity_ColorRGBA C = val->GetColorRGBA();
458     char string[260];
459     Sprintf ( string, "%s (%g, %g, %g, %g)", C.GetRGB().StringName ( C.GetRGB().Name() ),
460       C.GetRGB().Red(), C.GetRGB().Green(), C.GetRGB().Blue(), C.Alpha());
461     anInfo = string;
462   }
463   else if ( theAtt->IsKind(STANDARD_TYPE(XCAFDoc_DimTol)) ) {
464     Handle(XCAFDoc_DimTol) val = Handle(XCAFDoc_DimTol)::DownCast ( theAtt );
465     Standard_Integer kind = val->GetKind();
466     Handle(TColStd_HArray1OfReal) HAR = val->GetVal();
467     if(kind<20) { //dimension
468       anInfo = "Diameter (ValueRange[";
469       anInfo += TCollection_AsciiString ( HAR->Value(1) );
470       anInfo += TCollection_AsciiString ( "," );
471       anInfo += TCollection_AsciiString ( HAR->Value(2) );
472       anInfo += TCollection_AsciiString ( "])" );
473     }
474     else {
475       switch (kind) {
476       case 21: anInfo = "GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol_1"; break;
477       case 22: anInfo = "GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol_2"; break;
478       case 23: anInfo = "GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol_3"; break;
479       case 24: anInfo = "AngularityTolerance"; break;
480       case 25: anInfo = "CircularRunoutTolerance"; break;
481       case 26: anInfo = "CoaxialityTolerance"; break;
482       case 27: anInfo = "ConcentricityTolerance"; break;
483       case 28: anInfo = "ParallelismTolerance"; break;
484       case 29: anInfo = "PerpendicularityTolerance"; break;
485       case 30: anInfo = "SymmetryTolerance"; break;
486       case 31: anInfo = "TotalRunoutTolerance"; break;
487       case 35: anInfo = "ModifiedGeometricTolerance_1"; break;
488       case 36: anInfo = "ModifiedGeometricTolerance_2"; break;
489       case 37: anInfo = "ModifiedGeometricTolerance_3"; break;
490       case 38: anInfo = "CylindricityTolerance"; break;
491       case 39: anInfo = "FlatnessTolerance"; break;
492       case 40: anInfo = "LineProfileTolerance"; break;
493       case 41: anInfo = "PositionTolerance"; break;
494       case 42: anInfo = "RoundnessTolerance"; break;
495       case 43: anInfo = "StraightnessTolerance"; break;
496       case 44: anInfo = "SurfaceProfileTolerance"; break;
497       }
498       if (anInfo.Length() > 0) {
499         anInfo += " (Value=";
500         anInfo += TCollection_AsciiString (HAR->Value (1));
501         anInfo += ")";
502       }
503     }
504   }
505   else if ( theAtt->IsKind(STANDARD_TYPE(XCAFDoc_Material)) ) {
506     Handle(XCAFDoc_Material) val = Handle(XCAFDoc_Material)::DownCast ( theAtt );
507     Standard_Real dens = val->GetDensity();
508     Standard_CString dimdens = "g/cu sm";
509     if(dens==0) 
510       anInfo = val->GetName()->ToCString();
511     else {
512       anInfo = val->GetName()->ToCString();
513       anInfo += "(density=";
514       anInfo += TCollection_AsciiString ( dens );
515       anInfo += dimdens;
516       anInfo += ")";
517     }
518   }
519   else if ( theAtt->IsKind(STANDARD_TYPE(XCAFDoc_GraphNode)) ) {
520     Standard_CString type;
521     if ( theAtt->ID() == XCAFDoc::LayerRefGUID() ) {
522       type = "Layer Instance Link";
523     }
524     else if ( theAtt->ID() == XCAFDoc::SHUORefGUID() ) {
525       type = "SHUO Instance Link";
526     }
527     else if ( theAtt->ID() == XCAFDoc::DatumTolRefGUID() ) {
528       type = "DatumToler Link";
529     }
530     else if ( theAtt->ID() == XCAFDoc::DimensionRefFirstGUID() ) {
531       type = "Dimension Link First";
532     }
533     else if ( theAtt->ID() == XCAFDoc::DimensionRefSecondGUID() ) {
534       type = "Dimension Link Second";
535     }
536     else if ( theAtt->ID() == XCAFDoc::GeomToleranceRefGUID() ){
537       type = "GeomTolerance Link";
538     }
539     else if ( theAtt->ID() == XCAFDoc::DatumRefGUID() ){
540       type = "Datum Link";
541     }
542     else if (theAtt->ID() == XCAFDoc::ViewRefShapeGUID()){
543       type = "View Shape Link";
544     }
545     else if (theAtt->ID() == XCAFDoc::ViewRefGDTGUID()){
546       type = "View GD&T Link";
547     }
548     else if (theAtt->ID() == XCAFDoc::ViewRefPlaneGUID()) {
549       type = "View Clipping Plane Link";
550     }
551     else
552       return TCollection_AsciiString();
553
554     Handle(XCAFDoc_GraphNode) DETGN = Handle(XCAFDoc_GraphNode)::DownCast(theAtt);
555     TCollection_AsciiString ref;
556     Standard_Integer ii = 1;
557     if (DETGN->NbFathers()!=0) {
558
559       TDF_Tool::Entry ( DETGN->GetFather(ii)->Label(), ref );
560       anInfo = type;
561       anInfo += " ==> (";
562       anInfo += ref;
563       for (ii = 2; ii <= DETGN->NbFathers(); ii++) {
564         TDF_Tool::Entry ( DETGN->GetFather(ii)->Label(), ref );
565         anInfo += ", ";
566         anInfo += ref;
567       }
568       anInfo += ") ";
569     }
570     ii = 1;
571     if (DETGN->NbChildren()!=0) {
572       TDF_Tool::Entry ( DETGN->GetChild(ii)->Label(), ref );
573       anInfo += type;
574       anInfo += " <== (";
575       anInfo += ref;
576       for (ii = 2; ii <= DETGN->NbChildren (); ii++) {
577         TDF_Tool::Entry ( DETGN->GetChild(ii)->Label(), ref );
578         anInfo += ", ";
579         anInfo += ref;
580       }
581       anInfo += ") ";
582     }
583   }
584   return anInfo;
585 }