EgtGeomKernel 1.9i2 :
- migliorie a Vmill con chisel e mortiser.
This commit is contained in:
+9
-23
@@ -1169,30 +1169,16 @@ VolZmap::IntersLineMyPolyhedron( const Point3d& ptLineSt, const Vector3d& vtLine
|
||||
const Frame3d& PolyFrame, double dLenX, double dLenY, double dLenZ, double dDeltaZ,
|
||||
Point3d& ptInt1, Point3d& ptInt2, Vector3d& vtN1, Vector3d& vtN2)
|
||||
{
|
||||
// Costanti degli Offset
|
||||
const double dOffsetX = EPS_SMALL ;
|
||||
const double dOffsetY = EPS_SMALL ;
|
||||
const double dOffsetZ = EPS_SMALL * sqrt( 1 + ( dDeltaZ * dDeltaZ) / ( dLenX * dLenX)) ;
|
||||
|
||||
// Controllo sulle dimensioni lineari affinché sia valido l'offset
|
||||
if ( dLenX <= 2 * dOffsetX || dLenY <= 2 * dOffsetY || dLenZ <= 2 * dOffsetZ)
|
||||
// Controllo sulle dimensioni lineari affinché sia valido il poliedro
|
||||
if ( dLenX <= 0 || dLenY <= 0 || dLenZ <= 0)
|
||||
return false ;
|
||||
|
||||
// Accorcio le dimensioni lineari in modo opportuno: si noti che ora dLenX > 0 e ( 1 - 2 * EPS_SMALL / dLenX) < 1
|
||||
dLenX -= 2 * dOffsetX ;
|
||||
dLenY -= 2 * dOffsetY ;
|
||||
dLenZ -= 2 * dOffsetZ ;
|
||||
dDeltaZ = dDeltaZ * ( 1 - ( 2 * EPS_SMALL) / dLenX) ;
|
||||
// Riferimento del poliedro offsettato
|
||||
Frame3d frInnerFrame = PolyFrame ;
|
||||
frInnerFrame.Translate( dOffsetX * frInnerFrame.VersX() + ( dOffsetZ + EPS_SMALL * dDeltaZ / dLenX) * frInnerFrame.VersZ()) ;
|
||||
|
||||
|
||||
Point3d ptP = ptLineSt ;
|
||||
Vector3d vtV = vtLineDir ;
|
||||
|
||||
// Trasformazione delle coordinate
|
||||
ptP.ToLoc( frInnerFrame) ;
|
||||
vtV.ToLoc( frInnerFrame) ;
|
||||
ptP.ToLoc( PolyFrame) ;
|
||||
vtV.ToLoc( PolyFrame) ;
|
||||
|
||||
// Facce 1 e 2 parallele a XY
|
||||
// Facce 3 e 4 parallele a XZ
|
||||
@@ -1322,10 +1308,10 @@ VolZmap::IntersLineMyPolyhedron( const Point3d& ptLineSt, const Vector3d& vtLine
|
||||
}
|
||||
|
||||
if ( nIntNum == 2) {
|
||||
ptInt1.ToGlob( frInnerFrame) ;
|
||||
ptInt2.ToGlob( frInnerFrame) ;
|
||||
vtN1.ToGlob( frInnerFrame) ;
|
||||
vtN2.ToGlob( frInnerFrame) ;
|
||||
ptInt1.ToGlob( PolyFrame) ;
|
||||
ptInt2.ToGlob( PolyFrame) ;
|
||||
vtN1.ToGlob( PolyFrame) ;
|
||||
vtN2.ToGlob( PolyFrame) ;
|
||||
return true ;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user