EgtGeomKernel 1.5l1 :
- aggiornamento a VS2013 - migliorato SimpleOffset e implementato anche per CurveComposite - il lato di offset ora viene dal segno dello spostamento ( + a destra, - a sinistra) - il vettore estrusione ora è la normale al piano di offset (se non c'è uso Z+) - aggiunto a tutte le entità geometriche membro m_nTempProp intero temporaneo - migliorata DistPointCrvBezier e DistPointArc - corretta IntersLineArc con linee che non giacciono nel piano XY - corretta ModifyStart di CurveArc - a PolyArc aggiunto metodo ParamLinearTransform - aggiunta gestione riferimento di griglia (CPlane).
This commit is contained in:
+31
-1
@@ -13,7 +13,8 @@
|
||||
|
||||
//--------------------------- Include ----------------------------------------
|
||||
#include "stdafx.h"
|
||||
#include "\EgtDev\Include\EGkPolyArc.h"
|
||||
#include "/EgtDev/Include/EGkPolyArc.h"
|
||||
#include "/EgtDev/Include/EGkFrame3d.h"
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -137,6 +138,31 @@ PolyArc::AddOffsetToU( double dOffset)
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
PolyArc::ParamLinearTransform( double dStartU, double dEndU)
|
||||
{
|
||||
// ci devono essere almeno 2 punti
|
||||
if ( m_lUPointBs.size() < 2)
|
||||
return false ;
|
||||
// recupero i vecchi estremi del parametro
|
||||
double dOriStartU = m_lUPointBs.front().dU ;
|
||||
double dOriEndU = m_lUPointBs.back().dU ;
|
||||
// determino i coefficienti di riparametrizzazione
|
||||
double dCoeff ;
|
||||
if ( fabs( dEndU - dStartU) < EPS_ZERO)
|
||||
dCoeff = 0 ;
|
||||
else if ( fabs( dOriEndU - dOriStartU) > EPS_ZERO)
|
||||
dCoeff = ( dEndU - dStartU) / ( dOriEndU - dOriStartU) ;
|
||||
else
|
||||
return false ;
|
||||
// eseguo la riparametrizzazione
|
||||
UPNTBLIST::iterator iter ;
|
||||
for ( iter = m_lUPointBs.begin() ; iter != m_lUPointBs.end() ; ++ iter)
|
||||
iter->dU = dStartU + dCoeff * ( iter->dU - dOriStartU) ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
PolyArc::SetElevation( double dZ)
|
||||
@@ -237,6 +263,10 @@ PolyArc::ToLoc( const Frame3d& frRef)
|
||||
bool
|
||||
PolyArc::LocToLoc( const Frame3d& frOri, const Frame3d& frDest)
|
||||
{
|
||||
// se i due riferimenti coincidono, non devo fare alcunché
|
||||
if ( AreSameFrame( frOri, frDest))
|
||||
return true ;
|
||||
// ciclo sui punti
|
||||
m_vtExtr.LocToLoc( frOri, frDest) ;
|
||||
UPNTBLIST::iterator iter ;
|
||||
for ( iter = m_lUPointBs.begin() ; iter != m_lUPointBs.end() ; ++ iter)
|
||||
|
||||
Reference in New Issue
Block a user