0025773: Visualization - remove AIS_Drawer class and transfer its Link() logic to...
[occt.git] / src / Prs3d / Prs3d_Drawer.cxx
index f4c63f9..71b2a6e 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-#include <Prs3d_Drawer.ixx>
+#include <Prs3d_Drawer.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>
+
+IMPLEMENT_STANDARD_HANDLE (Prs3d_Drawer, MMgt_TShared)
+IMPLEMENT_STANDARD_RTTIEXT(Prs3d_Drawer, MMgt_TShared)
 
 // =======================================================================
 // 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),
-  myVertexDrawMode (Prs3d_VDM_Isolated),
-  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),
+
+  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),
+  myShadingAspectGlobal       (Standard_True),
+  myHasOwnShadingAspectGlobal (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),
+  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");
@@ -45,69 +97,100 @@ 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::SetIsoOnPlane(const Standard_Boolean OnOff)
+void Prs3d_Drawer::SetTypeOfDeflection (const Aspect_TypeOfDeflection theTypeOfDeflection)
 {
-  myIsoOnPlane = OnOff;
+  myHasOwnTypeOfDeflection = Standard_True;
+  myTypeOfDeflection       = theTypeOfDeflection;
 }
 
-Standard_Boolean Prs3d_Drawer::IsoOnPlane()const
+// =======================================================================
+// function : SetMaximalChordialDeviation
+// purpose  :
+// =======================================================================
+
+void Prs3d_Drawer::SetMaximalChordialDeviation (const Quantity_Length theChordialDeviation)
 {
-  return myIsoOnPlane;
+  myHasOwnChordialDeviation = Standard_True;
+  myChordialDeviation       = theChordialDeviation;
 }
 
+// =======================================================================
+// function : SetTypeOfHLR
+// purpose  : set type of HLR algorithm
+// =======================================================================
 
-Standard_Integer Prs3d_Drawer::Discretisation() const
+void Prs3d_Drawer::SetTypeOfHLR (const Prs3d_TypeOfHLR theTypeOfHLR)
 {
-  return myNbPoints;
+  myTypeOfHLR = theTypeOfHLR;
 }
 
+// =======================================================================
+// function : TypeOfHLR
+// purpose  : gets type of HLR algorithm
+// =======================================================================
 
-void Prs3d_Drawer::SetDiscretisation(const Standard_Integer d) 
+Prs3d_TypeOfHLR Prs3d_Drawer::TypeOfHLR()
 {
-  myNbPoints = d;
+  if (!HasOwnTypeOfHLR())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->TypeOfHLR();
+    }
+    // Prs3d_TOH_PolyAlgo is default value for this setting.
+    myTypeOfHLR = Prs3d_TOH_PolyAlgo;
+  }
+  return myTypeOfHLR;
 }
 
+// =======================================================================
+// 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;
 }
 
 //=======================================================================
@@ -115,19 +198,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;
 }
 
 //=======================================================================
@@ -135,457 +222,823 @@ 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 : FreeBoundaryAspect
+// purpose  :
+// =======================================================================
 
-  return myHLRAngle;
+const Handle(Prs3d_LineAspect)& Prs3d_Drawer::FreeBoundaryAspect()
+{
+  if (!HasOwnFreeBoundaryAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->FreeBoundaryAspect();
+    }
+    if (myFreeBoundaryAspect.IsNull())
+    {
+      myFreeBoundaryAspect = new Prs3d_LineAspect (Quantity_NOC_GREEN, Aspect_TOL_SOLID, 1.0);
+    }
+  }
+  return myFreeBoundaryAspect;
 }
 
-//=======================================================================
-//function : SetDeviationAngle
-//purpose  : 
-//=======================================================================
+// =======================================================================
+// function : FreeBoundaryAspect
+// purpose  :
+// =======================================================================
 
-void Prs3d_Drawer::SetDeviationAngle (const Standard_Real anAngle)
+void Prs3d_Drawer::SetFreeBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect)
 {
-  myDeviationAngle = anAngle;
+  myFreeBoundaryAspect = theAspect;
+  myHasOwnFreeBoundaryAspect = !myFreeBoundaryAspect.IsNull();
 }
 
-//=======================================================================
-//function : DeviationAngle
-//purpose  : 
-//=======================================================================
+// =======================================================================
+// function : SetFreeBoundaryDraw
+// purpose  :
+// =======================================================================
 
-Standard_Real Prs3d_Drawer::DeviationAngle () const 
+void Prs3d_Drawer::SetFreeBoundaryDraw (const Standard_Boolean theIsEnabled)
 {
-  return myDeviationAngle;
+  myHasOwnFreeBoundaryDraw = Standard_True;
+  myFreeBoundaryDraw       = theIsEnabled;
 }
 
