]> OCCT Git - occt-copy.git/commitdiff
0030268: Inspectors - improvements in VInspector plugin
authornds <nds@opencascade.com>
Fri, 1 Nov 2019 05:06:34 +0000 (08:06 +0300)
committernds <nds@opencascade.com>
Fri, 1 Nov 2019 05:06:34 +0000 (08:06 +0300)
# Dump for OCCT objects

43 files changed:
src/AIS/AIS_InteractiveContext.hxx
src/AIS/AIS_InteractiveContext_3.cxx
src/Graphic3d/Graphic3d_AspectFillCapping.cxx
src/Graphic3d/Graphic3d_AspectFillCapping.hxx
src/Graphic3d/Graphic3d_Aspects.cxx
src/Graphic3d/Graphic3d_BSDF.cxx
src/Graphic3d/Graphic3d_BSDF.hxx
src/Graphic3d/Graphic3d_ClipPlane.cxx
src/Graphic3d/Graphic3d_HatchStyle.cxx
src/Graphic3d/Graphic3d_HatchStyle.hxx
src/Graphic3d/Graphic3d_MaterialAspect.cxx
src/Graphic3d/Graphic3d_MaterialAspect.hxx
src/Graphic3d/Graphic3d_TransformPers.cxx
src/NCollection/NCollection_Buffer.hxx
src/NCollection/NCollection_Vec3.hxx
src/NCollection/NCollection_Vec4.hxx
src/OpenGl/OpenGl_CappingAlgo.cxx
src/Prs3d/Prs3d_Drawer.cxx
src/Select3D/Select3D_InteriorSensitivePointSet.hxx
src/Select3D/Select3D_SensitiveBox.cxx
src/Select3D/Select3D_SensitiveBox.hxx
src/Select3D/Select3D_SensitiveFace.cxx
src/Select3D/Select3D_SensitiveFace.hxx
src/Select3D/Select3D_SensitiveGroup.cxx
src/Select3D/Select3D_SensitiveGroup.hxx
src/Select3D/Select3D_SensitivePoint.cxx
src/Select3D/Select3D_SensitivePoint.hxx
src/Select3D/Select3D_SensitivePoly.cxx
src/Select3D/Select3D_SensitivePoly.hxx
src/Select3D/Select3D_SensitivePrimitiveArray.cxx
src/Select3D/Select3D_SensitivePrimitiveArray.hxx
src/Select3D/Select3D_SensitiveSegment.cxx
src/Select3D/Select3D_SensitiveSegment.hxx
src/Select3D/Select3D_SensitiveSet.cxx
src/Select3D/Select3D_SensitiveSet.hxx
src/Select3D/Select3D_SensitiveTriangle.cxx
src/Select3D/Select3D_SensitiveTriangle.hxx
src/Select3D/Select3D_SensitiveTriangulation.cxx
src/Select3D/Select3D_SensitiveTriangulation.hxx
src/Select3D/Select3D_SensitiveWire.hxx
src/TopoDS/TopoDS_TShape.cxx
tools/VInspector/VInspector_ItemContext.cxx
tools/VInspector/VInspector_ItemContext.hxx

index eb0438553e908e384ebb7ba4e6f543b865d897bd..f405b19a27b6acbba8e3222bf3027955709f5be0 100644 (file)
@@ -1242,6 +1242,9 @@ public: //! @name sub-intensity management (deprecated)
   //! @param theSelection an instance of the selection
   void SetSelection (const Handle(AIS_Selection)& theSelection) { mySelection = theSelection; }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+
 protected: //! @name internal methods
 
   Standard_EXPORT void GetDefModes (const Handle(AIS_InteractiveObject)& anIobj, Standard_Integer& Dmode, Standard_Integer& HiMod, Standard_Integer& SelMode) const;
