EgtMachKernel 1.6k10 :
- sistemazioni varie in grezzi, lavorazioni, ....
This commit is contained in:
@@ -68,36 +68,6 @@ MachMgr::GetNextPartInRawPart( int nId) const
|
||||
return m_pGeomDB->GetNextGroup( nId) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
MachMgr::AddPartToRawPart( int nPartId, int nRawId)
|
||||
{
|
||||
// verifica validità grezzo
|
||||
if ( ! VerifyRawPart( nRawId))
|
||||
return false ;
|
||||
// verifico che il pezzo non sia già usato nella macchinata corrente
|
||||
if ( m_pGeomDB->GetParentId( nPartId) != GDB_ID_ROOT)
|
||||
return false ;
|
||||
// recupero il riferimento del grezzo
|
||||
Frame3d frRaw ;
|
||||
m_pGeomDB->GetGroupGlobFrame( nRawId, frRaw) ;
|
||||
// determino il riferimento del pezzo rispetto al grezzo
|
||||
Frame3d frPart ;
|
||||
m_pGeomDB->GetGroupGlobFrame( nPartId, frPart) ;
|
||||
frPart.ToLoc( frRaw) ;
|
||||
// inserisco il pezzo
|
||||
int nGroup = m_pGeomDB->AddGroup( GDB_ID_NULL, nRawId, frPart) ;
|
||||
if ( nGroup == GDB_ID_NULL ||
|
||||
! m_pGeomDB->GroupSwap( nPartId, nGroup, true, true))
|
||||
return false ;
|
||||
// impongo il livello system al gruppo
|
||||
m_pGeomDB->SetLevel( nGroup, GDB_LV_SYSTEM) ;
|
||||
// mi assicuro sia visibile il pezzo e nascosto il gruppo
|
||||
m_pGeomDB->SetStatus( nPartId, GDB_ST_ON) ;
|
||||
m_pGeomDB->SetStatus( nGroup, GDB_ST_OFF) ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
MachMgr::AddPartToRawPart( int nPartId, const Point3d& ptPos, int nRawId)
|
||||
@@ -121,8 +91,6 @@ MachMgr::AddPartToRawPart( int nPartId, const Point3d& ptPos, int nRawId)
|
||||
// muovo riferimento del pezzo per posizionare correttamente nel grezzo
|
||||
Vector3d vtMove = ptPos - b3Part.GetMin() ;
|
||||
frPart.Translate( vtMove) ;
|
||||
// esprimo questo riferimento rispetto al grezzo
|
||||
frPart.ToLoc( frRaw) ;
|
||||
// inserisco il pezzo
|
||||
int nGroup = m_pGeomDB->AddGroup( GDB_ID_NULL, nRawId, frPart) ;
|
||||
if ( nGroup == GDB_ID_NULL ||
|
||||
|
||||
Reference in New Issue
Block a user