diff --git a/CurveArc.cpp b/CurveArc.cpp index e39f881..63f27bf 100644 --- a/CurveArc.cpp +++ b/CurveArc.cpp @@ -1798,11 +1798,14 @@ CurveArc::ToGlob( const Frame3d& frRef) // la curva deve essere validata if ( m_nStatus != OK) return false ; - // verifico validità del frame if ( frRef.GetType() == Frame3d::ERR) return false ; + // se frame identità, non devo fare alcunché + if ( IsGlobFrame( frRef)) + return true ; + // imposto ricalcolo della grafica m_OGrMgr.Reset() ; @@ -1820,11 +1823,14 @@ CurveArc::ToLoc( const Frame3d& frRef) // la curva deve essere validata if ( m_nStatus != OK) return false ; - // verifico validità del frame if ( frRef.GetType() == Frame3d::ERR) return false ; + // se frame identità, non devo fare alcunché + if ( IsGlobFrame( frRef)) + return true ; + // imposto ricalcolo della grafica m_OGrMgr.Reset() ; @@ -1845,11 +1851,14 @@ CurveArc::LocToLoc( const Frame3d& frOri, const Frame3d& frDest) // verifico validità dei frame if ( frOri.GetType() == Frame3d::ERR || frDest.GetType() == Frame3d::ERR) return false ; + // se i due riferimenti coincidono, non devo fare alcunché if ( AreSameFrame( frOri, frDest)) return true ; + // imposto ricalcolo della grafica m_OGrMgr.Reset() ; + // trasformo il centro e i versori return ( m_PtCen.LocToLoc( frOri, frDest) && m_VtN.LocToLoc( frOri, frDest) && diff --git a/CurveBezier.cpp b/CurveBezier.cpp index 083ea6b..703ddec 100644 --- a/CurveBezier.cpp +++ b/CurveBezier.cpp @@ -1991,11 +1991,14 @@ CurveBezier::ToGlob( const Frame3d& frRef) // la curva deve essere validata if ( m_nStatus != OK) return false ; - // verifico validità del frame if ( frRef.GetType() == Frame3d::ERR) return false ; + // se frame identità, non devo fare alcunché + if ( IsGlobFrame( frRef)) + return true ; + // imposto ricalcolo della grafica m_OGrMgr.Reset() ; @@ -2015,11 +2018,14 @@ CurveBezier::ToLoc( const Frame3d& frRef) // la curva deve essere validata if ( m_nStatus != OK) return false ; - // verifico validità del frame if ( frRef.GetType() == Frame3d::ERR) return false ; + // se frame identità, non devo fare alcunché + if ( IsGlobFrame( frRef)) + return true ; + // imposto ricalcolo della grafica m_OGrMgr.Reset() ; @@ -2039,11 +2045,14 @@ CurveBezier::LocToLoc( const Frame3d& frOri, const Frame3d& frDest) // la curva deve essere validata if ( m_nStatus != OK) return false ; - // verifico validità dei frame if ( frOri.GetType() == Frame3d::ERR || frDest.GetType() == Frame3d::ERR) return false ; + // se i due riferimenti coincidono, non devo fare alcunché + if ( AreSameFrame( frOri, frDest)) + return true ; + // imposto ricalcolo della grafica m_OGrMgr.Reset() ; diff --git a/CurveComposite.cpp b/CurveComposite.cpp index aa18280..94e503a 100644 --- a/CurveComposite.cpp +++ b/CurveComposite.cpp @@ -2467,6 +2467,9 @@ CurveComposite::ExtendEndByLen( double dLenExt) bool CurveComposite::Translate( const Vector3d& vtMove) { + // la curva deve essere validata + if ( m_nStatus != OK) + return false ; // imposto ricalcolo della grafica m_OGrMgr.Reset() ; @@ -2481,6 +2484,9 @@ CurveComposite::Translate( const Vector3d& vtMove) bool CurveComposite::Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) { + // la curva deve essere validata + if ( m_nStatus != OK) + return false ; // verifico validità dell'asse di rotazione if ( vtAx.IsSmall()) return false ; @@ -2502,6 +2508,9 @@ CurveComposite::Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dCosAn bool CurveComposite::Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ) { + // la curva deve essere validata + if ( m_nStatus != OK) + return false ; // verifico non sia nulla if ( abs( dCoeffX) < EPS_ZERO && abs( dCoeffY) < EPS_ZERO && abs( dCoeffZ) < EPS_ZERO) return false ; @@ -2586,6 +2595,9 @@ CurveComposite::Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, dou bool CurveComposite::Mirror( const Point3d& ptOn, const Vector3d& vtNorm) { + // la curva deve essere validata + if ( m_nStatus != OK) + return false ; // verifico validità del piano di specchiatura if ( vtNorm.IsSmall()) return false ; @@ -2607,6 +2619,9 @@ CurveComposite::Mirror( const Point3d& ptOn, const Vector3d& vtNorm) bool CurveComposite::Shear( const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtDir, double dCoeff) { + // la curva deve essere validata + if ( m_nStatus != OK) + return false ; // verifico validità dei parametri if ( vtNorm.IsSmall() || vtDir.IsSmall()) return false ; @@ -2637,10 +2652,17 @@ CurveComposite::Shear( const Point3d& ptOn, const Vector3d& vtNorm, const Vector bool CurveComposite::ToGlob( const Frame3d& frRef) { + // la curva deve essere validata + if ( m_nStatus != OK) + return false ; // verifico validità del frame if ( frRef.GetType() == Frame3d::ERR) return false ; + // se frame identità, non devo fare alcunché + if ( IsGlobFrame( frRef)) + return true ; + // imposto ricalcolo della grafica m_OGrMgr.Reset() ; @@ -2658,10 +2680,17 @@ CurveComposite::ToGlob( const Frame3d& frRef) bool CurveComposite::ToLoc( const Frame3d& frRef) { + // la curva deve essere validata + if ( m_nStatus != OK) + return false ; // verifico validità del frame if ( frRef.GetType() == Frame3d::ERR) return false ; + // se frame identità, non devo fare alcunché + if ( IsGlobFrame( frRef)) + return true ; + // imposto ricalcolo della grafica m_OGrMgr.Reset() ; @@ -2679,6 +2708,9 @@ CurveComposite::ToLoc( const Frame3d& frRef) bool CurveComposite::LocToLoc( const Frame3d& frOri, const Frame3d& frDest) { + // la curva deve essere validata + if ( m_nStatus != OK) + return false ; // verifico validità dei frame if ( frOri.GetType() == Frame3d::ERR || frDest.GetType() == Frame3d::ERR) return false ; diff --git a/CurveLine.cpp b/CurveLine.cpp index 5411341..16c9306 100644 --- a/CurveLine.cpp +++ b/CurveLine.cpp @@ -917,6 +917,10 @@ CurveLine::ToGlob( const Frame3d& frRef) if ( frRef.GetType() == Frame3d::ERR) return false ; + // se frame identità, non devo fare alcunché + if ( IsGlobFrame( frRef)) + return true ; + // imposto ricalcolo della grafica m_OGrMgr.Reset() ; @@ -935,6 +939,10 @@ CurveLine::ToLoc( const Frame3d& frRef) if ( frRef.GetType() == Frame3d::ERR) return false ; + // se frame identità, non devo fare alcunché + if ( IsGlobFrame( frRef)) + return true ; + // imposto ricalcolo della grafica m_OGrMgr.Reset() ; @@ -952,6 +960,7 @@ CurveLine::LocToLoc( const Frame3d& frOri, const Frame3d& frDest) // verifico validità dei frame if ( frOri.GetType() == Frame3d::ERR || frDest.GetType() == Frame3d::ERR) return false ; + // se i due riferimenti coincidono, non devo fare alcunché if ( AreSameFrame( frOri, frDest)) return true ;