index 6f7840e5fd9c405456ba27ccc65f37039327fa72..aca027cff5a2bf6d377ad0fb2c5b5db9ad2fbbfe 100644 (file)
@@ -86,3 +86,42 @@ void AIS_InteractiveContext::PolygonOffsets(
     anObj->PolygonOffsets( aMode, aFactor, aUnits );
 }
 // OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets 
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void AIS_InteractiveContext::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, AIS_InteractiveContext);
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myObjects.Size());
+
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, mgrSelector.get());
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainPM.get());
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainVwr.get());
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMainSel.get());
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myLastActiveView);
+
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myLastPicked.get());
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToHilightSelected);
+
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, mySelection.get());
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myFilters.get());
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myDefaultDrawer.get());
+
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_Selected]);
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_Dynamic]);
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_LocalSelected]);
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_LocalDynamic]);
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStyles[Prs3d_TypeOfHighlight_SubIntensity]);
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDetectedSeq.Size());
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurDetected);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurHighlighted);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPickingStrategy);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAutoHilight);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsAutoActivateSelMode);
+}
index 3f6bff80428e05011a8830a19737d21d037b4edd..153f5e055232acd3e728b8ae992f79112bc79d5f 100644 (file)
@@ -108,3 +108,27 @@ void Graphic3d_AspectFillCapping::SetHatchRotationPeristent (const Standard_Bool
   setFlag (theToSet, Flags_HatchRotationPersistent);
   myHatchingState++;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Graphic3d_AspectFillCapping::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_AspectFillCapping);
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Graphic3d_Aspects);
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myMaterial);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myMaterial);
+
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myTexture);
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myShader);
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myStippleHatch);
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myTextureHatch);
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myHatchMaterial);
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFlags);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHatchingState);
+}
index 7df72d60a62ba1a34bbb9075f3a8d94374231c40..d37088dfb1de71e067dd757d584d519351db98fa 100644 (file)
@@ -121,6 +121,9 @@ public:
   //! Returns modification counter for hatching state.
   Standard_Size HatchingState() const { return myHatchingState; }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+
 private:
 
   enum Flags
index 667b7732e0c54847884ff8cca5cb345316399844..00f86b95f6dabb5a2af1e7f33280974f350c4fa3 100644 (file)
@@ -70,6 +70,14 @@ void Graphic3d_Aspects::DumpJson (Standard_OStream& theOStream, const Standard_I
 {
   OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_Aspects);
 
+  /*Handle(Graphic3d_ShaderProgram)  myProgram;
+  Handle(Graphic3d_TextureSet)     myTextureSet;
+  Handle(Graphic3d_MarkerImage)    myMarkerImage;
+  Handle(Graphic3d_HatchStyle)     myHatchStyle;
+  Handle(TCollection_HAsciiString) myTextFont;
+  Graphic3d_MaterialAspect         myFrontMaterial;
+  Graphic3d_MaterialAspect         myBackMaterial;*/
+
   OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myInteriorColor);
   OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBackInteriorColor);
   OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myEdgeColor);
@@ -82,4 +90,23 @@ void Graphic3d_Aspects::DumpJson (Standard_OStream& theOStream, const Standard_I
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToSuppressBackFaces);
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myToMapTexture);
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsTextZoomable);
+
+  /*Aspect_InteriorStyle       myInteriorStyle;
+  Graphic3d_TypeOfShadingModel myShadingModel;
+  Graphic3d_AlphaMode          myAlphaMode;
+  Standard_ShortReal           myAlphaCutoff;
+
+  Aspect_TypeOfLine            myLineType;
+  Standard_ShortReal           myLineWidth;
+
+  Aspect_TypeOfMarker          myMarkerType;
+  Standard_ShortReal           myMarkerScale;*/
+
+  if (!myTextFont.IsNull())
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myTextFont->String());
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTextStyle);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTextDisplayType);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTextFontAspect);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTextAngle);
 }
index 4421e9c2d52a6a6a1a782cad3d36bdae134e3a8a..3958bec3097ea9ec029732ff7ed5c0f8ef184421 100644 (file)
@@ -58,6 +58,18 @@ Graphic3d_Fresnel Graphic3d_Fresnel::CreateConductor (const Graphic3d_Vec3& theR
   return Graphic3d_Fresnel (Graphic3d_FM_SCHLICK, aFresnel);
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Graphic3d_Fresnel::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_Fresnel);
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFresnelType);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myFresnelData);
+}
+
 // =======================================================================
 // function : Graphic3d_BSDF
 // purpose  :
@@ -189,4 +201,23 @@ Graphic3d_BSDF Graphic3d_BSDF::CreateGlass (const Graphic3d_Vec3& theWeight,
                                      theAbsorptionCoeff);
 
   return aBSDF;
-}
\ No newline at end of file
+}
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Graphic3d_BSDF::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_BSDF);
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Kc);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Kd);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Ks);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Kt);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Le);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &Absorption);
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &FresnelCoat);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &FresnelBase);
+}
index 7919089dd971c50641ea8d1360efd4b235a42019..6e750209ea5809ef0f9a0678624aa9dd4b3b1ff9 100644 (file)
@@ -87,6 +87,9 @@ public:
     return myFresnelType;
   }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+
 protected:
 
   //! Creates new Fresnel reflectance factor.
