0031313: Foundation Classes - Dump improvement for classes
[occt.git] / src / Prs3d / Prs3d_Drawer.cxx
old mode 100755 (executable)
new mode 100644 (file)
index b20e7e6..eb20c50
 // Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
 //
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
+// This file is part of Open CASCADE Technology software library.
 //
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
 //
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
-
-#include <Prs3d_Drawer.ixx>
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#include <Prs3d_Drawer.hxx>
+
+#include <Graphic3d_AspectFillArea3d.hxx>
+#include <Graphic3d_AspectMarker3d.hxx>
+#include <Graphic3d_AspectText3d.hxx>
+#include <Prs3d_ArrowAspect.hxx>
+#include <Prs3d_DatumAspect.hxx>
+#include <Prs3d_DimensionAspect.hxx>
+#include <Prs3d_IsoAspect.hxx>
+#include <Prs3d_LineAspect.hxx>
+#include <Prs3d_PlaneAspect.hxx>
+#include <Prs3d_PointAspect.hxx>
+#include <Prs3d_ShadingAspect.hxx>
+#include <Prs3d_TextAspect.hxx>
+#include <Standard_Dump.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(Prs3d_Drawer, Graphic3d_PresentationAttributes)
+
+namespace
+{
+  static const Quantity_NameOfColor THE_DEF_COLOR_FreeBoundary   = Quantity_NOC_GREEN;
+  static const Quantity_NameOfColor THE_DEF_COLOR_UnFreeBoundary = Quantity_NOC_YELLOW;
+  static const Quantity_NameOfColor THE_DEF_COLOR_FaceBoundary   = Quantity_NOC_BLACK;
+  static const Quantity_NameOfColor THE_DEF_COLOR_Wire           = Quantity_NOC_RED;
+  static const Quantity_NameOfColor THE_DEF_COLOR_Line           = Quantity_NOC_YELLOW;
+  static const Quantity_NameOfColor THE_DEF_COLOR_SeenLine       = Quantity_NOC_YELLOW;
+  static const Quantity_NameOfColor THE_DEF_COLOR_HiddenLine     = Quantity_NOC_YELLOW;
+  static const Quantity_NameOfColor THE_DEF_COLOR_Vector         = Quantity_NOC_SKYBLUE;
+  static const Quantity_NameOfColor THE_DEF_COLOR_Section        = Quantity_NOC_ORANGE;
+}
 
 // =======================================================================
 // function : Prs3d_Drawer
 // purpose  :
 // =======================================================================
 Prs3d_Drawer::Prs3d_Drawer()
-: myNbPoints (30),
-  myIsoOnPlane (Standard_False),
-  myFreeBoundaryDraw (Standard_True),
-  myUnFreeBoundaryDraw (Standard_True),
-  myWireDraw (Standard_True),
-  myShadingAspect (new Prs3d_ShadingAspect()),
-  myShadingAspectGlobal (Standard_True),
-  myChordialDeviation (0.0001),
-  myTypeOfDeflection (Aspect_TOD_RELATIVE),
-  myMaximalParameterValue (500000.),
-  myDeviationCoefficient (0.001),
-  myHLRDeviationCoefficient (0.02),
-  myDeviationAngle (12.0 * M_PI / 180.0),
-  myHLRAngle (20.0 * M_PI / 180.0),
-  myLineDrawArrow (Standard_False),
-  myDrawHiddenLine (Standard_False),
-  myFaceBoundaryDraw (Standard_False),
-  myTypeOfHLR (Prs3d_TOH_PolyAlgo)
+: myNbPoints                      (30),
+  myHasOwnNbPoints                (Standard_False),
+  myMaximalParameterValue         (500000.),
+  myHasOwnMaximalParameterValue   (Standard_False),
+  myChordialDeviation             (0.0001),
+  myHasOwnChordialDeviation       (Standard_False),
+  myTypeOfDeflection              (Aspect_TOD_RELATIVE),
+  myHasOwnTypeOfDeflection        (Standard_False),
+  myTypeOfHLR                     (Prs3d_TOH_NotSet),
+  myDeviationCoefficient          (0.001),
+  myHasOwnDeviationCoefficient    (Standard_False),
+  myHLRDeviationCoefficient       (0.02),
+  myHasOwnHLRDeviationCoefficient (Standard_False),
+  myDeviationAngle                (12.0 * M_PI / 180.0),
+  myHasOwnDeviationAngle          (Standard_False),
+  myHLRAngle                      (20.0 * M_PI / 180.0),
+  myHasOwnHLRDeviationAngle       (Standard_False),
+  myIsoOnPlane                    (Standard_False),
+  myHasOwnIsoOnPlane              (Standard_False),
+  myIsoOnTriangulation            (Standard_False),
+  myHasOwnIsoOnTriangulation      (Standard_False),
+  myIsAutoTriangulated            (Standard_True),
+  myHasOwnIsAutoTriangulated      (Standard_False),
+
+  myHasOwnUIsoAspect          (Standard_False),
+  myHasOwnVIsoAspect          (Standard_False),
+  myHasOwnWireAspect          (Standard_False),
+  myWireDraw                  (Standard_True),
+  myHasOwnWireDraw            (Standard_False),
+  myHasOwnPointAspect         (Standard_False),
+  myHasOwnLineAspect          (Standard_False),
+  myHasOwnTextAspect          (Standard_False),
+  myHasOwnShadingAspect       (Standard_False),
+  myHasOwnPlaneAspect         (Standard_False),
+  myHasOwnSeenLineAspect      (Standard_False),
+  myHasOwnArrowAspect         (Standard_False),
+  myLineArrowDraw             (Standard_False),
+  myHasOwnLineArrowDraw       (Standard_False),
+  myHasOwnHiddenLineAspect    (Standard_False),
+  myDrawHiddenLine            (Standard_False),
+  myHasOwnDrawHiddenLine      (Standard_False),
+  myHasOwnVectorAspect        (Standard_False),
+  myVertexDrawMode            (Prs3d_VDM_Inherited),
+  myHasOwnDatumAspect         (Standard_False),
+  myHasOwnSectionAspect       (Standard_False),
+
+  myHasOwnFreeBoundaryAspect   (Standard_False),
+  myFreeBoundaryDraw           (Standard_True),
+  myHasOwnFreeBoundaryDraw     (Standard_False),
+  myHasOwnUnFreeBoundaryAspect (Standard_False),
+  myUnFreeBoundaryDraw         (Standard_True),
+  myHasOwnUnFreeBoundaryDraw   (Standard_False),
+  myFaceBoundaryUpperContinuity(-1),
+  myHasOwnFaceBoundaryAspect   (Standard_False),
+  myFaceBoundaryDraw           (Standard_False),
+  myHasOwnFaceBoundaryDraw     (Standard_False),
+
+  myHasOwnDimensionAspect       (Standard_False),
+  myHasOwnDimLengthModelUnits   (Standard_False),
+  myHasOwnDimAngleModelUnits    (Standard_False),
+  myHasOwnDimLengthDisplayUnits (Standard_False),
+  myHasOwnDimAngleDisplayUnits  (Standard_False)
 {
   myDimensionModelUnits.SetLengthUnits ("m");
   myDimensionModelUnits.SetAngleUnits ("rad");
@@ -48,69 +117,110 @@ Prs3d_Drawer::Prs3d_Drawer()
   myDimensionDisplayUnits.SetAngleUnits ("deg");
 }
 
-void Prs3d_Drawer::SetTypeOfDeflection(const Aspect_TypeOfDeflection aTypeOfDeflection){
-
-  myTypeOfDeflection = aTypeOfDeflection;}
-
-Aspect_TypeOfDeflection Prs3d_Drawer::TypeOfDeflection() const {
-
-  return myTypeOfDeflection;
+// =======================================================================
+// function : SetTypeOfDeflection
+// purpose  :
+// =======================================================================
 
+void Prs3d_Drawer::SetTypeOfDeflection (const Aspect_TypeOfDeflection theTypeOfDeflection)
+{
+  myHasOwnTypeOfDeflection = Standard_True;
+  myTypeOfDeflection       = theTypeOfDeflection;
 }
 
-void Prs3d_Drawer::SetIsoOnPlane(const Standard_Boolean OnOff)
+// =======================================================================
+// function : SetMaximalChordialDeviation
+// purpose  :
+// =======================================================================
+
+void Prs3d_Drawer::SetMaximalChordialDeviation (const Standard_Real theChordialDeviation)
 {
-  myIsoOnPlane = OnOff;
+  myHasOwnChordialDeviation = Standard_True;
+  myChordialDeviation       = theChordialDeviation;
 }
 
-Standard_Boolean Prs3d_Drawer::IsoOnPlane()const
+// =======================================================================
+// function : SetTypeOfHLR
+// purpose  : set type of HLR algorithm
+// =======================================================================
+
+void Prs3d_Drawer::SetTypeOfHLR (const Prs3d_TypeOfHLR theTypeOfHLR)
 {
-  return myIsoOnPlane;
+  myTypeOfHLR = theTypeOfHLR;
 }
 
+// =======================================================================
+// function : TypeOfHLR
+// purpose  : gets type of HLR algorithm
+// =======================================================================
 
-Standard_Integer Prs3d_Drawer::Discretisation() const
+Prs3d_TypeOfHLR Prs3d_Drawer::TypeOfHLR()
 {
-  return myNbPoints;
+  if (!HasOwnTypeOfHLR())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->TypeOfHLR();
+    }
+    // Prs3d_TOH_PolyAlgo is default value for this setting.
+    myTypeOfHLR = Prs3d_TOH_PolyAlgo;
+  }
+  return myTypeOfHLR;
 }
 
