diff --git a/EExExport3MF.h b/EExExport3MF.h new file mode 100644 index 0000000..cf12762 --- /dev/null +++ b/EExExport3MF.h @@ -0,0 +1,40 @@ +//---------------------------------------------------------------------------- +// EgalTech 2014-2014 +//---------------------------------------------------------------------------- +// File : EExExport3MF.h Data : 01.09.21 Versione : 2.3i1 +// Contenuto : Dichiarazione della interfaccia IExport3MF. +// +// +// +// Modifiche : 07.08.14 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EgkGeomDB.h" +#include "/EgtDev/Include/EExExportConst.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) IExport3MF +{ +public : + virtual ~IExport3MF( void) {} + virtual bool SetOptions( int nFilter) = 0 ; + virtual bool Export( IGeomDB* pGDB, int nId, const std::string& sFile) = 0 ; +} ; + +//----------------------------------------------------------------------------- +extern "C" { + EEX_EXPORT IExport3MF* CreateExport3MF(void) ; +} \ No newline at end of file diff --git a/EGkSfrCreate.h b/EGkSfrCreate.h index 862ca20..60fc3e5 100644 --- a/EGkSfrCreate.h +++ b/EGkSfrCreate.h @@ -23,6 +23,8 @@ #define EGK_EXPORT __declspec( dllimport) #endif +class Triangle3d ; + //---------------------------------------------------------------------------- EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionRectangle( double dWidth, double dLen) ; EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionStadium( double dWidth, double dLen) ; @@ -32,6 +34,9 @@ EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromPolyLineVector( const POLYLINEV // la curva ingrassata non deve autointersecarsi EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromFatCurve( ICurve* pCrv, double dRadius, bool bSquareEnds, bool bSquareMids) ; +// NB : la curva ingrassata non deve autointersecarsi +EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromTriangle( const Triangle3d& Tria) ; +EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromPolyLine( const PolyLine& ContourPolyLine) ; EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromPolyLineVector( const POLYLINEVECTOR& vContoursPolyLineVec) ; //---------------------------------------------------------------------------- @@ -54,9 +59,9 @@ class SurfFlatRegionByContours typedef std::vector INDAREAVECTOR ; // vettore di coppie indice, area private : - bool m_bAllowedMore ; // ammesse più regioni - bool m_bAllowedMultiChunk ; // ammesse regioni con più componenti disgiunti (chunk) + bool m_bAllowedMore ; // ammesse pi� regioni + bool m_bAllowedMultiChunk ; // ammesse regioni con pi� componenti disgiunti (chunk) bool m_bFirst ; // flag per prima superficie non ancora richiesta - ICURVEPVECTOR m_vpCrv ; // vettore di puntatori a curve, l'oggetto ne è possessore + ICURVEPVECTOR m_vpCrv ; // vettore di puntatori a curve, l'oggetto ne � possessore INDAREAVECTOR m_vArea ; // vettore indice + area di ogni curva } ; \ No newline at end of file diff --git a/EGkSurfTriMesh.h b/EGkSurfTriMesh.h index 97adc87..adc74d1 100644 --- a/EGkSurfTriMesh.h +++ b/EGkSurfTriMesh.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2014-2020 +// EgalTech 2014-2021 //---------------------------------------------------------------------------- -// File : EgkSurfTriMesh.h Data : 15.10.20 Versione : 2.2j2 +// File : EgkSurfTriMesh.h Data : 26.09.21 Versione : 2.3i2 // Contenuto : Dichiarazione della interfaccia ISurfTriMesh. // // @@ -78,7 +78,7 @@ class __declspec( novtable) ISurfTriMesh : public ISurf virtual bool GetTriangleBoundaryEdges( int nId, TriFlags3d& TFlags) const = 0 ; virtual bool GetTriangleSmoothNormals( int nId, TriNormals3d& TNrms) const = 0 ; virtual bool GetLoops( POLYLINEVECTOR& vPL) const = 0 ; - virtual bool GetSilhouette( const Vector3d& vtDir, POLYLINEVECTOR& vPL) const = 0 ; + virtual bool GetSilhouette( const Vector3d& vtDir, double dTol, POLYLINEVECTOR& vPL) const = 0 ; virtual int GetFacetCount( void) const = 0 ; virtual int GetFacetSize( void) const = 0 ; virtual int GetFacetFromTria( int nT) const = 0 ; diff --git a/EGkTriangle3d.h b/EGkTriangle3d.h index 70e97d0..e9f4e3a 100644 --- a/EGkTriangle3d.h +++ b/EGkTriangle3d.h @@ -97,28 +97,28 @@ class Triangle3d return Rotate( ptAx, vtAx, cos( dAngRad), sin( dAngRad)) ; } bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) - { m_ptP[0].Rotate( ptAx, vtAx, dCosAng, dSinAng) ; - m_ptP[1].Rotate( ptAx, vtAx, dCosAng, dSinAng) ; - m_ptP[2].Rotate( ptAx, vtAx, dCosAng, dSinAng) ; - m_vtN.Rotate( vtAx, dCosAng, dSinAng) ; + { return ( m_ptP[0].Rotate( ptAx, vtAx, dCosAng, dSinAng) && + m_ptP[1].Rotate( ptAx, vtAx, dCosAng, dSinAng) && + m_ptP[2].Rotate( ptAx, vtAx, dCosAng, dSinAng) && + m_vtN.Rotate( vtAx, dCosAng, dSinAng)) ; } bool Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ) { m_ptP[0].Scale( frRef, dCoeffX, dCoeffY, dCoeffZ) ; m_ptP[1].Scale( frRef, dCoeffX, dCoeffY, dCoeffZ) ; m_ptP[2].Scale( frRef, dCoeffX, dCoeffY, dCoeffZ) ; - Validate( true) ; + return Validate( true) ; } bool Mirror( const Point3d& ptOn, const Vector3d& vtNorm) { m_ptP[0].Mirror( ptOn, vtNorm) ; m_ptP[1].Mirror( ptOn, vtNorm) ; m_ptP[2].Mirror( ptOn, vtNorm) ; - Validate( true) ; + return Validate( true) ; } bool Shear( const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtDir, double dCoeff) { m_ptP[0].Shear( ptOn, vtNorm, vtDir, dCoeff) ; m_ptP[1].Shear( ptOn, vtNorm, vtDir, dCoeff) ; m_ptP[2].Shear( ptOn, vtNorm, vtDir, dCoeff) ; - Validate( true) ; + return Validate( true) ; } bool ToGlob( const Frame3d& frRef) { return ( m_ptP[0].ToGlob( frRef) && m_ptP[1].ToGlob( frRef) && m_ptP[2].ToGlob( frRef) && m_vtN.ToGlob( frRef)) ; } @@ -172,6 +172,15 @@ class Triangle3d else return ( std::max( dSqDistA, std::max( dSqDistB, dSqDistC)) / dTwoArea) ; } + double GetSqMinHeight( void) const + { Vector3d vtV1 = m_ptP[1] - m_ptP[0] ; + Vector3d vtV2 = m_ptP[2] - m_ptP[1] ; + Vector3d vtN = vtV1 ^ vtV2 ; + double dSqN = vtN.SqLen() ; + if ( dSqN < SQ_EPS_ZERO) + return 0 ; + return ( dSqN / std::max( { vtV1.SqLen(), vtV2.SqLen(), ( vtV1 + vtV2).SqLen()})) ; + } protected : Point3d m_ptP[3] ; @@ -277,20 +286,21 @@ class Triangle3dEx : public Triangle3d { double dAngRad = dAngDeg * DEGTORAD ; return Rotate( ptAx, vtAx, cos( dAngRad), sin( dAngRad)) ; } bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) - { m_ptP[0].Rotate( ptAx, vtAx, dCosAng, dSinAng) ; - m_ptP[1].Rotate( ptAx, vtAx, dCosAng, dSinAng) ; - m_ptP[2].Rotate( ptAx, vtAx, dCosAng, dSinAng) ; - m_vtN.Rotate( vtAx, dCosAng, dSinAng) ; - for ( int i = 0 ; i < 3 ; ++ i) - m_triN.vtN[i].Rotate( vtAx, dCosAng, dSinAng) ; + { return ( m_ptP[0].Rotate( ptAx, vtAx, dCosAng, dSinAng) && + m_ptP[1].Rotate( ptAx, vtAx, dCosAng, dSinAng) && + m_ptP[2].Rotate( ptAx, vtAx, dCosAng, dSinAng) && + m_vtN.Rotate( vtAx, dCosAng, dSinAng) && + m_triN.vtN[0].Rotate( vtAx, dCosAng, dSinAng) && + m_triN.vtN[1].Rotate( vtAx, dCosAng, dSinAng) && + m_triN.vtN[2].Rotate( vtAx, dCosAng, dSinAng)) ; } bool Scale( const Frame3d& frRef, double dCoeffX, double dCoeffY, double dCoeffZ) { m_ptP[0].Scale( frRef, dCoeffX, dCoeffY, dCoeffZ) ; m_ptP[1].Scale( frRef, dCoeffX, dCoeffY, dCoeffZ) ; m_ptP[2].Scale( frRef, dCoeffX, dCoeffY, dCoeffZ) ; for ( int i = 0 ; i < 3 ; ++ i) - m_triN.vtN[i] = V_NULL ; - Validate( true) ; + m_triN.vtN[i] = V_NULL ; + return Validate( true) ; } bool Mirror( const Point3d& ptOn, const Vector3d& vtNorm) { m_ptP[0].Mirror( ptOn, vtNorm) ; @@ -298,15 +308,15 @@ class Triangle3dEx : public Triangle3d m_ptP[2].Mirror( ptOn, vtNorm) ; for ( int i = 0 ; i < 3 ; ++ i) m_triN.vtN[i].Mirror( vtNorm) ; - Validate( true) ; + return Validate( true) ; } bool Shear( const Point3d& ptOn, const Vector3d& vtNorm, const Vector3d& vtDir, double dCoeff) { m_ptP[0].Shear( ptOn, vtNorm, vtDir, dCoeff) ; m_ptP[1].Shear( ptOn, vtNorm, vtDir, dCoeff) ; m_ptP[2].Shear( ptOn, vtNorm, vtDir, dCoeff) ; for ( int i = 0 ; i < 3 ; ++ i) - m_triN.vtN[i] = V_NULL ; - Validate( true) ; + m_triN.vtN[i] = V_NULL ; + return Validate( true) ; } bool ToGlob( const Frame3d& frRef) { return ( m_ptP[0].ToGlob( frRef) && m_ptP[1].ToGlob( frRef) && m_ptP[2].ToGlob( frRef) && m_vtN.ToGlob( frRef) && diff --git a/EInAPI.h b/EInAPI.h index 6434773..d5a954e 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -113,6 +113,7 @@ EIN_EXPORT BOOL __stdcall EgtAdvancedImportIsEnabled( void) ; EIN_EXPORT BOOL __stdcall EgtAdvancedImport( const wchar_t* wsFilePath, double dLinToler) ; EIN_EXPORT BOOL __stdcall EgtExportDxf( int nId, const wchar_t* wsFilePath, int nFlag) ; EIN_EXPORT BOOL __stdcall EgtExportStl( int nId, const wchar_t* wsFilePath) ; +EIN_EXPORT BOOL __stdcall EgtExport3MF( int nId, const wchar_t* wsFilePath) ; EIN_EXPORT BOOL __stdcall EgtExportSvg( int nId, const wchar_t* wsFilePath) ; // BeamManager @@ -562,7 +563,7 @@ EIN_EXPORT BOOL __stdcall EgtSurfTmFacetOppositeSide( int nId, int nFacet, const EIN_EXPORT BOOL __stdcall EgtSurfTmFacetAdjacencies( int nId, int nFacet, int*& vAdj, int* pnCount) ; EIN_EXPORT BOOL __stdcall EgtSurfTmFacetsContact( int nId, int nF1, int nF2, int nRefId, BOOL* pbAdjac, double ptP1[3], double ptP2[3], double* pdAng) ; -EIN_EXPORT int __stdcall EgtGetSurfTmSilhouette( int nId, const double vtDir[3], int nDestGrpId, int nRefType, int* pnCount) ; +EIN_EXPORT int __stdcall EgtGetSurfTmSilhouette( int nId, const double vtDir[3], double dToler, int nDestGrpId, int nRefType, int* pnCount) ; EIN_EXPORT int __stdcall EgtExtractSurfTmLoops( int nId, int nDestGrpId, int* pnCount) ; EIN_EXPORT int __stdcall EgtExtractSurfTmFacetLoops( int nId, int nFacet, int nDestGrpId, int* pnCount) ; EIN_EXPORT int __stdcall EgtCopySurfTmFacet( int nId, int nFacet, int nDestGrpId) ; @@ -734,6 +735,7 @@ EIN_EXPORT BOOL __stdcall EgtGetTableName( wchar_t*& wsTableName) ; EIN_EXPORT BOOL __stdcall EgtGetTableRef( int nInd, double ptPos[3]) ; EIN_EXPORT BOOL __stdcall EgtGetTableArea( int nInd, double ptMin[3], double ptMax[3]) ; EIN_EXPORT BOOL __stdcall EgtGetTableAreaOffset( int nInd, double ptMinOffs[3], double ptMaxOffs[3]) ; +EIN_EXPORT BOOL __stdcall EgtChangeTable( const wchar_t* wsTable, BOOL bUpdateDisp) ; EIN_EXPORT BOOL __stdcall EgtShowOnlyTable( BOOL bVal) ; EIN_EXPORT int __stdcall EgtAddFixture( const wchar_t* wsName, const double ptPos[3], double dAngRotDeg, double dMov) ; EIN_EXPORT BOOL __stdcall EgtKeepFixture( int nFxtId, int nSouPhase) ; diff --git a/EMkMachMgr.h b/EMkMachMgr.h index 923f8dc..4fd4058 100644 --- a/EMkMachMgr.h +++ b/EMkMachMgr.h @@ -106,6 +106,7 @@ class __declspec( novtable) IMachMgr virtual bool GetTableRef( int nInd, Point3d& ptPos) const = 0 ; virtual bool GetTableArea( int nInd, BBox3d& b3Area) const = 0 ; virtual bool GetTableAreaOffset( int nInd, BBox3d& b3Area) const = 0 ; + virtual bool ChangeTable( const std::string& sTable, bool bUpdateDisp) = 0 ; virtual bool ShowOnlyTable( bool bVal) = 0 ; virtual int AddFixture( const std::string& sName, const Point3d& ptPos, double dAngRotDeg, double dMov) = 0 ; virtual bool KeepFixture( int nFxtId, int nSouPhase) = 0 ; diff --git a/EMkMachiningConst.h b/EMkMachiningConst.h index b19256d..e5609b4 100644 --- a/EMkMachiningConst.h +++ b/EMkMachiningConst.h @@ -251,13 +251,15 @@ enum { MILL_LI_NONE = 0, MILL_LI_TANGENT = 2, MILL_LI_GLIDE = 3, MILL_LI_ZIGZAG = 4, - MILL_LI_HELIX = 5} ; + MILL_LI_HELIX = 5, + MILL_LI_TG_PERP = 6} ; // Tipo di uscita enum { MILL_LO_NONE = 0, MILL_LO_LINEAR = 1, MILL_LO_TANGENT = 2, MILL_LO_GLIDE = 3, - MILL_LO_AS_LI = 4} ; + MILL_LO_AS_LI = 4, + MILL_LO_PERP_TG = 5} ; // Tipo lavorazione faccia enum { MILL_FU_NONE = 0, MILL_FU_PARAL_DOWN = 1, diff --git a/EMkToolConst.h b/EMkToolConst.h index 7e06ead..51049c3 100644 --- a/EMkToolConst.h +++ b/EMkToolConst.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- // EgalTech 2015-2021 //---------------------------------------------------------------------------- -// File : EmkToolConst.h Data : 05.04.21 Versione : 2.3c2 +// File : EmkToolConst.h Data : 16.09.21 Versione : 2.3i6 // Contenuto : Costanti degli utensili. // // @@ -9,7 +9,8 @@ // Modifiche : 16.09.15 DS Creazione modulo. // 03.02.17 DS Agg. chisel. // 20.09.18 DS Agg. costanti per ToolHolder -// 05.04.21 DS Agg. TPA_LEN2 e TPA_STEMDIAM. +// 05.04.21 DS Agg. TPA_DIST e TPA_STEMDIAM. +// 16.09.21 DS Agg. TPA_CORE. // //---------------------------------------------------------------------------- @@ -88,6 +89,7 @@ enum TpaType { TPA_NONE = 0, TPA_MINFEED = ( TPA_DOU + 17), TPA_DIST = ( TPA_DOU + 18), TPA_STEMDIAM = ( TPA_DOU + 19), + TPA_CORE = ( TPA_DOU + 20), TPA_DRAW = ( TPA_STR + 0), TPA_HEAD = ( TPA_STR + 1), TPA_NAME = ( TPA_STR + 2), @@ -111,6 +113,7 @@ const std::string TSI_THDIAM = "THD" ; // diametro massimo port const std::string TSI_ACTIVE = "ACTIVE" ; // flag di utensile attivo const std::string TSI_DIST = "DIST" ; // distanza per sega a catena const std::string TSI_STEM_DIAM = "D_STEM" ; // diametro effettivo del gambo utensile +const std::string TSI_CORE = "CORE" ; // anima per lama //---------------------------------------------------------------------------- // Costanti per info in portautensili diff --git a/EXeExecutor.h b/EXeExecutor.h index 693103b..da628f9 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -120,6 +120,7 @@ EXE_EXPORT bool ExeAdvancedImportIsEnabled( void) ; EXE_EXPORT bool ExeAdvancedImport( const std::string& sFilePath, double dToler = 0.1) ; EXE_EXPORT bool ExeExportDxf( int nId, const std::string& sFilePath, int nFlag = 1) ; EXE_EXPORT bool ExeExportStl( int nId, const std::string& sFilePath) ; +EXE_EXPORT bool ExeExport3MF( int nId, const std::string& sFilePath) ; EXE_EXPORT bool ExeExportSvg( int nId, const std::string& sFilePath, int nFilter = 393) ; // BeamManager @@ -633,7 +634,7 @@ EXE_EXPORT bool ExeSurfTmFacetOppositeSideEx( int nId, int nFacet, const Vector3 Point3d& ptP1, Point3d& ptPm, Point3d& ptP2, Vector3d& vtIn1, Vector3d& vtOut2, double& dLen, double& dWidth) ; EXE_EXPORT bool ExeSurfTmFacetsContact( int nId, int nF1, int nF2, int nRefId, bool& bAdjac, Point3d& ptP1, Point3d& ptP2, double& dAng) ; EXE_EXPORT int ExeExtractSurfTmLoops( int nId, int nDestGrpId, int* pnCount) ; -EXE_EXPORT int ExeGetSurfTmSilhouette( int nId, const Vector3d& vtDir, int nDestGrpId, int nRefType, int* pnCount) ; +EXE_EXPORT int ExeGetSurfTmSilhouette( int nId, const Vector3d& vtDir, double dToler, int nDestGrpId, int nRefType, int* pnCount) ; EXE_EXPORT int ExeExtractSurfTmFacetLoops( int nId, int nFacet, int nDestGrpId, int* pnCount) ; EXE_EXPORT int ExeCopySurfTmFacet( int nId, int nFacet, int nDestGrpId) ; EXE_EXPORT bool ExeSurfTmGetFacetBBox( int nId, int nFacet, int nFlag, BBox3d& b3Box) ; @@ -874,6 +875,7 @@ EXE_EXPORT bool ExeGetTable( std::string& sTable) ; EXE_EXPORT bool ExeGetTableRef( int nInd, Point3d& ptPos) ; EXE_EXPORT bool ExeGetTableArea( int nInd, BBox3d& b3Area) ; EXE_EXPORT bool ExeGetTableAreaOffset( int nInd, BBox3d& b3AreaOffs) ; +EXE_EXPORT bool ExeChangeTable( const std::string& sTable, bool bUpdateDisp) ; EXE_EXPORT bool ExeShowOnlyTable( bool bVal) ; EXE_EXPORT int ExeAddFixture( const std::string& sName, const Point3d& ptPos, double dAngRotDeg, double dMov) ; EXE_EXPORT bool ExeKeepFixture( int nFxtId, int nSouPhase) ; diff --git a/EgtKeyCodes.h b/EgtKeyCodes.h index ba8d31c..f07faa5 100644 --- a/EgtKeyCodes.h +++ b/EgtKeyCodes.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- // EgalTech 2015-2021 //---------------------------------------------------------------------------- -// File : EgtKeyCodes.h Data : 31.07.21 Versione : 2.3h1 +// File : EgtKeyCodes.h Data : 03.10.21 Versione : 2.3j1 // Contenuto : Costanti per codici di protezione librerie di base. // // @@ -14,6 +14,7 @@ // 01.08.19 DS Portato a 21 KEY_BASELIB_VER. // 22.02.20 DS Aggiunta costante KEYOPT_EMK_NC_OFF. // 04.08.20 DS Portato a 22 KEY_BASELIB_VER. +// 01.01.21 DS Nuova gestione KEY_BASELIB_VER con versione prodotto e mese. // //---------------------------------------------------------------------------- @@ -21,7 +22,7 @@ //---------------------------------------------------------------------------- const int KEY_BASELIB_PROD = 207 ; -const int KEY_BASELIB_VER = 2308 ; +const int KEY_BASELIB_VER = 2310 ; const int KEY_BASELIB_LEV = 1 ; //----------------------------------------------------------------------------