Files
EgtInterface/API_GdbCreate.cpp
Dario Sassi 4cc9be61d7 EgtInterface :
- aggiunte interfacce per EgtCreateAngularDimension, EgtCreateAngularDimensionEx, EgtCreateDiametralDimension e EgtCreateRadialDimension.
2024-03-14 20:03:38 +01:00

158 lines
6.8 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2014-2015
//----------------------------------------------------------------------------
// File : API_GdbCreate.cpp Data : 07.01.15 Versione : 1.6a1
// Contenuto : Funzioni di creazione oggetti del DB geometrico per API.
//
//
//
// Modifiche : 30.09.14 DS Creazione modulo.
// 07.01.15 DS Agg. scrittura comandi Lua.
//
//----------------------------------------------------------------------------
//--------------------------- Include ----------------------------------------
#include "stdafx.h"
#include "API.h"
#include "/EgtDev/Include/EInAPI.h"
#include "/EgtDev/Include/EXeExecutor.h"
#include "/EgtDev/Include/EgtStringConverter.h"
using namespace std ;
//-------------------------------------------------------------------------------
int
__stdcall EgtCreateGroup( int nParentId, const double ptOrig[3],
const double vX[3], const double vY[3], const double vZ[3], int nRefType)
{
Frame3d frFrame ;
if ( ! frFrame.Set( ptOrig, vX, vY, vZ))
return GDB_ID_NULL ;
return ExeCreateGroup( nParentId, frFrame, nRefType) ;
}
//-------------------------------------------------------------------------------
int
__stdcall EgtCreateGeoPoint( int nParentId, const double ptP[3], int nRefType)
{
return ExeCreateGeoPoint( nParentId, ptP, nRefType) ;
}
//-------------------------------------------------------------------------------
int
__stdcall EgtCreateGeoVector( int nParentId, const double vtV[3], const double ptB[3], int nRefType)
{
return ExeCreateGeoVector( nParentId, vtV, ptB, nRefType) ;
}
//-------------------------------------------------------------------------------
int
__stdcall EgtCreateGeoFrame( int nParentId, const double ptOrig[3],
const double vX[3], const double vY[3], const double vZ[3], int nRefType)
{
Frame3d frFrame ;
if ( ! frFrame.Set( ptOrig, vX, vY, vZ))
return GDB_ID_NULL ;
return ExeCreateGeoFrame( nParentId, frFrame, nRefType) ;
}
//-------------------------------------------------------------------------------
int
__stdcall EgtCreateText( int nParentId, const double ptP[3],
const wchar_t* wsText, double dH, int nRefType)
{
return ExeCreateText( nParentId, ptP, wstrztoA( wsText), dH, nRefType) ;
}
//-------------------------------------------------------------------------------
int
__stdcall EgtCreateTextEx( int nParentId, const double ptP[3], double dAngRotDeg,
const wchar_t* wsText, const wchar_t* wsFont, BOOL bItalic, double dH, int nRefType)
{
return ExeCreateTextEx( nParentId, ptP, dAngRotDeg,
wstrztoA( wsText), wstrztoA( wsFont), (bItalic != FALSE), dH, nRefType) ;
}
//-------------------------------------------------------------------------------
int
__stdcall EgtCreateTextAdv( int nParentId, const double ptP[3], double dAngRotDeg,
const wchar_t* wsText, const wchar_t* wsFont,
int nW, BOOL bItalic, double dH, double dRat, double dAddAdv, int nInsPos, int nRefType)
{
return ExeCreateTextAdv( nParentId, ptP, dAngRotDeg,
wstrztoA( wsText), wstrztoA( wsFont),
nW, ( bItalic != FALSE), dH, dRat, dAddAdv, nInsPos, nRefType) ;
}
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtSetCurrDimensionStyle( double dExtLineLen, double dArrowLen, double dTextDist,
int nLenIsMM, int nDecDigit, const wchar_t* wsFont, double dTextHeight)
{
return ( ExeSetCurrDimensionStyle( dExtLineLen, dArrowLen, dTextDist, nLenIsMM, nDecDigit, wstrztoA( wsFont), dTextHeight) ? TRUE : FALSE) ;
}
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtResetCurrDimensionStyle( void)
{
return ( ExeResetCurrDimensionStyle() ? TRUE : FALSE) ;
}
//-------------------------------------------------------------------------------
int
__stdcall EgtCreateHorizontalDimension( int nParentId, const double ptP1[3], const double ptP2[3],
const double ptDim[3], const wchar_t* wsText, int nRefType)
{
return ExeCreateHorizontalDimension( nParentId, ptP1, ptP2, ptDim, wstrztoA( wsText), nRefType) ;
}
//-------------------------------------------------------------------------------
int
__stdcall EgtCreateVerticalDimension( int nParentId, const double ptP1[3], const double ptP2[3],
const double ptDim[3], const wchar_t* wsText, int nRefType)
{
return ExeCreateVerticalDimension( nParentId, ptP1, ptP2, ptDim, wstrztoA( wsText), nRefType) ;
}
//-------------------------------------------------------------------------------
int
__stdcall EgtCreateAlignedDimension( int nParentId, const double ptP1[3], const double ptP2[3],
const double ptDim[3], const wchar_t* wsText, int nRefType)
{
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) ;
}