Compare commits
57 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e58792d4ff | |||
| 2e32adf1af | |||
| 51e12381a9 | |||
| 26813af640 | |||
| f746731ea3 | |||
| 043a81366f | |||
| 68a850268f | |||
| e8964930b3 | |||
| be0ddf6ae4 | |||
| 74bf6c65e8 | |||
| 32c20e6eaa | |||
| 06180175eb | |||
| 0fef1fbbf9 | |||
| 37d649b3a8 | |||
| 6b3c403f9f | |||
| f7d7d1ceaf | |||
| 1d300e6105 | |||
| 51c34f98b6 | |||
| 8198d6667b | |||
| 54ce972fa1 | |||
| 67cce96f4a | |||
| ab5f4a7cc4 | |||
| a49bf49157 | |||
| 5ed415ca4b | |||
| a997be46ff | |||
| e8b547b66c | |||
| f597c5769b | |||
| 3d848fbf4e | |||
| cbb15bf69c | |||
| 2a687d76b7 | |||
| e55d481ab7 | |||
| dceb899adb | |||
| b877fe54b2 | |||
| 5578036bcd | |||
| 2338870692 | |||
| 1769c76bfe | |||
| 0787d66b72 | |||
| 443f04116f | |||
| 5196ffe33e | |||
| a4758aad6e | |||
| 72c71b817e | |||
| ad8a69b7e5 | |||
| 1395ba2c04 | |||
| 1a4faa645c | |||
| 69d128dbe9 | |||
| d949864643 | |||
| 94cf212333 | |||
| bcfa3326b8 | |||
| 38ceb12df8 | |||
| 8b8ad9af44 | |||
| 1874f6b1f8 | |||
| 981563b682 | |||
| c848b82235 | |||
| b3366241a2 | |||
| 31a701a0e3 | |||
| 040be553ad | |||
| a747e7ecfb |
Binary file not shown.
@@ -21,6 +21,7 @@ const double MIN_SAFEDIST = 5.0 ;
|
|||||||
|
|
||||||
//----------- Costanti per approssimazioni con polilinee o poliarchi --------
|
//----------- Costanti per approssimazioni con polilinee o poliarchi --------
|
||||||
const double LIN_TOL_STD = 0.1 ;
|
const double LIN_TOL_STD = 0.1 ;
|
||||||
|
const double LIN_TOL_FINE = 0.01 ;
|
||||||
const double LIN_TOL_MID = 0.05 ;
|
const double LIN_TOL_MID = 0.05 ;
|
||||||
const double LIN_TOL_RAW = 0.5 ;
|
const double LIN_TOL_RAW = 0.5 ;
|
||||||
const double ANG_TOL_STD_DEG = 15 ;
|
const double ANG_TOL_STD_DEG = 15 ;
|
||||||
|
|||||||
+17
-5
@@ -112,14 +112,26 @@ MachMgr::VerifyCurrSetup( STRVECTOR& vsErrors)
|
|||||||
if ( find( vsErrors.begin(), vsErrors.end(), sTool) == vsErrors.end())
|
if ( find( vsErrors.begin(), vsErrors.end(), sTool) == vsErrors.end())
|
||||||
vsErrors.push_back( sTool) ;
|
vsErrors.push_back( sTool) ;
|
||||||
}
|
}
|
||||||
// altrimenti, verifico se uscita coincide con quella indicata nel DB utensili
|
// altrimenti, verifico se testa e uscita coincidono con quella indicata nel DB utensili
|
||||||
else {
|
else {
|
||||||
|
string sTdbHead ;
|
||||||
int nTdbExit = 0 ;
|
int nTdbExit = 0 ;
|
||||||
if ( ! TdbSetCurrTool( sTool) ||
|
if ( ! TdbSetCurrTool( sTool) ||
|
||||||
! TdbGetCurrToolParam( TPA_EXIT, nTdbExit) ||
|
! TdbGetCurrToolParam( TPA_HEAD, sTdbHead) ||
|
||||||
nExit != nTdbExit) {
|
! TdbGetCurrToolParam( TPA_EXIT, nTdbExit)) {
|
||||||
string sErr = sTool + " (exit mismatch " + ToString( nExit) + " - " + ToString( nTdbExit) + ")" ;
|
string sErr = sTcPos + " - " + sTool + " (not found in Tool DB)" ;
|
||||||
vsErrors.push_back( sErr) ;
|
if ( find( vsErrors.begin(), vsErrors.end(), sErr) == vsErrors.end())
|
||||||
|
vsErrors.push_back( sErr) ;
|
||||||
|
}
|
||||||
|
else if ( sHead != sTdbHead && ( GetCurrMachine() == nullptr || ! GetCurrMachine()->GetUseTcPosHead())) {
|
||||||
|
string sErr = sTcPos + " - " + sTool + " (head mismatch " + sHead + " - " + sTdbHead + ")" ;
|
||||||
|
if ( find( vsErrors.begin(), vsErrors.end(), sErr) == vsErrors.end())
|
||||||
|
vsErrors.push_back( sErr) ;
|
||||||
|
}
|
||||||
|
else if ( nExit != nTdbExit) {
|
||||||
|
string sErr = sTcPos + " - " + sTool + " (exit mismatch " + ToString( nExit) + " - " + ToString( nTdbExit) + ")" ;
|
||||||
|
if ( find( vsErrors.begin(), vsErrors.end(), sErr) == vsErrors.end())
|
||||||
|
vsErrors.push_back( sErr) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ Machine::Machine( void)
|
|||||||
m_nMultiProcess = 0 ;
|
m_nMultiProcess = 0 ;
|
||||||
m_nLinkAxesMoveOrder = 0 ;
|
m_nLinkAxesMoveOrder = 0 ;
|
||||||
m_nNewLinkMgr = 0 ;
|
m_nNewLinkMgr = 0 ;
|
||||||
|
m_nUseTcPosHead = 0 ;
|
||||||
m_nCalcTabId = GDB_ID_NULL ;
|
m_nCalcTabId = GDB_ID_NULL ;
|
||||||
m_nCalcHeadId = GDB_ID_NULL ;
|
m_nCalcHeadId = GDB_ID_NULL ;
|
||||||
m_nCalcExitId = GDB_ID_NULL ;
|
m_nCalcExitId = GDB_ID_NULL ;
|
||||||
@@ -1046,8 +1047,12 @@ Machine::ModifyMachineExitPosition( const string& sHead, int nExit, const Point3
|
|||||||
if ( pExit == nullptr)
|
if ( pExit == nullptr)
|
||||||
return false ;
|
return false ;
|
||||||
// eseguo la modifica
|
// eseguo la modifica
|
||||||
|
Point3d ptOrigPos = pExit->GetPos() ;
|
||||||
if ( ! pExit->Modify( ptPos, m_dExitMaxAdjust))
|
if ( ! pExit->Modify( ptPos, m_dExitMaxAdjust))
|
||||||
return false ;
|
return false ;
|
||||||
|
// ripeto modifica su frame speciale "_T" + N
|
||||||
|
int nSpecFrId = m_pGeomDB->GetFirstNameInGroup( nHeadId, "_T" + ToString( nExit)) ;
|
||||||
|
m_pGeomDB->Translate( nSpecFrId, ptPos - ptOrigPos) ;
|
||||||
// eventuale aggiornamento variabile lua EMC.EXITPOS con la nuova posizione
|
// eventuale aggiornamento variabile lua EMC.EXITPOS con la nuova posizione
|
||||||
LuaSetGlobVar( "EMC.EXITPOS", ptPos) ;
|
LuaSetGlobVar( "EMC.EXITPOS", ptPos) ;
|
||||||
return true ;
|
return true ;
|
||||||
|
|||||||
@@ -92,6 +92,8 @@ class Machine
|
|||||||
{ return m_nLinkAxesMoveOrder ; }
|
{ return m_nLinkAxesMoveOrder ; }
|
||||||
bool GetNewLinkMgr( int nOpt = 1) const
|
bool GetNewLinkMgr( int nOpt = 1) const
|
||||||
{ return ( m_nNewLinkMgr >= nOpt || m_nCalcChainType == KIN_CHAIN_ROBOT) ; }
|
{ return ( m_nNewLinkMgr >= nOpt || m_nCalcChainType == KIN_CHAIN_ROBOT) ; }
|
||||||
|
bool GetUseTcPosHead( void) const
|
||||||
|
{ return ( m_nUseTcPosHead != 0) ; }
|
||||||
bool LoadTool( const std::string& sHead, int nExit, const std::string& sTool) ;
|
bool LoadTool( const std::string& sHead, int nExit, const std::string& sTool) ;
|
||||||
bool GetLoadedTool( const std::string& sHead, int nExit, std::string& sTool) const ;
|
bool GetLoadedTool( const std::string& sHead, int nExit, std::string& sTool) const ;
|
||||||
bool UnloadTool( const std::string& sHead, int nExit) ;
|
bool UnloadTool( const std::string& sHead, int nExit) ;
|
||||||
@@ -318,6 +320,7 @@ class Machine
|
|||||||
int m_nMultiProcess ; // codice di macchina multi-processo (con stima speciale e simulazione ad hoc)
|
int m_nMultiProcess ; // codice di macchina multi-processo (con stima speciale e simulazione ad hoc)
|
||||||
int m_nLinkAxesMoveOrder ; // codice ordine interpolazione assi nei collegamenti (0=interpolati, ...)
|
int m_nLinkAxesMoveOrder ; // codice ordine interpolazione assi nei collegamenti (0=interpolati, ...)
|
||||||
int m_nNewLinkMgr ; // codice del nuovo gestore link tra lavorazioni (0=vecchio, 1=nuovo)
|
int m_nNewLinkMgr ; // codice del nuovo gestore link tra lavorazioni (0=vecchio, 1=nuovo)
|
||||||
|
int m_nUseTcPosHead ; // imposto codice per utilizzo Head da posizione TC (0=no, 1=si)
|
||||||
INTVECTOR m_vLinkedRawParts ; // elenco dei grezzi agganciati a gruppi della macchina
|
INTVECTOR m_vLinkedRawParts ; // elenco dei grezzi agganciati a gruppi della macchina
|
||||||
INTVECTOR m_vLinkedFixtures ; // elenco dei bloccaggi agganciati a gruppi della macchina
|
INTVECTOR m_vLinkedFixtures ; // elenco dei bloccaggi agganciati a gruppi della macchina
|
||||||
INTVECTOR m_vLinkedParts ; // elenco dei pezzi agganciati a gruppi della macchina
|
INTVECTOR m_vLinkedParts ; // elenco dei pezzi agganciati a gruppi della macchina
|
||||||
@@ -385,6 +388,7 @@ class Machine
|
|||||||
static int LuaEmtRemoveClimb( lua_State* L) ;
|
static int LuaEmtRemoveClimb( lua_State* L) ;
|
||||||
static int LuaEmtAddRise( lua_State* L) ;
|
static int LuaEmtAddRise( lua_State* L) ;
|
||||||
static int LuaEmtRemoveRise( lua_State* L) ;
|
static int LuaEmtRemoveRise( lua_State* L) ;
|
||||||
|
static int LuaEmtAdjustConcavePartsInPath( lua_State* L) ;
|
||||||
static int LuaEmtGetMoveType( lua_State* L) ;
|
static int LuaEmtGetMoveType( lua_State* L) ;
|
||||||
static int LuaEmtGetAxesPos( lua_State* L) ;
|
static int LuaEmtGetAxesPos( lua_State* L) ;
|
||||||
static int LuaEmtGetBackAuxDir( lua_State* L) ;
|
static int LuaEmtGetBackAuxDir( lua_State* L) ;
|
||||||
|
|||||||
+8
-1
@@ -39,6 +39,7 @@ static const string FLD_ANGDELTAMINFORHOME = "AngDeltaMinForHome" ;
|
|||||||
static const string FLD_MULTIPROCESS = "MultiProcess" ;
|
static const string FLD_MULTIPROCESS = "MultiProcess" ;
|
||||||
static const string FLD_LINKAXESMOVEORDER = "LinkAxesMoveOrder" ;
|
static const string FLD_LINKAXESMOVEORDER = "LinkAxesMoveOrder" ;
|
||||||
static const string FLD_NEWLINKMGR = "NewLinkMgr" ;
|
static const string FLD_NEWLINKMGR = "NewLinkMgr" ;
|
||||||
|
static const string FLD_USETCPOSHEAD = "UseTcPosHead" ;
|
||||||
static const string FLD_NAME = "Name" ;
|
static const string FLD_NAME = "Name" ;
|
||||||
static const string FLD_PARENT = "Parent" ;
|
static const string FLD_PARENT = "Parent" ;
|
||||||
static const string FLD_GEO = "Geo" ;
|
static const string FLD_GEO = "Geo" ;
|
||||||
@@ -128,6 +129,7 @@ Machine::LuaInit( const string& sMachineName)
|
|||||||
m_LuaMgr.RegisterFunction( "EmtGetInitialAxesPos", Machine::LuaEmtGetInitialAxesPos) ;
|
m_LuaMgr.RegisterFunction( "EmtGetInitialAxesPos", Machine::LuaEmtGetInitialAxesPos) ;
|
||||||
m_LuaMgr.RegisterFunction( "EmtGetFinalAxesPos", Machine::LuaEmtGetFinalAxesPos) ;
|
m_LuaMgr.RegisterFunction( "EmtGetFinalAxesPos", Machine::LuaEmtGetFinalAxesPos) ;
|
||||||
m_LuaMgr.RegisterFunction( "EmtGetCurrAxesHomePos", Machine::LuaEmtGetCurrAxesHomePos) ;
|
m_LuaMgr.RegisterFunction( "EmtGetCurrAxesHomePos", Machine::LuaEmtGetCurrAxesHomePos) ;
|
||||||
|
m_LuaMgr.RegisterFunction( "EmtAdjustConcavePartsInPath", Machine::LuaEmtAdjustConcavePartsInPath) ;
|
||||||
// registro le funzioni di lettura entità CL per lua
|
// registro le funzioni di lettura entità CL per lua
|
||||||
m_LuaMgr.RegisterFunction( "EmtGetMoveType", Machine::LuaEmtGetMoveType) ;
|
m_LuaMgr.RegisterFunction( "EmtGetMoveType", Machine::LuaEmtGetMoveType) ;
|
||||||
m_LuaMgr.RegisterFunction( "EmtGetAxesPos", Machine::LuaEmtGetAxesPos) ;
|
m_LuaMgr.RegisterFunction( "EmtGetAxesPos", Machine::LuaEmtGetAxesPos) ;
|
||||||
@@ -367,9 +369,12 @@ Machine::LuaEmtGeneral( lua_State* L)
|
|||||||
// lettura eventuale campo "LinkAxesMoveOrder" dalla tabella(0=interpolati, ...)
|
// lettura eventuale campo "LinkAxesMoveOrder" dalla tabella(0=interpolati, ...)
|
||||||
int nLinkAxesMoveOrder = 0 ;
|
int nLinkAxesMoveOrder = 0 ;
|
||||||
LuaGetTabFieldParam( L, 1, FLD_LINKAXESMOVEORDER, nLinkAxesMoveOrder) ;
|
LuaGetTabFieldParam( L, 1, FLD_LINKAXESMOVEORDER, nLinkAxesMoveOrder) ;
|
||||||
// lettura eventuale campo 'NewLinkMgr' dalla tabella (0=old, 1 =new)
|
// lettura eventuale campo 'NewLinkMgr' dalla tabella (0=old, 1=new)
|
||||||
int nNewLinkMgr = 0 ;
|
int nNewLinkMgr = 0 ;
|
||||||
LuaGetTabFieldParam( L, 1, FLD_NEWLINKMGR, nNewLinkMgr) ;
|
LuaGetTabFieldParam( L, 1, FLD_NEWLINKMGR, nNewLinkMgr) ;
|
||||||
|
// lettura eventuale campo "UseTcPosHead" dalla tabella (0=no, 1=si)
|
||||||
|
int nUseTcPosHead = 0 ;
|
||||||
|
LuaGetTabFieldParam( L, 1, FLD_USETCPOSHEAD, nUseTcPosHead) ;
|
||||||
// pulizia stack
|
// pulizia stack
|
||||||
LuaClearStack( L) ;
|
LuaClearStack( L) ;
|
||||||
|
|
||||||
@@ -426,6 +431,8 @@ Machine::LuaEmtGeneral( lua_State* L)
|
|||||||
m_pMchLua->m_nLinkAxesMoveOrder = nLinkAxesMoveOrder ;
|
m_pMchLua->m_nLinkAxesMoveOrder = nLinkAxesMoveOrder ;
|
||||||
// imposto codice per gestione link tra lavorazioni
|
// imposto codice per gestione link tra lavorazioni
|
||||||
m_pMchLua->m_nNewLinkMgr = nNewLinkMgr ;
|
m_pMchLua->m_nNewLinkMgr = nNewLinkMgr ;
|
||||||
|
// imposto codice per utilizzo Head da posizione TC
|
||||||
|
m_pMchLua->m_nUseTcPosHead = nUseTcPosHead ;
|
||||||
|
|
||||||
return 0 ;
|
return 0 ;
|
||||||
}
|
}
|
||||||
|
|||||||
+158
-25
@@ -19,16 +19,25 @@
|
|||||||
#include "Operation.h"
|
#include "Operation.h"
|
||||||
#include "/EgtDev/Include/EXeExecutor.h"
|
#include "/EgtDev/Include/EXeExecutor.h"
|
||||||
#include "/EgtDev/Include/EGkGeoPoint3d.h"
|
#include "/EgtDev/Include/EGkGeoPoint3d.h"
|
||||||
|
#include "/EgtDev/Include/EGkGeoVector3d.h"
|
||||||
#include "/EgtDev/Include/EGkCurveLine.h"
|
#include "/EgtDev/Include/EGkCurveLine.h"
|
||||||
#include "/EgtDev/Include/EGkCurveArc.h"
|
#include "/EgtDev/Include/EGkCurveArc.h"
|
||||||
|
#include "/EgtDev/Include/EGkCurveComposite.h"
|
||||||
|
#include "/EgtDev/Include/EGkIntersLineCylinder.h"
|
||||||
|
#include "/EgtDev/Include/EGkOffsetCurve3d.h"
|
||||||
#include "/EgtDev/Include/EGkGeomDB.h"
|
#include "/EgtDev/Include/EGkGeomDB.h"
|
||||||
#include "/EgtDev/Include/EGkLuaAux.h"
|
#include "/EgtDev/Include/EGkLuaAux.h"
|
||||||
|
#include "/EgtDev/Include/EGkStringUtils3d.h"
|
||||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||||
#include "/EgtDev/Include/EGnFileUtils.h"
|
#include "/EgtDev/Include/EGnFileUtils.h"
|
||||||
|
#include "/EgtDev/Include/ENkPolynomialRoots.h"
|
||||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||||
|
|
||||||
using namespace std ;
|
using namespace std ;
|
||||||
|
|
||||||
|
#define COLOR5AX 0
|
||||||
|
#define DRAWCYL 0
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
int
|
int
|
||||||
Machine::LuaEmtAddRapidStart( lua_State* L)
|
Machine::LuaEmtAddRapidStart( lua_State* L)
|
||||||
@@ -153,6 +162,41 @@ Machine::LuaEmtAddRapidMove( lua_State* L)
|
|||||||
return 1 ;
|
return 1 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
int
|
||||||
|
AddLinearMove( const Point3d& ptIni, const Point3d& ptFin, IGeomDB* pGeomDB , int nPathId, const Vector3d& vtTool,
|
||||||
|
const Vector3d& vtCorr, const Vector3d& vtAux, double dFeed, int nFlag, int nFlag2, bool bToolShow, int nRefId = GDB_ID_NULL)
|
||||||
|
{
|
||||||
|
// creo oggetto linea per DB geometrico
|
||||||
|
PtrOwner<ICurveLine> pLine( CreateCurveLine()) ;
|
||||||
|
bool bOk = ! IsNull( pLine) ;
|
||||||
|
// assegno gli estremi della linea
|
||||||
|
bOk = bOk && pLine->Set( ptIni, ptFin) ;
|
||||||
|
// inserisco l'oggetto nel DB geometrico
|
||||||
|
int nId = ( bOk ? pGeomDB->AddGeoObj( GDB_ID_NULL, nPathId, Release( pLine)) : GDB_ID_NULL) ;
|
||||||
|
bOk = bOk && ( nId != GDB_ID_NULL) ;
|
||||||
|
if ( bOk && nRefId != GDB_ID_NULL)
|
||||||
|
pGeomDB->RelocateGlob( nId, nRefId, GDB_AFTER) ;
|
||||||
|
// creo oggetto dati Cam
|
||||||
|
PtrOwner<CamData> pCam( new( nothrow) CamData) ;
|
||||||
|
bOk = bOk && ! IsNull( pCam) ;
|
||||||
|
if ( bOk) {
|
||||||
|
// assegno valori
|
||||||
|
pCam->SetMoveType( 1) ;
|
||||||
|
pCam->SetToolDir( vtTool) ;
|
||||||
|
pCam->SetCorrDir( vtCorr) ;
|
||||||
|
pCam->SetAuxDir( vtAux) ;
|
||||||
|
pCam->SetEndPoint( ptFin) ;
|
||||||
|
pCam->SetFeed( dFeed) ;
|
||||||
|
pCam->SetFlag( nFlag) ;
|
||||||
|
pCam->SetFlag2( nFlag2) ;
|
||||||
|
pCam->SetToolShow( bToolShow) ;
|
||||||
|
// associo questo oggetto a quello geometrico
|
||||||
|
pGeomDB->SetUserObj( nId, Release( pCam)) ;
|
||||||
|
}
|
||||||
|
return nId ;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
int
|
int
|
||||||
Machine::LuaEmtAddLinearMove( lua_State* L)
|
Machine::LuaEmtAddLinearMove( lua_State* L)
|
||||||
@@ -185,31 +229,8 @@ Machine::LuaEmtAddLinearMove( lua_State* L)
|
|||||||
if ( m_pMchLua == nullptr ||
|
if ( m_pMchLua == nullptr ||
|
||||||
m_pMchLua->m_pMchMgr == nullptr || m_pMchLua->m_pGeomDB == nullptr)
|
m_pMchLua->m_pMchMgr == nullptr || m_pMchLua->m_pGeomDB == nullptr)
|
||||||
return luaL_error( L, " Unknown Machine") ;
|
return luaL_error( L, " Unknown Machine") ;
|
||||||
// creo oggetto linea per DB geometrico
|
int nId = AddLinearMove( ptIni, ptFin, m_pMchLua->m_pGeomDB, nPathId, vtTool, vtCorr, vtAux, dFeed, nFlag, nFlag2, bToolShow) ;
|
||||||
PtrOwner<ICurveLine> pLine( CreateCurveLine()) ;
|
bool bOk = nId != GDB_ID_NULL ;
|
||||||
bool bOk = ! IsNull( pLine) ;
|
|
||||||
// assegno gli estremi della linea
|
|
||||||
bOk = bOk && pLine->Set( ptIni, ptFin) ;
|
|
||||||
// inserisco l'oggetto nel DB geometrico
|
|
||||||
int nId = ( bOk ? m_pMchLua->m_pGeomDB->AddGeoObj( GDB_ID_NULL, nPathId, Release( pLine)) : GDB_ID_NULL) ;
|
|
||||||
bOk = bOk && ( nId != GDB_ID_NULL) ;
|
|
||||||
// creo oggetto dati Cam
|
|
||||||
PtrOwner<CamData> pCam( new( nothrow) CamData) ;
|
|
||||||
bOk = bOk && ! IsNull( pCam) ;
|
|
||||||
if ( bOk) {
|
|
||||||
// assegno valori
|
|
||||||
pCam->SetMoveType( 1) ;
|
|
||||||
pCam->SetToolDir( vtTool) ;
|
|
||||||
pCam->SetCorrDir( vtCorr) ;
|
|
||||||
pCam->SetAuxDir( vtAux) ;
|
|
||||||
pCam->SetEndPoint( ptFin) ;
|
|
||||||
pCam->SetFeed( dFeed) ;
|
|
||||||
pCam->SetFlag( nFlag) ;
|
|
||||||
pCam->SetFlag2( nFlag2) ;
|
|
||||||
pCam->SetToolShow( bToolShow) ;
|
|
||||||
// associo questo oggetto a quello geometrico
|
|
||||||
m_pMchLua->m_pGeomDB->SetUserObj( nId, Release( pCam)) ;
|
|
||||||
}
|
|
||||||
// assegno risultato
|
// assegno risultato
|
||||||
if ( bOk)
|
if ( bOk)
|
||||||
LuaSetParam( L, nId) ;
|
LuaSetParam( L, nId) ;
|
||||||
@@ -581,3 +602,115 @@ Machine::LuaEmtGetBackAuxDir( lua_State* L)
|
|||||||
|
|
||||||
return 1 ;
|
return 1 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
int
|
||||||
|
Machine::LuaEmtAdjustConcavePartsInPath( lua_State* L)
|
||||||
|
{
|
||||||
|
bool bOk = true ;
|
||||||
|
// 3 parametri : nPathId, nAuxPathId, dRad
|
||||||
|
int nPathId ;
|
||||||
|
LuaCheckParam( L, 1, nPathId)
|
||||||
|
int nAuxPathId ;
|
||||||
|
LuaCheckParam( L, 2, nAuxPathId)
|
||||||
|
double dRad ;
|
||||||
|
LuaCheckParam( L, 3, dRad)
|
||||||
|
LuaClearStack( L) ;
|
||||||
|
IGeomDB* pGeomDB = m_pMchLua->m_pGeomDB ;
|
||||||
|
int nId = pGeomDB->GetFirstInGroup( nPathId) ;
|
||||||
|
int nIdCrvAux = pGeomDB->GetFirstInGroup( nAuxPathId) ;
|
||||||
|
const ICurveComposite* pCrvAux = GetCurveComposite( pGeomDB->GetGeoObj(nIdCrvAux)) ;
|
||||||
|
if ( pCrvAux == nullptr)
|
||||||
|
return GDB_ID_NULL ;
|
||||||
|
int nFirstCrvOffset = nId ;
|
||||||
|
OFFSETSEGVEC vOffsetCrvs ;
|
||||||
|
while ( nId != GDB_ID_NULL) {
|
||||||
|
if ( pGeomDB->GetGeoType( nId) == CRV_LINE) {
|
||||||
|
const ICurve* pCrv = GetCurve( pGeomDB->GetGeoObj( nId)) ;
|
||||||
|
int nParent = -1 ;
|
||||||
|
int nDerivFrom = - 1 ;
|
||||||
|
pGeomDB->GetInfo( nId, "DerivFrom", nDerivFrom) ;
|
||||||
|
const IGeoVector3d* pGV = GetGeoVector3d( pGeomDB->GetGeoObj( nDerivFrom)) ;
|
||||||
|
if ( pGV != nullptr) {
|
||||||
|
Point3d ptBase = pGV->GetBase() ;
|
||||||
|
double dPar = 0 ;
|
||||||
|
if ( pCrvAux->GetParamAtPoint( ptBase, dPar))
|
||||||
|
nParent = int( round( dPar)) - 1 ;
|
||||||
|
}
|
||||||
|
int nFlagAng = 0 ;
|
||||||
|
pGeomDB->GetInfo( nId, "FlgAng", nFlagAng) ;
|
||||||
|
vOffsetCrvs.emplace_back( pCrv->Clone(), nFlagAng, nParent) ;
|
||||||
|
}
|
||||||
|
nId = pGeomDB->GetNext( nId) ;
|
||||||
|
}
|
||||||
|
EDITCRVINFOVEC vEditInfo ;
|
||||||
|
if ( ! CalcAdjustConcavePartsInPath( pCrvAux, vOffsetCrvs, dRad, vEditInfo))
|
||||||
|
return GDB_ID_NULL ;
|
||||||
|
|
||||||
|
// applico le modifiche calcolate
|
||||||
|
for ( int i = 0 ; i < ssize( vEditInfo) ; ++i) {
|
||||||
|
if ( vEditInfo[i].nFlag == EditCrvInfo::NOEDIT)
|
||||||
|
continue ;
|
||||||
|
else if ( vEditInfo[i].nFlag == EditCrvInfo::DEL) {
|
||||||
|
pGeomDB->Erase( nFirstCrvOffset + i) ;
|
||||||
|
}
|
||||||
|
else if ( vEditInfo[i].nFlag == EditCrvInfo::EDIT) {
|
||||||
|
if ( vEditInfo[i].ptStart.IsValid()) {
|
||||||
|
ICurveLine* pCL = GetCurveLine( pGeomDB->GetGeoObj( nFirstCrvOffset + i)) ;
|
||||||
|
pCL->ModifyStart( vEditInfo[i].ptStart) ;
|
||||||
|
}
|
||||||
|
if ( vEditInfo[i].ptEnd.IsValid()) {
|
||||||
|
ICurveLine* pCL = GetCurveLine( pGeomDB->GetGeoObj( nFirstCrvOffset + i)) ;
|
||||||
|
pCL->ModifyEnd( vEditInfo[i].ptEnd) ;
|
||||||
|
CamData* camData = GetCamData( pGeomDB->GetUserObj( nFirstCrvOffset + i)) ;
|
||||||
|
camData->SetEndPoint( vEditInfo[i].ptEnd) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// scorro tutto il vettore delle linee di offset e unisco aggiungendo una linea dove ne ho cancellate
|
||||||
|
for ( int i = 0 ; i < ssize( vEditInfo) - 1 ; ++i) {
|
||||||
|
if ( vEditInfo[i].nFlag == EditCrvInfo::DEL || ( vEditInfo[i].nFlag == EditCrvInfo::NOEDIT))
|
||||||
|
continue ;
|
||||||
|
int nPrevId = nFirstCrvOffset + i ;
|
||||||
|
int c = i + 1 ;
|
||||||
|
// scorro finché trovo la successiva modificata
|
||||||
|
while ( c < ssize( vEditInfo) && ( vEditInfo[c].nFlag == EditCrvInfo::DEL || vEditInfo[c].nFlag == EditCrvInfo::NOEDIT))
|
||||||
|
++c ;
|
||||||
|
if ( vEditInfo[c].nFlag != EditCrvInfo::EDIT)
|
||||||
|
return GDB_ID_NULL ;
|
||||||
|
int nNextId = nFirstCrvOffset + c ;
|
||||||
|
Point3d ptEndCurr, ptStartNext ;
|
||||||
|
if ( vEditInfo[i].ptEnd.IsValid())
|
||||||
|
ptEndCurr = vEditInfo[i].ptEnd ;
|
||||||
|
else
|
||||||
|
vOffsetCrvs[i].pCrv->GetEndPoint( ptEndCurr) ;
|
||||||
|
|
||||||
|
if ( vEditInfo[c].ptStart.IsValid())
|
||||||
|
ptStartNext = vEditInfo[c].ptStart ;
|
||||||
|
else
|
||||||
|
vOffsetCrvs[c].pCrv->GetStartPoint( ptStartNext) ;
|
||||||
|
|
||||||
|
if ( ! AreSamePointApprox( ptEndCurr, ptStartNext)) {
|
||||||
|
// giunto questi due punti
|
||||||
|
ICurveLine* pCLprev = GetCurveLine( pGeomDB->GetGeoObj( nPrevId)) ;
|
||||||
|
Point3d ptIni = pCLprev->GetEnd() ;
|
||||||
|
ICurveLine* pCLnext = GetCurveLine( pGeomDB->GetGeoObj( nNextId)) ;
|
||||||
|
Point3d ptFin = pCLnext->GetStart() ;
|
||||||
|
const CamData* camDataPrev = GetCamData( pGeomDB->GetUserObj( nPrevId)) ;
|
||||||
|
const CamData* camDataNext = GetCamData( pGeomDB->GetUserObj( nNextId)) ;
|
||||||
|
Vector3d vtTool = Media( camDataPrev->GetToolDir(), camDataNext->GetToolDir()) ;
|
||||||
|
Vector3d vtCorr = Media( camDataPrev->GetCorrDir(), camDataNext->GetCorrDir()) ;
|
||||||
|
Vector3d vtAux = Media( camDataPrev->GetAuxDir(), camDataNext->GetAuxDir()) ;
|
||||||
|
double dFeed = camDataPrev->GetFeed() ;
|
||||||
|
int nFlag = camDataPrev->GetFlag() ;
|
||||||
|
int nFlag2 = camDataPrev->GetFlag2() ;
|
||||||
|
bool bToolShow = camDataPrev->GetToolShow() ;
|
||||||
|
AddLinearMove( ptIni, ptFin, pGeomDB, nPathId, vtTool, vtCorr, vtAux, dFeed, nFlag, nFlag2, bToolShow, nPrevId) ;
|
||||||
|
}
|
||||||
|
i = c ;
|
||||||
|
}
|
||||||
|
|
||||||
|
LuaSetParam( L, bOk) ;
|
||||||
|
return 1 ;
|
||||||
|
}
|
||||||
+682
-221
File diff suppressed because it is too large
Load Diff
@@ -137,7 +137,9 @@ class Milling : public Machining
|
|||||||
bool GetPointBelowRaw( const Point3d& ptP, const Vector3d& vtTool) const ;
|
bool GetPointBelowRaw( const Point3d& ptP, const Vector3d& vtTool) const ;
|
||||||
bool CalcAndSetCorrAuxDir( const ICurveComposite* pCompo, double dU, bool bInvertSide = false, bool bSawSpecial = false) ;
|
bool CalcAndSetCorrAuxDir( const ICurveComposite* pCompo, double dU, bool bInvertSide = false, bool bSawSpecial = false) ;
|
||||||
Vector3d CalcCorrDir( const ICurveComposite* pCompo, double dU, bool bInvertSide = false, bool bSawSpecial = false) const ;
|
Vector3d CalcCorrDir( const ICurveComposite* pCompo, double dU, bool bInvertSide = false, bool bSawSpecial = false) const ;
|
||||||
bool CalcOffset( ICurveComposite* pCompo, double dSignOffs) const ;
|
bool CalcAndSetCorrAuxDir( const Vector3d& vtCorr) ;
|
||||||
|
bool AdjustAllCorrAuxDirToSide( int nId, bool bCcwRot) ;
|
||||||
|
bool CalcOffset( ICurveComposite* pCompo, double dSignOffs, double dExtraOffs = 0) const ;
|
||||||
bool TrimExtendCurveToClosedStm( ICurveComposite* pCompo, int nCstmId, bool bInvert) ;
|
bool TrimExtendCurveToClosedStm( ICurveComposite* pCompo, int nCstmId, bool bInvert) ;
|
||||||
int GetCorrType( int nToolCompEntity, bool bInvert) const ;
|
int GetCorrType( int nToolCompEntity, bool bInvert) const ;
|
||||||
|
|
||||||
@@ -201,6 +203,8 @@ class Milling : public Machining
|
|||||||
double m_dCurrOscillLen ; // lunghezza corrente lungo il percorso per l'oscillazione
|
double m_dCurrOscillLen ; // lunghezza corrente lungo il percorso per l'oscillazione
|
||||||
double m_dCurrTabsLen ; // lunghezza corrente lungo il percorso per tabs
|
double m_dCurrTabsLen ; // lunghezza corrente lungo il percorso per tabs
|
||||||
bool m_bToolComp ; // correzione raggio utensile abilitata dai dati
|
bool m_bToolComp ; // correzione raggio utensile abilitata dai dati
|
||||||
|
Vector3d m_vtLieCorr ; // versore correzione da applicare a fine attacco
|
||||||
|
Vector3d m_vtLieAux ; // versore ausiliario da applicare a fine attacco
|
||||||
bool m_bStartOutRaw ; // flag forzatura inizio fuori dal grezzo
|
bool m_bStartOutRaw ; // flag forzatura inizio fuori dal grezzo
|
||||||
bool m_bEndOutRaw ; // flag forzatura fine fuori dal grezzo
|
bool m_bEndOutRaw ; // flag forzatura fine fuori dal grezzo
|
||||||
Vector3d m_vtStartDir ; // direzione iniziale del percorso in elaborazione
|
Vector3d m_vtStartDir ; // direzione iniziale del percorso in elaborazione
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ static const std::string UN_PROJEXT = "ExtProj" ;
|
|||||||
static const std::string UN_ADJUSTFEED = "AdjustFeed" ;
|
static const std::string UN_ADJUSTFEED = "AdjustFeed" ;
|
||||||
static const std::string UN_MINFEED = "MinFeed" ;
|
static const std::string UN_MINFEED = "MinFeed" ;
|
||||||
static const std::string UN_TOOL_COMPENSATION = "ToolCompensation" ;
|
static const std::string UN_TOOL_COMPENSATION = "ToolCompensation" ;
|
||||||
|
static const std::string UN_START_PNT = "StartPoint" ;
|
||||||
|
static const std::string UN_LIMIT_PLANE_ID = "LimitPlaneId" ;
|
||||||
|
|
||||||
// Solo per Sawing
|
// Solo per Sawing
|
||||||
static const std::string UN_DOWNSE = "DownSE" ;
|
static const std::string UN_DOWNSE = "DownSE" ;
|
||||||
@@ -62,6 +64,11 @@ static const std::string UN_FEND = "Fend" ;
|
|||||||
static const std::string UN_SWE = "SWE" ;
|
static const std::string UN_SWE = "SWE" ;
|
||||||
static const std::string UN_EWE = "EWE" ;
|
static const std::string UN_EWE = "EWE" ;
|
||||||
|
|
||||||
|
// Solo per SawFinishing e SawRoughing
|
||||||
|
static const std::string UN_EXTEND = "Extend" ;
|
||||||
|
static const std::string UN_RB_DIST = "RawBottomDist" ; // per SawFinishing Section
|
||||||
|
static const std::string UN_LIMIT_ANG = "LimitAngle" ; // per SawFinishing Section
|
||||||
|
|
||||||
// Solo per SurfFinishing
|
// Solo per SurfFinishing
|
||||||
static const std::string UN_SKIPMAXDOWN = "SkipMaxDown" ;
|
static const std::string UN_SKIPMAXDOWN = "SkipMaxDown" ;
|
||||||
static const std::string UN_SPLITANGLE = "SplitAngle" ;
|
static const std::string UN_SPLITANGLE = "SplitAngle" ;
|
||||||
@@ -70,6 +77,7 @@ static const std::string UN_STEPNUMBER = "StepNumber" ;
|
|||||||
static const std::string UN_BITANGANG = "BiTangAng" ;
|
static const std::string UN_BITANGANG = "BiTangAng" ;
|
||||||
static const std::string UN_OPTIMALTYPE = "OptimalType" ;
|
static const std::string UN_OPTIMALTYPE = "OptimalType" ;
|
||||||
static const std::string UN_ANGLETOL = "AngleTol" ;
|
static const std::string UN_ANGLETOL = "AngleTol" ;
|
||||||
|
static const std::string UN_TILT_ANGS = "Tilt" ;
|
||||||
|
|
||||||
// Solo per SurfRoughing
|
// Solo per SurfRoughing
|
||||||
static const std::string UN_PLANEZ = "PlaneZ" ;
|
static const std::string UN_PLANEZ = "PlaneZ" ;
|
||||||
|
|||||||
+20
-20
@@ -2525,8 +2525,8 @@ Operation::VerifyMcentLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDir
|
|||||||
bAxError = false ;
|
bAxError = false ;
|
||||||
Machine* pMachine = m_pMchMgr->GetCurrMachine() ;
|
Machine* pMachine = m_pMchMgr->GetCurrMachine() ;
|
||||||
|
|
||||||
// se disposizione non vanno fatti controlli
|
// se disposizione o finitura di cornici con lama non vanno fatti controlli
|
||||||
if ( GetType() == OPER_DISP)
|
if ( GetType() == OPER_DISP || GetType() == OPER_SAWFINISHING)
|
||||||
return true ;
|
return true ;
|
||||||
|
|
||||||
// se superato il limite di ricursioni, non devo fare alcunché
|
// se superato il limite di ricursioni, non devo fare alcunché
|
||||||
@@ -3390,7 +3390,7 @@ Operation::AdjustStartEndMovementsStd( bool bVerifyPreviousLink)
|
|||||||
while ( bOk && nClPathId != GDB_ID_NULL) {
|
while ( bOk && nClPathId != GDB_ID_NULL) {
|
||||||
// se richiesta verifica collegamento con lavorazione precedente, sistemo inizio
|
// se richiesta verifica collegamento con lavorazione precedente, sistemo inizio
|
||||||
if ( bVerifyPreviousLink) {
|
if ( bVerifyPreviousLink) {
|
||||||
if ( ! AdjustOneStartEndMovement( nClPathId, nPrevClPathId, pPrevOp, vAxVal, dPrevOffsX, bMaxZ))
|
if ( ! AdjustOneStartEndMovement( nClPathId, nPrevClPathId, pPrevOp, true, vAxVal, dPrevOffsX, bMaxZ))
|
||||||
bOk = false ;
|
bOk = false ;
|
||||||
}
|
}
|
||||||
bMaxZ = false ;
|
bMaxZ = false ;
|
||||||
@@ -3433,7 +3433,7 @@ Operation::MoveHeadFromHomeToMach( bool bCurrMain, const string& sToolName, cons
|
|||||||
|
|
||||||
// sistemo approccio a Zmax
|
// sistemo approccio a Zmax
|
||||||
DBLVECTOR vAxVal ;
|
DBLVECTOR vAxVal ;
|
||||||
if ( ! AdjustOneStartEndMovement( GetFirstFullToolpath( bCurrMain), GDB_ID_NULL, nullptr, vAxVal, 0, true))
|
if ( ! AdjustOneStartEndMovement( GetFirstFullToolpath( bCurrMain), GDB_ID_NULL, nullptr, false, vAxVal, 0, true))
|
||||||
return false ;
|
return false ;
|
||||||
// eseguo collegamento speciale
|
// eseguo collegamento speciale
|
||||||
if ( ! ManageSpecialLink( nullptr, GDB_ID_NULL, false, this, GDB_ID_NULL, bCurrMain, nStartZMax, nOtherLinkType))
|
if ( ! ManageSpecialLink( nullptr, GDB_ID_NULL, false, this, GDB_ID_NULL, bCurrMain, nStartZMax, nOtherLinkType))
|
||||||
@@ -3474,7 +3474,7 @@ Operation::MoveHeadFromMachToMach( Operation* pPrevOpe,
|
|||||||
if ( ! SpecialPrevMachiningOffset( pPrevOpe, dPrevOffsX))
|
if ( ! SpecialPrevMachiningOffset( pPrevOpe, dPrevOffsX))
|
||||||
return false ;
|
return false ;
|
||||||
// sistemo collegamento con lavorazione precedente ( senza passare per Zmax)
|
// sistemo collegamento con lavorazione precedente ( senza passare per Zmax)
|
||||||
if ( ! AdjustOneStartEndMovement( GetFirstFullToolpath( bCurrMain), GDB_ID_NULL, pPrevOpe, vAxVal, dPrevOffsX, false))
|
if ( ! AdjustOneStartEndMovement( GetFirstFullToolpath( bCurrMain), GDB_ID_NULL, pPrevOpe, bPrevMain, vAxVal, dPrevOffsX, false))
|
||||||
return false ;
|
return false ;
|
||||||
// gestione collegamento speciale
|
// gestione collegamento speciale
|
||||||
if ( ! ManageSpecialLink( pPrevOpe, GDB_ID_NULL, bPrevMain, this, GDB_ID_NULL, bCurrMain, nStartZMax, nOtherLinkType))
|
if ( ! ManageSpecialLink( pPrevOpe, GDB_ID_NULL, bPrevMain, this, GDB_ID_NULL, bCurrMain, nStartZMax, nOtherLinkType))
|
||||||
@@ -3696,7 +3696,7 @@ Operation::ManageDoubleOperNew( Operation* pPrevOpe)
|
|||||||
RemoveRise( nPrevCLPathId) ;
|
RemoveRise( nPrevCLPathId) ;
|
||||||
DBLVECTOR vAxVal ;
|
DBLVECTOR vAxVal ;
|
||||||
bOk = bOk && GetClPathFinalAxesValues( nPrevCLPathId, false, vAxVal) ;
|
bOk = bOk && GetClPathFinalAxesValues( nPrevCLPathId, false, vAxVal) ;
|
||||||
bOk = bOk && AdjustOneStartEndMovement( nCLPathId, nPrevCLPathId, nullptr, vAxVal, 0, false) ;
|
bOk = bOk && AdjustOneStartEndMovement( nCLPathId, nPrevCLPathId, nullptr, true, vAxVal, 0, false) ;
|
||||||
bOk = bOk && ManageSpecialLink( this, nPrevCLPathId, true, this, nCLPathId, true, nStartZMax, LINK_NULL) ;
|
bOk = bOk && ManageSpecialLink( this, nPrevCLPathId, true, this, nCLPathId, true, nStartZMax, LINK_NULL) ;
|
||||||
// passo al successivo
|
// passo al successivo
|
||||||
nPrevCLPathId = nCLPathId ;
|
nPrevCLPathId = nCLPathId ;
|
||||||
@@ -3728,13 +3728,13 @@ Operation::ManageDoubleOperNew( Operation* pPrevOpe)
|
|||||||
DBLVECTOR vAxVal ;
|
DBLVECTOR vAxVal ;
|
||||||
// Utensile Main
|
// Utensile Main
|
||||||
bOk = bOk && GetClPathFinalAxesValues( nPrevCLPathId, false, vAxVal) ;
|
bOk = bOk && GetClPathFinalAxesValues( nPrevCLPathId, false, vAxVal) ;
|
||||||
bOk = bOk && AdjustOneStartEndMovement( nCLPathId, nPrevCLPathId, nullptr, vAxVal, 0, false) ;
|
bOk = bOk && AdjustOneStartEndMovement( nCLPathId, nPrevCLPathId, nullptr, true, vAxVal, 0, false) ;
|
||||||
bOk = bOk && ManageSpecialLink( this, nPrevCLPathId, true, this, nCLPathId, true, nStartZMax, LINK_MACH_TO_HOME) ;
|
bOk = bOk && ManageSpecialLink( this, nPrevCLPathId, true, this, nCLPathId, true, nStartZMax, LINK_MACH_TO_HOME) ;
|
||||||
// Utensile Double
|
// Utensile Double
|
||||||
DBLVECTOR vAxDblVal ;
|
DBLVECTOR vAxDblVal ;
|
||||||
bOk = bOk && m_pMchMgr->SetCalcTool( sCurrDblTool, sCurrDblHead, nCurrDblExitNbr) ;
|
bOk = bOk && m_pMchMgr->SetCalcTool( sCurrDblTool, sCurrDblHead, nCurrDblExitNbr) ;
|
||||||
bOk = bOk && GetClPathFinalAxesValues( nPrevDBLPathId, false, vAxDblVal) ;
|
bOk = bOk && GetClPathFinalAxesValues( nPrevDBLPathId, false, vAxDblVal) ;
|
||||||
bOk = bOk && AdjustOneStartEndMovement( nDBLPathId, nPrevDBLPathId, nullptr, vAxDblVal, 0, false) ;
|
bOk = bOk && AdjustOneStartEndMovement( nDBLPathId, nPrevDBLPathId, nullptr, false, vAxDblVal, 0, false) ;
|
||||||
bOk = bOk && ManageSpecialLink( this, nPrevDBLPathId, false, this, nDBLPathId, false, nStartZMax, LINK_MACH_TO_HOME) ;
|
bOk = bOk && ManageSpecialLink( this, nPrevDBLPathId, false, this, nDBLPathId, false, nStartZMax, LINK_MACH_TO_HOME) ;
|
||||||
bOk = bOk && m_pMchMgr->SetCalcTool( GetToolName(), GetHeadName(), GetExitNbr()) ;
|
bOk = bOk && m_pMchMgr->SetCalcTool( GetToolName(), GetHeadName(), GetExitNbr()) ;
|
||||||
// passo al successivo
|
// passo al successivo
|
||||||
@@ -3812,7 +3812,7 @@ Operation::AdjustStartEndMovementsNew( void)
|
|||||||
return false ;
|
return false ;
|
||||||
// sistemo approccio da Zmax
|
// sistemo approccio da Zmax
|
||||||
DBLVECTOR vAxVal ;
|
DBLVECTOR vAxVal ;
|
||||||
if ( ! AdjustOneStartEndMovement( GetFirstFullToolpath(), GDB_ID_NULL, nullptr, vAxVal, 0, true))
|
if ( ! AdjustOneStartEndMovement( GetFirstFullToolpath(), GDB_ID_NULL, nullptr, true, vAxVal, 0, true))
|
||||||
return false ;
|
return false ;
|
||||||
// eseguo collegamento speciale
|
// eseguo collegamento speciale
|
||||||
if ( ! ManageSpecialLink( nullptr, GDB_ID_NULL, true, this, GDB_ID_NULL, true, nStartZMax))
|
if ( ! ManageSpecialLink( nullptr, GDB_ID_NULL, true, this, GDB_ID_NULL, true, nStartZMax))
|
||||||
@@ -3835,7 +3835,7 @@ Operation::AdjustStartEndMovementsNew( void)
|
|||||||
if ( ! SpecialPrevMachiningOffset( pPrevOp, dPrevOffsX))
|
if ( ! SpecialPrevMachiningOffset( pPrevOp, dPrevOffsX))
|
||||||
return false ;
|
return false ;
|
||||||
// sistemo collegamento con lavorazione precedente
|
// sistemo collegamento con lavorazione precedente
|
||||||
if ( ! AdjustOneStartEndMovement( GetFirstFullToolpath(), GDB_ID_NULL, pPrevOp, vAxVal, dPrevOffsX, false))
|
if ( ! AdjustOneStartEndMovement( GetFirstFullToolpath(), GDB_ID_NULL, pPrevOp, true, vAxVal, dPrevOffsX, false))
|
||||||
return false ;
|
return false ;
|
||||||
// gestione collegamento speciale
|
// gestione collegamento speciale
|
||||||
if ( ! ManageSpecialLink( pPrevOp, GDB_ID_NULL, true, this, GDB_ID_NULL, true, nStartZMax))
|
if ( ! ManageSpecialLink( pPrevOp, GDB_ID_NULL, true, this, GDB_ID_NULL, true, nStartZMax))
|
||||||
@@ -3866,7 +3866,7 @@ Operation::AdjustStartEndMovementsNew( void)
|
|||||||
return false ;
|
return false ;
|
||||||
// sistemo approccio da Zmax
|
// sistemo approccio da Zmax
|
||||||
DBLVECTOR vAxVal ;
|
DBLVECTOR vAxVal ;
|
||||||
if ( ! AdjustOneStartEndMovement( GetFirstFullToolpath(), GDB_ID_NULL, nullptr, vAxVal, 0, true))
|
if ( ! AdjustOneStartEndMovement( GetFirstFullToolpath(), GDB_ID_NULL, nullptr, true, vAxVal, 0, true))
|
||||||
return false ;
|
return false ;
|
||||||
// eseguo verifica
|
// eseguo verifica
|
||||||
if ( ! ManageSpecialLink( nullptr, GDB_ID_NULL, true, this, GDB_ID_NULL, true, nStartZMax))
|
if ( ! ManageSpecialLink( nullptr, GDB_ID_NULL, true, this, GDB_ID_NULL, true, nStartZMax))
|
||||||
@@ -3884,7 +3884,7 @@ Operation::AdjustStartEndMovementsNew( void)
|
|||||||
if ( ! GetClPathFinalAxesValues( nPrevClPathId, false, vAxVal))
|
if ( ! GetClPathFinalAxesValues( nPrevClPathId, false, vAxVal))
|
||||||
bOk = false ;
|
bOk = false ;
|
||||||
// sistemo collegamento con precedente
|
// sistemo collegamento con precedente
|
||||||
if ( ! AdjustOneStartEndMovement( nClPathId, nPrevClPathId, nullptr, vAxVal, 0, false))
|
if ( ! AdjustOneStartEndMovement( nClPathId, nPrevClPathId, nullptr, true, vAxVal, 0, false))
|
||||||
bOk = false ;
|
bOk = false ;
|
||||||
// gestione collegamento speciale ( tra due percorsi della stessa lavorazione)
|
// gestione collegamento speciale ( tra due percorsi della stessa lavorazione)
|
||||||
if ( ! ManageSpecialLink( this, nPrevClPathId, true, this, nClPathId, true, nStartZMax))
|
if ( ! ManageSpecialLink( this, nPrevClPathId, true, this, nClPathId, true, nStartZMax))
|
||||||
@@ -3979,7 +3979,7 @@ Operation::ManageSpecialLink( Operation* pPrevOpe, int nPrevClPathId, bool bPrev
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
bool
|
bool
|
||||||
Operation::AdjustOneStartEndMovement( int nClPathId, int nPrevClPathId, Operation* pPrevOp,
|
Operation::AdjustOneStartEndMovement( int nClPathId, int nPrevClPathId, Operation* pPrevOp, bool bPrevMain,
|
||||||
const DBLVECTOR& vAxPrev, double dPrevOffsX, bool bMaxZ)
|
const DBLVECTOR& vAxPrev, double dPrevOffsX, bool bMaxZ)
|
||||||
{
|
{
|
||||||
// verifico gestore delle lavorazione, DB geometrico e macchina corrente
|
// verifico gestore delle lavorazione, DB geometrico e macchina corrente
|
||||||
@@ -3991,8 +3991,6 @@ Operation::AdjustOneStartEndMovement( int nClPathId, int nPrevClPathId, Operatio
|
|||||||
// dagli Id dei Path verifico se è Main o Double
|
// dagli Id dei Path verifico se è Main o Double
|
||||||
string sCLName ; m_pGeomDB->GetName( m_pGeomDB->GetParentId( nClPathId), sCLName) ;
|
string sCLName ; m_pGeomDB->GetName( m_pGeomDB->GetParentId( nClPathId), sCLName) ;
|
||||||
bool bMain = ( ! EqualNoCase( sCLName, MCH_DBL)) ;
|
bool bMain = ( ! EqualNoCase( sCLName, MCH_DBL)) ;
|
||||||
string sCLPrevName ; m_pGeomDB->GetName( m_pGeomDB->GetParentId( nPrevClPathId), sCLPrevName) ;
|
|
||||||
bool bPrevMain = ( ! EqualNoCase( sCLPrevName, MCH_DBL)) ;
|
|
||||||
// elimino eventuali CLIMB già presenti
|
// elimino eventuali CLIMB già presenti
|
||||||
RemoveClimb( nClPathId, bMain) ;
|
RemoveClimb( nClPathId, bMain) ;
|
||||||
// recupero la prima entità di questo percorso
|
// recupero la prima entità di questo percorso
|
||||||
@@ -5667,13 +5665,15 @@ Operation::OneMoveTestCollisionAvoid( const STRVECTOR& vAxName, const DBLVECTOR&
|
|||||||
// lo porto nel riferimento del grezzo
|
// lo porto nel riferimento del grezzo
|
||||||
frHsol.ToLoc( frSolid) ;
|
frHsol.ToLoc( frSolid) ;
|
||||||
// se utensile cilindrico (faccia XY quadra e origine del riferimento nel suo centro)
|
// se utensile cilindrico (faccia XY quadra e origine del riferimento nel suo centro)
|
||||||
if ( abs( vtDiag.x - vtDiag.y) < 100 * EPS_SMALL &&
|
if ( abs( vtDiag.x - vtDiag.y) < 500 * EPS_SMALL &&
|
||||||
abs( vtDiag.x / 2 + ptMin.x) < 100 * EPS_SMALL &&
|
abs( vtDiag.x / 2 + ptMin.x) < 500 * EPS_SMALL &&
|
||||||
abs( vtDiag.y / 2 + ptMin.y) < 100 * EPS_SMALL) {
|
abs( vtDiag.y / 2 + ptMin.y) < 500 * EPS_SMALL) {
|
||||||
// traslo il riferimento per avere il cilindro centrato sull'asse Y in positivo
|
// traslo il riferimento per avere il cilindro centrato sull'asse Y in positivo
|
||||||
frHsol.Translate( frHsol.VersZ() * ptMin.z) ;
|
frHsol.Translate( frHsol.VersZ() * ptMin.z) ;
|
||||||
// verifica di collisione tra cilindro e solido
|
// verifica di collisione tra cilindro e solido
|
||||||
if ( pStm == nullptr || CDeCylClosedSurfTm( frHsol, max( vtDiag.x, vtDiag.y) / 2, vtDiag.z, *pStm, dSafeDist)) {
|
double dCylR = max( {vtDiag.x / 2, vtDiag.y /2, 10 * EPS_SMALL}) ;
|
||||||
|
double dCylH = max( vtDiag.z, 10 * EPS_SMALL) ;
|
||||||
|
if ( pStm == nullptr || CDeCylClosedSurfTm( frHsol, dCylR, dCylH, *pStm, dSafeDist)) {
|
||||||
bCollide = true ;
|
bCollide = true ;
|
||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
@@ -5987,7 +5987,7 @@ Operation::SpecialLink( const DBLVECTOR& vAxStart, const DBLVECTOR& vAxEnd, int
|
|||||||
string sHeadName = GetHeadName() ;
|
string sHeadName = GetHeadName() ;
|
||||||
int nExitNbr = GetExitNbr() ;
|
int nExitNbr = GetExitNbr() ;
|
||||||
string sTcPos = GetToolTcPos() ;
|
string sTcPos = GetToolTcPos() ;
|
||||||
if ( ( pPrevOpe != nullptr && ! bPrevMain) || ( pNextOpe != nullptr && ! bNextMain)) {
|
if ( ( pPrevOpe != nullptr && pNextOpe == nullptr && ! bPrevMain) || ( pNextOpe != nullptr && ! bNextMain)) {
|
||||||
if ( ! GetDoubleToolData( sToolName, sTcPos, sHeadName, nExitNbr))
|
if ( ! GetDoubleToolData( sToolName, sTcPos, sHeadName, nExitNbr))
|
||||||
return false ;
|
return false ;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -238,7 +238,8 @@ class Operation : public IUserObj
|
|||||||
bool OneMoveTestCollisionAvoid( const STRVECTOR& vAxName, const DBLVECTOR& vAxStart, const DBLVECTOR& vAxEnd,
|
bool OneMoveTestCollisionAvoid( const STRVECTOR& vAxName, const DBLVECTOR& vAxStart, const DBLVECTOR& vAxEnd,
|
||||||
Machine* pMch, const INTVECTOR& vRawId, const INTVECTOR& vFxtId) const ;
|
Machine* pMch, const INTVECTOR& vRawId, const INTVECTOR& vFxtId) const ;
|
||||||
bool AdjustStartEndMovementsStd( bool bVerifyPreviousLink) ;
|
bool AdjustStartEndMovementsStd( bool bVerifyPreviousLink) ;
|
||||||
bool AdjustOneStartEndMovement( int nClPathId, int nPrevClPathId, Operation* pPrevOpe, const DBLVECTOR& vAxPrev, double dPrevOffsX, bool bMaxZ) ;
|
bool AdjustOneStartEndMovement( int nClPathId, int nPrevClPathId, Operation* pPrevOpe, bool bPreMain, const DBLVECTOR& vAxPrev,
|
||||||
|
double dPrevOffsX, bool bMaxZ) ;
|
||||||
bool AdjustStartEndMovementsNew( void) ;
|
bool AdjustStartEndMovementsNew( void) ;
|
||||||
bool MoveHeadFromHomeToMach( bool bMain, const std::string& sToolName, const std::string& sHeadName, int nExitNbr, int nStartZMax,
|
bool MoveHeadFromHomeToMach( bool bMain, const std::string& sToolName, const std::string& sHeadName, int nExitNbr, int nStartZMax,
|
||||||
int nOtherLinkType) ;
|
int nOtherLinkType) ;
|
||||||
|
|||||||
+1098
-272
File diff suppressed because it is too large
Load Diff
+28
-14
@@ -21,6 +21,7 @@
|
|||||||
#include "/EgtDev/Include/EGkCurveLine.h"
|
#include "/EgtDev/Include/EGkCurveLine.h"
|
||||||
#include "/EgtDev/Include/EgtNumUtils.h"
|
#include "/EgtDev/Include/EgtNumUtils.h"
|
||||||
#include "/EgtDev/Include/EGkIntersPlaneSurfTm.h"
|
#include "/EgtDev/Include/EGkIntersPlaneSurfTm.h"
|
||||||
|
#include "/EgtDev/Include/EGkCAvSilhouetteSurfTm.h"
|
||||||
|
|
||||||
// struttura informazioni sui singoli percorsi
|
// struttura informazioni sui singoli percorsi
|
||||||
struct PathInfoPO {
|
struct PathInfoPO {
|
||||||
@@ -109,35 +110,43 @@ class PocketingNT : public Machining
|
|||||||
bool GetCurves( const SelData& Id, const ISurfTriMesh* pStmRaw, const ISurfTriMesh* pStmTrim, ICURVEPLIST& lstPC) ;
|
bool GetCurves( const SelData& Id, const ISurfTriMesh* pStmRaw, const ISurfTriMesh* pStmTrim, ICURVEPLIST& lstPC) ;
|
||||||
bool SetCurveAllTempProp( int nCrvId, bool bForcedClose, ICurve* pCurve, bool* pbSomeOpen = nullptr) ;
|
bool SetCurveAllTempProp( int nCrvId, bool bForcedClose, ICurve* pCurve, bool* pbSomeOpen = nullptr) ;
|
||||||
bool SetSfrLoopsAllTempProp( int nSfrId, ISurfFlatRegion* pSfr) ;
|
bool SetSfrLoopsAllTempProp( int nSfrId, ISurfFlatRegion* pSfr) ;
|
||||||
bool ResetCurveAllTempProp( ICurve* pCurve) ;
|
bool ResetCurveAllTempProp( ICurve* pCurve, bool bClose = true) ;
|
||||||
bool Chain( int nGrpDestId) ;
|
bool Chain( int nGrpDestId) ;
|
||||||
ISurfTriMesh* GetRaw( void) ;
|
ISurfTriMesh* GetRaw( void) ;
|
||||||
ISurfTriMesh* GetStmTrim( void) ;
|
ISurfTriMesh* GetStmTrim( void) ;
|
||||||
ISurfTriMesh* GetExtrusionStm( const ISurfFlatRegion* pSfr, const Vector3d& vtExtr) ;
|
ISurfTriMesh* GetExtrusionStm( const ISurfFlatRegion* pSfr, const Vector3d& vtExtr) ;
|
||||||
ISurfFlatRegion* GetSfrByStmIntersection( const IntersParPlanesSurfTm& IPPStm, double dDist, double dSmallOffs = 0) ;
|
ISurfTriMesh* GetStmRawSliced( const ISurfTriMesh* pStmRaw, const ISurfFlatRegion* pSfr, const Vector3d& vtTool) const ;
|
||||||
ISurfFlatRegion* GetSfrRawProjection( const ISurfTriMesh* pStmRaw, const ISurfFlatRegion* pSfr, const Vector3d& vtTool) ;
|
ISurfFlatRegion* GetSfrByStmIntersection( const IntersParPlanesSurfTm& IPPStm, double dDist, double dSmallOffs = 0) const ;
|
||||||
|
ISurfFlatRegion* GetSfrRawProjection( const ISurfTriMesh* pStmRaw, const ISurfFlatRegion* pSfr,
|
||||||
|
const Vector3d& vtTool, const Frame3d& frAtTop, ICAvParSilhouettesSurfTm** ppCavParSil = nullptr) const ;
|
||||||
|
Plane3d GetLimitPlane( const Vector3d& vtTool, const ISurfTriMesh* pStmRaw) const ;
|
||||||
|
Point3d GetStartPointByUser( const ISurfFlatRegion* pSfr) const ;
|
||||||
Point3d GetStartPointsByHead( const STEPINFOPOVECTOR& vStepInfo) const ;
|
Point3d GetStartPointsByHead( const STEPINFOPOVECTOR& vStepInfo) const ;
|
||||||
Point3d GetStartPointsFromSteps( const STEPINFOPOVECTOR& vStepInfo, int nCrvType) const ;
|
Point3d GetStartPointsBySteps( const STEPINFOPOVECTOR& vStepInfo, int nCrvType) const ;
|
||||||
bool ChooseRawPart( const ISurfFlatRegion* pSfrChunk, ISurfTriMesh* pStm) const ;
|
bool ChooseRawPart( const ISurfFlatRegion* pSfrChunk, ISurfTriMesh* pStm) const ;
|
||||||
|
bool TrimRawByMaxElev( ISurfTriMesh* pStmRaw, const ISurfFlatRegion* pSfr, const Vector3d& vtTool, double dMaxElev) const ;
|
||||||
bool ManageOpenEdges( ISurfFlatRegion* pSfr, const ISurfTriMesh* pStmPart) ;
|
bool ManageOpenEdges( ISurfFlatRegion* pSfr, const ISurfTriMesh* pStmPart) ;
|
||||||
bool GetHomogeneousParts( const ICurveComposite* pCrvCompo, ICRVCOMPOPOVECTOR& vpCrvs) const ;
|
bool GetHomogeneousParts( const ICurveComposite* pCrvCompo, ICRVCOMPOPOVECTOR& vpCrvs) const ;
|
||||||
bool ExtendOpenEdges( ISurfFlatRegion* pSfr, const ISurfTriMesh* pStm) ;
|
bool ExtendOpenEdges( ISurfFlatRegion* pSfr, const ISurfTriMesh* pStm) ;
|
||||||
bool ChooseCloseOrOpenEdge( ISurfFlatRegion* pSfr, const ISurfTriMesh* pStmExtrusion) ;
|
bool ChooseCloseOrOpenEdge( ISurfFlatRegion* pSfr, const ISurfTriMesh* pStmExtrusion, const Plane3d& PlaneLimit) const ;
|
||||||
bool CheckMaxDepth( const ISurfFlatRegion* pSfr, double dDepth, const Vector3d& vtTool,
|
bool CheckMaxDepth( const ISurfFlatRegion* pSfr, double dDepth, const Vector3d& vtTool, const ISurfTriMesh* pStmRaw,
|
||||||
const ISurfTriMesh* pStmRaw, const ISurfTriMesh* pStmExtrusion,
|
const ISurfTriMesh* pStmExtrusion, const IntersParPlanesSurfTm& IPPStm, bool& bSkipMaxDepth) const ;
|
||||||
const IntersParPlanesSurfTm& IPPStm, bool& bSkipMaxDepth) ;
|
|
||||||
bool ProcessPath( int nPathId, int nPvId, int nClId) ;
|
bool ProcessPath( int nPathId, int nPvId, int nClId) ;
|
||||||
bool CalcRegionElevation( const ISurfFlatRegion* pSfr, const Vector3d& vtTool, double dDepth,
|
bool CalcRegionElevation( const ISurfFlatRegion* pSfr, const Vector3d& vtTool, double dDepth,
|
||||||
double dRad, double dLen, double& dElev) ;
|
double dRad, double dLen, const ISurfTriMesh* pStmRaw, double& dElev) const ;
|
||||||
|
bool CalcOrigRegionElevation( const ISurfFlatRegion* pSfr, const ISurfTriMesh* pStmRaw, const Vector3d& vtTool, double dDepth,
|
||||||
|
double dRad, double dLen, double& dElev) const ;
|
||||||
bool VerifyPathFromBottom( const ICurveComposite* pCompo, const Vector3d& vtTool) ;
|
bool VerifyPathFromBottom( const ICurveComposite* pCompo, const Vector3d& vtTool) ;
|
||||||
bool GeneratePocketingPv( int nPathId, const ICurveComposite* pCompo) ;
|
bool GeneratePocketingPv( int nPathId, const ICurveComposite* pCompo) ;
|
||||||
bool CalcGeoExtSurfFr( const ISurfFlatRegion* pSfrPock, const Vector3d& vtTool, double dDepth, const ISurfTriMesh* pStmRaw,
|
bool CalcGeoExtSurfFr( const ISurfFlatRegion* pSfrPock, const Vector3d& vtTool, double dDepth, const ISurfTriMesh* pStmRaw,
|
||||||
const SELVECTOR& vGeoSel, ISURFFRPOVECTOR& vSfrGeoExt) ;
|
const SELVECTOR& vGeoSel, ISURFFRPOVECTOR& vSfrGeoExt) ;
|
||||||
bool CalcLimitRegion( const ISurfFlatRegion* pSfrPock, const ISurfFlatRegion* pSfrRaw, ISurfFlatRegion* pSfrLimit) ;
|
bool CalcLimitRegion( const ISurfFlatRegion* pSfrPock, const ISurfFlatRegion* pSfrRaw, const Plane3d& PlaneLimit,
|
||||||
bool CalcPaths( STEPINFOPOVECTOR& vStepInfo) ;
|
const Vector3d& vtTool, ISurfFlatRegion* pSfrLimit) const ;
|
||||||
|
bool CalcPaths( STEPINFOPOVECTOR& vStepInfo, bool& bEmpty) ;
|
||||||
bool CalcRetCurve( PathInfoPO& PathInfo, const StepInfoPO& StepInfo, const ICurveComposite* pCrvPath,
|
bool CalcRetCurve( PathInfoPO& PathInfo, const StepInfoPO& StepInfo, const ICurveComposite* pCrvPath,
|
||||||
const Vector3d& vtTool, bool bHolePocketing, const Point3d& ptHoleDest, bool bToolComp, bool bInVsOut, ICurveComposite* pCrvGlide) ;
|
const Vector3d& vtTool, bool bHolePocketing, const Point3d& ptHoleDest, bool bToolComp, bool bInVsOut, ICurveComposite* pCrvGlide) ;
|
||||||
bool AddPocket( STEPINFOPOVECTOR& vStepInfo, const Vector3d& vtTool, double dStep, bool bSplitArcs, Point3d& ptPockStart, Point3d& ptPockEnd) ;
|
bool AddPocket( STEPINFOPOVECTOR& vStepInfo, const Vector3d& vtTool, double dStep, bool bSplitArcs, Point3d& ptPockStart, Point3d& ptPockEnd,
|
||||||
|
bool& bEmpty) ;
|
||||||
double GetRightFeed( const Vector3d& vtMove, const Vector3d& vtTool) const ;
|
double GetRightFeed( const Vector3d& vtMove, const Vector3d& vtTool) const ;
|
||||||
double GetRightStartFeed( const Vector3d& vtMove, const Vector3d& vtTool) const ;
|
double GetRightStartFeed( const Vector3d& vtMove, const Vector3d& vtTool) const ;
|
||||||
bool CutCurveWithLine( ICurveComposite* pCrvA, const ICurveLine* pCrvB) ;
|
bool CutCurveWithLine( ICurveComposite* pCrvA, const ICurveLine* pCrvB) ;
|
||||||
@@ -152,7 +161,7 @@ class PocketingNT : public Machining
|
|||||||
bool AddLinkRetract( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, double dSafeAggrBottZ,
|
bool AddLinkRetract( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, double dSafeAggrBottZ,
|
||||||
double dElev, double dAppr, bool bSplitArcs) ;
|
double dElev, double dAppr, bool bSplitArcs) ;
|
||||||
bool AddRetract( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, double dSafeAggrBottZ,
|
bool AddRetract( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, double dSafeAggrBottZ,
|
||||||
double dElev, double dAppr, bool bSplitArcs) ;
|
double dElev, double dAppr, bool bSplitArcs, bool bDouble) ;
|
||||||
bool CalcFirstElevation( const Point3d& ptP1, const Vector3d& vtTool,
|
bool CalcFirstElevation( const Point3d& ptP1, const Vector3d& vtTool,
|
||||||
const StepInfoPO& currStep, double dSafeZ, double dStep, double& dCurrElev,
|
const StepInfoPO& currStep, double dSafeZ, double dStep, double& dCurrElev,
|
||||||
double& dEscapeElev, Vector3d& vtEscape) const ;
|
double& dEscapeElev, Vector3d& vtEscape) const ;
|
||||||
@@ -183,8 +192,12 @@ class PocketingNT : public Machining
|
|||||||
const INTVECTOR& vLeadOutId, const ISurfFlatRegion* pSfrLimit, const Vector3d& vtTool,
|
const INTVECTOR& vLeadOutId, const ISurfFlatRegion* pSfrLimit, const Vector3d& vtTool,
|
||||||
bool bSplitArcs, double dMinFeed) ;
|
bool bSplitArcs, double dMinFeed) ;
|
||||||
double GetDoubleLastStep( void) ;
|
double GetDoubleLastStep( void) ;
|
||||||
bool AddTangentLinesForToolCompensation( ICurveComposite* pCompoPath, const Vector3d& vtTool, const ISurfFlatRegion* pSfrLimit) const ;
|
bool AddTangentLinesForToolCompensation( ICurveComposite* pCompoPath, const Vector3d& vtTool, const ISurfFlatRegion* pSfrLimit,
|
||||||
|
bool bWithEndGuide) const ;
|
||||||
bool AssignPropsToCamDataForToolCompensation( int nId, bool bLineIn, bool bLineOut, bool bToolAtLeft) ;
|
bool AssignPropsToCamDataForToolCompensation( int nId, bool bLineIn, bool bLineOut, bool bToolAtLeft) ;
|
||||||
|
bool CalcLinkByStartUserPoint( const ISurfFlatRegion* pSfrPock, const ISurfFlatRegion* pSfrLimit, const Point3d& ptStart,
|
||||||
|
const Point3d& ptEnd, ICurveComposite* pCompoLink) const ;
|
||||||
|
|
||||||
// debug
|
// debug
|
||||||
void DebugDrawSfr( const ISurfFlatRegion* pSfr, bool bUniform, int nlayer = GDB_ID_ROOT) ;
|
void DebugDrawSfr( const ISurfFlatRegion* pSfr, bool bUniform, int nlayer = GDB_ID_ROOT) ;
|
||||||
void DebugDrawLoop( const ICurveComposite* pCrvCompo, int nLayer, bool bUniform) ;
|
void DebugDrawLoop( const ICurveComposite* pCrvCompo, int nLayer, bool bUniform) ;
|
||||||
@@ -245,5 +258,6 @@ class PocketingNT : public Machining
|
|||||||
double m_dOpenMinSafe ; // minima distanza di sicurezza di attacco su lato aperto
|
double m_dOpenMinSafe ; // minima distanza di sicurezza di attacco su lato aperto
|
||||||
double m_dOpenInRawExtension ; // estensione dei tratti aperti dentro al grezzo
|
double m_dOpenInRawExtension ; // estensione dei tratti aperti dentro al grezzo
|
||||||
bool m_bAllClose ; // flag per forzare i lati come tutti chiusi
|
bool m_bAllClose ; // flag per forzare i lati come tutti chiusi
|
||||||
|
double m_dOpen ; // estensione lati aperti interno alla geometria del grezzo da note utente
|
||||||
bool m_bRunning ; // flag di calcoli in corso
|
bool m_bRunning ; // flag di calcoli in corso
|
||||||
} ;
|
} ;
|
||||||
+2056
-548
File diff suppressed because it is too large
Load Diff
+45
-16
@@ -22,6 +22,24 @@ class ICurve ;
|
|||||||
class ICurveLine ;
|
class ICurveLine ;
|
||||||
class ICurveArc ;
|
class ICurveArc ;
|
||||||
class ICurveComposite ;
|
class ICurveComposite ;
|
||||||
|
class ISurfTriMesh ;
|
||||||
|
class Polygon3d ;
|
||||||
|
|
||||||
|
// Definizione strutture per Section/SubSection ------------------------------
|
||||||
|
struct SubSectionInfo {
|
||||||
|
PtrOwner<ICurveComposite> pSubSection ;
|
||||||
|
int nHeadSide ;
|
||||||
|
SubSectionInfo()
|
||||||
|
: pSubSection( nullptr), nHeadSide( -1) {} ;
|
||||||
|
} ;
|
||||||
|
typedef std::vector<SubSectionInfo> SUBSECTIONVECTOR ;
|
||||||
|
struct SectionInfo {
|
||||||
|
PtrOwner<ICurveComposite> pSection ;
|
||||||
|
SUBSECTIONVECTOR vSubSections ;
|
||||||
|
SectionInfo()
|
||||||
|
: pSection( nullptr), vSubSections( SUBSECTIONVECTOR{}) {} ;
|
||||||
|
} ;
|
||||||
|
typedef std::vector<SectionInfo> SECTIONVECTOR ;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
class SawFinishing : public Machining
|
class SawFinishing : public Machining
|
||||||
@@ -83,22 +101,34 @@ class SawFinishing : public Machining
|
|||||||
bool CalculateStraightAcrossToolPath( int nAuxId, int nClId) ;
|
bool CalculateStraightAcrossToolPath( int nAuxId, int nClId) ;
|
||||||
bool CalculateCurvedAlongToolPath( int nAuxId, int nClId) ;
|
bool CalculateCurvedAlongToolPath( int nAuxId, int nClId) ;
|
||||||
bool CalculateCurvedAcrossToolPath( int nAuxId, int nClId) ;
|
bool CalculateCurvedAcrossToolPath( int nAuxId, int nClId) ;
|
||||||
bool CalculateSection( int nSectGrpId, ICurve*& pSect) ;
|
bool CalculateStraightSectionToolPath( int nAuxId, int nClId) ;
|
||||||
bool TrimSection( ICurve* pCrv) ;
|
bool CalculateStraightAlong5AToolPath( int nAuxId, int nClId) ;
|
||||||
bool CalculateGuideLine( int nGuideId, const BBox3d& b3Sect,
|
bool TrimVerticalSectionBounds( ICurveComposite* pSect, double dAngDeg) const ;
|
||||||
Point3d& ptGdStart, Point3d& ptGdEnd, Vector3d& vtGdDir) ;
|
bool CalculateOffsetSection( int nSectGrpId, const Frame3d& frSec, ICurve*& pSect) const ;
|
||||||
bool ClassifySection( ICurve* pCrv, INTVECTOR& vnClass) ;
|
bool CalculateSection( int nSectGrpId, std::vector<PtrOwner<ICurveComposite>>& vpSections) const ;
|
||||||
bool CalcAlongVerticalCuts( ICurve* pSect, int nUmin, int nUmax, const Frame3d& frSect,
|
bool TrimSection( ICurve* pCrv) const ;
|
||||||
const Point3d& ptGdStart, const Point3d& ptGdEnd, const Vector3d& vtGdDir,
|
bool Split5ASection( int nSectGrpId, SECTIONVECTOR& vSubSections) const ;
|
||||||
double dDepth, double dRaxMaxZ, const Vector3d& vtTool, const Vector3d& vtCorr) ;
|
bool AdaptGuideLineToRaw( Point3d& ptGdStart, Point3d& ptGdEnd, const Vector3d& vtGdDir, bool bExtend, const ISurfTriMesh* pStmRaw) const ;
|
||||||
bool CalcAlongStdCuts( ICurve* pSect, double dUmin, double dUmax,
|
bool ExtendPathToRaw( PolyLine& PL, const ISurfTriMesh* pStmRaw, double dExtraOut) const ;
|
||||||
bool bSkipMin, bool bSkipMax, bool bInvert, const Frame3d& frSect,
|
bool CalculateSectElevation( const Polygon3d& pgFacet, double& dElev) const ;
|
||||||
const Point3d& ptGdStart, const Point3d& ptGdEnd, const Vector3d& vtGdDir,
|
bool CalculateGuideLine( int nGuideId, Point3d& ptGdStart, Point3d& ptGdEnd, Vector3d& vtGdDir,
|
||||||
double dDepth, double dRawMaxZ, const Vector3d& vtTool, const Vector3d& vtCorr) ;
|
int nSectGrpId, bool bExtendToRawBox) const ;
|
||||||
|
bool ClassifySection( ICurve* pCrv, INTVECTOR& vnClass) const ;
|
||||||
|
bool CalcCAvSect5Ax( const ICurveComposite* pSubSect, const SECTIONVECTOR& vSections, const Vector3d& vtTool, const Vector3d& vtCorr, const Point3d& ptP,
|
||||||
|
double& dElev, bool& bOtherCollision) const ;
|
||||||
|
bool CalcAlongVerticalCuts( ICurve* pSect, int nUmin, int nUmax, const Frame3d& frSect, bool bExtend, const Point3d& ptGdStart,
|
||||||
|
const Point3d& ptGdEnd, const Vector3d& vtGdDir, double dDepth, double dRaxMaxZ,
|
||||||
|
const Vector3d& vtTool, const Vector3d& vtCorr, const ISurfTriMesh* pStmRaw) ;
|
||||||
|
bool CalcAlongStdCuts( ICurve* pSect, double dUmin, double dUmax, bool bSkipVertMin, bool bSkipVertMax, bool bSkipVertIni, bool bSkipVertFin, bool bInvert,
|
||||||
|
const Frame3d& frSect, bool bExtend, const Point3d& ptGdStart, const Point3d& ptGdEnd, const Vector3d& vtGdDir, double dDepth,
|
||||||
|
double dRawMaxZ, const Vector3d& vtTool, const Vector3d& vtCorr, const ISurfTriMesh* pStmRaw) ;
|
||||||
|
bool CalcAlong5ACuts( const SECTIONVECTOR& vSections, const Frame3d& frSect, bool bExtend,
|
||||||
|
const Point3d& ptGdStart, const Point3d& ptGdEnd, const Vector3d& vtGdDir, double dDepth,
|
||||||
|
const BBox3d& b3Raw, const ISurfTriMesh* pStmRaw) ;
|
||||||
bool CalcAlongOneWayCut( const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtDir,
|
bool CalcAlongOneWayCut( const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtDir,
|
||||||
const Vector3d& vtTool, const Vector3d& vtCorr, double dElev, bool bVert) ;
|
const Vector3d& vtTool, const Vector3d& vtCorr, double dElev, bool bExtend, bool bVert) ;
|
||||||
bool CalcAlongZigZagCut( const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtDir,
|
bool CalcAlongZigZagCut( const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtDir,
|
||||||
const Vector3d& vtTool, const Vector3d& vtCorr, double dElev, bool bVert, bool bFirst) ;
|
const Vector3d& vtTool, const Vector3d& vtCorr, double dElev, bool bExtend, bool bVert, bool bFirst) ;
|
||||||
bool CalcAcrossOneWayCut( const PolyLine& PL, const Vector3d& vtMove,
|
bool CalcAcrossOneWayCut( const PolyLine& PL, const Vector3d& vtMove,
|
||||||
const Vector3d& vtTool, const Vector3d& vtCorr, double dRawZ, double dDepth) ;
|
const Vector3d& vtTool, const Vector3d& vtCorr, double dRawZ, double dDepth) ;
|
||||||
bool CalcAcrossZigZagCut( const PolyLine& PL, const Vector3d& vtMove,
|
bool CalcAcrossZigZagCut( const PolyLine& PL, const Vector3d& vtMove,
|
||||||
@@ -117,8 +147,7 @@ class SawFinishing : public Machining
|
|||||||
bool AddCornerApproach( const Point3d& ptP, const Vector3d& vtCorr, const Vector3d& vtPrev,
|
bool AddCornerApproach( const Point3d& ptP, const Vector3d& vtCorr, const Vector3d& vtPrev,
|
||||||
double dSafeZ, double dElev, double dAppr) ;
|
double dSafeZ, double dElev, double dAppr) ;
|
||||||
bool AddRetract( const Point3d& ptP, const Vector3d& vtCorr, double dSafeZ, double dElev, double dAppr) ;
|
bool AddRetract( const Point3d& ptP, const Vector3d& vtCorr, double dSafeZ, double dElev, double dAppr) ;
|
||||||
bool CalculateToolAndCorrVersors( const Vector3d& vtTang, int nHeadSide,
|
bool CalculateToolAndCorrVersors( const Vector3d& vtTang, int nHeadSide, Vector3d& vtTool, Vector3d& vtCorr) const ;
|
||||||
Vector3d& vtTool, Vector3d& vtCorr) ;
|
|
||||||
bool GetHeightOnSection( const ICurve* pSect, double dX, double dYmin, double dYmax, double& dY) ;
|
bool GetHeightOnSection( const ICurve* pSect, double dX, double dYmin, double dYmax, double& dY) ;
|
||||||
|
|
||||||
private :
|
private :
|
||||||
|
|||||||
@@ -391,7 +391,8 @@ SawFinishingData::VerifyStepType( int nVal) const
|
|||||||
bool
|
bool
|
||||||
SawFinishingData::VerifySubType( int nVal) const
|
SawFinishingData::VerifySubType( int nVal) const
|
||||||
{
|
{
|
||||||
return ( nVal == SAWFIN_SUB_ALONG || nVal == SAWFIN_SUB_ACROSS) ;
|
return ( nVal == SAWFIN_SUB_ALONG || nVal == SAWFIN_SUB_ACROSS || nVal == SAWFIN_SUB_SECTION ||
|
||||||
|
nVal == SAWFIN_SUB_ALONG_5A) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|||||||
+1
-1
@@ -48,7 +48,7 @@ struct SawFinishingData : public MachiningData
|
|||||||
SawFinishingData( void)
|
SawFinishingData( void)
|
||||||
: m_ToolUuid(), m_nSolCh( 0), m_dSpeed( 0), m_dFeed( 0), m_dStartFeed( 0), m_dEndFeed( 0), m_dTipFeed( 0), m_dVertFeed(0),
|
: m_ToolUuid(), m_nSolCh( 0), m_dSpeed( 0), m_dFeed( 0), m_dStartFeed( 0), m_dEndFeed( 0), m_dTipFeed( 0), m_dVertFeed(0),
|
||||||
m_dOffsR( UNKNOWN_PAR),
|
m_dOffsR( UNKNOWN_PAR),
|
||||||
m_bInvert( false), m_nHeadSide( 0), m_dStartPos( 0), m_dSideStep( 0), m_dStep( 0),
|
m_bInvert( false), m_nHeadSide( 1), m_dStartPos( 0), m_dSideStep( 0), m_dStep( 0),
|
||||||
m_nSubType( 0), m_nStepType( 0), m_nLeadLinkType( 0), m_dApprox( 0),
|
m_nSubType( 0), m_nStepType( 0), m_nLeadLinkType( 0), m_dApprox( 0),
|
||||||
m_dStartAddLen( 0), m_dEndAddLen( 0) {}
|
m_dStartAddLen( 0), m_dEndAddLen( 0) {}
|
||||||
SawFinishingData* Clone( void) const override ;
|
SawFinishingData* Clone( void) const override ;
|
||||||
|
|||||||
+477
-654
File diff suppressed because it is too large
Load Diff
+8
-10
@@ -22,6 +22,7 @@ class ICurve ;
|
|||||||
class ICurveLine ;
|
class ICurveLine ;
|
||||||
class ICurveArc ;
|
class ICurveArc ;
|
||||||
class ICurveComposite ;
|
class ICurveComposite ;
|
||||||
|
class ISurfTriMesh ;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
class SawRoughing : public Machining
|
class SawRoughing : public Machining
|
||||||
@@ -83,20 +84,17 @@ class SawRoughing : public Machining
|
|||||||
bool CalculateCurvedToolPath( int nAuxId, int nClId) ;
|
bool CalculateCurvedToolPath( int nAuxId, int nClId) ;
|
||||||
bool GeneratePreView( int nPathId, const ICurve* pSect, const Frame3d& frSect, double dGuideLen,
|
bool GeneratePreView( int nPathId, const ICurve* pSect, const Frame3d& frSect, double dGuideLen,
|
||||||
const Vector3d& vtGdDir, const BBox3d& b3Raw) ;
|
const Vector3d& vtGdDir, const BBox3d& b3Raw) ;
|
||||||
bool CalculateSection( int nSectGrpId, ICurve*& pSect) ;
|
bool CalculateSection( int nSectGrpId, std::vector<PtrOwner<ICurveComposite>>& vpSections) const ;
|
||||||
bool TrimSection( ICurve* pCrv) ;
|
bool TrimSection( ICurve* pCrv) const ;
|
||||||
bool CalculateGuideLine( int nGuideId, const BBox3d& b3Sect, Point3d& ptGdStart, Point3d& ptGdEnd, Vector3d& vtGdDir) ;
|
bool CalculateGuideLine( int nGuideId, Point3d& ptGdStart, Point3d& ptGdEnd, Vector3d& vtGdDir) const ;
|
||||||
bool AdaptGuideLineToRaw( Point3d& ptGdStart, Point3d& ptGdEnd, const Vector3d& vtGdDir, const BBox3d& b3Raw) const ;
|
bool AdaptGuideLineToRaw( Point3d& ptGdStart, Point3d& ptGdEnd, const Vector3d& vtGdDir, bool bExtend, const ISurfTriMesh* pStmRaw) const ;
|
||||||
bool CalculateOneWayCut( const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtDir,
|
bool CalculateOneWayCut( const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtDir,
|
||||||
const Vector3d& vtTool, const Vector3d& vtCorr, double dElev, bool bFirst, bool bLast, const BBox3d& b3Raw) ;
|
const Vector3d& vtTool, const Vector3d& vtCorr, double dElev, bool bFirst, bool bLast, const ISurfTriMesh* pStmRaw) ;
|
||||||
bool CalculateZigZagCut( const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtDir,
|
bool CalculateZigZagCut( const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtDir,
|
||||||
const Vector3d& vtTool, const Vector3d& vtCorr, double dElev, bool bFirst, bool bLast,
|
const Vector3d& vtTool, const Vector3d& vtCorr, double dElev, bool bFirst, bool bLast,
|
||||||
int& nCount, const BBox3d& b3Raw) ;
|
int& nCount, const ISurfTriMesh* pStmRaw) ;
|
||||||
bool CalculateZConstCut( const ICurve* pCrv, double dXmin, double dXmax, bool bIncludeMax, bool bIncludeMin,
|
|
||||||
const Point3d& ptGdStart, const Point3d& ptGdEnd, const Vector3d& vtGdDir, const Frame3d& frSect,
|
|
||||||
const BBox3d& b3Raw, double dDepth, bool bFirstInterval, bool bLastInterval, int& nCount) ;
|
|
||||||
bool CalculateCurvedZigZagCut( const ICurve* pCut, const Vector3d& vtTool, double dElev, bool bFirst, bool bLast,
|
bool CalculateCurvedZigZagCut( const ICurve* pCut, const Vector3d& vtTool, double dElev, bool bFirst, bool bLast,
|
||||||
int& nCount) ;
|
int& nCount) ;
|
||||||
bool AddApproach( const Point3d& ptP, const Vector3d& vtCorr, bool bFirst,
|
bool AddApproach( const Point3d& ptP, const Vector3d& vtCorr, bool bFirst,
|
||||||
double dSafeZ, double dElev, double dAppr) ;
|
double dSafeZ, double dElev, double dAppr) ;
|
||||||
bool AddRetract( const Point3d& ptP, const Vector3d& vtCorr, double dSafeZ, double dElev, double dAppr) ;
|
bool AddRetract( const Point3d& ptP, const Vector3d& vtCorr, double dSafeZ, double dElev, double dAppr) ;
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ struct SawRoughingData : public MachiningData
|
|||||||
SawRoughingData( void)
|
SawRoughingData( void)
|
||||||
: m_ToolUuid(), m_nSolCh( 0), m_dSpeed( 0), m_dFeed( 0), m_dStartFeed( 0), m_dEndFeed( 0), m_dTipFeed( 0),
|
: m_ToolUuid(), m_nSolCh( 0), m_dSpeed( 0), m_dFeed( 0), m_dStartFeed( 0), m_dEndFeed( 0), m_dTipFeed( 0),
|
||||||
m_dOffsR( UNKNOWN_PAR), m_dOffsL( UNKNOWN_PAR),
|
m_dOffsR( UNKNOWN_PAR), m_dOffsL( UNKNOWN_PAR),
|
||||||
m_nHeadSide(0), m_dStartPos( 0), m_dSideStep( 0), m_dStep( 0),
|
m_nHeadSide( 1), m_dStartPos( 0), m_dSideStep( 0), m_dStep( 0),
|
||||||
m_nStepType( 0), m_nLeadLinkType( 0), m_dApprox( 0),
|
m_nStepType( 0), m_nLeadLinkType( 0), m_dApprox( 0),
|
||||||
m_dStartAddLen( 0), m_dEndAddLen( 0) {}
|
m_dStartAddLen( 0), m_dEndAddLen( 0) {}
|
||||||
SawRoughingData* Clone( void) const override ;
|
SawRoughingData* Clone( void) const override ;
|
||||||
|
|||||||
+1007
-1643
File diff suppressed because it is too large
Load Diff
+41
-49
@@ -25,6 +25,7 @@
|
|||||||
#include "/EgtDev/Include/EgtNumUtils.h"
|
#include "/EgtDev/Include/EgtNumUtils.h"
|
||||||
#include "/EgtDev/Include/EGkSurfLocal.h"
|
#include "/EgtDev/Include/EGkSurfLocal.h"
|
||||||
|
|
||||||
|
class ICurveLine ;
|
||||||
class ICAvToolSurfTm ;
|
class ICAvToolSurfTm ;
|
||||||
class ISurfFlatRegion ;
|
class ISurfFlatRegion ;
|
||||||
class ISurfTriMesh ;
|
class ISurfTriMesh ;
|
||||||
@@ -100,52 +101,57 @@ class SurfFinishing : public Machining
|
|||||||
|
|
||||||
public :
|
public :
|
||||||
SurfFinishing( void) ;
|
SurfFinishing( void) ;
|
||||||
|
Frame3d GetFrame() const { return m_Frame ; } ; // spostare in Machining se tutto ok
|
||||||
|
Frame3d& GetFrame() { return m_Frame ; } ; // spostare in Machining se tutto ok
|
||||||
|
void SetFrame( const Frame3d& frFinishing) { m_Frame = frFinishing ; } ; // spostare in Machining se tutto ok
|
||||||
|
|
||||||
private :
|
private :
|
||||||
bool MyApply( bool bRecalc, bool bPostApply) ;
|
bool MyApply( bool bRecalc, bool bPostApply) ;
|
||||||
bool VerifyGeometry( SelData Id, int& nSubs) ;
|
bool VerifyGeometry( SelData Id, int& nSubs) ;
|
||||||
bool GetCurves( SelData Id, ICURVEPLIST& lstPC) ;
|
bool GetCurves( SelData Id, ICURVEPLIST& lstPC) ;
|
||||||
bool Chain( int nGrpDestId) ;
|
bool Chain( int nGrpDestId) ;
|
||||||
|
bool FlattenCurves( ICURVEPOVECTOR& vpCrv) const ;
|
||||||
|
bool UpdateFrameAndToolDir( int nAuxId, bool& bRecalc) ;
|
||||||
bool GetSurfacesByIds( SURFLOCALVECTOR& vSrfLoc, SURFLOCALVECTOR& vSrfSuppLoc, Frame3d& frSurf) ;
|
bool GetSurfacesByIds( SURFLOCALVECTOR& vSrfLoc, SURFLOCALVECTOR& vSrfSuppLoc, Frame3d& frSurf) ;
|
||||||
bool CalcRegionElevation( const ISurfFlatRegion* pSfr, const Vector3d& vtTool, double dRad, double dLen, double& dElev) const ; ;
|
bool CalcRegionElevation( const ISurfFlatRegion* pSfr, const Vector3d& vtTool, double dRad, double dLen, double& dElev) const ;
|
||||||
bool SetCAvTlStmForSurfaces( ICAvToolSurfTm* pCAvTlStm, const ISurfFlatRegion* pSfrCnt, double dDepth,
|
bool SetCAvTlStmForSurfaces( ICAvToolSurfTm* pCAvTlStm, const ISurfFlatRegion* pSfrCnt, double dDepth,
|
||||||
double dToolLen, double dToolDiam, double dToolCornRad,
|
double dToolLen, double dToolDiam, double dToolCornRad,
|
||||||
double dToolSideAng, double dToolMaxMat, double dMachOffsR,
|
double dToolSideAng, double dToolMaxMat, double dMachOffsR,
|
||||||
const SURFLOCALVECTOR& vSurfLoc, const SURFLOCALVECTOR& vSurfSuppLoc) ;
|
const SURFLOCALVECTOR& vSurfLoc, const SURFLOCALVECTOR& vSurfSuppLoc) ;
|
||||||
bool EraseMaxDownSurf( const SURFLOCALVECTOR& vSurfLoc, const Frame3d& frSurf, const Vector3d& vtTool,
|
bool EraseMaxDownSurf( const SURFLOCALVECTOR& vSurfLoc, const Frame3d& frSurf, const Vector3d& vtMove,
|
||||||
double dDepth, ISurfFlatRegion* pSfrCnt) ;
|
double dDepth, ISurfFlatRegion* pSfrCnt) const ;
|
||||||
bool ProcessCrvCompo( int nPathId, int nPvId, int nClId) ;
|
bool EraseMaxDownStartEndPolyLine( PolyLine& PL) const ;
|
||||||
|
bool ProcessCrv( int nPathId, int nPvId, int nClId) ;
|
||||||
bool ProcessSfr( int nPathId, int nPvId, int nClId) ;
|
bool ProcessSfr( int nPathId, int nPvId, int nClId) ;
|
||||||
bool SimplifyCurve( ICurveComposite* pCompo, const Frame3d& frLocXY,
|
bool SimplifyCurve( ICurveComposite* pCompo, const Frame3d& frLocXY,
|
||||||
double dMergeLinTol = 200. * EPS_SMALL, double dMergeAndTolDeg = 200. * EPS_ANG_SMALL,
|
double dMergeLinTol = 200. * EPS_SMALL, double dMergeAndTolDeg = 200. * EPS_ANG_SMALL,
|
||||||
double dSmallDefLinTol = 150. * EPS_SMALL, double dSmallDefAngTolDeg = 2. * ANG_TOL_STD_DEG,
|
double dSmallDefLinTol = 150. * EPS_SMALL, double dSmallDefAngTolDeg = 2. * ANG_TOL_STD_DEG,
|
||||||
double dArcApproxLinTol = 50. * EPS_SMALL, double dArcApproxAngTolDeg = ANG_TOL_STD_DEG) const ;
|
double dArcApproxLinTol = 50. * EPS_SMALL, double dArcApproxAngTolDeg = ANG_TOL_STD_DEG) const ;
|
||||||
bool CalcZConstProjectedLink( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frPocket,
|
bool CalcZConstLink( ICurveComposite* pCompoLink, const Point3d& ptStartLink, const Point3d& ptEndLink, ICAvToolSurfTm* pCAvTlStm,
|
||||||
const Frame3d& frSurf, const Vector3d& vtTool, double dDepth,
|
const Frame3d& frPocket, const Frame3d& frSurf, const Vector3d& vtTool, double dDepth,
|
||||||
const Point3d ptStart_forced, const Point3d ptEnd_forced,
|
const CISURFTMPVECTOR& vpStm) const ;
|
||||||
ICurveComposite* pCrv) const ;
|
|
||||||
// lavorazioni per superfici
|
// lavorazioni per superfici
|
||||||
bool AddZigZag( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf, const ISurfFlatRegion* pSfrCnt,
|
bool AddZigZag( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf, const ISurfFlatRegion* pSfrCnt,
|
||||||
const Vector3d& vtTool, double dDepth, double dElev, bool bSplitArcs) ;
|
const Vector3d& vtTool, const Vector3d& vtMove, double dDepth, double dElev, bool bSplitArcs) ;
|
||||||
bool AddOneWay( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf, const ISurfFlatRegion* pSfrCnt,
|
bool AddOneWay( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf, const ISurfFlatRegion* pSfrCnt,
|
||||||
const Vector3d& vtTool, double dDepth, double dElev, bool bSplitArcs) ;
|
const Vector3d& vtTool, const Vector3d& vtMove, double dDepth, double dElev, bool bSplitArcs) ;
|
||||||
bool AddSpiral( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf, const ISurfFlatRegion* pSfrCnt,
|
bool AddSpiral( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf, const ISurfFlatRegion* pSfrCnt,
|
||||||
const Vector3d& vtTool, double dDepth, double dElev, bool bSplitArcs, bool bInVsOut) ;
|
const Vector3d& vtTool, const Vector3d& vtMove, double dDepth, double dElev, bool bSplitArcs, bool bInVsOut) ;
|
||||||
bool AddZConst( ICAvToolSurfTm* pCAvTlStm, const SURFLOCALVECTOR& vSrfLoc, const Frame3d& frSurf,
|
bool AddZConst( ICAvToolSurfTm* pCAvTlStm, const SURFLOCALVECTOR& vSrfLoc, const Frame3d& frSurf,
|
||||||
const ISurfFlatRegion* pSfrCnt, const Vector3d& vtTool, double dDepth, double dElev, bool bSplitArcs) ;
|
const ISurfFlatRegion* pSfrCnt, const Vector3d& vtTool, double dDepth, double dElev, bool bSplitArcs) ;
|
||||||
bool AddOptimal( ICAvToolSurfTm* pCAvTlStm, const SURFLOCALVECTOR& vSrfLoc, const Frame3d& frSurf,
|
bool AddOptimal( ICAvToolSurfTm* pCAvTlStm, const SURFLOCALVECTOR& vSrfLoc, const Frame3d& frSurf,
|
||||||
const ISurfFlatRegion* pSfrCntZigZag, const ISurfFlatRegion* pSfrCntZConst, const Vector3d& vtTool,
|
const ISurfFlatRegion* pSfrCntZigZag, const ISurfFlatRegion* pSfrCntZConst, const Vector3d& vtTool,
|
||||||
double dDepth, double dElev, bool bSplitArcs) ;
|
const Vector3d& vtMove, double dDepth, double dElev, bool bSplitArcs) ;
|
||||||
bool AddPencil( ICAvToolSurfTm* pCAvTlStm, const SURFLOCALVECTOR& vSrfLoc, const Frame3d& frSurf,
|
bool AddPencil( ICAvToolSurfTm* pCAvTlStm, const SURFLOCALVECTOR& vSrfLoc, const Frame3d& frSurf,
|
||||||
const ISurfFlatRegion* pSfrCnt, const Vector3d& vtTool, double dDepth, double dElev, bool bSplitArcs) ;
|
const ISurfFlatRegion* pSfrCnt, const Vector3d& vtTool, double dDepth, double dElev, bool bSplitArcs) ;
|
||||||
// lavorazioni per curve
|
// lavorazioni per curve
|
||||||
bool AddProjection( ICAvToolSurfTm* pCAvTlStm, const SURFLOCALVECTOR& vSrfLoc, const Frame3d& frSurf, const ICurveComposite* pCompo,
|
bool AddProjection( ICAvToolSurfTm* pCAvTlStm, const SURFLOCALVECTOR& vSrfLoc, const Frame3d& frSurf, const ICurveComposite* pCompo,
|
||||||
const Vector3d& vtTool, double dDepth, double dElev, bool bSplitArcs) ;
|
const Vector3d& vtTool, const Vector3d& vtMove, double dDepth, double dElev, bool bSplitArcs) ;
|
||||||
// creazione del percorso finale di lavorazione
|
// creazione del percorso finale di lavorazione
|
||||||
bool AddFinishing( const ISurfFlatRegion* pSfrCnt, ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf, const ICRVCOMPOPOVECTOR& vCrvCompo,
|
bool AddFinishing( const ISurfFlatRegion* pSfrCnt, ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf, const ICRVCOMPOPOVECTOR& vCrvCompo,
|
||||||
const Vector3d& vtTool, double dElev, double dDepth, bool bSplitArcs) ;
|
const Vector3d& vtTool, const Vector3d& vtMove, double dElev, double dDepth, bool bSplitArcs) ;
|
||||||
// collisione con i percorsi di lavorazione
|
// collisione con i percorsi di lavorazione
|
||||||
bool CorrectPathByCollision( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf, const Vector3d& vtTool,
|
bool CorrectPathByCollision( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf, const Vector3d& vtTool, const Vector3d& vtMove,
|
||||||
double dDepth, ICRVCOMPOPOVECTOR& vpCrvs) ;
|
double dDepth, ICRVCOMPOPOVECTOR& vpCrvs) ;
|
||||||
|
|
||||||
bool WorkPencilCurves( const ICRVCOMPOPOVECTOR& vCrvCompo, const ISurfFlatRegion* pSfrCnt, int nPencilType, double dOffs, int nOffs,
|
bool WorkPencilCurves( const ICRVCOMPOPOVECTOR& vCrvCompo, const ISurfFlatRegion* pSfrCnt, int nPencilType, double dOffs, int nOffs,
|
||||||
@@ -161,32 +167,24 @@ class SurfFinishing : public Machining
|
|||||||
bool GetSurfTriMeshFromOffset( const SURFLOCALVECTOR& vSrfLoc, double dOffs, double dLinTol, ISurfTriMesh* pStmOffs) const ;
|
bool GetSurfTriMeshFromOffset( const SURFLOCALVECTOR& vSrfLoc, double dOffs, double dLinTol, ISurfTriMesh* pStmOffs) const ;
|
||||||
bool GetCurvesFromSurfTriMeshesOffset( const ISurfTriMesh * pStmOffs, double dBiTanAng, double dLinTol,
|
bool GetCurvesFromSurfTriMeshesOffset( const ISurfTriMesh * pStmOffs, double dBiTanAng, double dLinTol,
|
||||||
int nOffs, const ISurfFlatRegion* pSfrCnt, ICRVCOMPOPOVECTOR& vCrvCompo ) ;
|
int nOffs, const ISurfFlatRegion* pSfrCnt, ICRVCOMPOPOVECTOR& vCrvCompo ) ;
|
||||||
bool ChooseFinishingForOptimal( const ISurfFlatRegion* pSfr, int nChunk, bool& bSpiral, double& dSideAng) ;
|
|
||||||
bool OrderOptimalPathsByZLoc( const ISurfFlatRegion* pSfrCntZConst, const ISurfFlatRegion* pSfrCntZigZag, VECTORPATHS& vCrvPaths) const ;
|
bool OrderOptimalPathsByZLoc( const ISurfFlatRegion* pSfrCntZConst, const ISurfFlatRegion* pSfrCntZigZag, VECTORPATHS& vCrvPaths) const ;
|
||||||
bool GetSfrBySilhouette( ICAvParSilhouettesSurfTm* pCavParSilh, double dDepth, double dSilTolSamp,
|
bool OrderOptimalPathsByDistance( const Point3d& ptRef, VECTORPATHS& vCrvPaths, bool bAllowInvert) const ;
|
||||||
double dSilTolLin, double dSilTolAng, ISurfFlatRegion* pSfrSil) ;
|
|
||||||
bool ApproxSilhouetteClosedPLForOptimal( PolyLine& PL, double dSampleTol, double dMaxLinTol, double dAngTol, double dLinFeaTol, ICurveComposite* pCompoPL) ;
|
|
||||||
bool SplitStmTrianglesByClippingAngle( const SURFLOCALVECTOR& vSrfLoc, const Frame3d& frSurf, const ISurfFlatRegion* pSfrCnt,
|
|
||||||
const Vector3d& vtTool, double dDepth, double dClippingAngle, double dTolerAngle,
|
|
||||||
ISURFTMPOVECTOR& vpStm1, ISURFTMPOVECTOR& vpStm2, double& dMaxFrontTriaRad) const ;
|
|
||||||
bool GetZConstQuotesInsideSfrParallelToTool( const SURFLOCALVECTOR&, const Frame3d& frSurf, const ISurfFlatRegion* pSfr,
|
bool GetZConstQuotesInsideSfrParallelToTool( const SURFLOCALVECTOR&, const Frame3d& frSurf, const ISurfFlatRegion* pSfr,
|
||||||
const Vector3d& vtTool, std::set<double>& setZAmbiguos) const ;
|
const Vector3d& vtTool, std::set<double>& setZAmbiguos) const ;
|
||||||
ISurfFlatRegion* GetSfrSilhouette( const SURFLOCALVECTOR& vSrfLoc, const Frame3d& frLvl0, double dDepth) const ;
|
ISurfFlatRegion* GetSfrSilhouette( const SURFLOCALVECTOR& vSrfLoc, const Frame3d& frLvl0, double dDepth) const ;
|
||||||
ISurfFlatRegion* GetSfrProjectedStmLoops( const ISURFTMPOVECTOR& vStm, const ISurfFlatRegion* pSfrContour,
|
|
||||||
const DBLVECTOR& vdLinFeaTol, const DBLVECTOR& vdAngTol, const DBLVECTOR& vdMaxLinTol) const ;
|
|
||||||
ISurfTriMesh* SplitStmTriaUnderClippingAngle( const SurfLocal SrfLoc, const Vector3d& vtTest, double dClippingAngle,
|
|
||||||
double dFrontTriaTolerAng, double& dMaxFrontTriaRad) const ;
|
|
||||||
bool CalcOptimalZConstCurves( const ISurfFlatRegion* pSfrLoc, const SURFLOCALVECTOR& vSrfLoc,
|
bool CalcOptimalZConstCurves( const ISurfFlatRegion* pSfrLoc, const SURFLOCALVECTOR& vSrfLoc,
|
||||||
const Frame3d& frSurf, const Vector3d& vtTool, double dAngDegSplit,
|
const Frame3d& frSurf, const Vector3d& vtTool, double dAngDegSplit,
|
||||||
double dAngDegTol, double dDepth, ICAvToolSurfTm* pCAvTlStm, VECTORPATHS& vPaths) const ;
|
double dAngDegTol, double dDepth, ICAvToolSurfTm* pCAvTlStm, VECTORPATHS& vPaths,
|
||||||
|
ISurfFlatRegion* pSfrToolColl) const ;
|
||||||
|
bool CalcOptimalZigZagSfrByZConstCrv( const ISurfFlatRegion* pSfrLoc, const CISURFTMPVECTOR& vpStm, const Vector3d& vtToolLoc,
|
||||||
|
double dExtraCollOffs, ICurveComposite* pCompoSil, ISurfFlatRegion* pSfrZigZag) const ;
|
||||||
bool CalcOptimalZigZagCurves( ISURFFRPOVECTOR& vSfrZigZagProj, const Frame3d& frSurf,
|
bool CalcOptimalZigZagCurves( ISURFFRPOVECTOR& vSfrZigZagProj, const Frame3d& frSurf,
|
||||||
const Vector3d& vtTool, double dDepth, ICAvToolSurfTm* pCAvTlStm, VECTORPATHS& vPaths) const ;
|
const Vector3d& vtTool, double dDepth, ICAvToolSurfTm* pCAvTlStm, VECTORPATHS& vPaths) const ;
|
||||||
bool GetOptimalSfr( ICAvToolSurfTm* pCAvTlStm, const SURFLOCALVECTOR& vSrfLoc, const Frame3d& frSurf, const ISurfFlatRegion* pSfrLoc, const Vector3d& vtTool,
|
|
||||||
double dDepth, double dElev, ISurfFlatRegion* pSfrSpiral, ISurfFlatRegion* pSfrZConst) const ;
|
|
||||||
bool CalcZConstSilCrv( ICAvParSilhouettesSurfTm* pCavParSilh, const SURFLOCALVECTOR& vSrfLoc, const Frame3d& frSurf,
|
bool CalcZConstSilCrv( ICAvParSilhouettesSurfTm* pCavParSilh, const SURFLOCALVECTOR& vSrfLoc, const Frame3d& frSurf,
|
||||||
const ISurfFlatRegion* pSfrClass, const Vector3d& vtTool, double dDepth, std::vector<ICRVCOMPOPOVECTOR>& vCrvCompo) const ;
|
const ISurfFlatRegion* pSfrClass, const Vector3d& vtTool, double dDepth, std::vector<ICRVCOMPOPOVECTOR>& vCrvCompo) const ;
|
||||||
bool CreateZConstPaths( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf, std::vector<ICRVCOMPOPOVECTOR>& vCrvCompo, const Vector3d& vtTool,
|
bool CreateZConstPaths( ICAvToolSurfTm* pCAvTlStm, const CISURFTMPVECTOR& vpStm, const Frame3d& frSurf,
|
||||||
const ISurfFlatRegion* pSfr, double dDepth, ICRVCOMPOPOVECTOR& vCrvPath) const ;
|
std::vector<ICRVCOMPOPOVECTOR>& vCrvCompo, const Vector3d& vtTool, const ISurfFlatRegion* pSfr,
|
||||||
|
double dDepth, ICRVCOMPOPOVECTOR& vCrvPath) const ;
|
||||||
bool AddApproach( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, double dElev, double dAppr) ;
|
bool AddApproach( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, double dElev, double dAppr) ;
|
||||||
bool AddLinkApproach( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, double dElev, double dAppr) ;
|
bool AddLinkApproach( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, double dElev, double dAppr) ;
|
||||||
bool AddLinkRetract( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, double dElev, double dAppr) ;
|
bool AddLinkRetract( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, double dElev, double dAppr) ;
|
||||||
@@ -195,30 +193,20 @@ class SurfFinishing : public Machining
|
|||||||
bool AddLeadIn( const Point3d& ptP1, const Point3d& ptStart, const Vector3d& vtStart, const Vector3d& vtTool, bool bSplitArcs) ;
|
bool AddLeadIn( const Point3d& ptP1, const Point3d& ptStart, const Vector3d& vtStart, const Vector3d& vtTool, bool bSplitArcs) ;
|
||||||
bool CalcLeadOutEnd( const Point3d& ptEnd, const Vector3d& vtEnd, const Vector3d& vtTool, const Vector3d& vtNorm, Point3d& ptP1) const ;
|
bool CalcLeadOutEnd( const Point3d& ptEnd, const Vector3d& vtEnd, const Vector3d& vtTool, const Vector3d& vtNorm, Point3d& ptP1) const ;
|
||||||
bool AddLeadOut( const Point3d& ptEnd, const Vector3d& vtEnd, const Point3d& ptP1, const Vector3d& vtTool, bool bSplitArcs) ;
|
bool AddLeadOut( const Point3d& ptEnd, const Vector3d& vtEnd, const Point3d& ptP1, const Vector3d& vtTool, bool bSplitArcs) ;
|
||||||
bool GetLastGoodPoint( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf, const Point3d& ptStart,
|
bool GetLastGoodPoint( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf, const Point3d& ptStart, const Point3d& ptEnd,
|
||||||
const Point3d& ptEnd, const Vector3d& vtInit, const Vector3d& vtTool,
|
const Vector3d& vtInit, const Vector3d& vtTool, const Vector3d& vtMove, bool bLeadInVsOut, Point3d& ptP1) const ;
|
||||||
bool bLeadInVsOut, Point3d& ptP1) const ;
|
bool GetLinkFromPaths( const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtTool, const Vector3d& vtMove, const ISurfFlatRegion* pSfrCnt,
|
||||||
bool GetLinkFromPaths( const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtTool, const ISurfFlatRegion* pSfrCnt,
|
|
||||||
double dDepth, double dSafeZ, ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf, ICurveComposite* pCrvLink) const ;
|
double dDepth, double dSafeZ, ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf, ICurveComposite* pCrvLink) const ;
|
||||||
bool GetSurfaceNormalAtPoint( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf,
|
bool GetSurfaceNormalAtPoint( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf,
|
||||||
const Point3d& ptTool, const Vector3d& vtTool, Vector3d& vtNorm) const ;
|
const Point3d& ptTool, const Vector3d& vtTool, const Vector3d& vtMove, Vector3d& vtNorm) const ;
|
||||||
bool GetActiveSurfaces( INTVECTOR& vSurfId, INTVECTOR& vSurfSuppId) const ;
|
bool GetActiveSurfaces( INTVECTOR& vSurfId, INTVECTOR& vSurfSuppId) const ;
|
||||||
int ProcessSquare( int nFlag, double dLevel, double dQPt0, double dQpt1, double dQpt2, double dQpt3,
|
|
||||||
int& nI1s, int& nI1e, int& nI2s, int& nI2e) const ;
|
|
||||||
Point3d CalcShapedPoint( const PNTUVVECT& myInfoStart, const PNTUVVECT& myInfoEnd, int nType, const Vector3d& vtAxL,
|
|
||||||
const Vector3d& vtMoveL, double dCosSplitAngle, double dLimInfCosSplitAng,
|
|
||||||
double dLimSupCosSplitAng, ICAvToolSurfTm* pCAvTlStm, int _nInd_debug) const ;
|
|
||||||
bool TestSubEdges( std::unordered_map<int, Point3d>& umEdgePnt, const INTVECTOR& vEdgeInd, int nType, int nFirst, int nLast,
|
|
||||||
const VECTORCOLLISIONSFR& vPntM, int nStepX, const Vector3d vtAxL, const Vector3d& vtMoveL,
|
|
||||||
double dCosSplitAng, double dLimInfCosSplitAng, double dLimSupCosSplitAng, ICAvToolSurfTm* pCAvTlStm, int _nInd_debug) const ;
|
|
||||||
bool MarchingSquares( const VECTORCOLLISIONSFR& vPntM, int nType, double dOffsTol, int nStepX, int nStepY, double dClippingAngle,
|
|
||||||
double dLimInfClippingAng, double dLimSupClippingAng, const Vector3d& vtAxL, const Vector3d& vtMoveL, ICAvToolSurfTm* pCAvTlStm,
|
|
||||||
ICRVCOMPOPOVECTOR& vCrvCompo) const ;
|
|
||||||
bool AreSameSfrChunkEpsilon( const ISurfFlatRegion* pSfrChunkA, const ISurfFlatRegion* pSfrChunkB, double dMaxDist) const ;
|
bool AreSameSfrChunkEpsilon( const ISurfFlatRegion* pSfrChunkA, const ISurfFlatRegion* pSfrChunkB, double dMaxDist) const ;
|
||||||
bool CalcOptimalZigZagRegion( const ISurfFlatRegion* pSfrCntLoc, const SURFLOCALVECTOR& vSrfLoc, const Frame3d& frSurf,
|
bool CalcOptimalZigZagRegion( const ISurfFlatRegion* pSfrCntLoc, const ISurfFlatRegion* pSfrZLevelColl, ISURFFRPOVECTOR& vpSfrZigZagProj) const ;
|
||||||
const Vector3d& vtTool, double dDepth, double dSplitAngDeg, ISURFFRPOVECTOR& vpSfrZigZagProj) const ;
|
|
||||||
double GetRightFeed( const Vector3d& vtMove, const Vector3d& vtTool) const ;
|
double GetRightFeed( const Vector3d& vtMove, const Vector3d& vtTool) const ;
|
||||||
double GetRadiusForStartEndElevation( void) const ;
|
double GetRadiusForStartEndElevation( void) const ;
|
||||||
|
double GetLocalSideAngle() const ;
|
||||||
|
bool GetLocalToolDir( Vector3d& vtToolLoc) const ;
|
||||||
|
int GetOptimalSubType() const ;
|
||||||
|
|
||||||
private :
|
private :
|
||||||
double GetSpeed() const
|
double GetSpeed() const
|
||||||
@@ -235,6 +223,7 @@ class SurfFinishing : public Machining
|
|||||||
{ return ( IsUnknownValue( m_Params.m_dOffsR) ? m_TParams.m_dOffsR : m_Params.m_dOffsR) ; }
|
{ return ( IsUnknownValue( m_Params.m_dOffsR) ? m_TParams.m_dOffsR : m_Params.m_dOffsR) ; }
|
||||||
double GetSideStep( void) const
|
double GetSideStep( void) const
|
||||||
{ return Clamp( m_Params.m_dSideStep, 0.1, m_TParams.m_dTDiam) ; }
|
{ return Clamp( m_Params.m_dSideStep, 0.1, m_TParams.m_dTDiam) ; }
|
||||||
|
|
||||||
int GetLeadInType( void) const ;
|
int GetLeadInType( void) const ;
|
||||||
int GetLeadOutType( void) const ;
|
int GetLeadOutType( void) const ;
|
||||||
|
|
||||||
@@ -242,6 +231,9 @@ class SurfFinishing : public Machining
|
|||||||
SELVECTOR m_vId ; // identificativi entità geometriche da lavorare
|
SELVECTOR m_vId ; // identificativi entità geometriche da lavorare
|
||||||
SurfFinishingData m_Params ; // parametri lavorazione
|
SurfFinishingData m_Params ; // parametri lavorazione
|
||||||
ToolData m_TParams ; // parametri utensile
|
ToolData m_TParams ; // parametri utensile
|
||||||
|
Frame3d m_Frame ; // terna per orientamento finitura ZigZag/OneWay
|
||||||
|
double m_dTheta ; // orientamento verticale utensile rispetto a m_Frame
|
||||||
|
double m_dPhi ; // orientamento orizzontale utesnile rispetto a m_Frame
|
||||||
double m_dTHoldBase ; // posizione base del porta-utensile
|
double m_dTHoldBase ; // posizione base del porta-utensile
|
||||||
double m_dTHoldLen ; // lunghezza del porta-utensile
|
double m_dTHoldLen ; // lunghezza del porta-utensile
|
||||||
double m_dTHoldDiam ; // diametro del porta-utensile
|
double m_dTHoldDiam ; // diametro del porta-utensile
|
||||||
|
|||||||
+1
-1
@@ -3043,7 +3043,7 @@ SurfRoughing::CalcPaths( const INTINTVECTOR& vPocket, STEPINFOSRVECTOR& vStepInf
|
|||||||
ICRVCOMPOPOVECTOR vCrvPaths ;
|
ICRVCOMPOPOVECTOR vCrvPaths ;
|
||||||
if ( ! CalcPocketing( vStepInfo[nInd].pSfrPock, m_TParams.m_dDiam / 2, 0., m_Params.m_dSideStep,
|
if ( ! CalcPocketing( vStepInfo[nInd].pSfrPock, m_TParams.m_dDiam / 2, 0., m_Params.m_dSideStep,
|
||||||
m_Params.m_dSideAngle, 5., vStepInfo[nInd].nSubType, true, true, vStepInfo[nInd].bInverted,
|
m_Params.m_dSideAngle, 5., vStepInfo[nInd].nSubType, true, true, vStepInfo[nInd].bInverted,
|
||||||
false, bConventionalMilling, true, true, ptEndLastPath, vStepInfo[nInd].pSfrLimit, false, m_Params.m_dSideStep,
|
false, bConventionalMilling, true, false, true, ptEndLastPath, vStepInfo[nInd].pSfrLimit, false, m_Params.m_dSideStep,
|
||||||
GetLeadInType(), m_Params.m_dLiTang, m_Params.m_dLiElev, GetLeadOutType(), m_Params.m_dLoTang,
|
GetLeadInType(), m_Params.m_dLiTang, m_Params.m_dLiElev, GetLeadOutType(), m_Params.m_dLoTang,
|
||||||
false, 0., 0., false, vCrvPaths)) {
|
false, 0., 0., false, vCrvPaths)) {
|
||||||
if ( vStepInfo[nInd].bIsExtraStep) {
|
if ( vStepInfo[nInd].bIsExtraStep) {
|
||||||
|
|||||||
Reference in New Issue
Block a user