EgtInterface 1.6d2 :

- in Lua in tutte le operazioni con creazione di più entità restituisco Id prima e numero
- in Lua aggiunto oggetto BBox3d (non ancora con tutte le funzionalità)
- in Lua aggiunta creazione superficie da BBox3d
- in Lua aggiunte funzioni per avere BBox3d di oggetti
- in Lua aggiunta OutBox
- in Lua aggiunte funzioni per MachMgr.
This commit is contained in:
Dario Sassi
2015-04-16 06:55:49 +00:00
parent 432a805f4e
commit fd718143e6
22 changed files with 1335 additions and 207 deletions
+68 -1
View File
@@ -474,4 +474,71 @@ __stdcall EgtFrameLocToLoc( double ptOrig[3], double vtX[3], double vtY[3], doub
VEC_FROM_3D( vtY, frTemp.VersY())
VEC_FROM_3D( vtZ, frTemp.VersZ())
return TRUE ;
}
}
//-----------------------------------------------------------------------------
// BBox3d
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtBBoxToGlob( double ptMin[3], double ptMax[3],
const double ptO1[3], const double vtX1[3], const double vtY1[3], const double vtZ1[3])
{
// costruisco il frame di trasformazione
Frame3d frRef ;
if ( ! frRef.Set( ptO1, vtX1, vtY1, vtZ1))
return FALSE ;
// eseguo la trasformazione
BBox3d b3Temp ;
b3Temp.Set( ptMin, ptMax) ;
if ( ! b3Temp.ToGlob( frRef))
return FALSE ;
// aggiorno i parametri del box
VEC_FROM_3D( ptMin, b3Temp.GetMin())
VEC_FROM_3D( ptMax, b3Temp.GetMax())
return TRUE ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtBBoxToLoc( double ptMin[3], double ptMax[3],
const double ptO1[3], const double vtX1[3], const double vtY1[3], const double vtZ1[3])
{
// costruisco il frame di trasformazione
Frame3d frRef ;
if ( ! frRef.Set( ptO1, vtX1, vtY1, vtZ1))
return FALSE ;
// eseguo la trasformazione
BBox3d b3Temp ;
b3Temp.Set( ptMin, ptMax) ;
if ( ! b3Temp.ToLoc( frRef))
return FALSE ;
// aggiorno i parametri del box
VEC_FROM_3D( ptMin, b3Temp.GetMin())
VEC_FROM_3D( ptMax, b3Temp.GetMax())
return TRUE ;
}
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtBBoxLocToLoc( double ptMin[3], double ptMax[3],
const double ptO1[3], const double vtX1[3], const double vtY1[3], const double vtZ1[3],
const double ptO2[3], const double vtX2[3], const double vtY2[3], const double vtZ2[3])
{
// costruisco il frame sorgente
Frame3d frSou ;
if ( ! frSou.Set( ptO1, vtX1, vtY1, vtZ1))
return FALSE ;
// costruisco il frame destinazione
Frame3d frDest ;
if ( ! frDest.Set( ptO2, vtX2, vtY2, vtZ2))
return FALSE ;
// eseguo la trasformazione
BBox3d b3Temp ;
b3Temp.Set( ptMin, ptMax) ;
if ( ! b3Temp.LocToLoc( frSou, frDest))
return FALSE ;
// aggiorno i parametri del box
VEC_FROM_3D( ptMin, b3Temp.GetMin())
VEC_FROM_3D( ptMax, b3Temp.GetMax())
return TRUE ;
}