]> OCCT Git - occt-copy.git/commitdiff
0031378: Modeling algorithms - brep incremental mesh is frozen during STEP file loading
authornds <natalia.ermolaeva@opencascade.com>
Sat, 22 Feb 2020 04:34:48 +0000 (07:34 +0300)
committernds <nds@opencascade.com>
Sat, 22 Feb 2020 05:01:00 +0000 (08:01 +0300)
DumpJson

37 files changed:
src/AIS/AIS_InteractiveObject.hxx
src/BRepMesh/BRepMesh_Context.cxx
src/BRepMesh/BRepMesh_Context.hxx
src/BRepMesh/BRepMesh_DiscretRoot.cxx
src/BRepMesh/BRepMesh_DiscretRoot.hxx
src/BRepMesh/BRepMesh_EdgeDiscret.cxx
src/BRepMesh/BRepMesh_EdgeDiscret.hxx
src/BRepMesh/BRepMesh_FaceDiscret.cxx
src/BRepMesh/BRepMesh_FaceDiscret.hxx
src/BRepMesh/BRepMesh_IncrementalMesh.cxx
src/BRepMesh/BRepMesh_IncrementalMesh.hxx
src/BRepMesh/BRepMesh_ModelBuilder.cxx
src/BRepMesh/BRepMesh_ModelBuilder.hxx
src/BRepMesh/BRepMesh_ModelHealer.cxx
src/BRepMesh/BRepMesh_ModelHealer.hxx
src/BRepMesh/BRepMesh_ModelPostProcessor.hxx
src/BRepMesh/BRepMesh_ModelPreProcessor.hxx
src/BRepMeshData/BRepMeshData_Model.cxx
src/BRepMeshData/BRepMeshData_Model.hxx
src/IMeshData/IMeshData_Curve.hxx
src/IMeshData/IMeshData_Edge.hxx
src/IMeshData/IMeshData_Model.hxx
src/IMeshData/IMeshData_PCurve.hxx
src/IMeshData/IMeshData_ParametersList.hxx
src/IMeshData/IMeshData_Shape.hxx
src/IMeshData/IMeshData_TessellatedShape.hxx
src/IMeshTools/FILES
src/IMeshTools/IMeshTools_Context.cxx [new file with mode: 0644]
src/IMeshTools/IMeshTools_Context.hxx
src/IMeshTools/IMeshTools_MeshBuilder.cxx
src/IMeshTools/IMeshTools_MeshBuilder.hxx
src/IMeshTools/IMeshTools_ModelAlgo.hxx
src/IMeshTools/IMeshTools_ModelBuilder.hxx
src/Message/Message_Algorithm.cxx
src/Message/Message_Algorithm.hxx
src/Message/Message_ExecStatus.hxx
src/XmlDrivers/XmlDrivers_MessageReportStorage.cxx

index e461140b0a909a4cb2f26a1f45ba6a3ef6a2e137..b5d00b31c3f0e6c05b63d07b10ed5a9fb5eeb0c5 100644 (file)
@@ -125,6 +125,7 @@ public:
 
   //! Dumps the content of me into the stream
   Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
 protected:
 
   //! The TypeOfPresention3d means that the interactive object
index e48d038467c3efea18e13a1fc2bd8f387f505dec..cbb0592aa75fb786723322c4776be81cfdfa4637 100644 (file)
@@ -43,3 +43,13 @@ BRepMesh_Context::BRepMesh_Context ()
 BRepMesh_Context::~BRepMesh_Context ()
 {
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRepMesh_Context::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, IMeshTools_Context)
+}
index a802a6b44bf05184561e903f8f801f9cabd277f3..d4e3a2ffb3665692f21b98540c7aba463490aeba 100644 (file)
@@ -30,6 +30,9 @@ public:
   //! Destructor.
   Standard_EXPORT virtual ~BRepMesh_Context ();
 
+  //! 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_RTTI_INLINE(BRepMesh_Context, IMeshTools_Context)
 };
 