-
-void Prs3d_Drawer::SetDiscretisation(const Standard_Integer d) 
+// =======================================================================
+// function : SetIsoOnTriangulation
+// purpose  :
+// =======================================================================
+void Prs3d_Drawer::SetIsoOnTriangulation (const Standard_Boolean theToEnable)
 {
-  myNbPoints = d;
+  myHasOwnIsoOnTriangulation = Standard_True;
+  myIsoOnTriangulation = theToEnable;
 }
 
+// =======================================================================
+// function : SetMaximalParameterValue
+// purpose  :
+// =======================================================================
 
-void Prs3d_Drawer::SetMaximalChordialDeviation(
-                               const Quantity_Length aChordialDeviation) {
-  myChordialDeviation = aChordialDeviation;
+void Prs3d_Drawer::SetMaximalParameterValue (const Standard_Real theValue)
+{
+  myHasOwnMaximalParameterValue = Standard_True;
+  myMaximalParameterValue       = theValue;
 }
 
-Quantity_Length Prs3d_Drawer::MaximalChordialDeviation() const {
-  return myChordialDeviation;
-}
+// =======================================================================
+// function : SetIsoOnPlane
+// purpose  :
+// =======================================================================
 
-//
-//=======================================================================
-//function : SetDeviationCoefficient
-//purpose  : 
-//=======================================================================
+void Prs3d_Drawer::SetIsoOnPlane (const Standard_Boolean theIsEnabled)
+{
+  myHasOwnIsoOnPlane = Standard_True;
+  myIsoOnPlane       = theIsEnabled;
+}
 
-void Prs3d_Drawer::SetDeviationCoefficient (const Standard_Real aCoefficient) {
+// =======================================================================
+// function : SetDiscretisation
+// purpose  :
+// =======================================================================
 
-  myDeviationCoefficient = aCoefficient;
+void Prs3d_Drawer::SetDiscretisation (const Standard_Integer theValue) 
+{
+  myHasOwnNbPoints = Standard_True;
+  myNbPoints       = theValue;
 }
 
 //=======================================================================
-//function : DeviationCoefficient
+//function : SetDeviationCoefficient
 //purpose  : 
 //=======================================================================
 
-Standard_Real Prs3d_Drawer::DeviationCoefficient () const {
-
-  return myDeviationCoefficient;
+void Prs3d_Drawer::SetDeviationCoefficient (const Standard_Real theCoefficient)
+{
+  myPreviousDeviationCoefficient = DeviationCoefficient();
+  myDeviationCoefficient         = theCoefficient;
+  myHasOwnDeviationCoefficient   = Standard_True;
 }
 
 //=======================================================================
@@ -118,19 +228,23 @@ Standard_Real Prs3d_Drawer::DeviationCoefficient () const {
 //purpose  : 
 //=======================================================================
 
-void Prs3d_Drawer::SetHLRDeviationCoefficient (const Standard_Real aCoefficient) {
-
-  myHLRDeviationCoefficient = aCoefficient;
+void Prs3d_Drawer::SetHLRDeviationCoefficient (const Standard_Real theCoefficient)
+{
+  myPreviousHLRDeviationCoefficient = HLRDeviationCoefficient();
+  myHLRDeviationCoefficient         = theCoefficient;
+  myHasOwnHLRDeviationCoefficient   = Standard_True;
 }
 
 //=======================================================================
-//function : HLRDeviationCoefficient
+//function : SetDeviationAngle
 //purpose  : 
 //=======================================================================
 
-Standard_Real Prs3d_Drawer::HLRDeviationCoefficient () const {
-
-  return myHLRDeviationCoefficient;
+void Prs3d_Drawer::SetDeviationAngle (const Standard_Real theAngle)
+{
+  myPreviousDeviationAngle = DeviationAngle();
+  myDeviationAngle         = theAngle;
+  myHasOwnDeviationAngle   = Standard_True;
 }
 
 //=======================================================================
@@ -138,377 +252,786 @@ Standard_Real Prs3d_Drawer::HLRDeviationCoefficient () const {
 //purpose  : 
 //=======================================================================
 
-void Prs3d_Drawer::SetHLRAngle (const Standard_Real anAngle) {
-
-  myHLRAngle = anAngle;
+void Prs3d_Drawer::SetHLRAngle (const Standard_Real theAngle)
+{
+  myPreviousHLRDeviationAngle = HLRAngle();
+  myHLRAngle                  = theAngle;
+  myHasOwnHLRDeviationAngle   = Standard_True;
 }
 
-//=======================================================================
-//function : HLRAngle
-//purpose  : 
-//=======================================================================
-
-Standard_Real Prs3d_Drawer::HLRAngle () const {
+// =======================================================================
+// function : SetAutoTriangulation
+// purpose  :
+// =======================================================================
 
-  return myHLRAngle;
+void Prs3d_Drawer::SetAutoTriangulation (const Standard_Boolean theIsEnabled)
+{
+  myHasOwnIsAutoTriangulated = Standard_True;
+  myIsAutoTriangulated       = theIsEnabled;
 }
 
-//=======================================================================
-//function : SetDeviationAngle
-//purpose  : 
-//=======================================================================
+// =======================================================================
+// function : FreeBoundaryAspect
+// purpose  :
+// =======================================================================
 
-void Prs3d_Drawer::SetDeviationAngle (const Standard_Real anAngle)
+const Handle(Prs3d_LineAspect)& Prs3d_Drawer::FreeBoundaryAspect()
 {
-  myDeviationAngle = anAngle;
+  if (!HasOwnFreeBoundaryAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->FreeBoundaryAspect();
+    }
+    if (myFreeBoundaryAspect.IsNull())
+    {
+      myFreeBoundaryAspect = new Prs3d_LineAspect (THE_DEF_COLOR_FreeBoundary, Aspect_TOL_SOLID, 1.0);
+    }
+  }
+  return myFreeBoundaryAspect;
 }
 
-//=======================================================================
-//function : DeviationAngle
-//purpose  : 
-//=======================================================================
+// =======================================================================
+// function : FreeBoundaryAspect
+// purpose  :
+// =======================================================================
 
-Standard_Real Prs3d_Drawer::DeviationAngle () const 
+void Prs3d_Drawer::SetFreeBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect)
 {
-  return myDeviationAngle;
+  myFreeBoundaryAspect = theAspect;
+  myHasOwnFreeBoundaryAspect = !myFreeBoundaryAspect.IsNull();
 }
 
+// =======================================================================
+// function : SetFreeBoundaryDraw
+// purpose  :
+// =======================================================================
 
-void Prs3d_Drawer::SetMaximalParameterValue (const Standard_Real Value) {
-  myMaximalParameterValue = Value;
+void Prs3d_Drawer::SetFreeBoundaryDraw (const Standard_Boolean theIsEnabled)
+{
+  myHasOwnFreeBoundaryDraw = Standard_True;
+  myFreeBoundaryDraw       = theIsEnabled;
 }
 
-Standard_Real Prs3d_Drawer::MaximalParameterValue () const {
-  return myMaximalParameterValue;
-}
+// =======================================================================
+// function : UnFreeBoundaryAspect
+// purpose  :
+// =======================================================================
 
-Handle (Prs3d_IsoAspect) Prs3d_Drawer::UIsoAspect (){
+const Handle(Prs3d_LineAspect)& Prs3d_Drawer::UnFreeBoundaryAspect()
+{
+  if (!HasOwnUnFreeBoundaryAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->UnFreeBoundaryAspect();
+    }
+    if (myUnFreeBoundaryAspect.IsNull())
+    {
+      myUnFreeBoundaryAspect = new Prs3d_LineAspect (THE_DEF_COLOR_UnFreeBoundary, Aspect_TOL_SOLID, 1.0);
+    }
+  }
+  return myUnFreeBoundaryAspect;
+}
 
-  if (myUIsoAspect.IsNull()) 
-    myUIsoAspect = new Prs3d_IsoAspect
-                   (Quantity_NOC_GRAY75,Aspect_TOL_SOLID,0.5,1);
+// =======================================================================
+// function : SetUnFreeBoundaryAspect
+// purpose  :
+// =======================================================================
 
-  return myUIsoAspect;
+void Prs3d_Drawer::SetUnFreeBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect)
+{
+  myUnFreeBoundaryAspect = theAspect;
+  myHasOwnUnFreeBoundaryAspect = !myUnFreeBoundaryAspect.IsNull();
 }
 
-void Prs3d_Drawer::SetUIsoAspect ( const Handle(Prs3d_IsoAspect)& anAspect) {
- myUIsoAspect = anAspect;
-}
+// =======================================================================
+// function : SetUnFreeBoundaryDraw
+// purpose  :
+// =======================================================================
 
-Handle (Prs3d_IsoAspect) Prs3d_Drawer::VIsoAspect () {
-  if (myVIsoAspect.IsNull()) 
-    myVIsoAspect = new Prs3d_IsoAspect
-      (Quantity_NOC_GRAY75,Aspect_TOL_SOLID,0.5,1);
-      
-  return myVIsoAspect;
+void Prs3d_Drawer::SetUnFreeBoundaryDraw (const Standard_Boolean theIsEnabled)
+{
+  myHasOwnUnFreeBoundaryDraw = Standard_True;
+  myUnFreeBoundaryDraw       = theIsEnabled;
 }
 
-void Prs3d_Drawer::SetVIsoAspect ( const Handle(Prs3d_IsoAspect)& anAspect) {
- myVIsoAspect = anAspect;
+// =======================================================================
+// function : FaceBoundaryAspect
+// purpose  :
+// =======================================================================
+
+const Handle(Prs3d_LineAspect)& Prs3d_Drawer::FaceBoundaryAspect()
+{
+  if (!HasOwnFaceBoundaryAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->FaceBoundaryAspect();
+    }
+    if (myFaceBoundaryAspect.IsNull())
+    {
+      myFaceBoundaryAspect = new Prs3d_LineAspect (THE_DEF_COLOR_FaceBoundary, Aspect_TOL_SOLID, 1.0);
+    }
+  }
+  return myFaceBoundaryAspect;
 }
 
-Handle (Prs3d_LineAspect) Prs3d_Drawer::FreeBoundaryAspect () {
-  if (myFreeBoundaryAspect.IsNull())
-    myFreeBoundaryAspect = new Prs3d_LineAspect
-      (Quantity_NOC_GREEN,Aspect_TOL_SOLID,1.);
+// =======================================================================
+// function : SetFaceBoundaryAspect
+// purpose  :
+// =======================================================================
 
-  return myFreeBoundaryAspect;
+void Prs3d_Drawer::SetFaceBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect)
+{
+  myFaceBoundaryAspect = theAspect;
+  myHasOwnFaceBoundaryAspect = !myFaceBoundaryAspect.IsNull();
 }
 
-void Prs3d_Drawer::SetFreeBoundaryAspect (const Handle(Prs3d_LineAspect)& anAspect) {
- myFreeBoundaryAspect = anAspect;
-}
+// =======================================================================
+// function : SetFaceBoundaryDraw
+// purpose  :
+// =======================================================================
 
-void Prs3d_Drawer::SetFreeBoundaryDraw ( const Standard_Boolean OnOff ) {
-  myFreeBoundaryDraw = OnOff;
+void Prs3d_Drawer::SetFaceBoundaryDraw (const Standard_Boolean theIsEnabled)
+{
+  myHasOwnFaceBoundaryDraw = Standard_True;
+  myFaceBoundaryDraw       = theIsEnabled;
 }
 
-Standard_Boolean Prs3d_Drawer::FreeBoundaryDraw () const {
-return myFreeBoundaryDraw;
-}
+// =======================================================================
+// function : DimensionAspect
+// purpose  :
+// =======================================================================
 
-Handle (Prs3d_LineAspect) Prs3d_Drawer::UnFreeBoundaryAspect (){
-  if  (myUnFreeBoundaryAspect.IsNull())
-    myUnFreeBoundaryAspect = new Prs3d_LineAspect
-      (Quantity_NOC_YELLOW,Aspect_TOL_SOLID,1.);
-  return myUnFreeBoundaryAspect;
+const Handle(Prs3d_DimensionAspect)& Prs3d_Drawer::DimensionAspect()
+{
+  if (!HasOwnDimensionAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->DimensionAspect();
+    }
+    if (myDimensionAspect.IsNull())
+    {
+      myDimensionAspect = new Prs3d_DimensionAspect;
+    }
+  }
+  return myDimensionAspect;
 }
 
-void Prs3d_Drawer::SetUnFreeBoundaryAspect ( const Handle(Prs3d_LineAspect)& anAspect) {
- myUnFreeBoundaryAspect = anAspect;
-}
+// =======================================================================
+// function : SetDimensionAspect
+// purpose  :
+// =======================================================================
 
-void Prs3d_Drawer::SetUnFreeBoundaryDraw ( const Standard_Boolean OnOff ) {
-  myUnFreeBoundaryDraw = OnOff;
+void Prs3d_Drawer::SetDimensionAspect (const Handle(Prs3d_DimensionAspect)& theAspect)
+{
+  myDimensionAspect = theAspect;
+  myHasOwnDimensionAspect = !myDimensionAspect.IsNull();
 }
 
-Standard_Boolean Prs3d_Drawer::UnFreeBoundaryDraw () const {
-  return myUnFreeBoundaryDraw;
+// =======================================================================
+// function : SetDimLengthModelUnits
+// purpose  :
+// =======================================================================
+
+void Prs3d_Drawer::SetDimLengthModelUnits (const TCollection_AsciiString& theUnits)
+{
+  myHasOwnDimLengthModelUnits = Standard_True;
+  myDimensionModelUnits.SetLengthUnits (theUnits);
 }
 
-Handle (Prs3d_LineAspect) Prs3d_Drawer::WireAspect ()  {
-  if (myWireAspect.IsNull())
-   myWireAspect = new Prs3d_LineAspect(Quantity_NOC_RED,Aspect_TOL_SOLID,1.);
+// =======================================================================
+// function : SetDimAngleModelUnits
+// purpose  :
+// =======================================================================
 
-  return myWireAspect;
+void Prs3d_Drawer::SetDimAngleModelUnits (const TCollection_AsciiString& theUnits)
+{
+  myHasOwnDimAngleModelUnits = Standard_True;
+  myDimensionModelUnits.SetAngleUnits (theUnits);
 }
 
-void Prs3d_Drawer::SetWireAspect ( const Handle(Prs3d_LineAspect)& anAspect) {
- myWireAspect = anAspect;
-}
-void Prs3d_Drawer::SetWireDraw ( const Standard_Boolean OnOff ) {
-  myWireDraw = OnOff;
-}
+// =======================================================================
+// function : SetDimLengthDisplayUnits
+// purpose  :
+// =======================================================================
 
-Standard_Boolean Prs3d_Drawer::WireDraw () const {
-return myWireDraw;
+void Prs3d_Drawer::SetDimLengthDisplayUnits (const TCollection_AsciiString& theUnits)
+{
+  myHasOwnDimLengthDisplayUnits = Standard_True;
+  myDimensionDisplayUnits.SetLengthUnits (theUnits);
 }
 
+// =======================================================================
+// function : SetDimAngleDisplayUnits
+// purpose  :
+// =======================================================================
 
-Handle (Prs3d_LineAspect) Prs3d_Drawer::LineAspect ()  {
-  if (myLineAspect.IsNull())
-    myLineAspect = new Prs3d_LineAspect
-      (Quantity_NOC_YELLOW,Aspect_TOL_SOLID,1.);
-  return myLineAspect;
+void Prs3d_Drawer::SetDimAngleDisplayUnits (const TCollection_AsciiString& theUnits)
+{
+  myHasOwnDimAngleDisplayUnits = Standard_True;
+  myDimensionDisplayUnits.SetAngleUnits (theUnits);
 }
 
-void Prs3d_Drawer::SetLineAspect ( const Handle(Prs3d_LineAspect)& anAspect) {
- myLineAspect = anAspect;
+// =======================================================================
+// function : UIsoAspect
+// purpose  :
+// =======================================================================
+
+const Handle(Prs3d_IsoAspect)& Prs3d_Drawer::UIsoAspect()
+{
+  if (!HasOwnUIsoAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->UIsoAspect();
+    }
+    if (myUIsoAspect.IsNull())
+    {
+      myUIsoAspect = new Prs3d_IsoAspect (Quantity_NOC_GRAY75, Aspect_TOL_SOLID, 1.0, 1);
+    }
+  }
+  return myUIsoAspect;
 }
 
-Handle (Prs3d_TextAspect) Prs3d_Drawer::TextAspect ()  {
-  if (myTextAspect.IsNull())
-    myTextAspect = new Prs3d_TextAspect();
+// =======================================================================
+// function : SetUIsoAspect
+// purpose  :
+// =======================================================================
 
-  return myTextAspect;
+void Prs3d_Drawer::SetUIsoAspect (const Handle(Prs3d_IsoAspect)& theAspect)
+{
+  myUIsoAspect = theAspect;
+  myHasOwnUIsoAspect = !myUIsoAspect.IsNull();
 }
 
-void Prs3d_Drawer::SetTextAspect ( const Handle(Prs3d_TextAspect)& anAspect) {
- myTextAspect = anAspect;
+// =======================================================================
+// function : VIsoAspect
+// purpose  :
+// =======================================================================
+
+const Handle(Prs3d_IsoAspect)& Prs3d_Drawer::VIsoAspect()
+{
+  if (!HasOwnVIsoAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->VIsoAspect();
+    }
+    if (myVIsoAspect.IsNull())
+    {
+      myVIsoAspect = new Prs3d_IsoAspect (Quantity_NOC_GRAY75, Aspect_TOL_SOLID, 1.0, 1);
+    }
+  }
+  return myVIsoAspect;
 }
 
-Handle (Prs3d_ShadingAspect) Prs3d_Drawer::ShadingAspect ()  {
-  if (myShadingAspect.IsNull())
-  myShadingAspect = new Prs3d_ShadingAspect();
+// =======================================================================
+// function : SetVIsoAspect
+// purpose  :
+// =======================================================================
 
-  return myShadingAspect;
+void Prs3d_Drawer::SetVIsoAspect (const Handle(Prs3d_IsoAspect)& theAspect)
+{
+  myVIsoAspect = theAspect;
+  myHasOwnVIsoAspect= !myVIsoAspect.IsNull();
 }
 
-void Prs3d_Drawer::SetShadingAspect ( const Handle(Prs3d_ShadingAspect)& anAspect) {
- myShadingAspect = anAspect;
-}
+// =======================================================================
+// function : WireAspect
+// purpose  :
+// =======================================================================
 
-void Prs3d_Drawer::SetShadingAspectGlobal(const Standard_Boolean aValue) {
- myShadingAspectGlobal = aValue;
+const Handle(Prs3d_LineAspect)& Prs3d_Drawer::WireAspect()
+{
+  if (!HasOwnWireAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->WireAspect();
+    }
+    if (myWireAspect.IsNull())
+    {
+      myWireAspect = new Prs3d_LineAspect (THE_DEF_COLOR_Wire, Aspect_TOL_SOLID, 1.0);
+    }
+  }
+  return myWireAspect;
 }
 
-Standard_Boolean Prs3d_Drawer::ShadingAspectGlobal() const { 
- return myShadingAspectGlobal;
+// =======================================================================
+// function : SetWireAspect
+// purpose  :
+// =======================================================================
 
+void Prs3d_Drawer::SetWireAspect (const Handle(Prs3d_LineAspect)& theAspect)
+{
+  myWireAspect = theAspect;
+  myHasOwnWireAspect = !myWireAspect.IsNull();
 }
-void Prs3d_Drawer::SetLineArrowDraw ( const Standard_Boolean OnOff ) {
-  myLineDrawArrow = OnOff;
+
+// =======================================================================
+// function : SetWireDraw
+// purpose  :
+// =======================================================================
+
+void Prs3d_Drawer::SetWireDraw (const Standard_Boolean theIsEnabled)
+{
+  myHasOwnWireDraw = Standard_True;
+  myWireDraw       = theIsEnabled;
 }
 
-Standard_Boolean Prs3d_Drawer::LineArrowDraw () const {
-return myLineDrawArrow;
+// =======================================================================
+// function : PointAspect
+// purpose  :
+// =======================================================================
+
+const Handle(Prs3d_PointAspect)& Prs3d_Drawer::PointAspect()
+{
+  if (!HasOwnPointAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->PointAspect();
+    }
+    if (myPointAspect.IsNull())
+    {
+      myPointAspect = new Prs3d_PointAspect (Aspect_TOM_PLUS, Quantity_NOC_YELLOW, 1.0);
+    }
+  }
+  return myPointAspect;
 }
 
-Handle (Prs3d_ArrowAspect) Prs3d_Drawer::ArrowAspect() {
-  if (myArrowAspect.IsNull())
-    myArrowAspect = new Prs3d_ArrowAspect;
+// =======================================================================
+// function : SetupOwnPointAspect
+// purpose  :
+// =======================================================================
+Standard_Boolean Prs3d_Drawer::SetupOwnPointAspect (const Handle(Prs3d_Drawer)& theDefaults)
+{
+  if (myHasOwnPointAspect)
+  {
+    return Standard_False;
+  }
 
-  return myArrowAspect;
+  myPointAspect = new Prs3d_PointAspect (Aspect_TOM_PLUS, Quantity_NOC_YELLOW, 1.0);
+  if (!theDefaults.IsNull() && theDefaults != this)
+  {
+    *myPointAspect->Aspect() = *theDefaults->PointAspect()->Aspect();
+  }
+  else if (!myLink.IsNull())
+  {
+    *myPointAspect->Aspect() = *myLink->PointAspect()->Aspect();
+  }
+  myHasOwnPointAspect = Standard_True;
+  return Standard_True;
 }
 
-void Prs3d_Drawer::SetArrowAspect ( const Handle(Prs3d_ArrowAspect)& anAspect) {
- myArrowAspect = anAspect;
+// =======================================================================
+// function : SetPointAspect
+// purpose  :
+// =======================================================================
+
+void Prs3d_Drawer::SetPointAspect (const Handle(Prs3d_PointAspect)& theAspect)
+{
+  myPointAspect = theAspect;
+  myHasOwnPointAspect = !myPointAspect.IsNull();
 }
 
-Handle (Prs3d_PointAspect) Prs3d_Drawer::PointAspect() {
-  if (myPointAspect.IsNull())
-    myPointAspect = new Prs3d_PointAspect 
-      (Aspect_TOM_PLUS,Quantity_NOC_YELLOW,1.);
+// =======================================================================
+// function : LineAspect
+// purpose  :
+// =======================================================================
 
-  return myPointAspect;
+const Handle(Prs3d_LineAspect)& Prs3d_Drawer::LineAspect()
+{
+  if (!HasOwnLineAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->LineAspect();
+    }
+    if (myLineAspect.IsNull())
+    {
+      myLineAspect = new Prs3d_LineAspect (THE_DEF_COLOR_Line, Aspect_TOL_SOLID, 1.0);
+    }
+  }
+  return myLineAspect;
 }
 
-void Prs3d_Drawer::SetPointAspect ( const Handle(Prs3d_PointAspect)& anAspect) {
- myPointAspect = anAspect;
+// =======================================================================
+// function : SetLineAspect
+// purpose  :
+// =======================================================================
+
+void Prs3d_Drawer::SetLineAspect (const Handle(Prs3d_LineAspect)& theAspect)
+{
+  myLineAspect = theAspect;
+  myHasOwnLineAspect = !myLineAspect.IsNull();
 }
 
-Standard_Boolean Prs3d_Drawer::DrawHiddenLine () const {return myDrawHiddenLine;}
+// =======================================================================
+// function : TextAspect
+// purpose  :
+// =======================================================================
+
+const Handle(Prs3d_TextAspect)& Prs3d_Drawer::TextAspect()
+{
+  if (!HasOwnTextAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->TextAspect();
+    }
+    if (myTextAspect.IsNull())
+    {
+      myTextAspect = new Prs3d_TextAspect();
+    }
+  }
+  return myTextAspect;
+}
 
-void Prs3d_Drawer::EnableDrawHiddenLine () {myDrawHiddenLine=Standard_True;}
+// =======================================================================
+// function : SetTextAspect
+// purpose  :
+// =======================================================================
 
-void Prs3d_Drawer::DisableDrawHiddenLine () {myDrawHiddenLine=Standard_False;}
+void Prs3d_Drawer::SetTextAspect (const Handle(Prs3d_TextAspect)& theAspect)
+{
+  myTextAspect = theAspect;
+  myHasOwnTextAspect = !myTextAspect.IsNull();
+}
 
-Handle (Prs3d_LineAspect) Prs3d_Drawer::HiddenLineAspect ()  {
- if (myHiddenLineAspect.IsNull())
-   myHiddenLineAspect = new Prs3d_LineAspect
-     (Quantity_NOC_YELLOW,Aspect_TOL_DASH,0.5);
+// =======================================================================
+// function : ShadingAspect
+// purpose  :
+// =======================================================================
 
-  return myHiddenLineAspect;
+const Handle(Prs3d_ShadingAspect)& Prs3d_Drawer::ShadingAspect()
+{
+  if (!HasOwnShadingAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->ShadingAspect();
+    }
+    if (myShadingAspect.IsNull())
+    {
+      myShadingAspect = new Prs3d_ShadingAspect();
+    }
+  }
+  return myShadingAspect;
 }
 
-void Prs3d_Drawer::SetHiddenLineAspect ( const Handle(Prs3d_LineAspect)& anAspect) {
- myHiddenLineAspect = anAspect;
+// =======================================================================
+// function : SetupOwnShadingAspect
+// purpose  :
+// =======================================================================
+Standard_Boolean Prs3d_Drawer::SetupOwnShadingAspect (const Handle(Prs3d_Drawer)& theDefaults)
+{
+  if (myHasOwnShadingAspect)
+  {
+    return Standard_False;
+  }
+
+  myShadingAspect = new Prs3d_ShadingAspect();
+  if (!theDefaults.IsNull() && theDefaults != this)
+  {
+    *myShadingAspect->Aspect() = *theDefaults->ShadingAspect()->Aspect();
+  }
+  else if (!myLink.IsNull())
+  {
+    *myShadingAspect->Aspect() = *myLink->ShadingAspect()->Aspect();
+  }
+  myHasOwnShadingAspect = Standard_True;
+  return Standard_True;
 }
 
-Handle (Prs3d_LineAspect) Prs3d_Drawer::SeenLineAspect ()  {
-  if (mySeenLineAspect.IsNull())
-    mySeenLineAspect = new Prs3d_LineAspect
-      (Quantity_NOC_YELLOW,Aspect_TOL_SOLID,1.);
+// =======================================================================
+// function : SetShadingAspect
+// purpose  :
+// =======================================================================
 
-  return mySeenLineAspect;
+void Prs3d_Drawer::SetShadingAspect (const Handle(Prs3d_ShadingAspect)& theAspect)
+{
+  myShadingAspect = theAspect;
+  myHasOwnShadingAspect = !myShadingAspect.IsNull();
 }
 
-void Prs3d_Drawer::SetSeenLineAspect ( const Handle(Prs3d_LineAspect)& anAspect) {
- mySeenLineAspect = anAspect;
+// =======================================================================
+// function : PlaneAspect
+// purpose  :
+// =======================================================================
+
+const Handle(Prs3d_PlaneAspect)& Prs3d_Drawer::PlaneAspect()
+{
+  if (!HasOwnPlaneAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->PlaneAspect();
+    }
+    if (myPlaneAspect.IsNull())
+    {
+      myPlaneAspect = new Prs3d_PlaneAspect();
+    }
+  }
+  return myPlaneAspect;
 }
 
-Handle (Prs3d_LineAspect) Prs3d_Drawer::VectorAspect ()  {
-  if (myVectorAspect.IsNull())
-    myVectorAspect = new Prs3d_LineAspect
-      (Quantity_NOC_SKYBLUE,Aspect_TOL_SOLID,1.);
+// =======================================================================
+// function : SetPlaneAspect
+// purpose  :
+// =======================================================================
 
-  return myVectorAspect;
+void Prs3d_Drawer::SetPlaneAspect (const Handle(Prs3d_PlaneAspect)& theAspect)
+{
+  myPlaneAspect = theAspect;
+  myHasOwnPlaneAspect = !myPlaneAspect.IsNull();
 }
 
-void Prs3d_Drawer::SetVectorAspect ( const Handle(Prs3d_LineAspect)& anAspect) {
- myVectorAspect = anAspect;
+// =======================================================================
+// function : SeenLineAspect
+// purpose  :
+// =======================================================================
+
+const Handle(Prs3d_LineAspect)& Prs3d_Drawer::SeenLineAspect()
+{
+  if (!HasOwnSeenLineAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->SeenLineAspect();
+    }
+    if (mySeenLineAspect.IsNull())
+    {
+      mySeenLineAspect = new Prs3d_LineAspect (THE_DEF_COLOR_SeenLine, Aspect_TOL_SOLID, 1.0);
+    }
+  }
+  return mySeenLineAspect;
 }
 
-Handle (Prs3d_DatumAspect) Prs3d_Drawer::DatumAspect () {
-  if (myDatumAspect.IsNull())
-    myDatumAspect = new Prs3d_DatumAspect;
+// =======================================================================
+// function : SetSeenLineAspect
+// purpose  :
+// =======================================================================
 
-  return myDatumAspect;
+void Prs3d_Drawer::SetSeenLineAspect (const Handle(Prs3d_LineAspect)& theAspect)
+{
+  mySeenLineAspect = theAspect;
+  myHasOwnSeenLineAspect = !mySeenLineAspect.IsNull();
 }
 
-void Prs3d_Drawer::SetDatumAspect ( const Handle(Prs3d_DatumAspect)& anAspect) {
- myDatumAspect = anAspect;
+// =======================================================================
+// function : ArrowAspect
+// purpose  :
+// =======================================================================
+
+const Handle(Prs3d_ArrowAspect)& Prs3d_Drawer::ArrowAspect()
+{
+  if (!HasOwnArrowAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->ArrowAspect();
+    }
+    if (myArrowAspect.IsNull())
+    {
+      myArrowAspect = new Prs3d_ArrowAspect();
+    }
+  }
+  return myArrowAspect;
 }
 
-Handle (Prs3d_PlaneAspect) Prs3d_Drawer::PlaneAspect () {
-  if (myPlaneAspect.IsNull())
-    myPlaneAspect = new Prs3d_PlaneAspect;
+// =======================================================================
+// function : SetArrowAspect
+// purpose  :
+// =======================================================================
 
-  return myPlaneAspect;
+void Prs3d_Drawer::SetArrowAspect (const Handle(Prs3d_ArrowAspect)& theAspect)
+{
+  myArrowAspect = theAspect;
+  myHasOwnArrowAspect = !myArrowAspect.IsNull();
 }
 
-void Prs3d_Drawer::SetPlaneAspect ( const Handle(Prs3d_PlaneAspect)& anAspect) {
-  myPlaneAspect = anAspect;
+// =======================================================================
+// function : SetLineArrowDraw
+// purpose  :
+// =======================================================================
+
+void Prs3d_Drawer::SetLineArrowDraw (const Standard_Boolean theIsEnabled)
+{
+  myHasOwnLineArrowDraw = Standard_True;
+  myLineArrowDraw       = theIsEnabled;
 }
 
 // =======================================================================
-// function : DimensionAspect
+// function : HiddenLineAspect
 // purpose  :
 // =======================================================================
-Handle(Prs3d_DimensionAspect) Prs3d_Drawer::DimensionAspect()
+
+const Handle(Prs3d_LineAspect)& Prs3d_Drawer::HiddenLineAspect()
 {
-  if (myDimensionAspect.IsNull())
+  if (!HasOwnHiddenLineAspect())
   {
-    myDimensionAspect = new Prs3d_DimensionAspect;
+    if (!myLink.IsNull())
+    {
+      return myLink->HiddenLineAspect();
+    }
+    if (myHiddenLineAspect.IsNull())
+    {
+      myHiddenLineAspect = new Prs3d_LineAspect (THE_DEF_COLOR_HiddenLine, Aspect_TOL_DASH, 1.0);
+    }
   }
-
-  return myDimensionAspect;
+  return myHiddenLineAspect;
 }
 
 // =======================================================================
-// function : SetDimensionAspect
+// function : SetHiddenLineAspect
 // purpose  :
 // =======================================================================
-void Prs3d_Drawer::SetDimensionAspect (const Handle(Prs3d_DimensionAspect)& theAspect)
+
+void Prs3d_Drawer::SetHiddenLineAspect (const Handle(Prs3d_LineAspect)& theAspect)
 {
-  myDimensionAspect = theAspect;
+  myHiddenLineAspect = theAspect;
+  myHasOwnHiddenLineAspect = !myHiddenLineAspect.IsNull();
 }
 
 // =======================================================================
-// function : SetDimLengthModelUnits
+// function : EnableDrawHiddenLineDraw
 // purpose  :
 // =======================================================================
-void Prs3d_Drawer::SetDimLengthModelUnits (const TCollection_AsciiString& theUnits)
+
+void Prs3d_Drawer::EnableDrawHiddenLine()
 {
-  myDimensionModelUnits.SetLengthUnits (theUnits);
+    myHasOwnDrawHiddenLine = Standard_True;
+    myDrawHiddenLine       = Standard_True;
 }
 
 // =======================================================================
-// function : SetDimAngleModelUnits
+// function : DisableDrawHiddenLine
 // purpose  :
 // =======================================================================
-void Prs3d_Drawer::SetDimAngleModelUnits (const TCollection_AsciiString& theUnits)
+
+void Prs3d_Drawer::DisableDrawHiddenLine()
 {
-  myDimensionModelUnits.SetAngleUnits (theUnits);
+    myHasOwnDrawHiddenLine = Standard_True;
+    myDrawHiddenLine       = Standard_False;
 }
 
 // =======================================================================
-// function : DimLengthModelUnits
+// function : VectorAspect
 // purpose  :
 // =======================================================================
-const TCollection_AsciiString& Prs3d_Drawer::DimLengthModelUnits() const
+
+const Handle(Prs3d_LineAspect)& Prs3d_Drawer::VectorAspect()
 {
-  return myDimensionModelUnits.GetLengthUnits();
+  if (!HasOwnVectorAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->VectorAspect();
+    }
+    if (myVectorAspect.IsNull())
+    {
+      myVectorAspect = new Prs3d_LineAspect (THE_DEF_COLOR_Vector, Aspect_TOL_SOLID, 1.0);
+    }
+  }
+  return myVectorAspect;
 }
 
 // =======================================================================
-// function : DimAngleModelUnits
+// function : SetVectorAspect
 // purpose  :
 // =======================================================================
-const TCollection_AsciiString& Prs3d_Drawer::DimAngleModelUnits() const
+
+void Prs3d_Drawer::SetVectorAspect (const Handle(Prs3d_LineAspect)& theAspect)
 {
-  return myDimensionModelUnits.GetAngleUnits();
+  myVectorAspect = theAspect;
+  myHasOwnVectorAspect = !myVectorAspect.IsNull();
 }
 
 // =======================================================================
-// function : SetDimLengthDisplayUnits
+// function : SetVertexDrawMode
 // purpose  :
 // =======================================================================
-void Prs3d_Drawer::SetDimLengthDisplayUnits (const TCollection_AsciiString& theUnits)
+
+void Prs3d_Drawer::SetVertexDrawMode (const Prs3d_VertexDrawMode theMode)
 {
-  myDimensionDisplayUnits.SetLengthUnits (theUnits);
+  // Prs3d_VDM_Inherited is default value and means
+  // that correct value should be taken from the Link if it exists.
+  myVertexDrawMode = theMode;
 }
 
 // =======================================================================
-// function : SetDimAngleDisplayUnits
+// function : VertexDrawMode
 // purpose  :
 // =======================================================================
-void Prs3d_Drawer::SetDimAngleDisplayUnits (const TCollection_AsciiString& theUnits)
+
+Prs3d_VertexDrawMode Prs3d_Drawer::VertexDrawMode()
 {
-  myDimensionDisplayUnits.SetAngleUnits (theUnits);
+  if (!HasOwnVertexDrawMode())
+  {
+      if (!myLink.IsNull())
+      {
+          return myLink->VertexDrawMode();
+      }
+      // Prs3d_VDM_Isolated is default value for this setting.
+      myVertexDrawMode = Prs3d_VDM_Isolated;
+  }
+  return myVertexDrawMode;
 }
 
 // =======================================================================
-// function : DimLengthDisplayUnits
+// function : DatumAspect
 // purpose  :
 // =======================================================================
-const TCollection_AsciiString& Prs3d_Drawer::DimLengthDisplayUnits() const
+
+const Handle(Prs3d_DatumAspect)& Prs3d_Drawer::DatumAspect()
 {
-  return myDimensionDisplayUnits.GetLengthUnits();
+  if (!HasOwnDatumAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->DatumAspect();
+    }
+    if (myDatumAspect.IsNull())
+    {
+      myDatumAspect = new Prs3d_DatumAspect();
+    }
+  }
+  return myDatumAspect;
 }
 
 // =======================================================================
-// function : DimAngleDisplayUnits
+// function : SetDatumAspect
 // purpose  :
 // =======================================================================
-const TCollection_AsciiString& Prs3d_Drawer::DimAngleDisplayUnits() const
+
+void Prs3d_Drawer::SetDatumAspect (const Handle(Prs3d_DatumAspect)& theAspect)
 {
-  return myDimensionDisplayUnits.GetAngleUnits();
+  myDatumAspect = theAspect;
+  myHasOwnDatumAspect = !myDatumAspect.IsNull();
 }
 
 // =======================================================================
 // function : SectionAspect
 // purpose  :
 // =======================================================================
-Handle (Prs3d_LineAspect) Prs3d_Drawer::SectionAspect()
+
+const Handle(Prs3d_LineAspect)& Prs3d_Drawer::SectionAspect()
 {
-  if (mySectionAspect.IsNull())
+  if (!HasOwnSectionAspect())
   {
-    mySectionAspect = new Prs3d_LineAspect (Quantity_NOC_ORANGE, Aspect_TOL_SOLID, 1.0);
+    if (!myLink.IsNull())
+    {
+      return myLink->SectionAspect();
+    }
+    if (mySectionAspect.IsNull())
+    {
+      mySectionAspect = new Prs3d_LineAspect (THE_DEF_COLOR_Section, Aspect_TOL_SOLID, 1.0);
+    }
   }
-
   return mySectionAspect;
 }
 
@@ -516,67 +1039,467 @@ Handle (Prs3d_LineAspect) Prs3d_Drawer::SectionAspect()
 // function : SetSectionAspect
 // purpose  :
 // =======================================================================
+
 void Prs3d_Drawer::SetSectionAspect (const Handle(Prs3d_LineAspect)& theAspect)
 {
   mySectionAspect = theAspect;
+  myHasOwnSectionAspect = !mySectionAspect.IsNull();
 }
 
 // =======================================================================
-// function : SetFaceBoundaryDraw
+// function : SetSectionAspect
 // purpose  :
 // =======================================================================
-void Prs3d_Drawer::SetFaceBoundaryDraw (const Standard_Boolean theIsEnabled)
+
+void Prs3d_Drawer::ClearLocalAttributes()
 {
-  myFaceBoundaryDraw = theIsEnabled;
+  if (myLink.IsNull())
+  {
+    return;
+  }
+
+  myUIsoAspect.Nullify();
+  myVIsoAspect.Nullify();
+  myFreeBoundaryAspect.Nullify();
+  myUnFreeBoundaryAspect.Nullify();
+  myFaceBoundaryAspect.Nullify();
+  myWireAspect.Nullify();
+  myLineAspect.Nullify();
+  myTextAspect.Nullify();
+  myShadingAspect.Nullify();
+  myPointAspect.Nullify();
+  myPlaneAspect.Nullify();
+  myArrowAspect.Nullify();
+  myHiddenLineAspect.Nullify();
+  mySeenLineAspect.Nullify();
+  myVectorAspect .Nullify();
+  myDatumAspect.Nullify();
+  myDimensionAspect.Nullify();
+  mySectionAspect.Nullify();
+
+  myHasOwnUIsoAspect           = Standard_False;
+  myHasOwnVIsoAspect           = Standard_False;
+  myHasOwnWireAspect           = Standard_False;
+  myHasOwnPointAspect          = Standard_False;
+  myHasOwnLineAspect           = Standard_False;
+  myHasOwnTextAspect           = Standard_False;
+  myHasOwnShadingAspect        = Standard_False;
+  myHasOwnPlaneAspect          = Standard_False;
+  myHasOwnSeenLineAspect       = Standard_False;
+  myHasOwnArrowAspect          = Standard_False;
+  myHasOwnHiddenLineAspect     = Standard_False;
+  myHasOwnVectorAspect         = Standard_False;
+  myHasOwnDatumAspect          = Standard_False;
+  myHasOwnSectionAspect        = Standard_False;
+  myHasOwnFreeBoundaryAspect   = Standard_False;
+  myHasOwnUnFreeBoundaryAspect = Standard_False;
+  myHasOwnFaceBoundaryAspect   = Standard_False;
+  myHasOwnDimensionAspect      = Standard_False;
+
+  myHasOwnNbPoints                = Standard_False;
+  myHasOwnMaximalParameterValue   = Standard_False;
+  myHasOwnTypeOfDeflection        = Standard_False;
+  myHasOwnChordialDeviation       = Standard_False;
+  myHasOwnDeviationCoefficient    = Standard_False;
+  myHasOwnHLRDeviationCoefficient = Standard_False;
+  myHasOwnDeviationAngle          = Standard_False;
+  myHasOwnHLRDeviationAngle       = Standard_False;
+  myHasOwnIsoOnPlane              = Standard_False;
+  myHasOwnIsoOnTriangulation      = Standard_False;
+  myHasOwnIsAutoTriangulated      = Standard_False;
+  myHasOwnWireDraw                = Standard_False;
+  myHasOwnLineArrowDraw           = Standard_False;
+  myHasOwnDrawHiddenLine          = Standard_False;
+  myHasOwnFreeBoundaryDraw        = Standard_False;
+  myHasOwnUnFreeBoundaryDraw      = Standard_False;
+  myHasOwnFaceBoundaryDraw        = Standard_False;
+  myHasOwnDimLengthModelUnits     = Standard_False;
+  myHasOwnDimLengthDisplayUnits   = Standard_False;
+  myHasOwnDimAngleModelUnits      = Standard_False;
+  myHasOwnDimAngleDisplayUnits    = Standard_False;
+
+  myVertexDrawMode = Prs3d_VDM_Inherited;
+  myTypeOfHLR      = Prs3d_TOH_NotSet;
 }
 
 // =======================================================================
-// function : IsFaceBoundaryDraw
+// function : SetupOwnFaceBoundaryAspect
 // purpose  :
 // =======================================================================
-Standard_Boolean Prs3d_Drawer::IsFaceBoundaryDraw () const
+Standard_Boolean Prs3d_Drawer::SetupOwnFaceBoundaryAspect (const Handle(Prs3d_Drawer)& theDefaults)
 {
-  return myFaceBoundaryDraw;
+  if (myHasOwnFaceBoundaryAspect)
+  {
+    return false;
+  }
+
+  myFaceBoundaryAspect = new Prs3d_LineAspect (THE_DEF_COLOR_FaceBoundary, Aspect_TOL_SOLID, 1.0);
+  myHasOwnFaceBoundaryAspect = true;
+
+  const Handle(Prs3d_Drawer)& aLink = (!theDefaults.IsNull() && theDefaults != this) ? theDefaults : myLink;
+  if (!aLink.IsNull())
+  {
+    *myFaceBoundaryAspect->Aspect() = *aLink->FaceBoundaryAspect()->Aspect();
+  }
+  return true;
 }
 
 // =======================================================================
-// function : SetFaceBoundaryAspect
+// function : SetOwnLineAspects
 // purpose  :
 // =======================================================================
-void Prs3d_Drawer::SetFaceBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect)
+Standard_Boolean Prs3d_Drawer::SetOwnLineAspects (const Handle(Prs3d_Drawer)& theDefaults)
 {
-  myFaceBoundaryAspect = theAspect;
+  bool isUpdateNeeded = false;
+  const Handle(Prs3d_Drawer)& aLink = (!theDefaults.IsNull() && theDefaults != this) ? theDefaults : myLink;
+  if (!myHasOwnUIsoAspect)
+  {
+    isUpdateNeeded = true;
+    myUIsoAspect = new Prs3d_IsoAspect (Quantity_NOC_GRAY75, Aspect_TOL_SOLID, 1.0, 1);
+    if (!aLink.IsNull())
+    {
+      *myUIsoAspect->Aspect() = *aLink->UIsoAspect()->Aspect();
+      myUIsoAspect->SetNumber (aLink->UIsoAspect()->Number());
+    }
+    myHasOwnUIsoAspect = true;
+  }
+  if (!myHasOwnVIsoAspect)
+  {
+    isUpdateNeeded = true;
+    myVIsoAspect = new Prs3d_IsoAspect (Quantity_NOC_GRAY75, Aspect_TOL_SOLID, 1.0, 1);
+    if (!aLink.IsNull())
+    {
+      *myVIsoAspect->Aspect() = *aLink->VIsoAspect()->Aspect();
+      myUIsoAspect->SetNumber (aLink->VIsoAspect()->Number());
+    }
+    myHasOwnVIsoAspect = true;
+  }
+  if (!myHasOwnWireAspect)
+  {
+    isUpdateNeeded = true;
+    myWireAspect = new Prs3d_LineAspect (THE_DEF_COLOR_Wire, Aspect_TOL_SOLID, 1.0);
+    myHasOwnWireAspect = true;
+    if (!aLink.IsNull())
+    {
+      *myWireAspect->Aspect() = *aLink->WireAspect()->Aspect();
+    }
+  }
+  if (!myHasOwnLineAspect)
+  {
+    isUpdateNeeded = true;
+    myLineAspect = new Prs3d_LineAspect (THE_DEF_COLOR_Line, Aspect_TOL_SOLID, 1.0);
+    myHasOwnLineAspect = true;
+    if (!aLink.IsNull())
+    {
+      *myLineAspect->Aspect() = *aLink->LineAspect()->Aspect();
+    }
+  }
+  if (!myHasOwnSeenLineAspect)
+  {
+    isUpdateNeeded = true;
+    mySeenLineAspect = new Prs3d_LineAspect (THE_DEF_COLOR_SeenLine, Aspect_TOL_SOLID, 1.0);
+    myHasOwnSeenLineAspect = true;
+    if (!aLink.IsNull())
+    {
+      *mySeenLineAspect->Aspect() = *aLink->SeenLineAspect()->Aspect();
+    }
+  }
+  if (!myHasOwnHiddenLineAspect)
+  {
+    isUpdateNeeded = true;
+    myHiddenLineAspect = new Prs3d_LineAspect (THE_DEF_COLOR_HiddenLine, Aspect_TOL_DASH, 1.0);
+    myHasOwnHiddenLineAspect = true;
+    if (!aLink.IsNull())
+    {
+      *myHiddenLineAspect->Aspect() = *aLink->HiddenLineAspect()->Aspect();
+    }
+  }
+  if (!myHasOwnFreeBoundaryAspect)
+  {
+    isUpdateNeeded = true;
+    myFreeBoundaryAspect = new Prs3d_LineAspect (THE_DEF_COLOR_FreeBoundary, Aspect_TOL_SOLID, 1.0);
+    myHasOwnFreeBoundaryAspect = true;
+    if (!aLink.IsNull())
+    {
+      *myFreeBoundaryAspect->Aspect() = *aLink->FreeBoundaryAspect()->Aspect();
+    }
+  }
+  if (!myHasOwnUnFreeBoundaryAspect)
+  {
+    isUpdateNeeded = true;
+    myUnFreeBoundaryAspect = new Prs3d_LineAspect (THE_DEF_COLOR_UnFreeBoundary, Aspect_TOL_SOLID, 1.0);
+    myHasOwnUnFreeBoundaryAspect = true;
+    if (!aLink.IsNull())
+    {
+      *myUnFreeBoundaryAspect->Aspect() = *aLink->UnFreeBoundaryAspect()->Aspect();
+    }
+  }
+  isUpdateNeeded = SetupOwnFaceBoundaryAspect (theDefaults) || isUpdateNeeded;
+  return isUpdateNeeded;
 }
 
 // =======================================================================
-// function : FaceBoundaryAspect
+// function : SetOwnDatumAspects
 // purpose  :
 // =======================================================================
-Handle_Prs3d_LineAspect Prs3d_Drawer::FaceBoundaryAspect ()
+Standard_Boolean Prs3d_Drawer::SetOwnDatumAspects (const Handle(Prs3d_Drawer)& theDefaults)
 {
-  if (myFaceBoundaryAspect.IsNull ())
+  bool isUpdateNeeded = false;
+  const Handle(Prs3d_Drawer)& aLink = (!theDefaults.IsNull() && theDefaults != this) ? theDefaults : myLink;
+  if (!myHasOwnVectorAspect)
+  {
+    isUpdateNeeded = true;
+    myVectorAspect = new Prs3d_LineAspect (THE_DEF_COLOR_Vector, Aspect_TOL_SOLID, 1.0);
+    myHasOwnVectorAspect = true;
+    if (!aLink.IsNull())
+    {
+      *myVectorAspect->Aspect() = *aLink->VectorAspect()->Aspect();
+    }
+  }
+  if (!myHasOwnSectionAspect)
+  {
+    isUpdateNeeded = true;
+    mySectionAspect = new Prs3d_LineAspect (THE_DEF_COLOR_Section, Aspect_TOL_SOLID, 1.0);
+    myHasOwnSectionAspect = true;
+    if (!aLink.IsNull())
+    {
+      *mySectionAspect->Aspect() = *aLink->SectionAspect()->Aspect();
+    }
+  }
+  if (!myHasOwnPlaneAspect)
+  {
+    isUpdateNeeded = true;
+    myPlaneAspect = new Prs3d_PlaneAspect();
+    myHasOwnPlaneAspect = true;
+  }
+  if (!myHasOwnArrowAspect)
+  {
+    isUpdateNeeded = true;
+    myArrowAspect = new Prs3d_ArrowAspect();
+    myHasOwnArrowAspect = true;
+  }
+  if (!myHasOwnDatumAspect)
   {
-    myFaceBoundaryAspect = 
-      new Prs3d_LineAspect (Quantity_NOC_BLACK, Aspect_TOL_SOLID, 1.0);
+    isUpdateNeeded = true;
+    myDatumAspect = new Prs3d_DatumAspect();
+    myHasOwnDatumAspect = true;
   }
+  return isUpdateNeeded;
+}
 
-  return myFaceBoundaryAspect;
+//! Assign the shader program.
+template <typename T>
+inline void setAspectProgram (const Handle(Graphic3d_ShaderProgram)& theProgram,
+                              bool theHasAspect,
+                              T thePrsAspect)
+{
+  if (!thePrsAspect.IsNull()
+    && theHasAspect)
+  {
+    thePrsAspect->Aspect()->SetShaderProgram (theProgram);
+  }
 }
 
 // =======================================================================
-// function : SetTypeOfHLR
-// purpose  : set type of HLR algorithm
+// function : SetShaderProgram
+// purpose  :
 // =======================================================================
-void Prs3d_Drawer::SetTypeOfHLR ( const Prs3d_TypeOfHLR theTypeOfHLR) 
+bool Prs3d_Drawer::SetShaderProgram (const Handle(Graphic3d_ShaderProgram)& theProgram,
+                                     const Graphic3d_GroupAspect            theAspect,
+                                     const bool                             theToOverrideDefaults)
 {
-  myTypeOfHLR = theTypeOfHLR;
+  bool isUpdateNeeded = false;
+  switch (theAspect)
+  {
+    case Graphic3d_ASPECT_LINE:
+    {
+      if (theToOverrideDefaults)
+      {
+        isUpdateNeeded = SetOwnLineAspects()  || isUpdateNeeded;
+        isUpdateNeeded = SetOwnDatumAspects() || isUpdateNeeded;
+      }
+
+      setAspectProgram (theProgram, myHasOwnUIsoAspect, myUIsoAspect);
+      setAspectProgram (theProgram, myHasOwnVIsoAspect, myVIsoAspect);
+      setAspectProgram (theProgram, myHasOwnWireAspect, myWireAspect);
+      setAspectProgram (theProgram, myHasOwnLineAspect, myLineAspect);
+      setAspectProgram (theProgram, myHasOwnSeenLineAspect,       mySeenLineAspect);
+      setAspectProgram (theProgram, myHasOwnHiddenLineAspect,     myHiddenLineAspect);
+      setAspectProgram (theProgram, myHasOwnVectorAspect,         myVectorAspect);
+      setAspectProgram (theProgram, myHasOwnSectionAspect,        mySectionAspect);
+      setAspectProgram (theProgram, myHasOwnFreeBoundaryAspect,   myFreeBoundaryAspect);
+      setAspectProgram (theProgram, myHasOwnUnFreeBoundaryAspect, myUnFreeBoundaryAspect);
+      setAspectProgram (theProgram, myHasOwnFaceBoundaryAspect,   myFaceBoundaryAspect);
+      if (myHasOwnPlaneAspect)
+      {
+        setAspectProgram (theProgram, true, myPlaneAspect->EdgesAspect());
+        setAspectProgram (theProgram, true, myPlaneAspect->IsoAspect());
+        setAspectProgram (theProgram, true, myPlaneAspect->ArrowAspect());
+      }
+      if (myHasOwnDatumAspect)
+      {
+        setAspectProgram (theProgram, true, myDatumAspect->LineAspect(Prs3d_DP_XAxis));
+        setAspectProgram (theProgram, true, myDatumAspect->LineAspect(Prs3d_DP_YAxis));
+        setAspectProgram (theProgram, true, myDatumAspect->LineAspect(Prs3d_DP_ZAxis));
+      }
+      setAspectProgram (theProgram, myHasOwnArrowAspect, myArrowAspect);
+      return isUpdateNeeded;
+    }
+    case Graphic3d_ASPECT_TEXT:
+    {
+      if (theToOverrideDefaults
+      && !myHasOwnTextAspect)
+      {
+        isUpdateNeeded = true;
+        myTextAspect = new Prs3d_TextAspect();
+        myHasOwnTextAspect = true;
+        if (!myLink.IsNull())
+        {
+          *myTextAspect->Aspect() = *myLink->TextAspect()->Aspect();
+        }
+      }
+
+      setAspectProgram (theProgram, myHasOwnTextAspect, myTextAspect);
+      return isUpdateNeeded;
+    }
+    case Graphic3d_ASPECT_MARKER:
+    {
+      if (theToOverrideDefaults
+       && SetupOwnPointAspect())
+      {
+        isUpdateNeeded = true;
+      }
+
+      setAspectProgram (theProgram, myHasOwnPointAspect, myPointAspect);
+      return isUpdateNeeded;
+    }
+    case Graphic3d_ASPECT_FILL_AREA:
+    {
+      if (theToOverrideDefaults
+       && SetupOwnShadingAspect())
+      {
+        isUpdateNeeded = true;
+      }
+      setAspectProgram (theProgram, myHasOwnShadingAspect, myShadingAspect);
+      return isUpdateNeeded;
+    }
+  }
+  return false;
 }
 
 // =======================================================================
-// function : TypeOfHLR
-// purpose  : gets type of HLR algorithm
+// function : SetShadingModel
+// purpose  :
 // =======================================================================
-Prs3d_TypeOfHLR Prs3d_Drawer::TypeOfHLR ( ) const
+bool Prs3d_Drawer::SetShadingModel (Graphic3d_TypeOfShadingModel theModel,
+                                    bool theToOverrideDefaults)
 {
-  return myTypeOfHLR;
+  bool isUpdateNeeded = false;
+
+  if (theToOverrideDefaults
+   && SetupOwnShadingAspect())
+  {
+    isUpdateNeeded  = true;
+  }
+
+  if (!myShadingAspect.IsNull()
+    && myHasOwnShadingAspect)
+  {
+    myShadingAspect->Aspect()->SetShadingModel (theModel);
+  }
+
+  return isUpdateNeeded;
+}
+
+// =======================================================================
+// function : DumpJson
+// purpose  :
+// =======================================================================
+void Prs3d_Drawer::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myLink.get())
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnNbPoints)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMaximalParameterValue)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnMaximalParameterValue)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myChordialDeviation)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnChordialDeviation)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTypeOfDeflection)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnTypeOfDeflection)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTypeOfHLR)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDeviationCoefficient)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPreviousDeviationCoefficient)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDeviationCoefficient)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHLRDeviationCoefficient)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnHLRDeviationCoefficient)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPreviousHLRDeviationCoefficient)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDeviationAngle)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDeviationAngle)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPreviousDeviationAngle)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHLRAngle)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnHLRDeviationAngle)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPreviousHLRDeviationAngle)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsoOnPlane)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnIsoOnPlane)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsoOnTriangulation)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnIsoOnTriangulation)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsAutoTriangulated)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnIsAutoTriangulated)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnUIsoAspect)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnVIsoAspect)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnWireAspect)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myWireDraw)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnWireDraw)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnPointAspect)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnLineAspect)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTextAspect.get())
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myShadingAspect.get())
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnShadingAspect)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnPlaneAspect)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnSeenLineAspect)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnArrowAspect)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLineArrowDraw)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnLineArrowDraw)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnHiddenLineAspect)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDrawHiddenLine)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDrawHiddenLine)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnVectorAspect)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myVertexDrawMode)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDatumAspect)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnSectionAspect)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnFreeBoundaryAspect)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFreeBoundaryDraw)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnFreeBoundaryDraw)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnUnFreeBoundaryAspect)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUnFreeBoundaryDraw)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnUnFreeBoundaryDraw)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFaceBoundaryUpperContinuity)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnFaceBoundaryAspect)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFaceBoundaryDraw)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnFaceBoundaryDraw)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDimensionAspect)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDimLengthModelUnits)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDimAngleModelUnits)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDimLengthDisplayUnits)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDimAngleDisplayUnits)
 }