@@ -180,6 +183,9 @@ public:
   //! Performs comparison of two BSDFs.
   Standard_EXPORT bool operator== (const Graphic3d_BSDF& theOther) const;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+
 };
 
 #endif // _Graphic3d_BSDF_HeaderFile
index 68201177a29272b70fbf56efb5b807e7ff1624b7..6c13e479a04d7168afb954d4ee6797cafdcdc4aa 100755 (executable)
@@ -281,6 +281,8 @@ void Graphic3d_ClipPlane::SetChainNextPlane (const Handle(Graphic3d_ClipPlane)&
 // =======================================================================
 void Graphic3d_ClipPlane::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_ClipPlane);
+
   OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySectionStyle.get());
 
   OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myEntityUID);
index ebf108cfe2f37bbd4cf316604998c08a091ac388..5990a189a1772403f77e90c48d3429d6256b6d0f 100644 (file)
@@ -516,3 +516,15 @@ const Standard_Byte* Graphic3d_HatchStyle::Pattern() const
       ? (const Standard_Byte*)myPredefinedPatterns[myHatchType]
       : NULL);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Graphic3d_HatchStyle::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_HatchStyle);
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPattern.get());
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHatchType);
+}
index c29a3ab03d817fa0f898cdb4b6e1d75f5eb0a245..b79b03e89e932a43bc9285cb926ebfd2268ea1a3 100644 (file)
@@ -49,6 +49,9 @@ public:
     return myHatchType;
   }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+
 private:
 
   Handle(NCollection_Buffer) myPattern;   //!< Image bitmap with custom hatch pattern
index 9e9624be2d22e72c5a8d560c3a3ada10ec0f39db..54c7f0a354e673da0da4d015b76e53e8c7d2b29a 100644 (file)
@@ -702,3 +702,28 @@ Graphic3d_TypeOfMaterial Graphic3d_MaterialAspect::MaterialType (const Standard_
   const RawMaterial& aMat = THE_MATERIALS[theRank - 1];
   return aMat.MaterialType;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Graphic3d_MaterialAspect::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
+{
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_MaterialAspect);
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBSDF);
+  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myStringName);
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColors[Graphic3d_TOR_AMBIENT]);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColors[Graphic3d_TOR_DIFFUSE]);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColors[Graphic3d_TOR_SPECULAR]);
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColors[Graphic3d_TOR_EMISSION]);
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTransparencyCoef);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRefractionIndex);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myShininess);
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMaterialType);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMaterialName);
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRequestedMaterialName);
+}
index 99d25eac7d1dfa93842b84ca1af654ad4dc0e793..5ed2436ac98e5957238de7171b2b6e873732a6f2 100644 (file)
@@ -227,6 +227,9 @@ public:
     }
   }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+
 private:
 
   //! Initialize the standard material.
index 4fe9e7cac67ae7137a48949efebedece0940eff9..87e18d494d45e843a86a000860431ce719755d0f 100644 (file)
@@ -58,6 +58,8 @@ Handle(Graphic3d_TransformPers) Graphic3d_TransformPers::FromDeprecatedParams (G
 // =======================================================================
 void Graphic3d_TransformPers::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
 {
+  OCCT_DUMP_CLASS_BEGIN (theOStream, Graphic3d_TransformPers);
+
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMode)
 
   OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "Params3d", 3, myParams.Params3d.PntX, myParams.Params3d.PntY, myParams.Params3d.PntZ)
index b51e514a4ee4b0cedca5514cbfdb087ccd8c85d1..aca2b7d1b02c53833c7597ba9be648fc71a5f4eb 100644 (file)
@@ -17,6 +17,7 @@
 #define _NCollection_Buffer_HeaderFile
 
 #include <NCollection_BaseAllocator.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_Transient.hxx>
 
 //! Low-level buffer object.
@@ -122,6 +123,15 @@ public:
     mySize = 0;
   }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const
+  {
+    (void)theDepth;
+    OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myData);
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySize);
+    OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myAllocator.get());
+  }
+
 protected:
 
   Standard_Byte*                    myData;      //!< data pointer
index fc2b48155b0d68b92f78e8ac37778a97de813c02..c9230c582e658302acdb9de413a7b355da16ff50 100644 (file)
@@ -18,6 +18,7 @@
 #include <cstring>
 #include <cmath>
 #include <NCollection_Vec2.hxx>
+#include <Standard_Dump.hxx>
 
 //! Auxiliary macros to define couple of similar access components as vector methods
 #define NCOLLECTION_VEC_COMPONENTS_3D(theX, theY, theZ) \
