diff --git a/API_GeoSnap.cpp b/API_GeoSnap.cpp index 268776d..9762b08 100644 --- a/API_GeoSnap.cpp +++ b/API_GeoSnap.cpp @@ -290,11 +290,40 @@ __stdcall EgtCurveThickness( int nId, double* pdThick) //---------------------------------------------------------------------------- BOOL -__stdcall EgtCurveSelfIntersCount( int nId, int* pnCount) +__stdcall EgtCurveSelfIntersCount( int nId, int* pnCount) { return ( ExeCurveSelfIntersCount( nId, pnCount) ? TRUE : FALSE) ; } +//---------------------------------------------------------------------------- +BOOL +__stdcall EgtCurveMinAreaRectangleXY( int nId, int nRefId, + double ptOrig[3], double vtX[3], double vtY[3], double vtZ[3], double* pdDimX, double* pdDimY) +{ + // eseguo calcoli + Frame3d frRect ; + double dDimX, dDimY ; + if ( ! ExeCurveMinAreaRectangleXY( nId, nRefId, frRect, dDimX, dDimY)) + return FALSE ; + // assegno l'origine + if ( ptOrig != nullptr) + VEC_FROM_3D( ptOrig, frRect.Orig()) + // assegno il versore X + if ( vtX != nullptr) + VEC_FROM_3D( vtX, frRect.VersX()) + // assegno il versore Y + if ( vtY != nullptr) + VEC_FROM_3D( vtY, frRect.VersY()) + // assegno il versore Z + if ( vtZ != nullptr) + VEC_FROM_3D( vtZ, frRect.VersZ()) + if ( pdDimX != nullptr) + *pdDimX = dDimX ; + if ( pdDimY != nullptr) + *pdDimY = dDimY ; + return TRUE ; +} + //---------------------------------------------------------------------------- int __stdcall EgtClosedCurveClassify( int nId1, int nId2) diff --git a/EgtInterface.rc b/EgtInterface.rc index 84322e8..d03fd22 100644 Binary files a/EgtInterface.rc and b/EgtInterface.rc differ