EgtGeomKernel 1.6v5 :
- inseriti aggiornamenti per Zmap.
This commit is contained in:
+92
-2
@@ -2592,6 +2592,12 @@ GdbExecutor::ExecuteVolZmap(const string& sCmd2, const STRVECTOR& vsParams)
|
||||
else if ( sCmd2 == "SETSTD") {
|
||||
return VolZmapSetStdTool( vsParams) ;
|
||||
}
|
||||
else if ( sCmd2 == "MEASURE") {
|
||||
return VolZmapDeepnessMeasure( vsParams) ;
|
||||
}
|
||||
else if ( sCmd2 == "ZBOXINT") {
|
||||
return VolZmapBBoxZmapIntersection( vsParams) ;
|
||||
}
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -2702,8 +2708,8 @@ GdbExecutor::VolZmapIntervalsAddiction( const STRVECTOR& vsParams)
|
||||
bool
|
||||
GdbExecutor::VolZmapMilling( const STRVECTOR& vsParams)
|
||||
{
|
||||
// parametri : Id, IdParent, ptPs, ptPe, vtVs, vtVe
|
||||
if ( vsParams.size() != 6)
|
||||
// parametri : Id, IdParent, ptPs, ptPe, vtVs, vtVe, dLinTol, dAngTolDeg (gli ultimi due servono per lavorazione con utensile generico)
|
||||
if ( vsParams.size() != 8)
|
||||
return false ;
|
||||
// recupero il riferimento in cui è immerso
|
||||
Frame3d frRef ;
|
||||
@@ -2725,12 +2731,20 @@ GdbExecutor::VolZmapMilling( const STRVECTOR& vsParams)
|
||||
Vector3d vtDe ;
|
||||
if ( ! GetVectorParam( vsParams[5], frRef, vtDe))
|
||||
return false ;
|
||||
// recupero la tolleranza lineare
|
||||
double dLinTol ;
|
||||
if ( ! FromString( vsParams[6], dLinTol))
|
||||
return false ;
|
||||
double dAngTolDeg ;
|
||||
if ( ! FromString( vsParams[7], dAngTolDeg))
|
||||
return false ;
|
||||
// recupero lo Zmap
|
||||
int nIdZmap = GetIdParam( vsParams[0]) ;
|
||||
VolZmap* pZmap = GetBasicVolZmap( m_pGDB->GetGeoObj( nIdZmap)) ;
|
||||
if ( pZmap == nullptr)
|
||||
return false ;
|
||||
// eseguo la lavorazione
|
||||
pZmap->SetTolerances( dLinTol, dAngTolDeg) ;
|
||||
return pZmap->MillingStep( ptPs, ptPe, vtDs, vtDe) ;
|
||||
}
|
||||
|
||||
@@ -2802,6 +2816,82 @@ GdbExecutor::VolZmapSetStdTool( const STRVECTOR& vsParams)
|
||||
return pZmap->SetStdTool( sToolName, nToolType, dH, dTH, dR, dTR, dRc) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool GdbExecutor::VolZmapDeepnessMeasure( const STRVECTOR& vsParams) {
|
||||
|
||||
// parametri : ZmapId, frRef, ptP, vtV
|
||||
if ( vsParams.size() != 4)
|
||||
return false ;
|
||||
// recupero lo Zmap
|
||||
int nZmapId = GetIdParam( vsParams[0]) ;
|
||||
VolZmap* pZmap = GetBasicVolZmap( m_pGDB->GetGeoObj( nZmapId)) ;
|
||||
if ( pZmap == nullptr)
|
||||
return false ;
|
||||
// recupero il riferimento in cui è immerso lo Zmap
|
||||
Frame3d frRef ;
|
||||
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
|
||||
return false ;
|
||||
// recupero punto iniziale
|
||||
Point3d ptP ;
|
||||
if ( ! GetPointParam( vsParams[2], frRef, ptP))
|
||||
return false ;
|
||||
// recupero il vettore direzione
|
||||
Vector3d vtDir ;
|
||||
if ( ! GetVectorParam( vsParams[3], frRef, vtDir))
|
||||
return false ;
|
||||
|
||||
double dIn, dOut ;
|
||||
|
||||
pZmap -> Deepness( ptP, vtDir, dIn, dOut) ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbExecutor::VolZmapBBoxZmapIntersection( const STRVECTOR& vsParams)
|
||||
{
|
||||
// parametri : ZmapId, frRef, BBoxOrig, vtV1, vtV2, ptEnd
|
||||
if ( vsParams.size() != 6)
|
||||
return false ;
|
||||
// recupero lo Zmap
|
||||
int nZmapId = GetIdParam( vsParams[0]) ;
|
||||
VolZmap* pZmap = GetBasicVolZmap( m_pGDB->GetGeoObj( nZmapId)) ;
|
||||
if ( pZmap == nullptr)
|
||||
return false ;
|
||||
// recupero il riferimento in cui è immerso lo Zmap
|
||||
Frame3d frRef ;
|
||||
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
|
||||
return false ;
|
||||
// definisco il riferimento del bbox
|
||||
Point3d pt0 ;
|
||||
if ( ! GetPointParam( vsParams[2], frRef, pt0))
|
||||
return false ;
|
||||
// primo vettore frBBoxFrame
|
||||
Vector3d vtV1 ;
|
||||
if ( ! GetVectorParam( vsParams[3], frRef, vtV1))
|
||||
return false ;
|
||||
vtV1.Normalize() ;
|
||||
// secondo vettore frBBoxFrame
|
||||
Vector3d vtV2 ;
|
||||
if ( ! GetVectorParam( vsParams[4], frRef, vtV2))
|
||||
return false ;
|
||||
vtV2.Normalize() ;
|
||||
// Determino il terzo vettore della terna destrorsa
|
||||
Vector3d vtV3 = vtV1 ^ vtV2 ;
|
||||
// Definisco il sistema di riferimento del BBox
|
||||
Frame3d frBBoxFrame ; frBBoxFrame.Set( pt0, vtV1, vtV2, vtV3) ;
|
||||
// recupero il punto estremo
|
||||
Point3d ptEnd ;
|
||||
if ( ! GetPointParam( vsParams[5], frBBoxFrame, ptEnd))
|
||||
return false ;
|
||||
bool bInt ;
|
||||
|
||||
bInt = pZmap -> BBoxZmapIntersection( frBBoxFrame, ptEnd) ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbExecutor::ExecuteText( const string& sCmd2, const STRVECTOR& vsParams)
|
||||
|
||||
Reference in New Issue
Block a user