ab83b689ba
- aggiunta esportazione in formato SVG - in ExportDxf e ExportStl ora si usa il Writer.
54 lines
2.2 KiB
C++
54 lines
2.2 KiB
C++
//----------------------------------------------------------------------------
|
|
// 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 <unordered_set>
|
|
|
|
|
|
class IGdbIterator ;
|
|
class IGeoObj ;
|
|
class Frame3d ;
|
|
|
|
//----------------------------------------------------------------------------
|
|
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 ExportHeader( void) ;
|
|
bool ExportFooter( void) ;
|
|
bool ExportEntities( IGeomDB* pGDB, int nId) ;
|
|
bool ExportObject( const IGdbIterator& iIter) ;
|
|
bool ScanGroup( const IGdbIterator& iIter) ;
|
|
bool TestFilter( int nLev, int nMode, int nStat) ;
|
|
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 ExportComposite( 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 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<std::string> m_usNames ; // insieme dei nomi
|
|
} ;
|