EgtMachKernel :
- migliorie varie alla lavorazione di finitura superfici.
This commit is contained in:
+142
-73
@@ -27,6 +27,7 @@
|
||||
#include "/EgtDev/Include/EgkOffsetCurve.h"
|
||||
#include "/EgtDev/Include/EgkOffsetCurveOnX.h"
|
||||
#include "/EgtDev/Include/EGkSfrCreate.h"
|
||||
#include "/EgtDev/Include/EGkSurfLocal.h"
|
||||
#include "/EgtDev/Include/EGkCAvToolSurfTm.h"
|
||||
#include "/EgtDev/Include/EGkIntervals.h"
|
||||
#include "/EgtDev/Include/EGkUserObjFactory.h"
|
||||
@@ -347,6 +348,11 @@ SurfFinishing::SetParam( int nType, double dVal)
|
||||
m_nStatus |= MCH_ST_PARAM_MODIF ;
|
||||
m_Params.m_dStartPos = dVal ;
|
||||
return true ;
|
||||
case MPA_OVERL :
|
||||
if ( ! AreSameLenValue( dVal, m_Params.m_dOverlap))
|
||||
m_nStatus |= MCH_ST_PARAM_MODIF ;
|
||||
m_Params.m_dOverlap = dVal ;
|
||||
return true ;
|
||||
case MPA_SIDESTEP :
|
||||
if ( ! AreSameLenValue( dVal, m_Params.m_dSideStep))
|
||||
m_nStatus |= MCH_ST_PARAM_MODIF ;
|
||||
@@ -378,7 +384,7 @@ SurfFinishing::SetParam( int nType, double dVal)
|
||||
m_Params.m_dLoPerp = dVal ;
|
||||
return true ;
|
||||
case MPA_APPROX :
|
||||
if ( ! AreSameLenValue( dVal, m_Params.m_dApprox))
|
||||
if ( abs( dVal - m_Params.m_dApprox) > EPS_SMALL)
|
||||
m_nStatus |= MCH_ST_PARAM_MODIF ;
|
||||
m_Params.m_dApprox = dVal ;
|
||||
return true ;
|
||||
@@ -691,6 +697,9 @@ SurfFinishing::GetParam( int nType, double& dVal) const
|
||||
case MPA_STARTPOS :
|
||||
dVal = m_Params.m_dStartPos ;
|
||||
return true ;
|
||||
case MPA_OVERL :
|
||||
dVal = m_Params.m_dOverlap ;
|
||||
return true ;
|
||||
case MPA_SIDESTEP :
|
||||
dVal = m_Params.m_dSideStep ;
|
||||
return true ;
|
||||
@@ -1111,6 +1120,56 @@ SurfFinishing::ProcessPath( int nPathId, int nPvId, int nClId)
|
||||
( nSplitArcs == SPLAR_NO_XY_PLANE && ! vtExtr.IsZplus()) ||
|
||||
( nSplitArcs == SPLAR_GEN_PLANE && vtExtr.IsGeneric())) ;
|
||||
|
||||
// predispongo l'ambiente di correzione dei percorsi utensili con le superfici attive dei pezzi
|
||||
PtrOwner<ICAvToolSurfTm> pCAvTlStm( CreateCAvToolSurfTm()) ;
|
||||
if ( IsNull( pCAvTlStm))
|
||||
return false ;
|
||||
if ( abs( m_TParams.m_dSideAng) < EPS_ANG_SMALL) {
|
||||
pCAvTlStm->SetStdTool( m_TParams.m_dLen + GetOffsR(),
|
||||
m_TParams.m_dDiam / 2 + GetOffsR(),
|
||||
m_TParams.m_dCornRad + GetOffsR()) ;
|
||||
}
|
||||
else {
|
||||
double dDelta ;
|
||||
double dSideAngRad = m_TParams.m_dSideAng * DEGTORAD ;
|
||||
if ( m_TParams.m_dSideAng > 0) {
|
||||
if ( m_TParams.m_dCornRad < EPS_SMALL)
|
||||
dDelta = 2 * m_TParams.m_dMaxMat * tan( dSideAngRad) ;
|
||||
else
|
||||
dDelta = 2 * ( m_TParams.m_dCornRad * cos( dSideAngRad) +
|
||||
( m_TParams.m_dMaxMat + m_TParams.m_dCornRad * ( sin( dSideAngRad) - 1)) * tan( dSideAngRad)) ;
|
||||
}
|
||||
else {
|
||||
dDelta = 2 * tan( dSideAngRad) * m_TParams.m_dMaxMat ;
|
||||
}
|
||||
double dStemRad = m_TParams.m_dDiam / 2 + dDelta ;
|
||||
double dTipRad = m_TParams.m_dDiam / 2 ;
|
||||
pCAvTlStm->SetAdvTool( m_TParams.m_dLen + GetOffsR(),
|
||||
dStemRad + GetOffsR(),
|
||||
m_TParams.m_dMaxMat,
|
||||
dTipRad + GetOffsR(),
|
||||
m_TParams.m_dCornRad + GetOffsR()) ;
|
||||
}
|
||||
Frame3d frSurf ;
|
||||
const ISurfTriMesh* pStm = nullptr ;
|
||||
SURFLOCALVECTOR vSrfLoc ;
|
||||
INTVECTOR vSurfId ;
|
||||
GetActiveSurfaces( vSurfId) ;
|
||||
for ( auto nSurfId : vSurfId) {
|
||||
if ( pStm == nullptr) {
|
||||
pStm = GetSurfTriMesh( m_pGeomDB->GetGeoObj( nSurfId)) ;
|
||||
if ( ! m_pGeomDB->GetGlobFrame( nSurfId, frSurf))
|
||||
return false ;
|
||||
pCAvTlStm->SetSurfTm( *pStm) ;
|
||||
}
|
||||
else {
|
||||
vSrfLoc.emplace_back( m_pGeomDB, nSurfId, frSurf) ;
|
||||
pCAvTlStm->AddSurfTm( *GetSurfTriMesh( vSrfLoc.back().Get())) ;
|
||||
}
|
||||
}
|
||||
if ( pStm == nullptr)
|
||||
pCAvTlStm.Reset() ;
|
||||
|
||||
// assegno il vettore estrazione al gruppo del percorso
|
||||
m_pGeomDB->SetInfo( nPxId, KEY_EXTR, vtTool) ;
|
||||
|
||||
@@ -1120,7 +1179,7 @@ SurfFinishing::ProcessPath( int nPathId, int nPvId, int nClId)
|
||||
|
||||
// Eseguo la lavorazione a seconda del tipo
|
||||
double dElev = dDepth ;
|
||||
if ( ! AddZigZag( pCompo, vtTool, vtExtr, dDepth, dElev, bSplitArcs))
|
||||
if ( ! AddZigZag( pCAvTlStm, frSurf, pCompo, vtTool, vtExtr, dDepth, dElev, bSplitArcs))
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -1132,7 +1191,8 @@ SurfFinishing::ProcessPath( int nPathId, int nPvId, int nClId)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
SurfFinishing::AddZigZag( const ICurveComposite* pCompo, const Vector3d& vtTool, const Vector3d& vtExtr,
|
||||
SurfFinishing::AddZigZag( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf,
|
||||
const ICurveComposite* pCompo, const Vector3d& vtTool, const Vector3d& vtExtr,
|
||||
double dDepth, double dElev, bool bSplitArcs)
|
||||
{
|
||||
// recupero distanze di sicurezza
|
||||
@@ -1141,12 +1201,10 @@ SurfFinishing::AddZigZag( const ICurveComposite* pCompo, const Vector3d& vtTool,
|
||||
// lunghezza di approccio/retrazione
|
||||
double dAppr = m_Params.m_dStartPos ;
|
||||
|
||||
// calcolo curva offsettata del raggio utensile + extra
|
||||
double dTRad = 0.5 * m_TParams.m_dDiam ;
|
||||
double dOffs = dTRad ;
|
||||
double dExtra = min( 0.1 * m_TParams.m_dDiam, 2.0) ;
|
||||
// calcolo curva offsettata del raggio utensile
|
||||
double dOffs = m_Params.m_dOverlap - 0.5 * m_TParams.m_dDiam ;
|
||||
OffsetCurve OffsCrv ;
|
||||
if ( ! OffsCrv.Make( pCompo, - ( dOffs + dExtra), ICurve::OFF_FILLET)) {
|
||||
if ( ! OffsCrv.Make( pCompo, dOffs, ICurve::OFF_FILLET)) {
|
||||
m_pMchMgr->SetLastError( 3109, "Error in SurfFinishing : Offset not computable") ;
|
||||
return false ;
|
||||
}
|
||||
@@ -1154,89 +1212,60 @@ SurfFinishing::AddZigZag( const ICurveComposite* pCompo, const Vector3d& vtTool,
|
||||
// ciclo sulle curve risultanti
|
||||
bool bStart = true ;
|
||||
while ( OffsCrv.GetCurveCount() > 0) {
|
||||
|
||||
// recupero la prima curva di offset
|
||||
PtrOwner<ICurveComposite> pOffs( CreateCurveComposite()) ;
|
||||
if ( IsNull( pOffs) || ! pOffs->AddCurve( OffsCrv.GetLongerCurve())) {
|
||||
m_pMchMgr->SetLastError( 3110, "Error in SurfFinishing : Toolpath not computable") ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
// determino il riferimento di base e il box della svuotatura
|
||||
Frame3d frPocket ;
|
||||
Point3d ptCen ; pCompo->GetCentroid( ptCen) ;
|
||||
frPocket.Set( ptCen, vtExtr) ;
|
||||
frPocket.Rotate( ptCen, vtExtr, m_Params.m_dSideAngle) ;
|
||||
pOffs->ToLoc( frPocket) ;
|
||||
|
||||
// calcolo i percorsi di svuotatura
|
||||
ICRVCOMPOPOVECTOR vpCrvs ;
|
||||
if ( ! CalcZigZag( pOffs, vpCrvs))
|
||||
return false ;
|
||||
|
||||
// li correggo per non interferire con le superfici
|
||||
PtrOwner<ICAvToolSurfTm> pCAvTlStm( CreateCAvToolSurfTm()) ;
|
||||
if ( IsNull( pCAvTlStm))
|
||||
return false ;
|
||||
pCAvTlStm->SetStdTool( m_TParams.m_dLen + GetOffsR(),
|
||||
m_TParams.m_dDiam / 2 + GetOffsR(),
|
||||
m_TParams.m_dCornRad + GetOffsR()) ;
|
||||
// recupero le superfici TriMesh dei pezzi in lavorazione
|
||||
int nRawId = m_pMchMgr->GetFirstRawPart() ;
|
||||
int nPartId = m_pMchMgr->GetFirstPartInRawPart( nRawId) ;
|
||||
int nLayId = m_pGeomDB->GetFirstGroupInGroup( nPartId) ;
|
||||
int nEntId = m_pGeomDB->GetFirstInGroup( nLayId) ;
|
||||
while ( nEntId != GDB_ID_NULL) {
|
||||
if ( m_pGeomDB->GetGeoType( nEntId) == SRF_TRIMESH)
|
||||
break ;
|
||||
nEntId = m_pGeomDB->GetNext( nEntId) ;
|
||||
}
|
||||
if ( nEntId != GDB_ID_NULL) {
|
||||
const ISurfTriMesh* pStm = GetSurfTriMesh( m_pGeomDB->GetGeoObj( nEntId)) ;
|
||||
if ( pStm == nullptr)
|
||||
return false ;
|
||||
// recupero il riferimento della superficie
|
||||
Frame3d frSurf ;
|
||||
if ( ! m_pGeomDB->GetGlobFrame( nEntId, frSurf))
|
||||
return false ;
|
||||
// approssimo la curva con una polilinea
|
||||
PolyLine PL ;
|
||||
if ( ! vpCrvs[0]->ApproxWithLines( LIN_TOL_STD, ANG_TOL_STD_DEG, ICurve::APL_SPECIAL, PL))
|
||||
return false ;
|
||||
// eventuale aggiunta di punti per garantire max distanza
|
||||
const double MIN_DIST = 1. ;
|
||||
const double MAX_DIST = 50. ;
|
||||
double dDist = Clamp( m_TParams.m_dDiam / 2, MIN_DIST, MAX_DIST) ;
|
||||
if ( ! PL.AdjustForMaxSegmentLen( dDist))
|
||||
return false ;
|
||||
// porto nel riferimento della superficie
|
||||
PL.LocToLoc( frPocket, frSurf) ;
|
||||
// porto i dati geometrici in locale alla superficie
|
||||
Vector3d vtAxL = vtTool ;
|
||||
vtAxL.ToLoc( frSurf) ;
|
||||
Vector3d vtMoveL = vtAxL ;
|
||||
// traslo della lunghezza utensile diminuita dell'affondamento
|
||||
PL.Translate( vtAxL * ( m_TParams.m_dLen - dDepth)) ;
|
||||
// imposto dati
|
||||
pCAvTlStm->SetSurfTm( *pStm) ;
|
||||
// eseguo CAv
|
||||
if ( ! pCAvTlStm->TestPath( PL.GetUPointList(), vtAxL, vtMoveL, m_Params.m_dApprox))
|
||||
return false ;
|
||||
// contro-traslo della lunghezza utensile
|
||||
PL.Translate( - vtAxL * m_TParams.m_dLen) ;
|
||||
// riporto la polilinea nel riferimento della curva
|
||||
PL.LocToLoc( frSurf, frPocket) ;
|
||||
// elimino i punti allineati
|
||||
PL.RemoveAlignedPoints( 0.8 * m_Params.m_dApprox) ;
|
||||
// creo una curva composita a partire dalla polilinea
|
||||
PtrOwner< ICurveComposite> pCompo( CreateCurveComposite()) ;
|
||||
if ( IsNull( pCompo) || ! pCompo->FromPolyLine( PL))
|
||||
return false ;
|
||||
// sostituisco la vecchia curva con la nuova
|
||||
vpCrvs[0].Set( Release( pCompo )) ;
|
||||
}
|
||||
// ciclo sui percorsi
|
||||
for ( int k = 0 ; k < int( vpCrvs.size()) ; ++ k) {
|
||||
// li correggo per non interferire con le superfici
|
||||
if ( pCAvTlStm != nullptr) {
|
||||
// approssimo la curva con una polilinea
|
||||
PolyLine PL ;
|
||||
if ( ! vpCrvs[k]->ApproxWithLines( LIN_TOL_STD, ANG_TOL_STD_DEG, ICurve::APL_SPECIAL, PL))
|
||||
return false ;
|
||||
// eventuale aggiunta di punti per garantire max distanza
|
||||
const double MIN_DIST = 1. ;
|
||||
const double MAX_DIST = 50. ;
|
||||
double dDist = Clamp( m_TParams.m_dDiam / 2, MIN_DIST, MAX_DIST) ;
|
||||
if ( ! PL.AdjustForMaxSegmentLen( dDist))
|
||||
return false ;
|
||||
// porto nel riferimento delle superfici
|
||||
PL.LocToLoc( frPocket, frSurf) ;
|
||||
// porto i dati geometrici in locale alle superfici
|
||||
Vector3d vtAxL = vtTool ;
|
||||
vtAxL.ToLoc( frSurf) ;
|
||||
Vector3d vtMoveL = vtAxL ;
|
||||
// traslo della lunghezza utensile diminuita dell'affondamento
|
||||
PL.Translate( vtAxL * ( m_TParams.m_dLen - dDepth)) ;
|
||||
// eseguo CAv
|
||||
if ( ! pCAvTlStm->TestPath( PL.GetUPointList(), vtAxL, vtMoveL, m_Params.m_dApprox))
|
||||
return false ;
|
||||
// contro-traslo della lunghezza utensile
|
||||
PL.Translate( - vtAxL * m_TParams.m_dLen) ;
|
||||
// riporto la polilinea nel riferimento della curva
|
||||
PL.LocToLoc( frSurf, frPocket) ;
|
||||
// elimino i punti allineati
|
||||
PL.RemoveAlignedPoints( 0.8 * m_Params.m_dApprox) ;
|
||||
// creo una curva composita a partire dalla polilinea
|
||||
PtrOwner< ICurveComposite> pCompo( CreateCurveComposite()) ;
|
||||
if ( IsNull( pCompo) || ! pCompo->FromPolyLine( PL))
|
||||
return false ;
|
||||
// sostituisco la vecchia curva con la nuova
|
||||
vpCrvs[k].Set( Release( pCompo )) ;
|
||||
}
|
||||
// ciclo sulle curve elementari
|
||||
int nMaxInd = vpCrvs[k]->GetCurveCount() - 1 ;
|
||||
for ( int i = 0 ; i <= nMaxInd ; ++ i) {
|
||||
@@ -1339,6 +1368,46 @@ SurfFinishing::AddZigZag( const ICurveComposite* pCompo, const Vector3d& vtTool,
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
SurfFinishing::GetActiveSurfaces( INTVECTOR& vSurfId)
|
||||
{
|
||||
// pulisco vettore superfici
|
||||
vSurfId.clear() ;
|
||||
// verifiche
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
// ciclo sui grezzi attivi nella fase
|
||||
int nRawId = m_pMchMgr->GetFirstRawPart() ;
|
||||
while ( nRawId != GDB_ID_NULL) {
|
||||
if ( m_pMchMgr->VerifyRawPartPhase(nRawId, m_nPhase)) {
|
||||
// ciclo sui pezzi del grezzo
|
||||
int nPartId = m_pMchMgr->GetFirstPartInRawPart( nRawId) ;
|
||||
while ( nPartId != GDB_ID_NULL) {
|
||||
// ciclo sui layer dei pezzi
|
||||
int nLayId = m_pGeomDB->GetFirstGroupInGroup( nPartId) ;
|
||||
while ( nLayId != GDB_ID_NULL) {
|
||||
// ciclo sulle entità del layer
|
||||
int nEntId = m_pGeomDB->GetFirstInGroup( nLayId) ;
|
||||
while ( nEntId != GDB_ID_NULL) {
|
||||
// se entità superficie e visibile, la aggiungo
|
||||
int nStat ;
|
||||
if ( m_pGeomDB->GetGeoType( nEntId) == SRF_TRIMESH &&
|
||||
m_pGeomDB->GetCalcStatus( nEntId, nStat) && nStat != GDB_ST_OFF)
|
||||
vSurfId.emplace_back( nEntId) ;
|
||||
// passo alla entità successiva
|
||||
nEntId = m_pGeomDB->GetNext( nEntId) ;
|
||||
}
|
||||
nLayId =m_pGeomDB->GetNextGroup( nLayId) ;
|
||||
}
|
||||
nPartId = m_pMchMgr->GetNextPartInRawPart( nPartId) ;
|
||||
}
|
||||
}
|
||||
nRawId = m_pMchMgr->GetNextRawPart( nRawId) ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
SurfFinishing::CalcZigZag( const ICurveComposite* pOffs,
|
||||
|
||||
+6
-2
@@ -20,6 +20,8 @@
|
||||
#include "/EgtDev/Include/EGkCurveComposite.h"
|
||||
#include "/EgtDev/Include/EgtNumUtils.h"
|
||||
|
||||
class ICAvToolSurfTm ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class SurfFinishing : public Machining
|
||||
{
|
||||
@@ -71,7 +73,8 @@ class SurfFinishing : public Machining
|
||||
bool GetCurves( SelData Id, ICURVEPLIST& lstPC) ;
|
||||
bool Chain( int nGrpDestId) ;
|
||||
bool ProcessPath( int nPathId, int nPvId, int nClId) ;
|
||||
bool AddZigZag( const ICurveComposite* pCompo, const Vector3d& vtTool, const Vector3d& vtExtr,
|
||||
bool AddZigZag( ICAvToolSurfTm* pCAvTlStm, const Frame3d& frSurf,
|
||||
const ICurveComposite* pCompo, const Vector3d& vtTool, const Vector3d& vtExtr,
|
||||
double dDepth, double dElev, bool bSplitArcs) ;
|
||||
bool CalcZigZag( const ICurveComposite* pOffs, ICRVCOMPOPOVECTOR& vpCrvs) ;
|
||||
bool AddApproach( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, double dElev, double dAppr) ;
|
||||
@@ -81,6 +84,7 @@ class SurfFinishing : public Machining
|
||||
bool CalcLeadInStart( const Point3d& ptStart, const Vector3d& vtStart, const Vector3d& vtN, Point3d& ptP1) ;
|
||||
bool AddLeadIn( const Point3d& ptP1, const Point3d& ptStart, const Vector3d& vtStart, const Vector3d& vtN) ;
|
||||
bool AddLeadOut( const Point3d& ptEnd, const Vector3d& vtEnd, const Vector3d& vtN, Point3d& ptP1) ;
|
||||
bool GetActiveSurfaces( INTVECTOR& vSurfId) ;
|
||||
|
||||
private :
|
||||
double GetSpeed() const
|
||||
@@ -96,7 +100,7 @@ class SurfFinishing : public Machining
|
||||
double GetOffsR() const
|
||||
{ return ( IsUnknownValue( m_Params.m_dOffsR) ? m_TParams.m_dOffsR : m_Params.m_dOffsR) ; }
|
||||
double GetSideStep( void) const
|
||||
{ return Clamp( m_Params.m_dSideStep, std::min( 0.1 * m_TParams.m_dDiam, 1.0), m_TParams.m_dDiam) ; }
|
||||
{ return Clamp( m_Params.m_dSideStep, std::min( 0.1 * m_TParams.m_dDiam, 0.5), m_TParams.m_dTDiam) ; }
|
||||
|
||||
private :
|
||||
SELVECTOR m_vId ; // identificativi entità geometriche da lavorare
|
||||
|
||||
+15
-1
@@ -46,6 +46,7 @@ enum nSurfFinishingKey {
|
||||
KEY_NNS,
|
||||
KEY_NNU,
|
||||
KEY_OR,
|
||||
KEY_OVL,
|
||||
KEY_PS,
|
||||
KEY_S,
|
||||
KEY_SA,
|
||||
@@ -78,6 +79,7 @@ static const std::array<std::string,KEY_ZZZ> sSurfFinishingKey = {
|
||||
"NNS",
|
||||
"NNU",
|
||||
"OR",
|
||||
"OVL",
|
||||
"PS",
|
||||
"S",
|
||||
"SA",
|
||||
@@ -135,6 +137,7 @@ SurfFinishingData::CopyFrom( const MachiningData* pMdata)
|
||||
m_bInvert = pSdata->m_bInvert ;
|
||||
m_sDepth = pSdata->m_sDepth ;
|
||||
m_dStartPos = pSdata->m_dStartPos ;
|
||||
m_dOverlap = pSdata->m_dOverlap ;
|
||||
m_dSideStep = pSdata->m_dSideStep ;
|
||||
m_nSubType = pSdata->m_nSubType ;
|
||||
m_dSideAngle = pSdata->m_dSideAngle ;
|
||||
@@ -179,6 +182,7 @@ SurfFinishingData::SameAs(const MachiningData* pMdata) const
|
||||
m_bInvert == pSdata->m_bInvert &&
|
||||
m_sDepth == pSdata->m_sDepth &&
|
||||
abs( m_dStartPos - pSdata->m_dStartPos) < EPS_MACH_LEN_PAR &&
|
||||
abs( m_dOverlap - pSdata->m_dOverlap) < EPS_MACH_LEN_PAR &&
|
||||
abs( m_dSideStep - pSdata->m_dSideStep) < EPS_MACH_LEN_PAR &&
|
||||
m_nSubType == pSdata->m_nSubType &&
|
||||
abs( m_dSideAngle - pSdata->m_dSideAngle) < EPS_MACH_ANG_PAR &&
|
||||
@@ -293,6 +297,9 @@ SurfFinishingData::FromString( const string& sString, int& nKey)
|
||||
case KEY_OR :
|
||||
bOk = ::FromString( sVal, m_dOffsR) ;
|
||||
break ;
|
||||
case KEY_OVL :
|
||||
bOk = ::FromString( sVal, m_dOverlap) ;
|
||||
break ;
|
||||
case KEY_PS :
|
||||
bOk = ::FromString( sVal, m_dStartPos) ;
|
||||
break ;
|
||||
@@ -352,6 +359,7 @@ SurfFinishingData::ToString( int nInd) const
|
||||
case KEY_NNS : return ( sSurfFinishingKey[KEY_NNS] + "=" + m_sSysNotes) ;
|
||||
case KEY_NNU : return ( sSurfFinishingKey[KEY_NNU] + "=" + m_sUserNotes) ;
|
||||
case KEY_OR : return ( sSurfFinishingKey[KEY_OR] + "=" + ::ToString( m_dOffsR)) ;
|
||||
case KEY_OVL : return ( sSurfFinishingKey[KEY_OVL] + "=" + ::ToString( m_dOverlap)) ;
|
||||
case KEY_PS : return ( sSurfFinishingKey[KEY_PS] + "=" + ::ToString( m_dStartPos)) ;
|
||||
case KEY_S : return ( sSurfFinishingKey[KEY_S] + "=" + ::ToString( m_dSpeed)) ;
|
||||
case KEY_SA : return ( sSurfFinishingKey[KEY_SA] + "=" + ::ToString( m_dSideAngle)) ;
|
||||
@@ -369,7 +377,7 @@ SurfFinishingData::ToString( int nInd) const
|
||||
bool
|
||||
SurfFinishingData::IsOptional( int nKey) const
|
||||
{
|
||||
return ( nKey == KEY_AB || nKey == KEY_AI) ;
|
||||
return ( nKey == KEY_AB || nKey == KEY_AI || nKey == KEY_OVL) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -509,6 +517,9 @@ SurfFinishingData::SetParam( int nType, double dVal)
|
||||
case MPA_STARTPOS :
|
||||
m_dStartPos = dVal ;
|
||||
return true ;
|
||||
case MPA_OVERL :
|
||||
m_dOverlap = dVal ;
|
||||
return true ;
|
||||
case MPA_SIDESTEP :
|
||||
m_dSideStep = dVal ;
|
||||
return true ;
|
||||
@@ -644,6 +655,9 @@ SurfFinishingData::GetParam( int nType, double& dVal) const
|
||||
case MPA_STARTPOS :
|
||||
dVal = m_dStartPos ;
|
||||
return true ;
|
||||
case MPA_OVERL :
|
||||
dVal = m_dOverlap ;
|
||||
return true ;
|
||||
case MPA_SIDESTEP :
|
||||
dVal = m_dSideStep ;
|
||||
return true ;
|
||||
|
||||
+2
-1
@@ -32,6 +32,7 @@ struct SurfFinishingData : public MachiningData
|
||||
bool m_bInvert ; // flag di inversione direzione lavorazione
|
||||
std::string m_sDepth ; // affondamento massimo (espressione numerica)
|
||||
double m_dStartPos ; // quota di inizio lavorazione (sempre >= 0)
|
||||
double m_dOverlap ; // distanza di sovrapposizione con il contorno
|
||||
double m_dSideStep ; // distanza tra le passate
|
||||
int m_nSubType ; // tipo di lavorazione ( ZigZag, OneWay, SpiralIn, SpiralOut)
|
||||
double m_dSideAngle ; // angolo dello ZigZag da X+ locale
|
||||
@@ -49,7 +50,7 @@ struct SurfFinishingData : public MachiningData
|
||||
SurfFinishingData( void)
|
||||
: m_ToolUuid(), m_nSolCh( 0), m_dSpeed( 0), m_dFeed( 0), m_dStartFeed( 0), m_dEndFeed( 0), m_dTipFeed( 0),
|
||||
m_dOffsR( UNKNOWN_PAR), m_bInvert( false),
|
||||
m_dStartPos( 0), m_dSideStep( 0), m_nSubType( 0), m_dSideAngle( 0),
|
||||
m_dStartPos( 0), m_dOverlap(0), m_dSideStep( 0), m_nSubType( 0), m_dSideAngle( 0),
|
||||
m_nLeadInType( 0), m_dLiTang( 0), m_dLiPerp( 0),
|
||||
m_nLeadOutType( 0), m_dLoTang( 0), m_dLoPerp( 0), m_nLeadLinkType( 0), m_dApprox( 0) {}
|
||||
SurfFinishingData* Clone( void) const override ;
|
||||
|
||||
Reference in New Issue
Block a user