diff --git a/Milling.cpp b/Milling.cpp index 488e2cc..bd5d82e 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -1702,7 +1702,7 @@ Milling::ProcessPath( int nPathId, int nPvId, int nClId) // verifico che lo step dell'utensile sia sensato double dOkStep = ( m_Params.m_dStep > EPS_SMALL ? m_Params.m_dStep + EPS_ZERO : 0) ; - const double MIN_ZSTEP = ( m_TParams.m_nType != TT_MILL_POLISHING ? 1.0 : EPS_SMALL) ; + const double MIN_ZSTEP = ( m_TParams.m_nType != TT_MILL_POLISHING ? 0.1 : EPS_SMALL) ; if ( dOkStep >= EPS_SMALL && dOkStep < MIN_ZSTEP) { dOkStep = MIN_ZSTEP + EPS_ZERO ; string sInfo = "Warning in Milling : machining step too small (" + diff --git a/MillingData.h b/MillingData.h index bc219ad..98df5cd 100644 --- a/MillingData.h +++ b/MillingData.h @@ -72,8 +72,8 @@ struct MillingData : public MachiningData m_bToolInvert( false), m_nFaceUse( 0), m_bInvert( false), m_nWorkSide( 0), m_dStartPos( 0), m_dOverlap( 0), m_dStep( 0), m_nStepType( 0), m_dSideAngle( 0), m_dStartAddLen( 0), m_dEndAddLen( 0), - m_bLeaveTab( false), m_dTabLen( 0), m_dTabDist( 0), m_dTabHeight( 0), m_dTabAngle( 0), m_nTabMin( 0), m_nTabMax( 10000), - m_bOscEnable( false), m_dOscHeight( 0), m_dOscRampLen( 0), m_dOscFlatLen( 0), + m_bLeaveTab( false), m_dTabLen( 10), m_dTabDist( 100), m_dTabHeight( 5), m_dTabAngle( 45), m_nTabMin( 0), m_nTabMax( 10000), + m_bOscEnable( false), m_dOscHeight( 10), m_dOscRampLen( 5), m_dOscFlatLen( 10), m_nLeadInType( 0), m_dLiTang( 0), m_dLiPerp( 0), m_dLiElev( 0), m_dLiCompLen( 0), m_nLeadOutType( 0), m_dLoTang( 0), m_dLoPerp( 0), m_dLoElev( 0), m_dLoCompLen( 0) {} MillingData* Clone( void) const override ; diff --git a/Operation.cpp b/Operation.cpp index 6f62bd4..30816ce 100644 --- a/Operation.cpp +++ b/Operation.cpp @@ -344,6 +344,11 @@ Operation::GetPointUnderRaw( const Point3d& ptP, const Vector3d& vtTool, double { // punto a metà lunghezza utensile Point3d ptQ = ptP + vtTool * dToolLen / 2 ; + // box di ingombro dell'utensile + BBox3d b3Tool ; + b3Tool.Set( ptP) ; + b3Tool.Add( ptQ) ; + b3Tool.Expand( dToolRadForElev) ; // direzione di fuga per l'elevazione Vector3d vtDir = vtTool ; if ( vtDir.z < - EPS_SMALL) @@ -358,7 +363,7 @@ Operation::GetPointUnderRaw( const Point3d& ptP, const Vector3d& vtTool, double int nStmId = m_pGeomDB->GetFirstNameInGroup( nRawId, MACH_RAW_SOLID) ; BBox3d b3Raw ; m_pGeomDB->GetGlobalBBox( nStmId, b3Raw) ; - if ( ! b3Raw.IsEmpty() && ( b3Raw.EnclosesXY( ptP) || b3Raw.EnclosesXY( ptQ)) && ptP.z < b3Raw.GetMin().z - 10 * EPS_SMALL) { + if ( ! b3Raw.IsEmpty() && b3Raw.OverlapsXY( b3Tool) && ptP.z < b3Raw.GetMin().z - 10 * EPS_SMALL) { // determino elevazione del punto rispetto al grezzo a metà altezza Point3d ptTest( ptP.x, ptP.y, (( b3Raw.GetMin() + b3Raw.GetMax()) / 2).z) ; double dNewElev ;