diff --git a/API_GdbObjSelection.cpp b/API_GdbObjSelection.cpp index 96dcfa7..933ac9c 100644 --- a/API_GdbObjSelection.cpp +++ b/API_GdbObjSelection.cpp @@ -52,3 +52,13 @@ BOOL // deseleziono l'oggetto return ( pGeomDB->DeselectObj( nId) ? TRUE : FALSE) ; } + +//----------------------------------------------------------------------------- +BOOL + __stdcall EgtDeselectAll( int nGseCtx) + { + IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ; + VERIFY_GEOMDB( pGeomDB, FALSE) + // deseleziono tutto + return ( pGeomDB->ClearSelection() ? TRUE : FALSE) ; + } diff --git a/API_GdbObjects.cpp b/API_GdbObjects.cpp index 8859c6b..679eb2a 100644 --- a/API_GdbObjects.cpp +++ b/API_GdbObjects.cpp @@ -83,6 +83,44 @@ __stdcall EgtGetPrev( int nGseCtx, int nId) return pGeomDB->GetPrev( nId) ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtGetBBox( int nGseCtx, int nId, int nFlag, double ptMin[3], double ptMax[3]) +{ + IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ; + VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL) + // recupero il bounding box locale dell'oggetto + BBox3d b3Loc ; + if ( ! pGeomDB->GetLocalBBox( nId, b3Loc, nFlag)) + return FALSE ; + ptMin[0] = b3Loc.GetMin().x ; + ptMin[1] = b3Loc.GetMin().y ; + ptMin[2] = b3Loc.GetMin().z ; + ptMax[0] = b3Loc.GetMax().x ; + ptMax[1] = b3Loc.GetMax().y ; + ptMax[2] = b3Loc.GetMax().z ; + return TRUE ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtGetBBoxGlob( int nGseCtx, int nId, int nFlag, double ptMin[3], double ptMax[3]) +{ + IGeomDB* pGeomDB = GetGeomDB( nGseCtx) ; + VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL) + // recupero il bounding box globale dell'oggetto + BBox3d b3Loc ; + if ( ! pGeomDB->GetGlobalBBox( nId, b3Loc, nFlag)) + return FALSE ; + ptMin[0] = b3Loc.GetMin().x ; + ptMin[1] = b3Loc.GetMin().y ; + ptMin[2] = b3Loc.GetMin().z ; + ptMax[0] = b3Loc.GetMax().x ; + ptMax[1] = b3Loc.GetMax().y ; + ptMax[2] = b3Loc.GetMax().z ; + return TRUE ; +} + //----------------------------------------------------------------------------- int __stdcall EgtCopy( int nGseCtx, int nSouId, int nRefId, int nSonBeforeAfter) diff --git a/EgtInterface.rc b/EgtInterface.rc index 359c21a..b7e0026 100644 Binary files a/EgtInterface.rc and b/EgtInterface.rc differ