EgtGeomKernel 1.6w3 :
- correzioni nell'intersezione di archi tangenti o quasi - pulizia uso distanze e relative costanti minime.
This commit is contained in:
+11
-18
@@ -346,7 +346,7 @@ VolZmap::MillingStep( const Point3d& ptPs, const Vector3d& vtDs, const Point3d&
|
||||
Vector3d vtTOrt = vtTest - vtTLong ;
|
||||
|
||||
// Movimento parallelo alla direzione dell'utensile (foratura)
|
||||
if ( vtTOrt.SqLen() < EPS_SMALL * EPS_SMALL) {
|
||||
if ( vtTOrt.IsSmall()) {
|
||||
if ( m_nToolType == 0)
|
||||
return DrillingGT( ptLs, ptLe, vtDir) ;
|
||||
else
|
||||
@@ -354,7 +354,7 @@ VolZmap::MillingStep( const Point3d& ptPs, const Vector3d& vtDs, const Point3d&
|
||||
}
|
||||
|
||||
// Movimento perpendicolare alla direzione dell'utensile
|
||||
if ( vtTLong.SqLen() < EPS_SMALL * EPS_SMALL) {
|
||||
if ( vtTLong.IsSmall()) {
|
||||
if ( m_nToolType == GenericTool)
|
||||
return MillingGT( ptLs, ptLe, vtDir) ;
|
||||
else
|
||||
@@ -375,7 +375,7 @@ VolZmap::MillingStep( const Point3d& ptPs, const Vector3d& vtDs, const Point3d&
|
||||
return MillingGT( ptLs, ptLe, vtDir) ;
|
||||
|
||||
// Movimento verticale
|
||||
if ( SqDistXY( ptLs, ptLe) < EPS_SMALL * EPS_SMALL)
|
||||
if ( AreSamePointXYApprox( ptLs, ptLe))
|
||||
return MillingXYVert( ptLs, ptLe, vtDir) ;
|
||||
|
||||
// Grandezze geometriche per selezione
|
||||
@@ -384,11 +384,11 @@ VolZmap::MillingStep( const Point3d& ptPs, const Vector3d& vtDs, const Point3d&
|
||||
Vector3d vtTOrt = vtMove - ( vtMove * vtDir) * vtDir ;
|
||||
|
||||
// Movimento LongVert
|
||||
if ( vtTOrt.SqLenXY() < EPS_SMALL * EPS_SMALL)
|
||||
if ( vtTOrt.IsSmallXY())
|
||||
return MillingXYLongVert( ptLs, ptLe, vtDir) ;
|
||||
|
||||
// Movimento perpendicolare alla direzione dell'utensile
|
||||
if ( vtTLong.SqLenXY() < EPS_SMALL * EPS_SMALL)
|
||||
if ( vtTLong.IsSmallXY())
|
||||
return MillingXY( ptLs, ptLe, vtDir) ;
|
||||
|
||||
// Movimento generico con versore direzione nel piano
|
||||
@@ -403,7 +403,7 @@ VolZmap::MillingStep( const Point3d& ptPs, const Vector3d& vtDs, const Point3d&
|
||||
Vector3d vtOrt = vtMove - ( vtMove * vtLs) * vtLs ;
|
||||
|
||||
// Drilling
|
||||
if ( vtOrt.SqLen() < EPS_SMALL * EPS_SMALL) {
|
||||
if ( vtOrt.IsSmall()) {
|
||||
if ( m_nToolType == GenericTool)
|
||||
return DrillingGT( ptLs, ptLe, vtLs) ;
|
||||
else
|
||||
@@ -7286,12 +7286,9 @@ VolZmap::MillCyl2( const Point3d& ptLs, const Point3d& ptLe, const Vector3d& vtT
|
||||
bool
|
||||
VolZmap::MillBall( const Point3d& ptLs, const Point3d& ptLe, const Vector3d& vtToolDir, double dRad)
|
||||
{
|
||||
double dMin, dMax ;
|
||||
unsigned int nStartI, nStartJ, nEndI, nEndJ ;
|
||||
|
||||
bool Control = BBoxComponent( ptLs, ptLe, vtToolDir, vtToolDir, nStartI, nStartJ, nEndI, nEndJ, dRad, 0, 0) ;
|
||||
|
||||
if ( ! Control)
|
||||
bool bControl = BBoxComponent( ptLs, ptLe, vtToolDir, vtToolDir, nStartI, nStartJ, nEndI, nEndJ, dRad, 0, 0) ;
|
||||
if ( ! bControl)
|
||||
return true ;
|
||||
|
||||
Point3d ptI = ( ptLs.z < ptLe.z ? ptLs : ptLe) ;
|
||||
@@ -7300,14 +7297,9 @@ VolZmap::MillBall( const Point3d& ptLs, const Point3d& ptLe, const Vector3d& vtT
|
||||
Point3d ptIxy( ptI.x, ptI.y, 0) ;
|
||||
|
||||
Vector3d vtMove = ptF - ptI ;
|
||||
Vector3d vtMoveXY( vtMove.x, vtMove.y, 0) ;
|
||||
|
||||
if ( vtMove.x * vtMove.x + vtMove.y * vtMove.y < EPS_SMALL * EPS_SMALL)
|
||||
|
||||
vtMoveXY = ( ( 1 / sqrt( vtMove.x * vtMove.x + vtMove.y * vtMove.y)) * vtMoveXY) ;
|
||||
|
||||
Vector3d vtV1 = vtMoveXY ; vtV1.Normalize() ;
|
||||
Vector3d vtV2 = vtV1 ; vtV2.Rotate( Z_AX, 90) ;
|
||||
Vector3d vtV1( vtMove.x, vtMove.y, 0) ; vtV1.Normalize() ;
|
||||
Vector3d vtV2( vtV1) ; vtV2.Rotate( Z_AX, 90) ;
|
||||
|
||||
double dZI = ptI.z ;
|
||||
double dDeltaZ = ptF.z - ptI.z ;
|
||||
@@ -7316,6 +7308,7 @@ VolZmap::MillBall( const Point3d& ptLs, const Point3d& ptLe, const Vector3d& vtT
|
||||
double dSin = dPLen / vtMove.Len() ;
|
||||
double dCos = dDeltaZ / vtMove.Len() ;
|
||||
|
||||
double dMin, dMax ;
|
||||
for ( unsigned int i = nStartI ; i <= nEndI ; ++ i) {
|
||||
|
||||
for ( unsigned int j = nStartJ ; j <= nEndJ ; ++ j) {
|
||||
|
||||
Reference in New Issue
Block a user