EgtExecutor :
- Codice di test per RMF.
This commit is contained in:
@@ -33,6 +33,12 @@
|
||||
#include "/EgtDev/Include/EGkCurveLocal.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
#include "/EgtDev/Include/EGkExtText.h"
|
||||
|
||||
// TEMP *********************
|
||||
#include "EgtDev/EgtGeomKernel/RotationMinimizeFrame.h" // togliere !
|
||||
#include "EgtDev/EgtGeomKernel/RotationMinimizeFrame.cpp"
|
||||
// **************************
|
||||
|
||||
using namespace std ;
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
@@ -1271,6 +1277,34 @@ ExeCreateSurfTmSwept( int nParentId, int nSectId, int nGuideId, bool bCapEnds, d
|
||||
pSTM = ( bOk ? GetSurfTriMeshSwept( CrvSect, CrvGuide, bCapEnds, dLinTol) : nullptr) ;
|
||||
// inserisco la superficie trimesh nel DB
|
||||
int nNewId = ( bOk ? pGeomDB->AddGeoObj( GDB_ID_NULL, nParentId, pSTM) : GDB_ID_NULL) ;
|
||||
|
||||
|
||||
// TEMP *****************************************
|
||||
if ( nNewId == -1) {
|
||||
PtrOwner<ICurve> pCrv( CrvGuide.Get()->Clone()) ;
|
||||
if ( IsNull( pCrv))
|
||||
return false ;
|
||||
Point3d ptStart ; Vector3d vtTan ;
|
||||
if ( ! pCrv->GetPointD1D2( 0., ICurve::FROM_MINUS, ptStart, &vtTan))
|
||||
return false ;
|
||||
Frame3d frStart ;
|
||||
frStart.Set( ptStart, vtTan) ; // la tangente è la Z del frame
|
||||
double dStep = 10 ;
|
||||
RotationMinimizeFrame RMF( pCrv, frStart, dStep) ;
|
||||
FRAME3DVECTOR vRMF ;
|
||||
if ( ! RMF.GetFrames( vRMF))
|
||||
return false ;
|
||||
// disegno i frames ricavati
|
||||
for ( int i = 0 ; i < int( vRMF.size()) ; ++ i) {
|
||||
IGeoFrame3d* frCurr( CreateGeoFrame3d()) ;
|
||||
frCurr->Set( vRMF[i]) ;
|
||||
pGeomDB->AddGeoObj( GDB_ID_NULL, 764, frCurr->Clone()) ;
|
||||
delete( frCurr) ;
|
||||
}
|
||||
}
|
||||
// **********************************************
|
||||
|
||||
|
||||
ExeSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
|
||||
Reference in New Issue
Block a user