From 5fe3a66f40d7dadd4cbe1b40375b1fa47fe9b780 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 4 Aug 2015 17:49:53 +0000 Subject: [PATCH] Include : - aggiunti Intervals - aggiornamenti. --- EGkGeomDB.h | 1 + EGkIntersCurves.h | 2 ++ EGkIntervals.h | 54 +++++++++++++++++++++++++++++++++++++++++++++++ EInAPI.h | 12 +++++++++-- EXeConst.h | 7 +++++- EXeExecutor.h | 10 ++++++++- 6 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 EGkIntervals.h diff --git a/EGkGeomDB.h b/EGkGeomDB.h index ce05e12..6097dc9 100644 --- a/EGkGeomDB.h +++ b/EGkGeomDB.h @@ -48,6 +48,7 @@ class __declspec( novtable) IGeomDB virtual int InsertGroup( int nId, int nRefId, int nSonBeforeAfter, const Frame3d& frFrame) = 0 ; virtual int AddGeoObj( int nId, int nParentId, IGeoObj* pGeoObj) = 0 ; virtual int InsertGeoObj( int nId, int nRefId, int nSonBeforeAfter, IGeoObj* pGeoObj) = 0 ; + virtual bool ReplaceGeoObj( int nId, IGeoObj* pGeoObj) = 0 ; virtual int GetFirstInGroup( int nIdGroup) const = 0 ; virtual int GetNext( int nId) const = 0 ; virtual int GetLastInGroup( int nIdGroup) const = 0 ; diff --git a/EGkIntersCurves.h b/EGkIntersCurves.h index de7a1df..38106f1 100644 --- a/EGkIntersCurves.h +++ b/EGkIntersCurves.h @@ -149,6 +149,8 @@ class SelfIntersCurve EGK_EXPORT bool GetOverlaps( void) ; //! Restituisce il numero di auto-intersezioni (intersezioni doppie coincidenti e sovrapposte contano uno) EGK_EXPORT int GetNumInters( void) ; + //! Restituisce il numero di auto-intersezioni in cui la curva si attraversa (intersezioni doppie coincidenti e sovrapposte contano uno) + EGK_EXPORT int GetNumCrossInters( void) ; //! Restituisce informazioni sull'auto-intersezione di indice nInd ( 0 based) EGK_EXPORT bool GetIntCrvCrvInfo( int nInd, IntCrvCrvInfo& aInfo) ; //! Restituisce il punto di auto-intersezione pił vicino al punto passato diff --git a/EGkIntervals.h b/EGkIntervals.h new file mode 100644 index 0000000..aaa598f --- /dev/null +++ b/EGkIntervals.h @@ -0,0 +1,54 @@ +//---------------------------------------------------------------------------- +// EgalTech 2015-2015 +//---------------------------------------------------------------------------- +// File : EGkIntervals.h Data : 03.08.15 Versione : 1.6h1 +// Contenuto : Dichiarazione della classe insieme di intervalli Intervals. +// +// +// +// Modifiche : 03.08.15 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include + +//----------------------- Macro per import/export ---------------------------- +#undef EGK_EXPORT +#if defined( I_AM_EGK) // da definirsi solo nella DLL + #define EGK_EXPORT __declspec( dllexport) +#else + #define EGK_EXPORT __declspec( dllimport) +#endif + +//---------------------------------------------------------------------------- +class Intervals +{ + public : + EGK_EXPORT Intervals( void) + : m_Iter( m_lInts.end()) {} + + public : + EGK_EXPORT void Reset( void) ; + EGK_EXPORT void Set( double dMin, double dMax) ; + EGK_EXPORT void Add( double dMin, double dMax) ; + EGK_EXPORT void Remove( double dMin, double dMax) ; + EGK_EXPORT bool IsEmpty( void) const + { return m_lInts.empty() ; } + EGK_EXPORT int GetNumbers( void) const + { return int( m_lInts.size()) ; } + EGK_EXPORT bool GetMinMax( double& dMin, double& dMax) ; + EGK_EXPORT bool GetFirst( double& dMin, double& dMax) ; + EGK_EXPORT bool GetNext( double& dMin, double& dMax) ; + + private : + typedef std::pair INTERV ; // intervallo, definito come insieme di minimo e massimo + typedef std::list INTERVLIST ; // lista di intervalli + typedef INTERVLIST::const_iterator INTL_CINT ; // iteratore costante a lista di intervalli + + private : + INTERVLIST m_lInts ; + INTL_CINT m_Iter ; +} ; diff --git a/EInAPI.h b/EInAPI.h index 8a3f35a..03a5ba6 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -227,8 +227,12 @@ EIN_EXPORT BOOL __stdcall EgtResetCurrPartLayer( void) ; EIN_EXPORT int __stdcall EgtGetPartNbr( BOOL bOnlyVisible) ; EIN_EXPORT int __stdcall EgtGetFirstPart( BOOL bOnlyVisible) ; EIN_EXPORT int __stdcall EgtGetNextPart( int nId, BOOL bOnlyVisible) ; +EIN_EXPORT int __stdcall EgtGetLastPart( BOOL bOnlyVisible) ; +EIN_EXPORT int __stdcall EgtGetPrevPart( int nId, BOOL bOnlyVisible) ; EIN_EXPORT int __stdcall EgtGetFirstLayer( int nPartId, BOOL bOnlyVisible) ; EIN_EXPORT int __stdcall EgtGetNextLayer( int nId, BOOL bOnlyVisible) ; +EIN_EXPORT int __stdcall EgtGetLastLayer( int nPartId, BOOL bOnlyVisible) ; +EIN_EXPORT int __stdcall EgtGetPrevLayer( int nId, BOOL bOnlyVisible) ; EIN_EXPORT BOOL __stdcall EgtEraseEmptyParts( void) ; EIN_EXPORT BOOL __stdcall EgtSelectPartObjs( int nPartId) ; EIN_EXPORT BOOL __stdcall EgtDeselectPartObjs( int nPartId) ; @@ -327,6 +331,8 @@ EIN_EXPORT int __stdcall EgtSplitText( int nId, int* pnCount) ; // GeomDb Curve Modify EIN_EXPORT BOOL __stdcall EgtInvertCurve( int nId) ; +EIN_EXPORT BOOL __stdcall EgtOffsetCurve( int nId, double dDist, int nType) ; +EIN_EXPORT BOOL __stdcall EgtApproxCurve( int nId, int nApprType, double dLinTol) ; EIN_EXPORT BOOL __stdcall EgtChangeClosedCurveStartPoint( int nId, const double ptP[3], int nRefType) ; EIN_EXPORT BOOL __stdcall EgtModifyCurveStartPoint( int nId, const double ptP[3], int nRefType) ; EIN_EXPORT BOOL __stdcall EgtModifyCurveEndPoint( int nId, const double ptP[3], int nRefType) ; @@ -342,13 +348,11 @@ EIN_EXPORT BOOL __stdcall EgtExtendCurveEndByLen( int nId, double dLen) ; EIN_EXPORT BOOL __stdcall EgtTrimExtendCurveByLen( int nId, double dLen, const double ptNear[3], int nRefType) ; EIN_EXPORT int __stdcall EgtSplitCurve( int nId, int nParts) ; EIN_EXPORT int __stdcall EgtSplitCurveAtPoint( int nId, const double ptOn[3], int nRefType) ; -EIN_EXPORT BOOL __stdcall EgtOffsetCurve( int nId, double dDist, int nType) ; EIN_EXPORT BOOL __stdcall EgtModifyCircleCP( int nId, const double ptOn[3], int nRefType) ; EIN_EXPORT BOOL __stdcall EgtModifyArcRadius( int nId, double dRad) ; EIN_EXPORT BOOL __stdcall EgtModifyArcC2P( int nId, const double ptEnd[3], int nRefType) ; EIN_EXPORT BOOL __stdcall EgtModifyArc3P( int nId, const double ptMid[3], int nRefType) ; EIN_EXPORT int __stdcall EgtExplodeCurveCompo( int nId, int* pnCount) ; -EIN_EXPORT int __stdcall EgtApproxCurve( int nId, int nApprType, double dLinTol) ; // GeomDb Surf Modify EIN_EXPORT BOOL __stdcall EgtInvertSurface( int nId) ; @@ -416,6 +420,10 @@ EIN_EXPORT BOOL __stdcall EgtMirrorGroup( int nId, const double vPnt[3], const d EIN_EXPORT BOOL __stdcall EgtShearGroup( int nId, const double vPnt[3], const double vN[3], const double vDir[3], double dCoeff) ; +// Nesting +EIN_EXPORT BOOL __stdcall EgtCreateFlatParts( int nType) ; +EIN_EXPORT BOOL __stdcall EgtPackPart( int nId, double dXmax, double dOffs) ; + // Machining EIN_EXPORT BOOL __stdcall EgtInitMachMgr( const wchar_t* wsMachinesDir) ; EIN_EXPORT int __stdcall EgtGetMachGroupNbr( void) ; diff --git a/EXeConst.h b/EXeConst.h index 8d17d80..91eaef1 100644 --- a/EXeConst.h +++ b/EXeConst.h @@ -37,4 +37,9 @@ enum ApprType{ APP_LINES = 0, // come ICurve::APL_STD APP_LEFT_CONVEX_LINES = 11, // come ICurve::APL_LEFT_CONVEX APP_RIGHT_LINES = 2, // come ICurve::APL_RIGHT APP_RIGHT_CONVEX_LINES = 12, // come ICurve::APL_RIGHT_CONVEX - APP_ARCS = 3} ; \ No newline at end of file + APP_ARCS = 3} ; + +//----------------- Costanti tipo costruzione pezzi piani ---------------------- +enum FpcType{ FPC_REGION = 1, // costruzione da regione + FPC_LAYER = 2, // costruzione da layer + FPC_NGE = 3} ; // costruzione da pezzo Nge \ No newline at end of file diff --git a/EXeExecutor.h b/EXeExecutor.h index 95a9f37..8b75131 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -227,8 +227,12 @@ EXE_EXPORT bool ExeResetCurrPartLayer( void) ; EXE_EXPORT int ExeGetPartNbr( bool bOnlyVisible) ; EXE_EXPORT int ExeGetFirstPart( bool bOnlyVisible) ; EXE_EXPORT int ExeGetNextPart( int nId, bool bOnlyVisible) ; +EXE_EXPORT int ExeGetLastPart( bool bOnlyVisible) ; +EXE_EXPORT int ExeGetPrevPart( int nId, bool bOnlyVisible) ; EXE_EXPORT int ExeGetFirstLayer( int nPartId, bool bOnlyVisible) ; EXE_EXPORT int ExeGetNextLayer( int nId, bool bOnlyVisible) ; +EXE_EXPORT int ExeGetLastLayer( int nPartId, bool bOnlyVisible) ; +EXE_EXPORT int ExeGetPrevLayer( int nId, bool bOnlyVisible) ; EXE_EXPORT bool ExeEraseEmptyParts( void) ; EXE_EXPORT bool ExeSelectPartObjs( int nPartId) ; EXE_EXPORT bool ExeDeselectPartObjs( int nPartId) ; @@ -330,6 +334,7 @@ EXE_EXPORT int ExeSplitText( int nId, int* pnCount) ; // GeomDb Curve Modify EXE_EXPORT bool ExeInvertCurve( const INTVECTOR& vIds) ; EXE_EXPORT bool ExeOffsetCurve( int nId, double dDist, int nType) ; +EXE_EXPORT bool ExeApproxCurve( int nId, int nApprType, double dLinTol) ; EXE_EXPORT bool ExeChangeClosedCurveStartPoint( int nId, const Point3d& ptP, int nRefType) ; EXE_EXPORT bool ExeModifyCurveStartPoint( int nId, const Point3d& ptP, int nRefType) ; EXE_EXPORT bool ExeModifyCurveEndPoint( int nId, const Point3d& ptP, int nRefType) ; @@ -354,7 +359,6 @@ EXE_EXPORT bool ExeModifyArcToExplementary( int nId) ; EXE_EXPORT bool ExeModifyArcByFlip( int nId) ; EXE_EXPORT int ExeExplodeCurveCompo( int nId, int* pnCount) ; EXE_EXPORT bool ExeMergeCurvesInCurveCompo( int nId, double dLinTol) ; -EXE_EXPORT int ExeApproxCurve( int nId, int nApprType, double dLinTol) ; // GeomDb Surf Modify EXE_EXPORT bool ExeInvertSurface( const INTVECTOR& vIds) ; @@ -420,6 +424,10 @@ EXE_EXPORT bool ExeMirrorGroup( int nId, const Point3d& ptP, const Vector3d& vtN EXE_EXPORT bool ExeShearGroup( int nId, const Point3d& ptP, const Vector3d& vtN, const Vector3d& vtDir, double dCoeff) ; +// Nesting +EXE_EXPORT bool ExeCreateFlatParts( int nType) ; +EXE_EXPORT bool ExePackPart( int nId, double dXmax, double dOffs) ; + // Machining EXE_EXPORT bool ExeInitMachMgr( const std::string& sMachinesDir) ; EXE_EXPORT bool ExeUpdateMachMgr( void) ;