1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0030949: Foundation Classes - Dump improvement for OCCT classes

1. new file Standard_Dump to prepare and parse Dump in JSON format for OCCT objects
2. some presentations cover the proposed dump functionality.
3. 'bounding', 'vaspects' has '-dumpJson' field to see the DumpJson result
4. Bnd_Box constructor with min/max points is implemented to use Dump of this class in Dump BVH_Box
5. Limitation (some classes of Graphic3d, Prs3d has not full filling for DumpJson)
This commit is contained in:
nds
2019-09-19 15:13:42 +03:00
committed by bugmaster
parent c42ef16585
commit 0904aa6395
83 changed files with 1420 additions and 4 deletions

View File

@@ -15,6 +15,8 @@
#include <XCAFPrs_Style.hxx>
#include <Standard_Dump.hxx>
//=======================================================================
//function : XCAFPrs_Style
//purpose :
@@ -67,3 +69,19 @@ void XCAFPrs_Style::UnSetColorCurv()
myHasColorCurv = Standard_False;
myColorCurv.SetValues (Quantity_NOC_YELLOW);
}
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void XCAFPrs_Style::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const
{
DUMP_CLASS_BEGIN (theOStream, XCAFPrs_Style);
DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColorSurf);
DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myColorCurv);
DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasColorSurf);
DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasColorCurv);
DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsVisible);
}

View File

@@ -121,6 +121,9 @@ public:
return theS1.IsEqual (theS2);
}
//! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
protected:
Quantity_ColorRGBA myColorSurf;