EgtExchange 2.4e1 :
- in import BTL migliorata gestione FreeContour e OutLine per angoli di fianco - in import BTL migliorata gestione cancellazione pezzo con assemblato.
This commit is contained in:
@@ -6700,6 +6700,8 @@ BtlGeom::AdjustFreeContourCurve( ICurve* pCrv, int nSide, bool& bClosed, bool& b
|
||||
bool
|
||||
BtlGeom::VerifyFreeContourCurveSideAng( const ICurveComposite* pCrvCompo)
|
||||
{
|
||||
if ( pCrvCompo == nullptr)
|
||||
return false ;
|
||||
bool bSideAng = false ;
|
||||
for ( int i = 0 ; i < pCrvCompo->GetCurveCount() ; ++ i) {
|
||||
int nAng ;
|
||||
@@ -6711,6 +6713,20 @@ BtlGeom::VerifyFreeContourCurveSideAng( const ICurveComposite* pCrvCompo)
|
||||
return bSideAng ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
BtlGeom::GetFreeContourCurveSideAngles( const ICurveComposite* pCrvCompo, DBLVECTOR& vSideAng)
|
||||
{
|
||||
if ( pCrvCompo == nullptr)
|
||||
return false ;
|
||||
for ( int i = 0 ; i < pCrvCompo->GetCurveCount() ; ++ i) {
|
||||
int nAng = 0 ;
|
||||
pCrvCompo->GetCurveTempProp( i, nAng) ;
|
||||
vSideAng.emplace_back( nAng / 1000.) ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static ISurfTriMesh*
|
||||
MyCreateSubSurfTm( const ISurfTriMesh* pStm, const INTVECTOR& vTria)
|
||||
@@ -7075,8 +7091,14 @@ BtlGeom::CreateFreeContours( void)
|
||||
continue ;
|
||||
// eseguo trim con le facce della trave
|
||||
TrimFlatCurveWithBox( pCrvCompo, FC_OUT_CRV_TOL) ;
|
||||
// recupero eventuali angoli di fianco
|
||||
DBLVECTOR vSideAng ;
|
||||
if ( bOneCurve && VerifyFreeContourCurveSideAng( pCrvCompo))
|
||||
GetFreeContourCurveSideAngles( pCrvCompo, vSideAng) ;
|
||||
// inserisco la curva nel DB geometrico
|
||||
int nTId = m_pGDB->AddGeoObj( GDB_ID_NULL, m_nProcsId, Release( pCrvCompo)) ;
|
||||
if ( nTId != GDB_ID_NULL && vSideAng.size() > 0)
|
||||
m_pGDB->SetInfo( nTId, IKEY_SIDEANGS, vSideAng) ;
|
||||
// inserisco eventuale seconda curva
|
||||
int nT2Id = GDB_ID_NULL ;
|
||||
if ( ! bOneCurve) {
|
||||
@@ -7177,6 +7199,13 @@ BtlGeom::AddOneFreeContour( int nGroup, int nProc, int nSide, const string& sDes
|
||||
else if ( nCrvCnt == 1) {
|
||||
// se previsto, imposto spessore
|
||||
pCrvCompo->SetThickness( -dDepth) ;
|
||||
// assegno eventuali angoli di fianco
|
||||
{ DBLVECTOR vSideAng ;
|
||||
if ( m_pGDB->GetInfo( nCrvId, IKEY_SIDEANGS, vSideAng)) {
|
||||
for ( int i = 0 ; i < int( vSideAng.size()) ; ++ i)
|
||||
pCrvCompo->SetCurveTempProp( i, int( vSideAng[i] * 1000)) ;
|
||||
}
|
||||
}
|
||||
// porto la curva nel riferimento della faccia
|
||||
Frame3d frSide = GetSideFrame( nSide) ;
|
||||
pCrvCompo->ToLoc( frSide) ;
|
||||
@@ -7334,8 +7363,14 @@ BtlGeom::AddOneFreeContour( int nGroup, int nProc, int nSide, const string& sDes
|
||||
return false ;
|
||||
// eseguo trim con le facce della trave
|
||||
TrimFlatCurveWithBox( pCrvCompo, FC_OUT_CRV_TOL) ;
|
||||
// recupero eventuali angoli di fianco
|
||||
DBLVECTOR vSideAng ;
|
||||
if ( nCrvCnt == 1 && VerifyFreeContourCurveSideAng( pCrvCompo))
|
||||
GetFreeContourCurveSideAngles( pCrvCompo, vSideAng) ;
|
||||
// inserisco la curva nel DB geometrico
|
||||
int nTId = m_pGDB->AddGeoObj( GDB_ID_NULL, m_nProcsId, Release( pCrvCompo)) ;
|
||||
if ( nTId != GDB_ID_NULL && vSideAng.size() > 0)
|
||||
m_pGDB->SetInfo( nTId, IKEY_SIDEANGS, vSideAng) ;
|
||||
// inserisco eventuale seconda curva
|
||||
int nT2Id = GDB_ID_NULL ;
|
||||
if ( nCrvCnt == 2)
|
||||
|
||||
Reference in New Issue
Block a user