1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0031313: Foundation Classes - Dump improvement for classes

- Provide DumpJson for geometrical, ocaf and visualization classes;
- Change depth parameter of DumpJson (constant is not obligate here)
- Introduce a new macro for transient objects to be called as the first row in DumpJson: OCCT_DUMP_TRANSIENT_CLASS_BEGIN. We need not put the class name in the macro, using get_type_name of Standard_Transient for it.
- change implementation of OCCT_DUMP_CLASS_BEGIN and OCCT_DUMP_TRANSIENT_CLASS_BEGIN. It is not an sentry more and it does not create a new hierarchy level. It appends a new row into the output stream: "className": <className>
- OCCT_DUMP_* does not require semicolon
- class header is included first in source files of TDataStd, TDocStd, TCAFDoc
This commit is contained in:
nds 2020-01-28 12:03:38 +03:00 committed by bugmaster
parent 00ea7f2676
commit bc73b00672
532 changed files with 5237 additions and 419 deletions

View File

@ -150,7 +150,8 @@ Steps to prepare dump of the object into json:
1. Create method <b>DumpJson</b>. The method should accept the output stream and the depth for the fields dump. 1. Create method <b>DumpJson</b>. The method should accept the output stream and the depth for the fields dump.
Depth, equal to zero means that only fields of this class should be dumped. Default value -1 means that whole tree of dump will be built recursively calling dump of all fields. Depth, equal to zero means that only fields of this class should be dumped. Default value -1 means that whole tree of dump will be built recursively calling dump of all fields.
2. Put into the first row of the method <b>OCCT_DUMP_CLASS_BEGIN</b>. This macro creates a local variable, that will open Json structure on start, and close on exit from this method. 2. Put into the first row of the method <b>OCCT_DUMP_CLASS_BEGIN</b> or <b>OCCT_DUMP_TRANSIENT_CLASS_BEGIN</b> (for Standard_Transient objects).
This macro appends class name into output stream.
3. Add several macro to store field values. 3. Add several macro to store field values.

View File

@ -1216,6 +1216,9 @@ public: //! @name sub-intensity management (deprecated)
//! @param theSelection an instance of the selection //! @param theSelection an instance of the selection
void SetSelection (const Handle(AIS_Selection)& theSelection) { mySelection = theSelection; } 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, Standard_Integer theDepth = -1) const;
protected: //! @name internal methods protected: //! @name internal methods
Standard_EXPORT void GetDefModes (const Handle(AIS_InteractiveObject)& anIobj, Standard_Integer& Dmode, Standard_Integer& HiMod, Standard_Integer& SelMode) const; Standard_EXPORT void GetDefModes (const Handle(AIS_InteractiveObject)& anIobj, Standard_Integer& Dmode, Standard_Integer& HiMod, Standard_Integer& SelMode) const;

View File

@ -86,3 +86,42 @@ void AIS_InteractiveContext::PolygonOffsets(
anObj->PolygonOffsets( aMode, aFactor, aUnits ); anObj->PolygonOffsets( aMode, aFactor, aUnits );
} }
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets // OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void AIS_InteractiveContext::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
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)
}

View File

@ -148,11 +148,11 @@ void AIS_InteractiveObject::SetAspect(const Handle(Prs3d_BasicAspect)& theAspect
//function : DumpJson //function : DumpJson
//purpose : //purpose :
//======================================================================= //=======================================================================
void AIS_InteractiveObject::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const void AIS_InteractiveObject::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{ {
OCCT_DUMP_CLASS_BEGIN (theOStream, AIS_InteractiveObject); OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, SelectMgr_SelectableObject); OCCT_DUMP_BASE_CLASS (theOStream, theDepth, SelectMgr_SelectableObject)
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myCTXPtr); OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myCTXPtr)
OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myOwner); OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myOwner)
} }

View File

@ -119,7 +119,7 @@ public:
Standard_EXPORT void SetAspect (const Handle(Prs3d_BasicAspect)& anAspect); Standard_EXPORT void SetAspect (const Handle(Prs3d_BasicAspect)& anAspect);
//! Dumps the content of me into the stream //! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
protected: protected:
//! The TypeOfPresention3d means that the interactive object //! The TypeOfPresention3d means that the interactive object

View File

@ -990,3 +990,19 @@ Standard_Boolean AIS_Shape::OwnHLRDeviationAngle ( Standard_Real & anAngle,
aPreviousAngle = myDrawer->PreviousHLRDeviationAngle (); aPreviousAngle = myDrawer->PreviousHLRDeviationAngle ();
return myDrawer->HasOwnHLRDeviationAngle(); return myDrawer->HasOwnHLRDeviationAngle();
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void AIS_Shape::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, AIS_InteractiveObject)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myshape)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myBB)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myInitAng)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCompBB)
}

View File

@ -325,6 +325,9 @@ public:
const TopoDS_Shape& theShape, const TopoDS_Shape& theShape,
const Handle(Prs3d_Drawer)& theDrawer); const Handle(Prs3d_Drawer)& theDrawer);
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
protected: protected:
TopoDS_Shape myshape; //!< shape to display TopoDS_Shape myshape; //!< shape to display

