Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 303489452a | |||
| e9615222be | |||
| 92769d6783 | |||
| 7659e40140 | |||
| d65f563ea9 | |||
| f1f0f7198f | |||
| 74a00d54a5 | |||
| 60772489fb | |||
| 4d3a19c18a | |||
| 9b30bdfdda | |||
| f426e04657 | |||
| 49364bc33c | |||
| ebfbd5e8f0 | |||
| afd3000a27 | |||
| 875656bbed | |||
| 8ccd525a3d | |||
| f97734d654 | |||
| d67c660e60 | |||
| a9ac0026e1 | |||
| 7b7b2f9726 | |||
| 039a6d731a | |||
| f93b500ce4 | |||
| 30b7624a78 | |||
| 22def7d324 | |||
| ac992fd113 | |||
| d43f30c1f1 | |||
| c36fea7de7 | |||
| fa91e49927 | |||
| 2261a9f4d1 | |||
| 5580700af2 | |||
| 2cd376bbd8 | |||
| 4cc9be61d7 | |||
| f1fd976d13 | |||
| 9d1a064611 | |||
| 97e1a108ba | |||
| 2d0397c826 | |||
| 34a116cfe9 | |||
| f9d1746fa8 | |||
| e632c3be1c |
+18
-4
@@ -85,9 +85,23 @@ __stdcall EgtImportStl( const wchar_t* wsFilePath, double dScaleFactor)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtImport3MF( const wchar_t* wsFilePath)
|
||||
__stdcall EgtImportOff( const wchar_t* wsFilePath, double dScaleFactor)
|
||||
{
|
||||
return ( ExeImport3MF( wstrztoA( wsFilePath)) ? TRUE : FALSE) ;
|
||||
return ( ExeImportOff( wstrztoA( wsFilePath), dScaleFactor) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtImportPly( const wchar_t* wsFilePath, double dScaleFactor)
|
||||
{
|
||||
return ( ExeImportPly( wstrztoA( wsFilePath), dScaleFactor) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtImport3MF( const wchar_t* wsFilePath, int nFlag)
|
||||
{
|
||||
return ( ExeImport3MF( wstrztoA( wsFilePath), nFlag) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -106,9 +120,9 @@ __stdcall EgtAdvancedImportIsEnabled( void)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtAdvancedImport( const wchar_t* wsFilePath, double dLinToler)
|
||||
__stdcall EgtAdvancedImport( const wchar_t* wsFilePath, double dLinToler, int nFlag)
|
||||
{
|
||||
return ( ExeAdvancedImport( wstrztoA( wsFilePath), dLinToler) ? TRUE : FALSE) ;
|
||||
return ( ExeAdvancedImport( wstrztoA( wsFilePath), dLinToler, nFlag) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
+33
-1
@@ -122,4 +122,36 @@ __stdcall EgtCreateAlignedDimension( int nParentId, const double ptP1[3], const
|
||||
{
|
||||
return ExeCreateAlignedDimension( nParentId, ptP1, ptP2, ptDim, wstrztoA( wsText), nRefType) ;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtCreateAngularDimension( int nParentId, const double ptV[3], const double ptP1[3], const double ptP2[3],
|
||||
const double ptDim[3], const wchar_t* wsText, int nRefType)
|
||||
{
|
||||
return ExeCreateAngularDimension( nParentId, ptV, ptP1, ptP2, ptDim, wstrztoA( wsText), nRefType) ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtCreateAngularDimensionEx( int nParentId, const double ptV1[3], const double ptP1[3],
|
||||
const double ptV2[3], const double ptP2[3],
|
||||
const double ptDim[3], const wchar_t* wsText, int nRefType)
|
||||
{
|
||||
return ExeCreateAngularDimensionEx( nParentId, ptV1, ptP1, ptV2, ptP2, ptDim, wstrztoA( wsText), nRefType) ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtCreateDiametralDimension( int nParentId, int nCrvId, const double ptDim[3],
|
||||
const wchar_t* wsText, int nRefType)
|
||||
{
|
||||
return ExeCreateDiametralDimension( nParentId, nCrvId, ptDim, wstrztoA( wsText), nRefType) ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtCreateRadialDimension( int nParentId, int nCrvId, const double ptDim[3],
|
||||
const wchar_t* wsText, int nRefType)
|
||||
{
|
||||
return ExeCreateRadialDimension( nParentId, nCrvId, ptDim, wstrztoA( wsText), nRefType) ;
|
||||
}
|
||||
|
||||
@@ -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) ;
|
||||
}
|
||||
|
||||
|
||||
@@ -157,9 +157,10 @@ __stdcall EgtCreateSurfTmByScrewing( int nParentId, int nCrvId,
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtCreateSurfTmSwept( int nParentId, int nSectId, int nGuideId, BOOL bCapEnds, double dLinTol)
|
||||
__stdcall EgtCreateSurfTmSwept( int nParentId, int nSectId, int nGuideId, const double vtAx[3],
|
||||
BOOL bCapEnds, double dLinTol, int nRefType)
|
||||
{
|
||||
return ExeCreateSurfTmSwept( nParentId, nSectId, nGuideId, ( bCapEnds != FALSE), dLinTol) ;
|
||||
return ExeCreateSurfTmSwept( nParentId, nSectId, nGuideId, vtAx, ( bCapEnds != FALSE), dLinTol, nRefType) ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
|
||||
@@ -68,6 +68,58 @@ __stdcall EgtCurveIsFlat( int nId, BOOL bUseExtrusion, double dToler, double vtN
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtCurveIsACircle( int nId, double dToler, double ptC[3], double vtN[3], double* pdRad, BOOL* pbCCW)
|
||||
{
|
||||
if ( ptC == nullptr || vtN == nullptr || pdRad == nullptr || pbCCW == nullptr)
|
||||
return FALSE ;
|
||||
Point3d ptCen ;
|
||||
Vector3d vtNorm ;
|
||||
double dRad ;
|
||||
bool bCCW ;
|
||||
if ( ! ExeCurveIsACircle( nId, ptCen, vtNorm, dRad, bCCW, dToler))
|
||||
return FALSE ;
|
||||
VEC_FROM_3D( ptC, ptCen)
|
||||
VEC_FROM_3D( vtN, vtNorm)
|
||||
*pdRad = dRad ;
|
||||
*pbCCW = ( bCCW ? TRUE : FALSE) ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtCurveIsARectangle( int nId, double dToler, double ptP[3], double vtL1[3], double vtL2[3])
|
||||
{
|
||||
if ( ptP == nullptr || vtL1 == nullptr || vtL2 == nullptr)
|
||||
return FALSE ;
|
||||
Point3d ptPNT ;
|
||||
Vector3d vtLato1, vtLato2 ;
|
||||
if ( ! ExeCurveIsARectangle( nId, ptPNT, vtLato1, vtLato2, dToler))
|
||||
return FALSE ;
|
||||
VEC_FROM_3D( ptP, ptPNT)
|
||||
VEC_FROM_3D( vtL1, vtLato1)
|
||||
VEC_FROM_3D( vtL2, vtLato2)
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtCurveIsATrapezoid( int nId, double dToler, double ptP[3], double vtB1[3], double vtL1[3], double vtB2[3])
|
||||
{
|
||||
if ( ptP == nullptr || vtB1 == nullptr || vtL1 == nullptr || vtB2 == nullptr)
|
||||
return FALSE ;
|
||||
Point3d ptPNT ;
|
||||
Vector3d vtBase1, vtLato1, vtBase2 ;
|
||||
if ( ! ExeCurveIsATrapezoid( nId, ptPNT, vtBase1, vtLato1, vtBase2, dToler))
|
||||
return FALSE ;
|
||||
VEC_FROM_3D( ptP, ptPNT)
|
||||
VEC_FROM_3D( vtB1, vtBase1)
|
||||
VEC_FROM_3D( vtL1, vtLato1)
|
||||
VEC_FROM_3D( vtB2, vtBase2)
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtCurveAreaXY( int nId, double* pdArea)
|
||||
@@ -218,3 +270,17 @@ __stdcall EgtCurveCompoCenter( int nId, int nSimpCrv, int nRefId, double ptCen[3
|
||||
VEC_FROM_3D( ptCen, ptTmp)
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtCopyCompoSubCurve( int nId, int nSubCrvToCopy, int nParentId)
|
||||
{
|
||||
return ExeCopyCompoSubCurve( nId, nSubCrvToCopy, nParentId) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtCopyParamRange( int nId, double dUStart, double dUEnd, int nParentId)
|
||||
{
|
||||
return ExeCopyParamRange( nId, dUStart, dUEnd, nParentId) ;
|
||||
}
|
||||
@@ -84,6 +84,24 @@ __stdcall EgtSurfFrChunkSimpleClassify( int nId1, int nChunk1, int nId2, int nCh
|
||||
return ExeSurfFrChunkSimpleClassify( nId1, nChunk1, nId2, nChunk2, dToler) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSurfFrChunkCenter( int nId, int nChunk, int nRefId, double ptCen[3], double vtNorm[3])
|
||||
{
|
||||
// verifica parametri
|
||||
if ( ptCen == nullptr || vtNorm == nullptr)
|
||||
return FALSE ;
|
||||
// recupero il centro e la normale
|
||||
Point3d ptTmp ;
|
||||
Vector3d vtN ;
|
||||
if ( ! ExeSurfFrChunkCenter( nId, nChunk, nRefId, ptTmp, vtN))
|
||||
return FALSE ;
|
||||
// li assegno
|
||||
VEC_FROM_3D( ptCen, ptTmp)
|
||||
VEC_FROM_3D( vtNorm, vtN)
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtExtractSurfFrChunkLoops( int nId, int nChunk, int nDestGrpId, int* pnCount)
|
||||
@@ -112,11 +130,46 @@ __stdcall EgtSurfTmFacetFromTria( int nId, int nT)
|
||||
return ExeSurfTmFacetFromTria( nId, nT) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSurfTmGetVertex( int nId, int nVert, int nRefId, double ptVert[3])
|
||||
{
|
||||
// verifica parametri
|
||||
if ( ptVert == nullptr)
|
||||
return FALSE ;
|
||||
// recupero il vertice
|
||||
Point3d ptV ;
|
||||
if ( ! ExeSurfTmGetVertex( nId, nVert, nRefId, ptV))
|
||||
return FALSE ;
|
||||
// lo assegno
|
||||
VEC_FROM_3D( ptVert, ptV)
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSurfTmGetNearestVertex( int nId, const double ptNear[3], int nRefId, int* pnVert, double ptVert[3])
|
||||
{
|
||||
// verifica parametri
|
||||
if ( ptNear == nullptr || pnVert == nullptr || ptVert == nullptr)
|
||||
return FALSE ;
|
||||
// recupero indice del vertice e sue coordinate
|
||||
Point3d ptTmp ;
|
||||
if ( ! ExeSurfTmGetNearestVertex( nId, ptNear, nRefId, *pnVert, ptTmp))
|
||||
return FALSE ;
|
||||
// le assegno
|
||||
VEC_FROM_3D( ptVert, ptTmp)
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSurfTmFacetNearestEndPoint( int nId, int nFacet, const double ptNear[3], int nRefId,
|
||||
double ptEnd[3], double vtNorm[3])
|
||||
{
|
||||
// verifica parametri
|
||||
if ( ptNear == nullptr || ptEnd == nullptr || vtNorm == nullptr)
|
||||
return FALSE ;
|
||||
// recupero il punto e la normale
|
||||
Point3d ptTmp ;
|
||||
Vector3d vtN ;
|
||||
@@ -133,6 +186,9 @@ BOOL
|
||||
__stdcall EgtSurfTmFacetNearestMidPoint( int nId, int nFacet, const double ptNear[3], int nRefId,
|
||||
double ptMid[3], double vtNorm[3])
|
||||
{
|
||||
// verifica parametri
|
||||
if ( ptNear == nullptr || ptMid == nullptr || vtNorm == nullptr)
|
||||
return FALSE ;
|
||||
// recupero il punto e la normale
|
||||
Point3d ptTmp ;
|
||||
Vector3d vtN ;
|
||||
@@ -148,6 +204,9 @@ __stdcall EgtSurfTmFacetNearestMidPoint( int nId, int nFacet, const double ptNea
|
||||
BOOL
|
||||
__stdcall EgtSurfTmFacetCenter( int nId, int nFacet, int nRefId, double ptCen[3], double vtNorm[3])
|
||||
{
|
||||
// verifica parametri
|
||||
if ( ptCen == nullptr || vtNorm == nullptr)
|
||||
return FALSE ;
|
||||
// recupero il centro e la normale
|
||||
Point3d ptTmp ;
|
||||
Vector3d vtN ;
|
||||
@@ -163,6 +222,9 @@ __stdcall EgtSurfTmFacetCenter( int nId, int nFacet, int nRefId, double ptCen[3]
|
||||
BOOL
|
||||
__stdcall EgtSurfTmFacetNormVersor( int nId, int nFacet, int nRefId, double vtNorm[3])
|
||||
{
|
||||
// verifica parametri
|
||||
if ( vtNorm == nullptr)
|
||||
return FALSE ;
|
||||
// recupero il vettore normale
|
||||
Vector3d vtTmp ;
|
||||
if ( ! ExeSurfTmFacetNormVersor( nId, nFacet, nRefId, vtTmp))
|
||||
|
||||
@@ -70,6 +70,20 @@ __stdcall EgtSurfFrOffset( int nId, double dDist, int nType)
|
||||
return ( ExeSurfFrOffset( nId, dDist, nType) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSurfTmMoveVertex( int nId, int nVert, const double ptNewVert[3], int nRefType, BOOL bUpdate)
|
||||
{
|
||||
return ( ExeSurfTmMoveVertex( nId, nVert, ptNewVert, nRefType, ( bUpdate != FALSE)) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSurfTmMoveFacet( int nId, int nFacet, const double vtMove[3], int nRefType, BOOL bUpdate)
|
||||
{
|
||||
return ( ExeSurfTmMoveFacet( nId, nFacet, vtMove, nRefType, ( bUpdate != FALSE)) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtSurfTmToTriangles( int nId, int* pnCount)
|
||||
@@ -119,6 +133,13 @@ __stdcall EgtSurfTmIntersect( int nId1, int nId2, BOOL bTwoColors)
|
||||
return ( ExeSurfTmIntersect( nId1, nId2, ( bTwoColors != FALSE)) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSurfTmSetFaceColor( int nId, int nFacet, int nColor)
|
||||
{
|
||||
return ( ExeSurfTmSetFaceColor( nId, nFacet, nColor) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSurfTmResetTwoColors( int nId)
|
||||
|
||||
+21
-2
@@ -108,9 +108,9 @@ __stdcall EgtGetCalcStatus( int nId, int* pnStat)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetMark( int nId)
|
||||
__stdcall EgtSetMark( int nId, int nMark)
|
||||
{
|
||||
return ( ExeSetMark( nId) ? TRUE : FALSE) ;
|
||||
return ( ExeSetMark( nId, nMark) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -426,6 +426,25 @@ __stdcall EgtGetInfoFrame( int nId, const wchar_t* wsKey, double ptOrig[3],
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetAllInfo( int nId, wchar_t*& wsInfos)
|
||||
{
|
||||
if ( &wsInfos == nullptr)
|
||||
return FALSE ;
|
||||
STRVECTOR vsInfo ;
|
||||
if ( ! ExeGetAllInfo( nId, vsInfo))
|
||||
return FALSE ;
|
||||
// restituzione vettore risultati
|
||||
string sInfos ;
|
||||
for ( const auto& sInfo : vsInfo)
|
||||
sInfos += sInfo + "\n" ;
|
||||
if ( ! sInfos.empty())
|
||||
sInfos.pop_back() ;
|
||||
wsInfos = _wcsdup( stringtoW( sInfos)) ;
|
||||
return (( wsInfos == nullptr) ? FALSE : TRUE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtExistsInfo( int nId, const wchar_t* wsKey)
|
||||
|
||||
@@ -227,6 +227,15 @@ __stdcall EgtGetKeyLeftDays( int* pnLeftDays)
|
||||
return ( ExeGetKeyLeftDays( *pnLeftDays) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetKeyAssLeftDays( int* pnAssLeftDays)
|
||||
{
|
||||
if ( pnAssLeftDays == nullptr)
|
||||
return FALSE ;
|
||||
return ( ExeGetKeyAssLeftDays( *pnAssLeftDays) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetKeyOptLeftDays( int* pnOptLeftDays)
|
||||
@@ -236,6 +245,13 @@ __stdcall EgtGetKeyOptLeftDays( int* pnOptLeftDays)
|
||||
return ( ExeGetKeyOptLeftDays( *pnOptLeftDays) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetNetHwKey( void)
|
||||
{
|
||||
return ( ExeGetNetHwKey() ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetOsInfo( wchar_t*& wsOs)
|
||||
|
||||
+167
-53
@@ -72,21 +72,19 @@ __stdcall EgtGetMachines( wchar_t*& wsMachineNames, wchar_t*& wsMachineDirs)
|
||||
return FALSE ;
|
||||
// restituzione vettore nomi
|
||||
string sMachineNames ;
|
||||
for ( const auto& sName : vsMachineNames) {
|
||||
if ( ! sMachineNames.empty())
|
||||
sMachineNames += "\n" ;
|
||||
sMachineNames += sName ;
|
||||
}
|
||||
for ( const auto& sName : vsMachineNames)
|
||||
sMachineNames += sName + "\n" ;
|
||||
if ( ! sMachineNames.empty())
|
||||
sMachineNames.pop_back() ;
|
||||
wsMachineNames = _wcsdup( stringtoW( sMachineNames)) ;
|
||||
if ( wsMachineNames == nullptr)
|
||||
return FALSE ;
|
||||
// restituzione vettore direttori
|
||||
string sMachineDirs ;
|
||||
for ( const auto& sName : vsMachineDirs) {
|
||||
if ( ! sMachineDirs.empty())
|
||||
sMachineDirs += "\n" ;
|
||||
sMachineDirs += sName ;
|
||||
}
|
||||
for ( const auto& sName : vsMachineDirs)
|
||||
sMachineDirs += sName + "\n" ;
|
||||
if ( ! sMachineDirs.empty())
|
||||
sMachineDirs.pop_back() ;
|
||||
wsMachineDirs = _wcsdup( stringtoW( sMachineDirs)) ;
|
||||
if ( wsMachineDirs == nullptr) {
|
||||
free( wsMachineNames) ;
|
||||
@@ -198,6 +196,13 @@ __stdcall EgtRemoveMachGroup( int nMGroupId)
|
||||
return ( ExeRemoveMachGroup( nMGroupId) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtChangeMachGroupName( int nMGroupInd, const wchar_t* wsNewName)
|
||||
{
|
||||
return ( ExeChangeMachGroupName( nMGroupInd, wstrztoA( wsNewName)) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetMachGroupName( int nMGroupInd, wchar_t*& wsName)
|
||||
@@ -589,6 +594,27 @@ __stdcall EgtShowOnlyTable( BOOL bVal)
|
||||
return ( ExeShowOnlyTable( ( bVal != FALSE)) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMoveDispAxis( const wchar_t* wsName, double dPos)
|
||||
{
|
||||
return ( ExeMoveDispAxis( wstrztoA( wsName), dPos) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtRemoveDispAxis( const wchar_t* wsName)
|
||||
{
|
||||
return ( ExeRemoveDispAxis( wstrztoA( wsName)) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtKeepAllDispAxes( int nSouPhase)
|
||||
{
|
||||
return ( ExeKeepAllDispAxes( nSouPhase) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtAddFixture( const wchar_t* wsName, const double ptPos[3], double dAngRotDeg, double dMov)
|
||||
@@ -645,6 +671,13 @@ __stdcall EgtRotateFixture( int nFxtId, double dDeltaAngDeg)
|
||||
return ( ExeRotateFixture( nFxtId, dDeltaAngDeg) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetFixtureLink( int nFxtId, const wchar_t* wsTaLink)
|
||||
{
|
||||
return ( ExeSetFixtureLink( nFxtId, wstrztoA( wsTaLink)) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMoveFixtureMobile( int nFxtId, double dDeltaMov)
|
||||
@@ -652,6 +685,13 @@ __stdcall EgtMoveFixtureMobile( int nFxtId, double dDeltaMov)
|
||||
return ( ExeMoveFixtureMobile( nFxtId, dDeltaMov) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetFixtureMobile( int nFxtId, double dMov)
|
||||
{
|
||||
return ( ExeSetFixtureMobile( nFxtId, dMov) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Tools DataBase
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -977,11 +1017,10 @@ __stdcall EgtTdbToBeImported( const wchar_t* wsFile, wchar_t*& wsToolsNames, int
|
||||
return FALSE ;
|
||||
// restituzione vettore nomi
|
||||
string sToolsNames ;
|
||||
for ( const auto& sName : vsToolsNames) {
|
||||
if ( ! sToolsNames.empty())
|
||||
sToolsNames += "\n" ;
|
||||
sToolsNames += sName ;
|
||||
}
|
||||
for ( const auto& sName : vsToolsNames)
|
||||
sToolsNames += sName + "\n" ;
|
||||
if ( ! sToolsNames.empty())
|
||||
sToolsNames.pop_back() ;
|
||||
wsToolsNames = _wcsdup( stringtoW( sToolsNames)) ;
|
||||
if ( wsToolsNames == nullptr)
|
||||
return FALSE ;
|
||||
@@ -1019,11 +1058,10 @@ __stdcall EgtTdbImport( const wchar_t* wsFile, const wchar_t* wsToolsToImport, c
|
||||
if ( ! ExeTdbImport( string( wstrztoA( wsFile)), vsToolsToImport, vsToolsNames, vsImported))
|
||||
return FALSE ;
|
||||
string sImported ;
|
||||
for ( const auto& sName : vsImported) {
|
||||
if ( ! sImported.empty())
|
||||
sImported += "\n" ;
|
||||
sImported += sName ;
|
||||
}
|
||||
for ( const auto& sName : vsImported)
|
||||
sImported += sName + "\n" ;
|
||||
if ( ! sImported.empty())
|
||||
sImported.pop_back() ;
|
||||
wsImported = _wcsdup( stringtoW( sImported)) ;
|
||||
return (( wsImported == nullptr) ? FALSE : TRUE) ;
|
||||
}
|
||||
@@ -1327,11 +1365,10 @@ __stdcall EgtMdbToBeImported( const wchar_t* wsFile, wchar_t*& wsMachiningsNames
|
||||
return FALSE ;
|
||||
// restituzione vettore nomi
|
||||
string sMachiningsNames ;
|
||||
for ( const auto& sName : vsMachiningsNames) {
|
||||
if ( ! sMachiningsNames.empty())
|
||||
sMachiningsNames += "\n" ;
|
||||
sMachiningsNames += sName ;
|
||||
}
|
||||
for ( const auto& sName : vsMachiningsNames)
|
||||
sMachiningsNames += sName + "\n" ;
|
||||
if ( ! sMachiningsNames.empty())
|
||||
sMachiningsNames.pop_back() ;
|
||||
wsMachiningsNames = _wcsdup( stringtoW( sMachiningsNames)) ;
|
||||
if ( wsMachiningsNames == nullptr)
|
||||
return FALSE ;
|
||||
@@ -1369,11 +1406,10 @@ __stdcall EgtMdbImport( const wchar_t* wsFile, const wchar_t* wsMachiningsToImpo
|
||||
if ( ! ExeMdbImport( string( wstrztoA( wsFile)), vsMachiningsToImport, vsMachiningsNames, vsImported))
|
||||
return FALSE ;
|
||||
string sImported ;
|
||||
for ( const auto& sName : vsImported) {
|
||||
if ( ! sImported.empty())
|
||||
sImported += "\n" ;
|
||||
sImported += sName ;
|
||||
}
|
||||
for ( const auto& sName : vsImported)
|
||||
sImported += sName + "\n" ;
|
||||
if ( ! sImported.empty())
|
||||
sImported.pop_back() ;
|
||||
wsImported = _wcsdup( stringtoW( sImported)) ;
|
||||
return (( wsImported == nullptr) ? FALSE : TRUE) ;
|
||||
}
|
||||
@@ -1727,9 +1763,16 @@ __stdcall EgtRemovePreviewMachiningTool( void)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtPreviewMachiningTool( int nEntId, int nFlag)
|
||||
__stdcall EgtGetPreviewMachiningToolStepCount( void)
|
||||
{
|
||||
return ExePreviewMachiningTool( nEntId, nFlag) ;
|
||||
return ExeGetPreviewMachiningToolStepCount() ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
__stdcall EgtPreviewMachiningTool( int nEntId, int nStep)
|
||||
{
|
||||
return ExePreviewMachiningTool( nEntId, nStep) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -2016,6 +2059,32 @@ __stdcall EgtGetHeadExitCount( const wchar_t* wsHead)
|
||||
return ExeGetHeadExitCount( wstrztoA( wsHead)) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetAxisType( const wchar_t* wsAxis, BOOL* pbLinear)
|
||||
{
|
||||
if ( pbLinear == nullptr)
|
||||
return FALSE ;
|
||||
bool bLinear ;
|
||||
if ( ! ExeGetAxisType( wstrztoA( wsAxis), bLinear))
|
||||
return FALSE ;
|
||||
*pbLinear = ( bLinear ? TRUE : FALSE) ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetAxisDir( const wchar_t* wsAxis, double vtDir[3])
|
||||
{
|
||||
if ( vtDir == nullptr)
|
||||
return FALSE ;
|
||||
Vector3d vtTmp ;
|
||||
if ( ! ExeGetAxisDir( wstrztoA( wsAxis), vtTmp))
|
||||
return FALSE ;
|
||||
VEC_FROM_3D( vtDir, vtTmp) ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetAxisInvert( const wchar_t* wsAxis, BOOL* pbInvert)
|
||||
@@ -2116,40 +2185,85 @@ __stdcall EgtGetCalcAngles( const double vtDirT[3], const double vtDirA[3],
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetCalcPositions( const double ptP[3], double dAngA, double dAngB,
|
||||
int* pnStat, double* pdX, double* pdY, double* pdZ)
|
||||
__stdcall EgtGetCalcAnglesEx( const double vtDirT[3], const double vtDirA[3],
|
||||
int* pnStat, double*& vAngs1, double*& vAngs2, int* pnCount)
|
||||
{
|
||||
if ( ptP == nullptr ||
|
||||
pnStat == nullptr || pdX == nullptr || pdY == nullptr || pdZ == nullptr)
|
||||
if ( vtDirT == nullptr || vtDirA == nullptr ||
|
||||
pnStat == nullptr || pnCount == nullptr || &vAngs1 == nullptr || &vAngs2 == nullptr)
|
||||
return FALSE ;
|
||||
return ( ExeGetCalcPositions( ptP, dAngA, dAngB, *pnStat, *pdX, *pdY, *pdZ) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetCalcTipFromPositions( double dX, double dY, double dZ, double dAngA, double dAngB,
|
||||
BOOL bBottom, double ptTip[3])
|
||||
{
|
||||
Point3d ptTmp ;
|
||||
if ( ! ExeGetCalcTipFromPositions( dX, dY, dZ, dAngA, dAngB, ( bBottom != FALSE), ptTmp))
|
||||
DBLVECTOR vA1, vA2 ;
|
||||
if ( ! ExeGetCalcAngles( vtDirT, vtDirA, *pnStat, vA1, vA2) || vA1.size() != vA2.size())
|
||||
return FALSE ;
|
||||
// ritorno i dati
|
||||
if ( ptTip != nullptr)
|
||||
VEC_FROM_3D( ptTip, ptTmp) ;
|
||||
// restituzione vettori angoli
|
||||
int nDim = int( vA1.size()) ;
|
||||
if ( nDim == 0) {
|
||||
vAngs1 = nullptr ;
|
||||
vAngs2 = nullptr ;
|
||||
}
|
||||
else {
|
||||
vAngs1 = (double*) malloc( nDim * sizeof( double)) ;
|
||||
if ( vAngs1 == nullptr)
|
||||
return FALSE ;
|
||||
vAngs2 = (double*) malloc( nDim * sizeof( double)) ;
|
||||
if ( vAngs2 == nullptr) {
|
||||
free( vAngs1) ;
|
||||
return FALSE ;
|
||||
}
|
||||
for ( int i = 0 ; i < nDim ; ++ i) {
|
||||
vAngs1[i] = vA1[i] ;
|
||||
vAngs2[i] = vA2[i] ;
|
||||
}
|
||||
}
|
||||
*pnCount = nDim ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetCalcToolDirFromAngles( double dAngA, double dAngB, double vtDir[3])
|
||||
__stdcall EgtGetCalcPositions( const double ptP[3], int nCount, const double dAngs[],
|
||||
int* pnStat, double* pdX, double* pdY, double* pdZ)
|
||||
{
|
||||
DBLVECTOR vAng( 2) ; vAng[0] = dAngA ; vAng[1] = dAngB ;
|
||||
if ( ptP == nullptr || dAngs == nullptr ||
|
||||
pnStat == nullptr || pdX == nullptr || pdY == nullptr || pdZ == nullptr)
|
||||
return FALSE ;
|
||||
DBLVECTOR vAng ;
|
||||
for ( int i = 0 ; i < nCount ; ++i)
|
||||
vAng.push_back( dAngs[i]) ;
|
||||
return ( ExeGetCalcPositions( ptP, vAng, *pnStat, *pdX, *pdY, *pdZ) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetCalcTipFromPositions( double dX, double dY, double dZ, int nCount, const double dAngs[],
|
||||
BOOL bBottom, double ptTip[3])
|
||||
{
|
||||
if ( dAngs == nullptr || ptTip == nullptr)
|
||||
return FALSE ;
|
||||
DBLVECTOR vAng ;
|
||||
for ( int i = 0 ; i < nCount ; ++i)
|
||||
vAng.push_back( dAngs[i]) ;
|
||||
Point3d ptTmp ;
|
||||
if ( ! ExeGetCalcTipFromPositions( dX, dY, dZ, vAng, ( bBottom != FALSE), ptTmp))
|
||||
return FALSE ;
|
||||
// ritorno i dati
|
||||
VEC_FROM_3D( ptTip, ptTmp) ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetCalcToolDirFromAngles( int nCount, const double dAngs[], double vtDir[3])
|
||||
{
|
||||
if ( dAngs == nullptr || vtDir == nullptr)
|
||||
return FALSE ;
|
||||
DBLVECTOR vAng ;
|
||||
for ( int i = 0 ; i < nCount ; ++i)
|
||||
vAng.push_back( dAngs[i]) ;
|
||||
Vector3d vtTmp ;
|
||||
if ( ! ExeGetCalcToolDirFromAngles( vAng, vtTmp))
|
||||
return FALSE ;
|
||||
// ritorno i dati
|
||||
if ( vtDir != nullptr)
|
||||
VEC_FROM_3D( vtDir, vtTmp) ;
|
||||
VEC_FROM_3D( vtDir, vtTmp) ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
|
||||
+16
-2
@@ -59,9 +59,9 @@ __stdcall EgtSetLineAttribs( int nWidth)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetMarkAttribs( const int MarkCol[4])
|
||||
__stdcall EgtSetMarkAttribs( const int MarkCol[4], const int Mark2Col[4])
|
||||
{
|
||||
return ( ExeSetMarkAttribs( Color( MarkCol)) ? TRUE : FALSE) ;
|
||||
return ( ExeSetMarkAttribs( Color( MarkCol), Color( Mark2Col)) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -571,3 +571,17 @@ __stdcall EgtGetImage( int nShowMode, const int TopCol[4], const int BottomCol[4
|
||||
return ( ExeGetImage( nShowMode, Color( TopCol), Color( BottomCol),
|
||||
nWidth, nHeight, wstrztoA( wsName)) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetCameraType( BOOL bOrthoOrPersp, BOOL bRedraw)
|
||||
{
|
||||
return ( ExeSetCameraType( ( bOrthoOrPersp != FALSE), ( bRedraw != FALSE)) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetZoomType( int nZoomType, BOOL bRedraw)
|
||||
{
|
||||
return ( ExeSetZoomType( nZoomType, ( bRedraw != FALSE)) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -22,14 +22,14 @@
|
||||
<ProjectGuid>{DF654897-F85B-4108-A621-F2C4AB099A48}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>EgtInterface</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.20348.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
@@ -42,7 +42,7 @@
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141_xp</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
|
||||
Reference in New Issue
Block a user