Files
EgtInterface/API_GdbModifyCurve.cpp
T
Dario Sassi 6f7c603cc3 EgtInterface 2.3d3 :
- modificate le interfacce di EgtAddCurveCompoCurve, EgtAddCurveCompoLine, EgtAddCurveCompoArcTg e EgtAddCurveCompoArc2P con aggiunta del parametro bStartVsEnd.
2021-04-12 07:51:13 +00:00

330 lines
11 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2014-2019
//----------------------------------------------------------------------------
// File : API_ModifyCurve.cpp Data : 08.05.19 Versione : 2.1e2
// 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 nNumId, const int nIds[])
{
INTVECTOR vIds ;
vIds.reserve( nNumId) ;
for ( int i = 0 ; i < nNumId ; ++i)
vIds.push_back( nIds[i]) ;
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 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)
{
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 EgtTrimCurveWithRegion( int nCrvId, int nRegId, BOOL bInVsOut, BOOL bOn, int* pnCount)
{
return ExeTrimCurveWithRegion( nCrvId, nRegId, ( bInVsOut != FALSE), ( bOn != FALSE), pnCount) ;
}
//----------------------------------------------------------------------------
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 EgtModifyCircle3P( int nId, const double ptP1[3], const double ptP2[3], const double ptP3[3], int nRefType)
{
return ( ExeModifyCircle3P( nId, ptP1, ptP2, ptP3, 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 EgtModifyArcByFlip( int nId)
{
return ( ExeModifyArcByFlip( nId) ? TRUE : FALSE) ;
}
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtModifyArcToExplementary( int nId)
{
return ( ExeModifyArcToExplementary( nId) ? TRUE : FALSE) ;
}
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtCloseCurveCompo( int nId)
{
return ( ExeCloseCurveCompo( nId) ? TRUE : FALSE) ;
}
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtAddCurveCompoCurve( int nId, int nAddCrvId, BOOL bEraseOrig, BOOL bStartVsEnd)
{
return ( ExeAddCurveCompoCurve( nId, nAddCrvId, ( bEraseOrig != FALSE), ( bStartVsEnd != FALSE)) ? TRUE : FALSE) ;
}
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtAddCurveCompoLine( int nId, const double ptP[3], BOOL bStartVsEnd, int nRefType)
{
return ( ExeAddCurveCompoLine( nId, ptP, ( bStartVsEnd != FALSE), nRefType) ? TRUE : FALSE) ;
}
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtAddCurveCompoArcTg( int nId, const double ptP[3], BOOL bStartVsEnd, int nRefType)
{
return ( ExeAddCurveCompoArcTg( nId, ptP, ( bStartVsEnd != FALSE), nRefType) ? TRUE : FALSE) ;
}
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtAddCurveCompoArc2P( int nId, const double ptMid[3], const double ptP[3], BOOL bStartVsEnd, int nRefType)
{
return ( ExeAddCurveCompoArc2P( nId, ptMid, ptP, ( bStartVsEnd != FALSE), nRefType) ? TRUE : FALSE) ;
}
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtRemoveCurveCompoCurve( int nId, BOOL bLast)
{
return ( ExeRemoveCurveCompoCurve( nId, ( bLast != FALSE)) ? 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) ;
}
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtMoveCurveCompoCurve( int nId, int nCrv, const double vtMove[3], int nRefType)
{
return ( ExeMoveCurveCompoCurve( nId, nCrv, vtMove, nRefType) ? TRUE : FALSE) ;
}
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtModifyCurveCompoCurveToArc( int nId, int nCrv, const double ptP[3], int nRefType)
{
return ( ExeModifyCurveCompoCurveToArc( nId, nCrv, ptP, nRefType) ? TRUE : FALSE) ;
}
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtModifyCurveCompoCurveToLine( int nId, int nCrv)
{
return ( ExeModifyCurveCompoCurveToLine( nId, nCrv) ? TRUE : FALSE) ;
}
//-------------------------------------------------------------------------------
int
__stdcall EgtExplodeCurveCompo( int nId, int* pnCount)
{
return ExeExplodeCurveCompo( nId, pnCount) ;
}
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtMergeCurvesInCurveCompo( int nId, double dLinTol, BOOL bStartEnd)
{
return ( ExeMergeCurvesInCurveCompo( nId, dLinTol, ( bStartEnd != FALSE)) ? TRUE : FALSE) ;
}