EgtExecutor :
- aggiornamento parametri per conversione a bezier.
This commit is contained in:
@@ -1667,7 +1667,7 @@ ExeCreateCurveBezierFromArc( int nParentId, int nArcId, bool bErase)
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
MyCreateCurveBezierFromCurve( int nParentId, int nCrvId)
|
||||
MyCreateCurveBezierFromCurve( int nParentId, int nCrvId, bool bRational)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
@@ -1688,7 +1688,7 @@ MyCreateCurveBezierFromCurve( int nParentId, int nCrvId)
|
||||
Vector3d vtExtr ;
|
||||
pCurve->GetExtrusion( vtExtr) ;
|
||||
vtExtr.LocToLoc( frCrv, frLoc) ;
|
||||
PtrOwner<ICurve> pCrvBez ( CurveToBezierCurve( pCurve)) ;
|
||||
PtrOwner<ICurve> pCrvBez ( CurveToBezierCurve( pCurve, bRational)) ;
|
||||
// setto l'estrusione
|
||||
pCrvBez->SetExtrusion( vtExtr) ;
|
||||
// aggiungo la curva in forma di Bezier al DB
|
||||
@@ -1698,16 +1698,15 @@ MyCreateCurveBezierFromCurve( int nParentId, int nCrvId)
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
int
|
||||
ExeCreateCurveBezierFromCurve( int nParentId, int nCrvId, int nDeg)
|
||||
ExeCreateCurveBezierFromCurve( int nParentId, int nCrvId, bool bRational)
|
||||
{
|
||||
// eseguo
|
||||
int nId = MyCreateCurveBezierFromCurve( nParentId, nCrvId) ;
|
||||
int nId = MyCreateCurveBezierFromCurve( nParentId, nCrvId, bRational) ;
|
||||
ExeSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtCurveBezierFromCurve(" + IdToString( nParentId) + "," +
|
||||
IdToString( nCrvId) + "," +
|
||||
ToString( nDeg) + ")"
|
||||
IdToString( nCrvId) + ")"
|
||||
" -- Id=" + ToString( nId) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
|
||||
@@ -732,15 +732,15 @@ LuaCreateCurveBezierFromArc( lua_State* L)
|
||||
static int
|
||||
LuaCreateCurveBezierFromCurve( lua_State* L)
|
||||
{
|
||||
// 2 o 3 parametri : ParentId, nCrvId [, nDeg]
|
||||
// 2 o 3 parametri : ParentId, nCrvId [, bRat]
|
||||
int nParentId ;
|
||||
LuaCheckParam( L, 1, nParentId)
|
||||
int nCrvId ;
|
||||
LuaCheckParam( L, 2, nCrvId)
|
||||
int nDeg = 3 ;
|
||||
LuaGetParam( L, 3, nDeg) ;
|
||||
bool bRat = true ;
|
||||
LuaGetParam( L, 3, bRat) ;
|
||||
// creo la versione bezier della curva
|
||||
int nId = ExeCreateCurveBezierFromCurve( nParentId, nCrvId, nDeg) ;
|
||||
int nId = ExeCreateCurveBezierFromCurve( nParentId, nCrvId, bRat) ;
|
||||
// restituisco il risultato
|
||||
if ( nId != GDB_ID_NULL)
|
||||
LuaSetParam( L, nId) ;
|
||||
|
||||
Reference in New Issue
Block a user