mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0031326: Foundation Classes - Init from Json for base OCCT classes
InitFromJson method implementation for some simple classes. OCCT_INIT_* defines introduction to do automatic parsing of the stream into values. Inspector is extended to visualize objects created on the dump stream if it might be created.
This commit is contained in:
@@ -16,16 +16,33 @@
|
||||
#ifndef Convert_Tools_H
|
||||
#define Convert_Tools_H
|
||||
|
||||
#include <gp_Dir.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Trsf.hxx>
|
||||
#include <gp_XYZ.hxx>
|
||||
#include <Bnd_Box.hxx>
|
||||
#include <Bnd_OBB.hxx>
|
||||
#include <NCollection_List.hxx>
|
||||
#include <Quantity_Color.hxx>
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <Standard_SStream.hxx>
|
||||
#include <TColgp_HArray1OfPnt.hxx>
|
||||
#include <Standard_Dump.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TopLoc_Location.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <Standard_SStream.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
class Geom_Plane;
|
||||
class Geom_Transformation;
|
||||
|
||||
//! \class Convert_Tools
|
||||
//! \brief The tool that gives auxiliary methods converting.
|
||||
//! \brief The tool that gives auxiliary methods for qt elements manipulation.
|
||||
class Convert_Tools
|
||||
{
|
||||
public:
|
||||
@@ -49,6 +66,37 @@ public:
|
||||
//! \returns true if done
|
||||
Standard_EXPORT static Standard_Boolean ConvertStreamToColor (const Standard_SStream& theSStream,
|
||||
Quantity_Color& theColor);
|
||||
|
||||
//! Creates box shape
|
||||
//! \param theBoundingBox box shape parameters
|
||||
//! \return created shape
|
||||
Standard_EXPORT static Standard_Boolean CreateShape (const Bnd_Box& theBoundingBox, TopoDS_Shape& theShape);
|
||||
|
||||
//! Creates box shape
|
||||
//! \param theBoundingBox box shape parameters
|
||||
//! \return created shape
|
||||
Standard_EXPORT static Standard_Boolean CreateShape (const Bnd_OBB& theBoundingBox, TopoDS_Shape& theShape);
|
||||
|
||||
//! Creates box shape
|
||||
//! \param thePntMin minimum point on the bounding box
|
||||
//! \param thePntMax maximum point on the bounding box
|
||||
//! \return created shape
|
||||
Standard_EXPORT static Standard_Boolean CreateBoxShape (const gp_Pnt& thePntMin,
|
||||
const gp_Pnt& thePntMax,
|
||||
TopoDS_Shape& theShape);
|
||||
|
||||
//! Creates presentation AIS_Plane
|
||||
//! \param thePlane source plane
|
||||
//! \param thePresentations container to collect new presentation/s
|
||||
Standard_EXPORT static void CreatePresentation (const Handle(Geom_Plane)& thePlane,
|
||||
NCollection_List<Handle(Standard_Transient)>& thePresentations);
|
||||
|
||||
//! Creates two presentations base on gp_Trsf: box in initial place and transformed box
|
||||
//! \param thePlane source plane
|
||||
//! \param thePresentations container to collect new presentation/s
|
||||
Standard_EXPORT static void CreatePresentation (const gp_Trsf& theTrsf,
|
||||
NCollection_List<Handle(Standard_Transient)>& thePresentations);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user