From 3b65b5c13a71fb5579ed244d5d12749dbda830d3 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 29 Nov 2024 18:56:58 +0100 Subject: [PATCH] Include : - aggiunta interfaccia IImportOff - aggiornamento codici mensili di protezione delle librerie. --- EExImportOff.h | 38 ++++++++++++++++++++++++++++++++++++++ EGkPolyLine.h | 2 ++ EInAPI.h | 1 + EXeConst.h | 5 +++-- EXeExecutor.h | 1 + EgtKeyCodes.h | 2 +- 6 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 EExImportOff.h diff --git a/EExImportOff.h b/EExImportOff.h new file mode 100644 index 0000000..1e16dd9 --- /dev/null +++ b/EExImportOff.h @@ -0,0 +1,38 @@ +//---------------------------------------------------------------------------- +// EgalTech 2024-2024 +//---------------------------------------------------------------------------- +// File : EExImportOff.h Data : 28.11.24 Versione : 2.6k2 +// Contenuto : Dichiarazione della interfaccia IImportOff. +// +// +// +// Modifiche : 28.11.24 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkGeomDB.h" +#include + +//----------------------- 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) IImportOff +{ + public : + virtual ~IImportOff( void) {} + virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup, double dScaleFactor = 1) = 0 ; +} ; + +//----------------------------------------------------------------------------- +extern "C" { + EEX_EXPORT IImportOff* CreateImportOff( void) ; +} diff --git a/EGkPolyLine.h b/EGkPolyLine.h index 88de9de..5c94cc2 100644 --- a/EGkPolyLine.h +++ b/EGkPolyLine.h @@ -113,6 +113,7 @@ class PolyLine EGK_EXPORT bool MakeConvex( const Vector3d& vtN, bool bLeftSide) ; EGK_EXPORT bool Invert( bool bInvertU = true) ; EGK_EXPORT bool Flatten( double dZ = 0) ; + EGK_EXPORT bool FlattenInAutoPlane( double dToler = 10 * EPS_SMALL) ; EGK_EXPORT bool GetConvexHullXY( PNTVECTOR& vConvHull) const ; EGK_EXPORT bool GetMinAreaRectangleXY( Point3d& ptCen, Vector3d& vtAx, double& dLen, double& dHeight) const ; EGK_EXPORT bool Trim( const Plane3d& plPlane, bool bInVsOut = true) ; @@ -126,6 +127,7 @@ class PolyLine bool MyChangeStart( int nPos) ; bool MyApproxOnSide( const Vector3d& vtN, bool bLeftSide, double dToler = EPS_SMALL) ; bool MyMakeConvex( const Vector3d& vtN, bool bLeftSide) ; + bool MyRemoveSamePoints( double dToler = EPS_SMALL) ; private : int m_nRejected ; // numero punti rifiutati perchè coincidenti diff --git a/EInAPI.h b/EInAPI.h index 04e4a3e..fb795e1 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -116,6 +116,7 @@ EIN_EXPORT BOOL __stdcall EgtImportCsf( const wchar_t* wsFilePath) ; EIN_EXPORT BOOL __stdcall EgtImportDxf( const wchar_t* wsFilePath, double dScaleFactor) ; EIN_EXPORT BOOL __stdcall EgtImportPnt( const wchar_t* wsFilePath, int nFlag) ; EIN_EXPORT BOOL __stdcall EgtImportStl( const wchar_t* wsFilePath, double dScaleFactor) ; +EIN_EXPORT BOOL __stdcall EgtImportOff( const wchar_t* wsFilePath, double dScaleFactor) ; EIN_EXPORT BOOL __stdcall EgtImport3MF( const wchar_t* wsFilePath) ; EIN_EXPORT BOOL __stdcall EgtImport3dm( const wchar_t* wsFilePath) ; EIN_EXPORT BOOL __stdcall EgtAdvancedImportIsEnabled( void) ; diff --git a/EXeConst.h b/EXeConst.h index 181478a..767b3cd 100644 --- a/EXeConst.h +++ b/EXeConst.h @@ -28,8 +28,9 @@ enum FileType { FT_NULL = 0, FT_SVG = 18, FT_BTLX = 19, FT_3MF = 20, - FT_OBJ = 21, - FT_3DM = 22 , + FT_OBJ = 21, + FT_3DM = 22, + FT_OFF = 23, FT_IGES = 31, FT_STEP = 32, FT_ACIS = 33, diff --git a/EXeExecutor.h b/EXeExecutor.h index e29ab4a..f356196 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -124,6 +124,7 @@ EXE_EXPORT bool ExeImportCsf( const std::string& sFilePath) ; EXE_EXPORT bool ExeImportDxf( const std::string& sFilePath, double dScaleFactor) ; EXE_EXPORT bool ExeImportPnt( const std::string& sFilePath, int nFlag) ; EXE_EXPORT bool ExeImportStl( const std::string& sFilePath, double dScaleFactor) ; +EXE_EXPORT bool ExeImportOff( const std::string& sFilePath, double dScaleFactor) ; EXE_EXPORT bool ExeImport3MF( const std::string& sFilePath) ; EXE_EXPORT bool ExeImport3dm( const std::string& sFilePath) ; EXE_EXPORT bool ExeAdvancedImportIsEnabled( void) ; diff --git a/EgtKeyCodes.h b/EgtKeyCodes.h index 3e9438b..e728d3a 100644 --- a/EgtKeyCodes.h +++ b/EgtKeyCodes.h @@ -25,7 +25,7 @@ //---------------------------------------------------------------------------- const int KEY_BASELIB_PROD = 207 ; -const int KEY_BASELIB_VER = 2611 ; +const int KEY_BASELIB_VER = 2612 ; const int KEY_BASELIB_LEV = 1 ; //----------------------------------------------------------------------------