@@ -403,6 +404,13 @@ public:
     return NCollection_Vec3 (Element_t(0), Element_t(0), Element_t(1));
   }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const
+  {
+    (void)theDepth;
+    OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "Vec3", 3, v[0], v[1], v[2]);
+  }
+
 private:
 
   Element_t v[3]; //!< define the vector as array to avoid structure alignment issues
index b3c84aea9a38256fe8684c8f79506657cc82cd4e..1be616fa31de1b77dd0364e9dcb4b81999e19b77 100644 (file)
@@ -16,6 +16,7 @@
 #define _NCollection_Vec4_H__
 
 #include <NCollection_Vec3.hxx>
+#include <Standard_Dump.hxx>
 
 //! Generic 4-components vector.
 //! To be used as RGBA color vector or XYZW 3D-point with special W-component
@@ -375,6 +376,13 @@ public:
     return aResult /= theRight;
   }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const
+  {
+    (void)theDepth;
+    OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "Vec4", 4, v[0], v[1], v[2], v[3]);
+  }
+
 private:
 
   Element_t v[4]; //!< define the vector as array to avoid structure alignment issues
index 1d77c45ca5ac787c8c3cbfc960c02d74f253e012..377f87023507ee8394e4d2c5039068b633124fe5 100755 (executable)
@@ -341,9 +341,14 @@ namespace
 // function : RenderCapping
 // purpose  :
 // =======================================================================
