From: nds Date: Thu, 16 Jan 2020 12:16:50 +0000 (+0300) Subject: 0030268: Inspectors - improvements in VInspector plugin X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=e06743cfbbc43e809fa0040fbb5835490c631fdb;p=occt-copy.git 0030268: Inspectors - improvements in VInspector plugin # dump for curve/surface brep structures --- diff --git a/src/BRep/BRep_Curve3D.cxx b/src/BRep/BRep_Curve3D.cxx index 86a06deab8..bc7f8d85ae 100644 --- a/src/BRep/BRep_Curve3D.cxx +++ b/src/BRep/BRep_Curve3D.cxx @@ -92,3 +92,17 @@ Handle(BRep_CurveRepresentation) BRep_Curve3D::Copy() const C->SetRange(First(), Last()); return C; } + +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void BRep_Curve3D::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, BRep_Curve3D); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_GCurve); + + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myCurve.get()); +} diff --git a/src/BRep/BRep_Curve3D.hxx b/src/BRep/BRep_Curve3D.hxx index e459d1ddff..4909ff4c5b 100644 --- a/src/BRep/BRep_Curve3D.hxx +++ b/src/BRep/BRep_Curve3D.hxx @@ -54,6 +54,8 @@ public: //! Return a copy of this representation. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/BRep/BRep_CurveOn2Surfaces.cxx b/src/BRep/BRep_CurveOn2Surfaces.cxx index 1ce978e466..37bde7daaf 100644 --- a/src/BRep/BRep_CurveOn2Surfaces.cxx +++ b/src/BRep/BRep_CurveOn2Surfaces.cxx @@ -147,3 +147,21 @@ Handle(BRep_CurveRepresentation) BRep_CurveOn2Surfaces::Copy() const myContinuity); return C; } + +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void BRep_CurveOn2Surfaces::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, BRep_CurveOn2Surfaces); + + 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); +} diff --git a/src/BRep/BRep_CurveOn2Surfaces.hxx b/src/BRep/BRep_CurveOn2Surfaces.hxx index 867423ff24..ab9784b585 100644 --- a/src/BRep/BRep_CurveOn2Surfaces.hxx +++ b/src/BRep/BRep_CurveOn2Surfaces.hxx @@ -66,6 +66,8 @@ public: //! Return a copy of this representation. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/BRep/BRep_CurveOnClosedSurface.cxx b/src/BRep/BRep_CurveOnClosedSurface.cxx index 5f0b028931..e1f1312d60 100644 --- a/src/BRep/BRep_CurveOnClosedSurface.cxx +++ b/src/BRep/BRep_CurveOnClosedSurface.cxx @@ -180,4 +180,21 @@ void BRep_CurveOnClosedSurface::Update() BRep_CurveOnSurface::Update(); } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void BRep_CurveOnClosedSurface::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, BRep_CurveOnClosedSurface); + + 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); +} diff --git a/src/BRep/BRep_CurveOnClosedSurface.hxx b/src/BRep/BRep_CurveOnClosedSurface.hxx index 5bed28216b..96e5f22eff 100644 --- a/src/BRep/BRep_CurveOnClosedSurface.hxx +++ b/src/BRep/BRep_CurveOnClosedSurface.hxx @@ -78,6 +78,8 @@ public: //! This is called when the range is modified. Standard_EXPORT virtual void Update() 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_OVERRIDE; diff --git a/src/BRep/BRep_CurveOnSurface.cxx b/src/BRep/BRep_CurveOnSurface.cxx index f5f6cd377b..8986686ef0 100644 --- a/src/BRep/BRep_CurveOnSurface.cxx +++ b/src/BRep/BRep_CurveOnSurface.cxx @@ -146,4 +146,21 @@ void BRep_CurveOnSurface::Update() } } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void BRep_CurveOnSurface::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, BRep_CurveOnSurface); + + 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()); +} diff --git a/src/BRep/BRep_CurveOnSurface.hxx b/src/BRep/BRep_CurveOnSurface.hxx index baece2ff34..a4147170ae 100644 --- a/src/BRep/BRep_CurveOnSurface.hxx +++ b/src/BRep/BRep_CurveOnSurface.hxx @@ -71,6 +71,8 @@ public: //! This is called when the range is modified. Standard_EXPORT virtual void Update() 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_OVERRIDE; diff --git a/src/BRep/BRep_CurveRepresentation.cxx b/src/BRep/BRep_CurveRepresentation.cxx index 63ed95bf11..78d6727611 100644 --- a/src/BRep/BRep_CurveRepresentation.cxx +++ b/src/BRep/BRep_CurveRepresentation.cxx @@ -426,3 +426,14 @@ void BRep_CurveRepresentation::Polygon2(const Handle(Poly_Polygon2D)&) throw Standard_DomainError("BRep_CurveRepresentation"); } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void BRep_CurveRepresentation::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, BRep_CurveRepresentation); + + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation); +} diff --git a/src/BRep/BRep_CurveRepresentation.hxx b/src/BRep/BRep_CurveRepresentation.hxx index 354eaa395f..3b238ca4d9 100644 --- a/src/BRep/BRep_CurveRepresentation.hxx +++ b/src/BRep/BRep_CurveRepresentation.hxx @@ -144,6 +144,8 @@ public: //! Return a copy of this representation. 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, const Standard_Integer theDepth = -1) const; diff --git a/src/BRep/BRep_GCurve.cxx b/src/BRep/BRep_GCurve.cxx index 22c36ccfe4..5cd6f936b4 100644 --- a/src/BRep/BRep_GCurve.cxx +++ b/src/BRep/BRep_GCurve.cxx @@ -46,3 +46,17 @@ void BRep_GCurve::Update() } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void BRep_GCurve::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, BRep_GCurve); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFirst); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLast); +} diff --git a/src/BRep/BRep_GCurve.hxx b/src/BRep/BRep_GCurve.hxx index 1d2c4d5433..f57f8f7993 100644 --- a/src/BRep/BRep_GCurve.hxx +++ b/src/BRep/BRep_GCurve.hxx @@ -57,6 +57,8 @@ public: //! This is called when the range is modified. Standard_EXPORT virtual void Update(); + //! Dumps the content of me into the stream + Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/BRep/BRep_PointOnCurve.cxx b/src/BRep/BRep_PointOnCurve.cxx index 737c7c1f2b..a81f4890e9 100644 --- a/src/BRep/BRep_PointOnCurve.cxx +++ b/src/BRep/BRep_PointOnCurve.cxx @@ -80,4 +80,17 @@ void BRep_PointOnCurve::Curve(const Handle(Geom_Curve)& C) myCurve = C; } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void BRep_PointOnCurve::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, BRep_PointOnCurve); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PointRepresentation); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myCurve.get()); +} diff --git a/src/BRep/BRep_PointOnCurve.hxx b/src/BRep/BRep_PointOnCurve.hxx index 3e22ee967c..800dade4cc 100644 --- a/src/BRep/BRep_PointOnCurve.hxx +++ b/src/BRep/BRep_PointOnCurve.hxx @@ -48,6 +48,8 @@ public: 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/BRep/BRep_PointOnCurveOnSurface.cxx b/src/BRep/BRep_PointOnCurveOnSurface.cxx index d82010bd17..63d609a365 100644 --- a/src/BRep/BRep_PointOnCurveOnSurface.cxx +++ b/src/BRep/BRep_PointOnCurveOnSurface.cxx @@ -84,4 +84,17 @@ void BRep_PointOnCurveOnSurface::PCurve(const Handle(Geom2d_Curve)& C) myPCurve = C; } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void BRep_PointOnCurveOnSurface::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, BRep_PointOnCurveOnSurface); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PointRepresentation); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySurface.get()); +} diff --git a/src/BRep/BRep_PointRepresentation.cxx b/src/BRep/BRep_PointRepresentation.cxx index 397320651a..d0395e9f3d 100644 --- a/src/BRep/BRep_PointRepresentation.cxx +++ b/src/BRep/BRep_PointRepresentation.cxx @@ -197,4 +197,16 @@ void BRep_PointRepresentation::Surface(const Handle(Geom_Surface)& ) throw Standard_DomainError("BRep_PointRepresentation"); } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void BRep_PointRepresentation::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, BRep_PointRepresentation); + + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myParameter); +} diff --git a/src/BRep/BRep_PointRepresentation.hxx b/src/BRep/BRep_PointRepresentation.hxx index 22c24b0d63..5e49a1bf0b 100644 --- a/src/BRep/BRep_PointRepresentation.hxx +++ b/src/BRep/BRep_PointRepresentation.hxx @@ -84,6 +84,8 @@ public: 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, const Standard_Integer theDepth = -1) const; diff --git a/src/BRep/BRep_PointsOnSurface.hxx b/src/BRep/BRep_PointsOnSurface.hxx index 83f23f64ed..600cf7223f 100644 --- a/src/BRep/BRep_PointsOnSurface.hxx +++ b/src/BRep/BRep_PointsOnSurface.hxx @@ -40,6 +40,8 @@ public: 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/BRep/BRep_Polygon3D.cxx b/src/BRep/BRep_Polygon3D.cxx index 921a4ed1f9..786ec297ce 100644 --- a/src/BRep/BRep_Polygon3D.cxx +++ b/src/BRep/BRep_Polygon3D.cxx @@ -76,3 +76,16 @@ Handle(BRep_CurveRepresentation) BRep_Polygon3D::Copy() const return P; } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void BRep_Polygon3D::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, BRep_Polygon3D); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_CurveRepresentation); + + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon3D.get()); +} diff --git a/src/BRep/BRep_Polygon3D.hxx b/src/BRep/BRep_Polygon3D.hxx index ff5e6d8d95..9edba72311 100644 --- a/src/BRep/BRep_Polygon3D.hxx +++ b/src/BRep/BRep_Polygon3D.hxx @@ -50,6 +50,8 @@ public: //! Return a copy of this representation. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/BRep/BRep_PolygonOnClosedSurface.cxx b/src/BRep/BRep_PolygonOnClosedSurface.cxx index 8696bb8164..41a1f49677 100644 --- a/src/BRep/BRep_PolygonOnClosedSurface.cxx +++ b/src/BRep/BRep_PolygonOnClosedSurface.cxx @@ -79,3 +79,16 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnClosedSurface::Copy() const return P; } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= +void BRep_PolygonOnClosedSurface::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, BRep_PolygonOnClosedSurface); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PolygonOnSurface); + + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon2.get()); +} + diff --git a/src/BRep/BRep_PolygonOnClosedSurface.hxx b/src/BRep/BRep_PolygonOnClosedSurface.hxx index 79ee1ec633..7b1739f84c 100644 --- a/src/BRep/BRep_PolygonOnClosedSurface.hxx +++ b/src/BRep/BRep_PolygonOnClosedSurface.hxx @@ -51,6 +51,8 @@ public: //! Return a copy of this representation. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/BRep/BRep_PolygonOnClosedTriangulation.cxx b/src/BRep/BRep_PolygonOnClosedTriangulation.cxx index 83bcc2bac5..d75f232913 100644 --- a/src/BRep/BRep_PolygonOnClosedTriangulation.cxx +++ b/src/BRep/BRep_PolygonOnClosedTriangulation.cxx @@ -84,3 +84,16 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnClosedTriangulation::Copy() const return P; } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void BRep_PolygonOnClosedTriangulation::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, BRep_PolygonOnClosedTriangulation); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRep_PolygonOnTriangulation); + + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPolygon2.get()); +} diff --git a/src/BRep/BRep_PolygonOnClosedTriangulation.hxx b/src/BRep/BRep_PolygonOnClosedTriangulation.hxx index bc9eba85a5..345f40af45 100644 --- a/src/BRep/BRep_PolygonOnClosedTriangulation.hxx +++ b/src/BRep/BRep_PolygonOnClosedTriangulation.hxx @@ -51,6 +51,8 @@ public: //! Return a copy of this representation. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/BRep/BRep_PolygonOnSurface.cxx b/src/BRep/BRep_PolygonOnSurface.cxx index 197b5b8fa4..40ef3b48f3 100644 --- a/src/BRep/BRep_PolygonOnSurface.cxx +++ b/src/BRep/BRep_PolygonOnSurface.cxx @@ -102,3 +102,17 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnSurface::Copy() const return P; } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void BRep_PolygonOnSurface::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, BRep_PolygonOnSurface); + + 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()); +} diff --git a/src/BRep/BRep_PolygonOnSurface.hxx b/src/BRep/BRep_PolygonOnSurface.hxx index b0c165798e..5fef98b137 100644 --- a/src/BRep/BRep_PolygonOnSurface.hxx +++ b/src/BRep/BRep_PolygonOnSurface.hxx @@ -59,6 +59,8 @@ public: //! Return a copy of this representation. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/BRep/BRep_PolygonOnTriangulation.cxx b/src/BRep/BRep_PolygonOnTriangulation.cxx index 24beb3dc9a..b5d6ae81bd 100644 --- a/src/BRep/BRep_PolygonOnTriangulation.cxx +++ b/src/BRep/BRep_PolygonOnTriangulation.cxx @@ -104,3 +104,18 @@ Handle(BRep_CurveRepresentation) BRep_PolygonOnTriangulation::Copy() const return P; } + +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void BRep_PolygonOnTriangulation::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, BRep_PolygonOnTriangulation); + + 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()); +} diff --git a/src/BRep/BRep_PolygonOnTriangulation.hxx b/src/BRep/BRep_PolygonOnTriangulation.hxx index b400ea9d74..f270971135 100644 --- a/src/BRep/BRep_PolygonOnTriangulation.hxx +++ b/src/BRep/BRep_PolygonOnTriangulation.hxx @@ -58,6 +58,8 @@ public: //! Return a copy of this representation. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/BRep/BRep_TEdge.cxx b/src/BRep/BRep_TEdge.cxx index e8d3be2ed7..66ce90f397 100644 --- a/src/BRep/BRep_TEdge.cxx +++ b/src/BRep/BRep_TEdge.cxx @@ -141,3 +141,26 @@ Handle(TopoDS_TShape) BRep_TEdge::EmptyCopy() const return TE; } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void BRep_TEdge::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, BRep_TEdge); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TopoDS_TEdge); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFlags); + + BRep_ListIteratorOfListOfCurveRepresentation itr(myCurves); + while (itr.More()) + { + Handle(BRep_CurveRepresentation) aCurveRepresentation = itr.Value(); + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aCurveRepresentation.get()); + + itr.Next(); + } +} diff --git a/src/BRep/BRep_TEdge.hxx b/src/BRep/BRep_TEdge.hxx index 2bd0642fb8..27a11cc627 100644 --- a/src/BRep/BRep_TEdge.hxx +++ b/src/BRep/BRep_TEdge.hxx @@ -81,7 +81,8 @@ public: //! Returns a copy of the TShape with no sub-shapes. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(BRep_TEdge,TopoDS_TEdge) diff --git a/src/BRep/BRep_TFace.cxx b/src/BRep/BRep_TFace.cxx index 30c2b3c952..d7dbe4a0dc 100644 --- a/src/BRep/BRep_TFace.cxx +++ b/src/BRep/BRep_TFace.cxx @@ -50,3 +50,21 @@ Handle(TopoDS_TShape) BRep_TFace::EmptyCopy() const TF->Tolerance(myTolerance); return TF; } + +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= +void BRep_TFace::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, BRep_TFace); + + 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); +} diff --git a/src/BRep/BRep_TFace.hxx b/src/BRep/BRep_TFace.hxx index c24337de47..118d1e488c 100644 --- a/src/BRep/BRep_TFace.hxx +++ b/src/BRep/BRep_TFace.hxx @@ -88,6 +88,8 @@ public: //! The new Face has no triangulation. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/BRep/BRep_TVertex.cxx b/src/BRep/BRep_TVertex.cxx index 86145ced1a..ff5fb6a523 100644 --- a/src/BRep/BRep_TVertex.cxx +++ b/src/BRep/BRep_TVertex.cxx @@ -47,3 +47,37 @@ Handle(TopoDS_TShape) BRep_TVertex::EmptyCopy() const return TV; } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void BRep_TVertex::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, BRep_TVertex); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TopoDS_TEdge); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFlags); + + BRep_ListIteratorOfListOfCurveRepresentation itr(myCurves); + while (itr.More()) + { + Handle(BRep_CurveRepresentation) aCurveRepresentation = itr.Value(); + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aCurveRepresentation.get()); + + itr.Next(); + } + + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPnt); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance); + BRep_ListIteratorOfListOfPointRepresentation itr(myPoints); + while (itr.More()) + { + Handle(BRep_PointRepresentation) aPointRepresentation = itr.Value(); + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aPointRepresentation.get()); + + itr.Next(); + } +} diff --git a/src/BRep/BRep_TVertex.hxx b/src/BRep/BRep_TVertex.hxx index 9729fb52f6..ff7d4c4670 100644 --- a/src/BRep/BRep_TVertex.hxx +++ b/src/BRep/BRep_TVertex.hxx @@ -62,6 +62,8 @@ public: //! Returns a copy of the TShape with no sub-shapes. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/Geom/Geom_BSplineCurve.cxx b/src/Geom/Geom_BSplineCurve.cxx index 87e6c9fe5f..cdeaa4ca42 100644 --- a/src/Geom/Geom_BSplineCurve.cxx +++ b/src/Geom/Geom_BSplineCurve.cxx @@ -1120,3 +1120,34 @@ void Geom_BSplineCurve::PeriodicNormalization(Standard_Real& Parameter) const } } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= +void Geom_BSplineCurve::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_BSplineCurve); + + 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); +} diff --git a/src/Geom/Geom_BSplineCurve.hxx b/src/Geom/Geom_BSplineCurve.hxx index ae036654ea..f7c79716a8 100644 --- a/src/Geom/Geom_BSplineCurve.hxx +++ b/src/Geom/Geom_BSplineCurve.hxx @@ -786,6 +786,8 @@ public: //! Comapare two Bspline curve on identity; 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/Geom/Geom_BSplineSurface.cxx b/src/Geom/Geom_BSplineSurface.cxx index f4dbe4f150..73233d1664 100644 --- a/src/Geom/Geom_BSplineSurface.cxx +++ b/src/Geom/Geom_BSplineSurface.cxx @@ -1272,3 +1272,47 @@ void Geom_BSplineSurface::SetWeightRow Rational(Weights, urational, vrational); } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_BSplineSurface::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_BSplineSurface); + 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); +} diff --git a/src/Geom/Geom_BSplineSurface.hxx b/src/Geom/Geom_BSplineSurface.hxx index 40decdef99..53cae3afd7 100644 --- a/src/Geom/Geom_BSplineSurface.hxx +++ b/src/Geom/Geom_BSplineSurface.hxx @@ -1190,6 +1190,8 @@ public: 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(Geom_BSplineSurface,Geom_BoundedSurface) diff --git a/src/Geom/Geom_BezierCurve.cxx b/src/Geom/Geom_BezierCurve.cxx index e25133dcad..f66b237e96 100644 --- a/src/Geom/Geom_BezierCurve.cxx +++ b/src/Geom/Geom_BezierCurve.cxx @@ -812,3 +812,25 @@ void Geom_BezierCurve::Init weights.Nullify(); } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_BezierCurve::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_BezierCurve); + + 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); +} + diff --git a/src/Geom/Geom_BezierCurve.hxx b/src/Geom/Geom_BezierCurve.hxx index 38cf013566..6a10f14db3 100644 --- a/src/Geom/Geom_BezierCurve.hxx +++ b/src/Geom/Geom_BezierCurve.hxx @@ -333,6 +333,8 @@ public: //! Creates a new object which is a copy of this Bezier curve. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/Geom/Geom_BezierSurface.cxx b/src/Geom/Geom_BezierSurface.cxx index c6ede954d4..ca5a27557d 100644 --- a/src/Geom/Geom_BezierSurface.cxx +++ b/src/Geom/Geom_BezierSurface.cxx @@ -1937,3 +1937,24 @@ void Geom_BezierSurface::Init weights.Nullify(); } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_BezierSurface::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_BezierSurface); + + 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); +} diff --git a/src/Geom/Geom_BezierSurface.hxx b/src/Geom/Geom_BezierSurface.hxx index 0519edf9bc..db6716c349 100644 --- a/src/Geom/Geom_BezierSurface.hxx +++ b/src/Geom/Geom_BezierSurface.hxx @@ -584,7 +584,8 @@ public: 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(Geom_BezierSurface,Geom_BoundedSurface) diff --git a/src/Geom/Geom_BoundedCurve.cxx b/src/Geom/Geom_BoundedCurve.cxx index 8dffe7a043..e0c3a53477 100644 --- a/src/Geom/Geom_BoundedCurve.cxx +++ b/src/Geom/Geom_BoundedCurve.cxx @@ -19,4 +19,16 @@ #include #include -IMPLEMENT_STANDARD_RTTIEXT(Geom_BoundedCurve,Geom_Curve) \ No newline at end of file +IMPLEMENT_STANDARD_RTTIEXT(Geom_BoundedCurve,Geom_Curve) + +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_BoundedCurve::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_BoundedCurve); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Curve); +} diff --git a/src/Geom/Geom_BoundedCurve.hxx b/src/Geom/Geom_BoundedCurve.hxx index 7af31bd6d2..e9b71a4bd2 100644 --- a/src/Geom/Geom_BoundedCurve.hxx +++ b/src/Geom/Geom_BoundedCurve.hxx @@ -55,6 +55,8 @@ public: Standard_EXPORT virtual gp_Pnt StartPoint() const = 0; + //! Dumps the content of me into the stream + Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(Geom_BoundedCurve,Geom_Curve) diff --git a/src/Geom/Geom_Circle.cxx b/src/Geom/Geom_Circle.cxx index 2ed3d420c9..bd6f58492e 100644 --- a/src/Geom/Geom_Circle.cxx +++ b/src/Geom/Geom_Circle.cxx @@ -234,3 +234,17 @@ void Geom_Circle::Transform (const Trsf& T) { radius = radius * Abs(T.ScaleFactor()); pos.Transform (T); } + +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_Circle::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_Circle); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Conic); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, radius); +} diff --git a/src/Geom/Geom_Circle.hxx b/src/Geom/Geom_Circle.hxx index 4b75cb1f35..60d4559276 100644 --- a/src/Geom/Geom_Circle.hxx +++ b/src/Geom/Geom_Circle.hxx @@ -158,6 +158,8 @@ public: //! Creates a new object which is a copy of this circle. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/Geom/Geom_Conic.cxx b/src/Geom/Geom_Conic.cxx index c5a12b6cad..32280131a3 100644 --- a/src/Geom/Geom_Conic.cxx +++ b/src/Geom/Geom_Conic.cxx @@ -61,3 +61,9 @@ Ax1 Geom_Conic::YAxis () const {return Ax1(pos.Location(), pos.YDirection());} Standard_Boolean Geom_Conic::IsCN (const Standard_Integer ) const { return Standard_True; } +void Geom_Conic::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_Conic); + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Curve); + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &pos); +} diff --git a/src/Geom/Geom_Conic.hxx b/src/Geom/Geom_Conic.hxx index 7dad5062b8..461ca99c77 100644 --- a/src/Geom/Geom_Conic.hxx +++ b/src/Geom/Geom_Conic.hxx @@ -136,6 +136,8 @@ public: //! Raised if N < 0. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/Geom/Geom_ConicalSurface.cxx b/src/Geom/Geom_ConicalSurface.cxx index 5dd0e7029b..05ab7e34ab 100644 --- a/src/Geom/Geom_ConicalSurface.cxx +++ b/src/Geom/Geom_ConicalSurface.cxx @@ -433,3 +433,17 @@ const return T2; } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_ConicalSurface::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_ConicalSurface); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_ElementarySurface); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, radius); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, semiAngle); +} diff --git a/src/Geom/Geom_ConicalSurface.hxx b/src/Geom/Geom_ConicalSurface.hxx index 5db22203b8..ee62f67e32 100644 --- a/src/Geom/Geom_ConicalSurface.hxx +++ b/src/Geom/Geom_ConicalSurface.hxx @@ -283,6 +283,8 @@ public: //! Creates a new object which is a copy of this cone. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/Geom/Geom_Curve.cxx b/src/Geom/Geom_Curve.cxx index 6f0ba329a5..3def1d91f4 100644 --- a/src/Geom/Geom_Curve.cxx +++ b/src/Geom/Geom_Curve.cxx @@ -88,4 +88,15 @@ Standard_Real Geom_Curve::ParametricTransformation(const gp_Trsf& ) const return 1.; } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_Curve::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_Curve); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Geometry); +} diff --git a/src/Geom/Geom_Curve.hxx b/src/Geom/Geom_Curve.hxx index 4ec6137d2c..8026e1fbfe 100644 --- a/src/Geom/Geom_Curve.hxx +++ b/src/Geom/Geom_Curve.hxx @@ -225,6 +225,8 @@ public: //! derivative on the basis curve and the offset direction are parallel. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/Geom/Geom_CylindricalSurface.cxx b/src/Geom/Geom_CylindricalSurface.cxx index dd500cb319..2319217689 100644 --- a/src/Geom/Geom_CylindricalSurface.cxx +++ b/src/Geom/Geom_CylindricalSurface.cxx @@ -374,3 +374,18 @@ const T2.SetAffinity(Axis, Abs(T.ScaleFactor())); return T2; } + +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_CylindricalSurface::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_CylindricalSurface); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_ElementarySurface); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, radius); +} + diff --git a/src/Geom/Geom_CylindricalSurface.hxx b/src/Geom/Geom_CylindricalSurface.hxx index 8f4ae4dabc..ba6e84dae1 100644 --- a/src/Geom/Geom_CylindricalSurface.hxx +++ b/src/Geom/Geom_CylindricalSurface.hxx @@ -212,6 +212,8 @@ public: //! Creates a new object which is a copy of this cylinder. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/Geom/Geom_ElementarySurface.cxx b/src/Geom/Geom_ElementarySurface.cxx index a111852617..46c60a9b9f 100644 --- a/src/Geom/Geom_ElementarySurface.cxx +++ b/src/Geom/Geom_ElementarySurface.cxx @@ -146,3 +146,16 @@ void Geom_ElementarySurface::VReverse () { } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_ElementarySurface::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_ElementarySurface); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Surface); + + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &pos); +} diff --git a/src/Geom/Geom_ElementarySurface.hxx b/src/Geom/Geom_ElementarySurface.hxx index ef82db27a8..c3474f7b90 100644 --- a/src/Geom/Geom_ElementarySurface.hxx +++ b/src/Geom/Geom_ElementarySurface.hxx @@ -139,6 +139,8 @@ public: //! Returns True. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/Geom/Geom_Ellipse.cxx b/src/Geom/Geom_Ellipse.cxx index f272490102..a03b0dab8c 100644 --- a/src/Geom/Geom_Ellipse.cxx +++ b/src/Geom/Geom_Ellipse.cxx @@ -343,3 +343,18 @@ void Geom_Ellipse::Transform (const Trsf& T) { minorRadius = minorRadius * Abs(T.ScaleFactor()); pos.Transform(T); } + +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_Ellipse::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_Ellipse); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Conic); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, majorRadius); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, minorRadius); +} diff --git a/src/Geom/Geom_Ellipse.hxx b/src/Geom/Geom_Ellipse.hxx index 845c1a76b6..75ff0a85ef 100644 --- a/src/Geom/Geom_Ellipse.hxx +++ b/src/Geom/Geom_Ellipse.hxx @@ -220,6 +220,8 @@ public: //! Creates a new object which is a copy of this ellipse. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/Geom/Geom_Geometry.cxx b/src/Geom/Geom_Geometry.cxx index 955bd5942d..8cf735462d 100644 --- a/src/Geom/Geom_Geometry.cxx +++ b/src/Geom/Geom_Geometry.cxx @@ -165,3 +165,8 @@ Handle(Geom_Geometry) Geom_Geometry::Translated (const gp_Pnt& P1, const gp_Pnt& } +void Geom_Geometry::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_Geometry); +} + diff --git a/src/Geom/Geom_Geometry.hxx b/src/Geom/Geom_Geometry.hxx index 4b6799a550..a24fe642c0 100644 --- a/src/Geom/Geom_Geometry.hxx +++ b/src/Geom/Geom_Geometry.hxx @@ -119,6 +119,8 @@ public: 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, const Standard_Integer theDepth = -1) const; DEFINE_STANDARD_RTTIEXT(Geom_Geometry,Standard_Transient) diff --git a/src/Geom/Geom_Hyperbola.cxx b/src/Geom/Geom_Hyperbola.cxx index 9c06858b5b..8b731cb775 100644 --- a/src/Geom/Geom_Hyperbola.cxx +++ b/src/Geom/Geom_Hyperbola.cxx @@ -388,3 +388,18 @@ void Geom_Hyperbola::Transform (const Trsf& T) { minorRadius = minorRadius * Abs(T.ScaleFactor()); pos.Transform(T); } + +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_Hyperbola::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_Hyperbola); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Conic); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, majorRadius); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, minorRadius); +} diff --git a/src/Geom/Geom_Hyperbola.hxx b/src/Geom/Geom_Hyperbola.hxx index 19023092b0..982beb27f5 100644 --- a/src/Geom/Geom_Hyperbola.hxx +++ b/src/Geom/Geom_Hyperbola.hxx @@ -276,6 +276,8 @@ public: //! Creates a new object which is a copy of this hyperbola. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/Geom/Geom_Line.cxx b/src/Geom/Geom_Line.cxx index de103abf45..336e9394ca 100644 --- a/src/Geom/Geom_Line.cxx +++ b/src/Geom/Geom_Line.cxx @@ -251,4 +251,16 @@ Standard_Real Geom_Line::ParametricTransformation(const gp_Trsf& T) const return Abs(T.ScaleFactor()); } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_Line::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_Line); + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Curve); + + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &pos); +} diff --git a/src/Geom/Geom_Line.hxx b/src/Geom/Geom_Line.hxx index 77355dbec8..1f586b672e 100644 --- a/src/Geom/Geom_Line.hxx +++ b/src/Geom/Geom_Line.hxx @@ -179,6 +179,8 @@ public: //! Creates a new object which is a copy of this line. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/Geom/Geom_OffsetCurve.cxx b/src/Geom/Geom_OffsetCurve.cxx index 5bdffddbf0..42664d651c 100644 --- a/src/Geom/Geom_OffsetCurve.cxx +++ b/src/Geom/Geom_OffsetCurve.cxx @@ -444,3 +444,21 @@ GeomAbs_Shape Geom_OffsetCurve::GetBasisCurveContinuity() const { return myBasisCurveContinuity; } + +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= +void Geom_OffsetCurve::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_OffsetCurve); + + 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); + //Handle(GeomEvaluator_OffsetCurve) myEvaluator; +} diff --git a/src/Geom/Geom_OffsetCurve.hxx b/src/Geom/Geom_OffsetCurve.hxx index a195a85e92..fd1e0cca81 100644 --- a/src/Geom/Geom_OffsetCurve.hxx +++ b/src/Geom/Geom_OffsetCurve.hxx @@ -281,6 +281,8 @@ public: //! Returns continuity of the basis curve. Standard_EXPORT GeomAbs_Shape GetBasisCurveContinuity() const; + //! Dumps the content of me into the stream + Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/Geom/Geom_OffsetSurface.cxx b/src/Geom/Geom_OffsetSurface.cxx index 207deca32d..de315999eb 100644 --- a/src/Geom/Geom_OffsetSurface.cxx +++ b/src/Geom/Geom_OffsetSurface.cxx @@ -966,3 +966,23 @@ Standard_Boolean Geom_OffsetSurface::VOsculatingSurface(const Standard_Real U, c { return !myOscSurf.IsNull() && myOscSurf->VOscSurf(U, V, t, L); } + +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_OffsetSurface::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_OffsetSurface); + + 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); + //OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myEvaluator.get()); +} diff --git a/src/Geom/Geom_OffsetSurface.hxx b/src/Geom/Geom_OffsetSurface.hxx index c568f3abac..8f5b16a302 100644 --- a/src/Geom/Geom_OffsetSurface.hxx +++ b/src/Geom/Geom_OffsetSurface.hxx @@ -357,6 +357,9 @@ public: inline GeomAbs_Shape GetBasisSurfContinuity() const { return myBasisSurfContinuity; } + //! Dumps the content of me into the stream + Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; + DEFINE_STANDARD_RTTIEXT(Geom_OffsetSurface,Geom_Surface) private: diff --git a/src/Geom/Geom_OsculatingSurface.cxx b/src/Geom/Geom_OsculatingSurface.cxx index da2a54df77..54936b37dc 100644 --- a/src/Geom/Geom_OsculatingSurface.cxx +++ b/src/Geom/Geom_OsculatingSurface.cxx @@ -799,5 +799,24 @@ void Geom_OsculatingSurface::ClearOsculFlags() } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= +void Geom_OsculatingSurface::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_OsculatingSurface); + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myBasisSurf.get()); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTol); + + if (!myOsculSurf1.IsNull()) + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOsculSurf1->Size()); + if (!myOsculSurf2.IsNull()) + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOsculSurf2->Size()); + if (!myKdeg.IsNull()) + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myKdeg->Size()); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAlong.Size()); +} diff --git a/src/Geom/Geom_OsculatingSurface.hxx b/src/Geom/Geom_OsculatingSurface.hxx index b96fcd2f2c..ffe671866d 100644 --- a/src/Geom/Geom_OsculatingSurface.hxx +++ b/src/Geom/Geom_OsculatingSurface.hxx @@ -65,6 +65,9 @@ public: //! along V at the point U,V. Standard_EXPORT Standard_Boolean VOscSurf (const Standard_Real U, const Standard_Real V, Standard_Boolean& t, Handle(Geom_BSplineSurface)& L) const; + //! Dumps the content of me into the stream + Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const; + DEFINE_STANDARD_RTTIEXT(Geom_OsculatingSurface,Standard_Transient) diff --git a/src/Geom/Geom_Parabola.cxx b/src/Geom/Geom_Parabola.cxx index 4115c294b3..e37b6f4576 100644 --- a/src/Geom/Geom_Parabola.cxx +++ b/src/Geom/Geom_Parabola.cxx @@ -306,4 +306,18 @@ Standard_Real Geom_Parabola::ParametricTransformation(const gp_Trsf& T) const return Abs(T.ScaleFactor()); } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_Parabola::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_Parabola); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Conic); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, focalLength); +} + diff --git a/src/Geom/Geom_Parabola.hxx b/src/Geom/Geom_Parabola.hxx index 8757c5594b..2cab9ae1a8 100644 --- a/src/Geom/Geom_Parabola.hxx +++ b/src/Geom/Geom_Parabola.hxx @@ -223,6 +223,8 @@ public: //! Creates a new object which is a copy of this parabola. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/Geom/Geom_Plane.cxx b/src/Geom/Geom_Plane.cxx index 65188e4f4c..f22674987f 100644 --- a/src/Geom/Geom_Plane.cxx +++ b/src/Geom/Geom_Plane.cxx @@ -381,3 +381,15 @@ gp_GTrsf2d Geom_Plane::ParametricTransformation(const gp_Trsf& T) const T2.SetScale(gp::Origin2d(), Abs(T.ScaleFactor())); return gp_GTrsf2d(T2); } + +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_Plane::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_Plane); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_ElementarySurface); +} diff --git a/src/Geom/Geom_Plane.hxx b/src/Geom/Geom_Plane.hxx index 07caac2445..d23135b092 100644 --- a/src/Geom/Geom_Plane.hxx +++ b/src/Geom/Geom_Plane.hxx @@ -218,6 +218,8 @@ public: //! Creates a new object which is a copy of this plane. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/Geom/Geom_RectangularTrimmedSurface.cxx b/src/Geom/Geom_RectangularTrimmedSurface.cxx index eec0b8aeca..c74df46715 100644 --- a/src/Geom/Geom_RectangularTrimmedSurface.cxx +++ b/src/Geom/Geom_RectangularTrimmedSurface.cxx @@ -653,3 +653,23 @@ gp_GTrsf2d Geom_RectangularTrimmedSurface::ParametricTransformation return basisSurf->ParametricTransformation(T); } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_RectangularTrimmedSurface::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_RectangularTrimmedSurface); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_BoundedSurface); + + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, basisSurf.get()); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, utrim1); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vtrim1); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, utrim2); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, vtrim2); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, isutrimmed); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, isvtrimmed); +} diff --git a/src/Geom/Geom_RectangularTrimmedSurface.hxx b/src/Geom/Geom_RectangularTrimmedSurface.hxx index 857797370b..a8329247f9 100644 --- a/src/Geom/Geom_RectangularTrimmedSurface.hxx +++ b/src/Geom/Geom_RectangularTrimmedSurface.hxx @@ -306,6 +306,8 @@ public: 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(Geom_RectangularTrimmedSurface,Geom_BoundedSurface) diff --git a/src/Geom/Geom_SphericalSurface.cxx b/src/Geom/Geom_SphericalSurface.cxx index a373e59b7a..a4484b0d79 100644 --- a/src/Geom/Geom_SphericalSurface.cxx +++ b/src/Geom/Geom_SphericalSurface.cxx @@ -360,3 +360,17 @@ void Geom_SphericalSurface::Transform (const Trsf& T) { radius = radius * Abs(T.ScaleFactor()); pos.Transform (T); } + +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_SphericalSurface::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_SphericalSurface); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_ElementarySurface); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, radius); +} diff --git a/src/Geom/Geom_SphericalSurface.hxx b/src/Geom/Geom_SphericalSurface.hxx index 827a468673..e4c10330c4 100644 --- a/src/Geom/Geom_SphericalSurface.hxx +++ b/src/Geom/Geom_SphericalSurface.hxx @@ -221,6 +221,8 @@ public: //! Creates a new object which is a copy of this sphere. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/Geom/Geom_Surface.cxx b/src/Geom/Geom_Surface.cxx index d01f1a9979..2ddc39566d 100644 --- a/src/Geom/Geom_Surface.cxx +++ b/src/Geom/Geom_Surface.cxx @@ -122,3 +122,15 @@ gp_Pnt Geom_Surface::Value(const Standard_Real U, D0(U,V,P); return P; } + +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_Surface::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_Surface); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Geometry); +} diff --git a/src/Geom/Geom_Surface.hxx b/src/Geom/Geom_Surface.hxx index a9faaf6299..5e330bf5f9 100644 --- a/src/Geom/Geom_Surface.hxx +++ b/src/Geom/Geom_Surface.hxx @@ -277,6 +277,8 @@ public: Standard_EXPORT gp_Pnt Value (const Standard_Real U, const Standard_Real V) const; + //! Dumps the content of me into the stream + Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; DEFINE_STANDARD_RTTIEXT(Geom_Surface,Geom_Geometry) diff --git a/src/Geom/Geom_SurfaceOfLinearExtrusion.cxx b/src/Geom/Geom_SurfaceOfLinearExtrusion.cxx index 62d816d994..a184d2c795 100644 --- a/src/Geom/Geom_SurfaceOfLinearExtrusion.cxx +++ b/src/Geom/Geom_SurfaceOfLinearExtrusion.cxx @@ -391,3 +391,17 @@ gp_GTrsf2d Geom_SurfaceOfLinearExtrusion::ParametricTransformation return TU * TV; } + +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_SurfaceOfLinearExtrusion::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_SurfaceOfLinearExtrusion); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_SweptSurface); + + //Handle(GeomEvaluator_SurfaceOfExtrusion) myEvaluator; +} diff --git a/src/Geom/Geom_SurfaceOfLinearExtrusion.hxx b/src/Geom/Geom_SurfaceOfLinearExtrusion.hxx index e0fb9d2f2f..110ed2128f 100644 --- a/src/Geom/Geom_SurfaceOfLinearExtrusion.hxx +++ b/src/Geom/Geom_SurfaceOfLinearExtrusion.hxx @@ -249,6 +249,9 @@ public: //! Creates a new object which is a copy of this surface of linear extrusion. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; + diff --git a/src/Geom/Geom_SurfaceOfRevolution.cxx b/src/Geom/Geom_SurfaceOfRevolution.cxx index d1b86e43e9..0e16233f32 100644 --- a/src/Geom/Geom_SurfaceOfRevolution.cxx +++ b/src/Geom/Geom_SurfaceOfRevolution.cxx @@ -457,3 +457,17 @@ gp_GTrsf2d Geom_SurfaceOfRevolution::ParametricTransformation return T2; } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_SurfaceOfRevolution::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_SurfaceOfRevolution); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_SweptSurface); + + //Handle(GeomEvaluator_SurfaceOfRevolution) myEvaluator; + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &loc); +} diff --git a/src/Geom/Geom_SurfaceOfRevolution.hxx b/src/Geom/Geom_SurfaceOfRevolution.hxx index e83528e732..d071d4a128 100644 --- a/src/Geom/Geom_SurfaceOfRevolution.hxx +++ b/src/Geom/Geom_SurfaceOfRevolution.hxx @@ -303,6 +303,9 @@ public: //! Creates a new object which is a copy of this surface of revolution. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; + DEFINE_STANDARD_RTTIEXT(Geom_SurfaceOfRevolution,Geom_SweptSurface) diff --git a/src/Geom/Geom_SweptSurface.cxx b/src/Geom/Geom_SweptSurface.cxx index d3c921f13a..d164b5d4e8 100644 --- a/src/Geom/Geom_SweptSurface.cxx +++ b/src/Geom/Geom_SweptSurface.cxx @@ -44,3 +44,19 @@ Handle(Geom_Curve) Geom_SweptSurface::BasisCurve () const { return basisCurve; } + +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_SweptSurface::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_SweptSurface); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_Surface); + + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, basisCurve.get()); + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &direction); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, smooth); +} diff --git a/src/Geom/Geom_SweptSurface.hxx b/src/Geom/Geom_SweptSurface.hxx index f7be27b3d1..ae79e9d299 100644 --- a/src/Geom/Geom_SweptSurface.hxx +++ b/src/Geom/Geom_SweptSurface.hxx @@ -66,6 +66,10 @@ public: Standard_EXPORT Handle(Geom_Curve) BasisCurve() const; + //! Dumps the content of me into the stream + Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; + + DEFINE_STANDARD_RTTIEXT(Geom_SweptSurface,Geom_Surface) diff --git a/src/Geom/Geom_ToroidalSurface.cxx b/src/Geom/Geom_ToroidalSurface.cxx index 2cba526d8d..79c101222f 100644 --- a/src/Geom/Geom_ToroidalSurface.cxx +++ b/src/Geom/Geom_ToroidalSurface.cxx @@ -397,3 +397,18 @@ void Geom_ToroidalSurface::Transform (const Trsf& T) { minorRadius = minorRadius * Abs(T.ScaleFactor()); pos.Transform (T); } + +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Geom_ToroidalSurface::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_ToroidalSurface); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_ElementarySurface); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, majorRadius); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, minorRadius); +} diff --git a/src/Geom/Geom_ToroidalSurface.hxx b/src/Geom/Geom_ToroidalSurface.hxx index 6c22fcafdb..d8bdeb6dd8 100644 --- a/src/Geom/Geom_ToroidalSurface.hxx +++ b/src/Geom/Geom_ToroidalSurface.hxx @@ -245,6 +245,8 @@ public: //! Creates a new object which is a copy of this torus. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/Geom/Geom_TrimmedCurve.cxx b/src/Geom/Geom_TrimmedCurve.cxx index 7fc934707b..b3344cd504 100644 --- a/src/Geom/Geom_TrimmedCurve.cxx +++ b/src/Geom/Geom_TrimmedCurve.cxx @@ -368,3 +368,19 @@ const return basisCurve->ParametricTransformation(T); } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= +void Geom_TrimmedCurve::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom_TrimmedCurve); + + OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom_BoundedCurve); + + OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, basisCurve.get()); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, uTrim1); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, uTrim2); +} + diff --git a/src/Geom/Geom_TrimmedCurve.hxx b/src/Geom/Geom_TrimmedCurve.hxx index 7656908070..39a785c67b 100644 --- a/src/Geom/Geom_TrimmedCurve.hxx +++ b/src/Geom/Geom_TrimmedCurve.hxx @@ -252,6 +252,8 @@ public: //! Creates a new object which is a copy of this trimmed curve. 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, const Standard_Integer theDepth = -1) const Standard_OVERRIDE; diff --git a/src/Geom2d/Geom2d_Geometry.cxx b/src/Geom2d/Geom2d_Geometry.cxx index 8d83dc2699..529c7d09c4 100644 --- a/src/Geom2d/Geom2d_Geometry.cxx +++ b/src/Geom2d/Geom2d_Geometry.cxx @@ -133,3 +133,8 @@ Handle(Geom2d_Geometry) Geom2d_Geometry::Translated (const gp_Pnt2d& P1, const g G->Translate (P1, P2); return G; } + +void Geom2d_Geometry::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Geom2d_Geometry); +} diff --git a/src/Geom2d/Geom2d_Geometry.hxx b/src/Geom2d/Geom2d_Geometry.hxx index b28d45359d..3fdfe54570 100644 --- a/src/Geom2d/Geom2d_Geometry.hxx +++ b/src/Geom2d/Geom2d_Geometry.hxx @@ -110,6 +110,8 @@ public: Standard_EXPORT virtual Handle(Geom2d_Geometry) Copy() const = 0; + //! Dumps the content of me into the stream + Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const; diff --git a/src/Poly/Poly_Polygon2D.cxx b/src/Poly/Poly_Polygon2D.cxx index 4e6fc6213e..948295b8df 100644 --- a/src/Poly/Poly_Polygon2D.cxx +++ b/src/Poly/Poly_Polygon2D.cxx @@ -66,3 +66,16 @@ const TColgp_Array1OfPnt2d& Poly_Polygon2D::Nodes() const } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Poly_Polygon2D::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Poly_Polygon2D); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDeflection); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNodes.Size()); +} + diff --git a/src/Poly/Poly_Polygon2D.hxx b/src/Poly/Poly_Polygon2D.hxx index 6e7d3dc93c..d74eba11b3 100644 --- a/src/Poly/Poly_Polygon2D.hxx +++ b/src/Poly/Poly_Polygon2D.hxx @@ -78,6 +78,8 @@ public: //! Returns the table of nodes for this polygon. Standard_EXPORT const TColgp_Array1OfPnt2d& Nodes() const; + //! Dumps the content of me into the stream + Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const; diff --git a/src/Poly/Poly_Polygon3D.cxx b/src/Poly/Poly_Polygon3D.cxx index a4f2881a9d..4899fba679 100644 --- a/src/Poly/Poly_Polygon3D.cxx +++ b/src/Poly/Poly_Polygon3D.cxx @@ -133,4 +133,18 @@ TColStd_Array1OfReal& Poly_Polygon3D::ChangeParameters() const return myParameters->ChangeArray1(); } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Poly_Polygon3D::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Poly_Polygon3D); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDeflection); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNodes.Size()); + if (!myParameters.IsNull()) + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myParameters->Size()); +} diff --git a/src/Poly/Poly_Polygon3D.hxx b/src/Poly/Poly_Polygon3D.hxx index da57e39994..5795266dd0 100644 --- a/src/Poly/Poly_Polygon3D.hxx +++ b/src/Poly/Poly_Polygon3D.hxx @@ -91,6 +91,8 @@ public: //! the data structure of this polygon. Standard_EXPORT TColStd_Array1OfReal& ChangeParameters() const; + //! Dumps the content of me into the stream + Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const; diff --git a/src/Poly/Poly_PolygonOnTriangulation.cxx b/src/Poly/Poly_PolygonOnTriangulation.cxx index 989c3c16fd..9f520a3ef1 100644 --- a/src/Poly/Poly_PolygonOnTriangulation.cxx +++ b/src/Poly/Poly_PolygonOnTriangulation.cxx @@ -16,6 +16,7 @@ #include +#include #include #include @@ -116,3 +117,17 @@ Handle(TColStd_HArray1OfReal) Poly_PolygonOnTriangulation::Parameters() const return myParameters; } +//======================================================================= +//function : DumpJson +//purpose : +//======================================================================= + +void Poly_PolygonOnTriangulation::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const +{ + OCCT_DUMP_CLASS_BEGIN (theOStream, Poly_PolygonOnTriangulation); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDeflection); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNodes.Size()); + if (!myParameters.IsNull()) + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myParameters->Size()); +} diff --git a/src/Poly/Poly_PolygonOnTriangulation.hxx b/src/Poly/Poly_PolygonOnTriangulation.hxx index d12424a47c..f9bf6f8534 100644 --- a/src/Poly/Poly_PolygonOnTriangulation.hxx +++ b/src/Poly/Poly_PolygonOnTriangulation.hxx @@ -101,6 +101,8 @@ public: //! are associated with the nodes in this polygon. Standard_EXPORT Handle(TColStd_HArray1OfReal) Parameters() const; + //! Dumps the content of me into the stream + Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const; diff --git a/src/Poly/Poly_Triangulation.cxx b/src/Poly/Poly_Triangulation.cxx index 3fa87b7323..7805ab967b 100644 --- a/src/Poly/Poly_Triangulation.cxx +++ b/src/Poly/Poly_Triangulation.cxx @@ -321,8 +321,11 @@ void Poly_Triangulation::DumpJson (Standard_OStream& theOStream, const Standard_ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDeflection); - //TColgp_Array1OfPnt myNodes; - //Handle(TColgp_HArray1OfPnt2d) myUVNodes; - //Poly_Array1OfTriangle myTriangles; - //Handle(TShort_HArray1OfShortReal) myNormals; + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNodes.Size()); + if (!myUVNodes.IsNull()) + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUVNodes->Size()); + + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTriangles.Size()); + if (!myNormals.IsNull()) + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNormals->Size()); } \ No newline at end of file diff --git a/src/TopoDS/TopoDS_TShape.cxx b/src/TopoDS/TopoDS_TShape.cxx index 5451b96622..f0f41f0487 100644 --- a/src/TopoDS/TopoDS_TShape.cxx +++ b/src/TopoDS/TopoDS_TShape.cxx @@ -28,11 +28,12 @@ IMPLEMENT_STANDARD_RTTIEXT(TopoDS_TShape,Standard_Transient) void TopoDS_TShape::DumpJson (Standard_OStream& theOStream, const Standard_Integer) const { 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, myFlags); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Free()); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Free()); diff --git a/src/TopoDS/TopoDS_TShape.hxx b/src/TopoDS/TopoDS_TShape.hxx index 342436d358..d1371a2843 100644 --- a/src/TopoDS/TopoDS_TShape.hxx +++ b/src/TopoDS/TopoDS_TShape.hxx @@ -127,7 +127,7 @@ public: Standard_Integer NbChildren() const { return myShapes.Size(); } //! Dumps the content of me into the stream - Standard_EXPORT 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; friend class TopoDS_Iterator; friend class TopoDS_Builder; diff --git a/src/gp/gp_Pnt2d.cxx b/src/gp/gp_Pnt2d.cxx index f51542f05c..918783e991 100644 --- a/src/gp/gp_Pnt2d.cxx +++ b/src/gp/gp_Pnt2d.cxx @@ -22,6 +22,7 @@ #include #include #include +#include #include void gp_Pnt2d::Transform (const gp_Trsf2d& T) @@ -69,3 +70,7 @@ gp_Pnt2d gp_Pnt2d::Mirrored (const gp_Ax2d& A) const return P; } +void gp_Pnt2d::DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth) const +{ + OCCT_DUMP_VECTOR_CLASS (theOStream, "gp_Pnt2d", 2, coord.X(), coord.Y()) +} diff --git a/src/gp/gp_Pnt2d.hxx b/src/gp/gp_Pnt2d.hxx index f991621ae1..a4c61267f5 100644 --- a/src/gp/gp_Pnt2d.hxx +++ b/src/gp/gp_Pnt2d.hxx @@ -151,6 +151,8 @@ public: Standard_NODISCARD gp_Pnt2d Translated (const gp_Pnt2d& P1, const gp_Pnt2d& P2) const; + //! Dumps the content of me into the stream + Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const; protected: