EgtMachKernel 2.7e1 :
- possibilità di scegliere la classe di Pocketing da ini dell'eseguibile ([Mach] Pocketing=1/2) - modifiche a PocketingNT per compatibilità con robot.
This commit is contained in:
Binary file not shown.
@@ -438,6 +438,7 @@ copy $(TargetPath) \EgtProg\Dll64</Command>
|
||||
<ClInclude Include="MachiningData.h" />
|
||||
<ClInclude Include="MachiningDataFactory.h" />
|
||||
<ClInclude Include="MachiningCreate.h" />
|
||||
<ClInclude Include="MachiningRegister.h" />
|
||||
<ClInclude Include="MachiningsMgr.h" />
|
||||
<ClInclude Include="MachMgr.h" />
|
||||
<ClInclude Include="Milling.h" />
|
||||
|
||||
@@ -767,6 +767,9 @@
|
||||
<ClInclude Include="PocketingNT.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="MachiningRegister.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="EgtMachKernel.rc">
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "MachMgr.h"
|
||||
#include "MachConst.h"
|
||||
#include "DllMain.h"
|
||||
#include "MachiningRegister.h"
|
||||
#include "/EgtDev/Include/EMkDllMain.h"
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
#include "/EgtDev/Include/EGnFileUtils.h"
|
||||
@@ -32,6 +33,8 @@ CreateMachMgr( void)
|
||||
// verifico la chiave e le opzioni
|
||||
if ( ! GetEMkNetHwKey() && ! TestKeyForEMk( GetEMkKey(), 0, GetEMkLogger()))
|
||||
return nullptr ;
|
||||
// registro classe operazione per pocketing
|
||||
RegisterPocketing() ;
|
||||
// creo il MachMgr
|
||||
return static_cast<IMachMgr*> ( new(nothrow) MachMgr) ;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2025-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : MachiningRegister.h Data : 02.05.25 Versione : 2.7e1
|
||||
// Contenuto : Funzioni per registrazione dinamica oggetti delle lavorazioni
|
||||
// (per decidere tra versioni diverse di una lavorazione).
|
||||
//
|
||||
//
|
||||
// Modifiche : 02.05.25 DS Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "OperationConst.h"
|
||||
#include "Pocketing.h"
|
||||
#include "PocketingNT.h"
|
||||
#include "/EgtDev/Include/EGkUserObjFactory.h"
|
||||
#include "/EgtDev/Include/EgtIniFile.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Registrazione dinamica delle svuotature da parametro nel file Ini dell'eseguibile
|
||||
inline bool
|
||||
RegisterPocketing( void)
|
||||
{
|
||||
const char* SEC_MACH = "Mach" ;
|
||||
const char* KEY_POCKETING = "Pocketing" ;
|
||||
static bool bFirst = true ;
|
||||
if ( bFirst) {
|
||||
std::string sIniPath ;
|
||||
ExeGetIniFile( sIniPath) ;
|
||||
if ( GetPrivateProfileInt( SEC_MACH, KEY_POCKETING, 1, sIniPath.c_str()) == 2)
|
||||
UserObjRegister<PocketingNT>::DoRegister( GetOperationClass( OPER_POCKETING)) ;
|
||||
else
|
||||
UserObjRegister<Pocketing>::DoRegister( GetOperationClass( OPER_POCKETING)) ;
|
||||
bFirst = false ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
@@ -18,8 +18,6 @@
|
||||
#include "/EgtDev/Include/EMkOperationConst.h"
|
||||
#include <string>
|
||||
|
||||
#define POCKETING_NT 0
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static const std::string s_OpeClass[] = {"",
|
||||
"EMkDisposition",
|
||||
|
||||
+1
-3
@@ -95,9 +95,7 @@ const string UN_MAXOPTSIZE = "MaxOptSize" ;
|
||||
// 2458 = "Warning in Pocketing : machining depth (xxx) bigger than MaxMaterial (yyy)"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#if POCKETING_NT != 1
|
||||
USEROBJ_REGISTER( GetOperationClass( OPER_POCKETING), Pocketing) ;
|
||||
#endif
|
||||
// USEROBJ_REGISTER( GetOperationClass( OPER_POCKETING), Pocketing) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const string&
|
||||
|
||||
+7
-15
@@ -112,9 +112,7 @@ const string UN_OPENEXTENSION = "OpenExtension" ;
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#if POCKETING_NT == 1
|
||||
USEROBJ_REGISTER( GetOperationClass( OPER_POCKETING), PocketingNT) ;
|
||||
#endif
|
||||
// USEROBJ_REGISTER( GetOperationClass( OPER_POCKETING), PocketingNT) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const string&
|
||||
@@ -2956,7 +2954,7 @@ PocketingNT::AddPocket( STEPINFOPOVECTOR& vStepInfo, const Vector3d& vtTool, dou
|
||||
( m_Params.m_nSubType == POCKET_SUB_ZIGZAG && ! currPath.bIsZigZagOneWayBorder) ||
|
||||
( m_Params.m_nSubType == POCKET_SUB_ONEWAY && ! currPath.bIsZigZagOneWayBorder)) ;
|
||||
if ( ! AddLeadIn( ptP1, ptStart, vtStart, vtTool, currStep.pSfrPock, Get( currPath.pCrvGuideIn),
|
||||
( m_Params.m_nSubType == POCKET_SUB_SPIRALOUT) ? m_Params.m_bInvert : ! m_Params.m_bInvert,
|
||||
( m_Params.m_nSubType == POCKET_SUB_SPIRALOUT ? m_Params.m_bInvert : ! m_Params.m_bInvert),
|
||||
bSplitArcs, bNoneForced, false)) {
|
||||
m_pMchMgr->SetLastError( 3013, "Error in PocketingNT : LeadIn not computable") ;
|
||||
return false ;
|
||||
@@ -2968,18 +2966,12 @@ PocketingNT::AddPocket( STEPINFOPOVECTOR& vStepInfo, const Vector3d& vtTool, dou
|
||||
Point3d ptP3 = pLine->GetEnd() ;
|
||||
Vector3d vtMove ; pLine->GetStartDir( vtMove) ;
|
||||
SetFeed( dCoeffFeed * GetRightFeed( vtMove, vtTool)) ;
|
||||
if ( AddLinearMove( ptP3) == GDB_ID_NULL)
|
||||
if ( AddLinearMove( ptP3, bSplitArcs) == GDB_ID_NULL)
|
||||
return false ;
|
||||
}
|
||||
else if ( pCurve->GetType() == CRV_ARC) {
|
||||
ICurveArc* pArc = GetCurveArc( pCurve) ;
|
||||
Point3d ptCen = pArc->GetCenter() ;
|
||||
double dAngCen = pArc->GetAngCenter() ;
|
||||
Vector3d vtN = pArc->GetNormVersor() ;
|
||||
Point3d ptP3 ;
|
||||
pArc->GetEndPoint( ptP3) ;
|
||||
else {
|
||||
SetFeed( dCoeffFeed * GetFeed()) ;
|
||||
if ( AddArcMove( ptP3, ptCen, dAngCen, vtN) == GDB_ID_NULL)
|
||||
if ( AddCurveMove( pCurve, bSplitArcs) == GDB_ID_NULL)
|
||||
return false ;
|
||||
}
|
||||
// se ultima entità
|
||||
@@ -3057,9 +3049,9 @@ PocketingNT::AddPocket( STEPINFOPOVECTOR& vStepInfo, const Vector3d& vtTool, dou
|
||||
}
|
||||
// tratto lineare sopra al punto corrente
|
||||
SetFeed( GetEndFeed()) ;
|
||||
AddLinearMove( ptEnd + vtTool * dCurrElev) ;
|
||||
AddLinearMove( ptEnd + vtTool * dCurrElev, bSplitArcs) ;
|
||||
// tratto lineare sopra a ptDest
|
||||
AddLinearMove( ptDest + vtTool * dNextElev) ;
|
||||
AddLinearMove( ptDest + vtTool * dNextElev, bSplitArcs) ;
|
||||
// aggiorno le elevazioni
|
||||
dCurrElev = dNextElev ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user