//---------------------------------------------------------------------------- // EgalTech 2025-2025 //---------------------------------------------------------------------------- // File : Probing.h Data : 10.06.25 Versione : 2.7f2 // Contenuto : Dichiarazione della classe Probing. // // // // Modifiche : 10.06.25 DS Creazione modulo. // // //---------------------------------------------------------------------------- #pragma once #include "Machining.h" #include "ProbingData.h" #include "ToolData.h" class ICurve ; class ICurveComposite ; //---------------------------------------------------------------------------- class Probing : public Machining { public : // IUserObj Probing* 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( int nBaseId, STRVECTOR& vString) const override ; bool Load( const STRVECTOR& vString, int nBaseGdbId) override ; public : // Operation int GetType( void) const override { return OPER_PROBING ; } bool IsEmpty( int nEmptyType = NEED_GEOM) const override { if ( m_nMills == 0) return true ; if ( nEmptyType == NEED_ONE_TP_OK) return ( ! IsAtLeastOnePathOk()) ; if ( nEmptyType == NEED_ALL_TP_OK) return ( ! AreAllPathsOk()) ; return false ; } bool UpdateStatus( int nModif) override { m_nStatus |= nModif ; return true ; } protected : // Operation int GetSolCh( void) const override { return m_Params.m_nSolCh ; } public : // Machining bool Prepare( const std::string& sMillName) 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, bool bPostApply) override ; bool Update( bool bPostApply) 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 ; bool UpdateToolData( void) override ; const ToolData& GetToolData( void) const override ; bool GetGeometry( SELVECTOR& vIds) const override ; public : Probing( void) ; private : bool VerifyGeometry( SelData Id, int& nSubs, int& nType) ; double GetApproxLinTol( void) const override ; private : double GetFeed() const { return ( IsNullLenValue( m_Params.m_dFeed) ? m_TParams.m_dFeed : m_Params.m_dFeed) ; } double GetStartFeed() const { return ( IsNullLenValue( m_Params.m_dStartFeed) ? m_TParams.m_dStartFeed : m_Params.m_dStartFeed) ; } double GetEndFeed() const { return ( IsNullLenValue( m_Params.m_dEndFeed) ? m_TParams.m_dEndFeed : m_Params.m_dEndFeed) ; } double GetTipFeed() const { return ( IsNullLenValue( m_Params.m_dTipFeed) ? m_TParams.m_dTipFeed : m_Params.m_dTipFeed) ; } private : SELVECTOR m_vId ; // identificativi entità geometriche da lavorare ProbingData m_Params ; // parametri lavorazione ToolData m_TParams ; // parametri utensile int m_nStatus ; // stato di aggiornamento della lavorazione int m_nMills ; // numero di percorsi di lavoro generati } ;