index e6d0978e63ea4dc4edfba674545ad02952474a95..753e5360439c6e17239f2ff82541b205cc07883b 100644 (file)
@@ -42,3 +42,15 @@ BRepMesh_DiscretRoot::~BRepMesh_DiscretRoot()
 void BRepMesh_DiscretRoot::init()
 {
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRepMesh_DiscretRoot::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myShape)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsDone)
+}
index 361cf0e242a67eca37094bff830d28d89d47814d..543bee6018213e5401fb87e224afadd0fe298c9d 100644 (file)
@@ -48,6 +48,8 @@ public:
   //! Compute triangulation for set shape.
   virtual void Perform() = 0;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1);
 
   DEFINE_STANDARD_RTTIEXT(BRepMesh_DiscretRoot,Standard_Transient)
 
index d9e575af43b9b0faffae33733bb110b6d4f7c312..4b9774ba7528613cbcc0e560ea9b0598ac3ba07f 100644 (file)
@@ -331,3 +331,13 @@ void BRepMesh_EdgeDiscret::Tessellate2d(
     }
   }
 }
+
+//=======================================================================
+// Function: DumpJson
+// Purpose : 
+//=======================================================================
+void BRepMesh_EdgeDiscret::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, IMeshTools_ModelAlgo)
+}
index 82ac8e48d2cd0b598cc8709a3f73815f6766fba2..334cf9ebb63ca090f6df1276b9b7653860fad164 100644 (file)
@@ -68,6 +68,9 @@ public:
     const IMeshData::IEdgeHandle& theDEdge,
     const Standard_Boolean        theUpdateEnds);
 
+  //! 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_RTTI_INLINE(BRepMesh_EdgeDiscret, IMeshTools_ModelAlgo)
 
 protected:
index ce6db2102e1c3271f551bd0b813a28148ad571e8..413da8c32e7400caa48dc904768949a6d4eedd3b 100644 (file)
@@ -93,3 +93,13 @@ void BRepMesh_FaceDiscret::process(const Standard_Integer theFaceIndex) const
     aDFace->SetStatus (IMeshData_Failure);
   }
 }
+
+//=======================================================================
+// Function: DumpJson
+// Purpose : 
+//=======================================================================
+void BRepMesh_FaceDiscret::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, IMeshTools_ModelAlgo)
+}
index 9ca86800b637fbe32e61b144f2691c0439f92fdc..45b06e632a0078986339df0e039d336f08a9392c 100644 (file)
@@ -41,6 +41,9 @@ public:
     process(theFaceIndex);
   }
 
+  //! 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_RTTI_INLINE(BRepMesh_FaceDiscret, IMeshTools_ModelAlgo)
 
 protected:
index 25627edc831140295ed8f365d9a8890e068a2035..ea157d7a385bb82c6107cac0d50932397e9b0261 100644 (file)
@@ -164,5 +164,19 @@ void BRepMesh_IncrementalMesh::SetParallelDefault(
   IS_IN_PARALLEL = theInParallel;
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRepMesh_IncrementalMesh::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRepMesh_DiscretRoot)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myParameters)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myModified)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myStatus)
+}
+
 //! Export Mesh Plugin entry function
 DISCRETPLUGIN(BRepMesh_IncrementalMesh)
index 4831ffa43463402f80673190b4807ed7f3311386..317d22b2c3af81c058b6ac5f719d721ae82c53b5 100644 (file)
@@ -129,6 +129,9 @@ public: //! @name plugin API
   //! Discret() static method (thus applied only to Mesh Factories).
   Standard_EXPORT static void SetParallelDefault(const Standard_Boolean isInParallel);
 
+  //! 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_RTTI_INLINE(BRepMesh_IncrementalMesh, BRepMesh_DiscretRoot)
 
 protected:
