//---------------------------------------------------------------------------- // EgalTech 2019-2019 //---------------------------------------------------------------------------- // File : ExportSvg.h Data : 15.09.19 Versione : 2.1i2 // Contenuto : Dichiarazione della classe ExportSvg. // // // // Modifiche : 15.09.19 DS Creazione modulo. // // //---------------------------------------------------------------------------- #pragma once #include "/EgtDev/Include/EExExportSvg.h" #include "/EgtDev/Include/EGnWriter.h" #include class IGdbIterator ; class IGeoObj ; class ICurve ; class ICurveLine ; class ICurveArc ; class ICurveBezier ; class ICurveComposite ; class Frame3d ; class BBox3d ; //---------------------------------------------------------------------------- class ExportSvg : public IExportSvg { public : virtual bool SetOptions( int nFilter) ; virtual bool Export( IGeomDB* pGDB, int nId, const std::string& sFile) ; public : ExportSvg( void) : m_nFilter( EEXFLT_DEFAULT) {} private : bool CalcEntBBox( IGeomDB* pGDB, int nId, INTDBLVECTOR& vEnt, BBox3d& b3Box) ; bool CalcGdbObjectEntBBox( const IGdbIterator& iIter, INTDBLVECTOR& vEnt, BBox3d& b3Box) ; bool CalcGdbGroupEntBBox( const IGdbIterator& iIter, INTDBLVECTOR& vEnt, BBox3d& b3Box) ; bool ExportHeader( double dDimX, double dDimY) ; bool ExportFooter( void) ; bool ExportEntities( IGeomDB* pGDB, const INTDBLVECTOR& vEnt, const BBox3d& b3All) ; bool TestFilter( int nLev, int nMode, int nStat) ; bool ExportPoint( const std::string& sName, const Color& colObj, const IGeoObj* pGeoObj, const Frame3d& frFrame) ; bool ExportLine( const std::string& sName, const Color& colObj, const IGeoObj* pGeoObj, const Frame3d& frFrame) ; bool ExportArc( const std::string& sName, const Color& colObj, const IGeoObj* pGeoObj, const Frame3d& frFrame, bool bFill) ; bool ExportBezier( const std::string& sName, const Color& colObj, const IGeoObj* pGeoObj, const Frame3d& frFrame, bool bFill) ; bool ExportComposite( const std::string& sName, const Color& colObj, const IGeoObj* pGeoObj, const Frame3d& frFrame, bool bFill) ; bool ExportFlatRegion( const std::string& sName, const Color& colObj, const IGeoObj* pGeoObj, const Frame3d& frFrame) ; bool ExportTriMesh( const std::string& sName, const Color& colObj, const IGeoObj* pGeoObj, const Frame3d& frFrame) ; bool ExportText( const std::string& sName, const Color& colObj, const IGeoObj* pGeoObj, const Frame3d& frFrame) ; std::string GetStartString( const ICurve* pCrv) ; std::string GetCurveString( const ICurveLine* pLine) ; std::string GetCurveString( const ICurveArc* pArc) ; std::string GetCurveString( const ICurveBezier* pBez) ; std::string GetCurveString( const ICurveComposite* pCompo) ; std::string GetColorString( const Color& colObj) ; private : int m_nFilter ; // filtro su livello, modo e stato Writer m_Writer ; // scrittore di file di testo Vector3d m_vtMove ; // vettore movimento per portare la geometria nel 4° quadrante std::unordered_set m_usNames ; // insieme dei nomi } ;