df8a590c04
- aggiunta funzione AddHoleToPart.
60 lines
2.4 KiB
C++
60 lines
2.4 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2019-2020
|
|
//----------------------------------------------------------------------------
|
|
// File : AutoNester.h Data : 29.01.20 Versione : 2.2a2
|
|
// Contenuto : Dichiarazione della classe AutoNester.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 28.11.19 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "/EgtDev/Include/ENsAutoNester.h"
|
|
#include <unordered_map>
|
|
|
|
struct CNS_LaunchingOrder ;
|
|
struct CNS_Computation ;
|
|
struct CNS_Sheet ;
|
|
struct CNS_Part ;
|
|
|
|
//----------------------------------------------------------------------------
|
|
class AutoNester : public IAutoNester
|
|
{
|
|
public :
|
|
~AutoNester( void) override ;
|
|
bool Start( void) override ;
|
|
bool AddSheet( int nSheetId, const PolyArc& Outline, double dKerf, int nPriority, int nCount) override ;
|
|
bool AddDefectToSheet( int nSheetId, const PolyArc& Outline) override ;
|
|
bool AddPart( int nPartId, const PolyArc& Outline, bool bCanFlip, bool bCanRotate, double dRotStep, int nPriority, int nCount) override ;
|
|
bool AddHoleToPart( int nPartId, const PolyArc& Hole) override ;
|
|
bool AddAnotherOutlineToPart( int nPartId, const PolyArc& AnotherOutline) override ;
|
|
bool AddToolOutlineToPart( int nPartId, const PolyArc& ToolOutline) override ;
|
|
bool SetInterpartGap( double dGap) override ;
|
|
bool Compute( bool bMinimizeOnXvsY, int nMaxTime) override ;
|
|
bool CancelComputation( void) override ;
|
|
bool GetComputationStatus( int& nStatus) override ;
|
|
bool GetResults( double& dTotFillRatio, ANIVECT& vANI) override ;
|
|
bool PrintResults( const std::string& sHtmlFile) override ;
|
|
|
|
public :
|
|
AutoNester( void) ;
|
|
|
|
private :
|
|
bool Clear( void) ;
|
|
|
|
private :
|
|
typedef std::unordered_map< int, CNS_Sheet*> IDSHEETPTR_UMAP ;
|
|
typedef std::unordered_map< int, CNS_Part*> IDPARTPTR_UMAP ;
|
|
|
|
private :
|
|
CNS_LaunchingOrder* m_pOrder ; // ordine di esecuzione per OptaLog
|
|
CNS_Computation* m_pComp ; // calcolo di ottimizzazione
|
|
IDSHEETPTR_UMAP m_IdSheetPtr ; // map dei pannelli basato su identificativi
|
|
IDPARTPTR_UMAP m_IdPartPtr ; // map dei pannelli basato su identificativi
|
|
double m_dInterpartGap ; // distanza minima tra i pezzi
|
|
} ;
|