ee45e1da16
- aggiornamento per modifica parametri funzioni di creazione.
87 lines
3.4 KiB
C++
87 lines
3.4 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) ;
|
|
}
|
|
|