EgtExchange 2.4g2 :

- a BeamMgr aggiunta funzione GetSideData.
This commit is contained in:
DarioS
2022-07-06 17:44:23 +02:00
parent 41b595d798
commit c59b85ba42
4 changed files with 39 additions and 11 deletions
+26 -1
View File
@@ -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
+1
View File
@@ -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 ;
+12 -10
View File
@@ -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
BIN
View File
Binary file not shown.