diff --git a/API_GdbCreateCurve.cpp b/API_GdbCreateCurve.cpp index cd0c88f..d39b855 100644 --- a/API_GdbCreateCurve.cpp +++ b/API_GdbCreateCurve.cpp @@ -129,14 +129,28 @@ int __stdcall EgtCreateArc3P( int nParentId, const double ptP1[3], const double ptP2[3], const double ptP3[3], int nRefType) { + if ( ptP1 == nullptr || ptP2 == nullptr || ptP3 == nullptr) + return GDB_ID_NULL ; return ExeCreateArc3P( nParentId, ptP1, ptP2, ptP3, nRefType) ; } +//------------------------------------------------------------------------------- +int +__stdcall EgtCreateArc2PR( int nParentId, const double ptStart[3], const double ptEnd[3], + double dRad, BOOL bCCW, int nRefType) +{ + if ( ptStart == nullptr || ptEnd == nullptr) + return GDB_ID_NULL ; + return ExeCreateArc2PR( nParentId, ptStart, ptEnd, dRad, ( bCCW != FALSE), nRefType) ; +} + //------------------------------------------------------------------------------- int __stdcall EgtCreateArc2PD( int nParentId, const double ptStart[3], const double ptEnd[3], double dDirSDeg, int nRefType) { + if ( ptStart == nullptr || ptEnd == nullptr) + return GDB_ID_NULL ; return ExeCreateArc2PD( nParentId, ptStart, ptEnd, dDirSDeg, nRefType) ; } @@ -146,6 +160,8 @@ __stdcall EgtCreateArc2PDEx( int nParentId, const double ptStart[3], const double ptEnd[3], int nSep, int nId, double dDirSDeg, int nRefType) { + if ( ptStart == nullptr || ptEnd == nullptr) + return GDB_ID_NULL ; return ExeCreateArc2PDEx( nParentId, ptStart, ptEnd, nSep, nId, dDirSDeg, nRefType) ; } @@ -154,6 +170,8 @@ int __stdcall EgtCreateArc2PV( int nParentId, const double ptStart[3], const double ptEnd[3], const double vtDirS[3], int nRefType) { + if ( ptStart == nullptr || ptEnd == nullptr) + return GDB_ID_NULL ; return ExeCreateArc2PV( nParentId, ptStart, ptEnd, vtDirS, nRefType) ; } @@ -162,6 +180,8 @@ int __stdcall EgtCreateBiArc( int nParentId, const double ptStart[3], const double ptEnd[3], double dDirSDeg, double dDirEDeg, double dPar, int nRefType) { + if ( ptStart == nullptr || ptEnd == nullptr) + return GDB_ID_NULL ; return ExeCreateBiArc( nParentId, ptStart, ptEnd, dDirSDeg, dDirEDeg, dPar, nRefType) ; } diff --git a/EgtInterface.rc b/EgtInterface.rc index 47382b0..1045867 100644 Binary files a/EgtInterface.rc and b/EgtInterface.rc differ