View File

@ -926,3 +926,20 @@ void AIS_Trihedron::updatePrimitives(const Handle(Prs3d_DatumAspect)& theAspect,
myPrimitives.Bind(aPart, aPrims); myPrimitives.Bind(aPart, aPrims);
} }
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void AIS_Trihedron::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, AIS_InteractiveObject)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnSize)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnTextColor)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnArrowColor)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasOwnDatumAspect)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTrihDispMode)
}

View File

@ -219,6 +219,9 @@ protected:
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection, Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSelection,
const Standard_Integer theMode) Standard_OVERRIDE; const Standard_Integer theMode) Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
protected: protected:
//! Creates a sensitive entity for the datum part that will be used in selection owner creation. //! Creates a sensitive entity for the datum part that will be used in selection owner creation.

View File

@ -16,6 +16,7 @@
//AGV 15/10/01 : Add XmlOcaf support; add MessageDriver support //AGV 15/10/01 : Add XmlOcaf support; add MessageDriver support
#include <AppStd_Application.hxx> #include <AppStd_Application.hxx>
#include <Standard_Dump.hxx>
IMPLEMENT_STANDARD_RTTIEXT(AppStd_Application,TDocStd_Application) IMPLEMENT_STANDARD_RTTIEXT(AppStd_Application,TDocStd_Application)
@ -29,3 +30,13 @@ Standard_CString AppStd_Application::ResourcesName() {
return aRes; return aRes;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void AppStd_Application::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDocStd_Application)
}

View File

@ -35,6 +35,9 @@ public:
//! resources //! resources
Standard_EXPORT Standard_CString ResourcesName() Standard_OVERRIDE; Standard_EXPORT Standard_CString ResourcesName() Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
DEFINE_STANDARD_RTTIEXT(AppStd_Application,TDocStd_Application) DEFINE_STANDARD_RTTIEXT(AppStd_Application,TDocStd_Application)
}; };

View File

@ -16,6 +16,7 @@
//AGV 15/10/01 : Add XmlOcaf support; add MessageDriver support //AGV 15/10/01 : Add XmlOcaf support; add MessageDriver support
#include <AppStdL_Application.hxx> #include <AppStdL_Application.hxx>
#include <Standard_Dump.hxx>
IMPLEMENT_STANDARD_RTTIEXT(AppStdL_Application,TDocStd_Application) IMPLEMENT_STANDARD_RTTIEXT(AppStdL_Application,TDocStd_Application)
@ -30,3 +31,13 @@ Standard_CString AppStdL_Application::ResourcesName()
return aRes; return aRes;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void AppStdL_Application::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDocStd_Application)
}

View File

@ -34,6 +34,9 @@ public:
//! resources //! resources
Standard_EXPORT Standard_CString ResourcesName() Standard_OVERRIDE; Standard_EXPORT Standard_CString ResourcesName() Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
DEFINE_STANDARD_RTTIEXT(AppStdL_Application,TDocStd_Application) DEFINE_STANDARD_RTTIEXT(AppStdL_Application,TDocStd_Application)
}; };

View File

@ -92,3 +92,16 @@ Handle(BRep_CurveRepresentation) BRep_Curve3D::Copy() const
C->SetRange(First(), Last()); C->SetRange(First(), Last());
return C; return C;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_Curve3D::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_GCurve)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myCurve.get())
}

View File

@ -54,6 +54,9 @@ public:
//! Return a copy of this representation. //! Return a copy of this representation.
Standard_EXPORT Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE; Standard_EXPORT Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -147,3 +147,20 @@ Handle(BRep_CurveRepresentation) BRep_CurveOn2Surfaces::Copy() const
myContinuity); myContinuity);
return C; return C;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_CurveOn2Surfaces::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface2.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation2)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myContinuity)
}

View File

@ -66,6 +66,9 @@ public:
//! Return a copy of this representation. //! Return a copy of this representation.
Standard_EXPORT Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE; Standard_EXPORT Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -180,4 +180,20 @@ void BRep_CurveOnClosedSurface::Update()
BRep_CurveOnSurface::Update(); BRep_CurveOnSurface::Update();
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_CurveOnClosedSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveOnSurface)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPCurve2.get())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myContinuity)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUV21)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUV22)
}

View File

@ -78,6 +78,9 @@ public:
//! This is called when the range is modified. //! This is called when the range is modified.
Standard_EXPORT virtual void Update() Standard_OVERRIDE; Standard_EXPORT virtual void Update() Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -146,4 +146,20 @@ void BRep_CurveOnSurface::Update()
} }
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_CurveOnSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_GCurve)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUV1)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUV2)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPCurve.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
}

View File

@ -71,6 +71,9 @@ public:
//! This is called when the range is modified. //! This is called when the range is modified.
Standard_EXPORT virtual void Update() Standard_OVERRIDE; Standard_EXPORT virtual void Update() Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -426,3 +426,13 @@ void BRep_CurveRepresentation::Polygon2(const Handle(Poly_Polygon2D)&)
throw Standard_DomainError("BRep_CurveRepresentation"); throw Standard_DomainError("BRep_CurveRepresentation");
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_CurveRepresentation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation)
}

