Merge branch 'master' into CmdCreateSurfBezier
This commit is contained in:
@@ -1288,6 +1288,43 @@ ExeCreateSurfTmSwept( int nParentId, int nSectId, int nGuideId, bool bCapEnds, d
|
||||
return nNewId ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
int
|
||||
ExeCreateSurfTmTransSwept( int nParentId, int nSectId, int nGuideId, bool bCapEnds, double dLinTol)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
nParentId = AdjustId( nParentId) ;
|
||||
bool bOk = true ;
|
||||
// recupero il riferimento locale
|
||||
Frame3d frLoc ;
|
||||
bOk = bOk && pGeomDB->GetGroupGlobFrame( nParentId, frLoc) ;
|
||||
// recupero la sezione in locale
|
||||
CurveLocal CrvSect( pGeomDB, nSectId, frLoc) ;
|
||||
bOk = bOk && ( CrvSect.Get() != nullptr) ;
|
||||
// recupero la guida in locale
|
||||
CurveLocal CrvGuide( pGeomDB, nGuideId, frLoc) ;
|
||||
bOk = bOk && ( CrvGuide.Get() != nullptr) ;
|
||||
// creo la superficie trimesh
|
||||
ISurfTriMesh* pSTM = nullptr ;
|
||||
pSTM = ( bOk ? GetSurfTriMeshTransSwept( CrvSect, CrvGuide, bCapEnds, dLinTol) : nullptr) ;
|
||||
// inserisco la superficie trimesh nel DB
|
||||
int nNewId = ( bOk ? pGeomDB->AddGeoObj( GDB_ID_NULL, nParentId, pSTM) : GDB_ID_NULL) ;
|
||||
ExeSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtSurfTmTransSwept(" + IdToString( nParentId) + "," +
|
||||
ToString( nSectId) + "," +
|
||||
ToString( nGuideId) + "," +
|
||||
( bCapEnds ? "true" : "false") + "," +
|
||||
ToString( dLinTol) + ")" +
|
||||
" -- Id=" + ToString( nNewId) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
// restituisco l'identificativo della nuova entità
|
||||
return nNewId ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
int
|
||||
ExeCreateSurfTmRuled( int nParentId, int nPtOrCrvId1, int nPtOrCrvId2, int nType, double dLinTol)
|
||||
|
||||
Reference in New Issue
Block a user