Files
EgtInterface/API_GdbCreate.cpp
T
Dario Sassi 8d69e253ad EgtInterface :
- aggiunta interfaccia per EgtSetCurrDimensionStyle e EgtResetCurrDimensionStyle.
2020-01-02 08:28:44 +00:00

126 lines
5.2 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) ;
}