View File

@ -144,6 +144,9 @@ public:
//! Return a copy of this representation. //! Return a copy of this representation.
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const = 0; Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const = 0;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;

View File

@ -46,3 +46,16 @@ void BRep_GCurve::Update()
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_GCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFirst)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLast)
}

View File

@ -57,6 +57,9 @@ public:
//! This is called when the range is modified. //! This is called when the range is modified.
Standard_EXPORT virtual void Update(); Standard_EXPORT virtual void Update();
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -80,4 +80,16 @@ void BRep_PointOnCurve::Curve(const Handle(Geom_Curve)& C)
myCurve = C; myCurve = C;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_PointOnCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PointRepresentation)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurve.get())
}

View File

@ -48,6 +48,9 @@ public:
Standard_EXPORT virtual void Curve (const Handle(Geom_Curve)& C) Standard_OVERRIDE; Standard_EXPORT virtual void Curve (const Handle(Geom_Curve)& C) Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -84,4 +84,16 @@ void BRep_PointOnCurveOnSurface::PCurve(const Handle(Geom2d_Curve)& C)
myPCurve = C; myPCurve = C;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_PointOnCurveOnSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PointRepresentation)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPCurve.get())
}

View File

@ -50,6 +50,9 @@ public:
Standard_EXPORT virtual void PCurve (const Handle(Geom2d_Curve)& C) Standard_OVERRIDE; Standard_EXPORT virtual void PCurve (const Handle(Geom2d_Curve)& C) Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -197,4 +197,15 @@ void BRep_PointRepresentation::Surface(const Handle(Geom_Surface)& )
throw Standard_DomainError("BRep_PointRepresentation"); throw Standard_DomainError("BRep_PointRepresentation");
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_PointRepresentation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myParameter)
}

View File

@ -84,6 +84,9 @@ public:
Standard_EXPORT virtual void Surface (const Handle(Geom_Surface)& S); Standard_EXPORT virtual void Surface (const Handle(Geom_Surface)& S);
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;

View File

@ -56,4 +56,17 @@ void BRep_PointsOnSurface::Surface(const Handle(Geom_Surface)& S)
mySurface = S; mySurface = S;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_PointsOnSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PointRepresentation)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
}

View File

@ -40,6 +40,9 @@ public:
Standard_EXPORT virtual void Surface (const Handle(Geom_Surface)& S) Standard_OVERRIDE; Standard_EXPORT virtual void Surface (const Handle(Geom_Surface)& S) Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -76,3 +76,15 @@ Handle(BRep_CurveRepresentation) BRep_Polygon3D::Copy() const
return P; return P;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_Polygon3D::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon3D.get())
}

View File

@ -50,6 +50,9 @@ public:
//! Return a copy of this representation. //! Return a copy of this representation.
Standard_EXPORT Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE; Standard_EXPORT Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -79,3 +79,16 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnClosedSurface::Copy() const
return P; return P;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_PolygonOnClosedSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PolygonOnSurface)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon2.get())
}

View File

@ -51,6 +51,9 @@ public:
//! Return a copy of this representation. //! Return a copy of this representation.
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE; Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -84,3 +84,15 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnClosedTriangulation::Copy() const
return P; return P;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_PolygonOnClosedTriangulation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PolygonOnTriangulation)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon2.get())
}

View File

@ -51,6 +51,9 @@ public:
//! Return a copy of this representation. //! Return a copy of this representation.
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE; Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -102,3 +102,16 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnSurface::Copy() const
return P; return P;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_PolygonOnSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon2D.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
}

View File

@ -59,6 +59,9 @@ public:
//! Return a copy of this representation. //! Return a copy of this representation.
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE; Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -104,3 +104,17 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnTriangulation::Copy() const
return P; return P;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_PolygonOnTriangulation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTriangulation.get())
}

View File

@ -58,6 +58,9 @@ public:
//! Return a copy of this representation. //! Return a copy of this representation.
Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE; Standard_EXPORT virtual Handle(BRep_CurveRepresentation) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -141,3 +141,22 @@ Handle(TopoDS_TShape) BRep_TEdge::EmptyCopy() const
return TE; return TE;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_TEdge::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TopoDS_TEdge)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFlags)
for (BRep_ListIteratorOfListOfCurveRepresentation itr(myCurves); itr.More(); itr.Next())
{
const Handle(BRep_CurveRepresentation)& aCurveRepresentation = itr.Value();
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aCurveRepresentation.get())
}
}

View File

@ -81,6 +81,9 @@ public:
//! Returns a copy of the TShape with no sub-shapes. //! Returns a copy of the TShape with no sub-shapes.
Standard_EXPORT Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE; Standard_EXPORT Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -50,3 +50,21 @@ Handle(TopoDS_TShape) BRep_TFace::EmptyCopy() const
TF->Tolerance(myTolerance); TF->Tolerance(myTolerance);
return TF; return TF;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_TFace::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TopoDS_TFace)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myTriangulation.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNaturalRestriction)
}

View File

