EgtExecutor :
- a funzioni Exe e Lua CreateCurveCompoByChain e CreateCurveCompoByReorder aggiunto parametro Tolleranza (opzionale per Lua).
This commit is contained in:
+23
-6
@@ -1632,7 +1632,7 @@ ExeCreateCurveCompo( int nParentId, const INTVECTOR& vIds, bool bErase)
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
MyCreateCurveCompoByChain( int nParentId, const INTVECTOR& vIds,
|
||||
const Point3d& ptNear, bool bAllowInvert, bool bErase, int nRefType, int* pnCount)
|
||||
const Point3d& ptNear, bool bAllowInvert, bool bErase, int nRefType, double dToler, int* pnCount)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
@@ -1642,7 +1642,6 @@ MyCreateCurveCompoByChain( int nParentId, const INTVECTOR& vIds,
|
||||
if ( ! pGeomDB->GetGroupGlobFrame( nParentId, frDest))
|
||||
return GDB_ID_NULL ;
|
||||
// preparo i dati per il concatenamento
|
||||
double dToler = 10 * EPS_SMALL ;
|
||||
ChainCurves chainC ;
|
||||
chainC.Init( bAllowInvert, dToler, int( vIds.size())) ;
|
||||
INTVECTOR vMyIds ;
|
||||
@@ -1801,10 +1800,18 @@ MyCreateCurveCompoByChain( int nParentId, const INTVECTOR& vIds,
|
||||
int
|
||||
ExeCreateCurveCompoByChain( int nParentId, const INTVECTOR& vIds,
|
||||
const Point3d& ptNear, bool bErase, int nRefType, int* pnCount)
|
||||
{
|
||||
return ExeCreateCurveCompoByChainEx( nParentId, vIds, ptNear, bErase, nRefType, 10 * EPS_SMALL, pnCount) ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
int
|
||||
ExeCreateCurveCompoByChainEx( int nParentId, const INTVECTOR& vIds,
|
||||
const Point3d& ptNear, bool bErase, int nRefType, double dToler, int* pnCount)
|
||||
{
|
||||
// eseguo
|
||||
int nCount = 0 ;
|
||||
int nFirstId = MyCreateCurveCompoByChain( nParentId, vIds, ptNear, true, bErase, nRefType, &nCount) ;
|
||||
int nFirstId = MyCreateCurveCompoByChain( nParentId, vIds, ptNear, true, bErase, nRefType, dToler, &nCount) ;
|
||||
if ( pnCount != nullptr)
|
||||
*pnCount = nCount ;
|
||||
ExeSetModified() ;
|
||||
@@ -1814,7 +1821,8 @@ ExeCreateCurveCompoByChain( int nParentId, const INTVECTOR& vIds,
|
||||
IdListToString( vIds) + "},{" +
|
||||
ToString( ptNear) + "}," +
|
||||
( bErase ? "true" : "false") + "," +
|
||||
RefTypeToString( nRefType) + ")" +
|
||||
RefTypeToString( nRefType) + "," +
|
||||
ToString( dToler) + ")" +
|
||||
" -- Id=" + ToString( nFirstId) + ",Nbr=" + ToString( nCount) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
@@ -1826,10 +1834,18 @@ ExeCreateCurveCompoByChain( int nParentId, const INTVECTOR& vIds,
|
||||
int
|
||||
ExeCreateCurveCompoByReorder( int nParentId, const INTVECTOR& vIds,
|
||||
const Point3d& ptNear, bool bErase, int nRefType, int* pnCount)
|
||||
{
|
||||
return ExeCreateCurveCompoByReorderEx( nParentId, vIds, ptNear, bErase, nRefType, 10 * EPS_SMALL, pnCount) ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
int
|
||||
ExeCreateCurveCompoByReorderEx( int nParentId, const INTVECTOR& vIds,
|
||||
const Point3d& ptNear, bool bErase, int nRefType, double dToler, int* pnCount)
|
||||
{
|
||||
// eseguo
|
||||
int nCount = 0 ;
|
||||
int nFirstId = MyCreateCurveCompoByChain( nParentId, vIds, ptNear, false, bErase, nRefType, &nCount) ;
|
||||
int nFirstId = MyCreateCurveCompoByChain( nParentId, vIds, ptNear, false, bErase, nRefType, dToler, &nCount) ;
|
||||
if ( pnCount != nullptr)
|
||||
*pnCount = nCount ;
|
||||
ExeSetModified() ;
|
||||
@@ -1839,7 +1855,8 @@ ExeCreateCurveCompoByReorder( int nParentId, const INTVECTOR& vIds,
|
||||
IdListToString( vIds) + "},{" +
|
||||
ToString( ptNear) + "}," +
|
||||
( bErase ? "true" : "false") + "," +
|
||||
RefTypeToString( nRefType) + ")" +
|
||||
RefTypeToString( nRefType) + "," +
|
||||
ToString( dToler) + ")" +
|
||||
" -- Id=" + ToString( nFirstId) + ",Nbr=" + ToString( nCount) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user