diff --git a/Drilling.cpp b/Drilling.cpp
index 9946e70..a76b160 100644
--- a/Drilling.cpp
+++ b/Drilling.cpp
@@ -18,6 +18,7 @@
#include "DllMain.h"
#include "Drilling.h"
#include "OperationConst.h"
+#include "OperUserNotesConst.h"
#include "/EgtDev/Include/EXeCmdLogOff.h"
#include "/EgtDev/Include/EGkGeoPoint3d.h"
#include "/EgtDev/Include/EGkGeoVector3d.h"
@@ -2348,7 +2349,7 @@ Drilling::MultiHeadVerifyHole( Hole& hole, const ToolData* Tool, double dDiamTol
// imposto elevazione da lunghezza foro con possibilità di sovrascrittura da info
double dElev = hole.dLen ;
double dMaxElev ;
- if ( GetValInNotes( m_Params.m_sUserNotes, "MaxElev", dMaxElev) && dElev > dMaxElev) {
+ if ( GetValInNotes( m_Params.m_sUserNotes, UN_MAXELEV, dMaxElev) && dElev > dMaxElev) {
dElev = dMaxElev ;
hole.ptIni += hole.vtDir * ( dElev - hole.dLen) ;
hole.dLen = dElev ;
@@ -2714,7 +2715,7 @@ Drilling::GenerateHoleCl( int nInd, const SelData& nCircId, const string& sPName
// imposto elevazione da lunghezza foro con possibilità di sovrascrittura da info
double dElev = hole.dLen ;
double dMaxElev ;
- if ( GetValInNotes( m_Params.m_sUserNotes, "MaxElev", dMaxElev) && dElev > dMaxElev) {
+ if ( GetValInNotes( m_Params.m_sUserNotes, UN_MAXELEV, dMaxElev) && dElev > dMaxElev) {
dElev = dMaxElev ;
hole.ptIni += hole.vtDir * ( dElev - hole.dLen) ;
hole.dLen = ( hole.dLen > 10 * EPS_SMALL ? max( dElev, 10 * EPS_SMALL) : dElev) ;
@@ -3246,7 +3247,7 @@ Drilling::GetHoleData( SelData Id, Hole& hole)
hole.bBlind = true ;
// se dichiarato passante o no (1/0)
int nOpen ;
- if ( GetValInNotes( m_Params.m_sUserNotes, "Open", nOpen))
+ if ( GetValInNotes( m_Params.m_sUserNotes, UN_OPEN, nOpen))
hole.bBlind = ( nOpen == 0) ;
// se verticale ed arriva fino al fondo grezzo, allora passante
else if ( hole.vtDir.IsZplus() && hole.dThick > dRbDist - EPS_SMALL)
@@ -3534,13 +3535,25 @@ Drilling::DoPeckDrilling( const Hole& hole, SelData Id, int nPathId, double dMHO
if ( AddRapidMove( ptP2, bSplitArcs) == GDB_ID_NULL)
return false ;
}
+ // determino se foro in doppio
+ bool bDouble = false ;
+ { int nDouble = 0 ;
+ if ( GetValInNotes( m_Params.m_sUserNotes, UN_DOUBLE, nDouble) &&
+ ( nDouble == 1 || nDouble == 2 || nDouble == 3))
+ bDouble = true ;
+ }
+
// ciclo di affondamento a step
const double MIN_STEP = 1 ;
const double APPR_STEP = 1 ;
const double MIN_MOVE = 1 ;
- double dStep = max( m_Params.m_dStep, MIN_STEP) ;
- int nStep = int( ceil( hole.dLen / dStep)) ;
- dStep = hole.dLen / nStep ;
+ double dOrigStep = max( m_Params.m_dStep, MIN_STEP) ;
+ double dSteppedLen = ( bDouble ? hole.dLen - dOrigStep : hole.dLen) ;
+ int nStep = int( ceil( dSteppedLen / dOrigStep)) ;
+ double dStep = dSteppedLen / nStep ;
+ if ( bDouble)
+ ++ nStep ;
+ double dLastStep = ( bDouble ? dOrigStep : dStep) ;
if ( dReturnPos < - dStep + APPR_STEP + MIN_MOVE)
dReturnPos = - dStep + APPR_STEP + MIN_MOVE ;
double dCurrLen = 0 ;
@@ -3561,7 +3574,7 @@ Drilling::DoPeckDrilling( const Hole& hole, SelData Id, int nPathId, double dMHO
return false ;
}
// lunghezza di fine step
- double dEndLen = dCurrLen + dStep ;
+ double dEndLen = dCurrLen + ( i == nStep ? dLastStep : dStep) ;
// 3 -> punto termine velocità ridotta iniziale (se previsto)
if ( bStartSlow && ( i == 1 || dCurrLen < dStartSlowLen + EPS_SMALL)) {
// lunghezza di esecuzione
diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc
index 71223f9..606398f 100644
Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ
diff --git a/EgtMachKernel.vcxproj b/EgtMachKernel.vcxproj
index 97ecd7e..bd6e0e8 100644
--- a/EgtMachKernel.vcxproj
+++ b/EgtMachKernel.vcxproj
@@ -449,6 +449,7 @@ copy $(TargetPath) \EgtProg\Dll64
+
diff --git a/EgtMachKernel.vcxproj.filters b/EgtMachKernel.vcxproj.filters
index 67eb203..c633d5e 100644
--- a/EgtMachKernel.vcxproj.filters
+++ b/EgtMachKernel.vcxproj.filters
@@ -782,6 +782,9 @@
Header Files
+
+ Header Files
+
diff --git a/FiveAxisMilling.cpp b/FiveAxisMilling.cpp
index e21efda..16f1699 100644
--- a/FiveAxisMilling.cpp
+++ b/FiveAxisMilling.cpp
@@ -17,6 +17,7 @@
#include "DllMain.h"
#include "FiveAxisMilling.h"
#include "OperationConst.h"
+#include "OperUserNotesConst.h"
#include "/EgtDev/Include/EGkCurveLine.h"
#include "/EgtDev/Include/EGkCurveArc.h"
#include "/EgtDev/Include/EGkCurveComposite.h"
@@ -731,7 +732,7 @@ FiveAxisMilling::Update( bool bPostApply)
if ( ! m_Params.m_sInitAngs.empty())
sHint = m_Params.m_sInitAngs ;
double dSingConeAng = 0.1 ;
- GetValInNotes( m_Params.m_sUserNotes, "SingConeAng", dSingConeAng) ;
+ GetValInNotes( m_Params.m_sUserNotes, UN_SINGCONEANG, dSingConeAng) ;
if ( ! CalculateAxesValues( sHint, false, dSingConeAng)) {
string sInfo = m_pMchMgr->GetOutstrokeInfo() ;
if ( sInfo.empty())
@@ -1010,7 +1011,7 @@ double
FiveAxisMilling::GetApproxLinTol( void) const
{
double dLinTol ;
- if ( GetValInNotes( m_Params.m_sUserNotes, "LinTol", dLinTol))
+ if ( GetValInNotes( m_Params.m_sUserNotes, UN_LINTOL, dLinTol))
return dLinTol ;
else
return Operation::GetApproxLinTol() ;
diff --git a/GenMachining.cpp b/GenMachining.cpp
index 9a11624..63597ab 100644
--- a/GenMachining.cpp
+++ b/GenMachining.cpp
@@ -17,6 +17,7 @@
#include "DllMain.h"
#include "GenMachining.h"
#include "OperationConst.h"
+#include "OperUserNotesConst.h"
#include "/EgtDev/Include/EGkCurveLine.h"
#include "/EgtDev/Include/EGkCurveArc.h"
#include "/EgtDev/Include/EGkCurveComposite.h"
@@ -717,7 +718,7 @@ GenMachining::Update( bool bPostApply)
// gestione movimenti all'inizio di ogni singolo percorso di lavorazione e alla fine della lavorazione
bool bVpl ;
- if ( ! FromString( ExtractInfo( m_Params.m_sUserNotes, "Vpl:"), bVpl))
+ if ( ! FromString( ExtractInfo( m_Params.m_sUserNotes, UN_VPL_COLON), bVpl))
bVpl = true ;
if ( ! AdjustStartEndMovements( bVpl)) {
string sInfo = m_pMchMgr->GetOutstrokeInfo() ;
@@ -982,7 +983,7 @@ double
GenMachining::GetApproxLinTol( void) const
{
double dLinTol ;
- if ( GetValInNotes( m_Params.m_sUserNotes, "LinTol", dLinTol))
+ if ( GetValInNotes( m_Params.m_sUserNotes, UN_LINTOL, dLinTol))
return dLinTol ;
else
return Operation::GetApproxLinTol() ;
diff --git a/Milling.cpp b/Milling.cpp
index df14a73..df08242 100644
--- a/Milling.cpp
+++ b/Milling.cpp
@@ -21,6 +21,7 @@
#include "Milling.h"
#include "GeoConst.h"
#include "OperationConst.h"
+#include "OperUserNotesConst.h"
#include "/EgtDev/Include/EXeCmdLogOff.h"
#include "/EgtDev/Include/EGkCurveLine.h"
#include "/EgtDev/Include/EGkCurveArc.h"
@@ -49,13 +50,6 @@ const double OSC_MIN_LEN = 0.1 ;
const double LIM_DOWN_APPRZ = -0.5 ;
const double DELTA_ELEV_RAD = 4.0 ;
const double LIM_SIN_DIFF_DIR = 0.175 ;
-// Parametri avanzati da UserNotes
-const string UN_MAXELEV = "MaxElev" ;
-const string UN_OUTRAW = "OutRaw" ;
-const string UN_SIDEELEV = "SideElev" ;
-const string UN_TRIMEXT = "TrimExt" ;
-const string UN_VTFACEUSE = "VtFaceUse" ;
-const string UN_EDGESFACEUSE = "EdgesFaceUse" ;
//------------------------------ Errors --------------------------------------
// 2301 = "Error in Milling : UpdateToolData failed"
diff --git a/Mortising.cpp b/Mortising.cpp
index aa1e0e2..1de5fc8 100644
--- a/Mortising.cpp
+++ b/Mortising.cpp
@@ -17,6 +17,7 @@
#include "DllMain.h"
#include "Mortising.h"
#include "OperationConst.h"
+#include "OperUserNotesConst.h"
#include "/EgtDev/Include/EGkCurveLine.h"
#include "/EgtDev/Include/EGkCurveArc.h"
#include "/EgtDev/Include/EGkCurveComposite.h"
@@ -1331,7 +1332,7 @@ Mortising::ProcessPath( int nPathId, int nPvId, int nClId)
return false ;
// eventuale imposizione massima elevazione da note utente
double dMaxElev ;
- if ( GetValInNotes( m_Params.m_sUserNotes, "MaxElev", dMaxElev) && dElev > dMaxElev)
+ if ( GetValInNotes( m_Params.m_sUserNotes, UN_MAXELEV, dMaxElev) && dElev > dMaxElev)
dElev = dMaxElev ;
// ingombro aggiuntivo da larghezza sega a catena quando inclinata rispetto al movimento
@@ -1342,7 +1343,7 @@ Mortising::ProcessPath( int nPathId, int nPvId, int nClId)
// affondamento speciale da note utente (!!! da trasformare in parametro come gli altri !!!)
int nPlunge = 0 ;
- GetValInNotes( m_Params.m_sUserNotes, "Plunge", nPlunge) ;
+ GetValInNotes( m_Params.m_sUserNotes, UN_PLUNGE, nPlunge) ;
// verifico che lo step dell'utensile sia sensato
double dOkStep = ( nPlunge == MORTISE_PLUNGE_STEP || nPlunge == MORTISE_PLUNGE_STEP_NO_SAFEZ ? m_Params.m_dStep : 0) ;
diff --git a/OperUserNotesConst.h b/OperUserNotesConst.h
new file mode 100644
index 0000000..3a1d510
--- /dev/null
+++ b/OperUserNotesConst.h
@@ -0,0 +1,72 @@
+//----------------------------------------------------------------------------
+// EgalTech 2025-2025
+//----------------------------------------------------------------------------
+// File : OperUserNotesConst.h Data : 10.11.25 Versione : 2.7k3
+// Contenuto : Costanti per le note utente delle operazioni.
+//
+//
+//
+// Modifiche : 10.11.25 DS Creazione modulo.
+//
+//
+//
+//----------------------------------------------------------------------------
+
+#pragma once
+
+#include
+
+//----------------------------------------------------------------------------
+// Generali
+static const std::string UN_MAXELEV = "MaxElev" ;
+static const std::string UN_TRIMEXT = "TrimExt" ;
+static const std::string UN_OPEN = "Open" ;
+static const std::string UN_LINTOL = "LinTol" ;
+static const std::string UN_DOUBLE = "DOUBLE" ;
+static const std::string UN_MIRRORAX = "MirrorAx" ;
+static const std::string UN_DELTAZ = "DeltaZ" ;
+
+// Solo per FiveAxisMilling
+static const std::string UN_SINGCONEANG = "SingConeAng" ;
+
+// Solo per GenMachining
+static const std::string UN_VPL_COLON = "Vpl:" ;
+
+// Solo per Milling
+static const std::string UN_OUTRAW = "OutRaw" ;
+static const std::string UN_SIDEELEV = "SideElev" ;
+static const std::string UN_VTFACEUSE = "VtFaceUse" ;
+static const std::string UN_EDGESFACEUSE = "EdgesFaceUse" ;
+
+// Solo per Mortising
+static const std::string UN_PLUNGE = "Plunge" ;
+
+// Solo per Pocketing o PocketingNT
+static const std::string UN_OPENOUTRAW = "OpenOutRaw" ;
+static const std::string UN_OPENMINSAFE = "OpenMinSafe" ;
+static const std::string UN_MAXOPTSIZE = "MaxOptSize" ;
+static const std::string UN_PROJEXT = "ExtProj" ;
+static const std::string UN_ADJUSTFEED = "AdjustFeed" ;
+
+// Solo per Sawing
+static const std::string UN_DOWNSE = "DownSE" ;
+static const std::string UN_FSTA = "Fsta" ;
+static const std::string UN_FEND = "Fend" ;
+static const std::string UN_SWE = "SWE" ;
+static const std::string UN_EWE = "EWE" ;
+
+// Solo per SurfFinishing
+static const std::string UN_SKIPMAXDOWN = "SkipMaxDown" ;
+static const std::string UN_SPLITANGLE = "SplitAngle" ;
+static const std::string UN_TYPE = "Type" ;
+static const std::string UN_STEPNUMBER = "StepNumber" ;
+static const std::string UN_BITANGANG = "BiTangAng" ;
+static const std::string UN_OPTIMALTYPE = "OptimalType" ;
+static const std::string UN_ANGLETOL = "AngleTol" ;
+
+// Solo per SurfRoughing
+static const std::string UN_PLANEZ = "PlaneZ" ;
+static const std::string UN_ORDER = "Order" ;
+
+// Solo per Waterjetting
+static const std::string UN_START = "START" ;
diff --git a/Operation.cpp b/Operation.cpp
index 665c8f5..b09f6f3 100644
--- a/Operation.cpp
+++ b/Operation.cpp
@@ -16,6 +16,7 @@
#include "DllMain.h"
#include "Operation.h"
#include "OperationConst.h"
+#include "OperUserNotesConst.h"
#include "MachMgr.h"
#include "OutputConst.h"
#include "GeoConst.h"
@@ -1559,11 +1560,11 @@ Operation::CalcAndSetAxesBBox( void)
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
bool
-Operation::CalcMirrorByDouble( int nClId, const std::string& sUserNotes)
+Operation::CalcMirrorByDouble( int nClId, const string& sUserNotes)
{
// verifico se prevista lavorazione in doppio
int nDouble ;
- if ( ! GetValInNotes( sUserNotes, "DOUBLE", nDouble) ||
+ if ( ! GetValInNotes( sUserNotes, UN_DOUBLE, nDouble) ||
( nDouble != 1 && nDouble != 2 && nDouble != 3))
return true ;
@@ -1591,7 +1592,7 @@ Operation::CalcMirrorByDouble( int nClId, const std::string& sUserNotes)
case 3 : vtNorm = Z_AX ; break ;
}
double dPlanePos ;
- if ( GetValInNotes( sUserNotes, "MirrorAx", dPlanePos))
+ if ( GetValInNotes( sUserNotes, UN_MIRRORAX, dPlanePos))
ptOn = b3Raw.GetMin() + dPlanePos * vtNorm ;
// eseguo mirroring rispetto a piano opportuno
@@ -1599,7 +1600,7 @@ Operation::CalcMirrorByDouble( int nClId, const std::string& sUserNotes)
// se presente una differenza in Z, eseguo spostamento
double dDeltaZ ;
- if ( GetValInNotes( sUserNotes, "DeltaZ", dDeltaZ) && abs( dDeltaZ) > EPS_SMALL)
+ if ( GetValInNotes( sUserNotes, UN_DELTAZ, dDeltaZ) && abs( dDeltaZ) > EPS_SMALL)
m_pGeomDB->TranslateGlob( nDblId, Vector3d( 0, 0, dDeltaZ)) ;
return true ;
diff --git a/Pocketing.cpp b/Pocketing.cpp
index 37bff7f..a255444 100644
--- a/Pocketing.cpp
+++ b/Pocketing.cpp
@@ -18,6 +18,7 @@
#include "DllMain.h"
#include "Pocketing.h"
#include "OperationConst.h"
+#include "OperUserNotesConst.h"
#include "MachiningConst.h"
#include "GeoConst.h"
#include "/EgtDev/Include/EGkCurveLine.h"
@@ -46,12 +47,6 @@ using namespace std ;
//------------------------------ Constants ------------------------------------
static int LINK_CURVE_PROP = -3 ;
static string KEY_OPEN = "OPEN" ;
-// Parametri avanzati da UserNotes
-const string UN_MAXELEV = "MaxElev" ;
-const string UN_OPEN = "Open" ;
-const string UN_OPENOUTRAW = "OpenOutRaw" ;
-const string UN_OPENMINSAFE = "OpenMinSafe" ;
-const string UN_MAXOPTSIZE = "MaxOptSize" ;
//------------------------------ Errors --------------------------------------
// 2401 = "Error in Pocketing : UpdateToolData failed"
diff --git a/PocketingNT.cpp b/PocketingNT.cpp
index 07e128b..d98b643 100644
--- a/PocketingNT.cpp
+++ b/PocketingNT.cpp
@@ -18,6 +18,7 @@
#include "DllMain.h"
#include "PocketingNT.h"
#include "OperationConst.h"
+#include "OperUserNotesConst.h"
#include "MachiningConst.h"
#include "GeoConst.h"
#include "/EgtDev/Include/EGkCurveLine.h"
@@ -57,15 +58,6 @@ static double EXTRA_ELEV = 5. ;
static double EXTRA_DEPTH = 5. ;
static double SAFETY_LINK_COS = cos( - ( 175 * DEGTORAD)) ;
static double TOOL_RAD_PTSTART = 20. ;
-// Parametri avanzati da UserNotes
-const string UN_MAXELEV = "MaxElev" ;
-const string UN_OPEN = "Open" ;
-const string UN_TRIMSTM = "TrimExt" ;
-const string UN_OPENOUTRAW = "OpenOutRaw" ;
-const string UN_OPENMINSAFE = "OpenMinSafe" ;
-const string UN_MAXOPTSIZE = "MaxOptSize" ;
-const string UN_PROJEXT = "ExtProj" ;
-const string UN_ADJUSTFEED = "AdjustFeed" ;
//------------------------------ Errori/Warnings --------------------------------------
// 2401 = "Error in PocketingNT : UpdateToolData failed"
@@ -2021,7 +2013,7 @@ PocketingNT::GetStmTrim( void)
{
// controllo se è presente una superficie di Trim
int nStmTrimId = GDB_ID_NULL ;
- if ( ! GetValInNotes( m_Params.m_sUserNotes, UN_TRIMSTM, nStmTrimId))
+ if ( ! GetValInNotes( m_Params.m_sUserNotes, UN_TRIMEXT, nStmTrimId))
return nullptr ;
// creo Stm della superficie di Trim
diff --git a/Probing.cpp b/Probing.cpp
index 55527b2..be0642f 100644
--- a/Probing.cpp
+++ b/Probing.cpp
@@ -17,6 +17,7 @@
#include "DllMain.h"
#include "Probing.h"
#include "OperationConst.h"
+#include "OperUserNotesConst.h"
#include "/EgtDev/Include/EGkCurveLine.h"
#include "/EgtDev/Include/EGkCurveArc.h"
#include "/EgtDev/Include/EGkCurveComposite.h"
@@ -938,7 +939,7 @@ double
Probing::GetApproxLinTol( void) const
{
double dLinTol ;
- if ( GetValInNotes( m_Params.m_sUserNotes, "LinTol", dLinTol))
+ if ( GetValInNotes( m_Params.m_sUserNotes, UN_LINTOL, dLinTol))
return dLinTol ;
else
return Operation::GetApproxLinTol() ;
diff --git a/Sawing.cpp b/Sawing.cpp
index 98e5a30..18fea8c 100644
--- a/Sawing.cpp
+++ b/Sawing.cpp
@@ -18,6 +18,7 @@
#include "Sawing.h"
#include "GeoConst.h"
#include "OperationConst.h"
+#include "OperUserNotesConst.h"
#include "/EgtDev/Include/EXeCmdLogOff.h"
#include "/EgtDev/Include/EXeConst.h"
#include "/EgtDev/Include/EGkCurveLine.h"
@@ -700,7 +701,7 @@ Sawing::Apply( bool bRecalc, bool bPostApply)
// verifiche per attacchi/uscite senza approcci e retrazioni
int nDownSE = 0 ;
- GetValInNotes( m_Params.m_sUserNotes, "DownSE", nDownSE) ;
+ GetValInNotes( m_Params.m_sUserNotes, UN_DOWNSE, nDownSE) ;
m_bDownSE = ( nDownSE != 0 && m_Params.m_nStepType == SAW_ST_TOANDFROM) ;
// recupero gruppo per geometria di lavorazione (Cutter Location)
@@ -1870,8 +1871,8 @@ Sawing::ProcessLine( const ICurve* pCrvP, const ICurveLine* pLineC, const ICurve
// Eventuale variazioni di velocità all'inizio e alla fine del percorso
FseVar FvVar ;
if ( pCrvP == nullptr) {
- string sFsta = ExtractInfo( m_Params.m_sUserNotes, "Fsta=") ;
- if ( ! sFsta.empty()) {
+ string sFsta ;
+ if ( GetValInNotes( m_Params.m_sUserNotes, UN_FSTA, sFsta)) {
string sLen, sPu ;
SplitFirst( sFsta, ",", sLen, sPu) ;
if ( FromString( sLen, FvVar.dLenStart))
@@ -1881,8 +1882,8 @@ Sawing::ProcessLine( const ICurve* pCrvP, const ICurveLine* pLineC, const ICurve
}
}
if ( pCrvN == nullptr) {
- string sFend = ExtractInfo( m_Params.m_sUserNotes, "Fend=") ;
- if ( ! sFend.empty()) {
+ string sFend ;
+ if ( GetValInNotes( m_Params.m_sUserNotes, UN_FEND, sFend)) {
string sLen, sPu ;
SplitFirst( sFend, ",", sLen, sPu) ;
if ( FromString( sLen, FvVar.dLenEnd))
@@ -1895,10 +1896,10 @@ Sawing::ProcessLine( const ICurve* pCrvP, const ICurveLine* pLineC, const ICurve
// recupero eventuali estensioni dei baffi (whiskers)
double dStartWhiskExt = 0 ;
if ( m_Params.m_nLeadInType == SAW_LI_CENT)
- GetValInNotes( m_Params.m_sUserNotes, "SWE", dStartWhiskExt) ;
+ GetValInNotes( m_Params.m_sUserNotes, UN_SWE, dStartWhiskExt) ;
double dEndWhiskExt = 0 ;
if ( m_Params.m_nLeadOutType == SAW_LO_CENT)
- GetValInNotes( m_Params.m_sUserNotes, "EWE", dEndWhiskExt) ;
+ GetValInNotes( m_Params.m_sUserNotes, UN_EWE, dEndWhiskExt) ;
// Se richiesto Preview
if ( nPvId != GDB_ID_NULL) {
diff --git a/SurfFinishing.cpp b/SurfFinishing.cpp
index abad467..3c30527 100644
--- a/SurfFinishing.cpp
+++ b/SurfFinishing.cpp
@@ -18,6 +18,7 @@
#include "DllMain.h"
#include "SurfFinishing.h"
#include "OperationConst.h"
+#include "OperUserNotesConst.h"
#include "GeoConst.h"
#include "/EgtDev/Include/EGkCurveLine.h"
#include "/EgtDev/Include/EGkCurveArc.h"
@@ -1990,7 +1991,7 @@ SurfFinishing::ProcessSfr( int nPathId, int nPvId, int nClId)
// se richiesto, elimino le parti al massimo affondamento
bool bSkipMaxDown = true ;
- GetValInNotes( m_Params.m_sUserNotes, "SkipMaxDown", bSkipMaxDown) ;
+ GetValInNotes( m_Params.m_sUserNotes, UN_SKIPMAXDOWN, bSkipMaxDown) ;
if ( bSkipMaxDown && m_Params.m_nSubType != SURFFIN_SUB_Z_CONST &&
m_Params.m_nSubType != SURFFIN_SUB_PENCIL) {
PtrOwner pSfrMaxDown( CloneSurfFlatRegion( pSfrCnt)) ;
@@ -4343,7 +4344,7 @@ SurfFinishing::GetOptimalSfr( ICAvToolSurfTm* pCAvTlStm, const SURFLOCALVECTOR&
double dSplitAngle = 45. ;
double dLimInfSplitAng = dSplitAngle + dSplitAngleTol ;
double dLimSupSplitAng = dSplitAngle - dSplitAngleTol ;
- GetValInNotes( m_Params.m_sUserNotes, "SplitAngle", dSplitAngle) ;
+ GetValInNotes( m_Params.m_sUserNotes, UN_SPLITANGLE, dSplitAngle) ;
double dCosClipping = cos( ( dSplitAngle) * DEGTORAD) ;
double dLimInfCosClipping = cos( dLimInfSplitAng * DEGTORAD) ;
double dLimSupCosClipping = cos( dLimSupSplitAng * DEGTORAD) ;
@@ -5317,7 +5318,7 @@ SurfFinishing::AddPencil( ICAvToolSurfTm* pCAvTlStm, const SURFLOCALVECTOR& vSrf
{
// recupero il tipo di Pencil
int nPencilType = PENCIL_CORNER ;
- if ( GetValInNotes( m_Params.m_sUserNotes, "Type", nPencilType)) {
+ if ( GetValInNotes( m_Params.m_sUserNotes, UN_TYPE, nPencilType)) {
if ( nPencilType != PENCIL_CORNER && nPencilType != PENCIL_FAT_CORNER &&
nPencilType != PENCIL_REGION)
return false ;
@@ -5328,11 +5329,11 @@ SurfFinishing::AddPencil( ICAvToolSurfTm* pCAvTlStm, const SURFLOCALVECTOR& vSrf
double dLinTol = max( 0.5, dStmOffs / 4.) ;
// recupero il numero di passate richieste [1, 100]
int nOffs = 1 ;
- if ( GetValInNotes( m_Params.m_sUserNotes, "Step", nOffs))
+ if ( GetValInNotes( m_Params.m_sUserNotes, UN_STEPNUMBER, nOffs))
nOffs = Clamp( nOffs, 1, 100) ;
// recupero l'angolo di Bitangenza
double dBiTangAng = 120. ;
- if ( GetValInNotes( m_Params.m_sUserNotes, "BiTangAng", dBiTangAng))
+ if ( GetValInNotes( m_Params.m_sUserNotes, UN_BITANGANG, dBiTangAng))
dBiTangAng = Clamp( dBiTangAng, 0., 180.) ;
// recupero la superficie di Offset
@@ -5422,7 +5423,7 @@ SurfFinishing::CalcOptimalZigZagCurves( const ISurfFlatRegion* pSfrLoc, const Fr
// controllo se richiesto altro tipo di lavorazione
int nSubType = POCKET_ZIGZAG ;
- if ( GetValInNotes( m_Params.m_sUserNotes, "OptimalType", nSubType)) {
+ if ( GetValInNotes( m_Params.m_sUserNotes, UN_OPTIMALTYPE, nSubType)) {
// ammessi ZIG_ZAG, SPIRAL_IN, SPIRAL_OUT
if ( nSubType != POCKET_ZIGZAG && nSubType != POCKET_SPIRALIN && nSubType != POCKET_SPIRALOUT)
nSubType = POCKET_ZIGZAG ;
@@ -5875,9 +5876,9 @@ SurfFinishing::AddOptimal( ICAvToolSurfTm* pCAvTlStm, const SURFLOCALVECTOR& vSr
// recupero l'angolo di Split e la rispettiva tolleranza
double dAngDegSplit = 45 ;
- GetValInNotes( m_Params.m_sUserNotes, "SplitAngle", dAngDegSplit) ;
+ GetValInNotes( m_Params.m_sUserNotes, UN_SPLITANGLE, dAngDegSplit) ;
double dAngDegTol = 5 ;
- GetValInNotes( m_Params.m_sUserNotes, "AngleTol", dAngDegTol) ;
+ GetValInNotes( m_Params.m_sUserNotes, UN_ANGLETOL, dAngDegTol) ;
// inizializzo l'area di lavoro determinata dalle curve ZigZag
PtrOwner pSfrZigZagProjLoc ;
@@ -6047,7 +6048,7 @@ SurfFinishing::AddProjection( ICAvToolSurfTm* pCAvTlStm, const SURFLOCALVECTOR&
// recupero flag per saltare parti a massimo affondamento
bool bSkipMaxDown = true ;
- GetValInNotes( m_Params.m_sUserNotes, "SkipMaxDown", bSkipMaxDown) ;
+ GetValInNotes( m_Params.m_sUserNotes, UN_SKIPMAXDOWN, bSkipMaxDown) ;
if ( bSkipMaxDown) {
// definisco i dati di calcolo della Silhouette
const double SILH_TOL = 1.0 ;
diff --git a/SurfRoughing.cpp b/SurfRoughing.cpp
index 015f572..0d963f8 100644
--- a/SurfRoughing.cpp
+++ b/SurfRoughing.cpp
@@ -17,6 +17,7 @@
#include "DllMain.h"
#include "SurfRoughing.h"
#include "OperationConst.h"
+#include "OperUserNotesConst.h"
#include "GeoConst.h"
#include "/EgtDev/Include/EXeCmdLogOff.h"
#include "/EgtDev/Include/EXeConst.h"
@@ -1454,7 +1455,7 @@ SurfRoughing::ProcessPath( int nPathId, int nPvId, int nClId)
if ( dSfrMaxElev > EPS_SMALL) {
// eventuale imposizione massima elevazione da note utente
double dMaxElev ;
- if ( GetValInNotes( m_Params.m_sUserNotes, "MaxElev", dMaxElev) && dSfrMaxElev > dMaxElev)
+ if ( GetValInNotes( m_Params.m_sUserNotes, UN_MAXELEV, dMaxElev) && dSfrMaxElev > dMaxElev)
dSfrMaxElev = dMaxElev ;
// la regione viene traslata dell'elevazione trovata lungo vtTool
pSfrSgro->Translate( dSfrMaxElev * vtTool) ;
@@ -1468,11 +1469,11 @@ SurfRoughing::ProcessPath( int nPathId, int nPvId, int nClId)
// controllo se richiesto PlaneZDetection
bool bPlaneZDetection = false ;
- m_bDetectPlaneZ = ( GetValInNotes( m_Params.m_sUserNotes, "PlaneZ", bPlaneZDetection) && bPlaneZDetection) ;
+ m_bDetectPlaneZ = ( GetValInNotes( m_Params.m_sUserNotes, UN_PLANEZ, bPlaneZDetection) && bPlaneZDetection) ;
// controllo se richiesto ordinamento dei Chunk lungo vtTool
bool bOrderZ = false ;
- m_bOrderZ = ( GetValInNotes( m_Params.m_sUserNotes, "Order", bOrderZ) && bOrderZ) ;
+ m_bOrderZ = ( GetValInNotes( m_Params.m_sUserNotes, UN_ORDER, bOrderZ) && bOrderZ) ;
// NB. [ le superfici vengono riordinate e divise per Chunks prima di essere inserite nel gruppo
// temporaneo. L'analisi per la superficie di Sgrossatura, Limite e Removed non dipende
// dall'ordine, ma semplicemente dalla quota Z del piano di sgrossatura ]
diff --git a/WaterJetting.cpp b/WaterJetting.cpp
index 232524f..c716e0f 100644
--- a/WaterJetting.cpp
+++ b/WaterJetting.cpp
@@ -18,6 +18,7 @@
#include "WaterJetting.h"
#include "GeoConst.h"
#include "OperationConst.h"
+#include "OperUserNotesConst.h"
#include "/EgtDev/Include/EGkCurveLine.h"
#include "/EgtDev/Include/EGkCurveArc.h"
#include "/EgtDev/Include/EGkCurveComposite.h"
@@ -1510,18 +1511,19 @@ WaterJetting::ProcessPath( int nPathId, int nPvId, int nClId)
if ( pCompo->IsClosed()) {
// recupero indicazione lato di inizio
int nStart = 0 ;
- string sMyNotes = m_Params.m_sUserNotes ;
- ToUpper( sMyNotes) ;
- if ( sMyNotes.find( "START=XP") != string::npos)
- nStart = 1 ;
- else if ( sMyNotes.find( "START=XM") != string::npos)
- nStart = -1 ;
- else if ( sMyNotes.find( "START=YP") != string::npos)
- nStart = 2 ;
- else if ( sMyNotes.find( "START=YM") != string::npos)
- nStart = -2 ;
- else if ( sMyNotes.find( "START=") != string::npos)
- nStart = 11 ;
+ string sStart ;
+ if ( GetValInNotes( m_Params.m_sUserNotes, UN_START, sStart)) {
+ if ( sStart == "XP")
+ nStart = 1 ;
+ else if ( sStart == "XM")
+ nStart = -1 ;
+ else if ( sStart == "YP")
+ nStart = 2 ;
+ else if ( sStart == "YM")
+ nStart = -2 ;
+ else
+ nStart = 11 ;
+ }
// se richiesta sistemazione punto di inizio
if ( nStart != 0 && nStart != 11) {
const double COS_ANG_PERD_TG = cos( 5 * DEGTORAD) ;
@@ -1584,12 +1586,12 @@ WaterJetting::ProcessPath( int nPathId, int nPvId, int nClId)
}
// se altrimenti suggerito punto di inizio
else if ( nStart == 11) {
- ReplaceString( sMyNotes, "(", "") ;
- ReplaceString( sMyNotes, ")", "") ;
+ TrimLeft( sStart, "(") ;
+ TrimRight( sStart, ")") ;
Point3d ptStart ;
double dPar ;
int nFlag ;
- if ( GetValInNotes( sMyNotes, "START", ptStart) &&
+ if ( FromString( sStart, ptStart) &&
DistPointCurve( ptStart, *pCompo).GetParamAtMinDistPoint( 0, dPar, nFlag)) {
pCompo->ChangeStartPoint( dPar) ;
}