index 1a15482cdfb2636b6a9c63c7a3d32322a98d634a..8400d8bf392775d675c3db847041b66e169f1d05 100644 (file)
@@ -46,6 +46,10 @@ Handle (IMeshData_Model) BRepMesh_ModelBuilder::performInternal (
   const TopoDS_Shape&          theShape,
   const IMeshTools_Parameters& theParameters)
 {
+  MESSAGE_ADD_LEVEL_SENTRY
+  Handle(Message_Messenger) sout = aContext->GetModelBuilder()->GetMessenger();
+  sout << "BRepMesh_ModelBuilder::performInternal" << "" << Message_EndLine;
+
   Handle (BRepMeshData_Model) aModel;
 
   Bnd_Box aBox;
@@ -82,3 +86,14 @@ Handle (IMeshData_Model) BRepMesh_ModelBuilder::performInternal (
 
   return aModel;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRepMesh_ModelBuilder::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, IMeshTools_ModelBuilder)
+}
index 56898a1eebc90f396e47509a3b1d6e3da3c47532..218fed2f7f16bf5e9a0652b2b02313d9d14b58f4 100644 (file)
@@ -36,6 +36,9 @@ public:
   //! Destructor.
   Standard_EXPORT virtual ~BRepMesh_ModelBuilder ();
 
+  //! 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_RTTI_INLINE(BRepMesh_ModelBuilder, IMeshTools_ModelBuilder)
 
 protected:
index 6ad9b83f566c8f1c33a947452c933a88563b04d8..c23eb0b5e16f225f0ba65064240f1770baa464cb 100644 (file)
@@ -497,3 +497,13 @@ Standard_Boolean BRepMesh_ModelHealer::connectClosestPoints(
 
   return Standard_True;
 }
+
+//=======================================================================
+// Function: DumpJson
+// Purpose : 
+//=======================================================================
+void BRepMesh_ModelHealer::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, IMeshTools_ModelAlgo)
+}
index 2e95c02da448cdb6124ce7ae401cf91e916cc487..80da43f168b10002d907eb182cf4fb076b7d1879 100644 (file)
@@ -54,6 +54,9 @@ public:
     process(theDFace);
   }
 
+  //! 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_RTTI_INLINE(BRepMesh_ModelHealer, IMeshTools_ModelAlgo)
 
 protected:
index 129ba74b9e640fd80a0ba6b89f07f92f62e4fc28..46c1717b4d5d5eaeea7113f77e91cdd3c2ad031b 100644 (file)
@@ -32,7 +32,15 @@ public:
   //! Destructor.
   Standard_EXPORT virtual ~BRepMesh_ModelPostProcessor();
 
-  DEFINE_STANDARD_RTTI_INLINE(BRepMesh_ModelPostProcessor, IMeshTools_ModelAlgo)
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
+  //! Dumps the content of me into the stream
+  virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE
+  {
+    OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+    OCCT_DUMP_BASE_CLASS (theOStream, theDepth, IMeshTools_ModelAlgo)
+  }
 
 protected:
 
index 031053aa38de5b6957e8b7ff669d7b87e3548257..488f61a504adc6cfc5058786c0f94a83818fdacb 100644 (file)
@@ -33,6 +33,13 @@ public:
   //! Destructor.
   Standard_EXPORT virtual ~BRepMesh_ModelPreProcessor();
 
+  //! Dumps the content of me into the stream
+  virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE
+  {
+    OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+    OCCT_DUMP_BASE_CLASS (theOStream, theDepth, IMeshTools_ModelAlgo)
+  }
+
   DEFINE_STANDARD_RTTI_INLINE(BRepMesh_ModelPreProcessor, IMeshTools_ModelAlgo)
 
 protected:
index 08c07f8c96d9a6ff5067a981cef05d35420499e7..bd261179c07400fba3d019284f0a6ffe267518a7 100644 (file)
@@ -100,3 +100,19 @@ const IMeshData::IEdgeHandle& BRepMeshData_Model::GetEdge (const Standard_Intege
 {
   return myDEdges (theIndex);
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void BRepMeshData_Model::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, IMeshData_Model)
+
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMaxSize)
+  if (!myDFaces.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDFaces.Size())
+  if (!myDEdges.IsNull())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDEdges.Size())
+}
index 2b19684a73710d05dd0baf7a75f579a224238773..1bd2f541a16c5d253e2c9137b4edb758a53c7c94 100644 (file)
@@ -70,6 +70,9 @@ public: //! @name discrete edges
   //! Gets model's edge with the given index.
   Standard_EXPORT virtual const IMeshData::IEdgeHandle& GetEdge (const Standard_Integer theIndex) 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;
+
 private:
 
   Standard_Real                     myMaxSize;
index 505efad26227ca534f719116d29df1acfcf5001d..d0aae97f3371332262009bc9f7a4258645e07d1c 100644 (file)
@@ -49,6 +49,9 @@ public:
   //! Removes point with the given index.
   Standard_EXPORT virtual void RemovePoint (const Standard_Integer theIndex) = 0;
 
+  //! 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_RTTI_INLINE(IMeshData_Curve, IMeshData_ParametersList)
 
 protected:
index 162d2a20fa908b7803131116dd2f810026110997..fe7ea6c335986646ad8a4e4ffef9a907768d131e 100644 (file)
@@ -140,6 +140,9 @@ public:
     myDegenerated = theValue;
   }
 
+  //! 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_RTTI_INLINE(IMeshData_Edge, IMeshData_TessellatedShape)
 
 protected:
index 773ab6e9736d1f31f1a12d06191b916248794a68..2f51ccda2417aebffe8dd6a82f1601df2c6ff296 100644 (file)
@@ -63,6 +63,13 @@ public: //! @name discrete edges
   //! Gets model's edge with the given index.
   Standard_EXPORT virtual const IMeshData::IEdgeHandle& GetEdge (const Standard_Integer theIndex) const = 0;
 
+  //! Dumps the content of me into the stream
+  virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE
+  {
+    OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+    OCCT_DUMP_BASE_CLASS (theOStream, theDepth, IMeshData_Shape)
+  }
+
 protected:
 
   //! Constructor.
index 4c6530cf0e1d13a619d83741029fc8f28c4987df..d4a492625a69a381d54df01600606c50de39a0e2 100644 (file)
@@ -77,6 +77,9 @@ public:
     return myDFace;
   }
 
+  //! 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_RTTI_INLINE(IMeshData_PCurve, IMeshData_ParametersList)
 
 protected:
index 8190fd2f320bd475067ae69751804b1f7997085d..9779110931842d05b1b6fe4e3b24b1ffda9814fc 100644 (file)
@@ -38,6 +38,9 @@ public:
   //! Clears parameters list.
   Standard_EXPORT virtual void Clear(const Standard_Boolean isKeepEndPoints) = 0;
 
+  //! Dumps the content of me into the stream
+  virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const {}
+
   DEFINE_STANDARD_RTTI_INLINE(IMeshData_ParametersList, Standard_Transient)
 
 protected:
index eb5100a42a72b107dbc8030abe31a960decaf679..02d9c54f1aa97fd78895c7ecb2c3c1a670d742c1 100644 (file)
@@ -17,6 +17,7 @@
 #define _IMeshData_Shape_HeaderFile
 
 #include <Standard_Type.hxx>
+#include <Standard_Dump.hxx>
 #include <TopoDS_Shape.hxx>
 
 //! Interface class representing model with associated TopoDS_Shape.
@@ -43,6 +44,13 @@ public:
     return myShape;
   }
 
+  //! Dumps the content of me into the stream
+  virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
+  {
+    OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myShape)
+  }
+
   DEFINE_STANDARD_RTTI_INLINE(IMeshData_Shape, Standard_Transient)
 
 protected:
index 94001b032d85cb08591ea31d6acaade9b9c9271c..f57e44e521f02eaeebfffa35468a913b5021216e 100644 (file)
@@ -42,6 +42,19 @@ public:
     myDeflection = theValue;
   }
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
+  //! Dumps the content of me into the stream
+  virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE
+  {
+    OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+    OCCT_DUMP_BASE_CLASS (theOStream, theDepth, IMeshData_Shape)
+
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDeflection)
+  }
+
+
   DEFINE_STANDARD_RTTI_INLINE(IMeshData_TessellatedShape, IMeshData_Shape)
 
 protected:
index e582bc1d1b462e41b1f5252a5d58d4e7af538bfc..66b4f92699ad127e208cb5ec493f56b0cae4bc8c 100644 (file)
@@ -1,3 +1,4 @@
+IMeshTools_Context.cxx
 IMeshTools_Context.hxx
 IMeshTools_CurveTessellator.hxx
 IMeshTools_MeshAlgo.hxx
diff --git a/src/IMeshTools/IMeshTools_Context.cxx b/src/IMeshTools/IMeshTools_Context.cxx
new file mode 100644 (file)
index 0000000..803a862
--- /dev/null
@@ -0,0 +1,36 @@
+// Copyright (c) 2019 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#include <IMeshTools_Context.hxx>
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void IMeshTools_Context::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, IMeshData_Shape)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myModelBuilder.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myModel.get())
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myEdgeDiscret.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myModelHealer.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPreProcessor.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myFaceDiscret.get())
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myPostProcessor.get())
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myParameters)
+}
+
index fe77996c2e40e19cbacca0d5cc141d6fc9a584b5..443b2848b5e162de8eacae94586fc5ff9b5cc474 100644 (file)
@@ -63,6 +63,10 @@ public:
       return Standard_False;
     }
 
+    MESSAGE_ADD_LEVEL_SENTRY
+    Handle(Message_Messenger) sout = GetModelBuilder()->GetMessenger();
+    sout << "DiscretizeEdges" << "" << Message_EndLine;
+
     // Discretize edges of a model.
     return myEdgeDiscret->Perform(myModel, myParameters);
   }
@@ -77,6 +81,9 @@ public:
       return Standard_False;
     }
 
+    MESSAGE_ADD_LEVEL_SENTRY
+    Handle(Message_Messenger) sout = GetModelBuilder()->GetMessenger();
+    sout << "HealModel" << "" << Message_EndLine;
     return myModelHealer.IsNull() ?
       Standard_True :
       myModelHealer->Perform(myModel, myParameters);
@@ -92,6 +99,9 @@ public:
       return Standard_False;
     }
 
+    MESSAGE_ADD_LEVEL_SENTRY
+    Handle(Message_Messenger) sout = GetModelBuilder()->GetMessenger();
+    sout << "PreProcessModel" << "" << Message_EndLine;
     return myPreProcessor.IsNull() ? 
       Standard_True :
       myPreProcessor->Perform(myModel, myParameters);
@@ -106,6 +116,9 @@ public:
       return Standard_False;
     }
 
+    MESSAGE_ADD_LEVEL_SENTRY
+    Handle(Message_Messenger) sout = GetModelBuilder()->GetMessenger();
+    sout << "DiscretizeFaces" << "" << Message_EndLine;
     // Discretize faces of a model.
     return myFaceDiscret->Perform(myModel, myParameters);
   }
@@ -119,6 +132,9 @@ public:
       return Standard_False;
     }
 
+    MESSAGE_ADD_LEVEL_SENTRY
+    Handle(Message_Messenger) sout = GetModelBuilder()->GetMessenger();
+    sout << "PostProcessModel" << "" << Message_EndLine;
     return myPostProcessor.IsNull() ?
       Standard_True :
       myPostProcessor->Perform(myModel, myParameters);
@@ -223,6 +239,9 @@ public:
     return myModel;
   }
 
+  //! 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_RTTI_INLINE(IMeshTools_Context, IMeshData_Shape)
 
 private:
index 3b67a6c7985f51da16e72f775c500914d325221e..fab7f3f7f9c15908987f5f776b9a64302a945c83 100644 (file)
@@ -58,6 +58,10 @@ void IMeshTools_MeshBuilder::Perform ()
     return;
   }
 
+  MESSAGE_ADD_LEVEL_SENTRY
+  Handle(Message_Messenger) sout = aContext->GetModelBuilder()->GetMessenger();
+  sout << "IMeshTools_MeshBuilder::Perform" << "" << Message_EndLine;
+
   if (aContext->BuildModel ())
   {
     if (aContext->DiscretizeEdges ())
@@ -116,3 +120,15 @@ void IMeshTools_MeshBuilder::Perform ()
 
   aContext->Clean ();
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void IMeshTools_MeshBuilder::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Message_Algorithm)
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myContext.get())
+}
index 8c0d314224fbf19432bcfe36a619b0be3a7f4f30..e94a4df41cf3adbab381a9f541146f216cc62b49 100644 (file)
@@ -64,6 +64,9 @@ public:
   //! Performs meshing ot the shape using current context.
   Standard_EXPORT virtual void Perform ();
 
+  //! 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_RTTI_INLINE(IMeshTools_MeshBuilder, Message_Algorithm)
 
 private:
index 963c880c7559175cfb80228b9d4fdcbb306d6cbd..f9a5740ae2ab421e827d0d115ac3c6d288bbf99d 100644 (file)
@@ -51,6 +51,13 @@ public:
     }
   }
 
+  //! Dumps the content of me into the stream
+  virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
+  {
+    (void)theDepth;
+    OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+  }
+
   DEFINE_STANDARD_RTTI_INLINE(IMeshTools_ModelAlgo, Standard_Transient)
 
 protected:
index 5d6d4169325d65bf87e6fecc5b9eb068f3f96586..c6ad0ed3e39d045d74168de4f83c5d4436aae7b9 100644 (file)
@@ -61,6 +61,9 @@ public:
     }
   }
 
+  //! 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_RTTI_INLINE(IMeshTools_ModelBuilder, Message_Algorithm)
 
 protected:
index df663d35673a4c22d6100599494bcc6252909fab..e790e156bece2a39dbaf036e2112217c695c83ee 100644 (file)
@@ -431,3 +431,22 @@ TCollection_ExtendedString Message_Algorithm::PrepareReport
   }
   return aNewReport;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void Message_Algorithm::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myStatus)
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myMessenger)
+
+  if (!myReportIntegers.IsEmpty())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myReportIntegers.Length())
+  if (!myReportStrings.IsEmpty())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myReportStrings.Length())
+  if (!myReportMessages.IsEmpty())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myReportMessages.Length())
+}
index 8b8df3a378fafc7adb6932659cf935143524abaf..3637133821ac196771746c028aef1d2858241508 100644 (file)
@@ -197,6 +197,9 @@ public:
   //! in theReportSeq sequence, but not more than theMaxCount
   Standard_EXPORT static TCollection_ExtendedString PrepareReport (const TColStd_SequenceOfHExtendedString& theReportSeq, const Standard_Integer theMaxCount);
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
 
 
 
index 42eb19c6b99c729aaa5423fb0a85f44b2127982d..06d06b8df0d5e741179323c4e80ffc108fd76061 100644 (file)
@@ -21,6 +21,8 @@
 #include <Message_StatusType.hxx>
 #include <Message_Status.hxx>
 