+// =======================================================================
+// function : UnFreeBoundaryAspect
+// purpose  :
+// =======================================================================
 
-void Prs3d_Drawer::SetMaximalParameterValue (const Standard_Real Value) {
-  myMaximalParameterValue = Value;
-}
-
-Standard_Real Prs3d_Drawer::MaximalParameterValue () const {
-  return myMaximalParameterValue;
+const Handle(Prs3d_LineAspect)& Prs3d_Drawer::UnFreeBoundaryAspect()
+{
+  if (!HasOwnUnFreeBoundaryAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->UnFreeBoundaryAspect();
+    }
+    if (myUnFreeBoundaryAspect.IsNull())
+    {
+      myUnFreeBoundaryAspect = new Prs3d_LineAspect (Quantity_NOC_YELLOW, Aspect_TOL_SOLID, 1.0);
+    }
+  }
+  return myUnFreeBoundaryAspect;
 }
 
-Handle (Prs3d_IsoAspect) Prs3d_Drawer::UIsoAspect (){
-
-  if (myUIsoAspect.IsNull()) 
-    myUIsoAspect = new Prs3d_IsoAspect
-                   (Quantity_NOC_GRAY75,Aspect_TOL_SOLID,0.5,1);
-
-  return myUIsoAspect;
-}
+// =======================================================================
+// function : SetUnFreeBoundaryAspect
+// purpose  :
+// =======================================================================
 
-void Prs3d_Drawer::SetUIsoAspect ( const Handle(Prs3d_IsoAspect)& anAspect) {
- myUIsoAspect = anAspect;
+void Prs3d_Drawer::SetUnFreeBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect)
+{
+  myUnFreeBoundaryAspect = theAspect;
+  myHasOwnUnFreeBoundaryAspect = !myUnFreeBoundaryAspect.IsNull();
 }
 
-Handle (Prs3d_IsoAspect) Prs3d_Drawer::VIsoAspect () {
-  if (myVIsoAspect.IsNull()) 
-    myVIsoAspect = new Prs3d_IsoAspect
-      (Quantity_NOC_GRAY75,Aspect_TOL_SOLID,0.5,1);
-      
-  return myVIsoAspect;
-}
+// =======================================================================
+// function : SetUnFreeBoundaryDraw
+// purpose  :
+// =======================================================================
 
