diff --git a/API_GdbModifyCurve.cpp b/API_GdbModifyCurve.cpp index 3c688d7..104a61a 100644 --- a/API_GdbModifyCurve.cpp +++ b/API_GdbModifyCurve.cpp @@ -186,6 +186,27 @@ __stdcall EgtModifyArc3P( int nId, const double ptMid[3], int nRefType) return ( ExeModifyArc3P( nId, ptMid, nRefType) ? TRUE : FALSE) ; } +//------------------------------------------------------------------------------- +BOOL +__stdcall EgtAddCurveCompoJoint( int nId, double dU) +{ + return ( ExeAddCurveCompoJoint( nId, dU) ? TRUE : FALSE) ; +} + +//------------------------------------------------------------------------------- +BOOL +__stdcall EgtModifyCurveCompoJoint( int nId, int nU, const double ptP[3], int nRefType) +{ + return ( ExeModifyCurveCompoJoint( nId, nU, ptP, nRefType) ? TRUE : FALSE) ; +} + +//------------------------------------------------------------------------------- +BOOL +__stdcall EgtRemoveCurveCompoJoint( int nId, int nU) +{ + return ( ExeRemoveCurveCompoJoint( nId, nU) ? TRUE : FALSE) ; +} + //------------------------------------------------------------------------------- int __stdcall EgtExplodeCurveCompo( int nId, int* pnCount) diff --git a/API_MachMgr.cpp b/API_MachMgr.cpp index eaeaa46..721505f 100644 --- a/API_MachMgr.cpp +++ b/API_MachMgr.cpp @@ -204,6 +204,14 @@ __stdcall EgtModifyRawPart( int nRawId, const double ptOrig[3], return ( ExeModifyRawPart( nRawId, ptOrig, dLength, dWidth, dHeight, vCol) ? TRUE : FALSE) ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtModifyRawPart2( int nRawId, int nCrvId, + double dOverMat, double dZmin, double dHeight, const int vCol[4]) +{ + return ( ExeModifyRawPart( nRawId, nCrvId, dOverMat, dZmin, dHeight, vCol) ? TRUE : FALSE) ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtModifyRawPartSize( int nRawId, double dLength, double dWidth, double dHeight) diff --git a/API_Nesting.cpp b/API_Nesting.cpp index ea67f4f..620cf10 100644 --- a/API_Nesting.cpp +++ b/API_Nesting.cpp @@ -103,8 +103,22 @@ __stdcall EgtMoveBoxCluster( int nId[], int nCount, double vtMove[3], //----------------------------------------------------------------------------- BOOL -__stdcall EgtVerifyPartCluster( int nId[], int nCount, BOOL bReducedCut, - double dXmin, double dYmin, double dXmax, double dYmax) +__stdcall EgtCreateOutRegion( int nParentId, + double dXmin, double dYmin, double dXmax, double dYmax, double dZ) +{ + return ( ExeCreateOutRegion( nParentId, dXmin, dYmin, dXmax, dYmax, dZ) ? TRUE : FALSE) ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtCreateOutRegion2( int nParentId, int nOutCrvId) +{ + return ( ExeCreateOutRegion( nParentId, nOutCrvId) ? TRUE : FALSE) ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtVerifyPartCluster( int nId[], int nCount, BOOL bReducedCut) { // verifico if ( nId == nullptr || nCount <= 0) @@ -115,7 +129,7 @@ __stdcall EgtVerifyPartCluster( int nId[], int nCount, BOOL bReducedCut, for ( int i = 0 ; i < nCount ; ++ i) vIds.push_back( nId[i]) ; // eseguo - if ( ! ExeVerifyPartCluster( vIds, ( bReducedCut != FALSE), dXmin, dYmin,dXmax, dYmax)) + if ( ! ExeVerifyPartCluster( vIds, ( bReducedCut != FALSE))) return FALSE ; return TRUE ; } @@ -141,8 +155,25 @@ __stdcall EgtPackPartCluster( int nId[], int nCount, BOOL bReducedCut, //----------------------------------------------------------------------------- BOOL -__stdcall EgtMovePartCluster( int nId[], int nCount, BOOL bReducedCut, double vtMove[3], - double dXmin, double dYmin, double dXmax, double dYmax) +__stdcall EgtPackPartCluster2( int nId[], int nCount, BOOL bReducedCut, BOOL bBottomUp) +{ + // verifico + if ( nId == nullptr || nCount <= 0) + return FALSE ; + // riempio il vettore + INTVECTOR vIds ; + vIds.reserve( nCount) ; + for ( int i = 0 ; i < nCount ; ++ i) + vIds.push_back( nId[i]) ; + // eseguo + if ( ! ExePackPartCluster( vIds, ( bReducedCut != FALSE), ( bBottomUp != FALSE))) + return FALSE ; + return TRUE ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtMovePartCluster( int nId[], int nCount, BOOL bReducedCut, double vtMove[3]) { // verifico if ( nId == nullptr || nCount <= 0) @@ -154,7 +185,7 @@ __stdcall EgtMovePartCluster( int nId[], int nCount, BOOL bReducedCut, double vt vIds.push_back( nId[i]) ; // eseguo Vector3d vtM = vtMove ; - if ( ! ExeMovePartCluster( vIds, ( bReducedCut != FALSE), vtM, dXmin, dYmin, dXmax, dYmax)) + if ( ! ExeMovePartCluster( vIds, ( bReducedCut != FALSE), vtM)) return FALSE ; VEC_FROM_3D( vtMove, vtM) return TRUE ; @@ -162,8 +193,7 @@ __stdcall EgtMovePartCluster( int nId[], int nCount, BOOL bReducedCut, double vt //----------------------------------------------------------------------------- BOOL -__stdcall EgtRotatePartCluster( int nId[], int nCount, BOOL bReducedCut, const double ptCen[3], double* pdRotAngDeg, - double dXmin, double dYmin, double dXmax, double dYmax) +__stdcall EgtRotatePartCluster( int nId[], int nCount, BOOL bReducedCut, const double ptCen[3], double* pdRotAngDeg) { // verifico if ( nId == nullptr || nCount <= 0 || pdRotAngDeg == nullptr) @@ -174,15 +204,14 @@ __stdcall EgtRotatePartCluster( int nId[], int nCount, BOOL bReducedCut, const d for ( int i = 0 ; i < nCount ; ++ i) vIds.push_back( nId[i]) ; // eseguo - if ( ! ExeRotatePartCluster( vIds, ( bReducedCut != FALSE), ptCen, *pdRotAngDeg, dXmin, dYmin, dXmax, dYmax)) + if ( ! ExeRotatePartCluster( vIds, ( bReducedCut != FALSE), ptCen, *pdRotAngDeg)) return FALSE ; return TRUE ; } //----------------------------------------------------------------------------- BOOL -__stdcall EgtTgMovePartClusterOnCollision( int nId[], int nCount, BOOL bReducedCut, double vtMove[3], - double dXmin, double dYmin, double dXmax, double dYmax) +__stdcall EgtTgMovePartClusterOnCollision( int nId[], int nCount, BOOL bReducedCut, double vtMove[3]) { // verifico if ( nId == nullptr || nCount <= 0) @@ -194,7 +223,7 @@ __stdcall EgtTgMovePartClusterOnCollision( int nId[], int nCount, BOOL bReducedC vIds.push_back( nId[i]) ; // eseguo Vector3d vtM = vtMove ; - if ( ! ExeTgMovePartClusterOnCollision( vIds, ( bReducedCut != FALSE), vtM, dXmin, dYmin, dXmax, dYmax)) + if ( ! ExeTgMovePartClusterOnCollision( vIds, ( bReducedCut != FALSE), vtM)) return FALSE ; VEC_FROM_3D( vtMove, vtM) return TRUE ; @@ -202,8 +231,7 @@ __stdcall EgtTgMovePartClusterOnCollision( int nId[], int nCount, BOOL bReducedC //----------------------------------------------------------------------------- BOOL -__stdcall EgtAlignPartClusterOnCollision( int nId[], int nCount, BOOL bReducedCut, - double dXmin, double dYmin, double dXmax, double dYmax, BOOL* pbMoved) +__stdcall EgtAlignPartClusterOnCollision( int nId[], int nCount, BOOL bReducedCut, BOOL* pbMoved) { // verifico if ( nId == nullptr || nCount <= 0) @@ -215,7 +243,7 @@ __stdcall EgtAlignPartClusterOnCollision( int nId[], int nCount, BOOL bReducedCu vIds.push_back( nId[i]) ; // eseguo bool bMoved ; - if ( ! ExeAlignPartClusterOnCollision( vIds, ( bReducedCut != FALSE), dXmin, dYmin, dXmax, dYmax, bMoved)) + if ( ! ExeAlignPartClusterOnCollision( vIds, ( bReducedCut != FALSE), bMoved)) return FALSE ; if ( pbMoved != nullptr) *pbMoved = bMoved ; @@ -224,8 +252,7 @@ __stdcall EgtAlignPartClusterOnCollision( int nId[], int nCount, BOOL bReducedCu //----------------------------------------------------------------------------- BOOL -__stdcall EgtMoveToSnapPointOnCollision( int nId[], int nCount, BOOL bReducedCut, double dMaxMove, - double dXmin, double dYmin, double dXmax, double dYmax, BOOL* pbMoved) +__stdcall EgtMoveToSnapPointOnCollision( int nId[], int nCount, BOOL bReducedCut, double dMaxMove, BOOL* pbMoved) { // verifico if ( nId == nullptr || nCount <= 0) @@ -237,7 +264,7 @@ __stdcall EgtMoveToSnapPointOnCollision( int nId[], int nCount, BOOL bReducedCut vIds.push_back( nId[i]) ; // eseguo bool bMoved ; - if ( ! ExeMoveToSnapPointOnCollision( vIds, ( bReducedCut != FALSE), dMaxMove, dXmin, dYmin, dXmax, dYmax, bMoved)) + if ( ! ExeMoveToSnapPointOnCollision( vIds, ( bReducedCut != FALSE), dMaxMove, bMoved)) return FALSE ; if ( pbMoved != nullptr) *pbMoved = ( bMoved ? TRUE : FALSE) ;