+#include <Standard_Dump.hxx>
+
 /**
  * Tiny class for extended handling of error / execution
  * status of algorithm in universal way.
@@ -162,6 +164,16 @@ class Message_ExecStatus
   const Message_ExecStatus& operator &= ( const Message_ExecStatus& theOther )
   { And ( theOther ); return *this; }
 
+  //! Dumps the content of me into the stream
+  virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
+  {
+    (void)theDepth;
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDone)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myWarn)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAlarm)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFail)
+  }
+
   //@}
 
  public:
index c0d1088e2aacc834990693a96c735b5398ccf251..2abde3880880be88f1de371a87b653e53ade3e5b 100644 (file)
@@ -23,6 +23,7 @@
 #include <Message_Level.hxx>
 #include <Message_Report.hxx>
 
+#include <BinTools.hxx>
 #include <Standard_Dump.hxx>
 
 #include <TCollection.hxx>
@@ -35,6 +36,8 @@
 #include <TDocStd_Application.hxx>
 #include <TDocStd_Document.hxx>
 
+#include <TopoDS_AlertWithShape.hxx>
+
 #include <XmlDrivers.hxx>
 
 // =======================================================================
@@ -259,13 +262,21 @@ void XmlDrivers_MessageReportStorage::exportAlertParameters (const Handle(Messag
   TDataStd_AsciiString::Set (theAlertLabel, anAttribute->GetName());
 
   Standard_CString aDynamicTypeName = anAttribute->DynamicType()->Name();
+  TCollection_AsciiString aStreamText;
   if (aDynamicTypeName == STANDARD_TYPE (Message_AttributeStream)->Name())
   {
     Handle(Message_AttributeStream) aValuesArrayAlert = Handle(Message_AttributeStream)::DownCast (anAttribute);
-    // store values
-    TCollection_AsciiString aStreamText = Standard_Dump::Text (aValuesArrayAlert->Stream());
-    if (aStreamText.IsEmpty())
-      return;
+    aStreamText = Standard_Dump::Text (aValuesArrayAlert->Stream());
+  }
+  else if (aDynamicTypeName == STANDARD_TYPE (TopoDS_AlertWithShape)->Name())
+  {
+    Handle(TopoDS_AlertWithShape) aShapeAttribute = Handle(TopoDS_AlertWithShape)::DownCast (anAttribute);
+    Standard_SStream aStream;
+    if (BinTools::Write (aShapeAttribute->GetShape(), aStream))
+      aStreamText = Standard_Dump::Text (aStream);
+  }
+  if (!aStreamText.IsEmpty())
+  {
     Handle(TDataStd_ExtStringArray) aListAttribute = TDataStd_ExtStringArray::Set (theAlertLabel, 0, 0);
     aListAttribute->SetValue (0, aStreamText);
   }
@@ -290,7 +301,8 @@ Handle(Message_Alert) XmlDrivers_MessageReportStorage::importAlertParameters (co
   Handle(Message_Attribute) aMessageAttribute;
   if (aDynamicTypeName == STANDARD_TYPE (Message_Attribute)->Name())
     aMessageAttribute = new Message_Attribute();
-  else if (aDynamicTypeName == STANDARD_TYPE (Message_AttributeStream)->Name())
+  else if (aDynamicTypeName == STANDARD_TYPE (Message_AttributeStream)->Name() ||
+           aDynamicTypeName == STANDARD_TYPE (TopoDS_AlertWithShape)->Name())
   {
     // values
     NCollection_Vector<TCollection_AsciiString> anArrayValues;
@@ -306,7 +318,17 @@ Handle(Message_Alert) XmlDrivers_MessageReportStorage::importAlertParameters (co
     {
       aStream << aValuesAttribute->Value (aValueId);
     }
-    aMessageAttribute = new Message_AttributeStream (aStream);
+
+    if (aDynamicTypeName == STANDARD_TYPE (Message_AttributeStream)->Name())
+    {
+      aMessageAttribute = new Message_AttributeStream (aStream);
+    }
+    else if (aDynamicTypeName == STANDARD_TYPE (TopoDS_AlertWithShape)->Name())
+    {
+      TopoDS_Shape aShape;
+      if (BinTools::Read (aShape, aStream))
+        aMessageAttribute = new TopoDS_AlertWithShape (aShape);
+    }
   }
 
   if (!aMessageAttribute.IsNull())