-void Prs3d_Drawer::SetVIsoAspect ( const Handle(Prs3d_IsoAspect)& anAspect) {
- myVIsoAspect = anAspect;
+void Prs3d_Drawer::SetUnFreeBoundaryDraw (const Standard_Boolean theIsEnabled)
+{
+  myHasOwnUnFreeBoundaryDraw = Standard_True;
+  myUnFreeBoundaryDraw       = theIsEnabled;
 }
 
-Handle (Prs3d_LineAspect) Prs3d_Drawer::FreeBoundaryAspect () {
-  if (myFreeBoundaryAspect.IsNull())
-    myFreeBoundaryAspect = new Prs3d_LineAspect
-      (Quantity_NOC_GREEN,Aspect_TOL_SOLID,1.);
-
-  return myFreeBoundaryAspect;
-}
+// =======================================================================
+// function : FaceBoundaryAspect
+// purpose  :
+// =======================================================================
 
-void Prs3d_Drawer::SetFreeBoundaryAspect (const Handle(Prs3d_LineAspect)& anAspect) {
- myFreeBoundaryAspect = anAspect;
+const Handle(Prs3d_LineAspect)& Prs3d_Drawer::FaceBoundaryAspect()
+{
+  if (!HasOwnFaceBoundaryAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->FaceBoundaryAspect();
+    }
+    if (myFaceBoundaryAspect.IsNull())
+    {
+      myFaceBoundaryAspect = new Prs3d_LineAspect (Quantity_NOC_BLACK, Aspect_TOL_SOLID, 1.0);
+    }
+  }
+  return myFaceBoundaryAspect;
 }
 
-void Prs3d_Drawer::SetFreeBoundaryDraw ( const Standard_Boolean OnOff ) {
-  myFreeBoundaryDraw = OnOff;
-}
+// =======================================================================
+// function : SetFaceBoundaryAspect
+// purpose  :
+// =======================================================================
 
-Standard_Boolean Prs3d_Drawer::FreeBoundaryDraw () const {
-return myFreeBoundaryDraw;
+void Prs3d_Drawer::SetFaceBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect)
+{
+  myFaceBoundaryAspect = theAspect;
+  myHasOwnFaceBoundaryAspect = !myFaceBoundaryAspect.IsNull();
 }
 
-Handle (Prs3d_LineAspect) Prs3d_Drawer::UnFreeBoundaryAspect (){
-  if  (myUnFreeBoundaryAspect.IsNull())
-    myUnFreeBoundaryAspect = new Prs3d_LineAspect
-      (Quantity_NOC_YELLOW,Aspect_TOL_SOLID,1.);
-  return myUnFreeBoundaryAspect;
-}
+// =======================================================================
+// function : SetFaceBoundaryDraw
+// purpose  :
+// =======================================================================
 
-void Prs3d_Drawer::SetUnFreeBoundaryAspect ( const Handle(Prs3d_LineAspect)& anAspect) {
- myUnFreeBoundaryAspect = anAspect;
+void Prs3d_Drawer::SetFaceBoundaryDraw (const Standard_Boolean theIsEnabled)
+{
+  myHasOwnFaceBoundaryDraw = Standard_True;
+  myFaceBoundaryDraw       = theIsEnabled;
 }
 
-void Prs3d_Drawer::SetUnFreeBoundaryDraw ( const Standard_Boolean OnOff ) {
-  myUnFreeBoundaryDraw = OnOff;
-}
+// =======================================================================
+// function : DimensionAspect
+// purpose  :
+// =======================================================================
 
-Standard_Boolean Prs3d_Drawer::UnFreeBoundaryDraw () const {
-  return myUnFreeBoundaryDraw;
+const Handle(Prs3d_DimensionAspect)& Prs3d_Drawer::DimensionAspect()
+{
+  if (!HasOwnDimensionAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->DimensionAspect();
+    }
+    if (myDimensionAspect.IsNull())
+    {
+      myDimensionAspect = new Prs3d_DimensionAspect;
+    }
+  }
+  return myDimensionAspect;
 }
 
-Handle (Prs3d_LineAspect) Prs3d_Drawer::WireAspect ()  {
-  if (myWireAspect.IsNull())
-   myWireAspect = new Prs3d_LineAspect(Quantity_NOC_RED,Aspect_TOL_SOLID,1.);
+// =======================================================================
+// function : SetDimensionAspect
+// purpose  :
+// =======================================================================
 
-  return myWireAspect;
+void Prs3d_Drawer::SetDimensionAspect (const Handle(Prs3d_DimensionAspect)& theAspect)
+{
+  myDimensionAspect = theAspect;
+  myHasOwnDimensionAspect = !myDimensionAspect.IsNull();
 }
 
-void Prs3d_Drawer::SetWireAspect ( const Handle(Prs3d_LineAspect)& anAspect) {
- myWireAspect = anAspect;
-}
-void Prs3d_Drawer::SetWireDraw ( const Standard_Boolean OnOff ) {
-  myWireDraw = OnOff;
-}
+// =======================================================================
+// function : SetDimLengthModelUnits
+// purpose  :
+// =======================================================================
 
-Standard_Boolean Prs3d_Drawer::WireDraw () const {
-return myWireDraw;
+void Prs3d_Drawer::SetDimLengthModelUnits (const TCollection_AsciiString& theUnits)
+{
+  myHasOwnDimLengthModelUnits = Standard_True;
+  myDimensionModelUnits.SetLengthUnits (theUnits);
 }
 
+// =======================================================================
+// function : SetDimAngleModelUnits
+// 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::SetDimAngleModelUnits (const TCollection_AsciiString& theUnits)
+{
+  myHasOwnDimAngleModelUnits = Standard_True;
+  myDimensionModelUnits.SetAngleUnits (theUnits);
 }
 
-void Prs3d_Drawer::SetLineAspect ( const Handle(Prs3d_LineAspect)& anAspect) {
- myLineAspect = anAspect;
+// =======================================================================
+// function : SetDimLengthDisplayUnits
+// purpose  :
+// =======================================================================
+
+void Prs3d_Drawer::SetDimLengthDisplayUnits (const TCollection_AsciiString& theUnits)
+{
+  myHasOwnDimLengthDisplayUnits = Standard_True;
+  myDimensionDisplayUnits.SetLengthUnits (theUnits);
 }
 
-Handle (Prs3d_TextAspect) Prs3d_Drawer::TextAspect ()  {
-  if (myTextAspect.IsNull())
-    myTextAspect = new Prs3d_TextAspect();
+// =======================================================================
+// function : SetDimAngleDisplayUnits
+// purpose  :
+// =======================================================================
 
-  return myTextAspect;
+void Prs3d_Drawer::SetDimAngleDisplayUnits (const TCollection_AsciiString& theUnits)
+{
+  myHasOwnDimAngleDisplayUnits = Standard_True;
+  myDimensionDisplayUnits.SetAngleUnits (theUnits);
 }
 
-void Prs3d_Drawer::SetTextAspect ( const Handle(Prs3d_TextAspect)& anAspect) {
- myTextAspect = 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, 0.5, 1);
+    }
+  }
+  return myUIsoAspect;
 }
 
-Handle (Prs3d_ShadingAspect) Prs3d_Drawer::ShadingAspect ()  {
-  if (myShadingAspect.IsNull())
-  myShadingAspect = new Prs3d_ShadingAspect();
+// =======================================================================
+// function : SetUIsoAspect
+// purpose  :
+// =======================================================================
 
-  return myShadingAspect;
+void Prs3d_Drawer::SetUIsoAspect (const Handle(Prs3d_IsoAspect)& theAspect)
+{
+  myUIsoAspect = theAspect;
+  myHasOwnUIsoAspect = !myUIsoAspect.IsNull();
 }
 
-void Prs3d_Drawer::SetShadingAspect ( const Handle(Prs3d_ShadingAspect)& anAspect) {
- myShadingAspect = anAspect;
-}
+// =======================================================================
+// function : VIsoAspect
+// purpose  :
+// =======================================================================
 
-void Prs3d_Drawer::SetShadingAspectGlobal(const Standard_Boolean aValue) {
- myShadingAspectGlobal = aValue;
+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, 0.5, 1);
+    }
+  }
+  return myVIsoAspect;
 }
 
-Standard_Boolean Prs3d_Drawer::ShadingAspectGlobal() const { 
- return myShadingAspectGlobal;
+// =======================================================================
+// function : SetVIsoAspect
+// purpose  :
+// =======================================================================
 
+void Prs3d_Drawer::SetVIsoAspect (const Handle(Prs3d_IsoAspect)& theAspect)
+{
+  myVIsoAspect = theAspect;
+  myHasOwnVIsoAspect= !myVIsoAspect.IsNull();
 }
-void Prs3d_Drawer::SetLineArrowDraw ( const Standard_Boolean OnOff ) {
-  myLineDrawArrow = OnOff;
-}
 
-Standard_Boolean Prs3d_Drawer::LineArrowDraw () const {
-return myLineDrawArrow;
+// =======================================================================
+// function : WireAspect
+// purpose  :
+// =======================================================================
+
+const Handle(Prs3d_LineAspect)& Prs3d_Drawer::WireAspect()
+{
+  if (!HasOwnWireAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->WireAspect();
+    }
+    if (myWireAspect.IsNull())
+    {
+      myWireAspect = new Prs3d_LineAspect (Quantity_NOC_RED, Aspect_TOL_SOLID, 1.0);
+    }
+  }
+  return myWireAspect;
 }
 
-Handle (Prs3d_ArrowAspect) Prs3d_Drawer::ArrowAspect() {
-  if (myArrowAspect.IsNull())
-    myArrowAspect = new Prs3d_ArrowAspect;
+// =======================================================================
+// function : SetWireAspect
+// purpose  :
+// =======================================================================
 
-  return myArrowAspect;
+void Prs3d_Drawer::SetWireAspect (const Handle(Prs3d_LineAspect)& theAspect)
+{
+  myWireAspect = theAspect;
+  myHasOwnWireAspect = !myWireAspect.IsNull();
 }
 
-void Prs3d_Drawer::SetArrowAspect ( const Handle(Prs3d_ArrowAspect)& anAspect) {
- myArrowAspect = anAspect;
+// =======================================================================
+// function : SetWireDraw
+// purpose  :
+// =======================================================================
+
+void Prs3d_Drawer::SetWireDraw (const Standard_Boolean theIsEnabled)
+{
+  myHasOwnWireDraw = Standard_True;
+  myWireDraw       = theIsEnabled;
 }
 
-Handle (Prs3d_PointAspect) Prs3d_Drawer::PointAspect() {
-  if (myPointAspect.IsNull())
-    myPointAspect = new Prs3d_PointAspect 
-      (Aspect_TOM_PLUS,Quantity_NOC_YELLOW,1.);
+// =======================================================================
+// 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;
 }
 
-void Prs3d_Drawer::SetPointAspect ( const Handle(Prs3d_PointAspect)& anAspect) {
- myPointAspect = anAspect;
-}
+// =======================================================================
+// function : SetPointAspect
+// purpose  :
+// =======================================================================
 
-void Prs3d_Drawer::SetVertexDrawMode (const Prs3d_VertexDrawMode theMode)
+void Prs3d_Drawer::SetPointAspect (const Handle(Prs3d_PointAspect)& theAspect)
 {
-  // Prs3d_VDM_Inherited value is allowed at AIS_Drawer level.
-  // Replacing it by Prs3d_VDM_Isolated to avoid unpredictable behavior.
-  myVertexDrawMode = (theMode == Prs3d_VDM_Inherited ? Prs3d_VDM_Isolated : theMode);
+  myPointAspect = theAspect;
+  myHasOwnPointAspect = !myPointAspect.IsNull();
 }
 
-Prs3d_VertexDrawMode Prs3d_Drawer::VertexDrawMode () const
+// =======================================================================
+// function : LineAspect
+// purpose  :
+// =======================================================================
+
+const Handle(Prs3d_LineAspect)& Prs3d_Drawer::LineAspect()
 {
-  return myVertexDrawMode;
+  if (!HasOwnLineAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->LineAspect();
+    }
+    if (myLineAspect.IsNull())
+    {
+      myLineAspect = new Prs3d_LineAspect (Quantity_NOC_YELLOW, Aspect_TOL_SOLID, 1.0);
+    }
+  }
+  return myLineAspect;
 }
 
-Standard_Boolean Prs3d_Drawer::DrawHiddenLine () const {return myDrawHiddenLine;}
-
-void Prs3d_Drawer::EnableDrawHiddenLine () {myDrawHiddenLine=Standard_True;}
-
-void Prs3d_Drawer::DisableDrawHiddenLine () {myDrawHiddenLine=Standard_False;}
-
-Handle (Prs3d_LineAspect) Prs3d_Drawer::HiddenLineAspect ()  {
- if (myHiddenLineAspect.IsNull())
-   myHiddenLineAspect = new Prs3d_LineAspect
-     (Quantity_NOC_YELLOW,Aspect_TOL_DASH,0.5);
-
-  return myHiddenLineAspect;
-}
+// =======================================================================
+// function : SetLineAspect
+// purpose  :
+// =======================================================================
 
-void Prs3d_Drawer::SetHiddenLineAspect ( const Handle(Prs3d_LineAspect)& anAspect) {
- myHiddenLineAspect = anAspect;
+void Prs3d_Drawer::SetLineAspect (const Handle(Prs3d_LineAspect)& theAspect)
+{
+  myLineAspect = theAspect;
+  myHasOwnLineAspect = !myLineAspect.IsNull();
 }
 
-Handle (Prs3d_LineAspect) Prs3d_Drawer::SeenLineAspect ()  {
-  if (mySeenLineAspect.IsNull())
-    mySeenLineAspect = new Prs3d_LineAspect
-      (Quantity_NOC_YELLOW,Aspect_TOL_SOLID,1.);
-
-  return mySeenLineAspect;
-}
+// =======================================================================
+// function : TextAspect
+// purpose  :
+// =======================================================================
 
-void Prs3d_Drawer::SetSeenLineAspect ( const Handle(Prs3d_LineAspect)& anAspect) {
- mySeenLineAspect = anAspect;
+const Handle(Prs3d_TextAspect)& Prs3d_Drawer::TextAspect()
+{
+  if (!HasOwnTextAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->TextAspect();
+    }
+    if (myTextAspect.IsNull())
+    {
+      myTextAspect = new Prs3d_TextAspect();
+    }
+  }
+  return myTextAspect;
 }
 
-Handle (Prs3d_LineAspect) Prs3d_Drawer::VectorAspect ()  {
-  if (myVectorAspect.IsNull())
-    myVectorAspect = new Prs3d_LineAspect
-      (Quantity_NOC_SKYBLUE,Aspect_TOL_SOLID,1.);
+// =======================================================================
+// function : SetTextAspect
+// purpose  :
+// =======================================================================
 
-  return myVectorAspect;
+void Prs3d_Drawer::SetTextAspect (const Handle(Prs3d_TextAspect)& theAspect)
+{
+  myTextAspect = theAspect;
+  myHasOwnTextAspect = !myTextAspect.IsNull();
 }
 
-void Prs3d_Drawer::SetVectorAspect ( const Handle(Prs3d_LineAspect)& anAspect) {
- myVectorAspect = anAspect;
+// =======================================================================
+// function : ShadingAspect
+// purpose  :
+// =======================================================================
+
+const Handle(Prs3d_ShadingAspect)& Prs3d_Drawer::ShadingAspect()
+{
+  if (!HasOwnShadingAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->ShadingAspect();
+    }
+    if (myShadingAspect.IsNull())
+    {
+      myShadingAspect = new Prs3d_ShadingAspect();
+    }
+  }
+  return myShadingAspect;
 }
 
-Handle (Prs3d_DatumAspect) Prs3d_Drawer::DatumAspect () {
-  if (myDatumAspect.IsNull())
-    myDatumAspect = new Prs3d_DatumAspect;
+// =======================================================================
+// function : SetShadingAspect
+// purpose  :
+// =======================================================================
 
-  return myDatumAspect;
+void Prs3d_Drawer::SetShadingAspect (const Handle(Prs3d_ShadingAspect)& theAspect)
+{
+  myShadingAspect = theAspect;
+  myHasOwnShadingAspect = !myShadingAspect.IsNull();
 }
 
-void Prs3d_Drawer::SetDatumAspect ( const Handle(Prs3d_DatumAspect)& anAspect) {
- myDatumAspect = anAspect;
+// =======================================================================
+// function : SetShadingAspectGlobal
+// purpose  :
+// =======================================================================
+
+void Prs3d_Drawer::SetShadingAspectGlobal (const Standard_Boolean theValue)
+{
+  myHasOwnShadingAspectGlobal = Standard_True;
+  myShadingAspectGlobal       = theValue;
 }
 
-Handle (Prs3d_PlaneAspect) Prs3d_Drawer::PlaneAspect () {
-  if (myPlaneAspect.IsNull())
-    myPlaneAspect = new Prs3d_PlaneAspect;
+// =======================================================================
+// 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;
 }
 
-void Prs3d_Drawer::SetPlaneAspect ( const Handle(Prs3d_PlaneAspect)& anAspect) {
-  myPlaneAspect = anAspect;
+// =======================================================================
+// function : SetPlaneAspect
+// purpose  :
+// =======================================================================
+
+void Prs3d_Drawer::SetPlaneAspect (const Handle(Prs3d_PlaneAspect)& theAspect)
+{
+  myPlaneAspect = theAspect;
+  myHasOwnPlaneAspect = !myPlaneAspect.IsNull();
 }
 
 // =======================================================================
-// function : DimensionAspect
+// function : SeenLineAspect
 // purpose  :
 // =======================================================================
-Handle(Prs3d_DimensionAspect) Prs3d_Drawer::DimensionAspect()
+
+const Handle(Prs3d_LineAspect)& Prs3d_Drawer::SeenLineAspect()
 {
-  if (myDimensionAspect.IsNull())
+  if (!HasOwnSeenLineAspect())
   {
-    myDimensionAspect = new Prs3d_DimensionAspect;
+    if (!myLink.IsNull())
+    {
+      return myLink->SeenLineAspect();
+    }
+    if (mySeenLineAspect.IsNull())
+    {
+      mySeenLineAspect = new Prs3d_LineAspect (Quantity_NOC_YELLOW, Aspect_TOL_SOLID, 1.0);
+    }
   }
-
-  return myDimensionAspect;
+  return mySeenLineAspect;
 }
 
 // =======================================================================
-// function : SetDimensionAspect
+// function : SetSeenLineAspect
 // purpose  :
 // =======================================================================
-void Prs3d_Drawer::SetDimensionAspect (const Handle(Prs3d_DimensionAspect)& theAspect)
+
+void Prs3d_Drawer::SetSeenLineAspect (const Handle(Prs3d_LineAspect)& theAspect)
 {
-  myDimensionAspect = theAspect;
+  mySeenLineAspect = theAspect;
+  myHasOwnSeenLineAspect = !mySeenLineAspect.IsNull();
 }
 
 // =======================================================================
-// function : SetDimLengthModelUnits
+// function : ArrowAspect
 // purpose  :
 // =======================================================================
-void Prs3d_Drawer::SetDimLengthModelUnits (const TCollection_AsciiString& theUnits)
+
+const Handle(Prs3d_ArrowAspect)& Prs3d_Drawer::ArrowAspect()
 {
-  myDimensionModelUnits.SetLengthUnits (theUnits);
+  if (!HasOwnArrowAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->ArrowAspect();
+    }
+    if (myArrowAspect.IsNull())
+    {
+      myArrowAspect = new Prs3d_ArrowAspect();
+    }
+  }
+  return myArrowAspect;
 }
 
 // =======================================================================
-// function : SetDimAngleModelUnits
+// function : SetArrowAspect
 // purpose  :
 // =======================================================================
-void Prs3d_Drawer::SetDimAngleModelUnits (const TCollection_AsciiString& theUnits)
+
+void Prs3d_Drawer::SetArrowAspect (const Handle(Prs3d_ArrowAspect)& theAspect)
 {
-  myDimensionModelUnits.SetAngleUnits (theUnits);
+  myArrowAspect = theAspect;
+  myHasOwnArrowAspect = !myArrowAspect.IsNull();
 }
 
 // =======================================================================
-// function : DimLengthModelUnits
+// function : SetLineArrowDraw
 // purpose  :
 // =======================================================================
-const TCollection_AsciiString& Prs3d_Drawer::DimLengthModelUnits() const
+
+void Prs3d_Drawer::SetLineArrowDraw (const Standard_Boolean theIsEnabled)
 {
-  return myDimensionModelUnits.GetLengthUnits();
+  myHasOwnLineArrowDraw = Standard_True;
+  myLineArrowDraw       = theIsEnabled;
 }
 
 // =======================================================================
-// function : DimAngleModelUnits
+// function : HiddenLineAspect
 // purpose  :
 // =======================================================================
-const TCollection_AsciiString& Prs3d_Drawer::DimAngleModelUnits() const
+
+const Handle(Prs3d_LineAspect)& Prs3d_Drawer::HiddenLineAspect()
 {
-  return myDimensionModelUnits.GetAngleUnits();
+  if (!HasOwnHiddenLineAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->HiddenLineAspect();
+    }
+    if (myHiddenLineAspect.IsNull())
+    {
+      myHiddenLineAspect = new Prs3d_LineAspect (Quantity_NOC_YELLOW, Aspect_TOL_DASH, 0.5);
+    }
+  }
+  return myHiddenLineAspect;
 }
 
 // =======================================================================
-// function : SetDimLengthDisplayUnits
+// function : SetHiddenLineAspect
 // purpose  :
 // =======================================================================
-void Prs3d_Drawer::SetDimLengthDisplayUnits (const TCollection_AsciiString& theUnits)
+
+void Prs3d_Drawer::SetHiddenLineAspect (const Handle(Prs3d_LineAspect)& theAspect)
 {
-  myDimensionDisplayUnits.SetLengthUnits (theUnits);
+  myHiddenLineAspect = theAspect;
+  myHasOwnHiddenLineAspect = !myHiddenLineAspect.IsNull();
 }
 
 // =======================================================================
-// function : SetDimAngleDisplayUnits
+// function : EnableDrawHiddenLineDraw
 // purpose  :
 // =======================================================================
-void Prs3d_Drawer::SetDimAngleDisplayUnits (const TCollection_AsciiString& theUnits)
+
+void Prs3d_Drawer::EnableDrawHiddenLine()
 {
-  myDimensionDisplayUnits.SetAngleUnits (theUnits);
+    myHasOwnDrawHiddenLine = Standard_True;
+    myDrawHiddenLine       = Standard_True;
 }
 
 // =======================================================================
-// function : DimLengthDisplayUnits
+// function : DisableDrawHiddenLine
 // purpose  :
 // =======================================================================
-const TCollection_AsciiString& Prs3d_Drawer::DimLengthDisplayUnits() const
+
+void Prs3d_Drawer::DisableDrawHiddenLine()
 {
-  return myDimensionDisplayUnits.GetLengthUnits();
+    myHasOwnDrawHiddenLine = Standard_True;
+    myDrawHiddenLine       = Standard_False;
 }
 
 // =======================================================================
-// function : DimAngleDisplayUnits
+// function : VectorAspect
 // purpose  :
 // =======================================================================
-const TCollection_AsciiString& Prs3d_Drawer::DimAngleDisplayUnits() const
+
+const Handle(Prs3d_LineAspect)& Prs3d_Drawer::VectorAspect()
 {
-  return myDimensionDisplayUnits.GetAngleUnits();
+  if (!HasOwnVectorAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->VectorAspect();
+    }
+    if (myVectorAspect.IsNull())
+    {
+      myVectorAspect = new Prs3d_LineAspect (Quantity_NOC_SKYBLUE, Aspect_TOL_SOLID, 1.0);
+    }
+  }
+  return myVectorAspect;
 }
 
 // =======================================================================
-// function : SectionAspect
+// function : SetVectorAspect
 // purpose  :
 // =======================================================================
-Handle (Prs3d_LineAspect) Prs3d_Drawer::SectionAspect()
-{
-  if (mySectionAspect.IsNull())
-  {
-    mySectionAspect = new Prs3d_LineAspect (Quantity_NOC_ORANGE, Aspect_TOL_SOLID, 1.0);
-  }
 
-  return mySectionAspect;
+void Prs3d_Drawer::SetVectorAspect (const Handle(Prs3d_LineAspect)& theAspect)
+{
+  myVectorAspect = theAspect;
+  myHasOwnVectorAspect = !myVectorAspect.IsNull();
 }
 
 // =======================================================================
-// function : SetSectionAspect
+// function : SetVertexDrawMode
 // purpose  :
 // =======================================================================
-void Prs3d_Drawer::SetSectionAspect (const Handle(Prs3d_LineAspect)& theAspect)
+
+void Prs3d_Drawer::SetVertexDrawMode (const Prs3d_VertexDrawMode theMode)
 {
-  mySectionAspect = theAspect;
+  // Prs3d_VDM_Inherited is default value and means
+  // that correct value should be taken from the Link if it exists.
+  myVertexDrawMode = theMode;
 }
 
 // =======================================================================
-// function : SetFaceBoundaryDraw
+// function : VertexDrawMode
 // purpose  :
 // =======================================================================
-void Prs3d_Drawer::SetFaceBoundaryDraw (const Standard_Boolean theIsEnabled)
+
+Prs3d_VertexDrawMode Prs3d_Drawer::VertexDrawMode()
 {
-  myFaceBoundaryDraw = theIsEnabled;
+  if (!HasOwnVertexDrawMode())
+  {
+      if (!myLink.IsNull())
+      {
+          return myLink->VertexDrawMode();
+      }
+      // Prs3d_VDM_Isolated is default value for this setting.
+      myVertexDrawMode = Prs3d_VDM_Isolated;
+  }
+  return myVertexDrawMode;
 }
 
 // =======================================================================
-// function : IsFaceBoundaryDraw
+// function : DatumAspect
 // purpose  :
 // =======================================================================
-Standard_Boolean Prs3d_Drawer::IsFaceBoundaryDraw () const
+
+const Handle(Prs3d_DatumAspect)& Prs3d_Drawer::DatumAspect()
 {
-  return myFaceBoundaryDraw;
+  if (!HasOwnDatumAspect())
+  {
+    if (!myLink.IsNull())
+    {
+      return myLink->DatumAspect();
+    }
+    if (myDatumAspect.IsNull())
+    {
+      myDatumAspect = new Prs3d_DatumAspect();
+    }
+  }
+  return myDatumAspect;
 }
 
 // =======================================================================
-// function : SetFaceBoundaryAspect
+// function : SetDatumAspect
 // purpose  :
 // =======================================================================
-void Prs3d_Drawer::SetFaceBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect)
+
+void Prs3d_Drawer::SetDatumAspect (const Handle(Prs3d_DatumAspect)& theAspect)
 {
-  myFaceBoundaryAspect = theAspect;
+  myDatumAspect = theAspect;
+  myHasOwnDatumAspect = !myDatumAspect.IsNull();
 }
 
 // =======================================================================
-// function : FaceBoundaryAspect
+// function : SectionAspect
 // purpose  :
 // =======================================================================
-Handle(Prs3d_LineAspect) Prs3d_Drawer::FaceBoundaryAspect ()
+
+const Handle(Prs3d_LineAspect)& Prs3d_Drawer::SectionAspect()
 {
-  if (myFaceBoundaryAspect.IsNull ())
+  if (!HasOwnSectionAspect())
   {
-    myFaceBoundaryAspect = 
-      new Prs3d_LineAspect (Quantity_NOC_BLACK, Aspect_TOL_SOLID, 1.0);
+    if (!myLink.IsNull())
+    {
+      return myLink->SectionAspect();
+    }
+    if (mySectionAspect.IsNull())
+    {
+      mySectionAspect = new Prs3d_LineAspect (Quantity_NOC_ORANGE, Aspect_TOL_SOLID, 1.0);
+    }
   }
-
-  return myFaceBoundaryAspect;
+  return mySectionAspect;
 }
 
 // =======================================================================
-// function : SetTypeOfHLR
-// purpose  : set type of HLR algorithm
+// function : SetSectionAspect
+// purpose  :
 // =======================================================================
-void Prs3d_Drawer::SetTypeOfHLR ( const Prs3d_TypeOfHLR theTypeOfHLR) 
+
+void Prs3d_Drawer::SetSectionAspect (const Handle(Prs3d_LineAspect)& theAspect)
 {
-  myTypeOfHLR = theTypeOfHLR;
+  mySectionAspect = theAspect;
+  myHasOwnSectionAspect = !mySectionAspect.IsNull();
 }
 
 // =======================================================================
-// function : TypeOfHLR
-// purpose  : gets type of HLR algorithm
+// function : SetSectionAspect
+// purpose  :
 // =======================================================================
-Prs3d_TypeOfHLR Prs3d_Drawer::TypeOfHLR ( ) const
+
+void Prs3d_Drawer::ClearLocalAttributes()
 {
-  return myTypeOfHLR;
+  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;
+  myHasOwnWireDraw                = Standard_False;
+  myHasOwnShadingAspectGlobal     = 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;
 }