EgtMachKernel 1.8c1 :
- liberalizzati nomi di utensili e lavorazioni (ora vietato solo carattere '\n') - migliorati controlli su reset lavorazione corrente - corretta elevazione di fresatura, svuotatura e scalpellatura quando percorso su superficie superiore del grezzo - corretto controllo step di fresatura e svuotatura quando nullo.
This commit is contained in:
+1
-1
@@ -1039,7 +1039,7 @@ Chiseling::ProcessPath( int nPathId, int nPvId, int nClId)
|
||||
if ( dElev < EPS_SMALL && AreSameVectorApprox( vtExtr, Z_AX)) {
|
||||
BBox3d b3Crv ;
|
||||
pCompo->GetLocalBBox( b3Crv) ;
|
||||
dElev = max( 0., b3Raw.GetMax().z - b3Crv.GetMin().z + dDepth) ;
|
||||
dElev = max( 0., b3Raw.GetMax().z - b3Crv.GetMin().z + min( 0., dThick) + dDepth) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Binary file not shown.
+1
-1
@@ -1035,7 +1035,7 @@ GenMachining::ProcessPath( int nPathId, int nPvId, int nClId)
|
||||
if ( dElev < EPS_SMALL && AreSameVectorApprox( vtExtr, Z_AX)) {
|
||||
BBox3d b3Crv ;
|
||||
pCompo->GetLocalBBox( b3Crv) ;
|
||||
dElev = max( 0., b3Raw.GetMax().z - b3Crv.GetMin().z + dDepth) ;
|
||||
dElev = max( 0., b3Raw.GetMax().z - b3Crv.GetMin().z + min( 0., dThick) + dDepth) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "MachConst.h"
|
||||
#include "Disposition.h"
|
||||
#include "/EgtDev/Include/EGkGdbIterator.h"
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
#include "/EgtDev/Include/EGnStringKeyVal.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
|
||||
using namespace std ;
|
||||
@@ -78,7 +78,7 @@ MachMgr::GetMachGroupNewName( string& sName) const
|
||||
if ( sName.empty())
|
||||
sName = "Mach" ;
|
||||
// se presenti caratteri vietati, li sostituisco
|
||||
ValidateName( sName) ;
|
||||
ValidateVal( sName) ;
|
||||
// verifico che il nome sia unico
|
||||
int nCount = 0 ;
|
||||
string sOrigName = sName ;
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ bool
|
||||
MachMgr::LoadMachine( const string& sMachineName)
|
||||
{
|
||||
// verifico validità del nome
|
||||
if ( ! IsValidName( sMachineName))
|
||||
if ( ! IsValidFileName( sMachineName))
|
||||
return false ;
|
||||
// se macchina già caricata, non devo fare alcunchè
|
||||
if ( GetMachine( sMachineName) != - 1)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "/EgtDev/Include/EMkOperationConst.h"
|
||||
#include "/EgtDev/Include/EGkUserObjFactory.h"
|
||||
#include "/EgtDev/Include/EGkGdbIterator.h"
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
#include "/EgtDev/Include/EGnStringKeyVal.h"
|
||||
#include "/EgtDev/Include/EGnFileUtils.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
|
||||
@@ -232,7 +232,7 @@ MachMgr::GetOperationNewName( string& sName) const
|
||||
if ( sName.empty())
|
||||
sName = "Oper" ;
|
||||
// se presenti caratteri vietati, li sostituisco
|
||||
ValidateName( sName) ;
|
||||
ValidateVal( sName) ;
|
||||
// verifico che il nome sia unico
|
||||
int nCount = 0 ;
|
||||
string sOrigName = sName ;
|
||||
|
||||
+20
-6
@@ -1,13 +1,14 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2017
|
||||
//----------------------------------------------------------------------------
|
||||
// File : MachiningsMgr.cpp Data : 15.01.17 Versione : 1.6x7
|
||||
// File : MachiningsMgr.cpp Data : 02.03.17 Versione : 1.8c1
|
||||
// Contenuto : Implementazione gestore database lavorazioni.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 02.06.15 DS Creazione modulo.
|
||||
// 13.07.16 DS Agg. gestione SplitArcs (MF_CURR_VER = 1005).
|
||||
// 02.03.17 DS Aggiunto controllo nome.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -496,8 +497,13 @@ bool
|
||||
MachiningsMgr::AddMachining( const string& sName, int nType)
|
||||
{
|
||||
// annullo lavorazione corrente
|
||||
if ( m_pCurrMach != nullptr)
|
||||
if ( m_pCurrMach != nullptr) {
|
||||
delete m_pCurrMach ;
|
||||
m_pCurrMach = nullptr ;
|
||||
}
|
||||
// verifico validità del nome
|
||||
if ( ! IsValidVal( sName))
|
||||
return false ;
|
||||
// verifico unicità del nome
|
||||
if ( m_suData.find( sName) != m_suData.end())
|
||||
return false ;
|
||||
@@ -528,8 +534,13 @@ bool
|
||||
MachiningsMgr::CopyMachining( const string& sSource, const string& sName)
|
||||
{
|
||||
// annullo lavorazione corrente
|
||||
if ( m_pCurrMach != nullptr)
|
||||
if ( m_pCurrMach != nullptr) {
|
||||
delete m_pCurrMach ;
|
||||
m_pCurrMach = nullptr ;
|
||||
}
|
||||
// verifico validità del nome
|
||||
if ( ! IsValidVal( sName))
|
||||
return false ;
|
||||
// verifico unicità del nome
|
||||
if ( m_suData.find( sName) != m_suData.end())
|
||||
return false ;
|
||||
@@ -658,9 +669,10 @@ bool
|
||||
MachiningsMgr::SetCurrMachining( const string& sName)
|
||||
{
|
||||
// se c'è lavorazione corrente, la elimino
|
||||
if ( m_pCurrMach != nullptr)
|
||||
if ( m_pCurrMach != nullptr) {
|
||||
delete m_pCurrMach ;
|
||||
m_pCurrMach = nullptr ;
|
||||
m_pCurrMach = nullptr ;
|
||||
}
|
||||
// recupero i dati della lavorazione
|
||||
const MachiningData* pMdata = GetMachining( sName) ;
|
||||
if ( pMdata == nullptr)
|
||||
@@ -802,8 +814,10 @@ MachiningsMgr::SetCurrMachiningParam( int nType, const std::string& sVal)
|
||||
// non è possibile cambiare UUID e Tool UUID
|
||||
if ( nType == MPA_UUID || nType == MPA_TUUID)
|
||||
return false ;
|
||||
// è possibile cambiare il nome, solo se il nuovo non è già presente nel DB (esclusa lavorazione corrente)
|
||||
// è possibile cambiare il nome, solo se il nuovo è valido e non è già presente nel DB (esclusa lavorazione corrente)
|
||||
if ( nType == MPA_NAME) {
|
||||
if ( ! IsValidVal( sVal))
|
||||
return false ;
|
||||
const MachiningData* pMch = GetMachining( sVal) ;
|
||||
if ( pMch != nullptr && pMch->m_Uuid != m_pCurrMach->m_Uuid)
|
||||
return false ;
|
||||
|
||||
+2
-2
@@ -1235,7 +1235,7 @@ Milling::ProcessPath( int nPathId, int nPvId, int nClId)
|
||||
if ( dElev < EPS_SMALL && AreSameVectorApprox( vtExtr, Z_AX)) {
|
||||
BBox3d b3Crv ;
|
||||
pCompo->GetLocalBBox( b3Crv) ;
|
||||
dElev = max( 0., b3Raw.GetMax().z - b3Crv.GetMin().z + dDepth) ;
|
||||
dElev = max( 0., b3Raw.GetMax().z - b3Crv.GetMin().z + min( 0., dThick) + dDepth) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1244,7 +1244,7 @@ Milling::ProcessPath( int nPathId, int nPvId, int nClId)
|
||||
// verifico che lo step dell'utensile sia sensato
|
||||
double dOkStep = m_Params.m_dStep ;
|
||||
const double MIN_ZSTEP = 1.0 ;
|
||||
if ( dOkStep < MIN_ZSTEP) {
|
||||
if ( dOkStep >= EPS_SMALL && dOkStep < MIN_ZSTEP) {
|
||||
dOkStep = MIN_ZSTEP ;
|
||||
string sInfo = "Warning in Milling : machining step too small (" +
|
||||
ToString( m_Params.m_dStep, 2) + ")" ;
|
||||
|
||||
+6
-2
@@ -1073,7 +1073,7 @@ Pocketing::ProcessPath( int nPathId, int nPvId, int nClId)
|
||||
if ( dElev < EPS_SMALL && AreSameVectorApprox( vtExtr, Z_AX)) {
|
||||
BBox3d b3Crv ;
|
||||
pCompo->GetLocalBBox( b3Crv) ;
|
||||
dElev = max( 0., b3Raw.GetMax().z - b3Crv.GetMin().z + dDepth) ;
|
||||
dElev = max( 0., b3Raw.GetMax().z - b3Crv.GetMin().z + min( 0., dThick) + dDepth) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1091,7 +1091,7 @@ Pocketing::ProcessPath( int nPathId, int nPvId, int nClId)
|
||||
// verifico che lo step dell'utensile sia sensato
|
||||
double dOkStep = m_Params.m_dStep ;
|
||||
const double MIN_ZSTEP = 1.0 ;
|
||||
if ( dOkStep < MIN_ZSTEP) {
|
||||
if ( dOkStep >= EPS_SMALL && dOkStep < MIN_ZSTEP) {
|
||||
dOkStep = MIN_ZSTEP ;
|
||||
string sInfo = "Warning in Pocketing : machining step too small (" +
|
||||
ToString( m_Params.m_dStep, 2) + ")" ;
|
||||
@@ -1997,6 +1997,10 @@ Pocketing::AddLeadIn( const Point3d& ptP1, const Point3d& ptStart, const Vector3
|
||||
// Eseguo a seconda del tipo
|
||||
switch ( nType) {
|
||||
case POCKET_LI_NONE :
|
||||
if ( ! AreSamePointApprox( ptP1, ptStart)) {
|
||||
if ( AddLinearMove( ptStart, MCH_CL_LEADIN) == GDB_ID_NULL)
|
||||
return false ;
|
||||
}
|
||||
return true ;
|
||||
case POCKET_LI_GLIDE :
|
||||
// !!! DA FARE !!!
|
||||
|
||||
+11
-6
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2015
|
||||
// EgalTech 2015-2017
|
||||
//----------------------------------------------------------------------------
|
||||
// File : ToolsMgr.cpp Data : 01.06.15 Versione : 1.6f1
|
||||
// File : ToolsMgr.cpp Data : 02.03.17 Versione : 1.8c1
|
||||
// Contenuto : Implementazione gestore database utensili.
|
||||
//
|
||||
//
|
||||
@@ -9,6 +9,7 @@
|
||||
// Modifiche : 01.06.15 DS Creazione modulo.
|
||||
// 21.10.15 DS Aggiunti VERSION e TOOLSIZE in HEADER (default VERSION = 1000 e TOOLSIZE = 26).
|
||||
// Ora VERSION = 1001 e TOOLSIZE = 29.
|
||||
// 02.03.17 DS Aggiunto controllo nome.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -17,7 +18,7 @@
|
||||
#include "ToolsMgr.h"
|
||||
#include "DllMain.h"
|
||||
#include "/EgtDEv/Include/EmkToolConst.h"
|
||||
#include "/EgtDEv/Include/EGnStringUtils.h"
|
||||
#include "/EgtDEv/Include/EGnStringKeyVal.h"
|
||||
#include "/EgtDEv/Include/EGnFileUtils.h"
|
||||
#include "/EgtDEv/Include/EGnScanner.h"
|
||||
#include "/EgtDEv/Include/EGnWriter.h"
|
||||
@@ -333,8 +334,10 @@ ToolsMgr::GetToolNewName( string& sName) const
|
||||
bool
|
||||
ToolsMgr::AddTool( const string& sName, int nType)
|
||||
{
|
||||
// annullo utensile corrente
|
||||
m_bCurrTool = false ;
|
||||
// verifico validità del nome
|
||||
if ( ! IsValidName( sName))
|
||||
if ( ! IsValidVal( sName))
|
||||
return false ;
|
||||
// verifico unicità del nome
|
||||
if ( m_suData.find( sName) != m_suData.end())
|
||||
@@ -362,8 +365,10 @@ ToolsMgr::AddTool( const string& sName, int nType)
|
||||
bool
|
||||
ToolsMgr::CopyTool( const string& sSource, const string& sName)
|
||||
{
|
||||
// annullo utensile corrente
|
||||
m_bCurrTool = false ;
|
||||
// verifico validità del nome
|
||||
if ( ! IsValidName( sName))
|
||||
if ( ! IsValidVal( sName))
|
||||
return false ;
|
||||
// verifico unicità del nome
|
||||
if ( m_suData.find( sName) != m_suData.end())
|
||||
@@ -576,7 +581,7 @@ ToolsMgr::SetCurrToolParam( int nType, const string& sVal)
|
||||
return false ;
|
||||
// è possibile cambiare il nome, solo se il nuovo è valido e non è già presente nel DB (escluso utensile corrente)
|
||||
if ( nType == TPA_NAME) {
|
||||
if ( ! IsValidName( sVal))
|
||||
if ( ! IsValidVal( sVal))
|
||||
return false ;
|
||||
const ToolData* pTdata = GetTool( sVal) ;
|
||||
if ( pTdata != nullptr && pTdata->m_Uuid != m_tdCurrTool.m_Uuid)
|
||||
|
||||
Reference in New Issue
Block a user