From 9f60658c35897435307374bcc91e088e05e5024f Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 17 May 2016 11:58:20 +0000 Subject: [PATCH] EgtMachKernel 1.6r3 : - gestione spiazzamento identificativi per i diversi oggetti derivati da UserObj - in Disposition, nei movimenti, si aggiornano Id grezzi - nelle lavorazioni si aggiornano gli identificativi della geometria originale. --- CamData.cpp | 2 +- CamData.h | 2 +- Disposition.cpp | 3 ++- Disposition.h | 2 +- Drilling.cpp | 4 +++- Drilling.h | 2 +- EgtMachKernel.rc | Bin 11782 -> 11782 bytes Milling.cpp | 4 +++- Milling.h | 2 +- SawFinishing.cpp | 4 +++- SawFinishing.h | 2 +- SawRoughing.cpp | 4 +++- SawRoughing.h | 2 +- Sawing.cpp | 4 +++- Sawing.h | 2 +- 15 files changed, 25 insertions(+), 14 deletions(-) diff --git a/CamData.cpp b/CamData.cpp index e01c73b..152be76 100644 --- a/CamData.cpp +++ b/CamData.cpp @@ -170,7 +170,7 @@ CamData::Save( STRVECTOR& vString) const //---------------------------------------------------------------------------- bool -CamData::Load( const STRVECTOR& vString) +CamData::Load( const STRVECTOR& vString, int nBaseGdbId) { if ( int( vString.size()) < CAM_PARAM_V1) return false ; diff --git a/CamData.h b/CamData.h index 4c8e0ef..77145eb 100644 --- a/CamData.h +++ b/CamData.h @@ -29,7 +29,7 @@ class CamData : public IUserObj virtual IGeomDB* GetGeomDB( void) const ; virtual bool ToSave( void) const { return true ; } virtual bool Save( STRVECTOR& vString) const ; - virtual bool Load( const STRVECTOR& vString) ; + virtual bool Load( const STRVECTOR& vString, int nBaseGdbId) ; virtual bool GetDrawPolyLines( POLYLINELIST& lstPL) const ; virtual bool Translate( const Vector3d& vtMove) ; virtual bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg) diff --git a/Disposition.cpp b/Disposition.cpp index 776fd19..3b45351 100644 --- a/Disposition.cpp +++ b/Disposition.cpp @@ -176,7 +176,7 @@ Disposition::Save( STRVECTOR& vString) const //---------------------------------------------------------------------------- bool -Disposition::Load( const STRVECTOR& vString) +Disposition::Load( const STRVECTOR& vString, int nBaseGdbId) { if ( vString.size() < 5) return false ; @@ -222,6 +222,7 @@ Disposition::Load( const STRVECTOR& vString) ! GetVal( vString[++k], DIS_MVD_PNT, MvrData.ptP) || ! GetVal( vString[++k], DIS_MVD_FLAG, MvrData.nFlag)) return false ; + MvrData.nRawId += nBaseGdbId ; } // altri dati aggiuntivi if ( k + 1 < int( vString.size())) { diff --git a/Disposition.h b/Disposition.h index 2588655..c8255db 100644 --- a/Disposition.h +++ b/Disposition.h @@ -54,7 +54,7 @@ class Disposition : public Operation bool ToSave( void) const override { return true ; } bool Save( STRVECTOR& vString) const override ; - bool Load( const STRVECTOR& vString) override ; + bool Load( const STRVECTOR& vString, int nBaseGdbId) override ; public : // Operation bool IsEmpty( void) const override diff --git a/Drilling.cpp b/Drilling.cpp index 73b645b..b5fcc1e 100644 --- a/Drilling.cpp +++ b/Drilling.cpp @@ -118,13 +118,15 @@ Drilling::Save( STRVECTOR& vString) const //---------------------------------------------------------------------------- bool -Drilling::Load( const STRVECTOR& vString) +Drilling::Load( const STRVECTOR& vString, int nBaseGdbId) { int nSize = int( vString.size()) ; // lista identificativi geometrie da lavorare int k = - 1 ; if ( k >= nSize - 1 || ! GetVal( vString[++k], KEY_IDS, m_vId)) return false ; + for ( auto& Sel : m_vId) + Sel.nId += nBaseGdbId ; // parametri lavorazione for ( int i = 0 ; i < m_Params.GetSize() ; ++ i) { int nKey ; diff --git a/Drilling.h b/Drilling.h index 851a556..27562e7 100644 --- a/Drilling.h +++ b/Drilling.h @@ -31,7 +31,7 @@ class Drilling : public Machining bool ToSave( void) const override { return true ; } bool Save( STRVECTOR& vString) const override ; - bool Load( const STRVECTOR& vString) override ; + bool Load( const STRVECTOR& vString, int nBaseGdbId) override ; public : // Operation bool IsEmpty( void) const override diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index c8796f9d4b2c0a925a73dbbd8bb8a25b7890731f..611dffb1f34f337e163ffc56bb0d5176a8c38bc8 100644 GIT binary patch delta 97 zcmZpRX^YwLhmFyA^ItYwW=7-5j>5W|vxM9jH?QON0rG*u7nvrX5iEd9O=7{OSQ@Kh Hr8(RHPhB8F delta 97 zcmZpRX^YwLhmFx_^ItYwW=5mQj>5W|vxM9jH?QON0rG*u7nvrX5iEd9O=7{OSQ@Kh Hr8(RHP01iS diff --git a/Milling.cpp b/Milling.cpp index 396ac61..198ce57 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -100,13 +100,15 @@ Milling::Save( STRVECTOR& vString) const //---------------------------------------------------------------------------- bool -Milling::Load( const STRVECTOR& vString) +Milling::Load( const STRVECTOR& vString, int nBaseGdbId) { int nSize = int( vString.size()) ; // lista identificativi geometrie da lavorare int k = - 1 ; if ( k >= nSize - 1 || ! GetVal( vString[++k], KEY_IDS, m_vId)) return false ; + for ( auto& Sel : m_vId) + Sel.nId += nBaseGdbId ; // parametri lavorazione for ( int i = 0 ; i < m_Params.GetSize() ; ++ i) { int nKey ; diff --git a/Milling.h b/Milling.h index 3569e4d..4c63a87 100644 --- a/Milling.h +++ b/Milling.h @@ -29,7 +29,7 @@ class Milling : public Machining bool ToSave( void) const override { return true ; } bool Save( STRVECTOR& vString) const override ; - bool Load( const STRVECTOR& vString) override ; + bool Load( const STRVECTOR& vString, int nBaseGdbId) override ; public : // Operation bool IsEmpty( void) const override diff --git a/SawFinishing.cpp b/SawFinishing.cpp index f70b450..ea1de7b 100644 --- a/SawFinishing.cpp +++ b/SawFinishing.cpp @@ -123,13 +123,15 @@ SawFinishing::Save( STRVECTOR& vString) const //---------------------------------------------------------------------------- bool -SawFinishing::Load( const STRVECTOR& vString) +SawFinishing::Load( const STRVECTOR& vString, int nBaseGdbId) { int nSize = int( vString.size()) ; // lista identificativi geometrie da lavorare int k = - 1 ; if ( k >= nSize - 1 || ! GetVal( vString[++k], KEY_IDS, m_vId)) return false ; + for ( auto& Sel : m_vId) + Sel.nId += nBaseGdbId ; // parametri lavorazione for ( int i = 0 ; i < m_Params.GetSize() ; ++ i) { int nKey ; diff --git a/SawFinishing.h b/SawFinishing.h index 05483ea..76a6151 100644 --- a/SawFinishing.h +++ b/SawFinishing.h @@ -33,7 +33,7 @@ class SawFinishing : public Machining bool ToSave( void) const override { return true ; } bool Save( STRVECTOR& vString) const override ; - bool Load( const STRVECTOR& vString) override ; + bool Load( const STRVECTOR& vString, int nBaseGdbId) override ; public : // Operation bool IsEmpty( void) const override diff --git a/SawRoughing.cpp b/SawRoughing.cpp index dac9d8c..0af5b8d 100644 --- a/SawRoughing.cpp +++ b/SawRoughing.cpp @@ -115,13 +115,15 @@ SawRoughing::Save( STRVECTOR& vString) const //---------------------------------------------------------------------------- bool -SawRoughing::Load( const STRVECTOR& vString) +SawRoughing::Load( const STRVECTOR& vString, int nBaseGdbId) { int nSize = int( vString.size()) ; // lista identificativi geometrie da lavorare int k = - 1 ; if ( k >= nSize - 1 || ! GetVal( vString[++k], KEY_IDS, m_vId)) return false ; + for ( auto& Sel : m_vId) + Sel.nId += nBaseGdbId ; // parametri lavorazione for ( int i = 0 ; i < m_Params.GetSize() ; ++ i) { int nKey ; diff --git a/SawRoughing.h b/SawRoughing.h index 8e47c87..1f12b3d 100644 --- a/SawRoughing.h +++ b/SawRoughing.h @@ -33,7 +33,7 @@ class SawRoughing : public Machining bool ToSave( void) const override { return true ; } bool Save( STRVECTOR& vString) const override ; - bool Load( const STRVECTOR& vString) override ; + bool Load( const STRVECTOR& vString, int nBaseGdbId) override ; public : // Operation bool IsEmpty( void) const override diff --git a/Sawing.cpp b/Sawing.cpp index 7856cd6..fbc5564 100644 --- a/Sawing.cpp +++ b/Sawing.cpp @@ -106,13 +106,15 @@ Sawing::Save( STRVECTOR& vString) const //---------------------------------------------------------------------------- bool -Sawing::Load( const STRVECTOR& vString) +Sawing::Load( const STRVECTOR& vString, int nBaseGdbId) { int nSize = int( vString.size()) ; // lista identificativi geometrie da lavorare int k = - 1 ; if ( k >= nSize - 1 || ! GetVal( vString[++k], KEY_IDS, m_vId)) return false ; + for ( auto& Sel : m_vId) + Sel.nId += nBaseGdbId ; // parametri lavorazione for ( int i = 0 ; i < m_Params.GetSize() ; ++ i) { int nKey ; diff --git a/Sawing.h b/Sawing.h index 35fcd2a..123bd31 100644 --- a/Sawing.h +++ b/Sawing.h @@ -33,7 +33,7 @@ class Sawing : public Machining bool ToSave( void) const override { return true ; } bool Save( STRVECTOR& vString) const override ; - bool Load( const STRVECTOR& vString) override ; + bool Load( const STRVECTOR& vString, int nBaseGdbId) override ; public : // Operation bool IsEmpty( void) const override