Include :

- aggiunto import BTL.
This commit is contained in:
Dario Sassi
2015-09-01 07:29:35 +00:00
parent ca1c1ae28f
commit 9ad9339af0
6 changed files with 91 additions and 4 deletions
+38
View File
@@ -0,0 +1,38 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2015
//----------------------------------------------------------------------------
// File : EExImportBtl.h Data : 22.08.15 Versione : 1.6h5
// Contenuto : Dichiarazione della interfaccia IImportBtl.
//
//
//
// Modifiche : 22.08.15 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EgkGeomDB.h"
#include <string>
//----------------------- Macro per import/export ----------------------------
#undef EEK_EXPORT
#if defined( I_AM_EEX) // da definirsi solo nella DLL
#define EEX_EXPORT __declspec( dllexport)
#else
#define EEX_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
class __declspec( novtable) IImportBtl
{
public :
virtual ~IImportBtl( void) {}
virtual bool Import( const std::string& sFile, IGeomDB* pGDB) = 0 ;
} ;
//-----------------------------------------------------------------------------
extern "C" {
EEX_EXPORT IImportBtl* CreateImportBtl( void) ;
}
+37 -2
View File
@@ -23,6 +23,41 @@ class Plane3d
double dDist ;
public :
void Translate( const Vector3d& vtMove)
{ Point3d ptP = ORIG + dDist * vtN ;
ptP.Translate( vtMove) ;
dDist = ( ptP - ORIG) * vtN ; }
bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg)
{ double dAngRad = dAngDeg * DEGTORAD ;
return Rotate( ptAx, vtAx, cos( dAngRad), sin( dAngRad)) ; }
bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng)
{ Point3d ptP = ORIG + dDist * vtN ;
if ( ! ptP.Rotate( ptAx, vtAx, dCosAng, dSinAng) || ! vtN.Rotate( vtAx, dCosAng, dSinAng))
return false ;
dDist = ( ptP - ORIG) * vtN ;
return true ; }
bool Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ)
{ Point3d ptP = ORIG + dDist * vtN ;
Frame3d frOCS ;
if ( ! frOCS.Set( ptP, vtN) || ! frOCS.PseudoScale( frRef, dCoeffX, dCoeffY, dCoeffZ))
return false ;
vtN = frOCS.VersZ() ;
dDist = ( frOCS.Orig() - ORIG) * vtN ;
return true ; }
bool Mirror( const Point3d& ptOn, const Vector3d& vtNorm)
{ Point3d ptP = ORIG + dDist * vtN ;
if ( ! ptP.Mirror( ptOn, vtNorm) || ! vtN.Mirror( vtNorm))
return false ;
dDist = ( ptP - ORIG) * vtN ;
return true ; }
bool Shear( const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtDir, double dCoeff)
{ Point3d ptP = ORIG + dDist * vtN ;
Frame3d frOCS ;
if ( ! frOCS.Set( ptP, vtN) || ! frOCS.PseudoShear( ptOn, vtNorm, vtDir, dCoeff))
return false ;
vtN = frOCS.VersZ() ;
dDist = ( frOCS.Orig() - ORIG) * vtN ;
return true ; }
bool ToGlob( const Frame3d& frRef)
{ Point3d ptP = ORIG + dDist * vtN ;
if ( ! ptP.ToGlob( frRef) || ! vtN.ToGlob( frRef))
@@ -45,9 +80,9 @@ class Plane3d
inline bool
SetPlane( const Point3d& ptP, const Vector3d& vtN, Plane3d& plPlane)
{
if ( vtN.IsSmall())
return false ;
plPlane.vtN = vtN ;
if ( ! plPlane.vtN.Normalize())
return false ;
plPlane.dDist = ( ptP - ORIG) * plPlane.vtN ;
return true ;
}
+2 -2
View File
@@ -24,8 +24,8 @@
#endif
//----------------------------------------------------------------------------
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshBox( double dWidth, double dLen, double dHeight) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshPyramid( double dWidth, double dLen, double dHeight) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshBox( double dDimX, double dDimY, double dHeight) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshPyramid( double dDimX, double dDimY, double dHeight) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshCylinder( double dRadius, double dHeight, double dLinTol) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshCone( double dRadius, double dHeight, double dLinTol) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshSphere( double dRadius, double dLinTol) ;
+1
View File
@@ -84,6 +84,7 @@ EIN_EXPORT BOOL __stdcall EgtImportDxf( const wchar_t* wsFilePath, double dScale
EIN_EXPORT BOOL __stdcall EgtImportStl( const wchar_t* wsFilePath, double dScaleFactor) ;
EIN_EXPORT BOOL __stdcall EgtImportCnc( const wchar_t* wsFilePath) ;
EIN_EXPORT BOOL __stdcall EgtImportCsf( const wchar_t* wsFilePath) ;
EIN_EXPORT BOOL __stdcall EgtImportBtl( const wchar_t* wsFilePath) ;
EIN_EXPORT BOOL __stdcall EgtExportDxf( int nId, const wchar_t* wsFilePath) ;
EIN_EXPORT BOOL __stdcall EgtExportStl( int nId, const wchar_t* wsFilePath) ;
+12
View File
@@ -14,6 +14,18 @@
#pragma once
//----------------- Costanti per tipo di file ----------------------------------
enum FileType { FT_NULL = 0,
FT_NGE = 1,
FT_NFE = 2,
FT_DXF = 11,
FT_STL = 12,
FT_CNC = 13,
FT_CSF = 14,
FT_BTL = 15,
FT_TSC = 101,
FT_LUA = 102} ;
//----------------- Costanti tipo di punto selezionato -------------------------
enum EinSep { SEP_STD = 0,
SEP_TG = 1,
+1
View File
@@ -85,6 +85,7 @@ EXE_EXPORT bool ExeImportDxf( const std::string& sFilePath, double dScaleFactor)
EXE_EXPORT bool ExeImportStl( const std::string& sFilePath, double dScaleFactor) ;
EXE_EXPORT bool ExeImportCnc( const std::string& sFilePath) ;
EXE_EXPORT bool ExeImportCsf( const std::string& sFilePath) ;
EXE_EXPORT bool ExeImportBtl( const std::string& sFilePath) ;
EXE_EXPORT bool ExeExportDxf( int nId, const std::string& sFilePath) ;
EXE_EXPORT bool ExeExportStl( int nId, const std::string& sFilePath) ;