@ -88,6 +88,9 @@ public:
//! The new Face has no triangulation. //! The new Face has no triangulation.
Standard_EXPORT virtual Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE; Standard_EXPORT virtual Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -47,3 +47,21 @@ Handle(TopoDS_TShape) BRep_TVertex::EmptyCopy() const
return TV; return TV;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void BRep_TVertex::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TopoDS_TVertex)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPnt)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance)
for (BRep_ListIteratorOfListOfPointRepresentation itr(myPoints); itr.More(); itr.Next())
{
const Handle(BRep_PointRepresentation)& aPointRepresentation = itr.Value();
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aPointRepresentation.get())
}
}

View File

@ -62,6 +62,9 @@ public:
//! Returns a copy of the TShape with no sub-shapes. //! Returns a copy of the TShape with no sub-shapes.
Standard_EXPORT Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE; Standard_EXPORT Handle(TopoDS_TShape) EmptyCopy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -18,8 +18,9 @@
#include <BVH_Constants.hxx> #include <BVH_Constants.hxx>
#include <BVH_Types.hxx> #include <BVH_Types.hxx>
#include <Standard_ShortReal.hxx> #include <Standard_Macro.hxx>
#include <Standard_Dump.hxx> #include <Standard_Dump.hxx>
#include <Standard_ShortReal.hxx>
#include <limits> #include <limits>
@ -183,11 +184,27 @@ public:
T Center (const Standard_Integer theAxis) const; T Center (const Standard_Integer theAxis) const;
//! Dumps the content of me into the stream //! Dumps the content of me into the stream
void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
{ {
(void)theDepth; (void)theDepth;
OCCT_DUMP_CLASS_BEGIN (theOStream, BVH_Box); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsInited)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsValid());
int n = Min (N, 3);
if (n == 1)
{
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMinPoint[0])
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMinPoint[0])
}
if (n == 2)
{
OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "MinPoint", n, myMinPoint[0], myMinPoint[1])
OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "MaxPoint", n, myMaxPoint[0], myMaxPoint[1])
}
if (n == 3)
{
OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "MinPoint", n, myMinPoint[0], myMinPoint[1], myMinPoint[2])
OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "MaxPoint", n, myMaxPoint[0], myMaxPoint[1], myMaxPoint[2])
}
} }
public: public:

View File

@ -29,10 +29,10 @@ protected:
BVH_TreeBaseTransient() {} BVH_TreeBaseTransient() {}
//! Dumps the content of me into the stream //! Dumps the content of me into the stream
virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const { (void)theOStream; (void)theDepth; } virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const { (void)theOStream; (void)theDepth; }
//! Dumps the content of me into the stream //! Dumps the content of me into the stream
virtual void DumpNode (const int theNodeIndex, Standard_OStream& theOStream, const Standard_Integer theDepth) const virtual void DumpNode (const int theNodeIndex, Standard_OStream& theOStream, Standard_Integer theDepth) const
{ (void)theNodeIndex; (void)theOStream; (void)theDepth; } { (void)theNodeIndex; (void)theOStream; (void)theDepth; }
}; };
@ -186,11 +186,11 @@ public: //! @name methods for accessing serialized tree data
} }
//! Dumps the content of me into the stream //! Dumps the content of me into the stream
virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE
{ {
OCCT_DUMP_CLASS_BEGIN (theOStream, BVH_TreeBase); OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDepth); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDepth)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Length()); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Length())
for (Standard_Integer aNodeIdx = 0; aNodeIdx < Length(); ++aNodeIdx) for (Standard_Integer aNodeIdx = 0; aNodeIdx < Length(); ++aNodeIdx)
{ {
@ -199,20 +199,20 @@ public: //! @name methods for accessing serialized tree data
} }
//! Dumps the content of node into the stream //! Dumps the content of node into the stream
virtual void DumpNode (const int theNodeIndex, Standard_OStream& theOStream, const Standard_Integer theDepth) const Standard_OVERRIDE virtual void DumpNode (const int theNodeIndex, Standard_OStream& theOStream, Standard_Integer theDepth) const Standard_OVERRIDE
{ {
OCCT_DUMP_CLASS_BEGIN (theOStream, BVH_TreeNode); OCCT_DUMP_CLASS_BEGIN (theOStream, BVH_TreeNode)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, theNodeIndex); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, theNodeIndex)
Bnd_Box aBndBox = BVH::ToBndBox (MinPoint (theNodeIndex), MaxPoint (theNodeIndex)); Bnd_Box aBndBox = BVH::ToBndBox (MinPoint (theNodeIndex), MaxPoint (theNodeIndex));
Bnd_Box* aPointer = &aBndBox; Bnd_Box* aPointer = &aBndBox;
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aPointer); OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aPointer)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, BegPrimitive (theNodeIndex)); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, BegPrimitive (theNodeIndex))
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, EndPrimitive (theNodeIndex)); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, EndPrimitive (theNodeIndex))
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Level (theNodeIndex)); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Level (theNodeIndex))
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsOuter (theNodeIndex)); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsOuter (theNodeIndex))
} }
public: //! @name protected fields public: //! @name protected fields

View File

