EgtGeomKernel 1.9b2 :

- correzioni a Zmap per lavorazioni con lama inclinata.
This commit is contained in:
Dario Sassi
2018-02-09 16:22:36 +00:00
parent 21a1f9e35d
commit 1aa106305a
3 changed files with 86 additions and 88 deletions
+13 -18
View File
@@ -4110,10 +4110,7 @@ VolZmap::CompCyl_Milling( unsigned int nGrid, const Point3d& ptS, const Point3d&
Vector3d vtV2 = vtMoveOrt ; vtV2.Normalize() ;
Vector3d vtV3 = vtV1 ^ vtV2 ;
Frame3d CylFrame ; CylFrame.Set( ptITip, vtV2, vtV3, vtV1) ;
// Verifica se movimento lungo Z
bool bMoveOnZ = ( vtMove.IsZplus() || vtMove.IsZminus()) ;
// Parametri geometrici di moto e cilindro
double dSqRad = dRad * dRad ;
double dLongLen = vtMoveLong.Len() ;
@@ -4175,7 +4172,8 @@ VolZmap::CompCyl_Milling( unsigned int nGrid, const Point3d& ptS, const Point3d&
}
// Poliedro interno
if ( ! bMoveOnZ && IntersLineMyPolyhedron( ptC, Z_AX, CylFrame, dOrtLen, 2 * dRad, dHei, dLongLen, ptInt1, ptInt2, vtN1, vtN2)) {
if ( IntersLineMyPolyhedron( ptC, Z_AX, CylFrame, dOrtLen, 2 * dRad, dHei,
dLongLen, ptInt1, ptInt2, vtN1, vtN2)) {
double dMin, dMax ;
Vector3d vtNmin, vtNmax ;
if ( ptInt1.z < ptInt2.z) {
@@ -4194,8 +4192,8 @@ VolZmap::CompCyl_Milling( unsigned int nGrid, const Point3d& ptS, const Point3d&
}
// Cilindro ellittico di punta
if ( ! bMoveOnZ && IntersLineEllipticalCylinder( Z_AX, ptC, CylFrame, dSqRad,
dLongLen, dOrtLen, bElpsT, bElpsT, ptInt1, ptInt2, vtN1, vtN2)) {
if ( IntersLineEllipticalCylinder( Z_AX, ptC, CylFrame, dSqRad,
dLongLen, dOrtLen, bElpsT, bElpsT, ptInt1, ptInt2, vtN1, vtN2)) {
double dMin, dMax ;
Vector3d vtNmin, vtNmax ;
if ( ptInt1.z < ptInt2.z) {
@@ -4216,7 +4214,7 @@ VolZmap::CompCyl_Milling( unsigned int nGrid, const Point3d& ptS, const Point3d&
// Cilindro ellittico di base: L'unica differenza rispetto a prima è l'origine
// del sistema di riferimento, quindi usiamo lo stesso sistema sommando a ptC
// il vettore che congiunge le due origini.
if ( ! bMoveOnZ && IntersLineEllipticalCylinder( Z_AX, ptC - dHei * vtV1, CylFrame, dSqRad,
if ( IntersLineEllipticalCylinder( Z_AX, ptC - dHei * vtV1, CylFrame, dSqRad,
dLongLen, dOrtLen, bElpsB, bElpsB, ptInt1, ptInt2, vtN1, vtN2)) {
double dMin, dMax ;
Vector3d vtNmin, vtNmax ;
@@ -4271,10 +4269,7 @@ VolZmap::CompConus_Milling( unsigned int nGrid, const Point3d & ptS, const Point
Vector3d vtMove = ptF - ptI ;
Vector3d vtMvLong = ( vtMove * vtToolDir) * vtToolDir ;
Vector3d vtMvOrt = vtMove - vtMvLong ;
// Verifica se movimento lungo Z
bool bMoveOnZ = ( vtMove.IsZplus() || vtMove.IsZminus()) ;
// Terna destrorsa e unitaria
Vector3d vtV1 = vtToolDir ;
Vector3d vtV2 = vtMvOrt ; vtV2.Normalize() ;
@@ -4542,7 +4537,7 @@ VolZmap::CompConus_Milling( unsigned int nGrid, const Point3d & ptS, const Point
}
// Traslazione ellisse di punta
if ( ! bMoveOnZ && IntersLineEllipticalCylinder( Z_AX, ptC - vtV1 * dl, ConusFrame, dSqMinRad,
if ( IntersLineEllipticalCylinder( Z_AX, ptC - vtV1 * dl, ConusFrame, dSqMinRad,
dLongLen, dOrtLen, bElpsT, bElpsT, ptInt1, ptInt2, vtN1, vtN2)) {
double dMin, dMax ;
Vector3d vtNmin, vtNmax ;
@@ -4562,8 +4557,8 @@ VolZmap::CompConus_Milling( unsigned int nGrid, const Point3d & ptS, const Point
}
// Traslazione ellisse di base
if ( ! bMoveOnZ && IntersLineEllipticalCylinder( Z_AX, ptC - vtV1 * dL, ConusFrame, dSqMaxRad,
dLongLen, dOrtLen, bElpsB, bElpsB, ptInt1, ptInt2, vtN1, vtN2)) {
if ( IntersLineEllipticalCylinder( Z_AX, ptC - vtV1 * dL, ConusFrame, dSqMaxRad,
dLongLen, dOrtLen, bElpsB, bElpsB, ptInt1, ptInt2, vtN1, vtN2)) {
double dMin, dMax ;
Vector3d vtNmin, vtNmax ;
if ( ptInt1.z < ptInt2.z) {
@@ -4617,8 +4612,8 @@ VolZmap::CompConus_Milling( unsigned int nGrid, const Point3d & ptS, const Point
}
// Traslazione ellisse
if ( ! bMoveOnZ && IntersLineEllipticalCylinder( Z_AX, ptC - vtV1 * dL, ConusFrame, dSqMaxRad,
dLongLen, dOrtLen, bConeB, bConeB, ptInt1, ptInt2, vtN1, vtN2)) {
if ( IntersLineEllipticalCylinder( Z_AX, ptC - vtV1 * dL, ConusFrame, dSqMaxRad,
dLongLen, dOrtLen, bConeB, bConeB, ptInt1, ptInt2, vtN1, vtN2)) {
double dMin, dMax ;
Vector3d vtNmin, vtNmax ;
if( ptInt1.z < ptInt2.z) {
@@ -4694,7 +4689,7 @@ VolZmap::CompPar_Milling( unsigned int nGrid, double dLenX, double dLenY, double
vtU2.Normalize() ;
Vector3d vtU3 = vtU1 ^ vtU2 ;
Point3d ptOMotion = ( vtMv * vtU1 > 0 ? ptDiagMin : ptDiagMin + vtMv) + vtU3 * ( 0.5 * dLenZ) ;
Point3d ptOMotion = ( bSymmetry2 ? ptDiagMin : ptDiagMin + vtMv) + vtU3 * ( 0.5 * dLenZ) ;
MotionFrame.Set( ptOMotion, vtU2, vtU3, vtU1) ;