EgtExecutor 1.9l3 :
- aggiunto parametro per tolleranza a ExeCreateFlatParts.
This commit is contained in:
@@ -42,7 +42,7 @@ VerifyCalcLevel( IGdbIterator* pEnt, int nReqLev)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static bool
|
||||
ApproxCurveIfNeeded( IGdbIterator* pEnt)
|
||||
ApproxCurveIfNeeded( IGdbIterator* pEnt, double dToler)
|
||||
{
|
||||
// deve essere una curva
|
||||
int nGeoType = pEnt->GetGeoType() ;
|
||||
@@ -73,7 +73,8 @@ ApproxCurveIfNeeded( IGdbIterator* pEnt)
|
||||
ICurve* pCrv = GetCurve( pEnt->GetGeoObj()) ;
|
||||
PtrOwner<ICurveComposite> pCC( CreateCurveComposite()) ;
|
||||
PolyArc PA ;
|
||||
bool bOk = pCrv->ApproxWithArcsEx( LIN_TOL_STD, ANG_TOL_STD_DEG, LIN_FEA_STD, PA) && pCC->FromPolyArc( PA) ;
|
||||
double dTol = max( dToler, LIN_TOL_FINE) ;
|
||||
bool bOk = pCrv->ApproxWithArcsEx( dTol, ANG_TOL_STD_DEG, LIN_FEA_STD, PA) && pCC->FromPolyArc( PA) ;
|
||||
bOk = bOk && pEnt->GetGDB()->ReplaceGeoObj( pEnt->GetId(), Release( pCC)) ;
|
||||
return bOk ;
|
||||
}
|
||||
@@ -110,7 +111,7 @@ AdjustNearlyClosedCurve( IGdbIterator* pEnt)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static bool
|
||||
FilterAndApprox( void)
|
||||
FilterAndApprox( double dToler)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
@@ -149,7 +150,7 @@ FilterAndApprox( void)
|
||||
// aggiustamenti per curve
|
||||
if ( bCurve) {
|
||||
// eventuale approx della curva se Bezier o Composita con molti piccoli segmenti
|
||||
ApproxCurveIfNeeded( pEnt) ;
|
||||
ApproxCurveIfNeeded( pEnt, dToler) ;
|
||||
// se curva approssimativamente chiusa, la chiudo esattamente
|
||||
AdjustNearlyClosedCurve( pEnt) ;
|
||||
}
|
||||
@@ -706,12 +707,12 @@ VerifyAndAdjustFlatParts( void)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeCreateFlatParts( int nType)
|
||||
ExeCreateFlatParts( int nType, double dToler)
|
||||
{
|
||||
// disabilito registrazione comandi
|
||||
CmdLogOff cmdLogOff ;
|
||||
// filtro e approssimo le curve
|
||||
bool bOk = FilterAndApprox() ;
|
||||
bool bOk = FilterAndApprox( dToler) ;
|
||||
// creazione basata sulle regioni
|
||||
if ( nType == FPC_REGION) {
|
||||
int nLay ;
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user