EgtGeomKernel :
- In CalcPocketing, aggiunta inversione dei percorsi.
This commit is contained in:
+9
-4
@@ -1950,7 +1950,7 @@ GetPocketCurvesByCloseEdges( const ISurfFlatRegion* pSfrChunk, const PocketParam
|
||||
vCrvCompoRes_tmp[i]->SetCurveTempParam( 0, GetMinFeed( PockParams) , 0) ; // Feed minima
|
||||
}
|
||||
else { // se trovo intersezione, provo a ruotare di 90°
|
||||
vtStart.Rotate( Z_AX, ANG_RIGHT) ; // verso sinistra
|
||||
vtStart.Rotate( Z_AX, PockParams.bInvert ? - ANG_RIGHT : ANG_RIGHT) ;
|
||||
ptFall = ptStart + vtStart * ( 2 * PockParams.dRad + PockParams.dOpenMinSafe) ;
|
||||
if ( ! pCrvToolShape->Set( ptFall, Z_AX, PockParams.dRad - 100 * EPS_SMALL))
|
||||
return false ;
|
||||
@@ -4379,7 +4379,7 @@ CalcBoundedSmoothedLink( const Point3d& ptStart, const Vector3d& vtStart, const
|
||||
PtrOwner<CurveArc> pCrvCir( CreateBasicCurveArc()) ;
|
||||
if ( IsNull( pCrvCir))
|
||||
return false ;
|
||||
pCrvCir->SetCPAN( Media( ptStart, ptEnd), ptStart, - 360, 0, Z_AX) ;
|
||||
pCrvCir->SetCPAN( Media( ptStart, ptEnd), ptStart, PockParams.bInvert ? 360 : - 360, 0, Z_AX) ;
|
||||
pBiArcLink.Set( pCrvCir->Clone()) ;
|
||||
pCrvLink->AddCurve( pBiArcLink->Clone()) ;
|
||||
return true ;
|
||||
@@ -6451,7 +6451,7 @@ CalcZigZag( const ISurfFlatRegion* pSrfZigZag, const PocketParams& PockParams, I
|
||||
dYStep = PockParams.dSideStep ;
|
||||
}
|
||||
|
||||
int nRef = (( nYStep + ( 1)) % 2) ;
|
||||
int nRef = (( nYStep + ( PockParams.bInvert ? 0 : 1)) % 2) ;
|
||||
|
||||
// tratto valido
|
||||
struct Section {
|
||||
@@ -7093,6 +7093,10 @@ AddOneWay( const ISurfFlatRegion* pSrfPock, const ISurfFlatRegion* pSfrOrig, con
|
||||
if ( IsNull( pLine) || ! pLine->SetPVL( ptStart, X_AX, dDimX + 2 * EXP_LEN))
|
||||
return false ;
|
||||
|
||||
// se richiesta inversione
|
||||
if ( PockParams.bInvert)
|
||||
pLine->Invert() ;
|
||||
|
||||
// linea come composita per Feed ( la dovrò spezzare)
|
||||
PtrOwner<ICurveComposite> pCrvCompo( CreateCurveComposite()) ;
|
||||
if ( IsNull( pCrvCompo))
|
||||
@@ -7144,7 +7148,7 @@ AddOneWay( const ISurfFlatRegion* pSrfPock, const ISurfFlatRegion* pSfrOrig, con
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
CalcPocketing( const ISurfFlatRegion* pSfr, double dRad, double dRadOffs, double dStep, double dAngle,
|
||||
int nType, bool bSmooth, ISurfFlatRegion* pSfrLimit, ICRVCOMPOPOVECTOR& vCrvCompoRes)
|
||||
int nType, bool bSmooth, bool bInvert, ISurfFlatRegion* pSfrLimit, ICRVCOMPOPOVECTOR& vCrvCompoRes)
|
||||
{
|
||||
// controllo dei parametri
|
||||
if ( pSfr == nullptr || ! pSfr->IsValid() ||
|
||||
@@ -7163,6 +7167,7 @@ CalcPocketing( const ISurfFlatRegion* pSfr, double dRad, double dRadOffs, double
|
||||
myParams.bSmooth = bSmooth ;
|
||||
myParams.dAngle = dAngle ;
|
||||
myParams.dSideStep = dStep ;
|
||||
myParams.bInvert = bInvert ;
|
||||
if ( pSfrLimit != nullptr && pSfrLimit->IsValid())
|
||||
myParams.SfrLimit.CopyFrom( pSfrLimit) ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user