@ -975,13 +975,11 @@ void Bnd_Box::Dump () const
//function : DumpJson //function : DumpJson
//purpose : //purpose :
//======================================================================= //=======================================================================
void Bnd_Box::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const void Bnd_Box::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
{ {
OCCT_DUMP_CLASS_BEGIN (theOStream, Bnd_Box);
OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "CornerMin", 3, Xmin, Ymin, Zmin) OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "CornerMin", 3, Xmin, Ymin, Zmin)
OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "CornerMax", 3, Xmax, Ymax, Zmax) OCCT_DUMP_FIELD_VALUES_NUMERICAL (theOStream, "CornerMax", 3, Xmax, Ymax, Zmax)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Gap); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Gap)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Flags); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Flags)
} }

View File

@ -303,7 +303,7 @@ public:
} }
//! Dumps the content of me into the stream //! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const; Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
protected: protected:

View File

@ -1027,17 +1027,17 @@ void Bnd_OBB::Add(const Bnd_OBB& theOther)
//function : DumpJson //function : DumpJson
//purpose : //purpose :
//======================================================================= //=======================================================================
void Bnd_OBB::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const void Bnd_OBB::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{ {
OCCT_DUMP_CLASS_BEGIN (theOStream, Bnd_OBB); OCCT_DUMP_CLASS_BEGIN (theOStream, Bnd_OBB)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCenter); OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCenter)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAxes[0]); OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAxes[0])
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAxes[1]); OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAxes[1])
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAxes[2]); OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAxes[2])
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHDims[0]); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHDims[0])
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHDims[1]); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHDims[1])
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHDims[2]); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHDims[2])
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsAABox); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsAABox)
} }

View File

@ -283,7 +283,7 @@ public:
Standard_EXPORT void Add(const gp_Pnt& theP); Standard_EXPORT void Add(const gp_Pnt& theP);
//! Dumps the content of me into the stream //! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const; Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
protected: protected:

View File

@ -181,10 +181,10 @@ void Bnd_Range::Split(const Standard_Real theVal,
// function : DumpJson // function : DumpJson
// purpose : // purpose :
// ======================================================================= // =======================================================================
void Bnd_Range::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const void Bnd_Range::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
{ {
OCCT_DUMP_CLASS_BEGIN (theOStream, Bnd_Range); OCCT_DUMP_CLASS_BEGIN (theOStream, Bnd_Range)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFirst); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFirst)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLast); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLast)
} }

View File

@ -257,7 +257,7 @@ public:
} }
//! Dumps the content of me into the stream //! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const; Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
private: private:

View File

@ -20,6 +20,7 @@
#include <CDM_MetaData.hxx> #include <CDM_MetaData.hxx>
#include <CDM_Reference.hxx> #include <CDM_Reference.hxx>
#include <Resource_Manager.hxx> #include <Resource_Manager.hxx>
#include <Standard_Dump.hxx>
#include <Standard_Type.hxx> #include <Standard_Type.hxx>
#include <TCollection_ExtendedString.hxx> #include <TCollection_ExtendedString.hxx>
#include <Message.hxx> #include <Message.hxx>
@ -126,3 +127,12 @@ TCollection_AsciiString CDM_Application::Version() const
// Default: empty // Default: empty
return TCollection_AsciiString(); return TCollection_AsciiString();
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void CDM_Application::DumpJson (Standard_OStream& theOStream, Standard_Integer /*theDepth*/) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
}

View File

@ -67,6 +67,9 @@ public:
//! Returns the application version. //! Returns the application version.
Standard_EXPORT virtual TCollection_AsciiString Version() const; Standard_EXPORT virtual TCollection_AsciiString Version() const;
//! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
friend class CDM_Reference; friend class CDM_Reference;
friend class CDM_MetaData; friend class CDM_MetaData;

View File

@ -28,6 +28,7 @@
#include <CDM_ReferenceIterator.hxx> #include <CDM_ReferenceIterator.hxx>
#include <Resource_Manager.hxx> #include <Resource_Manager.hxx>
#include <Standard_DomainError.hxx> #include <Standard_DomainError.hxx>
#include <Standard_Dump.hxx>
#include <Standard_Failure.hxx> #include <Standard_Failure.hxx>
#include <Standard_GUID.hxx> #include <Standard_GUID.hxx>
#include <Standard_NoSuchObject.hxx> #include <Standard_NoSuchObject.hxx>
@ -1284,3 +1285,54 @@ void CDM_Document::ChangeStorageFormatVersion(const Standard_Integer theVersion)
{ {
myStorageFormatVersion = theVersion; myStorageFormatVersion = theVersion;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void CDM_Document::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
for (TColStd_SequenceOfExtendedString::Iterator aCommentIt (myComments); aCommentIt.More(); aCommentIt.Next())
{
const TCollection_ExtendedString& aComment = aCommentIt.Value();
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aComment)
}
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myPresentation)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValidPresentation)
for (CDM_ListOfReferences::Iterator aFromReferenceIt (myFromReferences); aFromReferenceIt.More(); aFromReferenceIt.Next())
{
const Handle(CDM_Reference)& aFromReference = aFromReferenceIt.Value().get();
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aFromReference.get())
}
for (CDM_ListOfReferences::Iterator aToReferenceIt (myToReferences); aToReferenceIt.More(); aToReferenceIt.Next())
{
const Handle(CDM_Reference)& aToReference = aToReferenceIt.Value().get();
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aToReference.get())
}
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myVersion)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myActualReferenceIdentifier)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myStorageVersion)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myMetaData.get())
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myRequestedComment)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myRequestedFolder)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRequestedFolderIsDefined)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myRequestedName)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRequestedNameIsDefined)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRequestedPreviousVersionIsDefined)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myRequestedPreviousVersion)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myFileExtension)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myDescription)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFileExtensionWasFound)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDescriptionWasFound)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myApplication.get())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myStorageFormatVersion)
}

