EgtMachKernel :
- modifica a SplitFlatRawPartWithMachinings per ignorare eventuale errore ininfluente con Kerf - in tagli con lama su curve allontanate di poco dal pezzo le regioni di ingombro degli attacchi e uscite.
This commit is contained in:
+2
-3
@@ -969,9 +969,8 @@ MachMgr::SplitFlatRawPartWithMachinings( int nRawId, const INTVECTOR& vMchId)
|
||||
PtrOwner<ISurfFlatRegion> pSfrNewKerf( SfrCntr.GetSurf()) ;
|
||||
if ( IsNull( pSfrNewKerf))
|
||||
return GDB_ID_NULL ;
|
||||
// la limito con la regione di kerf
|
||||
if ( ! pSfrNewKerf->Intersect( *pSfrKerf))
|
||||
return GDB_ID_NULL ;
|
||||
// la limito con la regione di kerf precedente (va bene anche se fallisce)
|
||||
pSfrNewKerf->Intersect( *pSfrKerf) ;
|
||||
// se risultato non vuoto
|
||||
if ( pSfrNewKerf->IsValid()) {
|
||||
// riferimento del nuovo grezzo
|
||||
|
||||
+10
-6
@@ -2231,7 +2231,7 @@ Sawing::GenerateExtCurvePv( const ICurveComposite* pCrv,
|
||||
m_pGeomDB->SetMaterial( nId, LIME) ;
|
||||
|
||||
// contorno per parte iniziale di taglio
|
||||
PtrOwner<ICurveComposite> pCompo2( GenerateExtArcPvPreCut( pArc, dIntRad, dExtRad, dDeltaT, 0)) ;
|
||||
PtrOwner<ICurveComposite> pCompo2( GenerateExtArcPvPreCut( pArc, dIntRad, dExtRad, dDeltaT, 0, 0)) ;
|
||||
if ( IsNull( pCompo2))
|
||||
return false ;
|
||||
pCompo2->Translate( dElev * vtCorr) ;
|
||||
@@ -2240,7 +2240,7 @@ Sawing::GenerateExtCurvePv( const ICurveComposite* pCrv,
|
||||
m_pGeomDB->SetMaterial( nId2, ( bFirst ? BLUE : LIME)) ;
|
||||
|
||||
// contorno per parte finale di taglio
|
||||
PtrOwner<ICurveComposite> pCompo3( GenerateExtArcPvPostCut( pArc, dIntRad, dExtRad, dDeltaT, 0)) ;
|
||||
PtrOwner<ICurveComposite> pCompo3( GenerateExtArcPvPostCut( pArc, dIntRad, dExtRad, dDeltaT, 0, 0)) ;
|
||||
if ( IsNull( pCompo3))
|
||||
return false ;
|
||||
pCompo3->Translate( dElev * vtCorr) ;
|
||||
@@ -2263,7 +2263,7 @@ Sawing::GenerateExtCurvePv( const ICurveComposite* pCrv,
|
||||
m_pGeomDB->SetMaterial( nRrId, INVISIBLE) ;
|
||||
|
||||
// regione di pre-taglio
|
||||
PtrOwner<ICurveComposite> pCmpRs( GenerateExtArcPvPreCut( pArc, dIntRad, dExtRad, dDeltaT, dExtraL)) ;
|
||||
PtrOwner<ICurveComposite> pCmpRs( GenerateExtArcPvPreCut( pArc, dIntRad, dExtRad, dDeltaT, 10 * EPS_SMALL, dExtraL)) ;
|
||||
if ( IsNull( pCmpRs))
|
||||
return false ;
|
||||
SurfFlatRegionByContours SfrCntrRs ;
|
||||
@@ -2277,7 +2277,7 @@ Sawing::GenerateExtCurvePv( const ICurveComposite* pCrv,
|
||||
m_pGeomDB->SetMaterial( nRsId, INVISIBLE) ;
|
||||
|
||||
// regione di post-taglio
|
||||
PtrOwner<ICurveComposite> pCmpRe( GenerateExtArcPvPostCut( pArc, dIntRad, dExtRad, dDeltaT, dExtraL)) ;
|
||||
PtrOwner<ICurveComposite> pCmpRe( GenerateExtArcPvPostCut( pArc, dIntRad, dExtRad, dDeltaT, 10 * EPS_SMALL, dExtraL)) ;
|
||||
if ( IsNull( pCmpRe))
|
||||
return false ;
|
||||
SurfFlatRegionByContours SfrCntrRe ;
|
||||
@@ -2356,7 +2356,7 @@ Sawing::GenerateExtArcPvTrueCut( const ICurveArc* pArc, double dIntRad, double d
|
||||
//----------------------------------------------------------------------------
|
||||
ICurveComposite*
|
||||
Sawing::GenerateExtArcPvPreCut( const ICurveArc* pArc, double dIntRad, double dExtRad,
|
||||
double dDeltaT, double dSafety)
|
||||
double dDeltaT, double dIntOffs, double dSafety)
|
||||
{
|
||||
// direzione iniziale del taglio
|
||||
Vector3d vtStaDir ;
|
||||
@@ -2368,6 +2368,8 @@ Sawing::GenerateExtArcPvPreCut( const ICurveArc* pArc, double dIntRad, double dE
|
||||
pArc->GetStartPoint( ptStart) ;
|
||||
if ( ! AreHeadWorkOnSameSide())
|
||||
ptStart -= vtStaVer * m_TParams.m_dThick ;
|
||||
if ( dIntOffs > EPS_SMALL)
|
||||
ptStart += vtStaVer * dIntOffs ;
|
||||
// punto prima di inizio
|
||||
Point3d ptPre = ptStart - vtStaDir * dDeltaT ;
|
||||
// punto fuori prima di inizio
|
||||
@@ -2416,7 +2418,7 @@ Sawing::GenerateExtArcPvPreCut( const ICurveArc* pArc, double dIntRad, double dE
|
||||
//----------------------------------------------------------------------------
|
||||
ICurveComposite*
|
||||
Sawing::GenerateExtArcPvPostCut( const ICurveArc* pArc, double dIntRad, double dExtRad,
|
||||
double dDeltaT, double dSafety)
|
||||
double dDeltaT, double dIntOffs, double dSafety)
|
||||
{
|
||||
// direzione finale del taglio
|
||||
Vector3d vtEndDir ;
|
||||
@@ -2428,6 +2430,8 @@ Sawing::GenerateExtArcPvPostCut( const ICurveArc* pArc, double dIntRad, double d
|
||||
vtEndVer.Normalize() ;
|
||||
if ( ! AreHeadWorkOnSameSide())
|
||||
ptEnd -= vtEndVer * m_TParams.m_dThick ;
|
||||
if ( dIntOffs > EPS_SMALL)
|
||||
ptEnd += vtEndVer * dIntOffs ;
|
||||
// punto dopo fine
|
||||
Point3d ptPost = ptEnd + vtEndDir * dDeltaT ;
|
||||
// punto fuori dopo fine
|
||||
|
||||
@@ -94,9 +94,9 @@ class Sawing : public Machining
|
||||
ICurveComposite* GenerateExtArcPvTrueCut( const ICurveArc* pArc, double dIntRad, double dExtRad,
|
||||
double dSafety) ;
|
||||
ICurveComposite* GenerateExtArcPvPreCut( const ICurveArc* pArc, double dIntRad, double dExtRad,
|
||||
double dDeltaT, double dSafety) ;
|
||||
double dDeltaT, double dIntOffs, double dSafety) ;
|
||||
ICurveComposite* GenerateExtArcPvPostCut( const ICurveArc* pArc, double dIntRad, double dExtRad,
|
||||
double dDeltaT, double dSafety) ;
|
||||
double dDeltaT, double dIntOffs, double dSafety) ;
|
||||
bool GenerateExtCurveCl( const ICurveComposite* pCrv,
|
||||
double dElev, double dExtraCut, const std::string& sName, int nClId) ;
|
||||
bool ProcessIntArc( const ICurve* pCrvP, const ICurveArc* pArcC, const ICurve* pCrvN,
|
||||
|
||||
Reference in New Issue
Block a user