diff --git a/API_GdbModifyCurve.cpp b/API_GdbModifyCurve.cpp index 3a6157d..c6b8ea9 100644 --- a/API_GdbModifyCurve.cpp +++ b/API_GdbModifyCurve.cpp @@ -49,6 +49,13 @@ __stdcall EgtApproxCurve( int nId, int nApprType, double dLinTol) return ( ExeApproxCurve( nId, nApprType, dLinTol) ? TRUE : FALSE) ; } +//------------------------------------------------------------------------------- +BOOL +__stdcall EgtProjectCurveOnPlane( int nId, const double ptP[3], const double vtN[3], int nRefType) +{ + return ( ExeProjectCurveOnPlane( nId, ptP, vtN, nRefType) ? TRUE : FALSE) ; +} + //---------------------------------------------------------------------------- BOOL __stdcall EgtChangeClosedCurveStartPoint( int nId, const double ptP[3], int nRefType) @@ -186,6 +193,34 @@ __stdcall EgtModifyArc3P( int nId, const double ptMid[3], int nRefType) return ( ExeModifyArc3P( nId, ptMid, nRefType) ? TRUE : FALSE) ; } +//------------------------------------------------------------------------------- +BOOL +__stdcall EgtCloseCurveCompo( int nId) +{ + return ( ExeCloseCurveCompo( nId) ? TRUE : FALSE) ; +} + +//------------------------------------------------------------------------------- +BOOL +__stdcall EgtAddCurveCompoLine( int nId, const double ptP[3], int nRefType) +{ + return ( ExeAddCurveCompoLine( nId, ptP, nRefType) ? TRUE : FALSE) ; +} + +//------------------------------------------------------------------------------- +BOOL +__stdcall EgtAddCurveCompoArcTg( int nId, const double ptP[3], int nRefType) +{ + return ( ExeAddCurveCompoArcTg( nId, ptP, nRefType) ? TRUE : FALSE) ; +} + +//------------------------------------------------------------------------------- +BOOL +__stdcall EgtAddCurveCompoArc2P( int nId, const double ptMid[3], const double ptP[3], int nRefType) +{ + return ( ExeAddCurveCompoArc2P( nId, ptMid, ptP, nRefType) ? TRUE : FALSE) ; +} + //------------------------------------------------------------------------------- BOOL __stdcall EgtAddCurveCompoJoint( int nId, double dU) diff --git a/API_GeoBase.cpp b/API_GeoBase.cpp index 505cd71..665a473 100644 --- a/API_GeoBase.cpp +++ b/API_GeoBase.cpp @@ -375,6 +375,18 @@ __stdcall EgtFrameOCS( double ptO[3], double vtDirZ[3], return TRUE ; } +//----------------------------------------------------------------------------- +int +__stdcall EgtFrameGetType( const double ptOrig[3], + const double vtX[3], const double vtY[3], const double vtZ[3]) +{ + // costruisco il riferimento + Frame3d frTemp ; + frTemp.Set( ptOrig, vtX, vtY, vtZ) ; + // ne ricavo il tipo + return frTemp.GetType() ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtFrameTranslate( double ptOrig[3], double vtX[3], double vtY[3], double vtZ[3], @@ -481,6 +493,21 @@ __stdcall EgtFrameLocToLoc( double ptOrig[3], double vtX[3], double vtY[3], doub //----------------------------------------------------------------------------- // BBox3d +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtBBoxTranslate( double ptMin[3], double ptMax[3], + const double vtMove[3]) +{ + // eseguo la trasformazione + BBox3d b3Temp ; + b3Temp.Set( ptMin, ptMax) ; + if ( ! b3Temp.Translate( vtMove)) + return FALSE ; + // aggiorno i parametri del box + VEC_FROM_3D( ptMin, b3Temp.GetMin()) + VEC_FROM_3D( ptMax, b3Temp.GetMax()) + return TRUE ; +} //----------------------------------------------------------------------------- BOOL diff --git a/API_GeoSnap.cpp b/API_GeoSnap.cpp index 72f8854..345656f 100644 --- a/API_GeoSnap.cpp +++ b/API_GeoSnap.cpp @@ -213,11 +213,46 @@ __stdcall EgtCurveLengthAtPoint( int nId, const double ptOn[3], double dExtend, return ( ExeCurveLengthAtPoint( nId, ptOn, dExtend, pdLen) ? TRUE : FALSE) ; } +//---------------------------------------------------------------------------- +BOOL +__stdcall EgtCurveIsClosed( int nId) +{ + return ( ExeCurveIsClosed( nId) ? TRUE : FALSE) ; +} + +//---------------------------------------------------------------------------- +BOOL +__stdcall EgtCurveIsFlat( int nId, double vtN[3], double* pdDist) +{ + if ( vtN == nullptr || pdDist == nullptr) + return FALSE ; + Plane3d Plane ; + if ( ! ExeCurveIsFlat( nId, Plane)) + return FALSE ; + VEC_FROM_3D( vtN, Plane.vtN) + *pdDist = Plane.dDist ; + return true ; +} + //---------------------------------------------------------------------------- BOOL __stdcall EgtCurveAreaXY( int nId, double* pdArea) { - return ( ExeCurveAreaXY( nId, pdArea) ? TRUE : FALSE) ; + return ( ExeCurveAreaXY( nId, *pdArea) ? TRUE : FALSE) ; +} + +//---------------------------------------------------------------------------- +BOOL +__stdcall EgtCurveArea( int nId, double vtN[3], double* pdDist, double* pdArea) +{ + if ( vtN == nullptr || pdDist == nullptr || pdArea == nullptr) + return FALSE ; + Plane3d Plane ; + if ( ! ExeCurveArea( nId, Plane, *pdArea)) + return FALSE ; + VEC_FROM_3D( vtN, Plane.vtN) + *pdDist = Plane.dDist ; + return true ; } //---------------------------------------------------------------------------- diff --git a/EgtInterface.rc b/EgtInterface.rc index bc1d5b4..6e774ab 100644 Binary files a/EgtInterface.rc and b/EgtInterface.rc differ