EgtMachKernel 1.6n5 :
- in simulazione aggiunta breve pausa al cambio fase - aggiunta gestione fase per recupero info grezzi in lavorazione (elevazione, rawbotto,...).
This commit is contained in:
+1
-1
@@ -1040,7 +1040,7 @@ Drilling::GetHoleData( SelData Id, Hole& hole)
|
||||
Vector3d vtExtrG = vtExtr ;
|
||||
vtExtrG.ToGlob( frGlob) ;
|
||||
if ( vtExtrG.IsZplus())
|
||||
GetDistanceFromRawBottom( Id.nId, EPS_SMALL, dRbDist) ;
|
||||
GetDistanceFromRawBottom( m_nPhase, Id.nId, EPS_SMALL, dRbDist) ;
|
||||
// valuto l'espressione dell'affondamento
|
||||
ExeLuaSetGlobNumVar( "TH", - dThick) ;
|
||||
ExeLuaSetGlobNumVar( "RB", dRbDist) ;
|
||||
|
||||
Binary file not shown.
+119
-105
@@ -74,7 +74,7 @@ Machining::Machining( void)
|
||||
//----------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Machining::GetElevation( const Point3d& ptP, const Vector3d& vtDir, double& dElev)
|
||||
Machining::GetElevation( int nPhase, const Point3d& ptP, const Vector3d& vtDir, double& dElev)
|
||||
{
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
@@ -84,111 +84,40 @@ Machining::GetElevation( const Point3d& ptP, const Vector3d& vtDir, double& dEle
|
||||
bool bFound = false ;
|
||||
int nRawId = m_pMchMgr->GetFirstRawPart() ;
|
||||
while ( nRawId != GDB_ID_NULL) {
|
||||
// intersezione del raggio dal punto alla trimesh del grezzo
|
||||
const double RAY_LEN = 10000 ;
|
||||
int nStmId = m_pGeomDB->GetFirstNameInGroup( nRawId, MACH_RAW_SOLID) ;
|
||||
ISurfTriMesh* pStm = GetSurfTriMesh( m_pGeomDB->GetGeoObj( nStmId)) ;
|
||||
if ( pStm != nullptr) {
|
||||
bFound = true ;
|
||||
// recupero il riferimento della trimesh
|
||||
Frame3d frStm ;
|
||||
m_pGeomDB->GetGlobFrame( nStmId, frStm) ;
|
||||
// porto il raggio in questo riferimento
|
||||
Point3d ptPL = ptP ;
|
||||
ptPL.ToLoc( frStm) ;
|
||||
Vector3d vtDirL = vtDir ;
|
||||
vtDirL.ToLoc( frStm) ;
|
||||
ILSIVECTOR vInfo ;
|
||||
if ( IntersLineSurfTm( ptPL, vtDirL, RAY_LEN, *pStm, vInfo)) {
|
||||
for ( const auto& Info : vInfo) {
|
||||
// se tratto di intersezione coincidente, considero la posizione più lontana, ovvero 2
|
||||
if ( Info.nILTT == ILTT_SEGM || Info.nILTT == ILTT_SEGM_ON_EDGE) {
|
||||
// se prosegue un tratto precedente, non devo controllare sia minimo
|
||||
if ( fabs( dElev - Info.dU) < EPS_SMALL)
|
||||
dElev = Info.dU2 ;
|
||||
else
|
||||
dElev = min( dElev, Info.dU2) ;
|
||||
}
|
||||
// altrimenti intersezione puntuale, verifico che esca (coseno >= 0)
|
||||
else if ( Info.dCosDN > - COS_ORTO_ANG_ZERO) {
|
||||
dElev = min( dElev, Info.dU) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// passo al grezzo successivo
|
||||
nRawId = m_pMchMgr->GetNextRawPart( nRawId) ;
|
||||
}
|
||||
// se non trovate intersezioni, elevazione nulla
|
||||
if ( dElev > INFINITO - 1)
|
||||
dElev = 0 ;
|
||||
return bFound ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Machining::GetElevation( const Point3d& ptP1, const Point3d& ptP2, const Vector3d& vtDir, double& dElev)
|
||||
{
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
// inizializzo elevazione
|
||||
dElev = INFINITO ;
|
||||
// ciclo sui grezzi
|
||||
bool bFound = false ;
|
||||
int nRawId = m_pMchMgr->GetFirstRawPart() ;
|
||||
while ( nRawId != GDB_ID_NULL) {
|
||||
// intersezione del raggio dal punto alla trimesh del grezzo
|
||||
const double RAY_LEN = 10000 ;
|
||||
int nStmId = m_pGeomDB->GetFirstNameInGroup( nRawId, MACH_RAW_SOLID) ;
|
||||
ISurfTriMesh* pStm = GetSurfTriMesh( m_pGeomDB->GetGeoObj( nStmId)) ;
|
||||
if ( pStm != nullptr) {
|
||||
bFound = true ;
|
||||
// recupero il riferimento della trimesh
|
||||
Frame3d frStm ;
|
||||
m_pGeomDB->GetGlobFrame( nStmId, frStm) ;
|
||||
// porto il segmento e la direzione in questo riferimento
|
||||
Point3d ptP1L = ptP1 ;
|
||||
ptP1L.ToLoc( frStm) ;
|
||||
Point3d ptP2L = ptP2 ;
|
||||
ptP2L.ToLoc( frStm) ;
|
||||
Vector3d vtDirL = vtDir ;
|
||||
vtDirL.ToLoc( frStm) ;
|
||||
ILSIVECTOR vInfo ;
|
||||
// inizializzo elevazione della superficie
|
||||
double dElevS = 0 ;
|
||||
// faccio test con un insieme di punti ( !!! sostituire con intersezione tra rettangolo e trimesh !!!)
|
||||
const double STEP = 50 ;
|
||||
int nStep = max( (int) ceil( ApproxDist( ptP1L, ptP2L) / STEP), 3) ;
|
||||
for ( int i = 0 ; i <= nStep ; ++ i) {
|
||||
// calcolo punto di test
|
||||
double dFraz = i / (double) nStep ;
|
||||
Point3d ptPL = Media( ptP1L, ptP2L, dFraz) ;
|
||||
// inizializzo elevazione del punto
|
||||
double dElevP = INFINITO ;
|
||||
// calcolo elevazione sul punto
|
||||
// verifico che il grezzo compaia nella fase
|
||||
if ( m_pMchMgr->VerifyRawPartPhase( nRawId, nPhase)) {
|
||||
// intersezione del raggio dal punto alla trimesh del grezzo
|
||||
const double RAY_LEN = 10000 ;
|
||||
int nStmId = m_pGeomDB->GetFirstNameInGroup( nRawId, MACH_RAW_SOLID) ;
|
||||
ISurfTriMesh* pStm = GetSurfTriMesh( m_pGeomDB->GetGeoObj( nStmId)) ;
|
||||
if ( pStm != nullptr) {
|
||||
bFound = true ;
|
||||
// recupero il riferimento della trimesh
|
||||
Frame3d frStm ;
|
||||
m_pGeomDB->GetGlobFrame( nStmId, frStm) ;
|
||||
// porto il raggio in questo riferimento
|
||||
Point3d ptPL = ptP ;
|
||||
ptPL.ToLoc( frStm) ;
|
||||
Vector3d vtDirL = vtDir ;
|
||||
vtDirL.ToLoc( frStm) ;
|
||||
ILSIVECTOR vInfo ;
|
||||
if ( IntersLineSurfTm( ptPL, vtDirL, RAY_LEN, *pStm, vInfo)) {
|
||||
for ( const auto& Info : vInfo) {
|
||||
// se tratto di intersezione coincidente, considero la posizione più lontana, ovvero 2
|
||||
if ( Info.nILTT == ILTT_SEGM || Info.nILTT == ILTT_SEGM_ON_EDGE) {
|
||||
// se prosegue un tratto precedente, non devo controllare sia minimo
|
||||
if ( fabs( dElevP - Info.dU) < EPS_SMALL)
|
||||
dElevP = Info.dU2 ;
|
||||
if ( fabs( dElev - Info.dU) < EPS_SMALL)
|
||||
dElev = Info.dU2 ;
|
||||
else
|
||||
dElevP = min( dElevP, Info.dU2) ;
|
||||
dElev = min( dElev, Info.dU2) ;
|
||||
}
|
||||
// altrimenti intersezione puntuale, verifico che esca (coseno >= 0)
|
||||
else if ( Info.dCosDN > - COS_ORTO_ANG_ZERO) {
|
||||
dElevP = min( dElevP, Info.dU) ;
|
||||
dElev = min( dElev, Info.dU) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
// se elevazione calcolata, aggiorno quella della superficie
|
||||
if ( dElevP < INFINITO - 1)
|
||||
dElevS = max( dElevS, dElevP) ;
|
||||
}
|
||||
// aggiorno elevazione complessiva
|
||||
if ( dElevS > 0)
|
||||
dElev = min( dElev, dElevS) ;
|
||||
}
|
||||
// passo al grezzo successivo
|
||||
nRawId = m_pMchMgr->GetNextRawPart( nRawId) ;
|
||||
@@ -201,7 +130,84 @@ Machining::GetElevation( const Point3d& ptP1, const Point3d& ptP2, const Vector3
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Machining::GetDistanceFromRawSide( const Point3d& ptP, const Vector3d& vtDir, double& dDist)
|
||||
Machining::GetElevation( int nPhase, const Point3d& ptP1, const Point3d& ptP2, const Vector3d& vtDir, double& dElev)
|
||||
{
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
// inizializzo elevazione
|
||||
dElev = INFINITO ;
|
||||
// ciclo sui grezzi
|
||||
bool bFound = false ;
|
||||
int nRawId = m_pMchMgr->GetFirstRawPart() ;
|
||||
while ( nRawId != GDB_ID_NULL) {
|
||||
// verifico che il grezzo compaia nella fase
|
||||
if ( m_pMchMgr->VerifyRawPartPhase( nRawId, nPhase)) {
|
||||
// intersezione del raggio dal punto alla trimesh del grezzo
|
||||
const double RAY_LEN = 10000 ;
|
||||
int nStmId = m_pGeomDB->GetFirstNameInGroup( nRawId, MACH_RAW_SOLID) ;
|
||||
ISurfTriMesh* pStm = GetSurfTriMesh( m_pGeomDB->GetGeoObj( nStmId)) ;
|
||||
if ( pStm != nullptr) {
|
||||
bFound = true ;
|
||||
// recupero il riferimento della trimesh
|
||||
Frame3d frStm ;
|
||||
m_pGeomDB->GetGlobFrame( nStmId, frStm) ;
|
||||
// porto il segmento e la direzione in questo riferimento
|
||||
Point3d ptP1L = ptP1 ;
|
||||
ptP1L.ToLoc( frStm) ;
|
||||
Point3d ptP2L = ptP2 ;
|
||||
ptP2L.ToLoc( frStm) ;
|
||||
Vector3d vtDirL = vtDir ;
|
||||
vtDirL.ToLoc( frStm) ;
|
||||
ILSIVECTOR vInfo ;
|
||||
// inizializzo elevazione della superficie
|
||||
double dElevS = 0 ;
|
||||
// faccio test con un insieme di punti ( !!! sostituire con intersezione tra rettangolo e trimesh !!!)
|
||||
const double STEP = 50 ;
|
||||
int nStep = max( (int) ceil( ApproxDist( ptP1L, ptP2L) / STEP), 3) ;
|
||||
for ( int i = 0 ; i <= nStep ; ++ i) {
|
||||
// calcolo punto di test
|
||||
double dFraz = i / (double) nStep ;
|
||||
Point3d ptPL = Media( ptP1L, ptP2L, dFraz) ;
|
||||
// inizializzo elevazione del punto
|
||||
double dElevP = INFINITO ;
|
||||
// calcolo elevazione sul punto
|
||||
if ( IntersLineSurfTm( ptPL, vtDirL, RAY_LEN, *pStm, vInfo)) {
|
||||
for ( const auto& Info : vInfo) {
|
||||
// se tratto di intersezione coincidente, considero la posizione più lontana, ovvero 2
|
||||
if ( Info.nILTT == ILTT_SEGM || Info.nILTT == ILTT_SEGM_ON_EDGE) {
|
||||
// se prosegue un tratto precedente, non devo controllare sia minimo
|
||||
if ( fabs( dElevP - Info.dU) < EPS_SMALL)
|
||||
dElevP = Info.dU2 ;
|
||||
else
|
||||
dElevP = min( dElevP, Info.dU2) ;
|
||||
}
|
||||
// altrimenti intersezione puntuale, verifico che esca (coseno >= 0)
|
||||
else if ( Info.dCosDN > - COS_ORTO_ANG_ZERO) {
|
||||
dElevP = min( dElevP, Info.dU) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
// se elevazione calcolata, aggiorno quella della superficie
|
||||
if ( dElevP < INFINITO - 1)
|
||||
dElevS = max( dElevS, dElevP) ;
|
||||
}
|
||||
// aggiorno elevazione complessiva
|
||||
if ( dElevS > 0)
|
||||
dElev = min( dElev, dElevS) ;
|
||||
}
|
||||
}
|
||||
// passo al grezzo successivo
|
||||
nRawId = m_pMchMgr->GetNextRawPart( nRawId) ;
|
||||
}
|
||||
// se non trovate intersezioni, elevazione nulla
|
||||
if ( dElev > INFINITO - 1)
|
||||
dElev = 0 ;
|
||||
return bFound ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Machining::GetDistanceFromRawSide( int nPhase, const Point3d& ptP, const Vector3d& vtDir, double& dDist)
|
||||
{
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
@@ -210,11 +216,15 @@ Machining::GetDistanceFromRawSide( const Point3d& ptP, const Vector3d& vtDir, do
|
||||
b3Pnt.Expand( 10, 10, 0) ;
|
||||
int nRawId = m_pMchMgr->GetFirstRawPart() ;
|
||||
while ( nRawId != GDB_ID_NULL) {
|
||||
BBox3d b3Raw ;
|
||||
int nRawSolidId = m_pGeomDB->GetFirstNameInGroup( nRawId, MACH_RAW_SOLID) ;
|
||||
if ( m_pGeomDB->GetGlobalBBox( nRawSolidId, b3Raw) && b3Pnt.OverlapsXY( b3Raw)) {
|
||||
break ;
|
||||
// verifico che il grezzo compaia nella fase
|
||||
if ( m_pMchMgr->VerifyRawPartPhase( nRawId, nPhase)) {
|
||||
BBox3d b3Raw ;
|
||||
int nRawSolidId = m_pGeomDB->GetFirstNameInGroup( nRawId, MACH_RAW_SOLID) ;
|
||||
if ( m_pGeomDB->GetGlobalBBox( nRawSolidId, b3Raw) && b3Pnt.OverlapsXY( b3Raw)) {
|
||||
break ;
|
||||
}
|
||||
}
|
||||
// passo al grezzo successivo
|
||||
nRawId = m_pMchMgr->GetNextRawPart( nRawId) ;
|
||||
}
|
||||
// se il punto non è interno ad alcun grezzo, distanza nulla
|
||||
@@ -249,7 +259,7 @@ Machining::GetDistanceFromRawSide( const Point3d& ptP, const Vector3d& vtDir, do
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Machining::GetDistanceFromRawBottom( int nPathId, double dToler, double& dRbDist)
|
||||
Machining::GetDistanceFromRawBottom( int nPhase, int nPathId, double dToler, double& dRbDist)
|
||||
{
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
@@ -261,13 +271,17 @@ Machining::GetDistanceFromRawBottom( int nPathId, double dToler, double& dRbDist
|
||||
b3Compo.Expand( dToler, dToler, 0) ;
|
||||
int nRawId = m_pMchMgr->GetFirstRawPart() ;
|
||||
while ( nRawId != GDB_ID_NULL) {
|
||||
BBox3d b3Raw ;
|
||||
int nRawSolidId = m_pGeomDB->GetFirstNameInGroup( nRawId, MACH_RAW_SOLID) ;
|
||||
if ( m_pGeomDB->GetGlobalBBox( nRawSolidId, b3Raw) && b3Compo.OverlapsXY( b3Raw)) {
|
||||
double dDist = b3Compo.GetMax().z - b3Raw.GetMin().z ;
|
||||
if ( dDist > dRbDist)
|
||||
dRbDist = dDist ;
|
||||
// verifico che il grezzo compaia nella fase
|
||||
if ( m_pMchMgr->VerifyRawPartPhase( nRawId, nPhase)) {
|
||||
BBox3d b3Raw ;
|
||||
int nRawSolidId = m_pGeomDB->GetFirstNameInGroup( nRawId, MACH_RAW_SOLID) ;
|
||||
if ( m_pGeomDB->GetGlobalBBox( nRawSolidId, b3Raw) && b3Compo.OverlapsXY( b3Raw)) {
|
||||
double dDist = b3Compo.GetMax().z - b3Raw.GetMin().z ;
|
||||
if ( dDist > dRbDist)
|
||||
dRbDist = dDist ;
|
||||
}
|
||||
}
|
||||
// passo al grezzo successivo
|
||||
nRawId = m_pMchMgr->GetNextRawPart( nRawId) ;
|
||||
}
|
||||
return true ;
|
||||
|
||||
+4
-4
@@ -58,10 +58,10 @@ class Machining : public IUserObj
|
||||
Machining( void) ;
|
||||
|
||||
protected :
|
||||
bool GetElevation( const Point3d& ptP, const Vector3d& vtDir, double& dElev) ;
|
||||
bool GetElevation( const Point3d& ptP1, const Point3d& ptP2, const Vector3d& vtDir, double& dElev) ;
|
||||
bool GetDistanceFromRawSide( const Point3d& ptP, const Vector3d& vtDir, double& dDist) ;
|
||||
bool GetDistanceFromRawBottom( int nPathId, double dToler, double& dRbDist) ;
|
||||
bool GetElevation( int nPhase, const Point3d& ptP, const Vector3d& vtDir, double& dElev) ;
|
||||
bool GetElevation( int nPhase, const Point3d& ptP1, const Point3d& ptP2, const Vector3d& vtDir, double& dElev) ;
|
||||
bool GetDistanceFromRawSide( int nPhase, const Point3d& ptP, const Vector3d& vtDir, double& dDist) ;
|
||||
bool GetDistanceFromRawBottom( int nPhase, int nPathId, double dToler, double& dRbDist) ;
|
||||
bool GetInitialAxesValues( DBLVECTOR& vAxVal) ;
|
||||
bool GetClPathInitialAxesValues( int nClPathId, DBLVECTOR& vAxVal) ;
|
||||
bool GetFinalAxesValues( DBLVECTOR& vAxVal) ;
|
||||
|
||||
+13
-13
@@ -969,7 +969,7 @@ Sawing::ProcessPath( int nPathId, int nPvId, int nClId)
|
||||
|
||||
// recupero distanza da fondo dei grezzi interessati dal percorso
|
||||
double dRbDist ;
|
||||
if ( ! GetDistanceFromRawBottom( nCopyId, 2 * m_TParams.m_dThick, dRbDist))
|
||||
if ( ! GetDistanceFromRawBottom( m_nPhase, nCopyId, 2 * m_TParams.m_dThick, dRbDist))
|
||||
return false ;
|
||||
|
||||
// valuto l'espressione dell'affondamento
|
||||
@@ -1051,8 +1051,8 @@ Sawing::ProcessEntity( const ICurve* pCrvP, const ICurve* pCrvC, const ICurve* p
|
||||
// calcolo elevazione (sui due bordi della striscia
|
||||
double dElev, dElev2 ;
|
||||
Vector3d vtThick = vtTool * m_TParams.m_dThick ;
|
||||
if ( ! GetElevation( pLine->GetStart(), pLine->GetEnd(), vtCorr, dElev) ||
|
||||
! GetElevation( pLine->GetStart() + vtThick, pLine->GetEnd() + vtThick, vtCorr, dElev2) ) {
|
||||
if ( ! GetElevation( m_nPhase, pLine->GetStart(), pLine->GetEnd(), vtCorr, dElev) ||
|
||||
! GetElevation( m_nPhase, pLine->GetStart() + vtThick, pLine->GetEnd() + vtThick, vtCorr, dElev2) ) {
|
||||
LOG_INFO( GetEMkLogger(), "Error in Sawing : Entity GetElevation") ;
|
||||
return false ;
|
||||
}
|
||||
@@ -1456,8 +1456,8 @@ Sawing::AdjustForEdges( ICurveLine* pLine, double dElev, const Vector3d& vtThick
|
||||
pLine->GetStartDir( vtDir) ;
|
||||
// determino la distanza dal bordo del grezzo
|
||||
double dDist = 0, dDist2 = 0 ;
|
||||
if ( ! GetDistanceFromRawSide( ptP, - vtDir, dDist) &&
|
||||
! GetDistanceFromRawSide( ptP + vtThick, - vtDir, dDist2))
|
||||
if ( ! GetDistanceFromRawSide( m_nPhase, ptP, - vtDir, dDist) &&
|
||||
! GetDistanceFromRawSide( m_nPhase, ptP + vtThick, - vtDir, dDist2))
|
||||
return false ;
|
||||
dDeltaI = max( dDist, dDist2) ;
|
||||
}
|
||||
@@ -1470,8 +1470,8 @@ Sawing::AdjustForEdges( ICurveLine* pLine, double dElev, const Vector3d& vtThick
|
||||
pLine->GetStartDir( vtDir) ;
|
||||
// determino la distanza dal bordo del grezzo
|
||||
double dDist = 0, dDist2 = 0 ;
|
||||
if ( ! GetDistanceFromRawSide( ptP, - vtDir, dDist) ||
|
||||
! GetDistanceFromRawSide( ptP + vtThick, - vtDir, dDist2))
|
||||
if ( ! GetDistanceFromRawSide( m_nPhase, ptP, - vtDir, dDist) ||
|
||||
! GetDistanceFromRawSide( m_nPhase, ptP + vtThick, - vtDir, dDist2))
|
||||
return false ;
|
||||
dDeltaI = max( dDist, dDist2) + dDeltaT ;
|
||||
}
|
||||
@@ -1487,8 +1487,8 @@ Sawing::AdjustForEdges( ICurveLine* pLine, double dElev, const Vector3d& vtThick
|
||||
pLine->GetStartDir( vtDir) ;
|
||||
// determino la distanza dal bordo del grezzo
|
||||
double dDist = 0, dDist2 = 0 ;
|
||||
if ( ! GetDistanceFromRawSide( ptP, - vtDir, dDist) ||
|
||||
! GetDistanceFromRawSide( ptP + vtThick, - vtDir, dDist2))
|
||||
if ( ! GetDistanceFromRawSide( m_nPhase, ptP, - vtDir, dDist) ||
|
||||
! GetDistanceFromRawSide( m_nPhase, ptP + vtThick, - vtDir, dDist2))
|
||||
return false ;
|
||||
dDeltaI = max( dDist, dDist2) ;
|
||||
// se LeadIn EXT_OUT vado all'esterno
|
||||
@@ -1512,8 +1512,8 @@ Sawing::AdjustForEdges( ICurveLine* pLine, double dElev, const Vector3d& vtThick
|
||||
pLine->GetEndDir( vtDir) ;
|
||||
// determino la distanza dal bordo del grezzo
|
||||
double dDist = 0, dDist2 = 0 ;
|
||||
if ( ! GetDistanceFromRawSide( ptP, vtDir, dDist) ||
|
||||
! GetDistanceFromRawSide( ptP + vtThick, vtDir, dDist2))
|
||||
if ( ! GetDistanceFromRawSide( m_nPhase, ptP, vtDir, dDist) ||
|
||||
! GetDistanceFromRawSide( m_nPhase, ptP + vtThick, vtDir, dDist2))
|
||||
return false ;
|
||||
dDeltaF = max( dDist, dDist2) ;
|
||||
}
|
||||
@@ -1529,8 +1529,8 @@ Sawing::AdjustForEdges( ICurveLine* pLine, double dElev, const Vector3d& vtThick
|
||||
pLine->GetEndDir( vtDir) ;
|
||||
// determino la distanza dal bordo del grezzo
|
||||
double dDist = 0, dDist2 = 0 ;
|
||||
if ( ! GetDistanceFromRawSide( ptP, vtDir, dDist) ||
|
||||
! GetDistanceFromRawSide( ptP + vtThick, vtDir, dDist2))
|
||||
if ( ! GetDistanceFromRawSide( m_nPhase, ptP, vtDir, dDist) ||
|
||||
! GetDistanceFromRawSide( m_nPhase, ptP + vtThick, vtDir, dDist2))
|
||||
return false ;
|
||||
dDeltaF = max( dDist, dDist2) ;
|
||||
}
|
||||
|
||||
+6
-1
@@ -133,8 +133,13 @@ Simulator::Move( int& nStatus)
|
||||
// se non è una lavorazione, verifico se disposizione con cambio di fase
|
||||
if ( pMch == nullptr) {
|
||||
Disposition* pDisp = GetDisposition( m_pGeomDB->GetUserObj( m_nOpId)) ;
|
||||
if ( pDisp != nullptr)
|
||||
if ( pDisp != nullptr) {
|
||||
// cambio fase
|
||||
m_pMchMgr->SetCurrPhase( pDisp->GetPhase()) ;
|
||||
// aggiorno visualizzazione e breve pausa (200 ms)
|
||||
ExeDraw() ;
|
||||
Sleep( 200) ;
|
||||
}
|
||||
}
|
||||
// lavorazione valida
|
||||
else if ( ! pMch->IsEmpty())
|
||||
|
||||
Reference in New Issue
Block a user