View File

@ -349,6 +349,9 @@ Standard_OStream& operator << (Standard_OStream& anOStream);
//! Sets <theVersion> of the format to be used to store the document //! Sets <theVersion> of the format to be used to store the document
Standard_EXPORT void ChangeStorageFormatVersion(const Standard_Integer theVersion); Standard_EXPORT void ChangeStorageFormatVersion(const Standard_Integer theVersion);
//! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
friend class CDM_Reference; friend class CDM_Reference;
friend class CDM_ReferenceIterator; friend class CDM_ReferenceIterator;
friend class CDM_Application; friend class CDM_Application;

View File

@ -20,6 +20,7 @@
#include <CDM_MetaData.hxx> #include <CDM_MetaData.hxx>
#include <CDM_MetaDataLookUpTable.hxx> #include <CDM_MetaDataLookUpTable.hxx>
#include <CDM_Reference.hxx> #include <CDM_Reference.hxx>
#include <Standard_Dump.hxx>
#include <Standard_NoSuchObject.hxx> #include <Standard_NoSuchObject.hxx>
#include <Standard_Type.hxx> #include <Standard_Type.hxx>
#include <TCollection_ExtendedString.hxx> #include <TCollection_ExtendedString.hxx>
@ -144,3 +145,24 @@ void CDM_MetaData::SetIsReadOnly() {
void CDM_MetaData::UnsetIsReadOnly() { void CDM_MetaData::UnsetIsReadOnly() {
myIsReadOnly=Standard_False; myIsReadOnly=Standard_False;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void CDM_MetaData::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsRetrieved)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myDocument)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myFolder)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myName)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myVersion)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myHasVersion)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myFileName)
OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myPath)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDocumentVersion)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsReadOnly)
}

View File

@ -85,6 +85,9 @@ Standard_OStream& operator << (Standard_OStream& anOStream);
Standard_EXPORT void UnsetIsReadOnly(); Standard_EXPORT void UnsetIsReadOnly();
//! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
friend class CDM_Reference; friend class CDM_Reference;
friend friend

View File

@ -19,6 +19,7 @@
#include <CDM_Document.hxx> #include <CDM_Document.hxx>
#include <CDM_MetaData.hxx> #include <CDM_MetaData.hxx>
#include <CDM_Reference.hxx> #include <CDM_Reference.hxx>
#include <Standard_Dump.hxx>
#include <Standard_Type.hxx> #include <Standard_Type.hxx>
IMPLEMENT_STANDARD_RTTIEXT(CDM_Reference,Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(CDM_Reference,Standard_Transient)
@ -120,3 +121,23 @@ Standard_Boolean CDM_Reference::IsInSession() const {
Standard_Boolean CDM_Reference::IsStored() const { Standard_Boolean CDM_Reference::IsStored() const {
return !myMetaData.IsNull(); return !myMetaData.IsNull();
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void CDM_Reference::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myToDocument.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myFromDocument)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myReferenceIdentifier)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myApplication.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myMetaData.get())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDocumentVersion)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUseStorageConfiguration)
}

View File

@ -49,6 +49,9 @@ public:
Standard_EXPORT Standard_Boolean IsReadOnly() const; Standard_EXPORT Standard_Boolean IsReadOnly() const;
//! Dumps the content of me into the stream
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
friend class CDM_Document; friend class CDM_Document;

View File

@ -16,6 +16,7 @@
#define _Font_Rect_H__ #define _Font_Rect_H__
#include <NCollection_Vec2.hxx> #include <NCollection_Vec2.hxx>
#include <Standard_Dump.hxx>
//! Auxiliary POD structure - 2D rectangle definition. //! Auxiliary POD structure - 2D rectangle definition.
struct Font_Rect struct Font_Rect
@ -76,6 +77,16 @@ struct Font_Rect
return Top - Bottom; return Top - Bottom;
} }
//! Dumps the content of me into the stream
void DumpJson (Standard_OStream& theOStream, Standard_Integer) const
{
OCCT_DUMP_CLASS_BEGIN (theOStream, Font_Rect)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Left)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Right)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Top)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Bottom)
}
}; };
#endif // _Font_Rect_H__ #endif // _Font_Rect_H__

View File

