From c59b85ba424f3dd512c152bb8bf8ec15ffbb2d0c Mon Sep 17 00:00:00 2001 From: DarioS Date: Wed, 6 Jul 2022 17:44:23 +0200 Subject: [PATCH] EgtExchange 2.4g2 : - a BeamMgr aggiunta funzione GetSideData. --- BeamMgr.cpp | 27 ++++++++++++++++++++++++++- BeamMgr.h | 1 + BtlGeom.h | 22 ++++++++++++---------- EgtExchange.rc | Bin 11670 -> 11670 bytes 4 files changed, 39 insertions(+), 11 deletions(-) diff --git a/BeamMgr.cpp b/BeamMgr.cpp index 4070f17..02a42b9 100644 --- a/BeamMgr.cpp +++ b/BeamMgr.cpp @@ -174,6 +174,31 @@ BeamMgr::SetPartBox( double dLength, double dHeight, double dWidth, bool bUpdate return true ; } +//---------------------------------------------------------------------------- +bool +BeamMgr::GetSideData( int nSide, Frame3d& frRef, double& dLength, double& dWidth, double& dHeight) +{ + // Verifico validità GDB + if ( m_pGDB == nullptr) + return false ; + // Verifico validità identificativo di faccia + if ( nSide < BTL_SIDE_FRONT || nSide > BTL_SIDE_RIGHT) + return false ; + // Recupero riferimento del pezzo corrente + int nPartId = m_BtlGeom.GetCurrPartId() ; + Frame3d frPart ; + if ( ! m_pGDB->GetGroupGlobFrame( nPartId, frPart)) + return false ; + // Recupero i dati + frRef = m_BtlGeom.GetSideFrame( nSide) ; + frRef.ToGlob( frPart) ; + dLength = m_BtlGeom.GetSideLength( nSide) ; + dWidth = m_BtlGeom.GetSideWidth( nSide) ; + dHeight = m_BtlGeom.GetSideHeight( nSide) ; + + return true ; +} + //---------------------------------------------------------------------------- int BeamMgr::AddProcess( int nGroup, int nProc, int nSide, const string& sDes, int nProcId, @@ -214,7 +239,7 @@ BeamMgr::AddProcess( int nGroup, int nProc, int nSide, const string& sDes, int n } // altrimenti Add standard else { - if ( ! m_BtlGeom.AddProcess( nGroup, nProc, nSide, sDes, nProcId,frRef, vnDPar, nSPar, vdBtlPar, sBtlPar, vsUAtt, 0)) + if ( ! m_BtlGeom.AddProcess( nGroup, nProc, nSide, sDes, nProcId, frRef, vnDPar, nSPar, vdBtlPar, sBtlPar, vsUAtt, 0)) return GDB_ID_NULL ; } // Se richiesto, aggiorno Outline e cancello Solido diff --git a/BeamMgr.h b/BeamMgr.h index c59d89c..a0510c2 100644 --- a/BeamMgr.h +++ b/BeamMgr.h @@ -30,6 +30,7 @@ class BeamMgr : public IBeamMgr bool SetPartName( const std::string& sName) override ; bool SetPartCount( int nCount) override ; bool SetPartBox( double dLength, double dHeight, double dWidth, bool bUpdate = true) override ; + bool GetSideData( int nSide, Frame3d& frRef, double& dLength, double& dWidth, double& dHeight) override ; int AddProcess( int nGroup, int nProc, int nSide, const std::string& sDes, int nProcId, const Frame3d& frRef, const DBLVECTOR& vdPar, const std::string& sPar, const STRVECTOR& vsUAtt, int nCrvId, int nCrv2Id, bool bUpdate = true) override ; diff --git a/BtlGeom.h b/BtlGeom.h index c6f40fb..8320704 100644 --- a/BtlGeom.h +++ b/BtlGeom.h @@ -92,17 +92,8 @@ class BtlGeom const INTVECTOR& vnDPar, DBLVECTOR& vdPar, const STRVECTOR& vsUAtt) ; bool AddShapeBTLX( const INTMATRIX& vFacesVertices, const PNTVECTOR& vPoints) ; - private : - bool CreateInfoGroup( void) ; - bool CreateAssemblyGroup( void) ; - bool CreateRawPartsGroup( void) ; - bool CreateCompositesGroup( void) ; - bool ReadUserAttribute( const std::string& sString, std::string& sKey, std::string& sVal) ; + public : // Data bool IsTrueSide( int nSide) const ; // esclude gli estremi (RIGHT e LEFT) - std::string GetOutlineOutName( int nSide) const ; - std::string GetOutlineApertureName( int nSide) const ; - std::string GetOutlineTopName( int nSide) const ; - std::string GetOutlineBottomName( int nSide) const ; double GetSideLength( int nSide) const ; double GetSideWidth( int nSide) const ; double GetSideHeight( int nSide) const ; @@ -110,6 +101,17 @@ class BtlGeom Plane3d GetSidePlane( int nSide) const ; Vector3d GetSideVersN( int nSide) const ; int GetOppositeSide( int nSide) const ; + + private : + bool CreateInfoGroup( void) ; + bool CreateAssemblyGroup( void) ; + bool CreateRawPartsGroup( void) ; + bool CreateCompositesGroup( void) ; + bool ReadUserAttribute( const std::string& sString, std::string& sKey, std::string& sVal) ; + std::string GetOutlineOutName( int nSide) const ; + std::string GetOutlineApertureName( int nSide) const ; + std::string GetOutlineTopName( int nSide) const ; + std::string GetOutlineBottomName( int nSide) const ; bool SetAlpha( int nId, int nAlpha) ; private : // Outline diff --git a/EgtExchange.rc b/EgtExchange.rc index 611b6905fa9c4887f3d115bcd6aad548289b4a29..560c8c1887edb6c329713643f17a25053a4f49cf 100644 GIT binary patch delta 86 zcmbOhJuP~}FE&P_&3E|@GELsYnFC~gl&oglyoB3=87yoFqCQGiGH&h=wt@&Dsoczh KrYJz!jSB#Ue;(2R delta 86 zcmbOhJuP~}FE&QQ&3E|@GELsYnFC~gl&oglyoB3=87yoFqCQGiGH&h=wt@&Dsoczh KrYJz!jSB#TEgs4M