5ffbaab0e4
- modifiche per gestione aggregato da sotto in foratura e fresatura - modifiche per nuovi tipi di uscite lame allungate.
100 lines
4.5 KiB
C++
100 lines
4.5 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2015-2015
|
|
//----------------------------------------------------------------------------
|
|
// File : Drilling.h Data : 21.05.15 Versione : 1.6e7
|
|
// Contenuto : Dichiarazione della classe Drilling.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 21.05.15 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "Machining.h"
|
|
#include "DrillingData.h"
|
|
#include "ToolData.h"
|
|
#include "MachiningConst.h"
|
|
|
|
struct Hole ;
|
|
class ICurve ;
|
|
|
|
//----------------------------------------------------------------------------
|
|
class Drilling : public Machining
|
|
{
|
|
public : // IUserObj
|
|
Drilling* Clone( void) const override ;
|
|
const std::string& GetClassName( void) const override ;
|
|
bool Dump( std::string& sOut, bool bMM = true, const char* szNewLine = "\n") const override ;
|
|
bool ToSave( void) const override
|
|
{ return true ; }
|
|
bool Save( STRVECTOR& vString) const override ;
|
|
bool Load( const STRVECTOR& vString, int nBaseGdbId) override ;
|
|
|
|
public : // Operation
|
|
bool IsEmpty( void) const override
|
|
{ return ( m_nDrillings == 0) ; }
|
|
|
|
protected : // Operation
|
|
int GetSolCh( void) const override
|
|
{ return m_Params.m_nSolCh ; }
|
|
bool AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const override ;
|
|
|
|
public : // Machining
|
|
bool Prepare( const std::string& sDriName) override ;
|
|
bool SetParam( int nType, bool bVal) override ;
|
|
bool SetParam( int nType, int nVal) override ;
|
|
bool SetParam( int nType, double dVal) override ;
|
|
bool SetParam( int nType, const std::string& sVal) override ;
|
|
bool SetGeometry( const SELVECTOR& vIds) override ;
|
|
bool Preview( bool bRecalc) override ;
|
|
bool Apply( bool bRecalc) override ;
|
|
bool GetParam( int nType, bool& bVal) const override ;
|
|
bool GetParam( int nType, int& nVal) const override ;
|
|
bool GetParam( int nType, double& dVal) const override ;
|
|
bool GetParam( int nType, std::string& sVal) const override ;
|
|
const ToolData& GetToolData( void) const override ;
|
|
bool GetGeometry( SELVECTOR& vIds) const override ;
|
|
|
|
public :
|
|
Drilling( void) ;
|
|
|
|
private :
|
|
bool UpdateToolData( void) ;
|
|
bool GetHoleData( SelData Id, Hole& hole) ;
|
|
bool StdandardProcess( bool bRecalc, int nPvId, int nClId) ;
|
|
bool AlongCurveProcess( bool bRecalc, int nPvId, int nClId) ;
|
|
bool Chain( int nGrpDestId) ;
|
|
ICurve* GetCurve( SelData Id) ;
|
|
bool ProcessPath( int nPathId, int nPvId, int nClId) ;
|
|
bool GenerateHolePv( int nInd, const SelData& nCircId, const string& sPName, int nPvId) ;
|
|
bool GenerateHoleCl( int nInd, const SelData& nCircId, const string& sPName, int nClId) ;
|
|
bool GenerateHoleRegionPv( int nFirstId, int nCount, int nPvId) ;
|
|
bool VerifyDiameter( double dHdiam, double dTdiam, double ddiamTol) ;
|
|
bool VerifyHoleFromBottom( const Hole& hole, SelData Id) ;
|
|
bool DoStandardDrilling( const Hole& hole, SelData Id, int nPathId) ;
|
|
bool DoPeckDrilling( const Hole& hole, SelData Id, int nPathId) ;
|
|
|
|
private :
|
|
double GetSpeed() const
|
|
{ return ( abs( m_Params.m_dSpeed) < EPS_MACH_ANG_PAR ? m_TParams.m_dSpeed : m_Params.m_dSpeed) ; }
|
|
double GetFeed() const
|
|
{ return ( abs( m_Params.m_dFeed) < EPS_MACH_LEN_PAR ? m_TParams.m_dFeed : m_Params.m_dFeed) ; }
|
|
double GetStartFeed() const
|
|
{ return ( abs( m_Params.m_dStartFeed) < EPS_MACH_LEN_PAR ? m_TParams.m_dStartFeed : m_Params.m_dStartFeed) ; }
|
|
double GetEndFeed() const
|
|
{ return ( abs( m_Params.m_dEndFeed) < EPS_MACH_LEN_PAR ? m_TParams.m_dEndFeed : m_Params.m_dEndFeed) ; }
|
|
double GetTipFeed() const
|
|
{ return ( abs( m_Params.m_dTipFeed) < EPS_MACH_LEN_PAR ? m_TParams.m_dTipFeed : m_Params.m_dTipFeed) ; }
|
|
|
|
private :
|
|
SELVECTOR m_vId ; // identificativi entità geometriche da lavorare
|
|
DrillingData m_Params ; // parametri lavorazione
|
|
ToolData m_TParams ; // parametri utensile
|
|
int m_nDrillings ; // numero di fori generati
|
|
bool m_bAggrBottom ; // flag di utilizzo dell'aggregato da sotto
|
|
double m_dDistBottom ; // distanza del foro dal bordo del grezzo
|
|
} ;
|