EgtGeomKernel :
- aggiunta creazione solidi Zmap per estrusione di regione.
This commit is contained in:
@@ -2583,21 +2583,30 @@ GdbExecutor::ExecuteVolZmap(const string& sCmd2, const STRVECTOR& vsParams)
|
||||
else if ( sCmd2 == "ADD") {
|
||||
return VolZmapIntervalsAddiction( vsParams) ;
|
||||
}
|
||||
// se lavorazione
|
||||
else if ( sCmd2 == "MIL") {
|
||||
return VolZmapMilling( vsParams) ;
|
||||
}
|
||||
// se settaggio utensile generico
|
||||
else if ( sCmd2 == "SET") {
|
||||
return VolZmapSetGenTool( vsParams) ;
|
||||
}
|
||||
// se settagggio utensile di tipo predefinito
|
||||
else if ( sCmd2 == "SETSTD") {
|
||||
return VolZmapSetAdvTool( vsParams) ;
|
||||
}
|
||||
// se misuro materiale
|
||||
else if ( sCmd2 == "MEASURE") {
|
||||
return VolZmapDeepnessMeasure( vsParams) ;
|
||||
}
|
||||
// se intersezione BBox con Zmap aggiornato
|
||||
else if ( sCmd2 == "ZBOXINT") {
|
||||
return VolZmapBBoxZmapIntersection( vsParams) ;
|
||||
}
|
||||
// se creazione zmap da flatregion
|
||||
else if ( sCmd2 == "FLATZMAP") {
|
||||
return VolZmapCreateFromFlatRegion( vsParams) ;
|
||||
}
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -2640,6 +2649,39 @@ GdbExecutor::VolZmapCreate( const STRVECTOR& vsParams)
|
||||
return AddGeoObj(vsParams[0], vsParams[1], Release( pZprova)) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbExecutor::VolZmapCreateFromFlatRegion( const STRVECTOR& vsParams)
|
||||
{
|
||||
// parametri : Id, IdParent, idCurv, dPrec, dLengthZ
|
||||
if ( vsParams.size() != 5)
|
||||
return false ;
|
||||
// recupero il riferimento in cui è immerso
|
||||
Frame3d frRef ;
|
||||
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
|
||||
return false ;
|
||||
// recupero id flatregion
|
||||
int nIdFlat = GetIdParam( vsParams[2]) ;
|
||||
// recupero precisione
|
||||
double dPrec ;
|
||||
if ( ! FromString( vsParams[4], dPrec))
|
||||
return false ;
|
||||
// recupero dimensioneZ
|
||||
double dLengthZ ;
|
||||
if ( ! FromString( vsParams[3], dLengthZ))
|
||||
return false ;
|
||||
// recupero puntatore a FlatRegion
|
||||
ISurfFlatRegion* pRegion = GetSurfFlatRegion( m_pGDB->GetGeoObj( nIdFlat)) ;
|
||||
if ( pRegion == nullptr)
|
||||
return false ;
|
||||
// creo Zmap
|
||||
PtrOwner<VolZmap> pZprova( new VolZmap) ;
|
||||
pZprova->CreateMapFromFlatRegion( *pRegion, dLengthZ, dPrec);
|
||||
|
||||
// inserisco nel DB
|
||||
return AddGeoObj(vsParams[0], vsParams[1], Release( pZprova)) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbExecutor::VolZmapIntervalsSubtraction( const STRVECTOR& vsParams)
|
||||
|
||||
Reference in New Issue
Block a user