@ -1120,3 +1120,33 @@ void Geom_BSplineCurve::PeriodicNormalization(Standard_Real& Parameter) const
} }
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_BSplineCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_BoundedCurve)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, rational)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, periodic)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, knotSet)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, smooth)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, deg)
if (!poles.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, poles->Size())
if (!weights.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, weights->Size())
if (!flatknots.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, flatknots->Size())
if (!knots.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, knots->Size())
if (!mults.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mults->Size())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinv)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinvok)
}

View File

@ -786,6 +786,9 @@ public:
//! Comapare two Bspline curve on identity; //! Comapare two Bspline curve on identity;
Standard_EXPORT Standard_Boolean IsEqual (const Handle(Geom_BSplineCurve)& theOther, const Standard_Real thePreci) const; Standard_EXPORT Standard_Boolean IsEqual (const Handle(Geom_BSplineCurve)& theOther, const Standard_Real thePreci) const;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -1272,3 +1272,46 @@ void Geom_BSplineSurface::SetWeightRow
Rational(Weights, urational, vrational); Rational(Weights, urational, vrational);
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_BSplineSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_BoundedSurface)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, urational)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vrational)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, uperiodic)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vperiodic)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, uknotSet)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vknotSet)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Usmooth)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Vsmooth)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, udeg)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vdeg)
if (!poles.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, poles->Size())
if (!weights.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, weights->Size())
if (!ufknots.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, ufknots->Size())
if (!vfknots.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vfknots->Size())
if (!uknots.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, uknots->Size())
if (!vknots.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vknots->Size())
if (!umults.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, umults->Size())
if (!vmults.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vmults->Size())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, umaxderivinv)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vmaxderivinv)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinvok)
}

View File

@ -1189,6 +1189,9 @@ public:
//! Creates a new object which is a copy of this BSpline surface. //! Creates a new object which is a copy of this BSpline surface.
Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE; Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -812,3 +812,24 @@ void Geom_BezierCurve::Init
weights.Nullify(); weights.Nullify();
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_BezierCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_BoundedCurve)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, rational)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, closed)
if (!poles.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, poles->Size())
if (!weights.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, weights->Size())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinv)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinvok)
}

View File

@ -333,6 +333,9 @@ public:
//! Creates a new object which is a copy of this Bezier curve. //! Creates a new object which is a copy of this Bezier curve.
Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE; Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -1937,3 +1937,23 @@ void Geom_BezierSurface::Init
weights.Nullify(); weights.Nullify();
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_BezierSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_BoundedSurface)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, urational)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vrational)
if (!poles.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, poles->Size())
if (!weights.IsNull())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, weights->Size())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, umaxderivinv)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vmaxderivinv)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, maxderivinvok)
}

View File

@ -583,6 +583,9 @@ public:
//! Creates a new object which is a copy of this Bezier surface. //! Creates a new object which is a copy of this Bezier surface.
Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE; Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -20,3 +20,14 @@
#include <Standard_Type.hxx> #include <Standard_Type.hxx>
IMPLEMENT_STANDARD_RTTIEXT(Geom_BoundedCurve,Geom_Curve) IMPLEMENT_STANDARD_RTTIEXT(Geom_BoundedCurve,Geom_Curve)
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_BoundedCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Curve)
}

View File

@ -54,6 +54,9 @@ public:
//! Returns the start point of the curve. //! Returns the start point of the curve.
Standard_EXPORT virtual gp_Pnt StartPoint() const = 0; Standard_EXPORT virtual gp_Pnt StartPoint() const = 0;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -234,3 +234,16 @@ void Geom_Circle::Transform (const Trsf& T) {
radius = radius * Abs(T.ScaleFactor()); radius = radius * Abs(T.ScaleFactor());
pos.Transform (T); pos.Transform (T);
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_Circle::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Conic)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, radius)
}

View File

@ -158,6 +158,9 @@ public:
//! Creates a new object which is a copy of this circle. //! Creates a new object which is a copy of this circle.
Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE; Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -69,3 +69,14 @@ Standard_Boolean Geom_Conic::IsCN (const Standard_Integer ) const
{ {
return Standard_True; return Standard_True;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_Conic::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Curve)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &pos)
}

View File

@ -116,6 +116,9 @@ public:
//! Raised if N < 0. //! Raised if N < 0.
Standard_EXPORT Standard_Boolean IsCN (const Standard_Integer N) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean IsCN (const Standard_Integer N) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
DEFINE_STANDARD_RTTIEXT(Geom_Conic,Geom_Curve) DEFINE_STANDARD_RTTIEXT(Geom_Conic,Geom_Curve)
protected: protected:

View File

@ -433,3 +433,16 @@ const
return T2; return T2;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_ConicalSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_ElementarySurface)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, radius)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, semiAngle)
}

View File

@ -283,6 +283,9 @@ public:
//! Creates a new object which is a copy of this cone. //! Creates a new object which is a copy of this cone.
Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE; Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -88,4 +88,14 @@ Standard_Real Geom_Curve::ParametricTransformation(const gp_Trsf& ) const
return 1.; return 1.;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_Curve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Geometry)
}

View File

