EgtMachKernel 1.9b2 :
- corretto senso rotazione archi con inversione direzione utensile.
This commit is contained in:
+12
-5
@@ -256,14 +256,21 @@ Operation::AddArcMove( const Point3d& ptP, const Point3d& ptCen, double dAngCen,
|
||||
PtrOwner<ICurveArc> pArc( CreateCurveArc()) ;
|
||||
if ( IsNull( pArc))
|
||||
return GDB_ID_NULL ;
|
||||
// verifico normale arco rispetto a versore utensile, ed eventualmente modifico opportunamente
|
||||
Vector3d vtMyN = vtN ;
|
||||
double dMyAngCen = dAngCen ;
|
||||
if ( vtMyN * m_vtTool < - EPS_ZERO) {
|
||||
vtMyN = - vtMyN ;
|
||||
dMyAngCen = - dMyAngCen ;
|
||||
}
|
||||
// assegno i dati dell'arco
|
||||
double dDeltaZ = ( ptP - m_ptCurr) * vtN ;
|
||||
if ( ! pArc->SetCPAN( ptCen, m_ptCurr, dAngCen, dDeltaZ, vtN))
|
||||
double dDeltaZ = ( ptP - m_ptCurr) * vtMyN ;
|
||||
if ( ! pArc->SetCPAN( ptCen, m_ptCurr, dMyAngCen, dDeltaZ, vtMyN))
|
||||
return GDB_ID_NULL ;
|
||||
Point3d ptFin ;
|
||||
if ( ! pArc->GetEndPoint( ptFin) || ! AreSamePointApprox( ptFin, ptP))
|
||||
return GDB_ID_NULL ;
|
||||
int nMove = ( dAngCen > 0 ? 3 : 2) ;
|
||||
int nMove = ( dMyAngCen > 0 ? 3 : 2) ;
|
||||
// inserisco l'oggetto nel DB geometrico
|
||||
int nId = m_pGeomDB->AddGeoObj( GDB_ID_NULL, m_nPathId, Release( pArc)) ;
|
||||
if ( nId == GDB_ID_NULL)
|
||||
@@ -279,9 +286,9 @@ Operation::AddArcMove( const Point3d& ptP, const Point3d& ptCen, double dAngCen,
|
||||
pCam->SetAuxDir( m_vtAux) ;
|
||||
pCam->SetEndPoint( ptP) ;
|
||||
pCam->SetCenter( ptCen) ;
|
||||
pCam->SetAngCen( dAngCen) ;
|
||||
pCam->SetAngCen( dMyAngCen) ;
|
||||
pCam->SetDeltaN( dDeltaZ) ;
|
||||
pCam->SetNormDir( vtN) ;
|
||||
pCam->SetNormDir( vtMyN) ;
|
||||
pCam->SetFeed( m_dFeed) ;
|
||||
pCam->SetFlag( m_nFlag) ;
|
||||
// associo questo oggetto a quello geometrico
|
||||
|
||||
Reference in New Issue
Block a user