cad6867216
- CAvToolSurfTm ora può processare più superfici contemporaneamente - IsPointInsideTriangle spostata in Include/EgkTriangle3d.
67 lines
3.0 KiB
C++
67 lines
3.0 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2018-2019
|
|
//----------------------------------------------------------------------------
|
|
// File : CAToolSurfTm.h Data : 06.06.19 Versione : 2.1f1
|
|
// Contenuto : Dichiarazioni per classe CAToolSurfTm.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 27.04.18 DS Creazione modulo.
|
|
// 06.06.19 DS Aggiunta gestione di più superfici.
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "SurfTriMesh.h"
|
|
#include "Tool.h"
|
|
#include "/EgtDev/Include/EGkHashGrids2d.h"
|
|
#include "/EgtDev/Include/EGkCAvToolSurfTm.h"
|
|
#include <atomic>
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
class CAvToolSurfTm : public ICAvToolSurfTm
|
|
{
|
|
public : // ICAvToolSurfTm
|
|
bool SetSurfTm( const ISurfTriMesh& Stm) override ;
|
|
bool AddSurfTm( const ISurfTriMesh& Stm) override ;
|
|
bool SetStdTool( double dH, double dR, double dCornR) override ;
|
|
bool SetAdvTool( double dH, double dR, double dTipH, double dTipR, double dCornR) override ;
|
|
bool SetSawTool( double dH, double dR, double dThick, double dStemR, double dCornR) override ;
|
|
bool SetGenTool( const ICurveComposite* pToolOutline) override ;
|
|
double GetToolRadius( void) const override
|
|
{ return m_Tool.GetRadius() ; }
|
|
double GetToolHeight( void) const override
|
|
{ return m_Tool.GetHeigth() ; }
|
|
const ICurveComposite& GetToolOutline( bool bApprox = false) const override
|
|
{ return ( bApprox ? m_Tool.GetApproxOutline() : m_Tool.GetOutline()) ;}
|
|
bool TestPosition( const Point3d& ptT, const Vector3d& vtDir, const Vector3d& vtMove, double& dTotDist) override ;
|
|
bool TestPath( PNTULIST& lPntM, const Vector3d& vtDir, const Vector3d& vtMove, double dLinTol) override ;
|
|
|
|
public :
|
|
CAvToolSurfTm( void) ;
|
|
|
|
private :
|
|
bool TestSubPath( int nId, PNTULIST& lPntM, const Vector3d& vtDir, double dLinTol) ;
|
|
double MyTestPosition( Point3d& ptT, const Vector3d& vtDir) ;
|
|
double MyTestPositionHG( Point3d& ptT, const Vector3d& vtDir) ;
|
|
bool MyTestMidPointHG( PNTULIST& lPntM, const PNTULIST::iterator& itPntMPrev, const PNTULIST::iterator& itPntMCurr,
|
|
const Point3d& ptPrev, const Point3d& ptCurr, const Vector3d& vtDir, double dLinTol, int nLev) ;
|
|
bool PrepareHashGrid( void) ;
|
|
int GetSurfInd( int nT) ;
|
|
|
|
private :
|
|
typedef std::vector<const SurfTriMesh*> CSURFTMPVECTOR ; // vettore di puntatori a const SurfTriMesh
|
|
|
|
private :
|
|
Frame3d m_frMove ;
|
|
CSURFTMPVECTOR m_vSTM ;
|
|
INTVECTOR m_vBaseInd ;
|
|
HashGrids2d m_HGrids ;
|
|
Tool m_Tool ;
|
|
int m_nTotPnt ;
|
|
std::atomic<int> m_nCurrPnt ;
|
|
std::atomic<bool> m_bBreak ;
|
|
} ;
|