EgtExecutor 2.2i3 :

- sostituiti alcuni FALSE con false (come deve essere)
- ora le curve risultato di offset avanzato sono inserite nel DB geometrico in ordine di lunghezza decrescente.
This commit is contained in:
Dario Sassi
2020-09-14 16:37:14 +00:00
parent 5656595353
commit 1497d61024
7 changed files with 11 additions and 7 deletions
+5 -1
View File
@@ -106,12 +106,13 @@ ExeOffsetCurveAdv( int nId, double dDist, int nType, int* pnCount)
OffsetCurve OffsCrv ; OffsetCurve OffsCrv ;
bool bOk = OffsCrv.Make( pCurve, dDist, nType) ; bool bOk = OffsCrv.Make( pCurve, dDist, nType) ;
// salvo le curve di offset // salvo le curve di offset
int nRefId = nId ;
int nCount = 0 ; int nCount = 0 ;
int nFirstId = GDB_ID_NULL ; int nFirstId = GDB_ID_NULL ;
PtrOwner<ICurve> pOffs( OffsCrv.GetLongerCurve()) ; PtrOwner<ICurve> pOffs( OffsCrv.GetLongerCurve()) ;
while ( bOk && ! IsNull( pOffs)) { while ( bOk && ! IsNull( pOffs)) {
// inserisco la curva nel DB geometrico // inserisco la curva nel DB geometrico
int nNewId = pGeomDB->InsertGeoObj( GDB_ID_NULL, nId, GDB_AFTER, Release( pOffs)) ; int nNewId = pGeomDB->InsertGeoObj( GDB_ID_NULL, nRefId, GDB_AFTER, Release( pOffs)) ;
// copio gli attributi // copio gli attributi
pGeomDB->CopyAttributes( nId, nNewId) ; pGeomDB->CopyAttributes( nId, nNewId) ;
// aggiorno contatori // aggiorno contatori
@@ -119,6 +120,9 @@ ExeOffsetCurveAdv( int nId, double dDist, int nType, int* pnCount)
++ nCount ; ++ nCount ;
if ( nFirstId == GDB_ID_NULL) if ( nFirstId == GDB_ID_NULL)
nFirstId = nNewId ; nFirstId = nNewId ;
// aggiorno Id di riferimento per inserimento
if ( nNewId != GDB_ID_NULL)
nRefId = nNewId ;
// passo alla successiva // passo alla successiva
pOffs.Set( OffsCrv.GetLongerCurve()) ; pOffs.Set( OffsCrv.GetLongerCurve()) ;
} }
+1 -1
View File
@@ -605,7 +605,7 @@ bool
ExeGetInfo( int nId, const string& sKey, string& sInfo) ExeGetInfo( int nId, const string& sKey, string& sInfo)
{ {
IGeomDB* pGeomDB = GetCurrGeomDB() ; IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, FALSE) VERIFY_GEOMDB( pGeomDB, false)
// recupero info // recupero info
return pGeomDB->GetInfo( nId, sKey, sInfo) ; return pGeomDB->GetInfo( nId, sKey, sInfo) ;
} }
+2 -2
View File
@@ -261,7 +261,7 @@ bool
ExeMirror( const INTVECTOR& vIds, const Point3d& ptP, const Vector3d& vtN, int nRefType) ExeMirror( const INTVECTOR& vIds, const Point3d& ptP, const Vector3d& vtN, int nRefType)
{ {
IGeomDB* pGeomDB = GetCurrGeomDB() ; IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, FALSE) VERIFY_GEOMDB( pGeomDB, false)
bool bOk = true ; bool bOk = true ;
// se specularità espressa in locale // se specularità espressa in locale
if ( nRefType == RTY_LOC) { if ( nRefType == RTY_LOC) {
@@ -320,7 +320,7 @@ ExeShear( const INTVECTOR& vIds, const Point3d& ptP, const Vector3d& vtN,
const Vector3d& vtDir, double dCoeff, int nRefType) const Vector3d& vtDir, double dCoeff, int nRefType)
{ {
IGeomDB* pGeomDB = GetCurrGeomDB() ; IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, FALSE) VERIFY_GEOMDB( pGeomDB, false)
bool bOk = true ; bool bOk = true ;
// se stiramento espresso in locale // se stiramento espresso in locale
if ( nRefType == RTY_LOC) { if ( nRefType == RTY_LOC) {
+1 -1
View File
@@ -346,7 +346,7 @@ bool
ExeGetLastSnapDir( Vector3d& vtV) ExeGetLastSnapDir( Vector3d& vtV)
{ {
IEGrScene* pScene = GetCurrScene() ; IEGrScene* pScene = GetCurrScene() ;
VERIFY_SCENE( pScene, FALSE) VERIFY_SCENE( pScene, false)
// restituisco, se definita, direzione associata ad ultimo punto di snap // restituisco, se definita, direzione associata ad ultimo punto di snap
if ( &vtV == nullptr) if ( &vtV == nullptr)
return false ; return false ;
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -507,7 +507,7 @@ LuaRelocate( lua_State* L)
LuaGetParam( L, 3, nSonBeforeAfter) ; LuaGetParam( L, 3, nSonBeforeAfter) ;
LuaClearStack( L) ; LuaClearStack( L) ;
// eseguo la rilocazione // eseguo la rilocazione
bool bOk = ( ExeRelocate( nSouId, nRefId, nSonBeforeAfter) != FALSE) ; bool bOk = ExeRelocate( nSouId, nRefId, nSonBeforeAfter) ;
// restituisco il risultato // restituisco il risultato
LuaSetParam( L, bOk) ; LuaSetParam( L, bOk) ;
return 1 ; return 1 ;
+1 -1
View File
@@ -98,7 +98,7 @@ LuaSetDefaultMaterial( lua_State* L)
// imposto il colore di default // imposto il colore di default
int vCol[4] ; int vCol[4] ;
colDef.GetInt( vCol) ; colDef.GetInt( vCol) ;
bool bOk = ( ExeSetDefaultMaterial( vCol) != FALSE) ; bool bOk = ExeSetDefaultMaterial( vCol) ;
// restituisco il risultato // restituisco il risultato
LuaSetParam( L, bOk) ; LuaSetParam( L, bOk) ;
return 1 ; return 1 ;