EgtExecutor :

- piccole aggiunte alla chiamata delle funzioni per le bezier
- aggiunta della chiamata alla funzione SurfBzByPointCurve.
This commit is contained in:
Daniele Bariletti
2024-07-16 11:22:58 +02:00
parent 560d7af700
commit ddbc2a81e6
7 changed files with 81 additions and 19 deletions
+12 -3
View File
@@ -1727,7 +1727,7 @@ ExeExtractSurfBezierLoops( int nId, int nDestGrpId, int* pnCount)
//----------------------------------------------------------------------------
int
ExeShowSurfBezierControlPoints( int nSrfId, int* pnCount)
ExeShowSurfBezierControlPoints( int nSrfId, int nDestGrpId, int* pnCount)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, false)
@@ -1736,6 +1736,15 @@ ExeShowSurfBezierControlPoints( int nSrfId, int* pnCount)
IGeoObj* pGeoObj = pGeomDB->GetGeoObj( nSrfId) ;
if ( pGeoObj->GetType() != SRF_BEZIER)
return GDB_ID_NULL ;
// recupero il riferimento della superficie
Frame3d frSurf ;
bool bOk = true ;
bOk = bOk && pGeomDB->GetGlobFrame( nSrfId, frSurf) ;
// recupero il riferimento di destinazione
Frame3d frDest ;
bOk = bOk && pGeomDB->GetGroupGlobFrame( nDestGrpId, frDest) ;
if ( ! bOk)
return GDB_ID_NULL ;
int nDegU = - 1, nDegV = - 1, nSpanU = - 1, nSpanV = - 1 ;
bool bRat = false, bTrimmed = false ;
ISurfBezier* pSrfBez = GetSurfBezier( pGeoObj) ;
@@ -1743,10 +1752,10 @@ ExeShowSurfBezierControlPoints( int nSrfId, int* pnCount)
int nFirstId = -1 ;
int nCount = 0 ;
for ( int i = 0 ; i < (nDegU * nSpanU + 1) * ( nDegV * nSpanV + 1) ; ++i) {
bool bOk = true ;
IGeoPoint3d* pGeoPt( CreateGeoPoint3d()) ;
pGeoPt->Set( pSrfBez->GetControlPoint( i, &bOk)) ;
int nId = pGeomDB->AddGeoObj( GDB_ID_NULL, nParent, pGeoPt) ;
pGeoPt->LocToLoc( frSurf, frDest) ;
int nId = pGeomDB->AddGeoObj( GDB_ID_NULL, nDestGrpId, pGeoPt) ;
if ( nFirstId == GDB_ID_NULL)
nFirstId = nId ;
if ( nId != GDB_ID_NULL)