diff --git a/CurveArc.cpp b/CurveArc.cpp index 93d3af7..1afeac8 100644 --- a/CurveArc.cpp +++ b/CurveArc.cpp @@ -607,7 +607,7 @@ CurveArc::Load( NgeReader& ngeIn) //---------------------------------------------------------------------------- bool -CurveArc::GetLocalBBox( BBox3d& b3Loc) const +CurveArc::GetLocalBBox( BBox3d& b3Loc, int nFlag) const { // verifico lo stato if ( m_nStatus != OK) @@ -625,7 +625,7 @@ CurveArc::GetLocalBBox( BBox3d& b3Loc) const //---------------------------------------------------------------------------- bool -CurveArc::GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const +CurveArc::GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag) const { // verifico lo stato if ( m_nStatus != OK) diff --git a/CurveArc.h b/CurveArc.h index d840226..80bd870 100644 --- a/CurveArc.h +++ b/CurveArc.h @@ -30,8 +30,8 @@ class CurveArc : public ICurveArc, public IGeoObjRW { return ( m_nStatus == OK) ; } virtual const std::string& GetTitle( void) const ; virtual bool Dump( std::string& sOut, const char* szNewLine = "\n") const ; - virtual bool GetLocalBBox( BBox3d& b3Loc) const ; - virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const ; + virtual bool GetLocalBBox( BBox3d& b3Loc, int nFlag = BBF_STANDARD) const ; + virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const ; virtual bool Translate( const Vector3d& vtMove) ; virtual bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg) { double dAngRad = dAngDeg * DEGTORAD ; diff --git a/CurveBezier.cpp b/CurveBezier.cpp index 4bd4a64..21c188e 100644 --- a/CurveBezier.cpp +++ b/CurveBezier.cpp @@ -471,21 +471,37 @@ CurveBezier::Validate( void) //---------------------------------------------------------------------------- bool -CurveBezier::GetLocalBBox( BBox3d& b3Loc) const +CurveBezier::GetLocalBBox( BBox3d& b3Loc, int nFlag) const { // verifico lo stato if ( m_nStatus != OK) return false ; // assegno il box in locale b3Loc.Reset() ; - for ( int i = 0 ; i <= m_nDeg ; ++ i) - b3Loc.Add( m_aPtCtrl[i]) ; + // basta approssimato + if ( ( nFlag & BBF_EXACT) == 0) { + for ( int i = 0 ; i <= m_nDeg ; ++ i) + b3Loc.Add( m_aPtCtrl[i]) ; + } + // deve essere preciso + else { + // costruisco una approssimazione lineare + PolyLine PL ; + if ( ! ApproxWithLines( LIN_TOL_STD, ANG_TOL_STD_DEG, PL)) + return false ; + // ciclo sui punti della approssimazione + Point3d ptTemp ; + for ( bool bFound = PL.GetFirstPoint( ptTemp) ; bFound ; bFound = PL.GetNextPoint( ptTemp)) { + b3Loc.Add( ptTemp) ; + } + } + return true ; } //---------------------------------------------------------------------------- bool -CurveBezier::GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const +CurveBezier::GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag) const { // verifico lo stato if ( m_nStatus != OK) @@ -495,10 +511,26 @@ CurveBezier::GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const return false ; // assegno il box nel riferimento b3Ref.Reset() ; - for ( int i = 0 ; i <= m_nDeg ; ++ i) { - Point3d ptTemp = m_aPtCtrl[i] ; - ptTemp.ToGlob( frRef) ; - b3Ref.Add( ptTemp) ; + // basta approssimato + if ( ( nFlag & BBF_EXACT) == 0) { + for ( int i = 0 ; i <= m_nDeg ; ++ i) { + Point3d ptTemp = m_aPtCtrl[i] ; + ptTemp.ToGlob( frRef) ; + b3Ref.Add( ptTemp) ; + } + } + // deve essere preciso + else { + // costruisco una approssimazione lineare + PolyLine PL ; + if ( ! ApproxWithLines( LIN_TOL_STD, ANG_TOL_STD_DEG, PL)) + return false ; + // ciclo sui punti della approssimazione + Point3d ptTemp ; + for ( bool bFound = PL.GetFirstPoint( ptTemp) ; bFound ; bFound = PL.GetNextPoint( ptTemp)) { + ptTemp.ToGlob( frRef) ; + b3Ref.Add( ptTemp) ; + } } return true ; diff --git a/CurveBezier.h b/CurveBezier.h index 648e3ec..ac671a1 100644 --- a/CurveBezier.h +++ b/CurveBezier.h @@ -32,8 +32,8 @@ class CurveBezier : public ICurveBezier, public IGeoObjRW { return ( m_nStatus == OK) ; } virtual const std::string& GetTitle( void) const ; virtual bool Dump( std::string& sOut, const char* szNewLine = "\n") const ; - virtual bool GetLocalBBox( BBox3d& b3Loc) const ; - virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const ; + virtual bool GetLocalBBox( BBox3d& b3Loc, int nFlag = BBF_STANDARD) const ; + virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const ; virtual bool Translate( const Vector3d& vtMove) ; virtual bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg) { double dAngRad = dAngDeg * DEGTORAD ; diff --git a/CurveComposite.cpp b/CurveComposite.cpp index 271f52c..0b763db 100644 --- a/CurveComposite.cpp +++ b/CurveComposite.cpp @@ -646,7 +646,7 @@ CurveComposite::Load( NgeReader& ngeIn) //---------------------------------------------------------------------------- bool -CurveComposite::GetLocalBBox( BBox3d& b3Loc) const +CurveComposite::GetLocalBBox( BBox3d& b3Loc, int nFlag) const { // verifico lo stato if ( m_nStatus != OK) @@ -659,7 +659,7 @@ CurveComposite::GetLocalBBox( BBox3d& b3Loc) const while ( pCrvSmpl != nullptr) { BBox3d b3Crv ; // recupero il box della curva - pCrvSmpl->GetLocalBBox( b3Crv) ; + pCrvSmpl->GetLocalBBox( b3Crv, nFlag) ; // aggiorno il box b3Loc.Add( b3Crv) ; // passo alla curva successiva @@ -670,7 +670,7 @@ CurveComposite::GetLocalBBox( BBox3d& b3Loc) const //---------------------------------------------------------------------------- bool -CurveComposite::GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const +CurveComposite::GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag) const { // verifico lo stato if ( m_nStatus != OK) @@ -686,7 +686,7 @@ CurveComposite::GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const while ( pCrvSmpl != nullptr) { BBox3d b3Crv ; // recupero il box della curva - pCrvSmpl->GetBBox( frRef, b3Crv) ; + pCrvSmpl->GetBBox( frRef, b3Crv, nFlag) ; // aggiorno il box b3Ref.Add( b3Crv) ; // passo alla curva successiva diff --git a/CurveComposite.h b/CurveComposite.h index b460148..9399f53 100644 --- a/CurveComposite.h +++ b/CurveComposite.h @@ -32,8 +32,8 @@ class CurveComposite : public ICurveComposite, public IGeoObjRW { return ( m_nStatus == OK) ; } virtual const std::string& GetTitle( void) const ; virtual bool Dump( std::string& sOut, const char* szNewLine = "\n") const ; - virtual bool GetLocalBBox( BBox3d& b3Loc) const ; - virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const ; + virtual bool GetLocalBBox( BBox3d& b3Loc, int nFlag = BBF_STANDARD) const ; + virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const ; virtual bool Translate( const Vector3d& vtMove) ; virtual bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg) { double dAngRad = dAngDeg * DEGTORAD ; diff --git a/CurveLine.cpp b/CurveLine.cpp index 72831e5..cdaf48e 100644 --- a/CurveLine.cpp +++ b/CurveLine.cpp @@ -202,7 +202,7 @@ CurveLine::Load( NgeReader& ngeIn) //---------------------------------------------------------------------------- bool -CurveLine::GetLocalBBox( BBox3d& b3Loc) const +CurveLine::GetLocalBBox( BBox3d& b3Loc, int nFlag) const { // verifico lo stato if ( m_nStatus != OK) @@ -214,7 +214,7 @@ CurveLine::GetLocalBBox( BBox3d& b3Loc) const //---------------------------------------------------------------------------- bool -CurveLine::GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const +CurveLine::GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag) const { // verifico lo stato if ( m_nStatus != OK) diff --git a/CurveLine.h b/CurveLine.h index a097d2b..6d47b3b 100644 --- a/CurveLine.h +++ b/CurveLine.h @@ -30,8 +30,8 @@ class CurveLine : public ICurveLine, public IGeoObjRW { return ( m_nStatus == OK) ; } virtual const std::string& GetTitle( void) const ; virtual bool Dump( std::string& sOut, const char* szNewLine = "\n") const ; - virtual bool GetLocalBBox( BBox3d& b3Loc) const ; - virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const ; + virtual bool GetLocalBBox( BBox3d& b3Loc, int nFlag = BBF_STANDARD) const ; + virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const ; virtual bool Translate( const Vector3d& vtMove) ; virtual bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg) { double dAngRad = dAngDeg * DEGTORAD ; diff --git a/EgtGeomKernel.rc b/EgtGeomKernel.rc index f23d6bf..2a7a67c 100644 Binary files a/EgtGeomKernel.rc and b/EgtGeomKernel.rc differ diff --git a/ExtText.cpp b/ExtText.cpp index 0ced4db..3784336 100644 --- a/ExtText.cpp +++ b/ExtText.cpp @@ -327,7 +327,7 @@ ExtText::Load( NgeReader& ngeIn) //---------------------------------------------------------------------------- bool -ExtText::GetLocalBBox( BBox3d& b3Loc) const +ExtText::GetLocalBBox( BBox3d& b3Loc, int nFlag) const { // recupero il font manager FontManager& fntMgr = FontManager::GetFontManager() ; @@ -351,7 +351,7 @@ ExtText::GetLocalBBox( BBox3d& b3Loc) const //---------------------------------------------------------------------------- bool -ExtText::GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const +ExtText::GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag) const { // verifico validità del frame if ( frRef.GetType() == Frame3d::ERR) diff --git a/ExtText.h b/ExtText.h index 4c1d723..09d0eaa 100644 --- a/ExtText.h +++ b/ExtText.h @@ -30,8 +30,8 @@ class ExtText : public IExtText, public IGeoObjRW { return true ; } virtual const std::string& GetTitle( void) const ; virtual bool Dump( std::string& sOut, const char* szNewLine = "\n") const ; - virtual bool GetLocalBBox( BBox3d& b3Loc) const ; - virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const ; + virtual bool GetLocalBBox( BBox3d& b3Loc, int nFlag = BBF_STANDARD) const ; + virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const ; virtual bool Translate( const Vector3d& vtMove) ; virtual bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg) { double dAngRad = dAngDeg * DEGTORAD ; diff --git a/GdbGeo.cpp b/GdbGeo.cpp index 72f696f..22d7998 100644 --- a/GdbGeo.cpp +++ b/GdbGeo.cpp @@ -186,7 +186,7 @@ GdbGeo::GetLocalBBox( BBox3d& b3Loc, int nFlag, int nLev) const } } - return m_pGeoObj->GetLocalBBox( b3Loc) ; + return m_pGeoObj->GetLocalBBox( b3Loc, nFlag) ; } //---------------------------------------------------------------------------- @@ -225,7 +225,7 @@ GdbGeo::GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag, int nLev) const } } - return m_pGeoObj->GetBBox( frRef, b3Ref) ; + return m_pGeoObj->GetBBox( frRef, b3Ref, nFlag) ; } //---------------------------------------------------------------------------- diff --git a/GdbIterator.h b/GdbIterator.h index 4b5032a..104f8fa 100644 --- a/GdbIterator.h +++ b/GdbIterator.h @@ -45,9 +45,9 @@ class GdbIterator : public IGdbIterator virtual int GetId( void) const ; virtual int GetParentId( void) const ; virtual bool GetGlobFrame( Frame3d& frGlob) const ; - virtual bool GetLocalBBox( BBox3d& b3Loc, int nFlag = BBF_NONE) const ; - virtual bool GetGlobalBBox( BBox3d& b3Glob, int nFlag = BBF_NONE) const ; - virtual bool GetRefBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_NONE) const ; + virtual bool GetLocalBBox( BBox3d& b3Loc, int nFlag = BBF_STANDARD) const ; + virtual bool GetGlobalBBox( BBox3d& b3Glob, int nFlag = BBF_STANDARD) const ; + virtual bool GetRefBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const ; virtual bool SetLevel( int nLevel) ; virtual bool RevertLevel( void) ; virtual bool GetLevel( int& nLevel) const ; diff --git a/GeoFrame3d.cpp b/GeoFrame3d.cpp index bfac39b..21eaec0 100644 --- a/GeoFrame3d.cpp +++ b/GeoFrame3d.cpp @@ -170,7 +170,7 @@ GeoFrame3d::Load( NgeReader& ngeIn) //---------------------------------------------------------------------------- bool -GeoFrame3d::GetLocalBBox( BBox3d& b3Loc) const +GeoFrame3d::GetLocalBBox( BBox3d& b3Loc, int nFlag) const { // assegno il box in locale (considero l'origine) b3Loc.Set( m_frF.Orig()) ; @@ -179,7 +179,7 @@ GeoFrame3d::GetLocalBBox( BBox3d& b3Loc) const //---------------------------------------------------------------------------- bool -GeoFrame3d::GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const +GeoFrame3d::GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag) const { // verifico validità del frame if ( frRef.GetType() == Frame3d::ERR) diff --git a/GeoFrame3d.h b/GeoFrame3d.h index ad69726..93c2101 100644 --- a/GeoFrame3d.h +++ b/GeoFrame3d.h @@ -30,8 +30,8 @@ class GeoFrame3d : public IGeoFrame3d, public IGeoObjRW { return ( m_frF.GetType() != Frame3d::ERR) ; } virtual const std::string& GetTitle( void) const ; virtual bool Dump( std::string& sOut, const char* szNewLine = "\n") const ; - virtual bool GetLocalBBox( BBox3d& b3Loc) const ; - virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const ; + virtual bool GetLocalBBox( BBox3d& b3Loc, int nFlag = BBF_STANDARD) const ; + virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const ; virtual bool GetFrame( Frame3d& frF) const { frF = m_frF ; return true ;} virtual bool Translate( const Vector3d& vtMove) diff --git a/GeoPoint3d.cpp b/GeoPoint3d.cpp index 0e4c952..cf77c64 100644 --- a/GeoPoint3d.cpp +++ b/GeoPoint3d.cpp @@ -136,7 +136,7 @@ GeoPoint3d::Load( NgeReader& ngeIn) //---------------------------------------------------------------------------- bool -GeoPoint3d::GetLocalBBox( BBox3d& b3Loc) const +GeoPoint3d::GetLocalBBox( BBox3d& b3Loc, int nFlag) const { // assegno il box in locale b3Loc.Set( m_ptP) ; @@ -145,7 +145,7 @@ GeoPoint3d::GetLocalBBox( BBox3d& b3Loc) const //---------------------------------------------------------------------------- bool -GeoPoint3d::GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const +GeoPoint3d::GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag) const { // verifico validità del frame if ( frRef.GetType() == Frame3d::ERR) diff --git a/GeoPoint3d.h b/GeoPoint3d.h index daa03b1..350189b 100644 --- a/GeoPoint3d.h +++ b/GeoPoint3d.h @@ -30,8 +30,8 @@ class GeoPoint3d : public IGeoPoint3d, public IGeoObjRW { return true ; } virtual const std::string& GetTitle( void) const ; virtual bool Dump( std::string& sOut, const char* szNewLine = "\n") const ; - virtual bool GetLocalBBox( BBox3d& b3Loc) const ; - virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const ; + virtual bool GetLocalBBox( BBox3d& b3Loc, int nFlag = BBF_STANDARD) const ; + virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const ; virtual bool Translate( const Vector3d& vtMove) { m_OGrMgr.Reset() ; m_ptP.Translate( vtMove) ; return true ; } virtual bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg) diff --git a/GeoVector3d.cpp b/GeoVector3d.cpp index 6cf4c4e..9eea141 100644 --- a/GeoVector3d.cpp +++ b/GeoVector3d.cpp @@ -162,7 +162,7 @@ GeoVector3d::Load( NgeReader& ngeIn) //---------------------------------------------------------------------------- bool -GeoVector3d::GetLocalBBox( BBox3d& b3Loc) const +GeoVector3d::GetLocalBBox( BBox3d& b3Loc, int nFlag) const { // il box tiene conto della posizione della base e del tip b3Loc.Set( m_ptBase, m_ptBase + m_vtV) ; @@ -171,7 +171,7 @@ GeoVector3d::GetLocalBBox( BBox3d& b3Loc) const //---------------------------------------------------------------------------- bool -GeoVector3d::GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const +GeoVector3d::GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag) const { // verifico validità del frame if ( frRef.GetType() == Frame3d::ERR) diff --git a/GeoVector3d.h b/GeoVector3d.h index c4f6644..b36d74e 100644 --- a/GeoVector3d.h +++ b/GeoVector3d.h @@ -29,8 +29,8 @@ class GeoVector3d : public IGeoVector3d, public IGeoObjRW { return true ; } virtual const std::string& GetTitle( void) const ; virtual bool Dump( std::string& sOut, const char* szNewLine = "\n") const ; - virtual bool GetLocalBBox( BBox3d& b3Loc) const ; - virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const ; + virtual bool GetLocalBBox( BBox3d& b3Loc, int nFlag = BBF_STANDARD) const ; + virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const ; virtual bool Translate( const Vector3d& vtMove) { m_OGrMgr.Reset() ; m_ptBase.Translate( vtMove) ; return true ; } virtual bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg) diff --git a/GeomDB.h b/GeomDB.h index a23ea6f..94757bc 100644 --- a/GeomDB.h +++ b/GeomDB.h @@ -53,9 +53,9 @@ class GeomDB : public IGeomDB virtual int GetParentId( int nId) const ; virtual bool GetGlobFrame( int nId, Frame3d& frGlob) const { return GetGroupGlobFrame( GetParentId( nId), frGlob) ; } - virtual bool GetLocalBBox( int nId, BBox3d& b3Loc, int nFlag = BBF_NONE) const ; - virtual bool GetGlobalBBox( int nId, BBox3d& b3Glob, int nFlag = BBF_NONE) const ; - virtual bool GetRefBBox( int nId, const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_NONE) const ; + virtual bool GetLocalBBox( int nId, BBox3d& b3Loc, int nFlag = BBF_STANDARD) const ; + virtual bool GetGlobalBBox( int nId, BBox3d& b3Glob, int nFlag = BBF_STANDARD) const ; + virtual bool GetRefBBox( int nId, const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const ; virtual int Copy( int nIdSou, int nIdDest, int nRefId, int nSonBeforeAfter = GDB_SON) { return Copy( nIdSou, nIdDest, nRefId, nSonBeforeAfter, false) ; } virtual int CopyGlob( int nIdSou, int nIdDest, int nRefId, int nSonBeforeAfter = GDB_SON) diff --git a/SurfTriMesh.cpp b/SurfTriMesh.cpp index 5b99d7f..f493827 100644 --- a/SurfTriMesh.cpp +++ b/SurfTriMesh.cpp @@ -1612,7 +1612,7 @@ SurfTriMesh::DoSewing( const ISurfTriMesh& stmOther, const Frame3d& frOther) //---------------------------------------------------------------------------- bool -SurfTriMesh::GetLocalBBox( BBox3d& b3Loc) const +SurfTriMesh::GetLocalBBox( BBox3d& b3Loc, int nFlag) const { // verifico lo stato if ( m_nStatus != OK) @@ -1628,7 +1628,7 @@ SurfTriMesh::GetLocalBBox( BBox3d& b3Loc) const //---------------------------------------------------------------------------- bool -SurfTriMesh::GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const +SurfTriMesh::GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag) const { // verifico lo stato if ( m_nStatus != OK) diff --git a/SurfTriMesh.h b/SurfTriMesh.h index f59b091..a26a344 100644 --- a/SurfTriMesh.h +++ b/SurfTriMesh.h @@ -65,8 +65,8 @@ class SurfTriMesh : public ISurfTriMesh, public IGeoObjRW { return ( m_nStatus == OK) ; } virtual const std::string& GetTitle( void) const ; virtual bool Dump( std::string& sOut, const char* szNewLine = "\n") const ; - virtual bool GetLocalBBox( BBox3d& b3Loc) const ; - virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const ; + virtual bool GetLocalBBox( BBox3d& b3Loc, int nFlag = BBF_STANDARD) const ; + virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const ; virtual bool Translate( const Vector3d& vtMove) ; virtual bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg) { double dAngRad = dAngDeg * DEGTORAD ; diff --git a/Vector3d.cpp b/Vector3d.cpp index fae8910..55ea880 100644 --- a/Vector3d.cpp +++ b/Vector3d.cpp @@ -347,12 +347,10 @@ Vector3d::ToGlob( const Frame3d& frRef) return true ; // eseguo trasformazione - if ( frRef.GetType() != Frame3d::TOP) { - Vector3d vtT( x, y, z) ; - x = vtT.x * frRef.VersX().x + vtT.y * frRef.VersY().x + vtT.z * frRef.VersZ().x ; - y = vtT.x * frRef.VersX().y + vtT.y * frRef.VersY().y + vtT.z * frRef.VersZ().y ; - z = vtT.x * frRef.VersX().z + vtT.y * frRef.VersY().z + vtT.z * frRef.VersZ().z ; - } + Vector3d vtT( x, y, z) ; + x = vtT.x * frRef.VersX().x + vtT.y * frRef.VersY().x + vtT.z * frRef.VersZ().x ; + y = vtT.x * frRef.VersX().y + vtT.y * frRef.VersY().y + vtT.z * frRef.VersZ().y ; + z = vtT.x * frRef.VersX().z + vtT.y * frRef.VersY().z + vtT.z * frRef.VersZ().z ; return true ; } @@ -372,12 +370,10 @@ Vector3d::ToLoc( const Frame3d& frRef) return true ; // eseguo trasformazione - if ( frRef.GetType() != Frame3d::TOP) { - Vector3d vtT( x, y, z) ; - x = vtT.x * frRef.VersX().x + vtT.y * frRef.VersX().y + vtT.z * frRef.VersX().z ; - y = vtT.x * frRef.VersY().x + vtT.y * frRef.VersY().y + vtT.z * frRef.VersY().z ; - z = vtT.x * frRef.VersZ().x + vtT.y * frRef.VersZ().y + vtT.z * frRef.VersZ().z ; - } + Vector3d vtT( x, y, z) ; + x = vtT.x * frRef.VersX().x + vtT.y * frRef.VersX().y + vtT.z * frRef.VersX().z ; + y = vtT.x * frRef.VersY().x + vtT.y * frRef.VersY().y + vtT.z * frRef.VersY().z ; + z = vtT.x * frRef.VersZ().x + vtT.y * frRef.VersZ().y + vtT.z * frRef.VersZ().z ; return true ; }