EgtExecutor :
- aggiunte funzioni ExeSetShowSurfBezierTol e ExeGetShowSurfBezierTol.
This commit is contained in:
+43
-8
@@ -16,6 +16,7 @@
|
||||
#include "EXE.h"
|
||||
#include "EXE_Macro.h"
|
||||
#include "DllGraphics.h"
|
||||
#include "/EgtDev/Include/EGkSurfBezier.h"
|
||||
#include "/EgtDev/Include/EXeExecutor.h"
|
||||
#include "/EgtDev/Include/EXeConst.h"
|
||||
#include "/EgtDev/Include/EgtStringConverter.h"
|
||||
@@ -435,6 +436,8 @@ ExeGetShowCurveDirection( void)
|
||||
static bool
|
||||
MyResetGroupObjGraphics( IGeomDB* pGDB, int nGroupId)
|
||||
{
|
||||
if ( pGDB == nullptr)
|
||||
return false ;
|
||||
int nEntId = pGDB->GetFirstInGroup( nGroupId) ;
|
||||
while ( nEntId != GDB_ID_NULL) {
|
||||
if ( pGDB->GetGdbType( nEntId) == GDB_TY_GROUP) {
|
||||
@@ -461,13 +464,12 @@ ExeSetShowTriaAdv( bool bAdvanced, bool bRedraw)
|
||||
// imposto il nuovo stato
|
||||
pScene->SetShowTriaAdvanced( bAdvanced) ;
|
||||
// forzo ricalcolo della grafica di tutti gli oggetti
|
||||
IGeomDB* pGDB = pScene->GetGeomDB() ;
|
||||
if ( pGDB != nullptr)
|
||||
MyResetGroupObjGraphics( pGDB, GDB_ID_ROOT) ;
|
||||
if ( ! MyResetGroupObjGraphics( pScene->GetGeomDB(), GDB_ID_ROOT))
|
||||
return false ;
|
||||
}
|
||||
if ( bRedraw)
|
||||
pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -480,17 +482,50 @@ ExeGetShowTriaAdv( void)
|
||||
return pScene->GetShowTriaAdvanced() ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
bool
|
||||
ExeSetShowSurfBezierTol( double dLinTol, bool bRedraw)
|
||||
{
|
||||
IEGrScene* pScene = GetCurrScene() ;
|
||||
VERIFY_SCENE( pScene, false)
|
||||
// se diverso, imposto il nuovo valore
|
||||
if ( abs( GetSurfBezierAuxSurfTol() - dLinTol) > 10 * EPS_SMALL) {
|
||||
// imposto il nuovo valore di approssimazione
|
||||
SetSurfBezierAuxSurfTol( dLinTol) ;
|
||||
// forzo ricalcolo della grafica di tutti gli oggetti
|
||||
if ( ! MyResetGroupObjGraphics( pScene->GetGeomDB(), GDB_ID_ROOT))
|
||||
return false ;
|
||||
}
|
||||
if ( bRedraw)
|
||||
pScene->RedrawWindow() ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
double
|
||||
ExeGetShowSurfBezierTol( void)
|
||||
{
|
||||
// recupero il valore
|
||||
return GetSurfBezierAuxSurfTol() ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeSetShowZmap( int nMode, bool bRedraw)
|
||||
{
|
||||
IEGrScene* pScene = GetCurrScene() ;
|
||||
VERIFY_SCENE( pScene, false)
|
||||
// imposto stato
|
||||
pScene->SetShowZmap( nMode) ;
|
||||
// se cambiato, imposto il nuovo stato
|
||||
if ( pScene->GetShowZmap() != nMode) {
|
||||
// imposto il nuovo stato
|
||||
pScene->SetShowZmap( nMode) ;
|
||||
// forzo ricalcolo della grafica di tutti gli oggetti
|
||||
if ( ! MyResetGroupObjGraphics( pScene->GetGeomDB(), GDB_ID_ROOT))
|
||||
return false ;
|
||||
}
|
||||
if ( bRedraw)
|
||||
pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -498,7 +533,7 @@ int
|
||||
ExeGetShowZmap( void)
|
||||
{
|
||||
IEGrScene* pScene = GetCurrScene() ;
|
||||
VERIFY_SCENE( pScene, false)
|
||||
VERIFY_SCENE( pScene, -1)
|
||||
// recupero lo stato
|
||||
return pScene->GetShowZmap() ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user