EgtExecutor 1.8l1 :
- aggiunta funzione Exe e Lua SurfTmFacetOppositeSide.
This commit is contained in:
@@ -166,6 +166,34 @@ TrasformVector( IGeomDB* pGeomDB, int nId, int nRefId, Vector3d& vtV)
|
||||
return vtV.LocToLoc( frSou, frDest) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
InvTrasformVector( IGeomDB* pGeomDB, int nId, int nRefId, Vector3d& vtV)
|
||||
{
|
||||
// se non va trasformato, esco
|
||||
if ( nRefId == nId)
|
||||
return true ;
|
||||
// recupero il riferimento in cui va espresso il punto (quello dell'entità a cui va riferito)
|
||||
Frame3d frSou ;
|
||||
if ( ! pGeomDB->GetGlobFrame( nId, frSou))
|
||||
return false ;
|
||||
// se viene da globale, trasformo ed esco
|
||||
if ( nRefId == GDB_ID_ROOT)
|
||||
return vtV.ToLoc( frSou) ;
|
||||
// recupero il riferimento da cui proviene
|
||||
Frame3d frDest ;
|
||||
if ( nRefId == GDB_ID_GRID)
|
||||
frDest = pGeomDB->GetGridFrame() ;
|
||||
else {
|
||||
// nRefId può essere un gruppo o una entità
|
||||
if ( ! pGeomDB->GetGroupGlobFrame( nRefId, frDest) &&
|
||||
! pGeomDB->GetGlobFrame( nRefId, frDest))
|
||||
return false ;
|
||||
}
|
||||
// eseguo la trasformazione inversa
|
||||
return vtV.LocToLoc( frDest, frSou) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
TrasformFrame( IGeomDB* pGeomDB, int nId, int nRefId, Frame3d& frF)
|
||||
|
||||
Reference in New Issue
Block a user