+#include <Message_Alerts.hxx>
+#include <Message_PerfMeter.hxx>
 void OpenGl_CappingAlgo::RenderCapping (const Handle(OpenGl_Workspace)& theWorkspace,
                                         const OpenGl_Structure&         theStructure)
 {
+  Message_PerfMeter aPerfMeter;
+  MESSAGE_INFO ("RenderCapping", "", &aPerfMeter, NULL);
+
   const Handle(OpenGl_Context)& aContext = theWorkspace->GetGlContext();
   if (!aContext->Clipping().IsCappingOn())
   {
@@ -380,12 +385,17 @@ void OpenGl_CappingAlgo::RenderCapping (const Handle(OpenGl_Workspace)& theWorks
   {
     // get plane being rendered
     const Handle(Graphic3d_ClipPlane)& aClipChain = aCappingIt.Value();
+
     if (!aClipChain->IsCapping()
       || aCappingIt.IsDisabled())
     {
       continue;
     }
 
+    Standard_SStream aStream;
+    aClipChain->DumpJson (aStream);
+    MESSAGE_INFO_STREAM(aStream, "ClipChain", "", &aPerfMeter, NULL);
+
     Standard_Integer aSubPlaneIndex = 1;
     for (const Graphic3d_ClipPlane* aSubPlaneIter = aClipChain.get(); aSubPlaneIter != NULL; aSubPlaneIter = aSubPlaneIter->ChainNextPlane().get(), ++aSubPlaneIndex)
     {
index a03fa3d36f5fef4536d946886a0b0bfc5b025bd8..8af632626e63c3bf9017234debb3c01f92ddf045 100644 (file)
@@ -1443,4 +1443,102 @@ void Prs3d_Drawer::DumpJson (Standard_OStream& theOStream, const Standard_Intege
 {
   OCCT_DUMP_CLASS_BEGIN (theOStream, Prs3d_Drawer);
   OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myShadingAspect.get());
+
+  //Handle(Prs3d_Drawer)          myLink;
+  /*
+  Standard_Boolean              myHasOwnNbPoints;
+  Standard_Real                 myMaximalParameterValue;
+  Standard_Boolean              myHasOwnMaximalParameterValue;
+  Standard_Real                 myChordialDeviation;
+  Standard_Boolean              myHasOwnChordialDeviation;
+  Aspect_TypeOfDeflection       myTypeOfDeflection;
+  Standard_Boolean              myHasOwnTypeOfDeflection;
+  Prs3d_TypeOfHLR               myTypeOfHLR;
+  Standard_Real                 myDeviationCoefficient;
+  Standard_Real                 myPreviousDeviationCoefficient;
+  Standard_Boolean              myHasOwnDeviationCoefficient;
+  Standard_Real                 myHLRDeviationCoefficient;
+  Standard_Boolean              myHasOwnHLRDeviationCoefficient;
+  Standard_Real                 myPreviousHLRDeviationCoefficient;
+  Standard_Real                 myDeviationAngle;
+  Standard_Boolean              myHasOwnDeviationAngle;
+  Standard_Real                 myPreviousDeviationAngle;
+  Standard_Real                 myHLRAngle;
+  Standard_Boolean              myHasOwnHLRDeviationAngle;
+  Standard_Real                 myPreviousHLRDeviationAngle;
+  Standard_Boolean              myIsoOnPlane;
+  Standard_Boolean              myHasOwnIsoOnPlane;
+  Standard_Boolean              myIsoOnTriangulation;
+  Standard_Boolean              myHasOwnIsoOnTriangulation;
+  Standard_Boolean              myIsAutoTriangulated;
+  Standard_Boolean              myHasOwnIsAutoTriangulated;*/
+
+  /*Handle(Prs3d_IsoAspect)       myUIsoAspect;
+  Standard_Boolean              myHasOwnUIsoAspect;
+  Handle(Prs3d_IsoAspect)       myVIsoAspect;
+  Standard_Boolean              myHasOwnVIsoAspect;
+  Handle(Prs3d_LineAspect)      myWireAspect;
+  Standard_Boolean              myHasOwnWireAspect;
+  Standard_Boolean              myWireDraw;
+  Standard_Boolean              myHasOwnWireDraw;
+  Handle(Prs3d_PointAspect)     myPointAspect;
+  Standard_Boolean              myHasOwnPointAspect;
+  Handle(Prs3d_LineAspect)      myLineAspect;
+  Standard_Boolean              myHasOwnLineAspect;
+  */
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnTextAspect);
+  if (!myTextAspect.IsNull())
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTextAspect.get());
+
+  //Handle(Prs3d_ShadingAspect)   myShadingAspect;
+  //Standard_Boolean              myHasOwnShadingAspect;
+
+  /*Handle(Prs3d_PlaneAspect)     myPlaneAspect;
+  Standard_Boolean              myHasOwnPlaneAspect;
+  Handle(Prs3d_LineAspect)      mySeenLineAspect;
+  Standard_Boolean              myHasOwnSeenLineAspect;
+  Handle(Prs3d_ArrowAspect)     myArrowAspect;
+  Standard_Boolean              myHasOwnArrowAspect;
+  Standard_Boolean              myLineArrowDraw;
+  Standard_Boolean              myHasOwnLineArrowDraw;
+  Handle(Prs3d_LineAspect)      myHiddenLineAspect;
+  Standard_Boolean              myHasOwnHiddenLineAspect;
+  Standard_Boolean              myDrawHiddenLine;
+  Standard_Boolean              myHasOwnDrawHiddenLine;
+  Handle(Prs3d_LineAspect)      myVectorAspect;
+  Standard_Boolean              myHasOwnVectorAspect;
+  Prs3d_VertexDrawMode          myVertexDrawMode;
+  Handle(Prs3d_DatumAspect)     myDatumAspect;
+  Standard_Boolean              myHasOwnDatumAspect;
+  Handle(Prs3d_LineAspect)      mySectionAspect;
+  Standard_Boolean              myHasOwnSectionAspect;
+
+  Handle(Prs3d_LineAspect)      myFreeBoundaryAspect;
+  Standard_Boolean              myHasOwnFreeBoundaryAspect;
+  Standard_Boolean              myFreeBoundaryDraw;
+  Standard_Boolean              myHasOwnFreeBoundaryDraw;
+  Handle(Prs3d_LineAspect)      myUnFreeBoundaryAspect;
+  Standard_Boolean              myHasOwnUnFreeBoundaryAspect;
+  Standard_Boolean              myUnFreeBoundaryDraw;
+  Standard_Boolean              myHasOwnUnFreeBoundaryDraw;
+  Handle(Prs3d_LineAspect)      myFaceBoundaryAspect;
+  Standard_Integer              myFaceBoundaryUpperContinuity; //!< the most edge continuity class (GeomAbs_Shape) to be included to face boundaries presentation, or -1 if undefined
+  Standard_Boolean              myHasOwnFaceBoundaryAspect;
+  Standard_Boolean              myFaceBoundaryDraw;
+  Standard_Boolean              myHasOwnFaceBoundaryDraw;
+
+  Handle(Prs3d_DimensionAspect) myDimensionAspect;
+  Standard_Boolean              myHasOwnDimensionAspect;
+  Prs3d_DimensionUnits          myDimensionModelUnits;
+  Standard_Boolean              myHasOwnDimLengthModelUnits;
+  Standard_Boolean              myHasOwnDimAngleModelUnits;
+  Prs3d_DimensionUnits          myDimensionDisplayUnits;
+  Standard_Boolean              myHasOwnDimLengthDisplayUnits;
+  Standard_Boolean              myHasOwnDimAngleDisplayUnits;
+  */
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnFillCappingAspect);
+  if (!myFillCappingAspect.IsNull())
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myFillCappingAspect.get());
 }
index 0cb2fe615a5c34b668cb1118387d6e4f054fdd31..6f9d7ebd5be85806073a96f4d665809c8eb09145 100644 (file)
@@ -71,7 +71,7 @@ public:
   Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
   DEFINE_STANDARD_RTTIEXT(Select3D_InteriorSensitivePointSet,Select3D_SensitiveSet)
 
index 81f0bdb0858ea193f7d34c8bed84c3068b00b036..bef2dd1b84a72e5f9a4dab397d2b563e5d5df929 100644 (file)
@@ -128,6 +128,7 @@ Select3D_BndBox3d Select3D_SensitiveBox::BoundingBox()
 void Select3D_SensitiveBox::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
   OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitiveBox);
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity);
 
   OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBox);
   OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCenter3d);
