From 723f2174b63e548a1034f6a425cdfb656c0fc23d Mon Sep 17 00:00:00 2001 From: DarioS Date: Mon, 19 Apr 2021 15:07:28 +0200 Subject: [PATCH] EgtInterface 2.3d4 : - aggiunte interfacce per EgtCreateCurveCompoByInterpolation e EgtCreateCurveCompoByApproximation - aggiunta interfaccia per EgtAdjustOperationPhase. --- API_GdbCreateCurve.cpp | 22 ++++++++++++++++++++++ API_MachMgr.cpp | 7 +++++++ EgtInterface.rc | Bin 11718 -> 11718 bytes 3 files changed, 29 insertions(+) diff --git a/API_GdbCreateCurve.cpp b/API_GdbCreateCurve.cpp index 6066a28..f98b5ff 100644 --- a/API_GdbCreateCurve.cpp +++ b/API_GdbCreateCurve.cpp @@ -243,6 +243,28 @@ __stdcall EgtCreateCurveCompoByReorder( int nParentId, int nNumId, const int nId return ExeCreateCurveCompoByReorder( nParentId, vIds, ptNear, ( bErase != FALSE), nRefType, nullptr) ; } +//------------------------------------------------------------------------------- +int +__stdcall EgtCreateCurveCompoByInterpolation( int nParentId, int nP, const double ptPs[], int nType, int nRefType) +{ + PolyLine PL ; + for ( int i = 0 ; i < nP ; ++i) { + PL.AddUPoint( 0, Point3d( ptPs[3*i], ptPs[3*i+1], ptPs[3*i+2])) ; + } + return ExeCreateCurveCompoByInterpolation( nParentId, PL, nType, nRefType) ; +} + +//------------------------------------------------------------------------------- +int +__stdcall EgtCreateCurveCompoByApproximation( int nParentId, int nP, const double ptPs[], int nType, double dLinTol, int nRefType) +{ + PolyLine PL ; + for ( int i = 0 ; i < nP ; ++i) { + PL.AddUPoint( 0, Point3d( ptPs[3*i], ptPs[3*i+1], ptPs[3*i+2])) ; + } + return ExeCreateCurveCompoByApproximation( nParentId, PL, nType, dLinTol, nRefType) ; +} + //------------------------------------------------------------------------------- int __stdcall EgtCreateCurveCompoFromPoints( int nParentId, int nP, const double ptPs[], int nRefType) diff --git a/API_MachMgr.cpp b/API_MachMgr.cpp index f234b2a..191e1e2 100644 --- a/API_MachMgr.cpp +++ b/API_MachMgr.cpp @@ -1418,6 +1418,13 @@ __stdcall EgtSetAllOperationsStatus( BOOL bShow) return ( ExeSetAllOperationsStatus( bShow != FALSE) ? TRUE : FALSE) ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtAdjustOperationPhase( int nId) +{ + return ( ExeAdjustOperationPhase( nId) ? TRUE : FALSE) ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtChangeOperationPhase( int nId, int nNewPhase) diff --git a/EgtInterface.rc b/EgtInterface.rc index e2a84e1d2d3584e9082d8c005365dd968648aca9..5f434c61481e8b3600c7eba8fa1856b8eb853004 100644 GIT binary patch delta 111 zcmX>WeJpyzFE&P#%^&$rGEF|hS;uHH`Jtfh<^rw;7OzIAO+TQQ4Xt~E@c}o07@$;z5oCK delta 111 zcmX>WeJpyzFE&Qw%^&$rGEF|hS;uHR`Jtfh<^rw;7OzIAO+TQQ4Xt~E@c}o07yS5wg3PC