@ -225,6 +225,9 @@ public:
//! derivative on the basis curve and the offset direction are parallel. //! derivative on the basis curve and the offset direction are parallel.
Standard_EXPORT gp_Pnt Value (const Standard_Real U) const; Standard_EXPORT gp_Pnt Value (const Standard_Real U) const;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -374,3 +374,16 @@ const
T2.SetAffinity(Axis, Abs(T.ScaleFactor())); T2.SetAffinity(Axis, Abs(T.ScaleFactor()));
return T2; return T2;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_CylindricalSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_ElementarySurface)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, radius)
}

View File

@ -212,6 +212,9 @@ public:
//! Creates a new object which is a copy of this cylinder. //! Creates a new object which is a copy of this cylinder.
Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE; Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -67,3 +67,16 @@ void Geom_ElementarySurface::VReverse ()
{ {
pos.ZReverse(); pos.ZReverse();
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_ElementarySurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Surface)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &pos)
}

View File

@ -118,6 +118,9 @@ public:
//! Returns True. //! Returns True.
Standard_EXPORT Standard_Boolean IsCNv (const Standard_Integer N) const Standard_OVERRIDE; Standard_EXPORT Standard_Boolean IsCNv (const Standard_Integer N) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
DEFINE_STANDARD_RTTIEXT(Geom_ElementarySurface,Geom_Surface) DEFINE_STANDARD_RTTIEXT(Geom_ElementarySurface,Geom_Surface)
protected: protected:

View File

@ -343,3 +343,17 @@ void Geom_Ellipse::Transform (const Trsf& T) {
minorRadius = minorRadius * Abs(T.ScaleFactor()); minorRadius = minorRadius * Abs(T.ScaleFactor());
pos.Transform(T); pos.Transform(T);
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_Ellipse::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Conic)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, majorRadius)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, minorRadius)
}

View File

@ -220,6 +220,9 @@ public:
//! Creates a new object which is a copy of this ellipse. //! Creates a new object which is a copy of this ellipse.
Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE; Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -165,3 +165,7 @@ Handle(Geom_Geometry) Geom_Geometry::Translated (const gp_Pnt& P1, const gp_Pnt&
} }
void Geom_Geometry::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
}

View File

@ -118,6 +118,9 @@ public:
//! Creates a new object which is a copy of this geometric object. //! Creates a new object which is a copy of this geometric object.
Standard_EXPORT virtual Handle(Geom_Geometry) Copy() const = 0; Standard_EXPORT virtual Handle(Geom_Geometry) Copy() const = 0;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;

View File

@ -388,3 +388,17 @@ void Geom_Hyperbola::Transform (const Trsf& T) {
minorRadius = minorRadius * Abs(T.ScaleFactor()); minorRadius = minorRadius * Abs(T.ScaleFactor());
pos.Transform(T); pos.Transform(T);
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_Hyperbola::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Conic)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, majorRadius)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, minorRadius)
}

View File

@ -276,6 +276,9 @@ public:
//! Creates a new object which is a copy of this hyperbola. //! Creates a new object which is a copy of this hyperbola.
Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE; Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -251,4 +251,15 @@ Standard_Real Geom_Line::ParametricTransformation(const gp_Trsf& T) const
return Abs(T.ScaleFactor()); return Abs(T.ScaleFactor());
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_Line::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Curve)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &pos)
}

View File

@ -179,6 +179,9 @@ public:
//! Creates a new object which is a copy of this line. //! Creates a new object which is a copy of this line.
Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE; Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -444,3 +444,20 @@ GeomAbs_Shape Geom_OffsetCurve::GetBasisCurveContinuity() const
{ {
return myBasisCurveContinuity; return myBasisCurveContinuity;
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_OffsetCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Curve)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, basisCurve.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &direction)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, offsetValue)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myBasisCurveContinuity)
}

View File

@ -281,6 +281,9 @@ public:
//! Returns continuity of the basis curve. //! Returns continuity of the basis curve.
Standard_EXPORT GeomAbs_Shape GetBasisCurveContinuity() const; Standard_EXPORT GeomAbs_Shape GetBasisCurveContinuity() const;
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;

View File

@ -966,3 +966,21 @@ Standard_Boolean Geom_OffsetSurface::VOsculatingSurface(const Standard_Real U, c
{ {
return !myOscSurf.IsNull() && myOscSurf->VOscSurf(U, V, t, L); return !myOscSurf.IsNull() && myOscSurf->VOscSurf(U, V, t, L);
} }
//=======================================================================
//function : DumpJson
//purpose :
//=======================================================================
void Geom_OffsetSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Surface)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, basisSurf.get())
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, equivSurf.get())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, offsetValue)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myOscSurf.get())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myBasisSurfContinuity)
}

View File

@ -357,6 +357,9 @@ public:
inline GeomAbs_Shape GetBasisSurfContinuity() const inline GeomAbs_Shape GetBasisSurfContinuity() const
{ return myBasisSurfContinuity; } { return myBasisSurfContinuity; }
//! Dumps the content of me into the stream
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
DEFINE_STANDARD_RTTIEXT(Geom_OffsetSurface,Geom_Surface) DEFINE_STANDARD_RTTIEXT(Geom_OffsetSurface,Geom_Surface)
private: private:

Some files were not shown because too many files have changed in this diff Show More