index 36515f2b41445412dcb676508e94065abf3c362a..cb735264c2a9d7be51b7d0179f56379a88728126 100644 (file)
@@ -71,7 +71,7 @@ public:
   Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 private:
 
index 4ad62a1044411fd66f3c6264ff0dcddb10263652..6feff18373fcfcda1cda37a1f17d6b87c7289923 100644 (file)
@@ -151,6 +151,7 @@ Standard_Integer Select3D_SensitiveFace::NbSubElements()
 void Select3D_SensitiveFace::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
   OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitiveFace);
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity);
 
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySensType);
   OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myFacePoints.get());
index 5fdf9f27b5feb037a25275372a891c78ccfab86f..2a0af16113004d4037e11c4104ead6bc0677b48a 100644 (file)
@@ -74,7 +74,7 @@ public:
   Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 private:
 
index b3571adcbf35d63b65062725878098c865eafb6e..89c5e12cbf987d1b43f0913850a7bb9712b95c9d 100644 (file)
@@ -369,7 +369,6 @@ Standard_Real Select3D_SensitiveGroup::distanceToCOG (SelectBasics_SelectingVolu
 void Select3D_SensitiveGroup::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
   OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitiveGroup);
-
   OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveSet);
 
   for (Select3D_IndexedMapOfEntity::Iterator anIterator (myEntities); anIterator.More(); anIterator.Next())
index 3b6f28a2397e9442288d3b70922202700992c7cd..307d6a6c585e42607f1958a8517853402acbb6da 100644 (file)
@@ -144,7 +144,7 @@ public:
   Standard_EXPORT virtual Standard_Integer Size() const Standard_OVERRIDE;
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 protected:
 
index a995296a88b7be1e0ff8beee3b5d770bcf538f83..72facedce07c1cb1cffbff692a14bd1d5a706ee5 100644 (file)
@@ -93,6 +93,7 @@ Standard_Integer Select3D_SensitivePoint::NbSubElements()
 void Select3D_SensitivePoint::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
   OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitivePoint);
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity);
 
   OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPoint);
 }
index c45c129ddb7f3645c72a0a4093f1f052ff193d45..5906c5181dc742f07217bae4e1c1a273eeea780a 100644 (file)
@@ -51,7 +51,7 @@ public:
   Standard_EXPORT virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE;
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 private:
 
index 37c79bcde67c7c5949b4bec3397bdb565ecae236..80d6ab40867969b3eff52def7ead471ae186c184 100644 (file)
@@ -318,7 +318,6 @@ gp_Pnt Select3D_SensitivePoly::CenterOfGeometry() const
 void Select3D_SensitivePoly::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
   OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitivePoly);
-
   OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveSet);
 
   //Select3D_PointData              myPolyg;              //!< Points of the poly
index 120db6a2d28bffaa245a97ce056f412fafba7190..7b71d10920163480f94abb78e5e35e7c0d666e6b 100644 (file)
@@ -93,7 +93,7 @@ public:
                                      const Standard_Integer theIdx2) Standard_OVERRIDE;
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 protected:
 
index 220c9a429fee850e13a075b3ccddae599ae9479a..897035ad2f7a2a9bfa6cf07bd54e4c384a09a6dc 100644 (file)
@@ -1226,7 +1226,6 @@ Standard_Boolean Select3D_SensitivePrimitiveArray::elementIsInside (SelectBasics
 void Select3D_SensitivePrimitiveArray::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
   OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitivePrimitiveArray);
-
   OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveSet);
 
   //Handle(Select3D_PrimArraySubGroupArray) myGroups;         //!< sub-groups of sensitive entities
