EgtGeomKernel 1.5a3 : Implementata distanza tra punto e elica.
This commit is contained in:
+32
-3
@@ -1,19 +1,20 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2013-2013
|
||||
// EgalTech 2013-2014
|
||||
//----------------------------------------------------------------------------
|
||||
// File : DistPointArc.cpp Data : 28.12.13 Versione : 1.4l5
|
||||
// File : DistPointArc.cpp Data : 13.01.14 Versione : 1.5a3
|
||||
// Contenuto : Implementazione della classe distanza punto da circonferenza/arco.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 28.12.13 DS Creazione modulo.
|
||||
//
|
||||
// 13.01.14 DS Implementata gestione elica.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
//--------------------------- Include ----------------------------------------
|
||||
#include "stdafx.h"
|
||||
#include "DistPointArc.h"
|
||||
#include "DistPointCrvAux.h"
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -124,7 +125,35 @@ DistPointArc::DistPointFlatArc( const Point3d& ptP, const ICurveArc& arArc)
|
||||
void
|
||||
DistPointArc::DistPointHelix( const Point3d& ptP, const ICurveArc& arArc)
|
||||
{
|
||||
// creo una polilinea di approssimazione
|
||||
PolyLine PL ;
|
||||
if ( ! arArc.ApproxWithLines( LIN_TOL_APPROX, ANG_TOL_APPROX_DEG, PL))
|
||||
return ;
|
||||
|
||||
// cerco la minima distanza per la polilinea
|
||||
MDCVECTOR vApproxMin ;
|
||||
MDCVECTOR::iterator Iter ;
|
||||
if ( ! CalcMinDistPointPolyLine( ptP, PL, vApproxMin))
|
||||
return ;
|
||||
|
||||
// raffino i punti trovati
|
||||
double dPolishedPar ;
|
||||
Point3d ptPolishedQ ;
|
||||
for ( Iter = vApproxMin.begin() ; Iter != vApproxMin.end() ; ++Iter) {
|
||||
// eseguo raffinamento
|
||||
if ( PolishMinDistPointCurve( ptP, arArc, *Iter, dPolishedPar, ptPolishedQ)) {
|
||||
(*Iter).dDist = Dist( ptP, ptPolishedQ) ;
|
||||
(*Iter).dPar = dPolishedPar ;
|
||||
(*Iter).ptQ = ptPolishedQ ;
|
||||
}
|
||||
else
|
||||
(*Iter).dDist = INFINITO ;
|
||||
}
|
||||
|
||||
// determino i minimi raffinati da tenere
|
||||
double dMinDist ;
|
||||
if ( FilterMinDistPointCurve( ptP, arArc, vApproxMin, dMinDist, m_Info))
|
||||
m_dDist = dMinDist ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user