Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 ;
|
||||||
|
|||||||
@@ -1046,8 +1046,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 ;
|
||||||
|
|||||||
@@ -385,6 +385,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) ;
|
||||||
|
|||||||
@@ -128,6 +128,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) ;
|
||||||
|
|||||||
+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 ;
|
||||||
|
}
|
||||||
+527
-66
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,7 @@ 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" ;
|
||||||
|
|
||||||
// Solo per Sawing
|
// Solo per Sawing
|
||||||
static const std::string UN_DOWNSE = "DownSE" ;
|
static const std::string UN_DOWNSE = "DownSE" ;
|
||||||
@@ -70,6 +71,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" ;
|
||||||
|
|||||||
+12
-14
@@ -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
|
||||||
@@ -5987,7 +5985,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) ;
|
||||||
|
|||||||
+601
-105
File diff suppressed because it is too large
Load Diff
+16
-7
@@ -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,15 +110,17 @@ 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) ;
|
ISurfFlatRegion* GetSfrByStmIntersection( const IntersParPlanesSurfTm& IPPStm, double dDist, double dSmallOffs = 0) ;
|
||||||
ISurfFlatRegion* GetSfrRawProjection( const ISurfTriMesh* pStmRaw, const ISurfFlatRegion* pSfr, const Vector3d& vtTool) ;
|
ISurfFlatRegion* GetSfrRawProjection( const ISurfTriMesh* pStmRaw, const ISurfFlatRegion* pSfr, const Vector3d& vtTool,
|
||||||
|
const Frame3d& frAtTop, ICAvParSilhouettesSurfTm** ppCavParSil = nullptr) ;
|
||||||
|
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 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 ;
|
||||||
@@ -134,10 +137,11 @@ class PocketingNT : public Machining
|
|||||||
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, ISurfFlatRegion* pSfrLimit) ;
|
||||||
bool CalcPaths( STEPINFOPOVECTOR& vStepInfo) ;
|
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 +156,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 +187,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 +253,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
|
||||||
} ;
|
} ;
|
||||||
+718
-317
File diff suppressed because it is too large
Load Diff
+32
-19
@@ -100,21 +100,27 @@ 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,
|
||||||
@@ -126,26 +132,26 @@ class SurfFinishing : public Machining
|
|||||||
ICurveComposite* pCrv) 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,
|
||||||
@@ -178,7 +184,10 @@ class SurfFinishing : public Machining
|
|||||||
double dFrontTriaTolerAng, double& dMaxFrontTriaRad) const ;
|
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,
|
bool GetOptimalSfr( ICAvToolSurfTm* pCAvTlStm, const SURFLOCALVECTOR& vSrfLoc, const Frame3d& frSurf, const ISurfFlatRegion* pSfrLoc, const Vector3d& vtTool,
|
||||||
@@ -195,13 +204,12 @@ 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 ProcessSquare( int nFlag, double dLevel, double dQPt0, double dQpt1, double dQpt2, double dQpt3,
|
||||||
int& nI1s, int& nI1e, int& nI2s, int& nI2e) const ;
|
int& nI1s, int& nI1e, int& nI2s, int& nI2e) const ;
|
||||||
@@ -215,10 +223,11 @@ class SurfFinishing : public Machining
|
|||||||
double dLimInfClippingAng, double dLimSupClippingAng, const Vector3d& vtAxL, const Vector3d& vtMoveL, ICAvToolSurfTm* pCAvTlStm,
|
double dLimInfClippingAng, double dLimSupClippingAng, const Vector3d& vtAxL, const Vector3d& vtMoveL, ICAvToolSurfTm* pCAvTlStm,
|
||||||
ICRVCOMPOPOVECTOR& vCrvCompo) const ;
|
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 ;
|
||||||
|
|
||||||
private :
|
private :
|
||||||
double GetSpeed() const
|
double GetSpeed() const
|
||||||
@@ -235,6 +244,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 +252,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