index a78ac8033737806ec4b662727b04f8a21bfb2fc0..b06a1a269aa655b994b5816961b929cdb337d625 100644 (file)
@@ -198,7 +198,7 @@ public:
   Standard_Integer LastDetectedEdgeNode2() const { return myDetectedEdgeNode2; }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 public:
 
index 24b19e4d0a1cf0a81cf76d8dbfd215f9c678077c..7d707139cce171f07f6daca4c6551baa56831010 100644 (file)
@@ -110,6 +110,7 @@ Standard_Integer Select3D_SensitiveSegment::NbSubElements()
 void Select3D_SensitiveSegment::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
   OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitiveSegment);
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity);
 
   OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myStart);
   OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myEnd);
index e4bf0a7990bd80247f1865f8110d0f06d61b062a..17ff4c3b96f45252be3a6930234c5bd5fb8d63ad 100644 (file)
@@ -71,7 +71,7 @@ public:
   void EndPoint (const gp_Pnt& thePnt) { myEnd = thePnt; }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 private:
 
index f9ff7ff1717c46ed26d67305b9b027258da97686..bb1f80ab2d2ab5b39cac044c775d5a31acb5f2a7 100644 (file)
@@ -237,9 +237,10 @@ void Select3D_SensitiveSet::Clear()
 //function : DumpJson
 //purpose  :
 //=======================================================================
-void Select3D_SensitiveSet::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const
+void Select3D_SensitiveSet::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
   OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitiveSet);
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity);
 
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDetectedIdx);
 }
index 6cf1b03ec1af79f3967490026a64a85524be2876..261c4cb315fc49358e18b7b5fce7ff24eef543bb 100644 (file)
@@ -97,7 +97,7 @@ public:
   Standard_Integer GetLeafNodeSize() const { return myContent.Builder()->LeafNodeSize(); }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 protected:
 
index 6eaa8243b112cf5f6160e6f37be7ff054a9cbc2c..c3d0002e2deb7f28245b5ff8c9ec3986b36f0ef0 100644 (file)
@@ -101,6 +101,7 @@ Select3D_BndBox3d Select3D_SensitiveTriangle::BoundingBox()
 void Select3D_SensitiveTriangle::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
   OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitiveTriangle);
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveEntity);
 
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySensType);
 
index e6ad159dcf32f56e71ec91494bf764a796431913..6e0b789769827b8d0537657de0f589059af7e483 100644 (file)
@@ -68,7 +68,7 @@ public:
   virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE { return myCentroid; }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 public:
 
index 4f9ed233275c2a2775710d56ab97ed7539c54699..9bc774af08f65cbc3900afb44b4c8dd9db30569a 100644 (file)
@@ -451,7 +451,6 @@ gp_GTrsf Select3D_SensitiveTriangulation::InvInitLocation() const
 void Select3D_SensitiveTriangulation::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
 {
   OCCT_DUMP_CLASS_BEGIN (theOStream, Select3D_SensitiveTriangulation);
-
   OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Select3D_SensitiveSet);
 
   OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTriangul.get());
index 752504a3187e94fc352a8a5040414c92de574fc5..92ef699d55ef2d810daa0931102b2b1bc4c890f6 100644 (file)
@@ -94,7 +94,7 @@ public:
   const TopLoc_Location& GetInitLocation() const { return myInitLocation; }
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 protected:
 
index 55463188ab39c511f304c9c4ada38f4b98146c6a..eca3ac58e72d814538442c2bf46bbea5f4a5e7f8 100644 (file)
@@ -69,7 +69,7 @@ public:
                                      const Standard_Integer theIdx2) Standard_OVERRIDE;
 
   //! Dumps the content of me into the stream
-  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
   DEFINE_STANDARD_RTTIEXT(Select3D_SensitiveWire,Select3D_SensitiveSet)
 
index 3ae9e1f6b21372acf85d8ca108bc33c03473e0e1..5451b966229be0700630badeed61f141da9e890b 100644 (file)
@@ -29,4 +29,25 @@ void TopoDS_TShape::DumpJson (Standard_OStream& theOStream, const Standard_Integ
 {
   OCCT_DUMP_CLASS_BEGIN (theOStream, TopoDS_TShape);
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFlags);
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, ShapeType());
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, NbChildren());
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Free());
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Free());
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Locked());
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Modified());
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Checked());
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Orientable());
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Closed());
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Infinite());
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Convex());
+
+  //for (TopoDS_ListIteratorOfListOfShape anIterator (myShapes); anIterator.More(); anIterator.Next())
+  //{
+  //  const TopoDS_Shape& subShape = anIterator.Value();
+  //  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &subShape);
+  //}
 }
