From fc0f7f05e398423559000865571047089e18bb7c Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 14 Jan 2016 17:37:47 +0000 Subject: [PATCH] Include : - aggiornamenti. --- EGkSimpleCDSurfFrMove.h | 21 +++++++++++---------- EInAPI.h | 10 +++++++--- EXeExecutor.h | 10 +++++++--- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/EGkSimpleCDSurfFrMove.h b/EGkSimpleCDSurfFrMove.h index 1e77937..0e49d73 100644 --- a/EGkSimpleCDSurfFrMove.h +++ b/EGkSimpleCDSurfFrMove.h @@ -34,20 +34,21 @@ const int SCI_LINE_LINE = 4 ; // tra linea di mobile e linea di fiss //---------------------------------------------------------------------------- struct SCollInfo { - int nType ; - int nIdM ; - int nChunkM ; - int nCrvM ; - int nIdF ; - int nChunkF ; - int nCrvF ; + int nType ; // tipo di collisione + int nChunkM ; // indice del chunk della regione mobile + int nCrvM ; // indice della curva nel loopo estermo del chunk + int nChunkF ; // indice del chunk della regione fissa + int nCrvF ; // indice della curva nel loopo estermo del chunk Point3d ptP1 ; // punto di contatto Point3d ptP2 ; // se contatto linea-linea, secondo punto di contatto Vector3d vtDirM ; // se contatto del mobile con linea, sua direzione Vector3d vtDirF ; // se contatto del fisso con linea, sua direzione - // costruttore - SCollInfo() : nType( SCI_NONE), nIdM( GDB_ID_NULL), nChunkM( -1), nCrvM( -1), - nIdF( GDB_ID_NULL), nChunkF( -1), nCrvF( -1), ptP1(), ptP2(), vtDirM(), vtDirF() {} + // costruttori + SCollInfo() : nType( SCI_NONE), nChunkM( -1), nCrvM( -1), nChunkF( -1), nCrvF( -1), + ptP1(), ptP2(), vtDirM(), vtDirF() {} + SCollInfo( const SCollInfo& Sou) : nType( Sou.nType), nChunkM( Sou.nChunkM), nCrvM( Sou.nCrvM), + nChunkF( Sou.nChunkF), nCrvF( Sou.nCrvF), ptP1( Sou.ptP1), + ptP2( Sou.ptP2), vtDirM( Sou.vtDirM), vtDirF( Sou.vtDirF) {} } ; //---------------------------------------------------------------------------- diff --git a/EInAPI.h b/EInAPI.h index b5f4d58..6c87157 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -465,12 +465,16 @@ EIN_EXPORT BOOL __stdcall EgtPackPartCluster( int nId[], int nCount, BOOL bReduc double dXmin, double dYmin, double dXmax, double dYmax, BOOL bBottomUp) ; EIN_EXPORT BOOL __stdcall EgtMovePartCluster( int nId[], int nCount, BOOL bReducedCut, double vtMove[3], double dXmin, double dYmin, double dXmax, double dYmax) ; -EIN_EXPORT BOOL __stdcall EgtGetObstacleTangent( double vtTang[3]) ; -EIN_EXPORT BOOL __stdcall EgtGetMovingTangent( double vtTang[3]) ; EIN_EXPORT BOOL __stdcall EgtRotatePartCluster( int nId[], int nCount, BOOL bReducedCut, const double ptCen[3], double* pdRotAngDeg, double dXmin, double dYmin, double dXmax, double dYmax) ; +EIN_EXPORT BOOL __stdcall EgtTgMovePartClusterOnCollision( int nId[], int nCount, BOOL bReducedCut, double vtMove[3], + double dXmin, double dYmin, double dXmax, double dYmax) ; EIN_EXPORT BOOL __stdcall EgtAlignPartClusterOnCollision( int nId[], int nCount, BOOL bReducedCut, - double dXmin, double dYmin, double dXmax, double dYmax) ; + double dXmin, double dYmin, double dXmax, double dYmax, BOOL* pbMoved) ; +EIN_EXPORT BOOL __stdcall EgtMoveToSnapPointOnCollision( int nId[], int nCount, BOOL bReducedCut, double dMaxMove, + double dXmin, double dYmin, double dXmax, double dYmax, BOOL* pbMoved) ; +EIN_EXPORT void __stdcall EgtSaveCollInfo( void) ; +EIN_EXPORT void __stdcall EgtRestoreCollInfo( void) ; EIN_EXPORT BOOL __stdcall EgtGetPartClusterCenterGlob( int nId[], int nCount, double ptCen[3]) ; // Machining diff --git a/EXeExecutor.h b/EXeExecutor.h index ad63086..5f83d1c 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -494,12 +494,16 @@ EXE_EXPORT bool ExePackPartCluster( const INTVECTOR& vIds, bool bReducedCut, double dXmin, double dYmin, double dXmax, double dYmax, bool bBottomUp) ; EXE_EXPORT bool ExeMovePartCluster( const INTVECTOR& vIds, bool bReducedCut, Vector3d& vtMove, double dXmin, double dYmin, double dXmax, double dYmax) ; -EXE_EXPORT bool ExeGetObstacleTangent( Vector3d& vtTang) ; -EXE_EXPORT bool ExeGetMovingTangent( Vector3d& vtTang) ; EXE_EXPORT bool ExeRotatePartCluster( const INTVECTOR& vIds, bool bReducedCut, const Point3d& ptCen, double& dRotAngDeg, double dXmin, double dYmin, double dXmax, double dYmax) ; +EXE_EXPORT bool ExeTgMovePartClusterOnCollision( const INTVECTOR& vIds, bool bReducedCut, Vector3d& vtMove, + double dXmin, double dYmin, double dXmax, double dYmax) ; EXE_EXPORT bool ExeAlignPartClusterOnCollision( const INTVECTOR& vIds, bool bReducedCut, - double dXmin, double dYmin, double dXmax, double dYmax) ; + double dXmin, double dYmin, double dXmax, double dYmax, bool& bMoved) ; +EXE_EXPORT bool ExeMoveToSnapPointOnCollision( const INTVECTOR& vIds, bool bReducedCut, double dMaxMove, + double dXmin, double dYmin, double dXmax, double dYmax, bool& bMoved) ; +EXE_EXPORT void ExeSaveCollInfo( void) ; +EXE_EXPORT void ExeRestoreCollInfo( void) ; EXE_EXPORT bool ExeGetPartClusterCenterGlob( const INTVECTOR& vIds, Point3d& ptCen) ; // Machining