return 20;
}
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void Adaptor2d_Curve2d::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, Adaptor2d_Curve2d)
+}
Standard_EXPORT virtual Handle(Geom2d_BSplineCurve) BSpline() const;
Standard_EXPORT virtual ~Adaptor2d_Curve2d();
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
virtual Handle(Geom2d_BSplineCurve) BSpline() const;
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
DEFINE_STANDARD_RTTIEXT(Adaptor2d_HCurve2d,Standard_Transient)
};
return Curve2d().BSpline();
}
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+ inline void Adaptor2d_HCurve2d::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, Adaptor2d_HCurve2d)
+}
{
throw Standard_NotImplemented("Adaptor3d_Curve::OffsetCurve");
}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void Adaptor3d_Curve::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, Adaptor3d_Curve)
+}
Standard_EXPORT virtual ~Adaptor3d_Curve();
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
}
}
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void Adaptor3d_CurveOnSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, Adaptor3d_CurveOnSurface)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Adaptor3d_CurveOnSurface)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myType)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCirc)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLin)
+
+ if (!myIntervals.IsNull())
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIntervals->Length())
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIntCont)
+}
Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() 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;
+
Handle(Geom_OffsetCurve) OffsetCurve() const;
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
DEFINE_STANDARD_RTTIEXT(Adaptor3d_HCurve,Standard_Transient)
{
return Curve().OffsetCurve();
}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+ inline void Adaptor3d_HCurve::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, Adaptor3d_HCurve)
+}
//! Returns the curve used to create the GenHCurve.
Adaptor3d_CurveOnSurface& ChangeCurve();
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
#define Handle_Adaptor3d_GenHCurve Handle(Adaptor3d_HCurveOnSurface)
#include <Adaptor3d_GenHCurve.gxx>
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void Adaptor3d_HCurveOnSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Adaptor3d_HCurve)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCurve)
+}
Standard_Real OffsetValue() const;
+ //! Dumps the content of me into the stream
+ virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
{
return Surface().OffsetValue();
}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+ inline void Adaptor3d_HSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+}
{
throw Standard_NotImplemented("Adaptor3d_Surface::OffsetValue");
}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void Adaptor3d_Surface::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, Adaptor3d_Surface)
+}
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
+#include <Standard_OStream.hxx>
#include <Standard_Real.hxx>
#include <GeomAbs_Shape.hxx>
Standard_EXPORT virtual Standard_Real OffsetValue() const;
Standard_EXPORT virtual ~Adaptor3d_Surface();
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
return myTrsf.Form() == gp_Identity
? anOffC : Handle(Geom_OffsetCurve)::DownCast(anOffC->Transformed(myTrsf));
}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void BRepAdaptor_Curve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, BRepAdaptor_Curve)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Adaptor3d_Curve)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myTrsf)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCurve)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myConSurf.get())
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myEdge)
+}
Standard_EXPORT Handle(Geom_OffsetCurve) OffsetCurve() 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;
+
protected:
return myFace;
}
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void BRepAdaptor_Curve2d::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, BRepAdaptor_Curve2d)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Geom2dAdaptor_Curve)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myEdge)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myFace)
+}
//! Returns the Face.
Standard_EXPORT const TopoDS_Face& Face() const;
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
//! Returns the curve used to create the GenHCurve.
BRepAdaptor_Curve2d& ChangeCurve2d();
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
#define Handle_Adaptor2d_GenHCurve2d Handle(BRepAdaptor_HCurve2d)
#include <Adaptor2d_GenHCurve2d.gxx>
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void BRepAdaptor_HCurve2d::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Adaptor2d_HCurve2d)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCurve)
+}
//! Returns the surface used to create the GenHSurface.
BRepAdaptor_Surface& ChangeSurface();
+ //! Dumps the content of me into the stream
+ virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
#define Handle_Adaptor3d_GenHSurface Handle(BRepAdaptor_HSurface)
#include <Adaptor3d_GenHSurface.gxx>
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void BRepAdaptor_HSurface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Adaptor3d_HSurface)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &mySurf)
+}
return mySurf.OffsetValue();
}
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void BRepAdaptor_Surface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, BRepAdaptor_Surface)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Adaptor3d_Surface)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &mySurf)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myTrsf)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myFace)
+}
Standard_EXPORT Standard_Real OffsetValue() 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;
#include <IMeshData_Curve.hxx>
#include <BRepMesh_Delaun.hxx>
#include <BRepMesh_ShapeTool.hxx>
+#include <Message.hxx>
+#include <TopoDS_AlertAttribute.hxx>
#include <Standard_ErrorHandler.hxx>
//=======================================================================
if (initDataStructure())
{
+ OCCT_SEND_DUMPJSON (myStructure.get())
+ OCCT_SEND_SHAPE (myStructure->DumpToShape());
generateMesh();
+ OCCT_SEND_DUMPJSON (myStructure.get())
+ OCCT_SEND_SHAPE (myStructure->DumpToShape());
commitSurfaceTriangulation();
}
}
//=======================================================================
Standard_Boolean BRepMesh_BaseMeshAlgo::initDataStructure()
{
+ OCCT_ADD_MESSAGE_LEVEL_SENTRY
+ OCCT_SEND_MESSAGE ("initDataStructure")
+ OCCT_SEND_DUMPJSON (this)
+
for (Standard_Integer aWireIt = 0; aWireIt < myDFace->WiresNb(); ++aWireIt)
{
const IMeshData::IWireHandle& aDWire = myDFace->GetWire(aWireIt);
{
const IMeshData::IEdgeHandle aDEdge = aDWire->GetEdge(aEdgeIt);
const IMeshData::ICurveHandle& aCurve = aDEdge->GetCurve();
+
+ OCCT_SEND_DUMPJSON (aCurve.get())
+
const IMeshData::IPCurveHandle& aPCurve = aDEdge->GetPCurve(
myDFace.get(), aDWire->GetEdgeOrientation(aEdgeIt));
aPCurve->GetPoint(aPointIt),
BRepMesh_Frontier, Standard_False/*aPointIt > 0 && aPointIt < aLastPoint*/);
+ gp_Pnt aPnt1 = aCurve ->GetPoint(aPointIt);
+ gp_Pnt2d aPnt1_2d = aPCurve ->GetPoint(aPointIt);
+ gp_Pnt aPnt2 (aPnt1_2d.X(), aPnt1_2d.Y(), 0.0);
+ OCCT_SEND_DUMPJSON (&aPnt1)
+ OCCT_SEND_DUMPJSON (&aPnt2)
+ TCollection_AsciiString anIndexStr = TCollection_AsciiString ("Index = ") + aNodeIndex;
+ OCCT_SEND_MESSAGE (anIndexStr)
+ TCollection_AsciiString aPIndexStr = TCollection_AsciiString ("PrevNodeIndex = ") + aPrevNodeIndex;
+ OCCT_SEND_MESSAGE (aPIndexStr)
+
aPCurve->GetIndex(aPointIt) = aNodeIndex;
myUsedNodes->Bind(aNodeIndex, aNodeIndex);
if (aPrevNodeIndex != -1 && aPrevNodeIndex != aNodeIndex)
{
+ OCCT_SEND_MESSAGE ("Add link")
const Standard_Integer aLinksNb = myStructure->NbLinks();
const Standard_Integer aLinkIndex = addLinkToMesh(aPrevNodeIndex, aNodeIndex, aOri);
if (aWireIt != 0 && aLinkIndex <= aLinksNb)
{
// Prevent holes around wire of zero area.
BRepMesh_Edge& aLink = const_cast<BRepMesh_Edge&>(myStructure->GetLink(aLinkIndex));
+ OCCT_SEND_DUMPJSON (&aLink)
aLink.SetMovability(BRepMesh_Fixed);
}
}
}
}
+ OCCT_SEND_DUMPJSON (this)
return Standard_True;
}
{
return theVertex.Coord();
}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void BRepMesh_BaseMeshAlgo::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, IMeshTools_MeshAlgo)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myDFace.get())
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myParameters)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myStructure.get())
+
+ if (!myNodesMap.IsNull())
+ {
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNodesMap->Size())
+ for (VectorOfPnt::Iterator aNodesIt (*myNodesMap); aNodesIt.More(); aNodesIt.Next())
+ {
+ const gp_Pnt aNodePoint = aNodesIt.Value();
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aNodePoint)
+ }
+ }
+ if (!myUsedNodes.IsNull())
+ {
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUsedNodes->Extent())
+ for (DMapOfIntegerInteger::Iterator aUsedIt (*myUsedNodes); aUsedIt.More(); aUsedIt.Next())
+ {
+ Standard_Integer aNodeIndex = aUsedIt.Key();
+ Standard_Integer aUsedCount = aUsedIt.Value();
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aNodeIndex)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aUsedCount)
+ }
+ }
+}
const IMeshData::IFaceHandle& theDFace,
const IMeshTools_Parameters& theParameters) Standard_OVERRIDE;
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
DEFINE_STANDARD_RTTI_INLINE(BRepMesh_BaseMeshAlgo, IMeshTools_MeshAlgo)
protected:
return myRadius;
}
+ //! Dumps the content of me into the stream
+ virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
+ {
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLocation)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myRadius)
+ }
+
private:
gp_XY myLocation;
return (theIndex == theTargetIndex);
}
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
+ {
+ OCCT_DUMP_CLASS_BEGIN (theOStream, BRepMesh_VertexInspector)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySqTolerance)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myResIndices.Extent())
+
+ for (Standard_Integer anIt = 1; anIt <= myCircles.Length(); ++anIt)
+ {
+ const BRepMesh_Circle& aCircle = myCircles.Value(anIt - 1);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aCircle)
+ }
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPoint)
+ }
+
private:
Standard_Real mySqTolerance;
IMeshData::ListOfInteger myResIndices;
BRepMesh_Circle aNullCir(gp::Origin2d().Coord(), -1.);
mySelector.Bind(theIndex, aNullCir);
}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void BRepMesh_CircleTool::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, BRepMesh_CircleTool)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &mySelector)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myFaceMax)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myFaceMin)
+}
//! @param thePoint bullet point.
Standard_EXPORT IMeshData::ListOfInteger& Select(const gp_XY& thePoint);
+ //! Dumps the content of me into the stream
+ Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
private:
//! Creates circle with the given parameters and binds it to the tool.
#include <BRepMesh_BaseMeshAlgo.hxx>
#include <NCollection_Shared.hxx>
#include <IMeshTools_Parameters.hxx>
+#include <Standard_Dump.hxx>
class BRepMesh_DataStructureOfDelaun;
class BRepMesh_Delaun;
{
}
+ //! Dumps the content of me into the stream
+ virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE
+ {
+ (void)theDepth;
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRepMesh_BaseMeshAlgo)
+ }
+
DEFINE_STANDARD_RTTI_INLINE(BRepMesh_ConstrainedBaseMeshAlgo, BRepMesh_BaseMeshAlgo)
protected:
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)
+}
//! 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)
};
splitSegment (theSurf, theCurve2d, theFirst, midpar, theNbIter + 1);
splitSegment (theSurf, theCurve2d, midpar, theLast, theNbIter + 1);
}
+
+//=======================================================================
+// Function: DumpJson
+// Purpose :
+//=======================================================================
+void BRepMesh_CurveTessellator::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, IMeshTools_CurveTessellator)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myDEdge.get())
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myParameters)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myEdge)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCurve)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myDiscretTool)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myFirstVertex)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myLastVertex)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySquareEdgeDef)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySquareMinSize)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myEdgeSqTol)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFaceRangeU[0])
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFaceRangeU[1])
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFaceRangeV[0])
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFaceRangeV[1])
+}
gp_Pnt& thePoint,
Standard_Real& theParameter) const Standard_OVERRIDE;
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
DEFINE_STANDARD_RTTI_INLINE(BRepMesh_CurveTessellator, IMeshTools_CurveTessellator)
private:
{
}
+ //! Dumps the content of me into the stream
+ virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE
+ {
+ (void)theDepth;
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRepMesh_ConstrainedBaseMeshAlgo)
+ }
+
DEFINE_STANDARD_RTTI_INLINE(BRepMesh_CustomBaseMeshAlgo, BRepMesh_ConstrainedBaseMeshAlgo)
protected:
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
#include <BRepMesh_Edge.hxx>
+#include <Message_Messenger.hxx>
#include <TopoDS_Compound.hxx>
#include <BRep_Builder.hxx>
{
myElements.Append(theElement);
Standard_Integer aElementIndex = myElements.Size();
+ OCCT_SEND_MESSAGE (TCollection_AsciiString ("AddElement: ") + aElementIndex)
+
myElementsOfDomain.Add(aElementIndex);
const Standard_Integer (&e)[3] = theElement.myEdges;
void BRepMesh_DataStructureOfDelaun::RemoveElement(
const Standard_Integer theIndex)
{
+ OCCT_SEND_MESSAGE (TCollection_AsciiString ("RemoveElement: ") + theIndex)
+
BRepMesh_Triangle& aElement = (BRepMesh_Triangle&)GetElement(theIndex);
if (aElement.Movability() == BRepMesh_Deleted)
return;
theStream << "\n Elements : " << myElements.Size() << std::endl;
}
+//=======================================================================
+//function : BRepMesh_DumpToShape
+//purpose :
+// Global function not declared in any public header, intended for use
+// from debugger prompt (Command Window in Visual Studio).
+//
+// Stores the mesh data structure to BRep file with the given name.
+//=======================================================================
+TopoDS_Shape BRepMesh_DumpToShape(void* theMeshHandlePtr)
+{
+ if (theMeshHandlePtr == 0)
+ {
+ return TopoDS_Shape();
+ }
+
+ Handle(BRepMesh_DataStructureOfDelaun) aMeshData =
+ *(Handle(BRepMesh_DataStructureOfDelaun)*)theMeshHandlePtr;
+
+ if (aMeshData.IsNull())
+ return TopoDS_Shape();
+
+ TopoDS_Compound aMesh;
+ BRep_Builder aBuilder;
+ aBuilder.MakeCompound(aMesh);
+
+ try
+ {
+ OCC_CATCH_SIGNALS
+
+ if (aMeshData->LinksOfDomain().IsEmpty())
+ {
+ const Standard_Integer aNodesNb = aMeshData->NbNodes();
+ for (Standard_Integer i = 1; i <= aNodesNb; ++i)
+ {
+ const gp_XY& aNode = aMeshData->GetNode(i).Coord();
+ gp_Pnt aPnt(aNode.X(), aNode.Y(), 0.);
+ aBuilder.Add(aMesh, BRepBuilderAPI_MakeVertex(aPnt));
+ }
+ }
+ else
+ {
+ IMeshData::IteratorOfMapOfInteger aLinksIt(aMeshData->LinksOfDomain());
+ for (; aLinksIt.More(); aLinksIt.Next())
+ {
+ const BRepMesh_Edge& aLink = aMeshData->GetLink(aLinksIt.Key());
+ gp_Pnt aPnt[2];
+ for (Standard_Integer i = 0; i < 2; ++i)
+ {
+ const Standard_Integer aNodeId =
+ (i == 0) ? aLink.FirstNode() : aLink.LastNode();
+
+ const gp_XY& aNode = aMeshData->GetNode(aNodeId).Coord();
+ aPnt[i] = gp_Pnt(aNode.X(), aNode.Y(), 0.);
+ }
+
+ if (aPnt[0].SquareDistance(aPnt[1]) < Precision::SquareConfusion())
+ continue;
+
+ aBuilder.Add(aMesh, BRepBuilderAPI_MakeEdge(aPnt[0], aPnt[1]));
+ }
+ }
+
+ //if (!BRepTools::Write(aMesh, theFileNameStr))
+ // return "Error: write failed";
+ }
+ catch (Standard_Failure const& anException)
+ {
+ //return anException.GetMessageString();
+ }
+ return aMesh;
+
+ //return theFileNameStr;
+}
+
//=======================================================================
//function : BRepMesh_Write
//purpose :
if (aMeshData.IsNull())
return "Error: mesh data is empty";
- TopoDS_Compound aMesh;
+ TopoDS_Shape aShape = BRepMesh_DumpToShape(theMeshHandlePtr);
+ if (!BRepTools::Write(aShape, theFileNameStr))
+ return "Error: write failed";
+
+ /*TopoDS_Compound aMesh;
BRep_Builder aBuilder;
aBuilder.MakeCompound(aMesh);
catch (Standard_Failure const& anException)
{
return anException.GetMessageString();
- }
+ }*/
return theFileNameStr;
}
+TopoDS_Shape BRepMesh_DataStructureOfDelaun::DumpToShape()
+{
+ Handle(BRepMesh_DataStructureOfDelaun) aMeshData (this);
+ return BRepMesh_DumpToShape((void*)&aMeshData);
+}
+
void BRepMesh_DataStructureOfDelaun::Dump(Standard_CString theFileNameStr)
{
Handle(BRepMesh_DataStructureOfDelaun) aMeshData (this);
BRepMesh_Dump((void*)&aMeshData, theFileNameStr);
}
+
+void BRepMesh_DataStructureOfDelaun::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myNodes.get())
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myNodeLinks.Size())
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLinks.Size())
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDelLinks.Size())
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myElements.Size())
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myElementsOfDomain.Extent())
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLinksOfDomain.Extent())
+
+ for (IMeshData::VectorOfElements::Iterator aElementIt(myElements); aElementIt.More(); aElementIt.Next())
+ {
+ const BRepMesh_Triangle& anElement = aElementIt.Value();
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &anElement)
+ }
+
+ for (IMeshData::IDMapOfLink::Iterator aLinkIt (myLinks); aLinkIt.More(); aLinkIt.Next())
+ {
+ const BRepMesh_Edge& anEdge = aLinkIt.Key();
+ const BRepMesh_PairOfIndex& aPair = aLinkIt.Value();
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &anEdge)
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aPair)
+ }
+}
//! Finds the index of the given node.
//! @param theNode node to find.
- //! @return index of the given element of zero if node is not in the mesh.
+ //! @return index of the given element or zero if node is not in the mesh.
Standard_Integer IndexOf(const BRepMesh_Vertex& theNode)
{
return myNodes->FindIndex(theNode);
const BRepMesh_Triangle& theElement,
Standard_Integer (&theNodes)[3]);
+ Standard_EXPORT TopoDS_Shape DumpToShape();
+
Standard_EXPORT void Dump(Standard_CString theFileNameStr);
clearDeletedNodes();
}
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
DEFINE_STANDARD_RTTI_INLINE(BRepMesh_DataStructureOfDelaun, Standard_Transient)
private:
#include <BRepMesh_Triangle.hxx>
#include <NCollection_Vector.hxx>
+#include <Message.hxx>
+#include <Message_Level.hxx>
+#include <Message_Messenger.hxx>
+#include <TopoDS_AlertAttribute.hxx>
+
#include <algorithm>
#include <stack>
const Standard_Integer theCellsCountU /* = -1 */,
const Standard_Integer theCellsCountV /* = -1 */)
{
+ OCCT_ADD_MESSAGE_LEVEL_SENTRY
+ OCCT_SEND_MESSAGE ("BRepMesh_Delaun::perform")
+ OCCT_SEND_DUMPJSON (this)
+
if (theVertexIndices.Length () <= 2)
{
return;
std::make_heap(theVertexIndices.begin(), theVertexIndices.end(), aCmp);
std::sort_heap(theVertexIndices.begin(), theVertexIndices.end(), aCmp);
+ OCCT_SEND_DUMPJSON (this)
compute( theVertexIndices );
}
//=======================================================================
void BRepMesh_Delaun::compute(IMeshData::VectorOfInteger& theVertexIndexes)
{
+ OCCT_ADD_MESSAGE_LEVEL_SENTRY
+ OCCT_SEND_MESSAGE ("BRepMesh_Delaun::compute")
+
// Insertion of edges of super triangles in the list of free edges:
Handle(NCollection_IncAllocator) aAllocator = new NCollection_IncAllocator(
IMeshData::MEMORY_BLOCK_SIZE_HUGE);
aLoopEdges.Bind( e[1], Standard_True );
aLoopEdges.Bind( e[2], Standard_True );
+ OCCT_SEND_SHAPE (myMeshData->DumpToShape());
if ( theVertexIndexes.Length() > 0 )
{
// Creation of 3 trianglers with the first node and the edges of the super triangle:
Standard_Integer anVertexIdx = theVertexIndexes.Lower();
createTriangles( theVertexIndexes( anVertexIdx ), aLoopEdges );
+ OCCT_SEND_SHAPE (myMeshData->DumpToShape());
// Add other nodes to the mesh
createTrianglesOnNewVertices( theVertexIndexes );
}
+ OCCT_SEND_SHAPE (myMeshData->DumpToShape());
// Destruction of triangles containing a top of the super triangle
BRepMesh_SelectorOfDataStructureOfDelaun aSelector( myMeshData );
void BRepMesh_Delaun::createTriangles(const Standard_Integer theVertexIndex,
IMeshData::MapOfIntegerInteger& thePoly)
{
+ OCCT_ADD_MESSAGE_LEVEL_SENTRY
+ OCCT_SEND_MESSAGE ("createTriangles")
+
IMeshData::ListOfInteger aLoopEdges, anExternalEdges;
const gp_XY& aVertexCoord = myMeshData->GetNode( theVertexIndex ).Coord();
void BRepMesh_Delaun::createTrianglesOnNewVertices(
IMeshData::VectorOfInteger& theVertexIndexes)
{
+ OCCT_ADD_MESSAGE_LEVEL_SENTRY
+ OCCT_SEND_MESSAGE ("createTrianglesOnNewVertices")
Handle(NCollection_IncAllocator) aAllocator =
new NCollection_IncAllocator(IMeshData::MEMORY_BLOCK_SIZE_HUGE);
//=======================================================================
void BRepMesh_Delaun::insertInternalEdges()
{
+ OCCT_ADD_MESSAGE_LEVEL_SENTRY
+ OCCT_SEND_MESSAGE ("insertInternalEdges")
+
Handle(IMeshData::MapOfInteger) anInternalEdges = InternalEdges();
// Destruction of triancles intersecting internal edges
//=======================================================================
void BRepMesh_Delaun::frontierAdjust()
{
+ OCCT_ADD_MESSAGE_LEVEL_SENTRY
+ OCCT_SEND_MESSAGE ("frontierAdjust")
+ OCCT_SEND_SHAPE (myMeshData->DumpToShape());
+
Handle(IMeshData::MapOfInteger) aFrontier = Frontier();
Handle(NCollection_IncAllocator) aAllocator =
}
}
- cleanupMesh();
+ OCCT_SEND_DUMPJSON (myMeshData.get())
+ OCCT_SEND_SHAPE (myMeshData->DumpToShape());
+ OCCT_SEND_MESSAGE ("cleanupMesh")
+
+ //Standard_SStream aStream;
+ //myMeshData->Statistics (aStream);
+ //Message::DefaultMessenger() << aStream;
+
+ OCCT_SEND_SHAPE (myMeshData->DumpToShape());
+ //cleanupMesh();
// When the mesh has been cleaned up, try to process frontier edges
// once again to fill the possible gaps that might be occured in case of "saw" -
return theFileNameStr;
}
#endif
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void BRepMesh_Delaun::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, BRepMesh_Delaun)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myMeshData.get())
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCircles)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySupVert[0])
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySupVert[1])
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySupVert[2])
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &mySupTrian)
+}
#include <IMeshData_Types.hxx>
#include <BRepMesh_DataStructureOfDelaun.hxx>
#include <BRepMesh_GeomTool.hxx>
+#include <Message_Level.hxx>
+#include <Message_Messenger.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_SequenceOfInteger.hxx>
#include <TColStd_MapOfInteger.hxx>
//! Forces insertion of constraint edges into the base triangulation.
inline void ProcessConstraints()
{
+ OCCT_ADD_MESSAGE_LEVEL_SENTRY
+ OCCT_SEND_MESSAGE ("ProcessConstraints")
insertInternalEdges();
// Adjustment of meshes to boundary edges
const Standard_Real theSqTolerance,
Standard_Integer& theEdgeOn) const;
+ //! Dumps the content of me into the stream
+ Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
private:
enum ReplaceFlag
#include <BRepMesh_DelaunayBaseMeshAlgo.hxx>
#include <BRepMesh_MeshTool.hxx>
#include <BRepMesh_Delaun.hxx>
+#include <Message_Level.hxx>
+#include <Message_Messenger.hxx>
//=======================================================================
// Function: Constructor
//=======================================================================
void BRepMesh_DelaunayBaseMeshAlgo::generateMesh()
{
+ OCCT_ADD_MESSAGE_LEVEL_SENTRY
+ OCCT_SEND_MESSAGE ("generateMesh")
const Handle(BRepMesh_DataStructureOfDelaun)& aStructure = getStructure();
const Handle(VectorOfPnt)& aNodesMap = getNodesMap();
//! Destructor.
Standard_EXPORT virtual ~BRepMesh_DelaunayBaseMeshAlgo();
+ //! Dumps the content of me into the stream
+ virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE
+ {
+ (void)theDepth;
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRepMesh_ConstrainedBaseMeshAlgo)
+ }
+
DEFINE_STANDARD_RTTI_INLINE(BRepMesh_DelaunayBaseMeshAlgo, BRepMesh_ConstrainedBaseMeshAlgo)
protected:
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)
+}
//! 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) const;
DEFINE_STANDARD_RTTIEXT(BRepMesh_DiscretRoot,Standard_Transient)
return IsEqual(Other);
}
+ //! Dumps the content of me into the stream
+ virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
+ {
+ OCCT_DUMP_CLASS_BEGIN (theOStream, BRepMesh_Edge)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, BRepMesh_OrientedEdge)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMovability)
+ }
+
private:
BRepMesh_DegreeOfFreedom myMovability;
#include <BRepMesh_EdgeTessellationExtractor.hxx>
#include <IMeshData_ParametersListArrayAdaptor.hxx>
#include <BRepMesh_CurveTessellator.hxx>
+#include <Message_Level.hxx>
#include <OSD_Parallel.hxx>
//=======================================================================
}
OSD_Parallel::For (0, myModel->EdgesNb (), *this, !myParameters.InParallel);
+ OCCT_SEND_DUMPJSON (myModel.get())
myModel.Nullify(); // Do not hold link to model.
return Standard_True;
}
}
}
+
+//=======================================================================
+// 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)
+
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myModel.get())
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myParameters)
+}
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:
return Standard_False;
}
- OSD_Parallel::For(0, myModel->FacesNb(), *this, !(myParameters.InParallel && myModel->FacesNb() > 1));
+ for (int i = 0; i < myModel->FacesNb(); i++)
+ {
+ process (i);
+ }
+ //OSD_Parallel::For(0, myModel->FacesNb(), *this, !(myParameters.InParallel && myModel->FacesNb() > 1));
+ OCCT_SEND_DUMPJSON (myModel.get())
myModel.Nullify(); // Do not hold link to model.
return Standard_True;
}
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)
+
+ //OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myAlgoFactory)
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myModel.get())
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myParameters)
+}
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:
//=======================================================================
void BRepMesh_IncrementalMesh::Perform(const Handle(IMeshTools_Context)& theContext)
{
+ OCCT_ADD_MESSAGE_LEVEL_SENTRY
+ OCCT_SEND_MESSAGE ("BRepMesh_IncrementalMesh::Perform")
initParameters();
theContext->SetShape(Shape());
theContext->ChangeParameters() = myParameters;
theContext->ChangeParameters().CleanModel = Standard_False;
+ OCCT_SEND_DUMPJSON (this)
+
IMeshTools_MeshBuilder aIncMesh(theContext);
aIncMesh.Perform();
+ OCCT_SEND_DUMPJSON (&aIncMesh)
+
myStatus = IMeshData_NoError;
const Handle(IMeshData_Model)& aModel = theContext->GetModel();
if (!aModel.IsNull())
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)
//! 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:
const TopoDS_Shape& theShape,
const IMeshTools_Parameters& theParameters)
{
+ OCCT_ADD_MESSAGE_LEVEL_SENTRY
+ OCCT_SEND_MESSAGE ("BRepMesh_ModelBuilder::performInternal")
+
Handle (BRepMeshData_Model) aModel;
Bnd_Box aBox;
BRepBndLib::Add (theShape, aBox, Standard_False);
+ OCCT_SEND_DUMPJSON (&aBox)
if (!aBox.IsVoid ())
{
Handle (IMeshTools_ShapeVisitor) aVisitor =
new BRepMesh_ShapeVisitor (aModel);
+ OCCT_SEND_DUMPJSON (aModel.get())
+
IMeshTools_ShapeExplorer aExplorer (theShape);
aExplorer.Accept (aVisitor);
SetStatus (Message_Done1);
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)
+}
//! 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:
}
// TODO: Here we can process edges in order to remove close discrete points.
+ OCCT_ADD_MESSAGE_LEVEL_SENTRY
OSD_Parallel::For(0, myModel->FacesNb(), *this, !isParallel());
amplifyEdges();
aDFace->SetStatus(IMeshData_Failure);
}
}
+ OCCT_SEND_DUMPJSON (myModel.get())
myFaceIntersectingEdges.Nullify();
myModel.Nullify(); // Do not hold link to model.
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)
+}
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:
// TODO: Force single threaded solution due to data races on edges sharing the same TShape
OSD_Parallel::For(0, theModel->EdgesNb(), PolygonCommitter(theModel), Standard_True/*!theParameters.InParallel*/);
+ OCCT_SEND_DUMPJSON (theModel.get())
return Standard_True;
}
//! Destructor.
Standard_EXPORT virtual ~BRepMesh_ModelPostProcessor();
- DEFINE_STANDARD_RTTI_INLINE(BRepMesh_ModelPostProcessor, IMeshTools_ModelAlgo)
+ //! 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:
}
}
}
+ OCCT_SEND_DUMPJSON (theModel.get())
return Standard_True;
}
//! 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:
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
+#include <Standard_Dump.hxx>
#include <Standard_Macro.hxx>
#include <BRepMesh_DegreeOfFreedom.hxx>
return IsEqual(Other);
}
+ //! Dumps the content of me into the stream
+ virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
+ {
+ (void)theDepth;
+ OCCT_DUMP_CLASS_BEGIN (theOStream, BRepMesh_OrientedEdge)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFirstNode)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLastNode)
+ }
+
private:
Standard_Integer myFirstNode;
myIndex[1] = -1;
}
+ //! Dumps the content of me into the stream
+ virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
+ {
+ (void)theDepth;
+ OCCT_DUMP_CLASS_BEGIN (theOStream, BRepMesh_PairOfIndex)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIndex[0])
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIndex[1])
+ }
+
private:
Standard_Integer myIndex[2];
};
#include <IMeshData_Status.hxx>
#include <IMeshTools_Context.hxx>
#include <BRepTools.hxx>
+#include <Message_Level.hxx>
+#include <Message_Messenger.hxx>
+#include <TopoDS_AlertAttribute.hxx>
//=======================================================================
// Function: Constructor
{
if (!myDEdgeMap.IsBound (theEdge))
{
+ OCCT_SEND_MESSAGE ("BRepMesh_ShapeVisitor::Visit edge")
+ OCCT_SEND_SHAPE (theEdge)
+
myModel->AddEdge (theEdge);
myDEdgeMap.Bind (theEdge, myModel->EdgesNb () - 1);
}
//=======================================================================
void BRepMesh_ShapeVisitor::Visit (const TopoDS_Face& theFace)
{
+ OCCT_SEND_MESSAGE ("BRepMesh_ShapeVisitor::Visit face")
+ OCCT_SEND_SHAPE (theFace)
+
BRepTools::Update(theFace);
const IMeshData::IFaceHandle& aDFace = myModel->AddFace (theFace);
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
+#include <Standard_Dump.hxx>
#include <Standard_Macro.hxx>
#include <BRepMesh_DegreeOfFreedom.hxx>
return IsEqual(theOther);
}
+ //! 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, myEdges[0])
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myEdges[1])
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myEdges[2])
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOrientations[0])
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOrientations[1])
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOrientations[2])
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMovability)
+ }
Standard_Integer myEdges[3];
Standard_Boolean myOrientations[3];
BRepMesh_DegreeOfFreedom myMovability;
return IsEqual(Other);
}
+ //! Dumps the content of me into the stream
+ virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
+ {
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myUV)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLocation3d)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMovability)
+ }
+
private:
gp_XY myUV;
return (theIndex == theTargetIndex);
}
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const
+ {
+ OCCT_DUMP_CLASS_BEGIN (theOStream, BRepMesh_VertexInspector)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIndex)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMinSqDist)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance[0])
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance[1])
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myVertices->Length())
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDelNodes.Extent())
+
+ for (Standard_Integer anIt = 1; anIt <= myVertices->Length(); ++anIt)
+ {
+ BRepMesh_Vertex& aVertex = myVertices->ChangeValue(anIt - 1);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aVertex)
+ }
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myPoint)
+ }
+
private:
Standard_Integer myIndex;
theStream << "\nStructure Statistics\n---------------\n\n";
theStream << "This structure has " << mySelector.NbVertices() << " Nodes\n\n";
}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void BRepMesh_VertexTool::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+ //OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &myCellFilter)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance[0])
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolerance[1])
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &mySelector)
+
+ const NCollection_Map<NCollection_CellFilter<BRepMesh_VertexInspector>::Cell>& aCells = myCellFilter.Cells();
+ const NCollection_Array1<Standard_Real>& aCellSizes = myCellFilter.CellSize();
+
+ for (NCollection_Map<NCollection_CellFilter<BRepMesh_VertexInspector>::Cell>::Iterator aCellsIt (aCells); aCellsIt.More(); aCellsIt.Next())
+ {
+ const NCollection_LocalArray<long, 10>& anIndex = aCellsIt.Value().index;
+
+ const std::size_t aDim = anIndex.Size();
+ TCollection_AsciiString anIndexPair;
+ for (std::size_t i = 0; i < aDim; ++i)
+ {
+ if (!anIndexPair.IsEmpty()) anIndexPair += ", ";
+ anIndexPair += TCollection_AsciiString (anIndex[i]);
+ }
+ OCCT_DUMP_FIELD_VALUE_STRING (theOStream, anIndexPair)
+ }
+}
//! Prints statistics.
Standard_EXPORT void Statistics(Standard_OStream& theStream) const;
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
+
DEFINE_STANDARD_RTTI_INLINE(BRepMesh_VertexTool, Standard_Transient)
private:
myParameters.erase(myParameters.begin() + 1, myParameters.begin() + (myParameters.size() - 1));
}
}
+
+//=======================================================================
+// Function: DumpJson
+// Purpose :
+//=======================================================================
+void BRepMeshData_Curve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, IMeshData_Curve)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPoints.size())
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myParameters.size())
+
+ for (IMeshData::Model::SequenceOfPnt::const_iterator aPointIt = myPoints.begin(); aPointIt != myPoints.end(); aPointIt++)
+ {
+ const gp_Pnt& aPoint = *aPointIt;
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aPoint)
+ }
+
+ for (IMeshData::Model::SequenceOfReal::const_iterator aParamIt = myParameters.begin(); aParamIt != myParameters.end(); aParamIt++)
+ {
+ Standard_Real aParameter = *aParamIt;
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aParameter)
+ }
+}
//! Clears parameters list.
Standard_EXPORT virtual void Clear(const Standard_Boolean isKeepEndPoints) Standard_OVERRIDE;
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
DEFINE_STANDARD_RTTI_INLINE(BRepMeshData_Curve, IMeshData_Curve)
protected:
{
return myPCurves (theIndex);
}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void BRepMeshData_Edge::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, IMeshData_Edge)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPCurves.Size())
+ for (Standard_Integer aPCurveIt = 0; aPCurveIt < myPCurves.Size(); ++aPCurveIt)
+ {
+ const IMeshData::IPCurveHandle& aPCurve = myPCurves (aPCurveIt);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aPCurve.get())
+ }
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myPCurvesMap.Size())
+ //IMeshData::DMapOfIFacePtrsListOfInteger myPCurvesMap;
+}
Standard_EXPORT virtual const IMeshData::IPCurveHandle& GetPCurve (
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;
+
DEFINE_STANDARD_RTTI_INLINE(BRepMeshData_Edge, IMeshData_Edge)
private:
{
return myDWires (theIndex);
}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void BRepMeshData_Face::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, IMeshData_Face)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDWires.Size())
+ for (int aWireIt = 0; aWireIt < myDWires.Size(); aWireIt++)
+ {
+ const IMeshData::IWireHandle& aWire = GetWire (aWireIt);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aWire.get())
+ }
+}
const TopoDS_Wire& theWire,
const Standard_Integer theEdgeNb = 0) Standard_OVERRIDE;
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
DEFINE_STANDARD_RTTI_INLINE(BRepMeshData_Face, IMeshData_Face)
private:
{
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.IsEmpty())
+ {
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDFaces.Size())
+ for (Standard_Integer aFaceIt = 0; aFaceIt < FacesNb(); ++aFaceIt)
+ {
+ const IMeshData::IFaceHandle& aFace = GetFace(aFaceIt);
+ OCCT_SEND_DUMPJSON (aFace.get())
+ }
+ }
+ if (!myDEdges.IsEmpty())
+ {
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDEdges.Size())
+ for (int anEdgeIt = 0; anEdgeIt < EdgesNb(); anEdgeIt++)
+ {
+ const IMeshData::IEdgeHandle& anEdge = GetEdge (anEdgeIt);
+ OCCT_SEND_DUMPJSON (anEdge.get())
+ }
+ }
+}
//! 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;
{
return myDEdgesOri (theIndex);
}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void BRepMeshData_Wire::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, IMeshData_Wire)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDEdges.Size())
+ for (int anEdgeId = 0; anEdgeId < myDEdges.Size(); anEdgeId++)
+ {
+ const IMeshData::IEdgePtr& anEdge = GetEdge (anEdgeId);
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, anEdge)
+ }
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDEdgesOri.Size())
+ for (int anEdgeId = 0; anEdgeId < myDEdgesOri.Size(); anEdgeId++)
+ {
+ TopAbs_Orientation anEdgeOri = GetEdgeOrientation (anEdgeId);
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, &anEdgeOri)
+ }
+}
Standard_EXPORT virtual TopAbs_Orientation GetEdgeOrientation (
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;
+
DEFINE_STANDARD_RTTI_INLINE(BRepMeshData_Wire, IMeshData_Wire)
private:
return Du;
}
+//=======================================================================
+// Function: DumpJson
+// Purpose :
+//=======================================================================
+void GCPnts_TangentialDeflection::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, GCPnts_TangentialDeflection)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, angularDeflection)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, curvatureDeflection)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, uTol)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, minNbPnts)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMinLen)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, lastu)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, firstu)
+
+ if (!points.IsEmpty())
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, points.Length())
+
+ if (!parameters.IsEmpty())
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, parameters.Length())
+}
+
#include <Geom_BezierCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <gp_Circ.hxx>
//! Computes angular step for the arc using the given parameters.
Standard_EXPORT static Standard_Real ArcAngularStep (const Standard_Real theRadius, const Standard_Real theLinearDeflection, const Standard_Real theAngularDeflection, const Standard_Real theMinLength);
+ //! Dumps the content of me into the stream
+ Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
+
private:
Standard_EXPORT void PerformLinear (const Adaptor3d_Curve& C);
throw Standard_NoSuchObject("GeomAdaptor_Curve::OffsetCurve");
return Handle(Geom_OffsetCurve)::DownCast(myCurve);
}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void GeomAdaptor_Curve::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, GeomAdaptor_Curve)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Adaptor3d_Curve)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myCurve.get())
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTypeCurve)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFirst)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLast)
+
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myBSplineCurve.get())
+ //mutable Handle(BSplCLib_Cache) myCurveCache; ///< Cached data for B-spline or Bezier curve
+ //Handle(GeomEvaluator_Curve) myNestedEvaluator; ///< Calculates value of offset curve
+}
Standard_EXPORT Handle(Geom_OffsetCurve) OffsetCurve() 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;
+
friend class GeomAdaptor_Surface;
}
}
}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void GeomAdaptor_Surface::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_CLASS_BEGIN (theOStream, GeomAdaptor_Surface)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, Adaptor3d_Surface)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
+
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUFirst)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myULast)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myVFirst)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myVLast)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolU)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myTolV)
+
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myBSplineSurface.get())
+ //mutable Handle(BSplSLib_Cache) mySurfaceCache; ///< Cached data for B-spline or Bezier surface
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySurfaceType)
+ //Handle(GeomEvaluator_Surface) myNestedEvaluator; ///< Calculates values of nested complex surfaces (offset surface, surface of extrusion or revolution)
+}
Standard_EXPORT Standard_Real OffsetValue() 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;
protected:
#define _IMeshData_Curve_HeaderFile
#include <IMeshData_ParametersList.hxx>
+#include <Standard_Dump.hxx>
#include <Standard_Type.hxx>
class gp_Pnt;
//! Removes point with the given index.
Standard_EXPORT virtual void RemovePoint (const Standard_Integer theIndex) = 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_ParametersList)
+ }
+
+
DEFINE_STANDARD_RTTI_INLINE(IMeshData_Curve, IMeshData_ParametersList)
protected:
#include <IMeshData_TessellatedShape.hxx>
#include <IMeshData_StatusOwner.hxx>
+#include <Standard_Dump.hxx>
#include <Standard_Type.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS.hxx>
#include <IMeshData_PCurve.hxx>
#include <IMeshData_Types.hxx>
#include <BRep_Tool.hxx>
+#include <Message_Level.hxx>
+#include <Message_Messenger.hxx>
class IMeshData_Face;
myDegenerated = theValue;
}
+ //! 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_TessellatedShape)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySameParam)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySameRange)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDegenerated)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myAngDeflection)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myCurve.get())
+ }
+
DEFINE_STANDARD_RTTI_INLINE(IMeshData_Edge, IMeshData_TessellatedShape)
protected:
#include <IMeshData_TessellatedShape.hxx>
#include <IMeshData_StatusOwner.hxx>
+#include <Standard_Dump.hxx>
#include <Standard_Type.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS.hxx>
IsEqual(IMeshData_UnorientedWire));
}
+ //! 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_TessellatedShape)
+
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, mySurface.get())
+ }
+
DEFINE_STANDARD_RTTI_INLINE(IMeshData_Face, IMeshData_TessellatedShape)
protected:
#define _IMeshData_Model_HeaderFile
#include <IMeshData_Shape.hxx>
+#include <Standard_Dump.hxx>
#include <Standard_Type.hxx>
#include <TopoDS_Shape.hxx>
#include <IMeshData_Types.hxx>
//! 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.
#define _IMeshData_PCurve_HeaderFile
#include <IMeshData_ParametersList.hxx>
+#include <Standard_Dump.hxx>
#include <Standard_Type.hxx>
#include <IMeshData_Face.hxx>
return myDFace;
}
+ //! 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_ParametersList)
+
+ OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myDFace)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myOrientation)
+ }
+
DEFINE_STANDARD_RTTI_INLINE(IMeshData_PCurve, IMeshData_ParametersList)
protected:
#define _IMeshData_ParametersList_HeaderFile
#include <Standard_Transient.hxx>
+#include <Standard_Dump.hxx>
#include <Standard_Type.hxx>
//! Interface class representing list of parameters on curve.
//! 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
+ {
+ (void)theDepth;
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+ }
+
DEFINE_STANDARD_RTTI_INLINE(IMeshData_ParametersList, Standard_Transient)
protected:
#define _IMeshData_Shape_HeaderFile
#include <Standard_Type.hxx>
+#include <Standard_Dump.hxx>
#include <TopoDS_Shape.hxx>
//! Interface class representing model with associated TopoDS_Shape.
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:
#define _IMeshData_TessellatedShape_HeaderFile
#include <IMeshData_Shape.hxx>
+#include <Standard_Dump.hxx>
#include <Standard_Type.hxx>
#include <TopoDS_Shape.hxx>
myDeflection = theValue;
}
+ //! 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:
#include <IMeshData_TessellatedShape.hxx>
#include <IMeshData_StatusOwner.hxx>
+#include <Standard_Dump.hxx>
#include <Standard_Type.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS.hxx>
Standard_EXPORT virtual TopAbs_Orientation GetEdgeOrientation (
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_TessellatedShape)
+ }
+
DEFINE_STANDARD_RTTI_INLINE(IMeshData_Wire, IMeshData_TessellatedShape)
protected:
+IMeshTools_Context.cxx
IMeshTools_Context.hxx
IMeshTools_CurveTessellator.hxx
IMeshTools_MeshAlgo.hxx
IMeshTools_ModelAlgo.hxx
IMeshTools_ModelBuilder.hxx
IMeshTools_Parameters.hxx
+IMeshTools_Parameters.cxx
IMeshTools_ShapeExplorer.hxx
IMeshTools_ShapeExplorer.cxx
IMeshTools_ShapeVisitor.hxx
--- /dev/null
+// 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)
+}
+
#include <IMeshTools_Parameters.hxx>
#include <IMeshTools_ModelAlgo.hxx>
+#include <Message_Level.hxx>
+#include <Message_Messenger.hxx>
+
//! Interface class representing context of BRepMesh algorithm.
//! Intended to cache discrete model and instances of tools for
//! its processing.
return Standard_False;
}
+ OCCT_ADD_MESSAGE_LEVEL_SENTRY
+ OCCT_SEND_MESSAGE ("DiscretizeEdges")
+
// Discretize edges of a model.
return myEdgeDiscret->Perform(myModel, myParameters);
}
return Standard_False;
}
+ OCCT_ADD_MESSAGE_LEVEL_SENTRY
+ OCCT_SEND_MESSAGE ("HealModel")
return myModelHealer.IsNull() ?
Standard_True :
myModelHealer->Perform(myModel, myParameters);
return Standard_False;
}
+ OCCT_ADD_MESSAGE_LEVEL_SENTRY
+ OCCT_SEND_MESSAGE ("PreProcessModel")
return myPreProcessor.IsNull() ?
Standard_True :
myPreProcessor->Perform(myModel, myParameters);
return Standard_False;
}
+ OCCT_ADD_MESSAGE_LEVEL_SENTRY
+ OCCT_SEND_MESSAGE ("DiscretizeFaces")
// Discretize faces of a model.
return myFaceDiscret->Perform(myModel, myParameters);
}
return Standard_False;
}
+ OCCT_ADD_MESSAGE_LEVEL_SENTRY
+ OCCT_SEND_MESSAGE ("PostProcessModel")
return myPostProcessor.IsNull() ?
Standard_True :
myPostProcessor->Perform(myModel, myParameters);
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:
#define _IMeshTools_EdgeTessellator_HeaderFile
#include <Standard_Transient.hxx>
+#include <Standard_Dump.hxx>
#include <Standard_Type.hxx>
class gp_Pnt;
gp_Pnt& thePoint,
Standard_Real& theParameter) const = 0;
+ //! 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_CurveTessellator, Standard_Transient)
protected:
#define _IMeshTools_MeshAlgo_HeaderFile
#include <Standard_Transient.hxx>
+#include <Standard_Dump.hxx>
#include <Standard_Type.hxx>
#include <IMeshData_Types.hxx>
const IMeshData::IFaceHandle& theDFace,
const IMeshTools_Parameters& theParameters) = 0;
+ //! 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_MeshAlgo, Standard_Transient)
protected:
#include <IMeshTools_MeshBuilder.hxx>
#include <IMeshData_Face.hxx>
+#include <Message_Level.hxx>
+#include <Message_Messenger.hxx>
#include <OSD_Parallel.hxx>
//=======================================================================
return;
}
+ OCCT_ADD_MESSAGE_LEVEL_SENTRY
+ OCCT_SEND_MESSAGE ("IMeshTools_MeshBuilder::Perform")
+
if (aContext->BuildModel ())
{
if (aContext->DiscretizeEdges ())
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())
+}
//! 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:
#include <Standard_Failure.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Type.hxx>
+#include <Standard_Dump.hxx>
class IMeshData_Model;
struct IMeshTools_Parameters;
}
}
+ //! 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:
#include <Message_Algorithm.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
+#include <Standard_Dump.hxx>
#include <Standard_Type.hxx>
#include <TopoDS_Shape.hxx>
}
}
+ //! 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, Message_Algorithm)
+ }
+
DEFINE_STANDARD_RTTI_INLINE(IMeshTools_ModelBuilder, Message_Algorithm)
protected:
--- /dev/null
+// Created on: 2016-04-07
+// Copyright (c) 2016 OPEN CASCADE SAS
+// Created by: Oleg AGASHIN
+//
+// 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_Parameters.hxx>
+#include <Standard_Dump.hxx>
+
+//=======================================================================
+// Function: Constructor
+// Purpose :
+//=======================================================================
+void IMeshTools_Parameters::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Angle)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Deflection)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, AngleInterior)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, DeflectionInterior)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, MinSize)
+
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, InParallel)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Relative)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, InternalVerticesMode)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, ControlSurfaceDeflection)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, CleanModel)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, AdjustMinSize)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, ForceFaceDeflection)
+}
return 0.1;
}
+ //! Dumps the content of me into the stream
+ Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
//! Angular deflection used to tessellate the boundary edges
Standard_Real Angle;
#include <BRep_Tool.hxx>
#include <TopTools_MapOfShape.hxx>
#include <Geom_Surface.hxx>
+#include <Message_Level.hxx>
+#include <Message_Messenger.hxx>
namespace
{
void IMeshTools_ShapeExplorer::Accept (
const Handle (IMeshTools_ShapeVisitor)& theVisitor)
{
+ OCCT_ADD_MESSAGE_LEVEL_SENTRY
+ OCCT_SEND_MESSAGE ("IMeshTools_ShapeExplorer::Accept")
+
// Explore all free edges in shape.
+ OCCT_SEND_MESSAGE ("visit free edges")
visitEdges (theVisitor, GetShape (), Standard_True, TopAbs_EDGE, TopAbs_FACE);
// Explore all related to some face edges in shape.
// make array of faces suitable for processing (excluding faces without surface)
+ OCCT_SEND_MESSAGE ("explore all related to some face edges in shape")
TopTools_ListOfShape aFaceList;
BRepLib::ReverseSortFaces (GetShape (), aFaceList);
TopTools_MapOfShape aFaceMap;
}
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.IsNull())
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myReportIntegers->Length())
+ if (!myReportStrings.IsNull())
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myReportStrings->Length())
+ if (!myReportMessages.IsNull())
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myReportMessages->Length())
+}
//! 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;
+
#else
protected:
#endif
-
+ public:
/**
* Auxiliary class for storing points belonging to the cell as the list
*/
return Standard_True;
}
+ const NCollection_LocalArray<long, 10>& Index() const { return index; }
+
//! Returns hash code for this cell, in the range [1, theUpperBound]
//! @param theUpperBound the upper bound of the range a computing hash code must be within
//! @return a computed hash code, in the range [1, theUpperBound]
ListNode *Objects;
};
+ const NCollection_Map<Cell>& Cells() const { return myCells; }
+ const NCollection_Array1<Standard_Real>& CellSize() const { return myCellSize; }
+
//! Returns hash code for the given cell, in the range [1, theUpperBound]
//! @param theCell the cell object which hash code is to be computed
//! @param theUpperBound the upper bound of the range a computing hash code must be within
{
OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
- OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, this)
+ //OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, this)
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, ShapeType())
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, NbChildren())
return C;
}
+void gp_Circ::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &pos)
+ OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, radius)
+}
//! Translates a circle from the point P1 to the point P2.
Standard_NODISCARD gp_Circ Translated (const gp_Pnt& P1, const gp_Pnt& P2) const;
+ //! Dumps the content of me into the stream
+ Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
return L;
}
+void gp_Lin::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ pos.DumpJson (theOStream, theDepth);
+}
+
//! Translates a line from the point P1 to the point P2.
Standard_NODISCARD gp_Lin Translated (const gp_Pnt& P1, const gp_Pnt& P2) const;
+ //! Dumps the content of me into the stream
+ Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
#include <gp_Mat2d.hxx>
#include <gp_XY.hxx>
+#include <Standard_Dump.hxx>
#include <Standard_ConstructionError.hxx>
#include <Standard_OutOfRange.hxx>
return Standard_True;
}
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void gp_XY::DumpJson (Standard_OStream& theOStream, Standard_Integer) const
+{
+ OCCT_DUMP_VECTOR_CLASS (theOStream, "gp_XY", 2, x, y)
+}
+
+//=======================================================================
+//function : InitFromJson
+//purpose :
+//=======================================================================
+Standard_Boolean gp_XY::InitFromJson (const Standard_SStream& theSStream, Standard_Integer& theStreamPos)
+{
+ Standard_Integer aPos = theStreamPos;
+ OCCT_INIT_VECTOR_CLASS (theSStream, "gp_XY", aPos, 2, &x, &y)
+
+ theStreamPos = aPos;
+ return Standard_True;
+}
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
+#include <Standard_OStream.hxx>
+#include <Standard_SStream.hxx>
class Standard_ConstructionError;
class Standard_OutOfRange;
class gp_Mat2d;
return Subtracted(Right);
}
+ //! Dumps the content of me into the stream
+ Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
+
+ //! Inits the content of me into the stream
+ Standard_EXPORT Standard_Boolean InitFromJson (const Standard_SStream& theSStream, Standard_Integer& theStreamPos);