Compare commits
40 Commits
5AxTrimming
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 |
Binary file not shown.
@@ -21,6 +21,7 @@ const double MIN_SAFEDIST = 5.0 ;
|
||||
|
||||
//----------- Costanti per approssimazioni con polilinee o poliarchi --------
|
||||
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_RAW = 0.5 ;
|
||||
const double ANG_TOL_STD_DEG = 15 ;
|
||||
|
||||
@@ -1046,8 +1046,12 @@ Machine::ModifyMachineExitPosition( const string& sHead, int nExit, const Point3
|
||||
if ( pExit == nullptr)
|
||||
return false ;
|
||||
// eseguo la modifica
|
||||
Point3d ptOrigPos = pExit->GetPos() ;
|
||||
if ( ! pExit->Modify( ptPos, m_dExitMaxAdjust))
|
||||
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
|
||||
LuaSetGlobVar( "EMC.EXITPOS", ptPos) ;
|
||||
return true ;
|
||||
|
||||
+90
-191
@@ -22,7 +22,9 @@
|
||||
#include "/EgtDev/Include/EGkGeoVector3d.h"
|
||||
#include "/EgtDev/Include/EGkCurveLine.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/EGkLuaAux.h"
|
||||
#include "/EgtDev/Include/EGkStringUtils3d.h"
|
||||
@@ -33,6 +35,9 @@
|
||||
|
||||
using namespace std ;
|
||||
|
||||
#define COLOR5AX 0
|
||||
#define DRAWCYL 0
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
Machine::LuaEmtAddRapidStart( lua_State* L)
|
||||
@@ -598,36 +603,6 @@ Machine::LuaEmtGetBackAuxDir( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
struct Cyl {
|
||||
Cyl( void): frCyl( GLOB_FRM), dH( 0.), dRad( 0.) {;} ;
|
||||
Cyl( const Frame3d& _frCyl, double _dH, double _dRad, double _dLinTol) :
|
||||
frCyl( _frCyl), dH( _dH), dRad( _dRad) { ;}
|
||||
Cyl( const Point3d& _ptBase, const Vector3d& vtZ, double _dH, double _dRad, double _dLinTol) :
|
||||
dH( _dH), dRad( _dRad){
|
||||
frCyl.Set( _ptBase, vtZ); }
|
||||
public :
|
||||
Frame3d frCyl ;
|
||||
public:
|
||||
double dH ;
|
||||
double dRad ;
|
||||
};
|
||||
|
||||
typedef vector<Cyl> OFFSETCYLVECT ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
IsPointInsideCylinder( const Point3d& ptTest, const Cyl& offCyl)
|
||||
{
|
||||
Point3d ptTestLoc = ptTest ; ptTestLoc.ToLoc( offCyl.frCyl) ;
|
||||
if ( ptTestLoc.z > offCyl.dH || ptTestLoc.z < 0)
|
||||
return false ;
|
||||
double dDist = ptTestLoc.x * ptTestLoc.x + ptTestLoc.y * ptTestLoc.y ;
|
||||
double dRadSq = offCyl.dRad * offCyl.dRad ;
|
||||
if ( dDist > dRadSq)
|
||||
return false ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
Machine::LuaEmtAdjustConcavePartsInPath( lua_State* L)
|
||||
@@ -644,172 +619,96 @@ Machine::LuaEmtAdjustConcavePartsInPath( lua_State* L)
|
||||
IGeomDB* pGeomDB = m_pMchLua->m_pGeomDB ;
|
||||
int nId = pGeomDB->GetFirstInGroup( nPathId) ;
|
||||
int nIdCrvAux = pGeomDB->GetFirstInGroup( nAuxPathId) ;
|
||||
const ICurve* pCrvAux = GetCurve( pGeomDB->GetGeoObj(nIdCrvAux)) ;
|
||||
const double dLinTol = 5 * EPS_SMALL ;
|
||||
|
||||
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) {
|
||||
int nFlag = 0 ; pGeomDB->GetInfo( nId, "Flg2", nFlag) ;
|
||||
if ( nFlag == 1) {
|
||||
// scorro i prossimi finchè trovo la fine della zona concava
|
||||
INTINTVECTOR vLines ;
|
||||
while ( nFlag == 1 && nId != GDB_ID_NULL) {
|
||||
nId = pGeomDB->GetNext( nId) ;
|
||||
if ( nId != GDB_ID_NULL && pGeomDB->GetGeoType( nId) == CRV_LINE) {
|
||||
int nDerivedFromId = GDB_ID_NULL ;
|
||||
if ( pGeomDB->GetInfo( nId, "DerivFrom", nDerivedFromId)) {
|
||||
pGeomDB->GetInfo( nId, "Flg2", nFlag) ;
|
||||
vLines.emplace_back( nId, nDerivedFromId) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
OFFSETCYLVECT vCyl ;
|
||||
// creo un cilindro della dimensione del raggio
|
||||
for ( int i = 0 ; i < ssize( vLines) ; ++i) {
|
||||
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 ;
|
||||
|
||||
const IGeoVector3d* pGV = GetGeoVector3d( pGeomDB->GetGeoObj( vLines[i].second)) ;
|
||||
if ( pGV == nullptr)
|
||||
return false ;
|
||||
Point3d ptBase = pGV->GetBase() ;
|
||||
double dPar = 0 ;
|
||||
if ( ! pCrvAux->GetParamAtPoint( ptBase, dPar))
|
||||
return false ;
|
||||
|
||||
dPar = round( dPar) ;
|
||||
if ( dPar > 0) {
|
||||
Point3d ptStart, ptEnd ;
|
||||
Vector3d vtHeight ;
|
||||
pCrvAux->GetPointD1D2( dPar, ICurve::FROM_MINUS, ptEnd, &vtHeight) ;
|
||||
pCrvAux->GetPointD1D2( dPar - 1, ICurve::FROM_MINUS, ptStart) ;
|
||||
vtHeight = ptEnd - ptStart ;
|
||||
double dHeight = vtHeight.Len() ;
|
||||
// questa altezza dovrebbe coincidere con quella precedentemente calcolata come direzione della linea
|
||||
vtHeight.Normalize() ;
|
||||
vCyl.emplace_back( ptStart, vtHeight, dHeight, dRad, dLinTol) ;
|
||||
}
|
||||
}
|
||||
|
||||
// controllo l'end di ogni linea per verificare se sta nel cilindro definito da uno degli altri tratti
|
||||
// controllo tutto i punti
|
||||
bool bErasedSomePart = false ;
|
||||
bool bErasedPrev = false ;
|
||||
INTINTVECTOR vInters ;
|
||||
for ( int i = 0 ; i < ssize( vLines) ; ++i) {
|
||||
Point3d ptStart, ptEnd ;
|
||||
const ICurveLine* pCL = GetCurveLine( pGeomDB->GetGeoObj( vLines[i].first)) ;
|
||||
if ( pCL == nullptr)
|
||||
return false ;
|
||||
pCL->GetEndPoint( ptEnd) ;
|
||||
pCL->GetStartPoint( ptStart) ;
|
||||
// se stanno in uno dei cilindri degli altri tratti della zona concava
|
||||
for ( int j = 0 ; j < ssize( vLines) ; ++j) {
|
||||
if ( i == j)
|
||||
continue ;
|
||||
bool bToErase = IsPointInsideCylinder( ptEnd, vCyl[j]) ;
|
||||
if ( bErasedPrev && ! bToErase)
|
||||
bToErase = bToErase || IsPointInsideCylinder( ptStart, vCyl[j]) ;
|
||||
if ( bToErase) {
|
||||
bErasedSomePart = true ;
|
||||
bErasedPrev = true ;
|
||||
vInters.emplace_back(vLines[i].first,i) ;
|
||||
vInters.emplace_back(vLines[i+1].first,i+1) ;
|
||||
++i ;
|
||||
break ;
|
||||
}
|
||||
else
|
||||
bErasedPrev = false ;
|
||||
}
|
||||
}
|
||||
if ( bErasedSomePart) {
|
||||
// calcolo le intersezioni effettive del primo e ultimo tratto cancellati con i cilindri che li hanno cancellati
|
||||
// controllo che effettivamente tutti i tratti cancellati siano consecutivi
|
||||
for ( int i = 1 ; i < ssize( vInters) ; ++i) {
|
||||
if ( vInters[i].first != vInters[i-1].first + 1)
|
||||
return false ;
|
||||
}
|
||||
for ( int i = 0 ; i < ssize( vInters) ; ++i) {
|
||||
// cancello i tratti intermedi
|
||||
if ( i > 0 && i < ssize( vInters) - 1) {
|
||||
pGeomDB->Erase( vInters[i].first) ;
|
||||
continue ;
|
||||
}
|
||||
// per il primo e ultimo controllo le intersezioni con tutti i cilindri
|
||||
ICurveLine* pCL = GetCurveLine( pGeomDB->GetGeoObj( vInters[i].first)) ;
|
||||
Point3d ptStart = pCL->GetStart() ;
|
||||
Vector3d vtStart ; pCL->GetStartDir( vtStart) ;
|
||||
double dLen ; pCL->GetLength( dLen) ;
|
||||
double dUTrim = ( i == 0 ? INFINITO : 0) ;
|
||||
Point3d ptTrim = P_INVALID ;
|
||||
for ( int j = 0 ; j < ssize( vCyl) ; ++j) {
|
||||
if ( vInters[i].second == j)
|
||||
continue ;
|
||||
Point3d ptInt1 = P_INVALID, ptInt2 = P_INVALID ;
|
||||
double dU1, dU2 ;
|
||||
Vector3d vtN1, vtN2 ;
|
||||
if ( IntersLineCyl( ptStart, vtStart * dLen, vCyl[j].frCyl, vCyl[j].dH, vCyl[j].dRad, dU1, ptInt1, vtN1, dU2, ptInt2, vtN2)) {
|
||||
bool bUpdate = ( i == 0 ? dU1 < dUTrim : dU1 > dUTrim) ;
|
||||
bUpdate = bUpdate && ptInt1.IsValid() && dU1 > 0 && dU1 < 1 ;
|
||||
bUpdate = bUpdate && vtN1 * vtStart < 0 ;
|
||||
if ( bUpdate) {
|
||||
dUTrim = dU1 ;
|
||||
ptTrim = ptInt1 ;
|
||||
}
|
||||
bUpdate = ( i == 0 ? dU2 < dUTrim : dU2 > dUTrim) ;
|
||||
bUpdate = bUpdate && ptInt2.IsValid() && dU2 > 0 && dU2 < 1 ;
|
||||
bUpdate = bUpdate && vtN2 * vtStart > 0 ;
|
||||
if ( bUpdate) {
|
||||
dUTrim = dU2 ;
|
||||
ptTrim = ptInt2 ;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( ptTrim.IsValid()) {
|
||||
if ( i == 0) {
|
||||
pCL->ModifyEnd( ptTrim) ;
|
||||
double dNewLen ; pCL->GetLength( dNewLen) ;
|
||||
if ( dNewLen < 0.1) {
|
||||
int nPrev = pGeomDB->GetPrev( vInters[0].first) ;
|
||||
pGeomDB->Erase( vInters[0].first) ;
|
||||
vInters[0].first = nPrev ;
|
||||
ICurveLine* pCLPrev = GetCurveLine( pGeomDB->GetGeoObj( nPrev)) ;
|
||||
pCLPrev->ModifyEnd( ptTrim) ;
|
||||
}
|
||||
CamData* camData = GetCamData( pGeomDB->GetUserObj( vInters[0].first)) ;
|
||||
camData->SetEndPoint( ptTrim) ;
|
||||
}
|
||||
else {
|
||||
pCL->ModifyStart( ptTrim) ;
|
||||
double dNewLen ; pCL->GetLength( dNewLen) ;
|
||||
if ( dNewLen < 0.1) {
|
||||
int nNext = pGeomDB->GetNext( vInters[i].first) ;
|
||||
pGeomDB->Erase( vInters[i].first) ;
|
||||
vInters[i].first = nNext ;
|
||||
ICurveLine* pCLNext = GetCurveLine( pGeomDB->GetGeoObj( nNext)) ;
|
||||
pCLNext->ModifyStart( ptTrim) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// giunto questi due punti
|
||||
ICurveLine* pCLprev = GetCurveLine( pGeomDB->GetGeoObj( vInters[0].first)) ;
|
||||
Point3d ptIni = pCLprev->GetEnd() ;
|
||||
ICurveLine* pCLnext = GetCurveLine( pGeomDB->GetGeoObj( vInters.back().first)) ;
|
||||
Point3d ptFin = pCLnext->GetStart() ;
|
||||
const CamData* camDataPrev = GetCamData( pGeomDB->GetUserObj( vInters[0].first)) ;
|
||||
const CamData* camDataNext = GetCamData( pGeomDB->GetUserObj( vInters.back().first)) ;
|
||||
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, vInters[0].first) ;
|
||||
}
|
||||
nId = vLines.back().first ;
|
||||
// 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) ;
|
||||
}
|
||||
}
|
||||
nId = m_pMchLua->m_pGeomDB->GetNext( nId) ;
|
||||
}
|
||||
|
||||
// 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) ;
|
||||
|
||||
@@ -63,6 +63,11 @@ static const std::string UN_FEND = "Fend" ;
|
||||
static const std::string UN_SWE = "SWE" ;
|
||||
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
|
||||
static const std::string UN_SKIPMAXDOWN = "SkipMaxDown" ;
|
||||
static const std::string UN_SPLITANGLE = "SplitAngle" ;
|
||||
@@ -71,8 +76,7 @@ static const std::string UN_STEPNUMBER = "StepNumber" ;
|
||||
static const std::string UN_BITANGANG = "BiTangAng" ;
|
||||
static const std::string UN_OPTIMALTYPE = "OptimalType" ;
|
||||
static const std::string UN_ANGLETOL = "AngleTol" ;
|
||||
static const std::string UN_THETA = "Theta" ;
|
||||
static const std::string UN_PHI = "Phi" ;
|
||||
static const std::string UN_TILT_ANGS = "Tilt" ;
|
||||
|
||||
// Solo per SurfRoughing
|
||||
static const std::string UN_PLANEZ = "PlaneZ" ;
|
||||
|
||||
+14
-16
@@ -2525,8 +2525,8 @@ Operation::VerifyMcentLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDir
|
||||
bAxError = false ;
|
||||
Machine* pMachine = m_pMchMgr->GetCurrMachine() ;
|
||||
|
||||
// se disposizione non vanno fatti controlli
|
||||
if ( GetType() == OPER_DISP)
|
||||
// se disposizione o finitura di cornici con lama non vanno fatti controlli
|
||||
if ( GetType() == OPER_DISP || GetType() == OPER_SAWFINISHING)
|
||||
return true ;
|
||||
|
||||
// se superato il limite di ricursioni, non devo fare alcunché
|
||||
@@ -3390,7 +3390,7 @@ Operation::AdjustStartEndMovementsStd( bool bVerifyPreviousLink)
|
||||
while ( bOk && nClPathId != GDB_ID_NULL) {
|
||||
// se richiesta verifica collegamento con lavorazione precedente, sistemo inizio
|
||||
if ( bVerifyPreviousLink) {
|
||||
if ( ! AdjustOneStartEndMovement( nClPathId, nPrevClPathId, pPrevOp, vAxVal, dPrevOffsX, bMaxZ))
|
||||
if ( ! AdjustOneStartEndMovement( nClPathId, nPrevClPathId, pPrevOp, true, vAxVal, dPrevOffsX, bMaxZ))
|
||||
bOk = false ;
|
||||
}
|
||||
bMaxZ = false ;
|
||||
@@ -3433,7 +3433,7 @@ Operation::MoveHeadFromHomeToMach( bool bCurrMain, const string& sToolName, cons
|
||||
|
||||
// sistemo approccio a Zmax
|
||||
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 ;
|
||||
// eseguo collegamento speciale
|
||||
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))
|
||||
return false ;
|
||||
// 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 ;
|
||||
// gestione collegamento speciale
|
||||
if ( ! ManageSpecialLink( pPrevOpe, GDB_ID_NULL, bPrevMain, this, GDB_ID_NULL, bCurrMain, nStartZMax, nOtherLinkType))
|
||||
@@ -3696,7 +3696,7 @@ Operation::ManageDoubleOperNew( Operation* pPrevOpe)
|
||||
RemoveRise( nPrevCLPathId) ;
|
||||
DBLVECTOR 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) ;
|
||||
// passo al successivo
|
||||
nPrevCLPathId = nCLPathId ;
|
||||
@@ -3728,13 +3728,13 @@ Operation::ManageDoubleOperNew( Operation* pPrevOpe)
|
||||
DBLVECTOR vAxVal ;
|
||||
// Utensile Main
|
||||
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) ;
|
||||
// Utensile Double
|
||||
DBLVECTOR vAxDblVal ;
|
||||
bOk = bOk && m_pMchMgr->SetCalcTool( sCurrDblTool, sCurrDblHead, nCurrDblExitNbr) ;
|
||||
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 && m_pMchMgr->SetCalcTool( GetToolName(), GetHeadName(), GetExitNbr()) ;
|
||||
// passo al successivo
|
||||
@@ -3812,7 +3812,7 @@ Operation::AdjustStartEndMovementsNew( void)
|
||||
return false ;
|
||||
// sistemo approccio da Zmax
|
||||
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 ;
|
||||
// eseguo collegamento speciale
|
||||
if ( ! ManageSpecialLink( nullptr, GDB_ID_NULL, true, this, GDB_ID_NULL, true, nStartZMax))
|
||||
@@ -3835,7 +3835,7 @@ Operation::AdjustStartEndMovementsNew( void)
|
||||
if ( ! SpecialPrevMachiningOffset( pPrevOp, dPrevOffsX))
|
||||
return false ;
|
||||
// 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 ;
|
||||
// gestione collegamento speciale
|
||||
if ( ! ManageSpecialLink( pPrevOp, GDB_ID_NULL, true, this, GDB_ID_NULL, true, nStartZMax))
|
||||
@@ -3866,7 +3866,7 @@ Operation::AdjustStartEndMovementsNew( void)
|
||||
return false ;
|
||||
// sistemo approccio da Zmax
|
||||
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 ;
|
||||
// eseguo verifica
|
||||
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))
|
||||
bOk = false ;
|
||||
// sistemo collegamento con precedente
|
||||
if ( ! AdjustOneStartEndMovement( nClPathId, nPrevClPathId, nullptr, vAxVal, 0, false))
|
||||
if ( ! AdjustOneStartEndMovement( nClPathId, nPrevClPathId, nullptr, true, vAxVal, 0, false))
|
||||
bOk = false ;
|
||||
// gestione collegamento speciale ( tra due percorsi della stessa lavorazione)
|
||||
if ( ! ManageSpecialLink( this, nPrevClPathId, true, this, nClPathId, true, nStartZMax))
|
||||
@@ -3979,7 +3979,7 @@ Operation::ManageSpecialLink( Operation* pPrevOpe, int nPrevClPathId, bool bPrev
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
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)
|
||||
{
|
||||
// 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
|
||||
string sCLName ; m_pGeomDB->GetName( m_pGeomDB->GetParentId( nClPathId), sCLName) ;
|
||||
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
|
||||
RemoveClimb( nClPathId, bMain) ;
|
||||
// recupero la prima entità di questo percorso
|
||||
@@ -5987,7 +5985,7 @@ Operation::SpecialLink( const DBLVECTOR& vAxStart, const DBLVECTOR& vAxEnd, int
|
||||
string sHeadName = GetHeadName() ;
|
||||
int nExitNbr = GetExitNbr() ;
|
||||
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))
|
||||
return false ;
|
||||
}
|
||||
|
||||
+2
-1
@@ -238,7 +238,8 @@ class Operation : public IUserObj
|
||||
bool OneMoveTestCollisionAvoid( const STRVECTOR& vAxName, const DBLVECTOR& vAxStart, const DBLVECTOR& vAxEnd,
|
||||
Machine* pMch, const INTVECTOR& vRawId, const INTVECTOR& vFxtId) const ;
|
||||
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 MoveHeadFromHomeToMach( bool bMain, const std::string& sToolName, const std::string& sHeadName, int nExitNbr, int nStartZMax,
|
||||
int nOtherLinkType) ;
|
||||
|
||||
+475
-191
File diff suppressed because it is too large
Load Diff
+16
-11
@@ -115,32 +115,36 @@ class PocketingNT : public Machining
|
||||
ISurfTriMesh* GetRaw( void) ;
|
||||
ISurfTriMesh* GetStmTrim( void) ;
|
||||
ISurfTriMesh* GetExtrusionStm( const ISurfFlatRegion* pSfr, const Vector3d& vtExtr) ;
|
||||
ISurfFlatRegion* GetSfrByStmIntersection( const IntersParPlanesSurfTm& IPPStm, double dDist, double dSmallOffs = 0) ;
|
||||
ISurfFlatRegion* GetSfrRawProjection( const ISurfTriMesh* pStmRaw, const ISurfFlatRegion* pSfr, const Vector3d& vtTool,
|
||||
const Frame3d& frAtTop, ICAvParSilhouettesSurfTm** ppCavParSil = nullptr) ;
|
||||
ISurfTriMesh* GetStmRawSliced( const ISurfTriMesh* pStmRaw, const ISurfFlatRegion* pSfr, const Vector3d& vtTool) const ;
|
||||
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) ;
|
||||
Point3d GetStartPointByUser( const ISurfFlatRegion* pSfr) const ;
|
||||
Point3d GetStartPointsByHead( const STEPINFOPOVECTOR& vStepInfo) const ;
|
||||
Point3d GetStartPointsBySteps( const STEPINFOPOVECTOR& vStepInfo, int nCrvType) 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 GetHomogeneousParts( const ICurveComposite* pCrvCompo, ICRVCOMPOPOVECTOR& vpCrvs) const ;
|
||||
bool ExtendOpenEdges( ISurfFlatRegion* pSfr, const ISurfTriMesh* pStm) ;
|
||||
bool ChooseCloseOrOpenEdge( ISurfFlatRegion* pSfr, const ISurfTriMesh* pStmExtrusion) ;
|
||||
bool CheckMaxDepth( const ISurfFlatRegion* pSfr, double dDepth, const Vector3d& vtTool,
|
||||
const ISurfTriMesh* pStmRaw, const ISurfTriMesh* pStmExtrusion,
|
||||
const IntersParPlanesSurfTm& IPPStm, bool& bSkipMaxDepth) ;
|
||||
bool ChooseCloseOrOpenEdge( ISurfFlatRegion* pSfr, const ISurfTriMesh* pStmExtrusion) const ;
|
||||
bool CheckMaxDepth( const ISurfFlatRegion* pSfr, double dDepth, const Vector3d& vtTool, const ISurfTriMesh* pStmRaw,
|
||||
const ISurfTriMesh* pStmExtrusion, const IntersParPlanesSurfTm& IPPStm, bool& bSkipMaxDepth) const ;
|
||||
bool ProcessPath( int nPathId, int nPvId, int nClId) ;
|
||||
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 GeneratePocketingPv( int nPathId, const ICurveComposite* pCompo) ;
|
||||
bool CalcGeoExtSurfFr( const ISurfFlatRegion* pSfrPock, const Vector3d& vtTool, double dDepth, const ISurfTriMesh* pStmRaw,
|
||||
const SELVECTOR& vGeoSel, ISURFFRPOVECTOR& vSfrGeoExt) ;
|
||||
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,
|
||||
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 GetRightStartFeed( const Vector3d& vtMove, const Vector3d& vtTool) const ;
|
||||
bool CutCurveWithLine( ICurveComposite* pCrvA, const ICurveLine* pCrvB) ;
|
||||
@@ -155,7 +159,7 @@ class PocketingNT : public Machining
|
||||
bool AddLinkRetract( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, double dSafeAggrBottZ,
|
||||
double dElev, double dAppr, bool bSplitArcs) ;
|
||||
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,
|
||||
const StepInfoPO& currStep, double dSafeZ, double dStep, double& dCurrElev,
|
||||
double& dEscapeElev, Vector3d& vtEscape) const ;
|
||||
@@ -252,5 +256,6 @@ class PocketingNT : public Machining
|
||||
double m_dOpenMinSafe ; // minima distanza di sicurezza di attacco su lato aperto
|
||||
double m_dOpenInRawExtension ; // estensione dei tratti aperti dentro al grezzo
|
||||
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
|
||||
} ;
|
||||
+1954
-525
File diff suppressed because it is too large
Load Diff
+45
-16
@@ -22,6 +22,24 @@ class ICurve ;
|
||||
class ICurveLine ;
|
||||
class ICurveArc ;
|
||||
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
|
||||
@@ -83,22 +101,34 @@ class SawFinishing : public Machining
|
||||
bool CalculateStraightAcrossToolPath( int nAuxId, int nClId) ;
|
||||
bool CalculateCurvedAlongToolPath( int nAuxId, int nClId) ;
|
||||
bool CalculateCurvedAcrossToolPath( int nAuxId, int nClId) ;
|
||||
bool CalculateSection( int nSectGrpId, ICurve*& pSect) ;
|
||||
bool TrimSection( ICurve* pCrv) ;
|
||||
bool CalculateGuideLine( int nGuideId, const BBox3d& b3Sect,
|
||||
Point3d& ptGdStart, Point3d& ptGdEnd, Vector3d& vtGdDir) ;
|
||||
bool ClassifySection( ICurve* pCrv, INTVECTOR& vnClass) ;
|
||||
bool CalcAlongVerticalCuts( ICurve* pSect, int nUmin, int nUmax, const Frame3d& frSect,
|
||||
const Point3d& ptGdStart, const Point3d& ptGdEnd, const Vector3d& vtGdDir,
|
||||
double dDepth, double dRaxMaxZ, const Vector3d& vtTool, const Vector3d& vtCorr) ;
|
||||
bool CalcAlongStdCuts( ICurve* pSect, double dUmin, double dUmax,
|
||||
bool bSkipMin, bool bSkipMax, bool bInvert, const Frame3d& frSect,
|
||||
const Point3d& ptGdStart, const Point3d& ptGdEnd, const Vector3d& vtGdDir,
|
||||
double dDepth, double dRawMaxZ, const Vector3d& vtTool, const Vector3d& vtCorr) ;
|
||||
bool CalculateStraightSectionToolPath( int nAuxId, int nClId) ;
|
||||
bool CalculateStraightAlong5AToolPath( int nAuxId, int nClId) ;
|
||||
bool TrimVerticalSectionBounds( ICurveComposite* pSect, double dAngDeg) const ;
|
||||
bool CalculateOffsetSection( int nSectGrpId, const Frame3d& frSec, ICurve*& pSect) const ;
|
||||
bool CalculateSection( int nSectGrpId, std::vector<PtrOwner<ICurveComposite>>& vpSections) const ;
|
||||
bool TrimSection( ICurve* pCrv) const ;
|
||||
bool Split5ASection( int nSectGrpId, SECTIONVECTOR& vSubSections) const ;
|
||||
bool AdaptGuideLineToRaw( Point3d& ptGdStart, Point3d& ptGdEnd, const Vector3d& vtGdDir, bool bExtend, const ISurfTriMesh* pStmRaw) const ;
|
||||
bool ExtendPathToRaw( PolyLine& PL, const ISurfTriMesh* pStmRaw, double dExtraOut) const ;
|
||||
bool CalculateSectElevation( const Polygon3d& pgFacet, double& dElev) const ;
|
||||
bool CalculateGuideLine( int nGuideId, Point3d& ptGdStart, Point3d& ptGdEnd, Vector3d& vtGdDir,
|
||||
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 bSkipMin, bool bSkipMax, 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,
|
||||
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,
|
||||
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,
|
||||
const Vector3d& vtTool, const Vector3d& vtCorr, double dRawZ, double dDepth) ;
|
||||
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,
|
||||
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,
|
||||
Vector3d& vtTool, Vector3d& vtCorr) ;
|
||||
bool CalculateToolAndCorrVersors( const Vector3d& vtTang, int nHeadSide, Vector3d& vtTool, Vector3d& vtCorr) const ;
|
||||
bool GetHeightOnSection( const ICurve* pSect, double dX, double dYmin, double dYmax, double& dY) ;
|
||||
|
||||
private :
|
||||
|
||||
@@ -391,7 +391,8 @@ SawFinishingData::VerifyStepType( int nVal) const
|
||||
bool
|
||||
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) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
+355
-535
File diff suppressed because it is too large
Load Diff
+7
-9
@@ -22,6 +22,7 @@ class ICurve ;
|
||||
class ICurveLine ;
|
||||
class ICurveArc ;
|
||||
class ICurveComposite ;
|
||||
class ISurfTriMesh ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class SawRoughing : public Machining
|
||||
@@ -84,19 +85,16 @@ class SawRoughing : public Machining
|
||||
bool GeneratePreView( int nPathId, const ICurve* pSect, const Frame3d& frSect, double dGuideLen,
|
||||
const Vector3d& vtGdDir, const BBox3d& b3Raw) ;
|
||||
bool CalculateSection( int nSectGrpId, ICurve*& pSect) ;
|
||||
bool TrimSection( ICurve* pCrv) ;
|
||||
bool CalculateGuideLine( int nGuideId, const BBox3d& b3Sect, Point3d& ptGdStart, Point3d& ptGdEnd, Vector3d& vtGdDir) ;
|
||||
bool AdaptGuideLineToRaw( Point3d& ptGdStart, Point3d& ptGdEnd, const Vector3d& vtGdDir, const BBox3d& b3Raw) const ;
|
||||
bool TrimSection( ICurve* pCrv) const ;
|
||||
bool CalculateGuideLine( int nGuideId, Point3d& ptGdStart, Point3d& ptGdEnd, Vector3d& vtGdDir) 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,
|
||||
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,
|
||||
const Vector3d& vtTool, const Vector3d& vtCorr, double dElev, bool bFirst, bool bLast,
|
||||
int& nCount, const BBox3d& b3Raw) ;
|
||||
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) ;
|
||||
int& nCount, const ISurfTriMesh* pStmRaw) ;
|
||||
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,
|
||||
double dSafeZ, double dElev, double dAppr) ;
|
||||
bool AddRetract( const Point3d& ptP, const Vector3d& vtCorr, double dSafeZ, double dElev, double dAppr) ;
|
||||
|
||||
+915
-1622
File diff suppressed because it is too large
Load Diff
+37
-48
@@ -25,6 +25,7 @@
|
||||
#include "/EgtDev/Include/EgtNumUtils.h"
|
||||
#include "/EgtDev/Include/EGkSurfLocal.h"
|
||||
|
||||
class ICurveLine ;
|
||||
class ICAvToolSurfTm ;
|
||||
class ISurfFlatRegion ;
|
||||
class ISurfTriMesh ;
|
||||
@@ -100,52 +101,57 @@ class SurfFinishing : public Machining
|
||||
|
||||
public :
|
||||
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 :
|
||||
bool MyApply( bool bRecalc, bool bPostApply) ;
|
||||
bool VerifyGeometry( SelData Id, int& nSubs) ;
|
||||
bool GetCurves( SelData Id, ICURVEPLIST& lstPC) ;
|
||||
bool Chain( int nGrpDestId) ;
|
||||
bool FlattenCurves( ICURVEPOVECTOR& vpCrv) const ;
|
||||
bool UpdateFrameAndToolDir( int nAuxId, bool& bRecalc) ;
|
||||
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,
|
||||
double dToolLen, double dToolDiam, double dToolCornRad,
|
||||
double dToolSideAng, double dToolMaxMat, double dMachOffsR,
|
||||
const SURFLOCALVECTOR& vSurfLoc, const SURFLOCALVECTOR& vSurfSuppLoc) ;
|
||||
bool EraseMaxDownSurf( const SURFLOCALVECTOR& vSurfLoc, const Frame3d& frSurf, const Vector3d& vtTool,
|
||||
double dDepth, ISurfFlatRegion* pSfrCnt) ;
|
||||
bool ProcessCrvCompo( int nPathId, int nPvId, int nClId) ;
|
||||
bool EraseMaxDownSurf( const SURFLOCALVECTOR& vSurfLoc, const Frame3d& frSurf, const Vector3d& vtMove,
|
||||
double dDepth, ISurfFlatRegion* pSfrCnt) const ;
|
||||
bool EraseMaxDownStartEndPolyLine( PolyLine& PL) const ;
|
||||
bool ProcessCrv( int nPathId, int nPvId, int nClId) ;
|
||||
bool ProcessSfr( int nPathId, int nPvId, int nClId) ;
|
||||
bool SimplifyCurve( ICurveComposite* pCompo, const Frame3d& frLocXY,
|
||||
double dMergeLinTol = 200. * EPS_SMALL, double dMergeAndTolDeg = 200. * EPS_ANG_SMALL,
|
||||
double dSmallDefLinTol = 150. * EPS_SMALL, double dSmallDefAngTolDeg = 2. * ANG_TOL_STD_DEG,
|
||||
double dArcApproxLinTol = 50. * EPS_SMALL, double dArcApproxAngTolDeg = ANG_TOL_STD_DEG) const ;
|
||||
bool CalcZConstProjectedLink( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frPocket,
|
||||
const Frame3d& frSurf, const Vector3d& vtTool, double dDepth,
|
||||
const Point3d ptStart_forced, const Point3d ptEnd_forced,
|
||||
ICurveComposite* pCrv) const ;
|
||||
bool CalcZConstLink( ICurveComposite* pCompoLink, const Point3d& ptStartLink, const Point3d& ptEndLink, ICAvToolSurfTm* pCAvTlStm,
|
||||
const Frame3d& frPocket, const Frame3d& frSurf, const Vector3d& vtTool, double dDepth,
|
||||
const CISURFTMPVECTOR& vpStm) const ;
|
||||
// lavorazioni per superfici
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
const ISurfFlatRegion* pSfrCnt, const Vector3d& vtTool, double dDepth, double dElev, bool bSplitArcs) ;
|
||||
bool AddOptimal( ICAvToolSurfTm* pCAvTlStm, const SURFLOCALVECTOR& vSrfLoc, const Frame3d& frSurf,
|
||||
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,
|
||||
const ISurfFlatRegion* pSfrCnt, const Vector3d& vtTool, double dDepth, double dElev, bool bSplitArcs) ;
|
||||
// lavorazioni per curve
|
||||
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
|
||||
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
|
||||
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) ;
|
||||
|
||||
bool WorkPencilCurves( const ICRVCOMPOPOVECTOR& vCrvCompo, const ISurfFlatRegion* pSfrCnt, int nPencilType, double dOffs, int nOffs,
|
||||
@@ -161,21 +167,11 @@ class SurfFinishing : public Machining
|
||||
bool GetSurfTriMeshFromOffset( const SURFLOCALVECTOR& vSrfLoc, double dOffs, double dLinTol, ISurfTriMesh* pStmOffs) const ;
|
||||
bool GetCurvesFromSurfTriMeshesOffset( const ISurfTriMesh * pStmOffs, double dBiTanAng, double dLinTol,
|
||||
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 GetSfrBySilhouette( ICAvParSilhouettesSurfTm* pCavParSilh, double dDepth, double dSilTolSamp,
|
||||
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 OrderOptimalPathsByDistance( const Point3d& ptRef, VECTORPATHS& vCrvPaths, bool bAllowInvert) const ;
|
||||
bool GetZConstQuotesInsideSfrParallelToTool( const SURFLOCALVECTOR&, const Frame3d& frSurf, const ISurfFlatRegion* pSfr,
|
||||
const Vector3d& vtTool, std::set<double>& setZAmbiguos) 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,
|
||||
const Frame3d& frSurf, const Vector3d& vtTool, double dAngDegSplit,
|
||||
double dAngDegTol, double dDepth, ICAvToolSurfTm* pCAvTlStm, VECTORPATHS& vPaths,
|
||||
@@ -184,12 +180,11 @@ class SurfFinishing : public Machining
|
||||
double dExtraCollOffs, ICurveComposite* pCompoSil, ISurfFlatRegion* pSfrZigZag) const ;
|
||||
bool CalcOptimalZigZagCurves( ISURFFRPOVECTOR& vSfrZigZagProj, const Frame3d& frSurf,
|
||||
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,
|
||||
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,
|
||||
const ISurfFlatRegion* pSfr, double dDepth, ICRVCOMPOPOVECTOR& vCrvPath) const ;
|
||||
bool CreateZConstPaths( ICAvToolSurfTm* pCAvTlStm, const CISURFTMPVECTOR& vpStm, const Frame3d& frSurf,
|
||||
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 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) ;
|
||||
@@ -198,30 +193,20 @@ class SurfFinishing : public Machining
|
||||
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 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,
|
||||
const Point3d& ptEnd, const Vector3d& vtInit, const Vector3d& vtTool,
|
||||
bool bLeadInVsOut, Point3d& ptP1) const ;
|
||||
bool GetLinkFromPaths( const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtTool, const ISurfFlatRegion* pSfrCnt,
|
||||
bool GetLastGoodPoint( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf, const Point3d& ptStart, const Point3d& ptEnd,
|
||||
const Vector3d& vtInit, const Vector3d& vtTool, const Vector3d& vtMove, bool bLeadInVsOut, Point3d& ptP1) const ;
|
||||
bool GetLinkFromPaths( const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtTool, const Vector3d& vtMove, const ISurfFlatRegion* pSfrCnt,
|
||||
double dDepth, double dSafeZ, ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf, ICurveComposite* pCrvLink) const ;
|
||||
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 ;
|
||||
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 CalcOptimalZigZagRegion( const ISurfFlatRegion* pSfrCntLoc, const ISurfFlatRegion* pSfrZLevelColl, const SURFLOCALVECTOR& vSrfLoc,
|
||||
const Frame3d& frSurf, const Vector3d& vtTool, double dDepth, double dSplitAngDeg, ISURFFRPOVECTOR& vpSfrZigZagProj) const ;
|
||||
bool CalcOptimalZigZagRegion( const ISurfFlatRegion* pSfrCntLoc, const ISurfFlatRegion* pSfrZLevelColl, ISURFFRPOVECTOR& vpSfrZigZagProj) const ;
|
||||
double GetRightFeed( const Vector3d& vtMove, const Vector3d& vtTool) const ;
|
||||
double GetRadiusForStartEndElevation( void) const ;
|
||||
double GetLocalSideAngle() const ;
|
||||
bool GetLocalToolDir( Vector3d& vtToolLoc) const ;
|
||||
int GetOptimalSubType() const ;
|
||||
|
||||
private :
|
||||
double GetSpeed() const
|
||||
@@ -238,6 +223,7 @@ class SurfFinishing : public Machining
|
||||
{ return ( IsUnknownValue( m_Params.m_dOffsR) ? m_TParams.m_dOffsR : m_Params.m_dOffsR) ; }
|
||||
double GetSideStep( void) const
|
||||
{ return Clamp( m_Params.m_dSideStep, 0.1, m_TParams.m_dTDiam) ; }
|
||||
|
||||
int GetLeadInType( void) const ;
|
||||
int GetLeadOutType( void) const ;
|
||||
|
||||
@@ -245,6 +231,9 @@ class SurfFinishing : public Machining
|
||||
SELVECTOR m_vId ; // identificativi entità geometriche da lavorare
|
||||
SurfFinishingData m_Params ; // parametri lavorazione
|
||||
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_dTHoldLen ; // lunghezza 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 ;
|
||||
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,
|
||||
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,
|
||||
false, 0., 0., false, vCrvPaths)) {
|
||||
if ( vStepInfo[nInd].bIsExtraStep) {
|
||||
|
||||
Reference in New Issue
Block a user