EgtInterface 1.5k5 :
- aggiunta EgtTrimExtendCurveByLen - aggiunta EgtOffsetCurve - aggiunte EgtCurveLength e EgtCurveLengthAtPoint - aggiunta EgtGetPointFromSelect.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "/EgtDev/Include/EgkCurve.h"
|
||||
#include "/EgtDev/Include/EgkCurveArc.h"
|
||||
#include "/EgtDev/Include/EgkExtText.h"
|
||||
#include "/EgtDev/Include/EgkDistPointCurve.h"
|
||||
#include "/EgtDev/Include/EgkIntersCurveCurve.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
|
||||
@@ -488,6 +489,45 @@ __stdcall EgtFrame( int nId, Frame3d& frFrame)
|
||||
return false ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtCurveLength( int nId, double* pdLen)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// verifico il parametro
|
||||
if ( pdLen == nullptr)
|
||||
return FALSE ;
|
||||
// recupero la curva
|
||||
ICurve* pCurve = GetCurve( pGeomDB->GetGeoObj( nId)) ;
|
||||
if ( pCurve == nullptr)
|
||||
return FALSE ;
|
||||
// recupero la lunghezza
|
||||
return ( pCurve->GetLength( *pdLen) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtCurveLengthAtPoint( int nId, double ptOn[3], double* pdLen)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// verifico il parametro
|
||||
if ( pdLen == nullptr)
|
||||
return FALSE ;
|
||||
// recupero la curva
|
||||
ICurve* pCurve = GetCurve( pGeomDB->GetGeoObj( nId)) ;
|
||||
if ( pCurve == nullptr)
|
||||
return FALSE ;
|
||||
// determino la posizione parametrica del punto sulla curva (con tolleranza)
|
||||
int nFlag ;
|
||||
double dU ;
|
||||
if ( ! DistPointCurve( ptOn, *pCurve).GetParamAtMinDistPoint( 0, dU, nFlag) || nFlag != MDPCI_NORMAL)
|
||||
return FALSE ;
|
||||
// recupero la lunghezza alla posizione parametrica
|
||||
return ( pCurve->GetLengthAtParam( dU, *pdLen) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtCurveExtrusion( int nId, double vtExtr[3])
|
||||
|
||||
Reference in New Issue
Block a user