index decdc4b162d0f8cbfc1ec6118c1971419e0c3854..bf93214995030b8fe2587ec8b367b66353f7ffbd 100644 (file)
@@ -40,7 +40,7 @@ int VInspector_ItemContext::initRowCount() const
   int aNbProperties = 1; // item to visualize Filters/Drawer information of context
 
   int aNbPresentations = 0;
-  Handle(AIS_InteractiveContext) aContext = GetContext();
+  Handle(AIS_InteractiveContext) aContext = Handle(AIS_InteractiveContext)::DownCast (GetObject());
   if (aContext.IsNull())
     return 0;
 
@@ -94,25 +94,59 @@ QVariant VInspector_ItemContext::initValue (const int theItemRole) const
   if (theItemRole != Qt::DisplayRole && theItemRole != Qt::EditRole && theItemRole != Qt::ToolTipRole)
     return QVariant();
 
-  if (GetContext().IsNull())
+  Handle(AIS_InteractiveContext) aContext = Handle(AIS_InteractiveContext)::DownCast (GetObject());
+  if (aContext.IsNull())
     return Column() == 0 ? "Empty context" : "";
 
   switch (Column())
   {
-    case 0: return GetContext()->DynamicType()->Name();
+    case 0: return aContext->DynamicType()->Name();
     case 4:
     {
       Handle(AIS_InteractiveObject) anEmptyIO;
-      int aSelectedCount = VInspector_Tools::SelectedOwners (GetContext(), anEmptyIO, false);
+      int aSelectedCount = VInspector_Tools::SelectedOwners (aContext, anEmptyIO, false);
       return aSelectedCount > 0 ? QString::number (aSelectedCount) : "";
     }
-    case 6: return GetContext()->DeviationCoefficient();
+    case 6: return aContext->DeviationCoefficient();
     default:
       break;
   }
   return QVariant();
 }
 
+// =======================================================================
+// function : Init
+// purpose :
+// =======================================================================
+void VInspector_ItemContext::Init()
+{
+  Handle(AIS_InteractiveContext) aContext = GetContext();
+  if (aContext.IsNull())
+    return;
+
+  TreeModel_ItemBase::Init();
+}
+
+// =======================================================================
+// function : Reset
+// purpose :
+// =======================================================================
+void VInspector_ItemContext::Reset()
+{
+  VInspector_ItemBase::Reset();
+}
+
+// =======================================================================
+// function : initItem
+// purpose :
+// =======================================================================
+void VInspector_ItemContext::initItem() const
+{
+  if (IsInitialized())
+    return;
+  const_cast<VInspector_ItemContext*>(this)->Init();
+}
+
 // =======================================================================
 // function : createChild
 // purpose :
@@ -124,3 +158,16 @@ TreeModel_ItemBasePtr VInspector_ItemContext::createChild (int theRow, int theCo
   else
     return VInspector_ItemPresentableObject::CreateItem (currentItem(), theRow, theColumn);
 }
+
+// =======================================================================
+// function : GetStream
+// purpose :
+// =======================================================================
+void VInspector_ItemContext::GetStream (Standard_OStream& theOStream) const
+{
+  Handle(AIS_InteractiveContext) aContext = GetContext();
+  if (aContext.IsNull())
+    return;
+
+  aContext->DumpJson (theOStream);
+}
index aa693d39c44fafd69156a12fccbe5011ccbbca36..1d3fe7a264010ae84dcaa85c72a09928b3034cf2 100644 (file)
@@ -51,11 +51,21 @@ public:
   //! \return the value
   Standard_EXPORT virtual QVariant initValue (const int theItemRole) const Standard_OVERRIDE;
 
+  //! Returns stream value of the item to fulfill property panel.
+  //! \return stream value or dummy
+  Standard_EXPORT virtual void GetStream (Standard_OStream& theOStream) const Standard_OVERRIDE;
+
+  //! Inits the item, fills internal containers
+  Standard_EXPORT virtual void Init() Standard_OVERRIDE;
+
+  //! Resets cached values
+  Standard_EXPORT virtual void Reset() Standard_OVERRIDE;
+
 protected:
 
   //! Initialize the current item. It creates a backup of the specific item information
   //! Do nothing as context has been already set into item
-  virtual void initItem() const Standard_OVERRIDE {}
+  virtual void initItem() const Standard_OVERRIDE;
 
 protected: