EgtMachKernel :

- ritorno a stato pre svuotature con isole.
This commit is contained in:
DarioS
2023-01-23 17:26:31 +01:00
parent bca5dbb6dd
commit 4e8953e864
4 changed files with 1517 additions and 4118 deletions
+9 -21
View File
@@ -637,38 +637,26 @@ Operation::GetMinDistanceFromRawSide( int nPhase, const Point3d& ptP, double dEx
//----------------------------------------------------------------------------
bool
Operation::GetDistanceFromRawBottom(int nPhase, int nPathId, double dToler, double& dRbDist, double& dAllRbDist) const
Operation::GetDistanceFromRawBottom( int nPhase, int nPathId, double dToler, double& dRbDist, double& dAllRbDist) const
{
if (m_pMchMgr == nullptr || m_pGeomDB == nullptr)
return false;
// ricerco grezzi interessati dal percorso
BBox3d b3Compo;
if (!m_pGeomDB->GetGlobalBBox(nPathId, b3Compo))
return false;
return GetDistanceFromRawBottom(nPhase, b3Compo, dToler, dRbDist, dAllRbDist);
}
//----------------------------------------------------------------------------
bool
Operation::GetDistanceFromRawBottom(int nPhase, BBox3d& b3Test, double dToler, double& dRbDist, double& dAllRbDist) const
{
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
return false ;
// recupero distanza da fondo dei grezzi interessati o no dal percorso
dRbDist = 0 ;
dAllRbDist = 0 ;
b3Test.Expand(dToler, dToler, 0) ;
BBox3d b3Compo ;
if ( ! m_pGeomDB->GetGlobalBBox( nPathId, b3Compo))
return false ;
b3Compo.Expand( dToler, dToler, 0) ;
int nRawId = m_pMchMgr->GetFirstRawPart() ;
while ( nRawId != GDB_ID_NULL) {
// 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)) {
double dDist = b3Test.GetMax().z - b3Raw.GetMin().z ;
if ( b3Test.OverlapsXY( b3Raw) && dDist > dRbDist)
if ( m_pGeomDB->GetGlobalBBox( nRawSolidId, b3Raw)) {
double dDist = b3Compo.GetMax().z - b3Raw.GetMin().z ;
if ( b3Compo.OverlapsXY( b3Raw) && dDist > dRbDist)
dRbDist = dDist ;
if ( dDist > dAllRbDist)
dAllRbDist = dDist ;