dc8743aa6c
- aggiornamento.
230 lines
7.3 KiB
C++
230 lines
7.3 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2014-2014
|
|
//----------------------------------------------------------------------------
|
|
// File : API_ModifyCurve.cpp Data : 03.10.14 Versione : 1.5i5
|
|
// Contenuto : Funzioni di modifica delle curve per API.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 03.10.14 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
//--------------------------- Include ----------------------------------------
|
|
#include "stdafx.h"
|
|
#include "API.h"
|
|
#include "/EgtDev/Include/EInAPI.h"
|
|
#include "/EgtDev/Include/EXeExecutor.h"
|
|
|
|
using namespace std ;
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtInvertCurve( int nId)
|
|
{
|
|
INTVECTOR vIds ;
|
|
vIds.push_back( nId) ;
|
|
return ( ExeInvertCurve( vIds) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtOffsetCurve( int nId, double dDist, int nType)
|
|
{
|
|
return ( ExeOffsetCurve( nId, dDist, nType) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
int
|
|
__stdcall EgtOffsetCurveAdv( int nId, double dDist, int nType, int* pnCount)
|
|
{
|
|
return ExeOffsetCurveAdv( nId, dDist, nType, pnCount) ;
|
|
}
|
|
|
|
//-------------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtApproxCurve( int nId, int nApprType, double dLinTol)
|
|
{
|
|
return ( ExeApproxCurve( nId, nApprType, dLinTol) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtChangeClosedCurveStartPoint( int nId, const double ptP[3], int nRefType)
|
|
{
|
|
return ( ExeChangeClosedCurveStartPoint( nId, ptP, nRefType) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtModifyCurveStartPoint( int nId, const double ptP[3], int nRefType)
|
|
{
|
|
return ( ExeModifyCurveStartPoint( nId, ptP, nRefType) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtModifyCurveEndPoint( int nId, const double ptP[3], int nRefType)
|
|
{
|
|
return ( ExeModifyCurveEndPoint( nId, ptP, nRefType) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtModifyCurveExtrusion( int nId, const double vtExtr[3], int nRefType)
|
|
{
|
|
INTVECTOR vIds ;
|
|
vIds.push_back( nId) ;
|
|
return ( ExeModifyCurveExtrusion( vIds, vtExtr, nRefType) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtModifyCurveThickness( int nId, double dThick)
|
|
{
|
|
INTVECTOR vIds ;
|
|
vIds.push_back( nId) ;
|
|
return ( ExeModifyCurveThickness( vIds, dThick) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtTrimCurveStartAtLen( int nId, double dLen)
|
|
{
|
|
return ( ExeTrimCurveStartAtLen( nId, dLen) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtTrimCurveEndAtLen( int nId, double dLen)
|
|
{
|
|
return ( ExeTrimCurveEndAtLen( nId, dLen) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtTrimCurveStartAtParam( int nId, double dPar)
|
|
{
|
|
return ( ExeTrimCurveStartAtParam( nId, dPar) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtTrimCurveEndAtParam( int nId, double dPar)
|
|
{
|
|
return ( ExeTrimCurveEndAtParam( nId, dPar) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtTrimCurveStartEndAtParam( int nId, double dParS, double dParE)
|
|
{
|
|
return ( ExeTrimCurveStartEndAtParam( nId, dParS, dParE) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtExtendCurveStartByLen( int nId, double dLen)
|
|
{
|
|
return ( ExeExtendCurveStartByLen( nId, dLen) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtExtendCurveEndByLen( int nId, double dLen)
|
|
{
|
|
return ( ExeExtendCurveEndByLen( nId, dLen) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtTrimExtendCurveByLen( int nId, double dLen, const double ptNear[3], int nRefType)
|
|
{
|
|
return ( ExeTrimExtendCurveByLen( nId, dLen, ptNear, nRefType) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
int
|
|
__stdcall EgtSplitCurve( int nId, int nParts)
|
|
{
|
|
return ExeSplitCurve( nId, nParts) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
int
|
|
__stdcall EgtSplitCurveAtPoint( int nId, const double ptOn[3], int nRefType)
|
|
{
|
|
return ExeSplitCurveAtPoint( nId, ptOn, nRefType) ;
|
|
}
|
|
|
|
//-------------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtModifyCircleCP( int nId, const double ptOn[3], int nRefType)
|
|
{
|
|
return ( ExeModifyCircleCP( nId, ptOn, nRefType) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-------------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtModifyArcRadius( int nId, double dRad)
|
|
{
|
|
return ( ExeModifyArcRadius( nId, dRad) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-------------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtModifyArcC2P( int nId, const double ptEnd[3], int nRefType)
|
|
{
|
|
return ( ExeModifyArcC2P( nId, ptEnd, nRefType) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-------------------------------------------------------------------------------
|
|
BOOL
|
|
__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) ;
|
|
}
|
|
|
|
//-------------------------------------------------------------------------------
|
|
int
|
|
__stdcall EgtGetCurveCompoJointCount( int nId)
|
|
{
|
|
return ExeGetCurveCompoJointCount( nId) ;
|
|
}
|
|
|
|
//-------------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtRemoveCurveCompoJoint( int nId, int nU)
|
|
{
|
|
return ( ExeRemoveCurveCompoJoint( nId, nU) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//-------------------------------------------------------------------------------
|
|
int
|
|
__stdcall EgtExplodeCurveCompo( int nId, int* pnCount)
|
|
{
|
|
return ExeExplodeCurveCompo( nId, pnCount) ;
|
|
}
|
|
|
|
//-------------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtMergeCurvesInCurveCompo( int nId, double dLinTol)
|
|
{
|
|
return ( ExeMergeCurvesInCurveCompo( nId, dLinTol) ? TRUE : FALSE) ;
|
|
}
|