Merge remote-tracking branch 'origin/master' into ExtDimension_angular
This commit is contained in:
+29
-8
@@ -290,7 +290,7 @@ ExtDimension::Clone( void) const
|
||||
bool
|
||||
ExtDimension::CopyFrom( const IGeoObj* pGObjSrc)
|
||||
{
|
||||
const ExtDimension* pDim = dynamic_cast<const ExtDimension*>( pGObjSrc) ;
|
||||
const ExtDimension* pDim = GetBasicExtDimension( pGObjSrc) ;
|
||||
if ( pDim == nullptr)
|
||||
return false ;
|
||||
return CopyFrom( *pDim) ;
|
||||
@@ -656,6 +656,7 @@ ExtDimension::Translate( const Vector3d& vtMove)
|
||||
// imposto ricalcolo
|
||||
m_bToCalc = true ;
|
||||
m_OGrMgr.Reset() ;
|
||||
|
||||
// se valido
|
||||
if ( m_nType >= DT_LINEAR && m_nType <= DT_ANGULAR) {
|
||||
m_ptP1.Translate( vtMove) ;
|
||||
@@ -675,9 +676,14 @@ ExtDimension::Translate( const Vector3d& vtMove)
|
||||
bool
|
||||
ExtDimension::Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng)
|
||||
{
|
||||
// verifico validità dell'asse di rotazione
|
||||
if ( vtAx.IsSmall())
|
||||
return false ;
|
||||
|
||||
// imposto ricalcolo
|
||||
m_bToCalc = true ;
|
||||
m_OGrMgr.Reset() ;
|
||||
|
||||
// se valido
|
||||
if ( m_nType >= DT_LINEAR && m_nType <= DT_ANGULAR) {
|
||||
return ( m_vtN.Rotate( vtAx, dCosAng, dSinAng) &&
|
||||
@@ -701,9 +707,11 @@ ExtDimension::Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, doubl
|
||||
// verifico non sia nulla
|
||||
if ( abs( dCoeffX) < EPS_ZERO && abs( dCoeffY) < EPS_ZERO && abs( dCoeffZ) < EPS_ZERO)
|
||||
return false ;
|
||||
|
||||
// imposto ricalcolo
|
||||
m_bToCalc = true ;
|
||||
m_OGrMgr.Reset() ;
|
||||
|
||||
// se valido
|
||||
if ( m_nType >= DT_LINEAR && m_nType <= DT_ANGULAR) {
|
||||
// sistemo i vettori
|
||||
@@ -749,9 +757,11 @@ ExtDimension::Mirror( const Point3d& ptOn, const Vector3d& vtNorm)
|
||||
// verifico validità del piano di specchiatura
|
||||
if ( vtNorm.IsSmall())
|
||||
return false ;
|
||||
|
||||
// imposto ricalcolo
|
||||
m_bToCalc = true ;
|
||||
m_OGrMgr.Reset() ;
|
||||
|
||||
// se valido
|
||||
if ( m_nType >= DT_LINEAR && m_nType <= DT_ANGULAR) {
|
||||
// eseguo il mirror dei versori
|
||||
@@ -787,9 +797,11 @@ ExtDimension::Shear( const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d
|
||||
// verifico validità dei parametri
|
||||
if ( vtNorm.IsSmall() || vtDir.IsSmall())
|
||||
return false ;
|
||||
|
||||
// imposto ricalcolo
|
||||
m_bToCalc = true ;
|
||||
m_OGrMgr.Reset() ;
|
||||
|
||||
// se valido
|
||||
if ( m_nType >= DT_LINEAR && m_nType <= DT_ANGULAR) {
|
||||
// sistemo i vettori
|
||||
@@ -835,13 +847,16 @@ ExtDimension::ToGlob( const Frame3d& frRef)
|
||||
// verifico validità del frame
|
||||
if ( frRef.GetType() == Frame3d::ERR)
|
||||
return false ;
|
||||
// se riferimento globale, non devo fare alcunch�
|
||||
if ( AreSameFrame( frRef, GLOB_FRM))
|
||||
|
||||
// se frame identità, non devo fare alcunché
|
||||
if ( IsGlobFrame( frRef))
|
||||
return true ;
|
||||
// imposto ricalcolo
|
||||
|
||||
// imposto ricalcolo
|
||||
m_bToCalc = true ;
|
||||
m_OGrMgr.Reset() ;
|
||||
// se valido
|
||||
|
||||
// se valido
|
||||
if ( m_nType >= DT_LINEAR && m_nType <= DT_ANGULAR) {
|
||||
// trasformo punto e versori
|
||||
return ( m_vtN.ToGlob( frRef) &&
|
||||
@@ -865,12 +880,15 @@ ExtDimension::ToLoc( const Frame3d& frRef)
|
||||
// verifico validità del frame
|
||||
if ( frRef.GetType() == Frame3d::ERR)
|
||||
return false ;
|
||||
// se riferimento globale, non devo fare alcunch�
|
||||
if ( AreSameFrame( frRef, GLOB_FRM))
|
||||
|
||||
// se frame identità, non devo fare alcunché
|
||||
if ( IsGlobFrame( frRef))
|
||||
return true ;
|
||||
// imposto ricalcolo
|
||||
|
||||
// imposto ricalcolo
|
||||
m_bToCalc = true ;
|
||||
m_OGrMgr.Reset() ;
|
||||
|
||||
// se valido
|
||||
if ( m_nType >= DT_LINEAR && m_nType <= DT_ANGULAR) {
|
||||
// trasformo punto e versori
|
||||
@@ -895,12 +913,15 @@ ExtDimension::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
|
||||
m_bToCalc = true ;
|
||||
m_OGrMgr.Reset() ;
|
||||
|
||||
// se valido
|
||||
if ( m_nType >= DT_LINEAR && m_nType <= DT_ANGULAR) {
|
||||
// trasformo punto e versori
|
||||
|
||||
Reference in New Issue
Block a user