Compare commits
419 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5a3661a61d | |||
| 5b7e1a4702 | |||
| fa9976ddfb | |||
| 93d6077de6 | |||
| 513ab88c6e | |||
| 02208b5259 | |||
| de9e442be8 | |||
| 3d3b0a569c | |||
| 903d20744c | |||
| cf26040cc5 | |||
| 082a2831df | |||
| 717267e832 | |||
| abd033342b | |||
| 7b3aeb6c4c | |||
| 707e8f089a | |||
| f91035138c | |||
| f5fb14805b | |||
| e587f78c21 | |||
| 32fecb707c | |||
| 707c01e3e3 | |||
| 27095ab86b | |||
| a11da73e36 | |||
| ca5efc44a9 | |||
| 4352332d54 | |||
| 0b155ef732 | |||
| 71e670357b | |||
| 41f2151748 | |||
| 28ae97ae20 | |||
| cac25dd095 | |||
| 2eccae4b92 | |||
| fac9c9cbc7 | |||
| c879b37f7d | |||
| a6c5a4e6ca | |||
| b6a535a3b7 | |||
| 84ae21db77 | |||
| 89d62ea86a | |||
| 4e4ac1353e | |||
| f24ca04620 | |||
| 6819363068 | |||
| bd01cb72fd | |||
| 32cba3873e | |||
| ee7aabb242 | |||
| 552c408827 | |||
| 8bd32361be | |||
| 4833024c3e | |||
| ac47b1bf6f | |||
| a1bcc4ff9e | |||
| c0657147bb | |||
| 9bbb8506e9 | |||
| 5045a04dca | |||
| b4f0bc19ce | |||
| f841a7444b | |||
| d481592dfa | |||
| 73fcfd5138 | |||
| 754f2bd12d | |||
| 3ce904e2dd | |||
| cd8bf29916 | |||
| 003ff35da1 | |||
| bf9ea5e644 | |||
| cdc2df5d64 | |||
| 47cdbac0e3 | |||
| 4589358588 | |||
| 1efe9e2395 | |||
| 2c6c6b9e96 | |||
| b54a74726d | |||
| dec994247a | |||
| 71b98a0505 | |||
| 7bace5d80f | |||
| 7084ab34c8 | |||
| ed77709276 | |||
| f3631e973a | |||
| 979d989232 | |||
| a89307aeeb | |||
| 205af03a9b | |||
| d41673218e | |||
| d379137f70 | |||
| 941daabb49 | |||
| 6b7b59ae58 | |||
| ac8b796d10 | |||
| 5b26ab4733 | |||
| df70cef32d | |||
| 02bea83d38 | |||
| 25817a8911 | |||
| 6b59d709f6 | |||
| bb9f7b5fba | |||
| 06d074869d | |||
| fd7873a501 | |||
| 106c053a09 | |||
| d44f31af7f | |||
| 08ddbc9291 | |||
| d213cd0cd6 | |||
| 034cff8431 | |||
| 6a70d13cd9 | |||
| 8fc265c399 | |||
| b311f9f343 | |||
| 229eef8d19 | |||
| eb09b797a0 | |||
| ee9bff2fe9 | |||
| 7cc55217f8 | |||
| dacf041b67 | |||
| 1d43a09141 | |||
| 1655127475 | |||
| 45c642e51a | |||
| 4f79b63f80 | |||
| 69b3f4f555 | |||
| f2d39a98a7 | |||
| a39ea29632 | |||
| 4c6d87389d | |||
| d580b3dacb | |||
| 9472b42520 | |||
| 0fa10b233f | |||
| 658a6a319b | |||
| 3b9501cfdd | |||
| d4d7b75015 | |||
| ef8565ce72 | |||
| c8e73a6f15 | |||
| 7ebf9a6fb0 | |||
| fe9d75c14f | |||
| 809b1a4405 | |||
| 766508b041 | |||
| 1cc997c31a | |||
| 2a91cddd37 | |||
| b1a801ed60 | |||
| 779569644b | |||
| 5b5cc241db | |||
| cb7dbb0e52 | |||
| 5113903eb2 | |||
| df4e8edcef | |||
| 98d2a79026 | |||
| 3d06ce7c60 | |||
| c2032ba0af | |||
| 22681a960d | |||
| e7a6f95012 | |||
| 7b98133ae5 | |||
| 2d430c3fd6 | |||
| b127fca1f3 | |||
| 4b22adfdfa | |||
| 7727db9a8a | |||
| f6caa955e2 | |||
| 2e15fcf59f | |||
| 35ce9e3621 | |||
| 7b7dc44aaf | |||
| 871cd05201 | |||
| 6f7c15cf54 | |||
| b4305fc503 | |||
| ccbbc31395 | |||
| a755677379 | |||
| 8e99498a6b | |||
| 45aa980693 | |||
| bfffbbf37b | |||
| 8da5aeb3a4 | |||
| 65e20afeab | |||
| d8c4b93e46 | |||
| d39e6dfe19 | |||
| ee01a02292 | |||
| d8f50f040c | |||
| 9cbfcd7422 | |||
| 4cc94522ca | |||
| fd3d53c777 | |||
| 6699e21059 | |||
| 59dc7c0cce | |||
| 2010e58f5c | |||
| 5df80c8ae7 | |||
| d377f00b9b | |||
| be2c7b8d7d | |||
| 6c3cb3289e | |||
| c98318f8ba | |||
| 31436bfb7c | |||
| fd382173c9 | |||
| efe425a243 | |||
| 97767e1945 | |||
| 53cf69101e | |||
| d0292c7fcf | |||
| f96c15de7e | |||
| a8d98900e4 | |||
| afa460495a | |||
| 35dcbbf6d0 | |||
| c0de49ff5c | |||
| 3cceff83c9 | |||
| 9c2ccb300e | |||
| 172037d8a7 | |||
| 125cce1983 | |||
| ec4162e8be | |||
| 0c72da8b1c | |||
| 5d25f7917e | |||
| c22d4bbcd9 | |||
| 6a355ccfe3 | |||
| 0e636829dd | |||
| 9f41af0b3c | |||
| 410b6aa2b5 | |||
| 82cb2d7010 | |||
| 47e48d2439 | |||
| 8a4c550e2e | |||
| 880967a813 | |||
| 1fe12bac99 | |||
| 94fe68fd89 | |||
| 9a37f9033a | |||
| c77fb38e64 | |||
| bb029712a9 | |||
| 2233bab91f | |||
| 3d95e582ef | |||
| ced3d3d75c | |||
| 8f83a54310 | |||
| 67fa641522 | |||
| 3349069674 | |||
| 9a89e851d2 | |||
| ffd321457b | |||
| eb563b913d | |||
| 38cbba2e35 | |||
| 36ce862054 | |||
| c0beda4a1e | |||
| a6ccbb0653 | |||
| 4fbd8d0b30 | |||
| 3db25e173f | |||
| 8d2d58c455 | |||
| 865e6e7090 | |||
| df125db2ae | |||
| cf6b8e7572 | |||
| f5724206d5 | |||
| 8bac9f6885 | |||
| 3c26cd87cb | |||
| ef1b7e0952 | |||
| 7b09526919 | |||
| 9577094c3d | |||
| 9de2ae9561 | |||
| c1a3773e7a | |||
| adebd1315b | |||
| 48c1ed4bcc | |||
| 3bcc803f47 | |||
| 52b0802dfb | |||
| f912437d87 | |||
| 6816497c5e | |||
| eb75cfd6e3 | |||
| d5fcae0eec | |||
| d9d4f8c6dc | |||
| 3ad00a017f | |||
| 689197717c | |||
| 34888a1204 | |||
| d2bc22a9c3 | |||
| 34e42aaece | |||
| d2f7b89b04 | |||
| c47feff394 | |||
| 4b73f70232 | |||
| 6c57d57be1 | |||
| 481a86c2fa | |||
| fd4b84807f | |||
| 59a4239226 | |||
| 3ecbb9b55a | |||
| bc0ac3c336 | |||
| 0dd9b62386 | |||
| 2549d720df | |||
| 9d7e968fb7 | |||
| 916c8bf793 | |||
| a311b4bd0f | |||
| 3b65b5c13a | |||
| 5aebd3a873 | |||
| 32ede62dc8 | |||
| d35b0931e0 | |||
| 2fe3f8c68b | |||
| b6799c548c | |||
| 83a983100a | |||
| a9b4243c08 | |||
| 942b26229f | |||
| e41ede6cf4 | |||
| 5831ac0c99 | |||
| 45229d2c52 | |||
| 9ccea92086 | |||
| 15c7bdca64 | |||
| b385f19273 | |||
| 5525970ea1 | |||
| 0deab361c2 | |||
| f4d5bb773e | |||
| f9f1e61a52 | |||
| 3c02ee2dc0 | |||
| d3528e3660 | |||
| 0399218643 | |||
| 83cfdfc50e | |||
| fe30d8316d | |||
| 9b3ee95672 | |||
| 67e90e56dd | |||
| 41671e933f | |||
| d5b6c5c278 | |||
| a9b5a7285f | |||
| e07eaed52b | |||
| 398a083be6 | |||
| 843f69c529 | |||
| 415493927e | |||
| d87a1037e6 | |||
| 9891ab1d29 | |||
| 32b9ee9f24 | |||
| 6944705676 | |||
| 00f5e38f61 | |||
| 020dca78bd | |||
| 65b3fe80d1 | |||
| c57e44db02 | |||
| 30a394960c | |||
| 50df61a97a | |||
| 992b4d1562 | |||
| 74c9c8d04e | |||
| e51df31d13 | |||
| dd0a2818ee | |||
| d6e6531d92 | |||
| 5919ebd8ec | |||
| f0968a8d40 | |||
| ba10a0cd58 | |||
| f81bb32e20 | |||
| 7d0a641b6d | |||
| d026cc2db7 | |||
| b691854993 | |||
| fe25f6e009 | |||
| 1c088f9e50 | |||
| 88bbc2580b | |||
| 2468e5c1c5 | |||
| af000e7c37 | |||
| 9464b52c0b | |||
| 6534f7bc32 | |||
| 5ba17dda50 | |||
| 64e225c11c | |||
| 26869b633d | |||
| fef9dd4ae5 | |||
| 1c6d7ed4ff | |||
| dec545da2e | |||
| c4241bfb88 | |||
| 77b84fdd17 | |||
| 9a8be81fd6 | |||
| e148024db1 | |||
| 4ede19d2ee | |||
| b4ee9e2b42 | |||
| 5644f837ed | |||
| d731ea7164 | |||
| ca4eb9f166 | |||
| 29bc318eaa | |||
| fda893f8e2 | |||
| 675c09e36b | |||
| e5873f66ce | |||
| d2880b5167 | |||
| a933bea836 | |||
| 9dbb6fac60 | |||
| d3c44f2241 | |||
| e6f0be1896 | |||
| 5d2497bc9c | |||
| b4c5b74e8a | |||
| 38b0309079 | |||
| 60f71c0601 | |||
| b3f6bd148a | |||
| 3ded442847 | |||
| 756f13e6d7 | |||
| 127fbb4be6 | |||
| f72ee830ff | |||
| c40a9a64c0 | |||
| 196e037ace | |||
| a6ccda3670 | |||
| a19e0e63a5 | |||
| fa91c10973 | |||
| ad970a39f5 | |||
| 3d7308fbd3 | |||
| 85e69405f1 | |||
| f4bb934999 | |||
| 129bff73f0 | |||
| 43eb33cf34 | |||
| 5b6d056eb9 | |||
| 88a4a91835 | |||
| a78f73f1f1 | |||
| 90d548b69d | |||
| 37768dc318 | |||
| 82e86fcdee | |||
| 728d677ad6 | |||
| 360c3c1ab1 | |||
| 062512cd2e | |||
| bdd2f34184 | |||
| 987a84181d | |||
| 9617f36230 | |||
| 14fe1a913a | |||
| 9d7207e898 | |||
| f1ce998815 | |||
| 58ce7bc753 | |||
| 7d922116ed | |||
| c3d3c1e0bc | |||
| c45d88829a | |||
| ad87ee5da8 | |||
| 079e9e027a | |||
| 88fa15f216 | |||
| 8efa4243b0 | |||
| 7c3a4e4ef8 | |||
| a5ae1f617a | |||
| fbbefba01e | |||
| ece9282f17 | |||
| 95d828ea9a | |||
| 08e53e8872 | |||
| 6a315e2180 | |||
| 2f821e645e | |||
| a55b658dd3 | |||
| a6fa2fd1eb | |||
| abca64412e | |||
| 620ffdd3c8 | |||
| a8f06e3724 | |||
| 85dbf13d9e | |||
| a98e3a91a8 | |||
| 7eae7b1771 | |||
| a66f159deb | |||
| a9e5a7ada7 | |||
| 841fc508db | |||
| bb7da199a9 | |||
| e821a72ac9 | |||
| 1dc36f32ee | |||
| 1a6f7ace71 | |||
| db90c2e032 | |||
| ac2da7f310 | |||
| 3466eb44dd | |||
| a0244abf46 | |||
| 80b71e7d5d | |||
| 2ae2d43e19 | |||
| cda56e4f1e | |||
| c9cd2e6436 | |||
| 954f7a602a | |||
| 384eacf837 | |||
| be18f4ceab | |||
| 736131c937 | |||
| fa7dc81a0f |
@@ -0,0 +1,57 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2024-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EBsAPI.h Data : 24.01.25 Versione : 2.7a1
|
||||
// Contenuto : API (application programming interface).
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 05.10.24 DS Creazione modulo.
|
||||
// 24.01.25 DS Aggiunta gestione messaggi.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#define NOMINMAX
|
||||
#include <windows.h>
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
#undef EGTBASIS_EXPORT
|
||||
#if defined( I_AM_EGTBASIS) // da definirsi solo nella DLL
|
||||
#define EGTBASIS_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define EGTBASIS_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// API
|
||||
// Protezione
|
||||
EGTBASIS_EXPORT BOOL __stdcall EgtSetKey( const wchar_t* wsKey) ;
|
||||
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyLevel( int nProd, int nVer, int nLev, int* pnKLev) ;
|
||||
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyOptions( int nProd, int nVer, int nLev, unsigned int* pnOpt1, unsigned int* pnOpt2) ;
|
||||
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyLeftDays( int* pnLeftDays) ;
|
||||
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyAssLeftDays( int* pnAssLeftDays) ;
|
||||
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyOptLeftDays( int* pnOptLeftDays) ;
|
||||
// Liberazione memoria blocchi dati ritornati (di solito per stringhe)
|
||||
EGTBASIS_EXPORT BOOL __stdcall EgtFreeMemory( void* pMem) ;
|
||||
// Messaggi
|
||||
EGTBASIS_EXPORT BOOL __stdcall EgtLoadMessages( const wchar_t* wsMsgFilePath) ;
|
||||
EGTBASIS_EXPORT const wchar_t* __stdcall EgtGetMsg( int nMsg) ;
|
||||
// Logger
|
||||
EGTBASIS_EXPORT BOOL __stdcall EgtInitLogger( int nDebug, const wchar_t* wsLogFile) ;
|
||||
EGTBASIS_EXPORT BOOL __stdcall EgtOutLog( const wchar_t* wsMsg, int nDebugLevel) ;
|
||||
|
||||
// Ini File
|
||||
EGTBASIS_EXPORT BOOL __stdcall EgtGetStringUtf8FromIni( const wchar_t* wsSec, const wchar_t* wsKey,
|
||||
const wchar_t* wsDef, wchar_t*& wsVal, const wchar_t* wsIniFile) ;
|
||||
EGTBASIS_EXPORT BOOL __stdcall EgtWriteStringUtf8ToIni( const wchar_t* wsSec, const wchar_t* wsKey,
|
||||
const wchar_t* wsVal, const wchar_t* wsIniFile) ;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+5
-3
@@ -1,13 +1,14 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2020-2022
|
||||
// EgalTech 2020-2026
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EExBeamConst.h Data : 04.04.22 Versione : 2.4d2
|
||||
// File : EExBeamConst.h Data : 23.01.26 Versione : 3.1a2
|
||||
// Contenuto : Dichiarazione delle costanti per travi e pareti con BTL.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 30.08.20 DS Creazione modulo.
|
||||
// 04.04.22 DS Aggiunto EIBFLAG_TRIM_WITH_OUTLINE.
|
||||
// 23.01.26 DS Aggiunto EIBFLAG_PARTOFFSET.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -22,4 +23,5 @@ enum EImBtlFlag { EIBFLAG_NONE = 0x0000,
|
||||
EIBFLAG_SORT = 0x0010, // ordina i pezzi nel DB in base al nome
|
||||
EIBFLAG_USEUATTR = 0x0020, // utilizza i parametri utente U per modificare la geometria delle features
|
||||
EIBFLAG_OUTL_FLAT_POS = 0x0040, // pezzi secondo outline o di piatto (prevale sui precedenti POS)
|
||||
EIBFLAG_TRIM_WITH_OUTLINE = 0x0080} ; // esegui il trim delle feature con l'outline (se presente)
|
||||
EIBFLAG_TRIM_WITH_OUTLINE = 0x0080, // esegui il trim delle feature con l'outline (se presente)
|
||||
EIBFLAG_PARTOFFSET = 0x0100} ; // gestione geometrica del PARTOFFSET
|
||||
|
||||
+5
-2
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "/EgtDev/Include/EGkGeomDB.h"
|
||||
#include "/EgtDev/Include/EExBeamConst.h"
|
||||
#include "/EgtDev/Include/EgtFunPtrType.h"
|
||||
#include <string>
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
@@ -53,11 +54,13 @@ class __declspec( novtable) IBeamMgr
|
||||
int nCrvId, int nCrv2Id, bool bUpdate = true) = 0 ;
|
||||
virtual bool EraseProcess( int nGeomId, bool bUpdate = true) = 0 ;
|
||||
virtual bool EnableProcess( int nGeomId, bool bEnable, bool bUpdate = true) = 0 ;
|
||||
virtual bool CalcAllSolids( bool bShow, bool bRecalc, pcfProcEvents pFun = nullptr) = 0 ;
|
||||
virtual bool ShowAllSolids( bool bShow, pcfProcEvents pFun = nullptr) = 0 ;
|
||||
virtual bool CalcSolid( int nPartId, bool bRecalc = false) = 0 ;
|
||||
virtual int GetSolid( int nPartId) const = 0 ;
|
||||
virtual bool ShowSolid( int nPartId, bool bShow) = 0 ;
|
||||
virtual bool GetBuildingIsOn( void) const = 0 ;
|
||||
virtual bool ShowBuilding( bool bShow) = 0 ;
|
||||
virtual bool GetBuildingIsOn( int nAssGrpId) const = 0 ;
|
||||
virtual bool ShowBuilding( int nAssGrpId, bool bShow) = 0 ;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
+4
-1
@@ -29,10 +29,13 @@ class __declspec( novtable) IImport3MF
|
||||
{
|
||||
public :
|
||||
virtual ~IImport3MF( void) {}
|
||||
virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup) = 0 ;
|
||||
virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup, int nFlag = 0) = 0 ;
|
||||
} ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
extern "C" {
|
||||
EEX_EXPORT IImport3MF* CreateImport3MF( void) ;
|
||||
}
|
||||
|
||||
enum EIm3MFFlag { EI3FLAG_NONE = 0x0000,
|
||||
EI3FLAG_KEEP_GROUPS = 0x0001} ;
|
||||
|
||||
@@ -37,5 +37,6 @@ class __declspec( novtable) IImportBtl
|
||||
//-----------------------------------------------------------------------------
|
||||
extern "C" {
|
||||
EEX_EXPORT bool SetBtlAuxDir( const std::string& sBtlAuxDir) ;
|
||||
EEX_EXPORT bool SetBtlLuaData( const std::string& sLuaLibsDir, const std::string& sLuaLastRequire) ;
|
||||
EEX_EXPORT IImportBtl* CreateImportBtl( void) ;
|
||||
}
|
||||
|
||||
@@ -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 <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) 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) ;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2025-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EExImportPly.h Data : 28.02.25 Versione : 2.7b2
|
||||
// Contenuto : Dichiarazione della interfaccia IImportPly.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 28.02.25 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) IImportPly
|
||||
{
|
||||
public :
|
||||
virtual ~IImportPly( void) {}
|
||||
virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup, double dScaleFactor = 1) = 0 ;
|
||||
} ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
extern "C" {
|
||||
EEX_EXPORT IImportPly* CreateImportPly( void) ;
|
||||
}
|
||||
+11
-1
@@ -15,6 +15,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkPoint3d.h"
|
||||
#include "/EgtDev/Include/EGkFrame3d.h"
|
||||
#include <vector>
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
#undef EGK_EXPORT
|
||||
@@ -47,7 +49,7 @@ class EGK_EXPORT BBox3d
|
||||
{ m_ptMin = Point3d( +INFINITO, +INFINITO, +INFINITO) ;
|
||||
m_ptMax = Point3d( -INFINITO, -INFINITO, -INFINITO) ; }
|
||||
void Set( const Point3d& ptP)
|
||||
{ m_ptMin = ptP ; m_ptMax = ptP ; }
|
||||
{ m_ptMin = ptP ; m_ptMax = ptP ; }
|
||||
void Set( double dX, double dY, double dZ)
|
||||
{ m_ptMin = Point3d( dX, dY, dZ) ; m_ptMax = m_ptMin ; }
|
||||
void Set( const Point3d& ptP1, const Point3d& ptP2) ;
|
||||
@@ -65,6 +67,8 @@ class EGK_EXPORT BBox3d
|
||||
void Add( const Point3d& ptP) ;
|
||||
void Add( double dX, double dY, double dZ) ;
|
||||
void Add( const BBox3d& b3B) ;
|
||||
void Add( const std::vector<Point3d>& vPnt) { for ( const Point3d& pt: vPnt){
|
||||
Add( pt) ; }}
|
||||
void Expand( double dDelta) ;
|
||||
void Expand( double dDeltaX, double dDeltaY, double dDeltaZ) ;
|
||||
const Point3d& GetMin( void) const
|
||||
@@ -160,3 +164,9 @@ GetLocToLoc( const BBox3d& b3Box, const Frame3d& frOri, const Frame3d& frDest)
|
||||
b3New.LocToLoc( frOri, frDest) ;
|
||||
return b3New ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool Overlaps( const BBox3d& bbA, const Frame3d& frA, const BBox3d& bbB, const Frame3d& frB)
|
||||
{
|
||||
return bbA.Overlaps( GetToLoc( frB, frA), bbB) ;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2024-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkCAvSilhouetteSurfTm.h Data : 08.06.24 Versione : 2.6f2
|
||||
// Contenuto : Dichiarazione della funzione calcolo silhouette.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 08.06.24 DS Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkSurfTriMesh.h"
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
#undef EGK_EXPORT
|
||||
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
||||
#define EGK_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define EGK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool CAvSilhouetteSurfTm( const ISurfTriMesh& Stm, const Plane3d& plPlane, double dTol, POLYLINEVECTOR& vPL) ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
class __declspec( novtable) ICAvParSilhouettesSurfTm
|
||||
{
|
||||
public :
|
||||
virtual ~ICAvParSilhouettesSurfTm( void) {}
|
||||
virtual bool SetData( const CISURFTMPVECTOR& vpStm, const Frame3d& frPlanes, double dTol) = 0 ;
|
||||
virtual bool SetData( const CISURFTMPVECTOR& vpStm, const Frame3d& frPlanes, double dTol,
|
||||
double dSideAng, double dDiam, double dCornRad, double dMaxMat, double dOffsR,
|
||||
double dMaxDepth) = 0 ;
|
||||
virtual bool GetSilhouette( double dLevel, POLYLINEVECTOR& vPL) = 0 ;
|
||||
} ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
EGK_EXPORT ICAvParSilhouettesSurfTm* CreateCAvParSilhouettesSurfTm( void) ;
|
||||
@@ -35,20 +35,27 @@ const int SCI_LINE_LINE = 4 ; // tra linea di mobile e linea di fiss
|
||||
struct SCollInfo
|
||||
{
|
||||
int nType ; // tipo di collisione
|
||||
|
||||
int nChunkM ; // indice del chunk della regione mobile
|
||||
int nCrvM ; // indice della curva nel loop esterno del chunk
|
||||
int nLoopM ; // indice del loop del chunk della regione mobile
|
||||
int nCrvM ; // indice della curva nel loop del chunk
|
||||
|
||||
int nChunkF ; // indice del chunk della regione fissa
|
||||
int nCrvF ; // indice della curva nel loop esterno del chunk
|
||||
int nLoopF ; // indice del loop del chunk della regione fissa
|
||||
int nCrvF ; // indice della curva nel loop del chunk
|
||||
|
||||
Point3d ptP1 ; // punto di contatto
|
||||
Point3d ptP2 ; // se contatto linea-linea, secondo punto di contatto
|
||||
Vector3d vtDirM ; // se contatto del mobile con linea, sua direzione
|
||||
Vector3d vtDirF ; // se contatto del fisso con linea, sua direzione
|
||||
|
||||
// costruttori
|
||||
SCollInfo() : nType( SCI_NONE), nChunkM( -1), nCrvM( -1), nChunkF( -1), nCrvF( -1),
|
||||
SCollInfo() : nType( SCI_NONE), nChunkM( -1), nLoopM( -1), nCrvM( -1), nChunkF( -1), nLoopF( -1), nCrvF( -1),
|
||||
ptP1(), ptP2(), vtDirM(), vtDirF() {}
|
||||
SCollInfo( const SCollInfo& Sou) : nType( Sou.nType), nChunkM( Sou.nChunkM), nCrvM( Sou.nCrvM),
|
||||
nChunkF( Sou.nChunkF), nCrvF( Sou.nCrvF), ptP1( Sou.ptP1),
|
||||
ptP2( Sou.ptP2), vtDirM( Sou.vtDirM), vtDirF( Sou.vtDirF) {}
|
||||
SCollInfo( const SCollInfo& Sou) : nType( Sou.nType),
|
||||
nChunkM( Sou.nChunkM), nLoopM( Sou.nLoopM), nCrvM( Sou.nCrvM),
|
||||
nChunkF( Sou.nChunkF), nLoopF( Sou.nLoopF), nCrvF( Sou.nCrvF),
|
||||
ptP1( Sou.ptP1), ptP2( Sou.ptP2), vtDirM( Sou.vtDirM), vtDirF( Sou.vtDirF) {}
|
||||
} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -67,4 +74,4 @@ class CAvSimpleSurfFrMove
|
||||
const ISurfFlatRegion* m_pRegM ;
|
||||
const ISurfFlatRegion* m_pRegF ;
|
||||
SCollInfo m_SCollInfo ;
|
||||
} ;
|
||||
} ;
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2018
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkCAvSurfFrMove.h Data : 26.03.2026 Versione : 3.1c7
|
||||
// Contenuto : Dichiarazione classe per movimento di superfici flat region
|
||||
// nel loro piano evitando collisioni
|
||||
//
|
||||
// Modifiche : 26.03.26 RE Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkCAvSimpleSurfFrMove.h"
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
#undef EGK_EXPORT
|
||||
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
||||
#define EGK_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define EGK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class CAvSurfFrMove
|
||||
{
|
||||
public :
|
||||
EGK_EXPORT CAvSurfFrMove( const ISurfFlatRegion& SfrM, const ISurfFlatRegion& SfrF) ;
|
||||
|
||||
public :
|
||||
EGK_EXPORT bool Translate( const Vector3d& vtDir, double& dLen) ;
|
||||
EGK_EXPORT bool Rotate( const Point3d& ptCen, double& dAng) ;
|
||||
EGK_EXPORT const SCollInfo& GetCollInfo()
|
||||
{ return m_CollInfo ; }
|
||||
|
||||
private :
|
||||
const ISurfFlatRegion* m_pRegM ;
|
||||
const ISurfFlatRegion* m_pRegF ;
|
||||
SCollInfo m_CollInfo ;
|
||||
} ;
|
||||
+12
-2
@@ -23,6 +23,8 @@
|
||||
#define EGK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
class ICurveComposite ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
class __declspec( novtable) ICAvToolSurfTm {
|
||||
public :
|
||||
@@ -35,9 +37,17 @@ class __declspec( novtable) ICAvToolSurfTm {
|
||||
virtual bool SetGenTool( const ICurveComposite* pToolOutline) = 0 ;
|
||||
virtual double GetToolRadius( void) const = 0 ;
|
||||
virtual double GetToolHeight( void) const = 0 ;
|
||||
virtual double GetToolTipHeight( void) const = 0 ;
|
||||
virtual double GetToolTipRadius( void) const = 0 ;
|
||||
virtual double GetToolCornRadius( void) const = 0 ;
|
||||
virtual const ICurveComposite& GetToolOutline( bool bApprox = false) const = 0 ;
|
||||
virtual bool TestPosition( const Point3d& ptT, const Vector3d& vtDir, const Vector3d& vtMove, double& dTotDist) = 0 ;
|
||||
virtual bool TestPath( PNTULIST& lPntM, const Vector3d& vtDir, const Vector3d& vtMove, double dLinTol) = 0 ;
|
||||
virtual bool TestPosition( const Point3d& ptT, const Vector3d& vtDir, const Vector3d& vtMove,
|
||||
double& dTotDist, Vector3d* pvtTriaN = nullptr) const = 0 ;
|
||||
virtual bool TestPositionAdv( const Point3d& ptT, const Vector3d& vtDir, const Vector3d& vtMove,
|
||||
double& dTotDist, VCT3DVECTOR& vVtN) const = 0 ;
|
||||
virtual bool TestSeries( PNTUVECTOR& vPntM, const Vector3d& vtDir, const Vector3d& vtMove, double dProgCoeff = 1) = 0 ;
|
||||
virtual bool TestSeriesAdv( PNTUVVECTVECTOR& vPntM, const Vector3d& vtDir, const Vector3d& vtMove, double dProgCoeff = 1) = 0 ;
|
||||
virtual bool TestPath( PNTULIST& lPntM, const Vector3d& vtDir, const Vector3d& vtMove, double dLinTol, double dProgCoeff = 1) = 0 ;
|
||||
} ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2016-2020
|
||||
// EgalTech 2016-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkCDeBoxClosedSurfTm.h Data : 09.01.20 Versione : 2.2a2
|
||||
// File : EGkCDeBoxClosedSurfTm.h Data : 24.03.24 Versione : 2.6c2
|
||||
// Contenuto : Dichiarazione funzione verifica collisione tra
|
||||
// BoundingBox e Closed SurfTriMesh.
|
||||
//
|
||||
// Modifiche : 05.10.16 DS Creazione modulo.
|
||||
// 09.01.20 DS Cambio nome alla funzione e cambio parametri.
|
||||
// 24.03.24 DS Aggiunta TestBoxSurfTm.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -32,3 +33,8 @@
|
||||
// - false in caso di assenza di collisione.
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool CDeBoxClosedSurfTm( const Frame3d& frBox, const Vector3d& vtDiag, const ISurfTriMesh& Stm, double dSafeDist) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Verifica l'interferenza tra il box e la superficie : restituisce true in caso di interferenza.
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool TestBoxSurfTm( const Frame3d& frBox, const Vector3d& vtDiag, const ISurfTriMesh& Stm, double dSafeDist) ;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2020-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkCDeClosedSurfTmClosedSurfTm.h Data : 15.02.24 Versione : 2.6b2
|
||||
// File : EGkCDeClosedSurfTmClosedSurfTm.h Data : 24.03.24 Versione : 2.6c2
|
||||
// Contenuto : Dichiarazione funzione verifica collisione tra
|
||||
// SurfTm e SurfTm.
|
||||
//
|
||||
// Modifiche : 13.11.20 LM Creazione modulo.
|
||||
//
|
||||
// 24.03.24 DS Aggiunta TestSurfTmSurfTm.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -30,3 +30,9 @@
|
||||
// - false in caso di assenza di collisione.
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool CDeClosedSurfTmClosedSurfTm( const ISurfTriMesh& SurfA, const ISurfTriMesh& SurfB, double dSafeDist) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Verifica l'interferenza tra le due superfici : restituisce true in caso di interferenza.
|
||||
// Se richiesta verifica inclusione se una delle due è chiusa controlla l'inclusione dell'altra.
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool TestSurfTmSurfTm( const ISurfTriMesh& SurfA, const ISurfTriMesh& SurfB, double dSafeDist, bool bTestEnclosion = false) ;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2020-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkCDeConeFrustumClosedSurfTm.h Data : 15.02.24 Versione : 2.6b2
|
||||
// File : EGkCDeConeFrustumClosedSurfTm.h Data : 24.03.24 Versione : 2.6c2
|
||||
// Contenuto : Dichiarazione funzione verifica collisione tra
|
||||
// Cone e Closed SurfTriMesh.
|
||||
//
|
||||
// Modifiche : 09.11.20 LM Creazione modulo.
|
||||
//
|
||||
// 24.03.24 DS Aggiunta TestConeFrustumSurfTm.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -30,4 +30,10 @@
|
||||
// - true in caso di collisione o inconsistenza dei parametri di input
|
||||
// - false in caso di assenza di collisione.
|
||||
EGK_EXPORT bool CDeConeFrustumClosedSurfTm( const Frame3d& frCone, double dBaseRad, double dTopRad, double dHeight,
|
||||
const ISurfTriMesh& Stm, double dSafeDist) ;
|
||||
const ISurfTriMesh& Stm, double dSafeDist) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Verifica l'interferenza tra il tronco di cono e la superficie : restituisce true in caso di interferenza.
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool TestConeFrustumSurfTm( const Frame3d& frCone, double dBaseRad, double dTopRad, double dHeight,
|
||||
const ISurfTriMesh& Stm, double dSafeDist) ;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2020-2020
|
||||
// EgalTech 2020-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkCDeConvexTorusTria.h Data : 18.11.20 Versione :
|
||||
// File : EGkCDeConvexTorusTria.h Data : 24.03.24 Versione : 2.6c2
|
||||
// Contenuto : Dichiarazione funzione verifica collisione tra
|
||||
// toro convesso e SurfTriMesh.
|
||||
//
|
||||
// Modifiche : 18.11.20 LM Creazione modulo.
|
||||
//
|
||||
// 24.03.24 DS Aggiunta TestConvexTorusSurfTm.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -33,3 +33,9 @@
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool CDeConvexTorusClosedSurfTm( const Frame3d& frTorus, double dRad1, double dRad2,
|
||||
const ISurfTriMesh& tmSurf, double dSafeDist) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Verifica l'interferenza tra il toro convesso e la superficie : restituisce true in caso di interferenza
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool TestConvexTorusSurfTm( const Frame3d& frTorus, double dRad1, double dRad2,
|
||||
const ISurfTriMesh& Stm, double dSafeDist) ;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2020-2020
|
||||
// EgalTech 2020-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkCDeCylClosedSurfTm.h Data : 09.01.20 Versione : 2.2a2
|
||||
// File : EGkCDeCylClosedSurfTm.h Data : 24.03.24 Versione : 2.6c2
|
||||
// Contenuto : Dichiarazione funzione verifica collisione tra
|
||||
// Cylinder e Closed SurfTriMesh.
|
||||
//
|
||||
// Modifiche : 09.01.20 DS Creazione modulo.
|
||||
//
|
||||
// 24.03.24 DS Aggiunta TestCylSurfTm.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -31,3 +31,8 @@
|
||||
// - false in caso di assenza di collisione.
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool CDeCylClosedSurfTm( const Frame3d& frCyl, double dR, double dH, const ISurfTriMesh& Stm, double dSafeDist) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Verifica l'interferenza tra il cilindro e la superficie : restituisce true in caso di interferenza.
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool TestCylSurfTm( const Frame3d& frCyl, double dR, double dH, const ISurfTriMesh& Stm, double dSafeDist) ;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2020-2020
|
||||
// EgalTech 2020-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkCDeRectPrismoidClosedSurfTm.h Data : 09.11.20 Versione :
|
||||
// File : EGkCDeRectPrismoidClosedSurfTm.h Data : 24.03.24 Versione : 2.6c2
|
||||
// Contenuto : Dichiarazione funzione verifica collisione tra
|
||||
// prismoide a basi rettangolari e Closed SurfTriMesh.
|
||||
//
|
||||
// Modifiche : 09.11.20 LM Creazione modulo.
|
||||
//
|
||||
// 24.03.24 DS Aggiunta TestRectPrismoidSurfTm.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -32,4 +32,11 @@
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool CDeRectPrismoidClosedSurfTm( const Frame3d& frPrismoid, double dLenghtBaseX, double dLenghtBaseY,
|
||||
double dLenghtTopX, double dLenghtTopY, double dHeight,
|
||||
const ISurfTriMesh& Stm, double dSafeDist) ;
|
||||
const ISurfTriMesh& Stm, double dSafeDist) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Verifica l'interferenza tra il Prismoide a basi rettangolari e la superficie : restituisce true in caso di interferenza.
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool TestRectPrismoidSurfTm( const Frame3d& frPrismoid, double dLenghtBaseX, double dLenghtBaseY,
|
||||
double dLenghtTopX, double dLenghtTopY, double dHeight,
|
||||
const ISurfTriMesh& Stm, double dSafeDist) ;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2020-2020
|
||||
// EgalTech 2020-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkCDeSpheClosedSurfTm.h Data : 09.01.20 Versione : 2.2a2
|
||||
// File : EGkCDeSpheClosedSurfTm.h Data : 24.03.24 Versione : 2.6c2
|
||||
// Contenuto : Dichiarazione funzione verifica collisione tra
|
||||
// Sphere e Closed SurfTriMesh.
|
||||
//
|
||||
// Modifiche : 09.01.20 DS Creazione modulo.
|
||||
//
|
||||
// 24.03.24 DS Aggiunta TestSpheSurfTm.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -28,3 +28,8 @@
|
||||
// - false in caso di assenza di collisione.
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool CDeSpheClosedSurfTm( const Point3d& ptCen, double dR, const ISurfTriMesh& Stm, double dSafeDist) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Verifica l'interferenza tra la sfera e la superficie : restituisce true in caso di interferenza
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool TestSpheSurfTm( const Point3d& ptCen, double dR, const ISurfTriMesh& Stm, double dSafeDist) ;
|
||||
|
||||
+70
-2
@@ -25,7 +25,75 @@
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool CalcPocketing( const ISurfFlatRegion* pSfr, double dRad, double dStep, double dAngle, int nType,
|
||||
bool bSmooth, ICRVCOMPOPOVECTOR& vCrv) ;
|
||||
// Per calcolo percorso di Svuotatura o di Lucidatura
|
||||
EGK_EXPORT bool CalcPocketing( const ISurfFlatRegion* pSfr, double dRad, double dRadialOffs, double dStep,
|
||||
double dAngle, double dOpenMinSafe, int nType, bool bSmooth, bool bCalcUnclReg, bool bInvert, bool bAvoidOpt,
|
||||
bool bConventionalMilling, bool bAllowZigZagOneWayBorders, bool bCalcFeed, const Point3d& ptEndPrec,
|
||||
const ISurfFlatRegion* pSfrLimit, bool bAllOffs, double dMaxOptSize,
|
||||
int nLiType, double dLiTang, double dLiElev, int nLoType, double dLoTang,
|
||||
bool bPolishing, double dEpicyclesRad, double dEpicyclesDist, ICRVCOMPOPOVECTOR& vCrv) ;
|
||||
EGK_EXPORT bool IsPocketingHole( const ISurfFlatRegion* pSfr, double dRad, double dRadialOffs, double dStep, int nType,
|
||||
int nLiType, double dLiTang, double dRatioSfrTool) ;
|
||||
EGK_EXPORT bool CalcSmoothCurve( ICurveComposite* pCrv, double dRightLen, double dLeftLen, bool bAsParam) ;
|
||||
EGK_EXPORT bool CalcZigZagInfill( const ISurfFlatRegion* pSfr, double dStep, bool bSmooth, bool bRemoveOverlapLink,
|
||||
ICRVCOMPOPOVECTOR& vCrvCompoRes) ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Sottotipo di lavorazione
|
||||
enum { POCKET_ZIGZAG = 0,
|
||||
POCKET_ONEWAY = 1,
|
||||
POCKET_SPIRALIN = 2,
|
||||
POCKET_SPIRALOUT = 3,
|
||||
POCKET_CONFORMAL_ZIGZAG = 4,
|
||||
POCKET_CONFORMAL_ONEWAY = 5
|
||||
} ;
|
||||
|
||||
// Definizione di lato aperto e lato chiuso
|
||||
enum {
|
||||
TEMP_PROP_CLOSE_EDGE = 0,
|
||||
TEMP_PROP_OPEN_EDGE = 1,
|
||||
TEMP_PROP_OPEN_EDGE_IN_RAW = 2
|
||||
} ;
|
||||
|
||||
// Definizione di curva invalida
|
||||
enum {
|
||||
TEMP_PROP_INVALID = - 1
|
||||
} ;
|
||||
|
||||
// Definizione curva di raccordo per smussi
|
||||
enum {
|
||||
TEMP_PROP_SMOOTH = - 2
|
||||
} ;
|
||||
|
||||
// Definizione tipo di curva per casi speciali
|
||||
enum {
|
||||
TEMP_PROP_SINGLE_CURVE = - 3,
|
||||
TEMP_PROP_OPT_TRAPEZOID = - 4,
|
||||
TEMP_PROP_BORDER_CURVE = - 5,
|
||||
TEMP_PROP_OPT_CIRCLE = - 9
|
||||
} ;
|
||||
|
||||
// Definizione tipo di curva per entrate da fuori
|
||||
enum {
|
||||
TEMP_PROP_OUT_START = - 6
|
||||
} ;
|
||||
|
||||
// Definizione di curva attiva/non attiva
|
||||
enum {
|
||||
TEMP_PROP_CURVE_ACTIVE = - 7,
|
||||
TEMP_PROP_CURVE_INACTIVE = - 8
|
||||
} ;
|
||||
|
||||
// Definizione tipo LeadIn
|
||||
enum {
|
||||
LEAD_IN_NONE = 0,
|
||||
LEAD_IN_GLIDE = 1,
|
||||
LEAD_IN_ZIGZAG = 2,
|
||||
LEAD_IN_HELIX = 3
|
||||
} ;
|
||||
|
||||
// Definizione tipo LeadOut
|
||||
enum {
|
||||
LEAD_OUT_NONE = 0,
|
||||
LEAD_OUT_GLIDE = 1
|
||||
} ;
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ class __declspec( novtable) ICurve : public IGeoObj
|
||||
virtual bool ApproxWithArcsEx( double dLinTol, double dAngTolDeg, double dLinFea, PolyArc& PA) const = 0 ;
|
||||
virtual ICurve* CopyParamRange( double dUStart, double dUEnd) const = 0 ;
|
||||
virtual bool Invert( void) = 0 ;
|
||||
virtual bool SimpleOffset( double dDist, int nType = OFF_FILLET) = 0 ;
|
||||
virtual bool SimpleOffset( double dDist, int nType = OFF_FILLET, double dMaxAngExt = ANG_RIGHT) = 0 ;
|
||||
virtual bool SetExtrusion( const Vector3d& vtExtr) = 0 ;
|
||||
virtual bool SetThickness( double dThick) = 0 ;
|
||||
virtual bool ModifyStart( const Point3d& ptNewStart) = 0 ;
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ class __declspec( novtable) ICurveArc : public ICurve
|
||||
virtual bool ChangeDeltaN( double dNewDeltaN) = 0 ;
|
||||
virtual bool ChangeAngCenter( double dNewAngCenDeg) = 0 ;
|
||||
virtual bool ChangeStartPoint( double dU) = 0 ;
|
||||
virtual bool ExtendedOffset( double dDist, int nType = OFF_FILLET) = 0 ;
|
||||
virtual bool ExtendedOffset( double dDist) = 0 ;
|
||||
virtual bool ToExplementary( void) = 0 ;
|
||||
virtual bool Flip( void) = 0 ;
|
||||
} ;
|
||||
|
||||
+85
-6
@@ -15,6 +15,10 @@
|
||||
|
||||
#include "/EgtDev/Include/EGkCurveComposite.h"
|
||||
|
||||
class ICurveBezier ;
|
||||
class ICurveLine ;
|
||||
class ICurveArc ;
|
||||
class ICurveComposite ;
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
#undef EGK_EXPORT
|
||||
@@ -41,12 +45,56 @@ struct CNurbsData
|
||||
CNurbsData( void) : nDeg( 0), bRat( false), bPeriodic( false), bClosed( false), bClamped( true), bExtraKnotes(false) {}
|
||||
} ;
|
||||
|
||||
// N.B. : in caso la curva sia razionale i punti di controllo sono in forma NON OMOGENEA [ x, y, z, w] ( dove la forma OMOGENEA è [ w*x, w*y, w*z, w])
|
||||
// N.B. : in caso la curva sia razionale i punti di controllo sono in forma NON OMOGENEA [ x, y, z, w] ( dove la forma OMOGENEA � [ w*x, w*y, w*z, w])
|
||||
// tutte le operazioni richiedono la forma OMOGENEA, finite le quali posso riportarmi alla forma NON OMOGENEA
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Trasforma una curva in una nuova curva di Bezier semplice
|
||||
EGK_EXPORT ICurve* CurveToBezierCurve( const ICurve* pCrv, int nDeg = 3, bool bMakeRatOrNot = false) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Trasforma una linea in una nuova curva di Bezier semplice
|
||||
EGK_EXPORT ICurveBezier* LineToBezierCurve( const ICurveLine* pCrvLine, int nDeg = 3, bool bMakeRatOrNot = false) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Trasforma un arco in una nuova curva di Bezier semplice o composta
|
||||
EGK_EXPORT ICurve* ArcToBezierCurve( const ICurve* pArc) ;
|
||||
EGK_EXPORT ICurve* ArcToBezierCurve( const ICurveArc* pArc, int nDeg = 3, bool bMakeRatOrNot = true) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Trasforma una curva compo in una nuova curva di Bezier semplice o composta
|
||||
EGK_EXPORT ICurve* CompositeToBezierCurve( const ICurveComposite* pCrv, int nDeg = 3, bool bMakeRatOrNot = false) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Trasforma una curva bezier in una nuova curva di Bezier semplice o composta della razionalit� e grado desiderato ( minimo 3)
|
||||
EGK_EXPORT ICurve* EditBezierCurve( const ICurveBezier* pCrv, int nDeg = 3, bool bMakeRatOrNot = false, double dTol = 10 * EPS_SMALL) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Approssima una bezier con una serie di bezier cubiche
|
||||
EGK_EXPORT ICurve* ApproxBezierWithCubics( const ICurve* pCrv, double dTol) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Approssima una bezier con una serie di bezier cubiche
|
||||
EGK_EXPORT ICurveBezier* ApproxArcCurveBezierWithSingleCubic( const ICurve* pCrv, const Point3d& ptCen, const Vector3d& vtN) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Campiona una serie di punti dalla curva e li approssima con una o pi� curve di bezier
|
||||
EGK_EXPORT ICurve* ApproxCurveWithBezier( const ICurve* pCrv, double dTol, const Vector3d& vtStart = V_NULL, const Vector3d& vtEnd = V_NULL) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Interpola un set di punti e li approssima con una o pi� curve di bezier cubiche
|
||||
EGK_EXPORT ICurve* InterpolatePointSetWithBezier( const PNTVECTOR& vPnt, double dLinTol, double dMaxLen) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Aumento il grado della curva di Bezier
|
||||
EGK_EXPORT ICurveBezier* BezierIncreaseDegree( const ICurveBezier* pCrvBezier) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Riduco il grado della curva di Bezier
|
||||
EGK_EXPORT ICurveBezier* BezierDecreaseDegree( const ICurveBezier* pCrvBezier, double dTol) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Misura l'errore di approsimazione tra la curva originale e quella modificata
|
||||
EGK_EXPORT bool CalcApproxError( const ICurve* pCrvOri, const ICurve* pCrvNew, double& dErr, int nPoints = 20) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Trasforma una curva in una nuova curva semplice o composta senza archi (solo linee o curve di Bezier)
|
||||
@@ -80,21 +128,52 @@ EGK_EXPORT ICurve* ProjectCurveOnPlane( const ICurve& crCrv, const Plane3d& plPl
|
||||
EGK_EXPORT bool AdjustCurveSlope( ICurveComposite* pCrv, double dNini, double dNfin) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Calcolo del diagramma di Voronoi della curva, nei TempParam dei risultati la distanza
|
||||
//! Calcolo del diagramma di Voronoi della curva/e, nei TempParam dei risultati la distanza
|
||||
//! Per nBound tenere valore di default.
|
||||
EGK_EXPORT bool CalcCurveVoronoiDiagram( const ICurve& crvC, ICURVEPOVECTOR& vCrvs, int nBound = 3) ;
|
||||
EGK_EXPORT bool CalcCurvesVoronoiDiagram( const CICURVEPVECTOR& vCrvC, ICURVEPOVECTOR& vCrvs, int nBound = 3) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Calcolo del Medial Axis della curva (sottoinsieme del diagramma di Voronoi), nei TempParam dei risultati la distanza
|
||||
//! Calcolo del Medial Axis della curva/e (sottoinsieme del diagramma di Voronoi), nei TempParam dei risultati la distanza
|
||||
const int WMAT_BOTHSIDES = 0 ;
|
||||
const int WMAT_LEFT = 1 ;
|
||||
const int WMAT_RIGHT = 2 ;
|
||||
EGK_EXPORT bool CalcCurveMedialAxis( const ICurve& crvC, ICURVEPOVECTOR& vCrvs, int nSide) ;
|
||||
EGK_EXPORT bool CalcCurvesMedialAxis( const CICURVEPVECTOR& vCrvC, ICURVEPOVECTOR& vCrvs, int nSide) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Calcola l'offset completo di una curva
|
||||
EGK_EXPORT bool CalcCurveFatCurve( const ICurve& crvC, ICURVEPOVECTOR& vCrvs, double dRadius, bool bSquareEnds, bool bSquareMids) ;
|
||||
EGK_EXPORT bool CalcCurveFatCurve( const ICurve& crvC, ICURVEPOVECTOR& vCrvs, double dRadius, bool bSquareEnds, bool bSquareMids,
|
||||
bool bMergeOnlySameProps = true) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Calcola, nel caso di curve chiuse, il valore limite di offset ( in valore assoluto) che fa sparire la curva
|
||||
EGK_EXPORT bool CalcCurveLimitOffset( const ICurve& crvC, double& dOffs) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Calcola, se possibile, le curve di offset del valore richiesto come curve singole
|
||||
EGK_EXPORT bool CalcCurveSingleCurvesOffset( const ICurve& crvC, ICURVEPOVECTOR& vCrvs, double dOffs) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Calcola, se possibile, le curve di offset dato un vettore di curve aperte/chiuse
|
||||
EGK_EXPORT bool CalcOffsetCurves( const ICURVEPVECTOR& vpCrvs, ICURVEPOVECTOR& vCrvs, double dOffs,
|
||||
int nType = ICurve::OFF_FILLET) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Calcola, se possibile, le fat curve di offset dato un vettore di curve aperte/chiuse
|
||||
EGK_EXPORT bool CalcFatOffsetCurves( const ICURVEPVECTOR& vpCrvs, ICURVEPOVECTOR& vCrvs, double dOffs,
|
||||
bool bSquareEnds, bool bSquareMids,
|
||||
bool bMergeOnlySameProps = true) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Resetta l'oggetto voronoi associato alla curva liberandone la memoria
|
||||
EGK_EXPORT void ResetCurveVoronoi( const ICurve& crvC) ;
|
||||
EGK_EXPORT void ResetCurveVoronoi( const ICurve& crvC) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! fa il join delle curve passate in input
|
||||
EGK_EXPORT bool GetChainedCurves( ICRVCOMPOPOVECTOR& vCrv, double dChainTol = 5 * EPS_SMALL, bool bAllowInvert = false) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! dato un punto su una curva trova il corrispondente sulla seconda curva
|
||||
EGK_EXPORT bool GetIsoPointOnSecondCurve( const ICurve* pCrv1, const ICurve* pCrv2, double dUCurr1, double& dUCurr2, double dMyDist, double dUPrev2,
|
||||
double dLenPrev2, double& dLenCurr2, double dLen2) ;
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "/EgtDev/Include/EGkCurve.h"
|
||||
|
||||
class ICurveArc ;
|
||||
class ICurveLine ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class __declspec( novtable) ICurveBezier : public ICurve
|
||||
@@ -27,7 +28,9 @@ class __declspec( novtable) ICurveBezier : public ICurve
|
||||
virtual bool Init( int nDeg, bool bIsRational) = 0 ;
|
||||
virtual bool SetControlPoint( int nInd, const Point3d& ptCtrl) = 0 ;
|
||||
virtual bool SetControlPoint( int nInd, const Point3d& ptCtrl, double dW) = 0 ;
|
||||
virtual bool SetControlWeight( int nInd, double dW) = 0 ;
|
||||
virtual bool FromArc( const ICurveArc& crArc) = 0 ;
|
||||
virtual bool FromLine( const ICurveLine& crLine) = 0 ;
|
||||
virtual int GetDegree( void) const = 0 ;
|
||||
virtual bool IsRational( void) const = 0 ;
|
||||
virtual bool IsAPoint( void) const = 0 ;
|
||||
@@ -35,6 +38,10 @@ class __declspec( novtable) ICurveBezier : public ICurve
|
||||
virtual double GetControlWeight( int nInd, bool* pbOk = NULL) const = 0 ;
|
||||
virtual bool GetControlPolygonLength( double& dLen) const = 0 ;
|
||||
virtual int GetSingularParam( double& dPar) const = 0 ;
|
||||
virtual bool MakeRational( void) = 0 ;
|
||||
virtual bool MakeRationalStandardForm( void) = 0 ;
|
||||
virtual bool MakeNonRational( double dTol) = 0 ;
|
||||
virtual bool IsALine( void) const = 0 ;
|
||||
} ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ class CurveByInterp
|
||||
|
||||
public :
|
||||
enum METHOD { BESSEL = 1, AKIMA = 2, AKIMA_CORNER = 3} ;
|
||||
enum TYPE { BIARCS = 1, CUBIC_BEZIERS = 2} ;
|
||||
enum TYPE { BIARCS = 1, CUBIC_BEZIERS = 2, CUBIC_BEZIERS_LONG = 3} ;
|
||||
|
||||
private :
|
||||
bool CalcAkimaTangents( bool bDetectCorner) ;
|
||||
|
||||
+14
-5
@@ -50,6 +50,7 @@ class __declspec( novtable) ICurveComposite : public ICurve
|
||||
virtual bool AddArcTg( const Point3d& ptNew, bool bEndOrStart = true) = 0 ;
|
||||
virtual bool AddJoint( double dU) = 0 ;
|
||||
virtual bool ModifyJoint( int nU, const Point3d& ptNewJoint) = 0 ;
|
||||
virtual bool ModifyJoint( int nU, const Point3d& ptNewJoint, double dTol) = 0 ;
|
||||
virtual bool RemoveJoint( int nU) = 0 ;
|
||||
virtual bool MoveCurve( int nCrv, const Vector3d& vtMove) = 0 ;
|
||||
virtual bool ModifyCurveToArc( int nCrv, const Point3d& ptMid) = 0 ;
|
||||
@@ -70,8 +71,8 @@ class __declspec( novtable) ICurveComposite : public ICurve
|
||||
virtual bool GetCurveTempProp( int nCrv, int& nProp, int nPropInd = 0) const = 0 ;
|
||||
virtual bool SetCurveTempParam( int nCrv, double dParam, int nParamInd = 0) = 0 ;
|
||||
virtual bool GetCurveTempParam( int nCrv, double& dParam, int nParamInd = 0) const = 0 ;
|
||||
virtual bool FromPoint( Point3d& ptStart) = 0 ;
|
||||
virtual bool GetOnlyPoint( Point3d& ptStart) const = 0 ;
|
||||
virtual bool ReplaceSingleCurve( int nSubCrv, ICurve* pNewCurve, double dTolStartEnd, double dTolAlong = INFINITO) = 0 ;
|
||||
} ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -94,10 +95,16 @@ inline ICurveComposite* ConvertCurveToComposite( IGeoObj* pGObj)
|
||||
delete pGObj ;
|
||||
return nullptr ;
|
||||
}
|
||||
ICurveComposite* pCrvCo = CreateCurveComposite() ;
|
||||
if ( pCrvCo == nullptr) {
|
||||
delete pGObj ;
|
||||
return nullptr ;
|
||||
ICurveComposite* pCrvCo = GetCurveComposite( pGObj) ;
|
||||
if ( pCrvCo != nullptr) {
|
||||
return pCrvCo ;
|
||||
}
|
||||
else {
|
||||
pCrvCo = CreateCurveComposite() ;
|
||||
if ( pCrvCo == nullptr) {
|
||||
delete pGObj ;
|
||||
return nullptr ;
|
||||
}
|
||||
}
|
||||
ICurve* pCrv = static_cast<ICurve*>( pGObj) ;
|
||||
Vector3d vtExtr ;
|
||||
@@ -110,6 +117,8 @@ inline ICurveComposite* ConvertCurveToComposite( IGeoObj* pGObj)
|
||||
int nProp = pCrv->GetTempProp( i) ;
|
||||
if ( nProp != 0)
|
||||
pCrvCo->SetTempProp( nProp, i) ;
|
||||
double dParam = pCrv->GetTempParam( i) ;
|
||||
pCrvCo->SetTempParam( dParam, i) ;
|
||||
}
|
||||
pCrvCo->AddCurve( pCrv) ;
|
||||
return pCrvCo ;
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ class CurveLocal
|
||||
CurveLocal( IGeomDB* pGeomDB, int nCrvId, const Frame3d& frLoc)
|
||||
: m_pCrv( nullptr), m_pCopy( nullptr)
|
||||
{ // verifica dei parametri
|
||||
if ( pGeomDB == nullptr || &frLoc == nullptr)
|
||||
if ( pGeomDB == nullptr)
|
||||
return ;
|
||||
// recupero riferimento della curva
|
||||
Frame3d frCrv ;
|
||||
@@ -76,7 +76,7 @@ class CurveLocal
|
||||
return ;
|
||||
m_pCrv = m_pCopy ;
|
||||
}
|
||||
CurveLocal( CurveLocal&& Other)
|
||||
CurveLocal( CurveLocal&& Other) noexcept
|
||||
: m_pCrv( Other.m_pCrv), m_pCopy( Other.m_pCopy)
|
||||
{ // annullo gli originali
|
||||
Other.m_pCrv = nullptr ;
|
||||
|
||||
@@ -40,7 +40,8 @@ class CrvPointDiffGeom
|
||||
double dCurv ;
|
||||
|
||||
public :
|
||||
CrvPointDiffGeom( void) { nStatus = NONE ; nFlag = STD ; }
|
||||
CrvPointDiffGeom( void)
|
||||
: nStatus( NONE), nFlag( STD), dU( -1), dCurv( -1) {}
|
||||
} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2020-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkDistLineLine.h Data : 10.05.24 Versione : 2.6e31
|
||||
// Contenuto : Dichiarazione della classe distanza fra elementi lineari.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 06.11.20 LM Creazione modulo.
|
||||
// 10.05.24 DS Portata in Include.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkPoint3d.h"
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
#undef EGK_EXPORT
|
||||
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
||||
#define EGK_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define EGK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class DistLineLine
|
||||
{
|
||||
public :
|
||||
EGK_EXPORT DistLineLine( const Point3d& ptSt1, const Point3d& ptEn1,
|
||||
const Point3d& ptSt2, const Point3d& ptEn2,
|
||||
bool bIsSegment1 = true, bool bIsSegment2 = true) ;
|
||||
EGK_EXPORT DistLineLine( const Point3d& ptSt1, const Vector3d& vtD1, double dLen1,
|
||||
const Point3d& ptSt2, const Vector3d& vtD2, double dLen2,
|
||||
bool bIsSegment1 = true, bool bIsSegment2 = true) ;
|
||||
|
||||
public :
|
||||
EGK_EXPORT bool GetSqDist( double& dSqDist) const ;
|
||||
EGK_EXPORT bool GetDist( double& dDist) const ;
|
||||
EGK_EXPORT bool IsEpsilon( double dTol) const
|
||||
{ double dSqDist ; return ( GetSqDist( dSqDist) && ( dSqDist < SQ_EPS_ZERO || dSqDist < dTol * dTol)) ; }
|
||||
EGK_EXPORT bool IsSmall( void) const
|
||||
{ return IsEpsilon( EPS_SMALL) ; }
|
||||
EGK_EXPORT bool IsZero( void) const
|
||||
{ return IsEpsilon( EPS_ZERO) ; }
|
||||
EGK_EXPORT bool GetMinDistPoints( Point3d& ptMinDist1, Point3d& ptMinDist2) const ;
|
||||
EGK_EXPORT bool GetPositionsAtMinDistPoints( double& dPos1, double& dPos2) const ;
|
||||
|
||||
private :
|
||||
void Calculate( const Point3d& ptSt1, const Vector3d& vtD1, double dLen1,
|
||||
const Point3d& ptSt2, const Vector3d& vtD2, double dLen2,
|
||||
bool bIsSegment1, bool bIsSegment2) ;
|
||||
private:
|
||||
double m_dSqDist ;
|
||||
mutable double m_dDist ;
|
||||
double m_dPos1 ;
|
||||
double m_dPos2 ;
|
||||
Point3d m_ptMinDist1 ;
|
||||
Point3d m_ptMinDist2 ;
|
||||
} ;
|
||||
+4
-5
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2013-2014
|
||||
// EgalTech 2013-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkDistPointCurve.h Data : 02.01.14 Versione : 1.5a1
|
||||
// File : EGkDistPointCurve.h Data : 20.05.24 Versione : 2.6e5
|
||||
// Contenuto : Dichiarazione della classe distanza punto da Curva.
|
||||
//
|
||||
//
|
||||
@@ -63,12 +63,11 @@ class DistPointCurve
|
||||
EGK_EXPORT bool GetMinDistPoint( double dNearParam, Point3d& ptMinDist, int& nFlag) const ;
|
||||
EGK_EXPORT bool GetParamAtMinDistPoint( int nInd, double& dParam, int& nFlag) const ;
|
||||
EGK_EXPORT bool GetParamAtMinDistPoint( double dNearParam, double& dParam, int& nFlag) const ;
|
||||
EGK_EXPORT bool GetSideAtMinDistPoint( int nInd, const Vector3d& vtN, int& nSide) const ;
|
||||
EGK_EXPORT bool GetSideAtMinDistPoint( double dNearParam, const Vector3d& vtN, int& nSide) const ;
|
||||
EGK_EXPORT bool GetSideAtMinDistPoint( int nInd, const Vector3d& vtN, int& nSide, double dTol = EPS_SMALL) const ;
|
||||
EGK_EXPORT bool GetSideAtMinDistPoint( double dNearParam, const Vector3d& vtN, int& nSide, double dTol = EPS_SMALL) const ;
|
||||
EGK_EXPORT bool GetMinDistInfo( int nInd, MinDistPCInfo& aInfo) const ;
|
||||
|
||||
private :
|
||||
DistPointCurve( void) ;
|
||||
void LineCalculate( const Point3d& ptP, const ICurve& Curve, bool bIsSegment) ;
|
||||
void ArcCalculate( const Point3d& ptP, const ICurve& Curve) ;
|
||||
void CrvBezierCalculate( const Point3d& ptP, const ICurve& Curve) ;
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2013-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkDistPointLine.h Data : 20.05.24 Versione : 2.6e5
|
||||
// Contenuto : Dichiarazione della classe distanza punto da linea/segmento.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 30.12.12 DS Creazione modulo.
|
||||
// 20.05.24 DS Pubblicato in Include.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkPoint3d.h"
|
||||
#include "/EgtDev/Include/EGkCurveLine.h"
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
#undef EGK_EXPORT
|
||||
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
||||
#define EGK_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define EGK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
class DistPointLine
|
||||
{
|
||||
friend class DistPointCurve ;
|
||||
|
||||
public :
|
||||
EGK_EXPORT DistPointLine( const Point3d& ptP,
|
||||
const ICurveLine& crvLine, bool bIsSegment = true) ;
|
||||
EGK_EXPORT DistPointLine( const Point3d& ptP,
|
||||
const Point3d& ptIni, const Point3d& ptFin, bool bIsSegment = true) ;
|
||||
EGK_EXPORT DistPointLine( const Point3d& ptP,
|
||||
const Point3d& ptIni, const Vector3d& vtDir, double dLen, bool bIsSegment = true) ;
|
||||
|
||||
public :
|
||||
EGK_EXPORT bool GetSqDist( double& dSqDist) const ;
|
||||
EGK_EXPORT bool GetDist( double& dDist) const ;
|
||||
EGK_EXPORT bool IsEpsilon( double dTol) const
|
||||
{ double dSqDist ; return ( GetSqDist( dSqDist) && ( dSqDist < SQ_EPS_ZERO || dSqDist < dTol * dTol)) ; }
|
||||
EGK_EXPORT bool IsSmall( void) const
|
||||
{ return IsEpsilon( EPS_SMALL) ; }
|
||||
EGK_EXPORT bool IsZero( void) const
|
||||
{ return IsEpsilon( EPS_ZERO) ; }
|
||||
EGK_EXPORT int GetNbrMinDist( void) const
|
||||
{ return (( m_dSqDist < 0) ? 0 : 1) ; }
|
||||
EGK_EXPORT bool GetMinDistPoint( Point3d& ptMinDist) const ;
|
||||
EGK_EXPORT bool GetParamAtMinDistPoint( double& dParam) const ;
|
||||
|
||||
private :
|
||||
void Calculate( const Point3d& ptP,
|
||||
const Point3d& ptIni, const Vector3d& vtDir, double dLen, bool bIsSegment) ;
|
||||
|
||||
private :
|
||||
double m_dSqDist ;
|
||||
mutable double m_dDist ;
|
||||
double m_dParam ;
|
||||
Point3d m_ptMinDist ;
|
||||
} ;
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2018-2023
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EgkDistPointSurfBz.cpp Data : 29.10.25 Versione : 2.7j3
|
||||
// Contenuto : Dichiarazione della classe distanza Punto da superficie di Bezier.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 29.10.25 DB Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkSurfBezier.h"
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
#undef EGK_EXPORT
|
||||
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
||||
#define EGK_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define EGK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Calcola la distanza tra punto e superficie bezier.
|
||||
// Risultati :
|
||||
// - distanza
|
||||
// - punto sulla superficie a minima distanza
|
||||
// - corrispettivo punto nello spazio parametrico
|
||||
// - normale alla superficie in quel punto
|
||||
// - indicazione se il punto di riferimento è dalla parte interna o esterna della superficie ( se chiusa ).
|
||||
// - indicazione se il punto di riferimento è a destra o sinistra della superficie ( se aperta )
|
||||
//----------------------------------------------------------------------------
|
||||
class DistPointSurfBz
|
||||
{
|
||||
public :
|
||||
EGK_EXPORT DistPointSurfBz( const Point3d& ptP, const ISurfBezier& srfBz) ;
|
||||
|
||||
public :
|
||||
EGK_EXPORT bool GetDist( double& dDist) const ;
|
||||
EGK_EXPORT bool IsEpsilon( double dTol) const
|
||||
{ return ( m_dDist >= 0. && ( m_dDist < EPS_ZERO || m_dDist < dTol)) ; }
|
||||
EGK_EXPORT bool IsSmall( void) const
|
||||
{ return IsEpsilon( EPS_SMALL) ; }
|
||||
EGK_EXPORT bool IsZero( void) const
|
||||
{ return IsEpsilon( EPS_ZERO) ; }
|
||||
EGK_EXPORT bool GetMinDistPoint( Point3d& ptMinDistPoint) const ;
|
||||
EGK_EXPORT bool GetParamsAtMinDistPoint( double& dU, double& dV) const ;
|
||||
EGK_EXPORT bool GetNorm( Vector3d& vtN) const ;
|
||||
EGK_EXPORT bool IsPointInside( void) const
|
||||
{ return ( m_bIsInside && m_bIsSurfClosed) ; }
|
||||
EGK_EXPORT bool IsPointOnLeftSide( void) const
|
||||
{ return m_bIsInside ;}
|
||||
|
||||
private :
|
||||
void Calculate( const Point3d& ptP, const ISurfBezier& srfBz) ;
|
||||
|
||||
private :
|
||||
double m_dDist ; // Minima distanza del punto dalla superficie
|
||||
Point3d m_ptMinDistPoint ; // Punto sulla superficie a minima distanza
|
||||
Point3d m_ptParam ; // punto corrispondente nello spazio parametrico (x->U, y->V)
|
||||
Vector3d m_vtN ; // normale alla superficie nel punto a minima distanza
|
||||
bool m_bIsInside ; // Flag per punto interno o esterno alla superficie ( se chiusa )
|
||||
bool m_bIsSurfClosed ; // Flag per superficie aperta o chiusa
|
||||
} ;
|
||||
@@ -0,0 +1,72 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2024-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkDistPointSurfFr.h Data : 18.07.24 Versione : 2.6g5
|
||||
// Contenuto : Dichiarazione della classe distanza Punto da FlatRegion.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 18.07.24 DS Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkSurfFlatRegion.h"
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
#undef EGK_EXPORT
|
||||
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
||||
#define EGK_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define EGK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Calcola la distanza tra punto e Flat Region.
|
||||
// Risultati :
|
||||
// - distanza
|
||||
// - punto sulla superficie a minima distanza
|
||||
// - indici del chunk e del loop e parametro del punto di frontiera a minima distanza
|
||||
// - indicazione se il punto passato è sul bordo (PRS_ON), interno (PRS_IN) o esterno (PRS_OUT) alla regione.
|
||||
// Note :
|
||||
// - nel caso di più punti di frontiera vicini, ne viene calcolato solo uno
|
||||
// - se il punto non giace nel piano della Regione
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
enum PrSide { PRS_IN = -1, PRS_ON = 0, PRS_OUT = +1} ;
|
||||
// Corrispondono a MDS_LEFT, MDS_ON e MDS_RIGHT per giacitura punto rispetto a curva.
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class DistPointSurfFr
|
||||
{
|
||||
public :
|
||||
EGK_EXPORT DistPointSurfFr( const Point3d& ptP, const ISurfFlatRegion& frSurf) ;
|
||||
|
||||
public :
|
||||
EGK_EXPORT bool GetDist( double& dDist) const ;
|
||||
EGK_EXPORT bool GetDistOnRegionPlane( double& dDist) const ;
|
||||
EGK_EXPORT bool GetPointAtMinDist( Point3d& ptMinDistPoint) const ;
|
||||
EGK_EXPORT bool GetParamAtMinDist( int& nMinChunk, int& nMinLoop, double& dMinPar) const ;
|
||||
EGK_EXPORT bool GetSideAtMinDist( int& nSide) const ;
|
||||
|
||||
private :
|
||||
void Calculate( const Point3d& ptP, const ISurfFlatRegion& frSurf) ;
|
||||
|
||||
private :
|
||||
double m_dDist ;
|
||||
double m_dDistOnPlane ;
|
||||
int m_nMinChunk ;
|
||||
int m_nMinLoop ;
|
||||
double m_dMinPar ;
|
||||
Point3d m_ptMinDistPoint ;
|
||||
int m_nSide ;
|
||||
} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Verifica velocizzata
|
||||
EGK_EXPORT bool IsPointInsideSurfFr( const Point3d& ptP, const ISurfFlatRegion* pSfr, double dMinDist, bool& bInside, int& nChunk) ;
|
||||
inline bool IsPointInsideSurfFr( const Point3d& ptP, const ISurfFlatRegion* pSfr, double dMinDist, bool& bInside)
|
||||
{ int nChunk ; return IsPointInsideSurfFr( ptP, pSfr, dMinDist, bInside, nChunk) ;}
|
||||
+12
-6
@@ -29,7 +29,8 @@
|
||||
// - distanza
|
||||
// - punto sulla superficie a minima distanza
|
||||
// - indice del triangolo su cui giace il punto
|
||||
// - indicazione se il punto di riferimento è dalla parte interna o esterna della superficie.
|
||||
// - indicazione se il punto di riferimento è dalla parte interna o esterna della superficie ( se chiusa ).
|
||||
// - indicazione se il punto di riferimento è a destra o sinistra della superficie ( se aperta )
|
||||
//----------------------------------------------------------------------------
|
||||
class DistPointSurfTm
|
||||
{
|
||||
@@ -46,17 +47,22 @@ class DistPointSurfTm
|
||||
{ return IsEpsilon( EPS_ZERO) ; }
|
||||
EGK_EXPORT bool GetMinDistPoint( Point3d& ptMinDistPoint) const ;
|
||||
EGK_EXPORT bool GetMinDistTriaIndex( int& nMinDistTriaIndex) const ;
|
||||
EGK_EXPORT bool GetMinDistTriaIndices( INTVECTOR& vMinDistTriaIndex) const ;
|
||||
EGK_EXPORT bool IsPointInside( void) const
|
||||
{ return m_bIsInside ; }
|
||||
{ return ( m_bIsInside && m_bIsSurfClosed) ; }
|
||||
EGK_EXPORT bool IsPointOnLeftSide( void) const
|
||||
{ return m_bIsInside ;}
|
||||
|
||||
private :
|
||||
void Calculate( const Point3d& ptP, const ISurfTriMesh& tmSurf) ;
|
||||
|
||||
private :
|
||||
double m_dDist ;
|
||||
Point3d m_ptMinDistPoint ;
|
||||
int m_nMinDistTriaIndex ;
|
||||
bool m_bIsInside ;
|
||||
double m_dDist ; // Minima distanza del punto dalla superficie
|
||||
Point3d m_ptMinDistPoint ; // Punto sulla superficie a minima distanza
|
||||
int m_nMinDistTriaIndex ; // Triangolo utilizzato per calcolare il punto a minima distanza
|
||||
INTVECTOR m_vnMinDistTriaIndex ; // Indici dei triangoli a minima distanza
|
||||
bool m_bIsInside ; // Flag per punto interno o esterno alla superficie ( se chiusa )
|
||||
bool m_bIsSurfClosed ; // Flag per superficie aperta o chiusa
|
||||
} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
+6
-3
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2014-2020
|
||||
// EgalTech 2014-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkDllMain.h Data : 19.09.20 Versione : 2.2i2
|
||||
// File : EGkDllMain.h Data : 11.09.25 Versione : 2.7i2
|
||||
// Contenuto : Prototipi funzioni generali della DLL.
|
||||
//
|
||||
//
|
||||
@@ -9,6 +9,7 @@
|
||||
// Modifiche : 21.11.13 DS Creazione modulo.
|
||||
// 13.01.15 DS Agg. funzioni Get sui font.
|
||||
// 19.09.20 DS Agg. funzione SetEGkDebugLev.
|
||||
// 11.09.25 DS Agg. funzione SetDefaultFont.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -42,9 +43,11 @@ EGK_EXPORT void SetEGkKeyType( int nType) ;
|
||||
EGK_EXPORT void SetEGkNetHwKey( bool bNetHwKey) ;
|
||||
// permette di inizializzare il font manager
|
||||
EGK_EXPORT void InitFontManager( const std::string& sNfeFontDir, const std::string& sDefaultFont) ;
|
||||
// imposta il font di default
|
||||
EGK_EXPORT void SetDefaultFont( const std::string& sDefaultFont) ;
|
||||
// restituisce il direttorio dei font proprietari (Nfe)
|
||||
EGK_EXPORT const std::string& GetNfeFontDir( void) ;
|
||||
// restituisce il nome del font di default
|
||||
EGK_EXPORT const std::string& GetDefaultFont( void) ;
|
||||
// imposto il gestore eventi
|
||||
EGK_EXPORT bool SetEGkProcessEvents( pfProcEvents pFun) ;
|
||||
EGK_EXPORT bool SetEGkProcessEvents( psfProcEvents pFun) ;
|
||||
|
||||
@@ -58,6 +58,7 @@ class __declspec( novtable) IExtDimension : public IGeoObj
|
||||
virtual double GetTextHeight( void) const = 0 ;
|
||||
virtual bool GetMidPoint( Point3d& ptMid) const = 0 ;
|
||||
virtual bool GetCenterPoint( Point3d& ptCen) const = 0 ;
|
||||
virtual const std::string& GetSubType( void) const = 0 ;
|
||||
virtual bool ApproxWithLines( double dLinTol, double dAngTolDeg, POLYLINELIST& lstPL) const = 0 ;
|
||||
} ;
|
||||
|
||||
|
||||
+12
-1
@@ -116,11 +116,22 @@ operator/( const Frame3d& frRef, const Frame3d& frDest)
|
||||
return frNew ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Restituisce il frame inverso di quello passato
|
||||
//----------------------------------------------------------------------------
|
||||
inline const Frame3d
|
||||
GetInvert( const Frame3d& frRef)
|
||||
{
|
||||
Frame3d frNew = GLOB_FRM ;
|
||||
frNew.ToLoc( frRef) ;
|
||||
return frNew ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Restituisce una copia in locale del frame passato
|
||||
//----------------------------------------------------------------------------
|
||||
inline const Frame3d
|
||||
GetToLoc ( const Frame3d& frRef, const Frame3d& frDest)
|
||||
GetToLoc( const Frame3d& frRef, const Frame3d& frDest)
|
||||
{
|
||||
Frame3d frNew = frRef ;
|
||||
frNew.ToLoc( frDest) ;
|
||||
|
||||
+4
-2
@@ -34,7 +34,8 @@ enum GdbInsPos { GDB_FIRST_SON = 0,
|
||||
//----------------- Costanti tipo salvataggio del DB geometrico ----------------
|
||||
enum GdbSave { GDB_SV_TXT = 0,
|
||||
GDB_SV_BIN = 1,
|
||||
GDB_SV_CMPTXT = 2} ;
|
||||
GDB_SV_CMPTXT = 2,
|
||||
GDB_SV_CMPBIN = 3} ;
|
||||
|
||||
//----------------- Costanti tipo oggetti del DB geometrico --------------------
|
||||
enum GdbType { GDB_TY_NONE = 0,
|
||||
@@ -58,7 +59,8 @@ enum GdbStatus { GDB_ST_OFF = 0,
|
||||
|
||||
//----------------- Costanti marcatura oggetti del DB geometrico ---------------
|
||||
enum GdbMark { GDB_MK_OFF = 0,
|
||||
GDB_MK_ON = 1} ;
|
||||
GDB_MK_ON = 1,
|
||||
GDB_MK_ON_2 = 2} ;
|
||||
|
||||
//----------------- Costante per numero proprietà temporanee -------------------
|
||||
const int GDB_NUM_TEMP_PROP = 2 ;
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ CalcMark( int nObjMark, int nParentMark)
|
||||
if ( nObjMark == GDB_MK_OFF && nParentMark == GDB_MK_OFF)
|
||||
return GDB_MK_OFF ;
|
||||
|
||||
return GDB_MK_ON ;
|
||||
return ( nParentMark != GDB_MK_OFF ? nParentMark : nObjMark) ;
|
||||
}
|
||||
// ovviamente la marcatura si combina con lo stato, nel senso che un oggetto
|
||||
// non visibile non viene nemmeno marcato
|
||||
+1
-1
@@ -104,7 +104,7 @@ class __declspec( novtable) IGdbIterator
|
||||
virtual bool RevertStatus( void) = 0 ;
|
||||
virtual bool GetStatus( int& nStat) const = 0 ;
|
||||
virtual bool GetCalcStatus( int& nStat) const = 0 ;
|
||||
virtual bool SetMark( void) = 0 ;
|
||||
virtual bool SetMark( int nMark = GDB_MK_ON) = 0 ;
|
||||
virtual bool ResetMark( void) = 0 ;
|
||||
virtual bool GetMark( int& nMark) const = 0 ;
|
||||
virtual bool GetCalcMark( int& nMark) const = 0 ;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#include "/EgtDev/Include/EGkPoint3d.h"
|
||||
#include "/EgtDev/Include/EGkBBox3d.h"
|
||||
#include "/EgtDev/Include/EGkFrame3d.h"
|
||||
#include "/EgtDev/Include/EGkCurvePointDiffGeom.h"
|
||||
#include "/EgtDev/Include/EgtNumCollection.h"
|
||||
|
||||
@@ -52,6 +53,12 @@ typedef std::list<CrvPointDiffGeom> CPDGLIST ; // lista di CrvPointDiffGe
|
||||
typedef std::vector<Vector3d> VCT3DVECTOR ; // vettore di vettori 3d
|
||||
typedef std::list<Vector3d> VCT3DLIST ; // lista di vettori 3d
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Raccolte di Frame3d
|
||||
typedef std::vector<Frame3d> FRAME3DVECTOR ; // vettore di riferimenti 3d
|
||||
typedef std::list<Frame3d> FRAME3DLIST ; // lista di riferimenti 3d
|
||||
typedef std::vector<std::pair<Frame3d,int>> FRAME3DIVECTOR ; // vettore di riferimenti 3d e Id
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Raccolte di BBox3d
|
||||
typedef std::vector<BBox3d> BOXVECTOR ; // vettore di bounding box 3d
|
||||
@@ -63,3 +70,15 @@ typedef std::vector<std::pair<BBox3d,int>> BOXIVECTOR ; // vettore di boundin
|
||||
typedef std::pair<Point3d,Vector3d> PNTVECT ; // coppia punto, vettore
|
||||
typedef std::vector<PNTVECT> PNTVECTVECTOR ; // vettore di coppie punto, vettore
|
||||
typedef std::list<PNTVECT> PNTVECTLIST ; // lista di coppie punto, vettore
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Raccolte di coppie Point3d,Bool
|
||||
typedef std::pair<Point3d, bool> PNTBOOL ; // coppia punto, bool
|
||||
typedef std::vector<PNTBOOL> PNTBOOLVECTOR ; // vettore di coppie punto, bool
|
||||
typedef std::list<PNTBOOL> PNTBOOLLIST ; // lista di coppie punto, bool
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Raccolte di triplette Point3d,dU,vector<Vector3d>
|
||||
typedef std::tuple<Point3d, double, VCT3DVECTOR> PNTUVVECT ; // tripletta punto, parametro, vettore di Vector3d
|
||||
typedef std::vector<PNTUVVECT> PNTUVVECTVECTOR ; // vettore di triplette punto, parametro, vettore di Vector3d
|
||||
typedef std::list<PNTUVVECT> PNTUVVECTLIST ; // lista di triplette punto, parametro, vettore di Vector3d
|
||||
|
||||
+6
-2
@@ -1,13 +1,14 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2013-2019
|
||||
// EgalTech 2013-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkGeoConst.h Data : 23.11.19 Versione : 2.1k5
|
||||
// File : EGkGeoConst.h Data : 22.11.25 Versione : 2.7k4
|
||||
// Contenuto : Costanti generali per calcoli geometrici.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 04.01.12 DS Creazione modulo.
|
||||
// 23.11.19 DS Aggiunta costante EPS_TRIA_H.
|
||||
// 22.11.25 DS Aggiunta costante PREC_SCALE_COEFF.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -59,3 +60,6 @@ const double SQRT2 = 1.41421356237309504880 ;
|
||||
const double SQRT1_2 = 1 / SQRT2 ;
|
||||
const double SQRT3 = 1.73205080756887729353 ;
|
||||
const double SQRT1_3 = 1 / SQRT3 ;
|
||||
|
||||
// coefficiente di scalatura per aumentare precisione dei calcoli
|
||||
const double PREC_SCALE_COEFF = 1024 ;
|
||||
|
||||
+180
-2
@@ -15,13 +15,14 @@
|
||||
|
||||
#include "/EgtDev/Include/EGkGeomDB.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
#include "/EgtDev/Include/EGkSurfFlatRegion.h"
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
SaveGeoObj( IGeoObj* pGObj, const std::string& sFile, int nFlag = GDB_SV_BIN)
|
||||
{
|
||||
// verifico validità oggetto
|
||||
// verifico validità oggetto
|
||||
if ( pGObj == nullptr || ! pGObj->IsValid())
|
||||
return false ;
|
||||
// creo GeomDB temporaneo
|
||||
@@ -47,7 +48,7 @@ bool
|
||||
SaveGeoObj( std::vector<IGeoObj*> vpGObj, const std::string& sFile, int nFlag = GDB_SV_BIN)
|
||||
{
|
||||
for ( int i = 0 ; i < int( vpGObj.size()); ++i) {
|
||||
// verifico validità oggetto
|
||||
// verifico validità oggetto
|
||||
if ( vpGObj[i] == nullptr || ! vpGObj[i]->IsValid() )
|
||||
return false ;
|
||||
}
|
||||
@@ -74,5 +75,182 @@ SaveGeoObj( std::vector<IGeoObj*> vpGObj, const std::string& sFile, int nFlag =
|
||||
for ( int i = 0 ; i < int( vIds.size()); ++i)
|
||||
bOk = ( pGeomDB->RemoveGeoObjAndErase( vIds[i]) != nullptr ) && bOk ;
|
||||
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
SaveGeoObj( std::vector<std::vector<IGeoObj*>> vvpGObj, std::vector<Color> vCol,
|
||||
const std::string& sFile, int nFlag = GDB_SV_BIN)
|
||||
{
|
||||
// verifico validità oggetti
|
||||
for ( int i = 0 ; i < int( vvpGObj.size()) ; ++ i) {
|
||||
for ( int j = 0 ; j < int( vvpGObj[i].size()) ; ++ j) {
|
||||
if ( vvpGObj[i][j] == nullptr || ! vvpGObj[i][j]->IsValid())
|
||||
return false ;
|
||||
}
|
||||
}
|
||||
if ( int( vCol.size()) <= int( vvpGObj.size())) {
|
||||
for ( int i = int( vCol.size()) ; i < int( vvpGObj.size()) ; ++ i)
|
||||
vCol.push_back( BLACK) ;
|
||||
}
|
||||
else
|
||||
return false ;
|
||||
|
||||
// creo GeomDB temporaneo
|
||||
PtrOwner<IGeomDB> pGeomDB( CreateGeomDB()) ;
|
||||
if ( IsNull( pGeomDB))
|
||||
return false ;
|
||||
INTVECTOR vIds ;
|
||||
int nLayId = 0 ;
|
||||
|
||||
// creo il part
|
||||
int nPartId = pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, Frame3d()) ;
|
||||
|
||||
// per ogni elemento i-esimo, creo un layer
|
||||
for ( int i = 0 ; i < int( vvpGObj.size()) ; ++i) {
|
||||
// creo il layer
|
||||
nLayId = pGeomDB->AddGroup( GDB_ID_NULL, nPartId, Frame3d()) ;
|
||||
pGeomDB->SetMaterial( nLayId, vCol[i]) ;
|
||||
|
||||
for ( int j = 0 ; j < int( vvpGObj[i].size()) ; ++ j ) {
|
||||
// inserisco gli oggetti corrispondenti
|
||||
int nId = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, vvpGObj[i][j]) ;
|
||||
vIds.push_back( nId) ;
|
||||
if ( nId == GDB_ID_NULL)
|
||||
return false ;
|
||||
}
|
||||
}
|
||||
|
||||
// eseguo il salvataggio
|
||||
bool bOk = pGeomDB->Save( vIds, sFile, nFlag) ;
|
||||
// rimuovo l'oggetto dal GeomDB
|
||||
for ( int i = 0 ; i < int( vIds.size()) ; ++i)
|
||||
bOk = ( pGeomDB->RemoveGeoObjAndErase( vIds[i]) != nullptr) && bOk ;
|
||||
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
bool SaveSfrBooleans( const ISurfFlatRegion* pSfrA, const ISurfFlatRegion* pSfrB,
|
||||
const std::string& sFile, int nFlag = GDB_SV_BIN,
|
||||
Color cColA = Color( 0., .5, .75, .5), Color cColB = Color( 0., .5, 0., .5))
|
||||
{
|
||||
// verifico validità superfici
|
||||
if ( pSfrA == nullptr || ! pSfrA->IsValid() ||
|
||||
pSfrB == nullptr || ! pSfrB->IsValid())
|
||||
return false ;
|
||||
// creo GeomDB temporaneo
|
||||
PtrOwner<IGeomDB> pGeomDB( CreateGeomDB()) ;
|
||||
if ( IsNull( pGeomDB))
|
||||
return false ;
|
||||
// inserisco le superfici nel GeomDB (sotto pezzo/layer)
|
||||
int nPartId = pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, Frame3d()) ;
|
||||
int nLayId = pGeomDB->AddGroup( GDB_ID_NULL, nPartId, Frame3d()) ;
|
||||
int nIdSfrA = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, static_cast<IGeoObj*>( CloneSurfFlatRegion( pSfrA))) ;
|
||||
if ( nIdSfrA == GDB_ID_NULL)
|
||||
return false ;
|
||||
pGeomDB->SetMaterial( nIdSfrA, cColA) ;
|
||||
int nIdSfrB = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, static_cast<IGeoObj*>( CloneSurfFlatRegion( pSfrB))) ;
|
||||
if ( nIdSfrB == GDB_ID_NULL)
|
||||
return false ;
|
||||
pGeomDB->SetMaterial( nIdSfrB, cColB) ;
|
||||
// vettor di indici aggiunti
|
||||
INTVECTOR vIds = { nIdSfrA, nIdSfrB} ;
|
||||
// eseguo il salvataggio
|
||||
bool bOk = pGeomDB->Save( vIds, sFile, nFlag) ;
|
||||
// rimuovo l'oggetto dal GeomDB
|
||||
for ( int i = 0 ; i < int( vIds.size()) ; ++i)
|
||||
bOk = ( pGeomDB->RemoveGeoObjAndErase( vIds[i]) != nullptr) && bOk ;
|
||||
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
SaveGeoObj( std::vector<std::vector<IGeoObj*>> vvpGObj, std::vector<std::vector<Color>> vvCol,
|
||||
const std::string& sFile, int nFlag = GDB_SV_BIN)
|
||||
{
|
||||
// verifico validità oggetti
|
||||
for ( int i = 0 ; i < int( vvpGObj.size()) ; ++ i) {
|
||||
for ( int j = 0 ; j < int( vvpGObj[i].size()) ; ++ j) {
|
||||
if ( vvpGObj[i][j] == nullptr || ! vvpGObj[i][j]->IsValid())
|
||||
return false ;
|
||||
}
|
||||
}
|
||||
|
||||
// creo GeomDB temporaneo
|
||||
PtrOwner<IGeomDB> pGeomDB( CreateGeomDB()) ;
|
||||
if ( IsNull( pGeomDB))
|
||||
return false ;
|
||||
INTVECTOR vIds ;
|
||||
|
||||
// creo il part
|
||||
int nPartId = pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, Frame3d()) ;
|
||||
|
||||
// per ogni elemento i-esimo, creo un layer
|
||||
for ( int i = 0 ; i < int( vvpGObj.size()) ; ++i) {
|
||||
// creo il layer
|
||||
int nLayId = pGeomDB->AddGroup( GDB_ID_NULL, nPartId, Frame3d()) ;
|
||||
for ( int j = 0 ; j < int( vvpGObj[i].size()) ; ++ j ) {
|
||||
// inserisco gli oggetti corrispondenti
|
||||
int nId = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, vvpGObj[i][j]) ;
|
||||
if ( nId == GDB_ID_NULL)
|
||||
return false ;
|
||||
// setto il colore ( se definito)
|
||||
if ( i < int( vvCol.size()) && j < int( vvCol[i].size()))
|
||||
pGeomDB->SetMaterial( nId, vvCol[i][j]) ;
|
||||
vIds.push_back( nId) ;
|
||||
}
|
||||
}
|
||||
|
||||
// eseguo il salvataggio
|
||||
bool bOk = pGeomDB->Save( vIds, sFile, nFlag) ;
|
||||
// rimuovo l'oggetto dal GeomDB
|
||||
for ( int i = 0 ; i < int( vIds.size()) ; ++i)
|
||||
bOk = ( pGeomDB->RemoveGeoObjAndErase( vIds[i]) != nullptr) && bOk ;
|
||||
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
SaveGeoObj( std::vector<IGeoObj*> vpGObj, std::vector<Color> vCol,
|
||||
const std::string& sFile, int nFlag = GDB_SV_BIN)
|
||||
{
|
||||
// verifico validità oggetti
|
||||
if ( int( vpGObj.size()) != int( vCol.size()))
|
||||
return false ;
|
||||
|
||||
// creo GeomDB temporaneo
|
||||
PtrOwner<IGeomDB> pGeomDB( CreateGeomDB()) ;
|
||||
if ( IsNull( pGeomDB))
|
||||
return false ;
|
||||
INTVECTOR vIds ;
|
||||
|
||||
// creo il part
|
||||
int nPartId = pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, Frame3d()) ;
|
||||
// creo il layer
|
||||
int nLayId = pGeomDB->AddGroup( GDB_ID_NULL, nPartId, Frame3d()) ;
|
||||
|
||||
// scorro gli elementi da visualizzare
|
||||
for ( int i = 0 ; i < int( vpGObj.size()) ; ++ i) {
|
||||
if ( vpGObj[i] == nullptr || ! vpGObj[i]->IsValid())
|
||||
continue ;
|
||||
// inserisco gli oggetti corrispondenti
|
||||
int nId = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, vpGObj[i]) ;
|
||||
if ( nId == GDB_ID_NULL)
|
||||
return false ;
|
||||
// setto il colore
|
||||
pGeomDB->SetMaterial( nId, vCol[i]) ;
|
||||
// aggiungo l'Id ottenuto
|
||||
vIds.push_back( nId) ;
|
||||
}
|
||||
|
||||
// eseguo il salvataggio
|
||||
bool bOk = pGeomDB->Save( vIds, sFile, nFlag) ;
|
||||
// rimuovo l'oggetto dal GeomDB
|
||||
for ( int i = 0 ; i < int( vIds.size()) ; ++i)
|
||||
bOk = ( pGeomDB->RemoveGeoObjAndErase( vIds[i]) != nullptr) && bOk ;
|
||||
|
||||
return bOk ;
|
||||
}
|
||||
+1
-1
@@ -134,7 +134,7 @@ class __declspec( novtable) IGeomDB
|
||||
virtual bool RevertStatus( int nId) = 0 ;
|
||||
virtual bool GetStatus( int nId, int& nStat) const = 0 ;
|
||||
virtual bool GetCalcStatus( int nId, int& nStat) const = 0 ;
|
||||
virtual bool SetMark( int nId) = 0 ;
|
||||
virtual bool SetMark( int nId, int nMark = GDB_MK_ON) = 0 ;
|
||||
virtual bool ResetMark( int nId) = 0 ;
|
||||
virtual bool GetMark( int nId, int& nMark) const = 0 ;
|
||||
virtual bool GetCalcMark( int nId, int& nMark) const = 0 ;
|
||||
|
||||
+3
-3
@@ -56,11 +56,11 @@ private :
|
||||
typedef std::list<ObjData> ObjList ;
|
||||
typedef std::vector<ObjData*> PtrObjVector ;
|
||||
typedef std::unordered_map<int,ObjData*> IntPObjUmap ;
|
||||
typedef std::list<HashGrid1d*> GridList ;
|
||||
|
||||
private :
|
||||
typedef std::list<HashGrid1d*> GridList ; // Tipo per lista di hash grid
|
||||
|
||||
private :
|
||||
HashGrids1d( const HashGrids1d&) = delete ;
|
||||
HashGrids1d& operator=( const HashGrids1d&) = delete ;
|
||||
void addGrid( ObjData& obj) ;
|
||||
void addList( ObjData& obj) ;
|
||||
|
||||
|
||||
+3
-3
@@ -56,11 +56,11 @@ class HashGrids2d
|
||||
typedef std::list<ObjData> ObjList ;
|
||||
typedef std::vector<ObjData*> PtrObjVector ;
|
||||
typedef std::unordered_map<int,ObjData*> IntPObjUmap ;
|
||||
typedef std::list<HashGrid2d*> GridList ;
|
||||
|
||||
private :
|
||||
typedef std::list<HashGrid2d*> GridList ; // Tipo per lista di hash grid
|
||||
|
||||
private :
|
||||
HashGrids2d( const HashGrids2d&) = delete ;
|
||||
HashGrids2d& operator=( const HashGrids2d&) = delete ;
|
||||
void addGrid( ObjData& obj) ;
|
||||
void addList( ObjData& obj) ;
|
||||
|
||||
|
||||
+3
-3
@@ -56,11 +56,11 @@ class HashGrids3d
|
||||
typedef std::list<ObjData> ObjList ;
|
||||
typedef std::vector<ObjData*> PtrObjVector ;
|
||||
typedef std::unordered_map<int,ObjData*> IntPObjUmap ;
|
||||
typedef std::list<HashGrid3d*> GridList ;
|
||||
|
||||
private :
|
||||
typedef std::list<HashGrid3d*> GridList ; // Tipo per lista di hash grid
|
||||
|
||||
private :
|
||||
HashGrids3d( const HashGrids3d&) = delete ;
|
||||
HashGrids3d& operator=( const HashGrids3d&) = delete ;
|
||||
void addGrid( ObjData& obj) ;
|
||||
void addList( ObjData& obj) ;
|
||||
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkIntersCurvePlane.h Data : 07.11.25 Versione : 2.7k1
|
||||
// Contenuto : Dichiarazione della classe intersezione curva-piano.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 07.11.25 DB Creazione modulo.
|
||||
//
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkPoint3d.h"
|
||||
#include "/EgtDev/Include/EGkCurve.h"
|
||||
#include "/EgtDev/Include/EGkIntersCurves.h"
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
#undef EGK_EXPORT
|
||||
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
||||
#define EGK_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define EGK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Tipo di intersezione
|
||||
// nulla
|
||||
// puntiforme
|
||||
// sovrapposizione
|
||||
|
||||
// Costanti per tipo di approccio/allontanamento dall'intersezione
|
||||
const int ICPT_NULL = 0 ; //!< Approccio/allontanamento non definito
|
||||
const int ICPT_IN = 1 ; //!< Approccio/allontanamento interno
|
||||
const int ICPT_OUT = 2 ; //!< Approccio/allontanamento esterno
|
||||
const int ICPT_ON = 3 ; //!< Approccio/allontanamento sovrapposto
|
||||
|
||||
//! dati di intersezione tra una curva e un piano
|
||||
struct IntCrvPlnInfo {
|
||||
bool bOverlap ; //!< intersezione con overlap
|
||||
IntCrvInfo Ici[2] ; //!< Ici[0] intersez. isolata o inizio overlap, Ici[1] fine overlap
|
||||
// costruttore
|
||||
IntCrvPlnInfo( void)
|
||||
: bOverlap( false) {}
|
||||
} ;
|
||||
//! vettore di IntCrvPlnInfo
|
||||
typedef std::vector<IntCrvPlnInfo> ICPIVECTOR ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//! Classificazione di parti di curva rispetto ad un piano
|
||||
struct CrvPlaneClass {
|
||||
double dParS ;
|
||||
double dParE ;
|
||||
int nClass ;
|
||||
// costruttori
|
||||
CrvPlaneClass( void)
|
||||
: dParS( 0), dParE( 0), nClass( 0) {}
|
||||
CrvPlaneClass( double dPS, double dPE, int nC)
|
||||
: dParS( dPS), dParE( dPE), nClass( nC) {}
|
||||
} ;
|
||||
//! Vettore di CrvPlaneClass
|
||||
typedef std::vector<CrvPlaneClass> CRVPLNCVECTOR ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Costanti per classe parti di curva rispetto ad un piano
|
||||
const int CRVPLN_NULL = 0 ; //!< Parte di curva non classificabile
|
||||
const int CRVPLN_IN = 1 ; //!< Parte di curva interna ( dal lato negativo della normale)
|
||||
const int CRVPLN_OUT = 2 ; //!< Parte di curva esterna ( dal lato positivo della normale)
|
||||
const int CRVPLN_ON = 3 ; //!< Parte di curva sovrapposta al piano
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//! Classe per calcolo intersezione tra una curve e un piano, nel riferimento locale del piano
|
||||
class IntersCurvePlane
|
||||
{
|
||||
public :
|
||||
//! Le intersezioni sono calcolate nel piano XY locale.<br>
|
||||
EGK_EXPORT IntersCurvePlane( const ICurve& CurveA, const Point3d& ptOrig, const Vector3d& vtN) ;
|
||||
|
||||
public :
|
||||
//! Indica la presenza di intersezioni con sovrapposizioni
|
||||
EGK_EXPORT bool GetOverlaps( void) ;
|
||||
//! Restituisce il numero di intersezioni (intersezioni doppie coincidenti e sovrapposte contano uno)
|
||||
EGK_EXPORT int GetIntersCount( void) ;
|
||||
//! Restituisce informazioni sull'intersezione di indice nInd ( 0 based)
|
||||
EGK_EXPORT bool GetIntCrvPlnInfo( int nInd, IntCrvPlnInfo& aInfo) ;
|
||||
//! Restituisce il punto di intersezione più vicino al punto passato
|
||||
EGK_EXPORT bool GetIntersPointNearTo( const Point3d& ptNear, Point3d& ptI, double& dParam) ;
|
||||
//! Restituisce la classificazione di una curva rispetto al piano
|
||||
EGK_EXPORT bool GetCurveClassification( double dLenMin, CRVPLNCVECTOR& ccClass) ;
|
||||
|
||||
private :
|
||||
IntersCurvePlane( void) ;
|
||||
bool CalcIntersLinePlane( const Plane3d& plPlane, const ICurve& Curve, int nCrv = 0) ;
|
||||
bool IsArcToApprox( const ICurve& Curve) ;
|
||||
bool AdjustIntersParams( bool bAdjCrv) ;
|
||||
bool CalcCurveClassification( const ICurve* pCurve, const ICPIVECTOR& Info, double dLenMin, CRVPLNCVECTOR& ccClass) ;
|
||||
bool CalcCurveInOrOut( const ICurve* pCurve, CRVPLNCVECTOR& ccClass) ;
|
||||
void OrderAndCompleteIntersections() ;
|
||||
|
||||
private :
|
||||
int m_nIntersType ;
|
||||
int m_nIntersCount ;
|
||||
ICPIVECTOR m_Info ;
|
||||
const ICurve* m_pCurve ; // puntatore alla curva
|
||||
Plane3d m_plPlane ;
|
||||
} ;
|
||||
+5
-1
@@ -44,7 +44,7 @@ struct IntCrvCrvInfo {
|
||||
IntCrvInfo IciB[2] ; //!< IciB[0] intersez. isolata o inizio overlap, IciB[1] fine overlap
|
||||
// costruttore
|
||||
IntCrvCrvInfo( void)
|
||||
: bOverlap( false) {}
|
||||
: bOverlap( false), bCBOverEq( false) {}
|
||||
} ;
|
||||
//! vettore di IntCrvCrvInfo
|
||||
typedef std::vector<IntCrvCrvInfo> ICCIVECTOR ;
|
||||
@@ -115,12 +115,16 @@ class IntersCurveCurve
|
||||
EGK_EXPORT bool GetOverlaps( void) ;
|
||||
//! Restituisce il numero di intersezioni (intersezioni doppie coincidenti e sovrapposte contano uno)
|
||||
EGK_EXPORT int GetIntersCount( void) ;
|
||||
//! Restituisce il numero di intersezioni in 3D ( filtrando le intersezioni)
|
||||
EGK_EXPORT int GetInters3DCount( void) ;
|
||||
//! Restituisce il numero di intersezioni in cui la curva si attraversa
|
||||
EGK_EXPORT int GetCrossIntersCount( void) ;
|
||||
//! Restituisce il numero di intersezioni in cui la curva si attraversa o si sovrappone
|
||||
EGK_EXPORT int GetCrossOrOverlapIntersCount( void) ;
|
||||
//! Restituisce informazioni sull'intersezione di indice nInd ( 0 based)
|
||||
EGK_EXPORT bool GetIntCrvCrvInfo( int nInd, IntCrvCrvInfo& aInfo) ;
|
||||
//! Restituisce informazioni sulla i-esima intersezione 3D ( 0 based)
|
||||
EGK_EXPORT bool GetInt3DCrvCrvInfo( int nInd, IntCrvCrvInfo& aInfo) ;
|
||||
//! Restituisce il punto di intersezione più vicino al punto passato
|
||||
EGK_EXPORT bool GetIntersPointNearTo( int nCrv, const Point3d& ptNear, Point3d& ptI) ;
|
||||
//! Restituisce la classificazione di una curva rispetto all'altra ( nCrv=0 -> CurvaA, nCrv=1 -> CurvaB)
|
||||
|
||||
+4
-2
@@ -32,9 +32,11 @@ EGK_EXPORT bool IntersLineBox( const Point3d& ptL, const Vector3d& vtL, double d
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Tipo di intersezione linea-box
|
||||
enum IntLineBoxType { ILBT_NONE = 0, // non è intersezione
|
||||
enum IntLineBoxType { ILBT_NONE = 0, // non è intersezione
|
||||
ILBT_IN = 1, // ingresso nel box
|
||||
ILBT_OUT = 2, // uscita dal box
|
||||
ILBT_TG_INI = 3, // ingresso tangente in una faccia del box
|
||||
ILBT_TG_FIN = 4, // uscita tangente da una faccia del box
|
||||
ILBT_TOUCH = 5} ; // contatto su uno spigolo o su un vertice del box
|
||||
ILBT_TOUCH = 5, // contatto su uno spigolo o su un vertice del box
|
||||
ILBT_INSIDE = 6, // contenimento nel box
|
||||
ILBT_TG_INSIDE = 7} ; // contenimento su faccia del box
|
||||
|
||||
@@ -26,28 +26,6 @@
|
||||
#define EGK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//! dati di intersezione linea - superficie trimesh
|
||||
struct IntLinSbzInfo {
|
||||
int nILTT ; //!< tipo di intersezione linea-triangolo
|
||||
double dU ; //!< parametro sulla linea
|
||||
double dU2 ; //!< secondo parametro sulla linea
|
||||
int nT ; //!< indice del triangolo della superficie trimesh
|
||||
double dCosDN ; //!< coseno dell'angolo tra la direzione della linea e la normale del triangolo
|
||||
Point3d ptI ; //!< punto di intersezione
|
||||
Point3d ptI2 ; //!< secondo punto di intersezione (termine di tratto sovrapposto)
|
||||
Point3d ptUV ; //!< coordinate del punto nello spazio parametrico
|
||||
Point3d ptUV2 ; //!< coordinate del secondo punto nello spazio parametrico
|
||||
// costruttori
|
||||
IntLinSbzInfo( void) : nILTT( ILTT_NO), dU( 0), dU2( 0), nT(0), dCosDN(0), ptI(), ptI2(), ptUV(), ptUV2(){}
|
||||
IntLinSbzInfo( int nIL, double dUU, int nTT, double dCos, const Point3d& ptP, const Point3d ptSP)
|
||||
: nILTT( nIL), dU( dUU), dU2( 0), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2(), ptUV( ptSP), ptUV2() {}
|
||||
IntLinSbzInfo( int nIL, double dUU, double dUU2, int nTT, double dCos, const Point3d& ptP, const Point3d& ptP2, const Point3d& ptSP, const Point3d& ptSP2)
|
||||
: nILTT( nIL), dU( dUU), dU2( dUU2), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2( ptP2), ptUV( ptSP), ptUV2( ptSP2) {}
|
||||
} ;
|
||||
//! vettore di IntLinSbzInfo
|
||||
typedef std::vector<IntLinSbzInfo> ILSBIVECTOR ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Costanti tipo intersezione Linea SurfTriMesh dopo filtraggio
|
||||
enum LSBiType { LSBT_NONE = 0,
|
||||
@@ -57,6 +35,38 @@ enum LSBiType { LSBT_NONE = 0,
|
||||
LSBT_TG_FIN = 4,
|
||||
LSBT_TOUCH = 5} ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Tipo di intersezione linea-triangolo ausiliario (della trimesh ausilaria)
|
||||
enum IntLineTriaAuxType { ILTA_NO_TRIA = -1, // l'intersezione è stata calcolata direttamente con la superficie bezier
|
||||
ILTA_NO = 0, // non c'è intersezione
|
||||
ILTA_SEGM = 1, // una parte di linea appartiene all'interno del triangolo
|
||||
ILTA_SEGM_ON_EDGE = 2, // una parte di linea appartiene ad un lato del triangolo
|
||||
ILTA_VERT = 3, // intersezione coincide con un vertice
|
||||
ILTA_EDGE = 4, // intersezione coincide con interno di un lato
|
||||
ILTA_IN = 5} ; // intersezione in interno del triangolo
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//! dati di intersezione linea - superficie bezier
|
||||
struct IntLinSbzInfo {
|
||||
int nILSB ; //!< tipo di intersezione linea-bezier
|
||||
double dU ; //!< parametro sulla linea
|
||||
double dU2 ; //!< secondo parametro sulla linea
|
||||
int nT ; //!< indice del triangolo della superficie trimesh // se -1 vuol dire che l'intersezione � stata calcolata direttamente, senza usare la trimesh
|
||||
double dCosDN ; //!< coseno dell'angolo tra la direzione della linea e la normale del triangolo
|
||||
Point3d ptI ; //!< punto di intersezione
|
||||
Point3d ptI2 ; //!< secondo punto di intersezione (termine di tratto sovrapposto)
|
||||
Point3d ptUV ; //!< coordinate del punto nello spazio parametrico
|
||||
Point3d ptUV2 ; //!< coordinate del secondo punto nello spazio parametrico
|
||||
// costruttori
|
||||
IntLinSbzInfo( void) : nILSB( LSBT_NONE), dU( 0), dU2( 0), nT(0), dCosDN(0), ptI(), ptI2(), ptUV(), ptUV2(){}
|
||||
IntLinSbzInfo( int nILS, double dUU, int nTT, double dCos, const Point3d& ptP, const Point3d ptSP)
|
||||
: nILSB( nILS), dU( dUU), dU2( 0), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2(), ptUV( ptSP), ptUV2() {}
|
||||
IntLinSbzInfo( int nILS, double dUU, double dUU2, int nTT, double dCos, const Point3d& ptP, const Point3d& ptP2, const Point3d& ptSP, const Point3d& ptSP2)
|
||||
: nILSB( nILS), dU( dUU), dU2( dUU2), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2( ptP2), ptUV( ptSP), ptUV2( ptSP2) {}
|
||||
} ;
|
||||
//! vettore di IntLinSbzInfo
|
||||
typedef std::vector<IntLinSbzInfo> ILSBIVECTOR ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool IntersLineSurfBz( const Point3d& ptL, const Vector3d& vtL, double dLen, const ISurfBezier* pSBz,
|
||||
ILSBIVECTOR& vInfo, bool bFinite = true) ;
|
||||
+15
-9
@@ -31,19 +31,20 @@ struct IntLinStmInfo {
|
||||
int nILTT ; //!< tipo di intersezione linea-triangolo
|
||||
double dU ; //!< distanza sulla linea
|
||||
double dU2 ; //!< seconda distanza sulla linea
|
||||
int nStm ; //!< indice della superficie TriMesh di intersezione
|
||||
int nT ; //!< indice del triangolo della superficie trimesh
|
||||
double dCosDN ; //!< coseno dell'angolo tra la direzione della linea e la normale del triangolo
|
||||
Point3d ptI ; //!< punto di intersezione
|
||||
Point3d ptI2 ; //!< secondo punto di intersezione (termine di tratto sovrapposto)
|
||||
// costruttori
|
||||
IntLinStmInfo( void) : nILTT( ILTT_NO), dU( 0), dU2( 0), nT( 0), dCosDN( 0), ptI(), ptI2() {}
|
||||
IntLinStmInfo( int nIL, double dUU, int nTT, double dCos, const Point3d& ptP)
|
||||
: nILTT( nIL), dU( dUU), dU2( 0), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2() {}
|
||||
IntLinStmInfo( int nIL, double dUU, double dUU2, int nTT, double dCos, const Point3d& ptP, const Point3d& ptP2)
|
||||
: nILTT( nIL), dU( dUU), dU2( dUU2), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2( ptP2) {}
|
||||
IntLinStmInfo( void) : nILTT( ILTT_NO), dU( 0), dU2( 0), nStm( 0), nT( 0), dCosDN( 0), ptI(), ptI2() {}
|
||||
IntLinStmInfo( int nIL, double dUU, int nSurfTm, int nTT, double dCos, const Point3d& ptP)
|
||||
: nILTT( nIL), dU( dUU), dU2( 0), nStm( nSurfTm), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2() {}
|
||||
IntLinStmInfo( int nIL, double dUU, double dUU2, int nSurfTm, int nTT, double dCos, const Point3d& ptP, const Point3d& ptP2)
|
||||
: nILTT( nIL), dU( dUU), dU2( dUU2), nStm( nSurfTm), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2( ptP2) {}
|
||||
} ;
|
||||
//! vettore di IntLinStmInfo
|
||||
typedef std::vector<IntLinStmInfo> ILSIVECTOR ;
|
||||
typedef std::vector<IntLinStmInfo> ILSIVECTOR ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Costanti tipo intersezione Linea SurfTriMesh dopo filtraggio
|
||||
@@ -63,13 +64,18 @@ class IntersParLinesSurfTm
|
||||
{
|
||||
public :
|
||||
EGK_EXPORT IntersParLinesSurfTm( const Frame3d& frLines, const ISurfTriMesh& Stm) ;
|
||||
EGK_EXPORT IntersParLinesSurfTm( const Frame3d& frLines, const CISURFTMPVECTOR& vStm) ;
|
||||
EGK_EXPORT bool GetInters( const Point3d& ptL, double dLen, ILSIVECTOR& vInfo, bool bFinite = true) const ;
|
||||
|
||||
private :
|
||||
int GetSurfInd( int nT) const ;
|
||||
|
||||
private :
|
||||
bool m_bOk ;
|
||||
const Frame3d m_frLines ;
|
||||
const ISurfTriMesh* m_pSTm ;
|
||||
HashGrids2d m_HGrids ;
|
||||
const Frame3d m_frLines ; // direzione della linea come versore Z
|
||||
CISURFTMPVECTOR m_vpSTm ; // vettore delle superfici con cui calcolare le intersezioni con le linee
|
||||
INTVECTOR m_vBaseInd ; // [0, nTriaStm0, nTriaStm0 + nTriaStm1, nTriaStm0 + nTriaStm1 + nTriaStm2, ...]
|
||||
HashGrids2d m_HGrids ; // HasGrid di ottimizzazione per ricerca triangoli
|
||||
} ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
+89
-5
@@ -1,13 +1,14 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2015
|
||||
// EgalTech 2015-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkLuaAux.h Data : 21.03.15 Versione : 1.6c6
|
||||
// File : EGkLuaAux.h Data : 08.05.24 Versione : 2.6e2
|
||||
// Contenuto : Funzioni per gestione parametri geometrici con LUA.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 21.03.15 DS Creazione modulo.
|
||||
//
|
||||
// 14.04.24 DS Aggiunta gestione Quaternion.
|
||||
// 08.05.24 DS Aggiunta LuaSetParam per VCT3DVECTOR.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -17,6 +18,7 @@
|
||||
#include "/EgtDev/Include/EGkPoint3d.h"
|
||||
#include "/EgtDev/Include/EGkFrame3d.h"
|
||||
#include "/EgtDev/Include/EGkBBox3d.h"
|
||||
#include "/EgtDev/Include/EGkQuaternion.h"
|
||||
#include "/EgtDev/Include/EGkColor.h"
|
||||
#include "/EgtDev/Include/EGkGeoCollection.h"
|
||||
#include "/EgtDev/Include/EGkSelection.h"
|
||||
@@ -25,12 +27,16 @@
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool
|
||||
LuaGetParam( lua_State* L, int nInd, Vector3d& vtPar)
|
||||
{ return LuaGetParam( L, nInd, vtPar.v) ; }
|
||||
{
|
||||
return LuaGetParam( L, nInd, vtPar.v) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool
|
||||
LuaGetParam( lua_State* L, int nInd, Point3d& ptPar)
|
||||
{ return LuaGetParam( L, nInd, ptPar.v) ; }
|
||||
{
|
||||
return LuaGetParam( L, nInd, ptPar.v) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool
|
||||
@@ -114,6 +120,13 @@ LuaGetParam( lua_State* L, int nInd, BBox3d& b3Par)
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool
|
||||
LuaGetParam( lua_State* L, int nInd, Quaternion& qtPar)
|
||||
{
|
||||
return LuaGetParam( L, nInd, qtPar.v) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool
|
||||
LuaGetParam( lua_State* L, int nInd, Color& colPar)
|
||||
@@ -264,6 +277,60 @@ LuaSetParam( lua_State* L, const Vector3d& vtPar)
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
inline bool
|
||||
LuaSetParam( lua_State* L, const PNTVECTOR& vPar)
|
||||
{
|
||||
try {
|
||||
// recupero dimensione vettore
|
||||
int nDim = int( vPar.size()) ;
|
||||
// creo tavola principale
|
||||
lua_createtable( L, nDim, 0) ;
|
||||
// creo e inserisco tavola per ogni componente
|
||||
for ( int i = 1 ; i <= nDim ; ++ i) {
|
||||
// creo tavola componente
|
||||
lua_createtable( L, 3, 0) ;
|
||||
for ( int j = 1 ; j <= 3 ; ++ j) {
|
||||
lua_pushnumber( L, vPar[i-1].v[j-1]) ;
|
||||
lua_rawseti( L, -2, j) ;
|
||||
}
|
||||
// la metto nel vettore
|
||||
lua_rawseti( L, -2, i) ;
|
||||
}
|
||||
}
|
||||
catch( ...) {
|
||||
return false ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
inline bool
|
||||
LuaSetParam( lua_State* L, const VCT3DVECTOR& vPar)
|
||||
{
|
||||
try {
|
||||
// recupero dimensione vettore
|
||||
int nDim = int( vPar.size()) ;
|
||||
// creo tavola principale
|
||||
lua_createtable( L, nDim, 0) ;
|
||||
// creo e inserisco tavola per ogni componente
|
||||
for ( int i = 1 ; i <= nDim ; ++ i) {
|
||||
// creo tavola componente
|
||||
lua_createtable( L, 3, 0) ;
|
||||
for ( int j = 1 ; j <= 3 ; ++ j) {
|
||||
lua_pushnumber( L, vPar[i-1].v[j-1]) ;
|
||||
lua_rawseti( L, -2, j) ;
|
||||
}
|
||||
// la metto nel vettore
|
||||
lua_rawseti( L, -2, i) ;
|
||||
}
|
||||
}
|
||||
catch( ...) {
|
||||
return false ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool
|
||||
LuaSetParam( lua_State* L, const Point3d& ptPar)
|
||||
@@ -369,6 +436,23 @@ LuaSetParam( lua_State* L, const BBox3d& b3Par)
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool
|
||||
LuaSetParam( lua_State* L, const Quaternion& qtPar)
|
||||
{
|
||||
try {
|
||||
lua_createtable( L, 4, 0) ;
|
||||
for ( int i = 1 ; i <= 4 ; ++ i) {
|
||||
lua_pushnumber( L, qtPar.v[i-1]) ;
|
||||
lua_rawseti( L, -2, i) ;
|
||||
}
|
||||
}
|
||||
catch( ...) {
|
||||
return false ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
inline bool
|
||||
LuaSetParam( lua_State* L, const Color& colPar)
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2025-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : MultiGeomDB.h Data : 22.12.25 Versione : 2.7l3
|
||||
// Contenuto : Dichiarazione delle funzioni tra due GeomDB.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 08.10.25 DB Creazione modulo.
|
||||
// 22.12.25 DS Aggiunta funzione DuplicateGeomDB.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkGeomDB.h"
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
#undef EGK_EXPORT
|
||||
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
||||
#define EGK_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define EGK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT int Copy( IGeomDB* pSouGeomDB, int nSouId, IGeomDB* pDestGeomDB, int nDestId, int nRefId, int nSonBeforeAfter = GDB_LAST_SON) ;
|
||||
EGK_EXPORT int CopyGlob( IGeomDB* pSouGeomDB, int nSouId, IGeomDB* pDestGeomDB, int nDestId, int nRefId, int nSonBeforeAfter = GDB_LAST_SON) ;
|
||||
EGK_EXPORT bool DuplicateGeomDB( IGeomDB* pSouGeomDB, IGeomDB* pDestGeomDB, bool bSkipTemp = false) ;
|
||||
+6
-2
@@ -1,12 +1,13 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2019
|
||||
// EgalTech 2015-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkOffsetCurve.h Data : 24.06.19 Versione : 2.1f2
|
||||
// File : EGkOffsetCurve.h Data : 08.04.25 Versione : 2.7d1
|
||||
// Contenuto : Dichiarazione classe per offset di ICurve.
|
||||
//
|
||||
//
|
||||
// Modifiche : 23.09.15 DS Creazione modulo.
|
||||
// 24.06.19 DS Agg. GetShorterCurve.
|
||||
// 08.04.25 SP Agg. GetPointOffset.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -37,10 +38,13 @@ class OffsetCurve
|
||||
EGK_EXPORT ICurve* GetCurve( void) ;
|
||||
EGK_EXPORT ICurve* GetLongerCurve( void) ;
|
||||
EGK_EXPORT ICurve* GetShorterCurve( void) ;
|
||||
EGK_EXPORT bool GetPointOffset( Point3d& ptOffs, Vector3d& vtOut) ;
|
||||
EGK_EXPORT double GetLinTol( void) const { return m_dLinTol ; }
|
||||
EGK_EXPORT void SetLinTol( double dTol) { m_dLinTol = dTol ; }
|
||||
|
||||
private :
|
||||
ICURVEPLIST m_CrvLst ;
|
||||
Point3d m_ptOffs = P_INVALID ;
|
||||
Vector3d m_vtOut = V_INVALID ;
|
||||
double m_dLinTol ;
|
||||
} ;
|
||||
@@ -8,6 +8,7 @@
|
||||
//
|
||||
// Modifiche : 08.04.14 DS Creazione modulo.
|
||||
// 25.02.15 DS Agg. PointInPlane*.
|
||||
// 05.09.25 RE Agg. funzioni di confronto tra due piani
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -154,3 +155,27 @@ PointInPlaneExact( const Point3d& ptP, const Plane3d& plPlane)
|
||||
{
|
||||
return ( abs( (( ptP - ORIG) * plPlane.GetVersN()) - plPlane.GetDist()) < EPS_ZERO) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
inline bool
|
||||
AreSamePlaneEpsilon( const Plane3d& plPlaneA, const Plane3d& plPlaneB, double dToler)
|
||||
{
|
||||
return ( AreSameVectorEpsilon( plPlaneA.GetVersN(), plPlaneB.GetVersN(), dToler) &&
|
||||
PointInPlaneEpsilon( plPlaneA.GetPoint(), plPlaneB, dToler)) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
inline bool
|
||||
AreSamePlaneApprox( const Plane3d& plPlaneA, const Plane3d& plPlaneB)
|
||||
{
|
||||
return ( AreSameVectorApprox( plPlaneA.GetVersN(), plPlaneB.GetVersN()) &&
|
||||
PointInPlaneApprox( plPlaneA.GetPoint(), plPlaneB)) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
inline bool
|
||||
AreSamePlaneExact( const Plane3d& plPlaneA, const Plane3d& plPlaneB)
|
||||
{
|
||||
return ( AreSameVectorExact( plPlaneA.GetVersN(), plPlaneB.GetVersN()) &&
|
||||
PointInPlaneExact( plPlaneA.GetPoint(), plPlaneB)) ;
|
||||
}
|
||||
|
||||
+30
-3
@@ -323,7 +323,16 @@ DirDist( const Point3d& ptP1, const Point3d& ptP2, Vector3d& vtDir, double& dDis
|
||||
inline bool
|
||||
AreSamePointEpsilon( const Point3d& ptP1, const Point3d& ptP2, double dToler)
|
||||
{
|
||||
return ( SqDist( ptP1, ptP2) < ( dToler * dToler)) ;
|
||||
double dX = ptP1.x - ptP2.x ;
|
||||
if ( abs( dX) > dToler)
|
||||
return false ;
|
||||
double dY = ptP1.y - ptP2.y ;
|
||||
if ( abs( dY) > dToler)
|
||||
return false ;
|
||||
double dZ = ptP1.z - ptP2.z ;
|
||||
if ( abs( dZ) > dToler)
|
||||
return false ;
|
||||
return ( ( dX * dX + dY * dY + dZ * dZ) < ( dToler * dToler)) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -341,7 +350,16 @@ AreSamePointXYEpsilon( const Point3d& ptP1, const Point3d& ptP2, double dToler)
|
||||
inline bool
|
||||
AreSamePointApprox( const Point3d& ptP1, const Point3d& ptP2)
|
||||
{
|
||||
return ( SqDist( ptP1, ptP2) < SQ_EPS_SMALL) ;
|
||||
double dX = ptP1.x - ptP2.x ;
|
||||
if ( abs( dX) > EPS_SMALL)
|
||||
return false ;
|
||||
double dY = ptP1.y - ptP2.y ;
|
||||
if ( abs( dY) > EPS_SMALL)
|
||||
return false ;
|
||||
double dZ = ptP1.z - ptP2.z ;
|
||||
if ( abs( dZ) > EPS_SMALL)
|
||||
return false ;
|
||||
return ( ( dX * dX + dY * dY + dZ * dZ) < SQ_EPS_SMALL) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -359,7 +377,16 @@ AreSamePointXYApprox( const Point3d& ptP1, const Point3d& ptP2)
|
||||
inline bool
|
||||
AreSamePointExact( const Point3d& ptP1, const Point3d& ptP2)
|
||||
{
|
||||
return ( SqDist( ptP1, ptP2) < SQ_EPS_ZERO) ;
|
||||
double dX = ptP1.x - ptP2.x ;
|
||||
if ( abs( dX) > EPS_ZERO)
|
||||
return false ;
|
||||
double dY = ptP1.y - ptP2.y ;
|
||||
if ( abs( dY) > EPS_ZERO)
|
||||
return false ;
|
||||
double dZ = ptP1.z - ptP2.z ;
|
||||
if ( abs( dZ) > EPS_ZERO)
|
||||
return false ;
|
||||
return ( ( dX * dX + dY * dY + dZ * dZ) < SQ_EPS_ZERO) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
+9
-1
@@ -108,11 +108,12 @@ class PolyLine
|
||||
EGK_EXPORT bool GetMaxDistanceFromLine( const Point3d& ptLine, const Vector3d& vtLine, double dLen,
|
||||
double& dMaxDist, bool bIsSegment = true) const ;
|
||||
EGK_EXPORT bool AdjustForMaxSegmentLen( double dMaxLen) ;
|
||||
EGK_EXPORT bool RemoveAlignedPoints( double dToler = EPS_SMALL) ;
|
||||
EGK_EXPORT bool RemoveAlignedPoints( double dToler = EPS_SMALL, bool bStartEnd = true) ;
|
||||
EGK_EXPORT bool ApproxOnSide( const Vector3d& vtN, bool bLeftSide, double dToler = EPS_SMALL) ;
|
||||
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) ;
|
||||
@@ -121,11 +122,17 @@ class PolyLine
|
||||
m_nTempProp[nPropInd] = nProp ; }
|
||||
EGK_EXPORT int GetTempProp( int nPropInd = 0) const
|
||||
{ return (( nPropInd >= 0 && nPropInd < 2) ? m_nTempProp[nPropInd] : 0) ; }
|
||||
EGK_EXPORT bool FromPointVector( const PNTVECTOR& vPnt)
|
||||
{ Clear() ;
|
||||
for ( int i = 0 ; i < std::ssize( vPnt) ; ++i)
|
||||
AddUPoint( i, vPnt[i]) ;
|
||||
return GetPointNbr() > 0 ; }
|
||||
|
||||
private :
|
||||
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
|
||||
@@ -148,3 +155,4 @@ EGK_EXPORT bool GetPointParamOnPolyLine( const Point3d& ptP, const PolyLine& plP
|
||||
EGK_EXPORT bool ChangePolyLineStart( PolyLine& plPoly, const Point3d& ptNewStart, double dToler) ;
|
||||
EGK_EXPORT bool SplitPolyLineAtPoint( const PolyLine& plPoly, const Point3d& ptP, double dToler, PolyLine& plPoly1, PolyLine& plPoly2) ;
|
||||
EGK_EXPORT bool AssociatePolyLinesMinDistPoints( const PolyLine& PL1, const PolyLine& PL2, PNTIVECTOR& vPnt1, PNTIVECTOR& vPnt2, bool& bCommonInternalPoints) ;
|
||||
EGK_EXPORT bool MatchPolyLinesAddingPoints( const PolyLine& PL1, const PolyLine& PL2, int nType, PNTIVECTOR& vPnt1, PNTIVECTOR& vPnt2) ;
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2023-2026
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkProjectCurveSurfTm.h Data : 14.04.26 Versione : 3.1d3
|
||||
// Contenuto : Dichiarazione funzioni proiezione curve su superficie Trimesh.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 31.08.23 DS Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkGeoPoint3d.h"
|
||||
#include "/EgtDev/Include/EGkCurve.h"
|
||||
#include "/EgtDev/Include/EGkSurf.h"
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
#undef EGK_EXPORT
|
||||
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
||||
#define EGK_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define EGK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Definizione di Punto 5assi e sue raccolte
|
||||
struct Point5ax {
|
||||
Point3d ptP ;
|
||||
Vector3d vtDir1 ;
|
||||
Vector3d vtDir2 ;
|
||||
Vector3d vtDirU ;
|
||||
Vector3d vtDirV ;
|
||||
double dPar ;
|
||||
int nFlag ;
|
||||
Point5ax( void) : ptP(), vtDir1(), vtDir2(), vtDirU(), vtDirV(), dPar(), nFlag() {} ;
|
||||
Point5ax( const Point3d& ptBase, const Vector3d& vtTool, double dU, int nData)
|
||||
: ptP( ptBase), vtDir1( vtTool), vtDir2(), vtDirU(), vtDirV(), dPar( dU), nFlag( nData) {} ;
|
||||
Point5ax( const Point3d& ptBase, const Vector3d& vtTool, const Vector3d& vtTool2, double dU, int nData)
|
||||
: ptP( ptBase), vtDir1( vtTool), vtDir2( vtTool2), vtDirU(), vtDirV(), dPar( dU), nFlag( nData) {} ;
|
||||
Point5ax( const Point3d& ptBase, const Vector3d& vtTool, const Vector3d& vtTool2,
|
||||
const Vector3d& vtDU, const Vector3d& vtDV, double dU, int nData)
|
||||
: ptP( ptBase), vtDir1( vtTool), vtDir2( vtTool2), vtDirU( vtDU), vtDirV( vtDV), dPar( dU), nFlag( nData) {} ;
|
||||
} ;
|
||||
typedef std::vector<Point5ax> PNT5AXVECTOR ; // vettore di Punti 5assi
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Proiezione di una curva su una o più superfici a distanza minima
|
||||
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const CISURFPVECTOR& vpSurf,
|
||||
double dLinTol, double dMaxSegmLen, bool bSharpEdges, PNT5AXVECTOR& vPt5ax) ;
|
||||
// Proiezione di una curva su una o più superfici lungo la direzione data (da o verso)
|
||||
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const CISURFPVECTOR& vpSurf, const Vector3d& vtDir,
|
||||
double dLinTol, double dMaxSegmLen, bool bSharpEdges, bool bFromVsTo, PNT5AXVECTOR& vPt5ax) ;
|
||||
// Proiezione di una curva su una o più superfici in direzione del punto (da o verso)
|
||||
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const CISURFPVECTOR& vpSurf, const IGeoPoint3d& gpRef,
|
||||
double dLinTol, double dMaxSegmLen, bool bSharpEdges, bool bFromVsTo, PNT5AXVECTOR& vPt5ax) ;
|
||||
// Proiezione di una curva su una o più superfici in direzione della curva (da o verso)
|
||||
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const CISURFPVECTOR& vpSurf, const ICurve& crRef,
|
||||
double dLinTol, double dMaxSegmLen, bool bSharpEdges, bool bFromVsTo, PNT5AXVECTOR& vPt5ax) ;
|
||||
// Proiezione di una curva su una o più superfici in direzione della superficie (da o verso)
|
||||
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const CISURFPVECTOR& vpSurf, const ISurf& sfRef,
|
||||
double dLinTol, double dMaxSegmLen, bool bSharpEdges, bool bFromVsTo, PNT5AXVECTOR& vPt5ax) ;
|
||||
@@ -1,43 +0,0 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2023-2023
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkProjectCurveSurfTm.h Data : 31.08.23 Versione : 2.5h3
|
||||
// Contenuto : Dichiarazione funzioni proiezione curve su superficie Trimesh.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 31.08.23 DS Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkCurve.h"
|
||||
#include "/EgtDev/Include/EGkSurfTriMesh.h"
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
#undef EGK_EXPORT
|
||||
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
||||
#define EGK_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define EGK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Definizione di Punto 5assi e sue raccolte
|
||||
struct Point5ax {
|
||||
Point3d ptP ;
|
||||
Vector3d vtDir ;
|
||||
double dPar ;
|
||||
int nFlag ;
|
||||
Point5ax( void) : ptP(), vtDir(), dPar(), nFlag() {} ;
|
||||
Point5ax( const Point3d& ptBase, const Vector3d& vtTool, double dU, int nData)
|
||||
: ptP( ptBase), vtDir( vtTool), dPar( dU), nFlag( nData) {} ;
|
||||
} ;
|
||||
typedef std::vector<Point5ax> PNT5AXVECTOR ; // vettore di Punti 5assi
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Proiezione di una curva su una superficie TriMesh lungo la direzione data.
|
||||
EGK_EXPORT bool ProjectCurveOnSurfTm( const ICurve& crCrv, const ISurfTriMesh& tmSurf, const Vector3d& vtDir,
|
||||
double dLinTol, double dMaxSegmLen, PNT5AXVECTOR& vPt5ax) ;
|
||||
+174
@@ -0,0 +1,174 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2024-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkQuaternion.h Data : 13.04.243 Versione : 2.6d4
|
||||
// Contenuto : Dichiarazione della classe Quaternion.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 31.12.13 DS Creazione modulo.
|
||||
//
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkFrame3d.h"
|
||||
|
||||
//----------------------- Macro per import/export -----------------------------
|
||||
#undef EGK_EXPORT
|
||||
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
||||
#define EGK_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define EGK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
class EGK_EXPORT Quaternion
|
||||
{
|
||||
public :
|
||||
Quaternion( double dW = 0, double dX = 0, double dY = 0, double dZ = 0) : w( dW), x( dX), y( dY), z( dZ) {}
|
||||
|
||||
public :
|
||||
bool IsValid( void) const
|
||||
{ return ( std::isfinite( w) && std::isfinite( x) && std::isfinite( y) && std::isfinite( z)) ; }
|
||||
bool IsSmall( void) const
|
||||
{ return ( ( w * w + x * x + y * y + z * z) < SQ_EPS_SMALL) ; }
|
||||
bool IsZero( void) const
|
||||
{ return ( ( w * w + x * x + y * y + z * z) < SQ_EPS_ZERO) ; }
|
||||
bool IsUnit( void) const
|
||||
{ return ( abs( w - 1) < EPS_ZERO && ( x * x + y * y + z * z) < SQ_EPS_ZERO) ; }
|
||||
double SqLen( void) const
|
||||
{ return ( w * w + x * x + y * y + z * z) ; }
|
||||
double Len( void) const ;
|
||||
bool Normalize( double dEps = EPS_SMALL) ;
|
||||
bool IsNormalized( void) const
|
||||
{ return ( abs( 1.0 - ( w * w + x * x + y * y + z * z)) < ( 2 * EPS_ZERO)) ; }
|
||||
Quaternion& operator +=( const Quaternion& qtQ)
|
||||
{ w += qtQ.w ; x += qtQ.x ; y += qtQ.y ; z += qtQ.z ; return *this ; }
|
||||
Quaternion& operator -=( const Quaternion& qtQ)
|
||||
{ w -= qtQ.w ; x -= qtQ.x ; y -= qtQ.y ; z -= qtQ.z ; return *this ; }
|
||||
Quaternion& operator *=( double dMul)
|
||||
{ w *= dMul ; x *= dMul ; y *= dMul ; z *= dMul ; return *this ; }
|
||||
Quaternion& operator /=( double dDiv)
|
||||
{ double dMul = 1 / dDiv ; w *= dMul ; x *= dMul ; y *= dMul ; z *= dMul ; return *this ; }
|
||||
|
||||
public :
|
||||
union {
|
||||
struct {
|
||||
double w ;
|
||||
double x ;
|
||||
double y ;
|
||||
double z ;
|
||||
} ;
|
||||
double v[4] ;
|
||||
} ;
|
||||
} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Quaternioni notevoli
|
||||
//----------------------------------------------------------------------------
|
||||
// Quaternione non valido
|
||||
const Quaternion Q_INVALID( NAN, NAN, NAN, NAN) ;
|
||||
// Quaternione unità
|
||||
const Quaternion Q_UNIT( 1, 0, 0, 0) ;
|
||||
// Quaternione nullo
|
||||
const Quaternion Q_NULL( 0, 0, 0, 0) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Definizione da rotazione definita con asse e angolo e inverso
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT Quaternion FromAxisAngle( const Vector3d& vtAx, double dAngDeg) ;
|
||||
EGK_EXPORT bool ToAxisAngle( const Quaternion& qtQ, Vector3d& vtAx, double& dAngDeg) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Definizione da parte rotazione di un sistema di riferimento e inverso
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT Quaternion FromFrame( const Frame3d& frRef) ;
|
||||
EGK_EXPORT bool ToFrame( const Quaternion& qtQ, Frame3d& frRef) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Coniugato di un quaternione
|
||||
//----------------------------------------------------------------------------
|
||||
inline const Quaternion
|
||||
Conjugate( const Quaternion& qtQ)
|
||||
{
|
||||
return ( Quaternion( qtQ.w, -qtQ.x, -qtQ.y, -qtQ.z)) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Opposto di un quaternione
|
||||
//----------------------------------------------------------------------------
|
||||
inline const Quaternion
|
||||
operator-( const Quaternion& qtQ)
|
||||
{
|
||||
return ( Quaternion( -qtQ.w, - qtQ.x, - qtQ.y, - qtQ.z)) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Somma di due quaternioni
|
||||
//----------------------------------------------------------------------------
|
||||
inline const Quaternion
|
||||
operator+( const Quaternion& qtQ1, const Quaternion& qtQ2)
|
||||
{
|
||||
return ( Quaternion( qtQ1.w + qtQ2.w, qtQ1.x + qtQ2.x, qtQ1.y + qtQ2.y, qtQ1.z + qtQ2.z)) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Sottrazione di due quaternioni
|
||||
//----------------------------------------------------------------------------
|
||||
inline const Quaternion
|
||||
operator-( const Quaternion& qtQ1, const Quaternion& qtQ2)
|
||||
{
|
||||
return ( Quaternion( qtQ1.w - qtQ2.w, qtQ1.x - qtQ2.x, qtQ1.y - qtQ2.y, qtQ1.z - qtQ2.z)) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Prodotto di un quaternione con uno scalare
|
||||
//----------------------------------------------------------------------------
|
||||
inline const Quaternion
|
||||
operator*( const Quaternion& qtQ, double dMul)
|
||||
{
|
||||
return ( Quaternion( qtQ.w * dMul, qtQ.x * dMul, qtQ.y * dMul, qtQ.z * dMul)) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Prodotto di uno scalare con un quaternione
|
||||
//----------------------------------------------------------------------------
|
||||
inline const Quaternion
|
||||
operator*( double dMul, const Quaternion& qtQ)
|
||||
{
|
||||
return ( Quaternion( qtQ.w * dMul, qtQ.x * dMul, qtQ.y * dMul, qtQ.z * dMul)) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Divisione con uno scalare
|
||||
//----------------------------------------------------------------------------
|
||||
inline const Quaternion
|
||||
operator/( const Quaternion& qtQ, double dDiv)
|
||||
{
|
||||
double dMul = 1 / dDiv ;
|
||||
return ( Quaternion( qtQ.w * dMul, qtQ.x * dMul, qtQ.y * dMul, qtQ.z * dMul)) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Prodotto scalare due quaternioni
|
||||
//----------------------------------------------------------------------------
|
||||
inline double
|
||||
Scalar( const Quaternion& qtQ1, const Quaternion& qtQ2)
|
||||
{
|
||||
return ( qtQ1.w * qtQ2.w + qtQ1.x * qtQ2.x + qtQ2.y * qtQ2.y + qtQ1.z * qtQ2.z) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Prodotto di due quaternioni
|
||||
//----------------------------------------------------------------------------
|
||||
inline const Quaternion
|
||||
operator*( const Quaternion& qtQ1, const Quaternion& qtQ2)
|
||||
{
|
||||
return ( Quaternion( qtQ1.w * qtQ2.w - qtQ1.x * qtQ2.x - qtQ1.y * qtQ2.y - qtQ1.z * qtQ2.z,
|
||||
qtQ1.w * qtQ2.x + qtQ1.x * qtQ2.w + qtQ1.y * qtQ2.z - qtQ1.z * qtQ2.y,
|
||||
qtQ1.w * qtQ2.y + qtQ1.y * qtQ2.w + qtQ1.z * qtQ2.x - qtQ1.x * qtQ2.z,
|
||||
qtQ1.w * qtQ2.z + qtQ1.z * qtQ2.w + qtQ1.x * qtQ2.y - qtQ1.y * qtQ2.x)) ;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2024-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkRotationMinimizingFrame.h Data : 05.04.24 Versione : 2.6d1
|
||||
// Contenuto : Dichiarazione della classe RotationMinimizingFrame.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 05.04.24 RE Creazione modulo.
|
||||
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkCurve.h"
|
||||
#include "/EgtDev/Include/EGkGeoCollection.h"
|
||||
|
||||
//----------------------- Macro per import/export -----------------------------
|
||||
#undef EGK_EXPORT
|
||||
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
||||
#define EGK_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define EGK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class EGK_EXPORT RotationMinimizingFrame
|
||||
{
|
||||
public :
|
||||
RotationMinimizingFrame( void)
|
||||
: m_pCrv( nullptr), m_Frame0() {}
|
||||
~RotationMinimizingFrame( void)
|
||||
{ Clear() ; }
|
||||
bool Set( const ICurve* pCrv, const Frame3d& fr_Start) ;
|
||||
|
||||
public :
|
||||
bool GetFramesByStep( double dStep, bool bUniform, FRAME3DVECTOR& vRMFrames) ;
|
||||
bool GetFramesBySplit( int nIntervals, FRAME3DVECTOR& vRMFrames) ;
|
||||
bool GetFramesByTolerance( double dTol, FRAME3DVECTOR& vRMFrames) ;
|
||||
|
||||
private :
|
||||
bool Clear( void) ;
|
||||
bool IsValid( void) ;
|
||||
bool GetFrameAtParam( const Frame3d& frAct, const double dParNext, Frame3d& frNext) ;
|
||||
|
||||
private :
|
||||
ICurve* m_pCrv ; // curva per il calcolo del rotation Xplane frame
|
||||
Frame3d m_Frame0 ; // frame iniziale della curva
|
||||
} ;
|
||||
@@ -0,0 +1,51 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2024-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkRotationXplaneFrame.h Data : 05.04.24 Versione : 2.6d1
|
||||
// Contenuto : Dichiarazione della classe RotationXplaneFrame.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 05.04.24 DS Creazione modulo.
|
||||
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkCurve.h"
|
||||
#include "/EgtDev/Include/EGkGeoCollection.h"
|
||||
|
||||
//----------------------- Macro per import/export -----------------------------
|
||||
#undef EGK_EXPORT
|
||||
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
||||
#define EGK_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define EGK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class EGK_EXPORT RotationXplaneFrame
|
||||
{
|
||||
public :
|
||||
RotationXplaneFrame( void)
|
||||
: m_pCrv( nullptr), m_vtNorm(), m_vtNearX() {}
|
||||
~RotationXplaneFrame( void)
|
||||
{ Clear() ; }
|
||||
bool Set( const ICurve* pCrv, const Vector3d& vtNorm, const Vector3d& vtNearX = V_NULL) ;
|
||||
|
||||
public :
|
||||
bool GetFramesByStep( double dStep, bool bUniform, FRAME3DVECTOR& vRXFrames) ;
|
||||
bool GetFramesBySplit( int nIntervals, FRAME3DVECTOR& vRXFrames) ;
|
||||
bool GetFramesByTolerance( double dTol, FRAME3DVECTOR& vRXFrames) ;
|
||||
|
||||
private :
|
||||
bool Clear( void) ;
|
||||
bool IsValid( void) ;
|
||||
bool GetFrameAtParam( const Frame3d& frAct, const double dParNext, Frame3d& frNext) ;
|
||||
|
||||
private :
|
||||
ICurve* m_pCrv ; // curva per il calcolo del rotation Xplane frame
|
||||
Vector3d m_vtNorm ; // vettore normale al piano in cui deve sempre giacere l'asse X
|
||||
Vector3d m_vtNearX ; // vettore a cui deve essere il più vicino possibile la direzione X iniziale
|
||||
} ;
|
||||
@@ -0,0 +1,51 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2024-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkSbzFromCurves.h Data : 07.05.24 Versione : 2.6d2
|
||||
// Contenuto : Prototipi funzioni di creazione TriMesh a partire da curve.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 07.05.24 DB Creazione modulo.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkCurve.h"
|
||||
#include "/EgtDev/Include/EGkSurfFlatRegion.h"
|
||||
#include "/EgtDev/Include/EGkSurfTriMesh.h"
|
||||
#include "/EgtDev/Include/EGkSurfBezier.h"
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
#undef EGK_EXPORT
|
||||
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
||||
#define EGK_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define EGK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
////----------------------------------------------------------------------------
|
||||
//enum RS_CAP { RSCAP_NONE = 0, RSCAP_FLAT = 1, RSCAP_ROUND = 2, RSCAP_BEVEL = 3} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT ISurfBezier* GetSurfBezierByFlatContour( const ICurve* pCurve, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfBezier* GetSurfBezierByRegion( const CICURVEPVECTOR& vpCurve, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfBezier* GetSurfBezierByExtrusion( const ICurve* pCurve, const Vector3d& vtExtr,
|
||||
bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
|
||||
//EGK_EXPORT ISurfBezier* GetSurfBezierByRegionExtrusion( const CICURVEPVECTOR& vpCurve, const Vector3d& vtExtr,
|
||||
// double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfBezier* GetSurfBezierByRevolve( const ICurve* pCurve, const Point3d& ptAx,
|
||||
const Vector3d& vtAx, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfBezier* GetSurfBezierByScrewing( const ICurve* pCurve, const Point3d& ptAx, const Vector3d& vtAx,
|
||||
double dAngRotDeg, double dMove, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
|
||||
//EGK_EXPORT ISurfBezier* GetSurfBezierRectSwept( double dDimH, double dDimV, double dBevelH, double dBevelV,
|
||||
// const ICurve* pGuide, int nCapType, double dLinTol = 10 * EPS_SMALL) ;
|
||||
//EGK_EXPORT ISurfBezier* GetSurfBezierTransSwept( const ICurve* pSect, const ICurve* pGuide, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfBezier* GetSurfBezierRuled( const Point3d& ptP, const ICurve* pCurve, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfBezier* GetSurfBezierRuled( const ICurve* pCurve1, const ICurve* pCurve2, int nType, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfBezier* GetSurfBezierRuledSmooth( const ICurve* pCurve1, const ICurve* pCurve2, BIPNTVECTOR& vSyncLines, double dSampleLen = 10) ;
|
||||
EGK_EXPORT ISurfBezier* GetSurfBezierRuledGuided( const ICurve* pCurve1, const ICurve* pCurve2, const BIPNTVECTOR& vCrv, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfBezier* GetSurfBezierSkinned( const CICURVEPVECTOR& vCrv, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfBezier* GetSurfBezierSweptInPlane( const ICurve* pSect, const ICurve* pGuide, const Vector3d& vtNorm, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfBezier* GetSurfBezierSwept3d( const ICurve* pSect, const ICurve* pGuide, const Vector3d& vtNorm, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
|
||||
@@ -24,4 +24,4 @@
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT ISurfBezier* CreateBezierSphere( const Point3d& ptCenter, double dR) ;
|
||||
EGK_EXPORT ISurfBezier* GetSurfBezierSphere( const Point3d& ptCenter, double dR) ;
|
||||
@@ -36,6 +36,8 @@ struct SelData {
|
||||
: nId( nI), nSub( SEL_SUB_ALL) {}
|
||||
SelData( int nI, int nS)
|
||||
: nId( nI), nSub( nS) {}
|
||||
bool operator == ( const SelData& other) const
|
||||
{ return ( nId == other.nId && nSub == other.nSub) ; }
|
||||
} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
+4
-1
@@ -30,11 +30,14 @@ EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionRectangle( double dWidth, double dL
|
||||
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionStadium( double dWidth, double dLen) ;
|
||||
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionDisk( double dRadius) ;
|
||||
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromFatCurve( ICurve* pCrv, double dRadius,
|
||||
bool bSquareEnds, bool bSquareMids, double dOffsLinTol = 10 * EPS_SMALL) ;
|
||||
bool bSquareEnds, bool bSquareMids, double dOffsLinTol = 10 * EPS_SMALL,
|
||||
bool bMergeOnlySameProps = true) ;
|
||||
// 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) ;
|
||||
EGK_EXPORT bool CalcRegionPolyLines( const POLYLINEVECTOR& vPL, Vector3d& vtN, INTMATRIX& vnPLIndMat, BOOLVECTOR& vbInvert) ; // la funzione restituisce una matrice con la struttura dei chunk e un vettore che indica se invertire le polyline
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class SurfFlatRegionByContours
|
||||
|
||||
+7
-3
@@ -1,8 +1,8 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkStmFromCurves.h Data : 27.02.24 Versione : 2.6b4
|
||||
// Contenuto : Dichiarazione della classe StmFromTriangleSoup.
|
||||
// File : EGkStmFromCurves.h Data : 27.02.24 Versione : 2.6d1
|
||||
// Contenuto : Prototipi funzioni di creazione TriMesh a partire da curve.
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -14,6 +14,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkCurve.h"
|
||||
#include "/EgtDev/Include/EGkSurfFlatRegion.h"
|
||||
#include "/EgtDev/Include/EGkSurfTriMesh.h"
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
@@ -40,7 +41,10 @@ EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByScrewing( const ICurve* pCurve, const P
|
||||
double dAngRotDeg, double dMove, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRectSwept( double dDimH, double dDimV, double dBevelH, double dBevelV,
|
||||
const ICurve* pGuide, int nCapType, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshSwept( const ICurve* pSect, const ICurve* pGuide, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshSwept( const ICurve* pSect, const ICurve* pGuide, const Vector3d& vtAx,
|
||||
bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshSwept( const ISurfFlatRegion* pSfrSect, const ICurve* pGuide, const Vector3d& vtAx,
|
||||
bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshTransSwept( const ICurve* pSect, const ICurve* pGuide, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRuled( const Point3d& ptP, const ICurve* pCurve, double dLinTol = 10 * EPS_SMALL) ;
|
||||
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRuled( const ICurve* pCurve1, const ICurve* pCurve2, int nType, double dLinTol = 10 * EPS_SMALL) ;
|
||||
|
||||
+6
-3
@@ -1,13 +1,13 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2015
|
||||
// EgalTech 2015-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkStmStandard.h Data : 31.03.15 Versione : 1.6c7
|
||||
// File : EGkStmStandard.h Data : 04.12.24 Versione : 2.6l2
|
||||
// Contenuto : Dichiarazione funzioni per creazione superfici Stm
|
||||
// standard : Box, Pyramid, Cylinder, Sphere, Cone.
|
||||
//
|
||||
//
|
||||
// Modifiche : 31.03.15 DS Creazione modulo.
|
||||
//
|
||||
// 04.12.24 DS Aggiunta GetSurfTriMeshEmpty.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -24,10 +24,13 @@
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshEmpty( void) ;
|
||||
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshBox( double dDimX, double dDimY, double dHeight, bool bRegular = false) ;
|
||||
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) ;
|
||||
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshPyramidFrustum( double dBaseDimX, double dBaseDimY, double dTopDimX, double dTopDimY, double dHeight) ;
|
||||
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshConeFrustum( double dBaseRad, double dTopRad, double dHeight, double dLinTol) ;
|
||||
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshPlaneInBox( const Plane3d& plPlane, const BBox3d& b3Box, bool bOnEq = false, bool bOnCt = false) ;
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#include "/EgtDev/Include/EGkCurveComposite.h"
|
||||
#include "/EgtDev/Include/EGkSurf.h"
|
||||
#include "/EgtDev/Include/EGkSurfFlatRegion.h"
|
||||
#include "/EgtDev/Include/EGkGeoCollection.h"
|
||||
|
||||
|
||||
@@ -59,3 +60,8 @@ struct SNurbsSurfData
|
||||
//! Trasforma una superficie Nurbs standard in una nuova superficie di Bezier semplice o composta
|
||||
EGK_EXPORT bool NurbsSurfaceCanonicalize( SNurbsSurfData& snData) ;
|
||||
EGK_EXPORT ISurf* NurbsToBezierSurface( const SNurbsSurfData& snData) ;
|
||||
//! Per rendere uniforme lo spazio parametrico passando da Nurbs a MultiBezier
|
||||
EGK_EXPORT bool MakeUniform( ISurfFlatRegion*& pSfr, bool& bRescaled, const DBLVECTOR& vU0, const DBLVECTOR& vV0,
|
||||
int nDegU, int nDegV, double dScaleU, double dScaleV, bool bRetry) ;
|
||||
//! Per identificare su che edge è il punto
|
||||
EGK_EXPORT bool OnWhichEdge( double u0, double u1, double v0, double v1, const Point3d& ptToAssign, int& nEdge) ;
|
||||
|
||||
+49
-10
@@ -1,13 +1,13 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2020-2020
|
||||
// EgalTech 2020-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkSurfBezier.h Data : 22.03.20 Versione : 2.2c3
|
||||
// File : EGkSurfBezier.h Data : 22.08.25 Versione : 2.7h1
|
||||
// Contenuto : Dichiarazione della interfaccia ISurfBezier.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 22.03.20 DS Creazione modulo.
|
||||
//
|
||||
// 22.08.25 DS Aggiunte funzioni globali di impostazione tolleranze.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -17,6 +17,15 @@
|
||||
#include "/EgtDev/Include/EGkCurveComposite.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
#undef EGK_EXPORT
|
||||
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
||||
#define EGK_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define EGK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
//----------------------- Forward --------------------------------------------
|
||||
class PolyLine ;
|
||||
class ICurveComposite ;
|
||||
class ISurfFlatRegion ;
|
||||
@@ -28,6 +37,15 @@ class __declspec( novtable) ISurfBezier : public ISurf
|
||||
public :
|
||||
enum Side { FROM_MINUS = -1, // da valori inferiori del parametro
|
||||
FROM_PLUS = 1} ; // da valori superiori del parametro
|
||||
public :
|
||||
enum RuledType { RLT_B_ISOPAR = 0, // con parametrizzazione simile tra le due curve
|
||||
RLT_B_MINDIST = 1, // con distanza minima tra le due curve, usando start e end delle curve presenti
|
||||
RLT_B_MINDIST_PLUS = 2, // con distanza minima tra le due curve, aggiungendo punti lungo le curve dove necessario
|
||||
RLT_B_LENPAR = 3} ; // aggiungo punti alla curve in modo da matchare meglio le sottocurve, inoltre parametrizzo le curve in base alla lunghezza e non al numero di curve
|
||||
enum Is_Planar { NOT_CALCULATED = -1,
|
||||
NOT_PLANAR_SURF = 0 ,
|
||||
PLANAR_SURF = 1} ;
|
||||
|
||||
public : // IGeoObj
|
||||
ISurfBezier* Clone( void) const override = 0 ;
|
||||
public :
|
||||
@@ -45,6 +63,7 @@ class __declspec( novtable) ISurfBezier : public ISurf
|
||||
virtual double GetControlWeight( int nIndU, int nIndV, bool* pbOk) const = 0 ;
|
||||
virtual double GetControlWeight( int nInd, bool* pbOk) const = 0 ;
|
||||
virtual bool IsAPoint( void) const = 0 ;
|
||||
virtual bool GetPoint( double dU, double dV, Side nUs, Side nVs, Point3d& ptPos) const = 0;
|
||||
virtual bool GetPointD1D2( double dU, double dV, Side nUs, Side nVs,
|
||||
Point3d& ptPos,
|
||||
Vector3d* pvtDerU = nullptr, Vector3d* pvtDerV = nullptr,
|
||||
@@ -55,28 +74,42 @@ class __declspec( novtable) ISurfBezier : public ISurf
|
||||
Vector3d* pvtDerUU = nullptr, Vector3d* pvtDerVV = nullptr, Vector3d* pvtDerUV = nullptr) const = 0 ;
|
||||
virtual ICurveComposite* GetCurveOnU( double dV) const = 0 ;
|
||||
virtual ICurveComposite* GetCurveOnV( double dU) const = 0 ;
|
||||
virtual ICurveComposite* GetLoop( int nLoop) const = 0 ; // nLoop 0-based (1°esterno, successivi interni)
|
||||
virtual ICurveComposite* GetLoop( int nLoop) const = 0 ; // nLoop 0-based (1°esterno, successivi interni)
|
||||
virtual bool GetControlCurveOnU( int nIndV, PolyLine& plCtrlU) const = 0 ;
|
||||
virtual bool GetControlCurveOnV( int nIndU, PolyLine& plCtrlV) const = 0 ;
|
||||
virtual const ISurfTriMesh* GetAuxSurf( void) const = 0 ;
|
||||
virtual bool GetLeaves ( std::vector<std::tuple<int, Point3d, Point3d>>& vLeaves) const = 0 ;
|
||||
virtual const ISurfTriMesh* GetAuxSurfRefined( void) const = 0 ;
|
||||
virtual ISurfTriMesh* GetApproxSurf( double dTol, double dSideMin = 10 * EPS_SMALL, bool bUpdateEdges = false) const = 0 ;
|
||||
virtual bool GetLeaves( std::vector<std::tuple<int, Point3d, Point3d>>& vLeaves, bool bRefined = false) const = 0 ;
|
||||
virtual bool GetTriangles2D( std::vector<std::tuple<int,Point3d, Point3d, Point3d>>& vTria2D) const = 0 ;
|
||||
virtual bool UnprojectPointFromStm( int nT, const Point3d& ptI, Point3d& ptSP, int nIL) const = 0 ;
|
||||
virtual bool UnprojectPointFromStm( int nT, const Point3d& ptI, Point3d& ptSP, int nIL = 5) const = 0 ;
|
||||
virtual bool UnprojectPointFromStm( int nT, const Point3d& ptI, Point3d& ptSP, int nIL, const Point3d& ptIPrev, bool* bTroughEdge = nullptr) const = 0 ;
|
||||
virtual bool UnprojectPoint( const Point3d& pt3D, Point3d& ptParam, const Point3d& ptIPrev, bool* bTroughEdge = nullptr, const Plane3d* plCut = nullptr) const = 0 ;
|
||||
virtual bool UnprojectCurveFromStm( const ICurveComposite* pCC, ICRVCOMPOPVECTOR& vpCC, const Plane3d* pPlCut) const = 0 ;
|
||||
// taglio la parte della superficie dalla parte positiva del versore del piano.
|
||||
// Il booleano indica se tenere eventuali triangoli della trimesh ausiliaria che sono coplanari ed equiversi al piano di taglio
|
||||
virtual bool Cut( const Plane3d& plPlane, bool bSaveOnEq) = 0 ;
|
||||
// funzione da chiamare per calcolare i poli della superficie. NECESSARIO se si vuole tagliare la superficie con un piano
|
||||
virtual bool CalcPoles( void) ;
|
||||
virtual bool IncreaseUV( double& dU, double dx, bool bUOrV, double* dUVCopy = nullptr, bool bModifyOrig = true) const = 0 ;
|
||||
virtual bool IncreaseUV( Point3d& ptUV, Vector3d vtH , Point3d* ptUVCopy, bool bModifyOrig) const = 0 ;
|
||||
virtual bool GetLoops( ICRVCOMPOPOVECTOR& vCC, bool bLineOrBezier, int nEdge = -1) const = 0 ;
|
||||
virtual bool GetLoops( ICRVCOMPOPOVECTOR& vCC, bool bLineOrBezier) const = 0 ;
|
||||
virtual ICurveComposite* GetSingleEdge3D( bool bLineOrBezier, int nEdge) const = 0 ;
|
||||
virtual bool IsPlanar( void) const = 0 ;
|
||||
virtual bool CreateByFlatContour( const PolyLine& PL) = 0 ;
|
||||
virtual bool CreateByRegion( const POLYLINEVECTOR& vPL) = 0 ;
|
||||
virtual bool CreateByExtrusion( const ICurve* pCrv, const Vector3d& vtExtr) = 0 ;
|
||||
virtual bool CreateByScrewing( const ICurve* pCurve, const Point3d& ptAx, const Vector3d& vtAx, double dAngRotDeg, double dMove) = 0 ;
|
||||
virtual bool CreateByPointCurve( const Point3d& pt, const ICurve* pCurve) = 0 ;
|
||||
virtual bool CreateByTwoCurves( const ICurve* pCurve1, const ICurve* pCurve2, int nType) = 0 ;
|
||||
virtual bool CreateBySetOfCurves( const ICURVEPOVECTOR& vCrvBez, bool bReduceToDeg3 = true) = 0 ;
|
||||
virtual bool RemoveCollapsedSpans() = 0 ;
|
||||
virtual PNTVECTOR GetAllControlPoints( void) const = 0 ;
|
||||
virtual bool LimitSurfToTrimmedRegion( void) = 0 ;
|
||||
virtual bool CreateSmoothRuledByTwoCurves( const ICurve* pCurve0, const ICurve* pCurve1, double dSampleLen) = 0 ;
|
||||
virtual bool CreateSmoothRuledByTwoCurves( const ICurve* pCurve0, const ICurve* pCurve1, double dSampleLen, BIPNTVECTOR& vSyncLines) = 0 ;
|
||||
} ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static const double SBZ_TREG_COEFF = 1000 ;
|
||||
static const double SBZ_TREG_COEFF = PREC_SCALE_COEFF ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
inline ISurfBezier* CreateSurfBezier( void)
|
||||
@@ -94,6 +127,12 @@ inline ISurfBezier* GetSurfBezier( IGeoObj* pGObj)
|
||||
return nullptr ;
|
||||
return (static_cast<ISurfBezier*>(pGObj)) ; }
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT void SetSurfBezierAuxSurfTol( double dTol) ;
|
||||
EGK_EXPORT double GetSurfBezierAuxSurfTol( void) ;
|
||||
EGK_EXPORT void SetSurfBezierAuxSurfRefinedTol( double dTol) ;
|
||||
EGK_EXPORT double GetSurfBezierAuxSurfRefinedTol( void) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Raccolte di puntatori a ISurfBezier
|
||||
typedef std::vector<const ISurfBezier*> CISURFBEZPVECTOR ; // vettore di puntatori a const ISurfBezier
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2025-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkSurfBzRuledFromStmFaces.h Data : 15.09.25 Versione : 2.7j1
|
||||
// Contenuto : Calcolo di una superficie di Bezier Ruled definita da un sottoinsieme
|
||||
// di facce di una superficie TriMesh
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 15.09.25 RE Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "EGkSelection.h"
|
||||
#include "EGkCurveLine.h"
|
||||
#include "/EgtDev/Include/EGkSurfBezier.h"
|
||||
#include "/EgtDev/Include/EGkSurfTriMesh.h"
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
#undef EGK_EXPORT
|
||||
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
||||
#define EGK_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define EGK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool GetBezierEdgeCurvesFromSurfs( const CISURFPVECTOR& vSurf, const SELVECTOR& vSurfFace,
|
||||
double dLinTol, double dAngTol, const BIPNTVECTOR& vBreakingPts,
|
||||
ICRVCOMPOPOVECTOR& vBezierEdges) ;
|
||||
EGK_EXPORT bool GetSyncPointsFromBezierCurves( const ICurveComposite* pEdge0, const ICurveComposite* pEdge1,
|
||||
ICRVLINEPOVECTOR& vLines) ;
|
||||
EGK_EXPORT bool GetAdjStmFacesInTol( const ISurfTriMesh* pStm, const INTVECTOR& vFaceRef, double dAngTol,
|
||||
INTVECTOR& vOtherFaces, double dCurvature) ;
|
||||
+24
-11
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2015
|
||||
// EgalTech 2015-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkSurfFlatRegion.h Data : 05.08.15 Versione : 1.6h2
|
||||
// File : EGkSurfFlatRegion.h Data : 18.07.24 Versione : 2.6g5
|
||||
// Contenuto : Dichiarazione della interfaccia ISurfFlatRegion.
|
||||
//
|
||||
//
|
||||
@@ -27,7 +27,7 @@ class __declspec( novtable) ISurfFlatRegion : public ISurf
|
||||
ISurfFlatRegion* Clone( void) const override = 0 ;
|
||||
public :
|
||||
virtual bool CopyFrom( const IGeoObj* pGObjSrc) = 0 ;
|
||||
virtual bool Clear( void) ;
|
||||
virtual bool Clear( void) = 0 ;
|
||||
virtual bool AddExtLoop( const ICurve& cCrv) = 0 ;
|
||||
virtual bool AddExtLoop( ICurve* pCrv) = 0 ;
|
||||
virtual bool AddIntLoop( const ICurve& cCrv) = 0 ;
|
||||
@@ -40,18 +40,31 @@ class __declspec( novtable) ISurfFlatRegion : public ISurf
|
||||
virtual bool GetGrossArea( double& dArea) const = 0 ;
|
||||
virtual const Point3d& GetPlanePoint( void) const = 0 ;
|
||||
virtual const Vector3d& GetNormVersor( void) const = 0 ;
|
||||
virtual bool CalcVoronoiDiagram( ICURVEPOVECTOR& vCrvs, int nBound = 3) const = 0 ;
|
||||
virtual void ResetVoronoiObject( void) const = 0 ;
|
||||
virtual bool GetMaxOffset( double& dOffs) const = 0 ;
|
||||
virtual bool CalcMedialAxis( ICURVEPOVECTOR& vCrvs, int nSide = 1) const = 0 ;
|
||||
virtual const ISurfTriMesh* GetAuxSurf( void) const = 0 ;
|
||||
virtual bool GetCurveClassification( const ICurve& Crv, double dLenMin, CRVCVECTOR& ccClass) const = 0 ;
|
||||
virtual int GetChunkCount( void) const = 0 ;
|
||||
virtual ISurfFlatRegion* CloneChunk( int nChunk) const = 0 ;
|
||||
virtual bool EraseChunk(int nChunk) = 0 ;
|
||||
virtual bool GetChunkCentroid( int nChunk, Point3d& ptCen) const = 0 ;
|
||||
virtual bool GetChunkArea( int nChunk, double& dArea) const = 0 ;
|
||||
virtual bool GetChunkPerimeter( int nChunk, double& dLen) const = 0 ;
|
||||
virtual int GetChunkSimpleClassification( int nChunk, const ISurfFlatRegion& Other, int nOthChunk) const = 0 ; // compare only outsides
|
||||
virtual bool CheckChunkInterference( int nChunk, const ISurfFlatRegion& Other, int nOthChunk, bool& bInterference) const = 0 ;
|
||||
virtual bool GetChunkMaxOffset( int nChunk, double& dOffs) const = 0 ;
|
||||
virtual int GetLoopCount( int nChunk) const = 0 ;
|
||||
virtual int GetLoopCurveCount( int nChunk, int nLoop) const = 0 ;
|
||||
virtual ICurve* GetLoop( int nChunk, int nLoop) const = 0 ; // nChunk 0-based, nLoop 0-based (1°esterno, successivi interni)
|
||||
virtual bool ApproxLoopWithLines( int nChunk, int nLoop, double dLinTol, double dAngTolDeg, int nType, PolyLine& PL) const = 0 ;
|
||||
virtual const ISurfTriMesh* GetAuxSurf( void) const = 0 ;
|
||||
virtual ISurfFlatRegion* CloneChunk( int nChunk) const = 0 ;
|
||||
virtual bool GetChunkCentroid( int nChunk, Point3d& ptCen) const ;
|
||||
virtual bool GetCurveClassification( const ICurve& Crv, double dLenMin, CRVCVECTOR& ccClass) const = 0 ;
|
||||
virtual int GetChunkSimpleClassification( int nChunk, const ISurfFlatRegion& Other, int nOthChunk) const ; // compare only outsides
|
||||
virtual bool CalcVoronoiDiagram( ICURVEPOVECTOR& vCrvs, int nBound = 3) const = 0 ;
|
||||
virtual bool CalcMedialAxis( ICURVEPOVECTOR& vCrvs, int nSide = 1) const = 0 ;
|
||||
virtual void ResetVoronoiObject( void) const = 0 ;
|
||||
virtual bool SetCurveTempProp( int nChunk, int nLoop, int nCrv, int nProp, int nPropInd = 0) = 0 ;
|
||||
virtual bool GetCurveTempProp( int nChunk, int nLoop, int nCrv, int& nProp, int nPropInd = 0) const = 0 ;
|
||||
virtual bool ResetAllCurveTempProps( void) = 0 ;
|
||||
virtual bool SetCurveTempParam( int nChunk, int nLoop, int nCrv, double dParam, int nParamInd = 0) = 0 ;
|
||||
virtual bool GetCurveTempParam( int nChunk, int nLoop, int nCrv, double& dParam, int nParamInd = 0) const = 0 ;
|
||||
virtual bool ResetAllCurveTempParams( void) = 0 ;
|
||||
} ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
+23
-4
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2017-2017
|
||||
// EgalTech 2017-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkSurfLocal.h Data : 29.03.17 Versione : 1.8c3
|
||||
// File : EGkSurfLocal.h Data : 08.04.24 Versione : 2.6d2
|
||||
// Contenuto : Classe gestione superfici nel locale desiderato.
|
||||
//
|
||||
//
|
||||
@@ -23,7 +23,7 @@ class SurfLocal
|
||||
SurfLocal( IGeomDB* pGeomDB, int nSrfId, const Frame3d& frLoc)
|
||||
: m_pSrf( nullptr), m_pCopy( nullptr)
|
||||
{ // verifica dei parametri
|
||||
if ( pGeomDB == nullptr || &frLoc == nullptr)
|
||||
if ( pGeomDB == nullptr)
|
||||
return ;
|
||||
// recupero riferimento della superficie
|
||||
Frame3d frSrf ;
|
||||
@@ -45,6 +45,25 @@ class SurfLocal
|
||||
m_pCopy->LocToLoc( frSrf, frLoc) ;
|
||||
m_pSrf = m_pCopy ;
|
||||
}
|
||||
SurfLocal( const ISurf* pSurf, const Frame3d& frSrf, const Frame3d& frLoc)
|
||||
: m_pSrf( nullptr), m_pCopy( nullptr)
|
||||
{ // verifica dei parametri
|
||||
if ( pSurf == nullptr)
|
||||
return ;
|
||||
// assegno la superficie originale
|
||||
m_pSrf = pSurf ;
|
||||
// se i riferimenti coincidono non devo fare altro
|
||||
if ( AreSameFrame( frSrf, frLoc))
|
||||
return ;
|
||||
// copio la superficie e la porto in locale
|
||||
m_pCopy = m_pSrf->Clone() ;
|
||||
if ( m_pCopy == nullptr) {
|
||||
m_pSrf = nullptr ;
|
||||
return ;
|
||||
}
|
||||
m_pCopy->LocToLoc( frSrf, frLoc) ;
|
||||
m_pSrf = m_pCopy ;
|
||||
}
|
||||
SurfLocal( const SurfLocal& Other)
|
||||
: m_pSrf( nullptr), m_pCopy( nullptr)
|
||||
{ // se non devo clonare
|
||||
@@ -57,7 +76,7 @@ class SurfLocal
|
||||
return ;
|
||||
m_pSrf = m_pCopy ;
|
||||
}
|
||||
SurfLocal( SurfLocal&& Other)
|
||||
SurfLocal( SurfLocal&& Other) noexcept
|
||||
: m_pSrf( Other.m_pSrf), m_pCopy( Other.m_pCopy)
|
||||
{ // annullo gli originali
|
||||
Other.m_pSrf = nullptr ;
|
||||
|
||||
+19
-4
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2014-2024
|
||||
// EgalTech 2014-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkSurfTriMesh.h Data : 05.03.24 Versione : 2.6c2
|
||||
// File : EGkSurfTriMesh.h Data : 28.03.25 Versione : 2.7c4
|
||||
// Contenuto : Dichiarazione della interfaccia ISurfTriMesh.
|
||||
//
|
||||
//
|
||||
@@ -50,7 +50,7 @@ class __declspec( novtable) ISurfTriMesh : public ISurf
|
||||
virtual bool RemoveTriangle( int nId) = 0 ;
|
||||
virtual bool AdjustTopology( void) = 0 ;
|
||||
virtual bool CreateByFlatContour( const PolyLine& PL) = 0 ;
|
||||
virtual bool CreateByRegion( const POLYLINEVECTOR& vPL) = 0 ;
|
||||
virtual bool CreateByPolygonWithHoles( const POLYLINEVECTOR& vPL) = 0 ;
|
||||
virtual bool CreateByExtrusion( const PolyLine& PL, const Vector3d& vtExtr) = 0 ;
|
||||
virtual bool CreateByPointCurve( const Point3d& ptP, const PolyLine& PL) = 0 ;
|
||||
virtual bool CreateByTwoCurves( const PolyLine& PL1, const PolyLine& PL2, int nRuledType) = 0 ;
|
||||
@@ -89,6 +89,7 @@ class __declspec( novtable) ISurfTriMesh : public ISurf
|
||||
virtual ISurfTriMesh* CloneTriangle( int nTria) const = 0 ;
|
||||
virtual bool GetLoops( POLYLINEVECTOR& vPL) const = 0 ;
|
||||
virtual bool GetSilhouette( const Vector3d& vtDir, double dTol, POLYLINEVECTOR& vPL, bool bAllTria = false) const = 0 ;
|
||||
virtual bool GetSilhouette( const Plane3d& plPlane, double dTol, POLYLINEVECTOR& vPL, bool bAllTria = false) const = 0 ;
|
||||
virtual int GetFacetCount( void) const = 0 ;
|
||||
virtual int GetFacetSize( void) const = 0 ;
|
||||
virtual int GetFacetFromTria( int nT) const = 0 ;
|
||||
@@ -112,20 +113,34 @@ class __declspec( novtable) ISurfTriMesh : public ISurf
|
||||
virtual bool GetEdge( int nInd, int& nV1, int& nV2, int& nFl, int& nFr, double& dAng) const = 0 ;
|
||||
virtual bool GetEdge( int nInd, Point3d& ptP1, Point3d& ptP2, double& dAng) const = 0 ;
|
||||
virtual bool GetEdges( ICURVEPOVECTOR& vpCurve) const = 0 ;
|
||||
virtual bool GetCurvature( int nV,
|
||||
double& dMinK, Vector3d& vtMinK, double& dMaxK, Vector3d& vtMaxK, bool& bPlanar, Vector3d& vtNorm) const = 0 ;
|
||||
virtual bool Cut( const Plane3d& plPlane, bool bSaveOnEq) = 0 ;
|
||||
virtual bool GeneralizedCut( const ICurve& cvCurve, bool bSaveOnEq) = 0 ;
|
||||
virtual bool Add( const ISurfTriMesh& Other) = 0 ;
|
||||
virtual bool Intersect( const ISurfTriMesh& Other) = 0 ;
|
||||
virtual bool Subtract( const ISurfTriMesh& Other) = 0 ;
|
||||
virtual bool GetSurfClassification( const ISurfTriMesh& ClassifierSurf,
|
||||
INTVECTOR& vTriaIn, INTVECTOR& vTriaOut, INTVECTOR& vTriaOnP, INTVECTOR& vTriaOnM, INTVECTOR& vTriaIndef) = 0 ;
|
||||
INTVECTOR& vTriaIn, INTVECTOR& vTriaOut, INTVECTOR& vTriaOnP, INTVECTOR& vTriaOnM, INTVECTOR& vTriaIndef) = 0 ;
|
||||
virtual bool CutWithOtherSurf( const ISurfTriMesh& CutterSurf, bool bInVsOut, bool bSaveOnEq) = 0 ;
|
||||
virtual bool Repair( double dMaxEdgeLen = MAX_EDGE_LEN_STD) = 0 ;
|
||||
virtual bool GetAllTriaOverlapBox( const BBox3d& b3Box, INTVECTOR& vT) const = 0 ;
|
||||
virtual const BBox3d& GetAllTriaBox( void) const = 0 ;
|
||||
virtual int GetShellCount( void) const = 0 ;
|
||||
virtual bool GetShellArea( int nShell, double& dArea) const = 0 ;
|
||||
virtual bool RemoveShell( int nShell) = 0 ;
|
||||
virtual ISurfTriMesh* CloneShell( int nShell) const = 0 ;
|
||||
virtual bool GetPartLocalBBox( int nP, BBox3d& b3Loc) const = 0 ;
|
||||
virtual bool GetPartBBox( int nP, const Frame3d& frRef, BBox3d& b3Ref) const = 0 ;
|
||||
virtual int GetPartCount( void) const = 0 ;
|
||||
virtual bool GetPartArea( int nPart, double& dArea) const = 0 ;
|
||||
virtual bool GetPartVolume( int nPart, double& dVolume) const = 0 ;
|
||||
virtual bool GetPartLoops( int nPart, POLYLINEVECTOR& vPL) const = 0 ;
|
||||
virtual bool RemovePart( int nPart) = 0 ;
|
||||
virtual ISurfTriMesh* ClonePart( int nPart) const = 0 ;
|
||||
virtual bool GetPartAndShellFromFacet( int nFacet, int& nPart, int& nShell) const = 0 ;
|
||||
virtual bool SetTFlag( int nId, int nTFlag) = 0 ;
|
||||
virtual bool GetTFlag( int nId, int& nFlag) const = 0 ;
|
||||
virtual int GetMaxTFlag( void) const = 0 ;
|
||||
virtual bool ResetTFlags( void) = 0 ;
|
||||
} ;
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2025-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkSurfTriMeshAux.h Data : 07.07.25 Versione : 2.7g1
|
||||
// Contenuto : Funzioni ausiliarie per ISurfTriMesh.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 07.07.25 DS Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkSurfTriMesh.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Costanti per offset
|
||||
static int STMOFF_FILLET = 0 ;
|
||||
static int STMOFF_CHAMFER = 1 ;
|
||||
static int STMOFF_EXTEND = 2 ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Funzioni per Offset di singola superficie
|
||||
EGK_EXPORT ISurfTriMesh* CreateSurfTriMeshOffset( const ISurfTriMesh* pStm, double dOffs, double dPrec, int nType = STMOFF_FILLET) ;
|
||||
EGK_EXPORT ISurfTriMesh* CreateSurfTriMeshThickeningOffset( const ISurfTriMesh* pStm, double dOffs, double dPrec, int nType = STMOFF_FILLET) ;
|
||||
// Funzioni per Offset di più superfici
|
||||
EGK_EXPORT ISurfTriMesh* CreateSurfTriMeshesOffset( const CISURFTMPVECTOR& vStm, double dOffs, double dPrec, int nType = STMOFF_FILLET) ;
|
||||
EGK_EXPORT ISurfTriMesh* CreateSurfTriMeshesThickeningOffset( const CISURFTMPVECTOR& vStm, double dOffs, double dPrec, int nType = STMOFF_FILLET) ;
|
||||
// Funzione per Creazione superficie Shell
|
||||
EGK_EXPORT ISurfTriMesh* CreateSurfTriMeshShell( const ISurfTriMesh* pStm, double dThick, double dLinTol) ;
|
||||
@@ -455,6 +455,13 @@ CalcNormal( const Point3d& ptP, const Triangle3d& Tria, const TriNormals3d& Tnor
|
||||
return vtNorm.Normalize( EPS_ZERO) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool
|
||||
CalcNormal( const Point3d& ptP, const Triangle3dEx& Tria, Vector3d& vtNorm)
|
||||
{
|
||||
return CalcNormal( ptP, Tria, Tria.GetTriNormals(), vtNorm) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
enum TriangleType { OPEN = -1, EXACT = 0, CLOSED = 1 };
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2025-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EgkTrimming.h Data : 15.09.25 Versione : 2.7j1
|
||||
// Contenuto : Calcolo di una superficie di Bezier Ruled definita da un sottoinsieme
|
||||
// di facce di una superficie TriMesh
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 15.09.25 RE Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "EGkSelection.h"
|
||||
#include "EGkCurveLine.h"
|
||||
#include "/EgtDev/Include/EGkSurfBezier.h"
|
||||
#include "/EgtDev/Include/EGkSurfTriMesh.h"
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
#undef EGK_EXPORT
|
||||
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
||||
#define EGK_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define EGK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
typedef std::vector<ISURFPOVECTOR> ISURFPOMATRIX ;
|
||||
typedef std::vector<ICRVCOMPOPOVECTOR> ICRVCOMPOPOMATRIX ;
|
||||
|
||||
enum RegolarizeType { STD = 0, // standard, con modifiche dirette ai punti di controllo
|
||||
RMF = 1}; // ricostruendo le curve usando il rotation minimizing frame
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
EGK_EXPORT bool GetTrimmingStmAdjTria( const ISurfTriMesh* pStm, int nStartTria, const Point3d& ptStartTria,
|
||||
double dAngTol, double dSize, double dSizeTol, ISurfTriMesh* pStmAdjTria) ;
|
||||
EGK_EXPORT bool GetTrimmingAdjSurfs( const CISURFPVECTOR& vSurf, const CISURFPVECTOR& vOtherSurf, double dLinTol,
|
||||
double dAngTol, double dFaceAngTol,
|
||||
INTVECTOR& vIndOtherSurf) ;
|
||||
EGK_EXPORT bool GetTrimmingRawEdges( const CISURFPVECTOR& vSurf, const SELVECTOR& vSurfFace,
|
||||
double dLinTol, double dAngTol,
|
||||
ICRVCOMPOPOVECTOR& vBezierEdges) ;
|
||||
EGK_EXPORT bool GetTrimmingBezierEdges( ICRVCOMPOPOVECTOR& vCompoRawEdges, double dLinTol, double dAngTol,
|
||||
ICRVCOMPOPOVECTOR& vCompoEdges) ;
|
||||
EGK_EXPORT bool GetTrimmingFinalBorders( ICRVCOMPOPOVECTOR& vCompoBezierEdges, double dLinTol,
|
||||
double dAngTol, BIPNTVECTOR& vBreakingPts, double dThick, double dThickTol) ;
|
||||
EGK_EXPORT bool GetTrimmingFinalBorders( CISURFPVECTOR& vpSurf, const SELVECTOR& vSurfFaces, double dSurfLinTol,
|
||||
double dSurfAngTol, double dLinTol, double dAngTol, double dThick,
|
||||
ICRVCOMPOPOVECTOR& vCompoBezierEdges) ;
|
||||
EGK_EXPORT ISurfBezier* GetTrimmingRuledBezier( const CISURFPVECTOR& vSurf, const ICurve* pCrvEdge1, const ICurve* pCrvEdge2,
|
||||
double dLinTol, const BIPNTVECTOR& vSyncPoints) ;
|
||||
EGK_EXPORT bool GetTrimmingSurfBzSyncPoints( const ICurve* pCrvEdge1, const ICurve* pCrvEdge2,
|
||||
double dLinTol, BIPNTVECTOR& vSyncPoints) ;
|
||||
EGK_EXPORT bool GetTrimmingSyncInterpolation( const ICurve* pCrvEdge1, const ICurve* pCrvEdge2,
|
||||
const ICurve* pSync1, const ICurve* pSync2, double dLinTol,
|
||||
double dAngTol, BIPNTVECTOR& vSyncPoints) ;
|
||||
EGK_EXPORT bool GetTrimmingHoleBorders( const CISURFPVECTOR& vpSurf, const Point3d& ptRef, double dSurfLinTol,
|
||||
double dSurfAngTol, double dEdgeLinTol, double dEdgeAngTol,
|
||||
double dEdgeThick, ICRVCOMPOPOVECTOR& vHoleBorders) ;
|
||||
EGK_EXPORT ISurfBezier* RegolarizeBordersLocally( const ISurfBezier* pSurfBz, const BIPOINT& bpIsoStart,
|
||||
const BIPOINT& bpIsoEnd, double dTol, int nType = RegolarizeType::STD) ;
|
||||
+25
-25
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2015
|
||||
// EgalTech 2015-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkUserObjFactory.h Data : 22.05.15 Versione : 1.6e3
|
||||
// File : EGkUserObjFactory.h Data : 31.10.25 Versione : 2.7k1
|
||||
// Contenuto : Factory della classe IUserObj.
|
||||
//
|
||||
//
|
||||
@@ -32,29 +32,6 @@
|
||||
#define USEROBJ_CREATE( sName) UserObjFactory::Create( sName)
|
||||
#define USEROBJ_GETLIST( vsList) UserObjFactory::GetList( vsList)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
template <class T>
|
||||
class UserObjRegister
|
||||
{
|
||||
public :
|
||||
static bool DoRegister( const std::string& sName)
|
||||
{ if ( ! UserObjFactory::Register( sName, Create))
|
||||
return false ;
|
||||
GetNamePrivate() = sName ;
|
||||
return true ; }
|
||||
static IUserObj* Create( void)
|
||||
{ return new(nothrow) T ; }
|
||||
static const std::string& GetName( void)
|
||||
{ return GetNamePrivate() ; }
|
||||
|
||||
private :
|
||||
UserObjRegister( void) {}
|
||||
~UserObjRegister( void) {}
|
||||
static std::string& GetNamePrivate( void)
|
||||
{ static std::string s_sName ;
|
||||
return s_sName ; }
|
||||
} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class UserObjFactory
|
||||
{
|
||||
@@ -76,3 +53,26 @@ class UserObjFactory
|
||||
// metodo di accesso alla mappa statica
|
||||
static CreatorMap& GetCreatorMap( void) ;
|
||||
} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
template <class T>
|
||||
class UserObjRegister
|
||||
{
|
||||
public :
|
||||
static bool DoRegister( const std::string& sName)
|
||||
{ if ( ! UserObjFactory::Register( sName, Create))
|
||||
return false ;
|
||||
GetNamePrivate() = sName ;
|
||||
return true ; }
|
||||
static IUserObj* Create( void)
|
||||
{ return new( std::nothrow) T ; }
|
||||
static const std::string& GetName( void)
|
||||
{ return GetNamePrivate() ; }
|
||||
|
||||
private :
|
||||
UserObjRegister( void) {}
|
||||
~UserObjRegister( void) {}
|
||||
static std::string& GetNamePrivate( void)
|
||||
{ static std::string s_sName ;
|
||||
return s_sName ; }
|
||||
} ;
|
||||
|
||||
+41
-18
@@ -45,7 +45,7 @@ class EGK_EXPORT Vector3d
|
||||
void Set( double dX, double dY, double dZ) { x = dX ; y = dY ; z = dZ ; }
|
||||
|
||||
public :
|
||||
//! Verifica la validità delle coordinate del vettore
|
||||
//! Verifica la validità delle coordinate del vettore
|
||||
bool IsValid( void) const
|
||||
{ return ( std::isfinite( x) && std::isfinite( y) && std::isfinite( z)) ; }
|
||||
//! Quadrato della lunghezza del vettore
|
||||
@@ -58,58 +58,70 @@ class EGK_EXPORT Vector3d
|
||||
{ return ( x * x + y * y ) ; }
|
||||
//! Lunghezza del vettore nel piano XY
|
||||
double LenXY( void) const ;
|
||||
//! Verifica se il vettore è quasi nullo
|
||||
//! Verifica se il vettore è quasi nullo
|
||||
bool IsSmall( void) const
|
||||
{ return ( ( x * x + y * y + z * z) < SQ_EPS_SMALL) ; }
|
||||
//! Verifica se il vettore è esattamente nullo
|
||||
//! Verifica se il vettore è esattamente nullo
|
||||
bool IsZero( void) const
|
||||
{ return ( ( x * x + y * y + z * z) < SQ_EPS_ZERO) ; }
|
||||
//! Verifica se il vettore è quasi nullo nel piano XY
|
||||
//! Verifica se il vettore è quasi nullo nel piano XY
|
||||
bool IsSmallXY( void) const
|
||||
{ return ( ( x * x + y * y) < SQ_EPS_SMALL) ; }
|
||||
//! Verifica se il vettore è esattamente nullo nel piano XY
|
||||
//! Verifica se il vettore è esattamente nullo nel piano XY
|
||||
bool IsZeroXY( void) const
|
||||
{ return ( ( x * x + y * y) < SQ_EPS_ZERO) ; }
|
||||
//! Verifica se il vettore è normalizzato (è un versore)
|
||||
//! Verifica se il vettore è normalizzato (è un versore)
|
||||
bool IsNormalized( void) const
|
||||
{ return ( abs( 1.0 - (x * x + y * y + z * z)) < ( 2 * EPS_ZERO)) ; }
|
||||
//! Verifica se il vettore è parallelo ed equiverso con X+
|
||||
//! Verifica se il vettore è parallelo ed equiverso con X+
|
||||
bool IsXplus( void) const
|
||||
{ double dMO = std::max( abs( y), abs( z)) ;
|
||||
return ( x > EPS_ZERO && dMO < 10 * EPS_ZERO && x > KV_BIG * dMO) ; }
|
||||
//! Verifica se il vettore è parallelo ed equiverso con X-
|
||||
//! Verifica se il vettore è parallelo ed equiverso con X-
|
||||
bool IsXminus( void) const
|
||||
{ double dMO = std::max( abs( y), abs( z)) ;
|
||||
return ( x < -EPS_ZERO && dMO < 10 * EPS_ZERO && x < -KV_BIG * dMO) ; }
|
||||
//! Verifica se il vettore è parallelo a X
|
||||
//! Verifica se il vettore è parallelo a X
|
||||
bool IsX( void) const
|
||||
{ double dMO = std::max( abs( y), abs( z)) ;
|
||||
return ( abs( x) > EPS_ZERO && dMO < 10 * EPS_ZERO && abs( x) > KV_BIG * dMO) ; }
|
||||
//! Verifica se il vettore è parallelo ed equiverso con Y+
|
||||
//! Verifica se il vettore è circa parallelo a x
|
||||
bool IsXEpsilon( double dToler) const
|
||||
{ double dMO = std::max( abs( y), abs( z)) ;
|
||||
return ( abs( x) > dToler && dMO < 10 * dToler && abs( x) > KV_BIG * dMO) ; }
|
||||
//! Verifica se il vettore è parallelo ed equiverso con Y+
|
||||
bool IsYplus( void) const
|
||||
{ double dMO = std::max( abs( z), abs( x)) ;
|
||||
return ( y > EPS_ZERO && dMO < 10 * EPS_ZERO && y > KV_BIG * dMO) ; }
|
||||
//! Verifica se il vettore è parallelo ed equiverso con Y-
|
||||
//! Verifica se il vettore è parallelo ed equiverso con Y-
|
||||
bool IsYminus( void) const
|
||||
{ double dMO = std::max( abs( z), abs( x)) ;
|
||||
return ( y < -EPS_ZERO && dMO < 10 * EPS_ZERO && y < -KV_BIG * dMO) ; }
|
||||
//! Verifica se il vettore è parallelo a Y
|
||||
//! Verifica se il vettore è parallelo a Y
|
||||
bool IsY( void) const
|
||||
{ double dMO = std::max( abs( z), abs( x)) ;
|
||||
return ( abs( y) > EPS_ZERO && dMO < 10 * EPS_ZERO && abs( y) > KV_BIG * dMO) ; }
|
||||
//! Verifica se il vettore è parallelo ed equiverso con Z+
|
||||
//! Verifica se il vettore è circa parallelo a y
|
||||
bool IsYEpsilon( double dToler) const
|
||||
{ double dMO = std::max( abs( z), abs( x)) ;
|
||||
return ( abs( y) > dToler && dMO < 10 * dToler && abs( y) > KV_BIG * dMO) ; }
|
||||
//! Verifica se il vettore è parallelo ed equiverso con Z+
|
||||
bool IsZplus( void) const
|
||||
{ double dMO = std::max( abs( x), abs( y)) ;
|
||||
return ( z > EPS_ZERO && dMO < 10 * EPS_ZERO && z > KV_BIG * dMO) ; }
|
||||
//! Verifica se il vettore è parallelo ed equiverso con Z-
|
||||
//! Verifica se il vettore è parallelo ed equiverso con Z-
|
||||
bool IsZminus( void) const
|
||||
{ double dMO = std::max( abs( x), abs( y)) ;
|
||||
return ( z < -EPS_ZERO && dMO < 10 * EPS_ZERO && z < -KV_BIG * dMO) ; }
|
||||
//! Verifica se il vettore è parallelo a Z
|
||||
//! Verifica se il vettore è parallelo a Z
|
||||
bool IsZ( void) const
|
||||
{ double dMO = std::max( abs( x), abs( y)) ;
|
||||
return ( abs( z) > EPS_ZERO && dMO < 10 * EPS_ZERO && abs( z) > KV_BIG * dMO) ; }
|
||||
//! Verifica se il vettore è generico
|
||||
//! Verifica se il vettore è circa parallelo a Z
|
||||
bool IsZEpsilon( double dToler) const
|
||||
{ double dMO = std::max( abs( x), abs( y)) ;
|
||||
return ( abs( z) > dToler && dMO < 10 * dToler && abs( z) > KV_BIG * dMO) ; }
|
||||
//! Verifica se il vettore è generico
|
||||
bool IsGeneric( void) const
|
||||
{ return ( ! IsX() && ! IsY() && ! IsZ()) ; }
|
||||
//! Somma sul posto con altro vettore
|
||||
@@ -193,12 +205,12 @@ EGK_EXPORT Vector3d FromSpherical( double dLen, double dAngVertDeg, double dAngO
|
||||
EGK_EXPORT Vector3d FromPolar( double dLen, double dAngDeg) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Definizione come più verticale dei vettori ortogonali a quello ricevuto
|
||||
//! Definizione come più verticale dei vettori ortogonali a quello ricevuto
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT Vector3d FromUprightOrtho( const Vector3d& vtV) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Definizione come ortogonale al primo ricevuto, orizzontale e più vicino al secondo
|
||||
//! Definizione come ortogonale al primo ricevuto, orizzontale e più vicino al secondo
|
||||
//----------------------------------------------------------------------------
|
||||
EGK_EXPORT Vector3d FromNearestHorizontalOrtho( const Vector3d& vtV, const Vector3d& vtNear) ;
|
||||
|
||||
@@ -429,6 +441,17 @@ AreOrthoExact( const Vector3d& vtV1, const Vector3d& vtV2)
|
||||
return ( abs( vtV1 * vtV2) < COS_ORTO_ANG_ZERO) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Restituisce una copia ruotata del vettore passato
|
||||
//----------------------------------------------------------------------------
|
||||
inline const Vector3d
|
||||
GetRotate( const Vector3d& vtV, const Vector3d& vtAx, double dAngDeg)
|
||||
{
|
||||
Vector3d vtW = vtV ;
|
||||
vtW.Rotate( vtAx, dAngDeg) ;
|
||||
return vtW ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//! Restituisce una copia in locale del vettore passato
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
+16
-5
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkVolZmap.h Data : 09.03.24 Versione : 2.6c2
|
||||
// File : EGkVolZmap.h Data : 22.04.24 Versione : 2.6d4
|
||||
// Contenuto : Dichiarazione della interfaccia IVolZmap.
|
||||
//
|
||||
//
|
||||
@@ -9,6 +9,8 @@
|
||||
// Modifiche : 22.01.15 DS Creazione modulo.
|
||||
// 12.09.23 DS Aggiunto metodo IsTriDexel.
|
||||
// 09.03.24 DS Aggiunti SetShowEdges e GetShowEdges.
|
||||
// 10.06.25 RE Aggiunte funzioni per Offset di superfici TriMesh chiuse
|
||||
// 04.07.25 RE Aggiunte funzioni per Thickening Offset di superfici TriMesh generiche
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -17,7 +19,7 @@
|
||||
#include "/EgtDev/Include/EGkGeoObj.h"
|
||||
#include "/EgtDev/Include/EGkCurveComposite.h"
|
||||
#include "/EgtDev/Include/EGkSurfFlatRegion.h"
|
||||
#include "/EgtDev/Include/EGkSurfTriMesh.h"
|
||||
#include "/EgtDev/Include/EGkSurfTriMeshAux.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class __declspec( novtable) IVolZmap : public IGeoObj
|
||||
@@ -27,12 +29,14 @@ class __declspec( novtable) IVolZmap : public IGeoObj
|
||||
public :
|
||||
virtual bool CopyFrom( const IGeoObj* pGObjSrc) = 0 ;
|
||||
virtual bool Clear( void) = 0 ;
|
||||
virtual bool Create( const Point3d& ptO, double dDimX, double dDimY, double dDimZ, double dPrec, bool bTriDex) = 0 ;
|
||||
virtual bool CreateFromFlatRegion( const ISurfFlatRegion& Surf, double dDimZ, double dPrec, bool bTriDex) = 0 ;
|
||||
virtual bool CreateFromTriMesh( const ISurfTriMesh& Surf, double dPrec, bool bTriDex) = 0 ;
|
||||
virtual bool Create( const Point3d& ptO, double dDimX, double dDimY, double dDimZ, double dStep, bool bTriDex, int* nError = nullptr) = 0 ;
|
||||
virtual bool CreateEmpty( const Point3d& ptO, double dDimX, double dDimY, double dDimZ, double dStep, bool bTriDex, int* nError = nullptr) = 0 ;
|
||||
virtual bool CreateFromFlatRegion( const ISurfFlatRegion& Surf, double dDimZ, double dStep, bool bTriDex, int* nError = nullptr) = 0 ;
|
||||
virtual bool CreateFromTriMesh( const ISurfTriMesh& Surf, double dStep, bool bTriDex, double dExtraBox = 0, int* nError = nullptr) = 0 ;
|
||||
virtual int GetBlockCount( void) const = 0 ;
|
||||
virtual int GetBlockUpdatingCounter( int nBlock) const = 0 ;
|
||||
virtual bool GetBlockTriangles( int nBlock, TRIA3DEXVECTOR& vTria) const = 0 ;
|
||||
virtual ISurfTriMesh* GetSurfTriMesh( void) const = 0 ;
|
||||
virtual bool GetEdges( ICURVEPOVECTOR& vpCurve) const = 0 ;
|
||||
virtual bool GetVolume( double& dVol) const = 0 ;
|
||||
virtual bool IsTriDexel( void) const = 0 ;
|
||||
@@ -54,6 +58,8 @@ class __declspec( novtable) IVolZmap : public IGeoObj
|
||||
double dH, double dW, double dTh, double dRc, int nFlag, bool bFirst) = 0 ;
|
||||
virtual bool SetChiselTool( const std::string& sToolName,
|
||||
double dH, double dW, double dTh, int nFlag, bool bFirst) = 0 ;
|
||||
virtual bool SetAdditiveTool( const std::string& sToolName,
|
||||
double dH, double dR, double dRc, int nFlag, bool bFirst) = 0 ;
|
||||
virtual int GetToolCount( void) const = 0 ;
|
||||
virtual bool SetCurrTool( int nCurrTool) = 0 ;
|
||||
virtual bool ResetTools( void) = 0 ;
|
||||
@@ -85,6 +91,11 @@ class __declspec( novtable) IVolZmap : public IGeoObj
|
||||
virtual IVolZmap* ClonePart( int nPart) const = 0 ;
|
||||
virtual bool RemovePart( int nPart) = 0 ;
|
||||
virtual int GetPartMinDistFromPoint( const Point3d& ptP) const = 0 ;
|
||||
virtual bool AddSurfTm( const ISurfTriMesh* pStm) = 0 ;
|
||||
virtual bool SubtractSurfTm( const ISurfTriMesh* pStm) = 0 ;
|
||||
virtual bool MakeUniform( double dToler, bool bIsExtensionFirst = true, int nToolNum = 0) = 0 ;
|
||||
virtual bool RemoveFins( const Vector3d& vtDir, double dThick) = 0 ;
|
||||
virtual bool Offset( double dOffs, int nType) = 0 ;
|
||||
} ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
+4
-2
@@ -1,13 +1,14 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2013-2022
|
||||
// EgalTech 2013-2026
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGnFileUtils.h Data : 09.04.22 Versione : 2.4d1
|
||||
// File : EGnFileUtils.h Data : 09.01.26 Versione : 3.1a1
|
||||
// Contenuto : Prototipi funzioni di utilità su file e direttori.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 11.12.13 DS Creazione modulo.
|
||||
// 09.04.22 DS Aggiunta FindAllFiles.
|
||||
// 09.01.26 DS Aggiunta EraseNonEmptyDirectory.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -42,4 +43,5 @@ EGN_EXPORT bool ExistsDirectory( const std::string& sDir) ;
|
||||
EGN_EXPORT bool CreateDirectoryEgt( const std::string& sDir) ;
|
||||
EGN_EXPORT bool EmptyDirectory( const std::string& sDir) ;
|
||||
EGN_EXPORT bool EraseDirectory( const std::string& sDir) ;
|
||||
EGN_EXPORT bool EraseNonEmptyDirectory( const std::string& sDir) ;
|
||||
EGN_EXPORT bool FindAllDirectories( const std::string& sDirSpec, STRVECTOR& vsDirNames) ;
|
||||
|
||||
+103
-17
@@ -229,7 +229,11 @@ LuaGetTabFieldParam( lua_State* L, int nInd, const char* szField, T& Val)
|
||||
{
|
||||
if ( ! lua_istable( L, nInd))
|
||||
return false ;
|
||||
lua_getfield( L, nInd, szField) ;
|
||||
int nField ;
|
||||
if ( FromString( szField, nField))
|
||||
lua_rawgeti( L, nInd, nField) ;
|
||||
else
|
||||
lua_getfield( L, nInd, szField) ;
|
||||
bool bOk = LuaGetParam( L, -1, Val) ;
|
||||
lua_pop( L, 1) ;
|
||||
return bOk ;
|
||||
@@ -323,6 +327,24 @@ LuaSetParam( lua_State* L, const std::string& sPar)
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool
|
||||
LuaSetParam( lua_State* L, const BOOLVECTOR& vPar)
|
||||
{
|
||||
try {
|
||||
int nSize = int( vPar.size()) ;
|
||||
lua_createtable( L, nSize, 0) ;
|
||||
for ( int i = 1 ; i <= nSize ; ++ i) {
|
||||
lua_pushboolean( L, ( vPar[i-1] ? 1 : 0)) ;
|
||||
lua_rawseti( L, -2, i) ;
|
||||
}
|
||||
}
|
||||
catch( ...) {
|
||||
return false ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool
|
||||
LuaSetParam( lua_State* L, const INTVECTOR& vPar)
|
||||
@@ -444,7 +466,11 @@ LuaSetTabFieldParam( lua_State* L, int nInd, const char* szField)
|
||||
if ( ! LuaSetParam( L))
|
||||
return false ;
|
||||
int nPos = ( nInd > 0 ? nInd : nInd - 1) ;
|
||||
lua_setfield( L, nPos, szField) ;
|
||||
int nField ;
|
||||
if ( FromString( szField, nField))
|
||||
lua_rawseti( L, nPos, nField) ;
|
||||
else
|
||||
lua_setfield( L, nPos, szField) ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
@@ -465,7 +491,11 @@ LuaSetTabFieldParam( lua_State* L, int nInd, const char* szField, const T& Val)
|
||||
if ( ! LuaSetParam( L, Val))
|
||||
return false ;
|
||||
int nPos = ( nInd > 0 ? nInd : nInd - 1) ;
|
||||
lua_setfield( L, nPos, szField) ;
|
||||
int nField ;
|
||||
if ( FromString( szField, nField))
|
||||
lua_rawseti( L, nPos, nField) ;
|
||||
else
|
||||
lua_setfield( L, nPos, szField) ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
@@ -493,11 +523,29 @@ LuaGetGlobVar( lua_State* L, const std::string& sVar, T& Val)
|
||||
}
|
||||
// altrimenti campo di tabella
|
||||
else {
|
||||
std::string sTab, sField ;
|
||||
SplitFirst( sVar, ".", sTab, sField) ;
|
||||
lua_getglobal( L, sTab.c_str()) ;
|
||||
bool bOk = LuaGetTabFieldParam( L, -1, sField.c_str(), Val) ;
|
||||
lua_pop( L, 1) ;
|
||||
STRVECTOR vsTokens ;
|
||||
Tokenize( sVar, ".", vsTokens) ;
|
||||
int nTokenCnt = int( vsTokens.size()) ;
|
||||
if ( nTokenCnt < 2)
|
||||
return false ;
|
||||
if ( lua_getglobal( L, vsTokens[0].c_str()) != LUA_TTABLE) {
|
||||
lua_pop( L, 1) ;
|
||||
return false ;
|
||||
}
|
||||
for ( int nInd = 1 ; nInd <= nTokenCnt - 2 ; ++ nInd) {
|
||||
bool bOk ;
|
||||
int nField ;
|
||||
if ( FromString( vsTokens[nInd], nField))
|
||||
bOk = ( lua_rawgeti( L, -1, nField) == LUA_TTABLE) ;
|
||||
else
|
||||
bOk = ( lua_getfield( L, -1, vsTokens[nInd].c_str()) == LUA_TTABLE) ;
|
||||
if ( ! bOk) {
|
||||
lua_pop( L, nInd + 1) ;
|
||||
return false ;
|
||||
}
|
||||
}
|
||||
bool bOk = LuaGetTabFieldParam( L, -1, vsTokens[nTokenCnt-1].c_str(), Val) ;
|
||||
lua_pop( L, nTokenCnt - 1) ;
|
||||
return bOk ;
|
||||
}
|
||||
}
|
||||
@@ -518,11 +566,30 @@ LuaSetGlobVar( lua_State* L, const std::string& sVar, const T& Val)
|
||||
}
|
||||
// altrimenti campo di tabella
|
||||
else {
|
||||
std::string sTab, sField ;
|
||||
SplitFirst( sVar, ".", sTab, sField) ;
|
||||
lua_getglobal( L, sTab.c_str()) ;
|
||||
bool bOk = LuaSetTabFieldParam( L, -1, sField.c_str(), Val) ;
|
||||
lua_pop( L, 1) ;
|
||||
STRVECTOR vsTokens ;
|
||||
Tokenize( sVar, ".", vsTokens) ;
|
||||
int nTokenCnt = int( vsTokens.size()) ;
|
||||
if ( nTokenCnt < 2)
|
||||
return false ;
|
||||
if ( lua_getglobal( L, vsTokens[0].c_str()) != LUA_TTABLE) {
|
||||
lua_pop( L, 1) ;
|
||||
return false ;
|
||||
}
|
||||
for ( int nInd = 1 ; nInd <= nTokenCnt - 2 ; ++ nInd) {
|
||||
int nField ;
|
||||
bool bNumber = FromString( vsTokens[nInd], nField) ;
|
||||
if ( ( bNumber ? lua_rawgeti( L, -1, nField) : lua_getfield( L, -1, vsTokens[nInd].c_str())) != LUA_TTABLE) {
|
||||
lua_pop( L, 1) ;
|
||||
lua_newtable( L) ;
|
||||
lua_pushvalue( L, -1) ;
|
||||
if ( bNumber)
|
||||
lua_rawseti( L, -3, nField) ;
|
||||
else
|
||||
lua_setfield( L, -3, vsTokens[nInd].c_str()) ;
|
||||
}
|
||||
}
|
||||
bool bOk = LuaSetTabFieldParam( L, -1, vsTokens[nTokenCnt-1].c_str(), Val) ;
|
||||
lua_pop( L, nTokenCnt - 1) ;
|
||||
return bOk ;
|
||||
}
|
||||
}
|
||||
@@ -542,10 +609,29 @@ LuaResetGlobVar( lua_State* L, const std::string& sVar)
|
||||
}
|
||||
// altrimenti campo di tabella
|
||||
else {
|
||||
std::string sTab, sField ;
|
||||
SplitFirst( sVar, ".", sTab, sField) ;
|
||||
lua_getglobal( L, sTab.c_str()) ;
|
||||
bool bOk = LuaSetTabFieldParam( L, -1, sField.c_str()) ;
|
||||
STRVECTOR vsTokens ;
|
||||
Tokenize( sVar, ".", vsTokens) ;
|
||||
int nTokenCnt = int( vsTokens.size()) ;
|
||||
if ( nTokenCnt < 2)
|
||||
return false ;
|
||||
if ( lua_getglobal( L, vsTokens[0].c_str()) != LUA_TTABLE) {
|
||||
lua_pop( L, 1) ;
|
||||
return false ;
|
||||
}
|
||||
for ( int nInd = 1 ; nInd <= nTokenCnt - 2 ; ++ nInd) {
|
||||
int nField ;
|
||||
bool bNumber = FromString( vsTokens[nInd], nField) ;
|
||||
if ( ( bNumber ? lua_rawgeti( L, -1, nField) : lua_getfield( L, -1, vsTokens[nInd].c_str())) != LUA_TTABLE) {
|
||||
lua_pop( L, 1) ;
|
||||
lua_newtable( L) ;
|
||||
lua_pushvalue( L, -1) ;
|
||||
if ( bNumber)
|
||||
lua_rawseti( L, -3, nField) ;
|
||||
else
|
||||
lua_setfield( L, -3, vsTokens[nInd].c_str()) ;
|
||||
}
|
||||
}
|
||||
bool bOk = LuaSetTabFieldParam( L, -1, vsTokens[nTokenCnt-1].c_str()) ;
|
||||
lua_pop( L, 1) ;
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
+39
-4
@@ -101,14 +101,14 @@ GetVal( const std::string& sString, const std::string& sKey, T& Val)
|
||||
inline bool
|
||||
SetValInNotes( const std::string& sKey, const std::string& sVal, std::string& sNotes)
|
||||
{
|
||||
// verifiche validità chiave
|
||||
// verifiche validità chiave
|
||||
if ( ! IsValidKey( sKey) || ! IsValidVal( sVal))
|
||||
return false ;
|
||||
// chiave con carattere finale speciale
|
||||
std::string sTkey = sKey ;
|
||||
if ( sKey.back() != COLON)
|
||||
sTkey += EQUAL ;
|
||||
// ricerca se già presente
|
||||
// ricerca se già presente
|
||||
STRVECTOR vsTokens ;
|
||||
Tokenize( sNotes, ";", vsTokens) ;
|
||||
bool bFound = false ;
|
||||
@@ -143,7 +143,7 @@ SetValInNotes( const std::string& sKey, T& Val, std::string& sNotes)
|
||||
inline bool
|
||||
GetValInNotes( const std::string& sNotes, const std::string& sKey, std::string& sVal)
|
||||
{
|
||||
// verifiche validità chiave
|
||||
// verifiche validità chiave
|
||||
if ( sNotes.empty() || ! IsValidKey( sKey))
|
||||
return false ;
|
||||
// chiave con carattere finale speciale
|
||||
@@ -171,11 +171,46 @@ GetValInNotes( const std::string& sNotes, const std::string& sKey, T& Val)
|
||||
return ( GetValInNotes( sNotes, sKey, sVal) && FromString( sVal, Val)) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool
|
||||
GetValInNotes( const std::string& sNotes, const std::string& sKey, const std::string& sToken, std::string& sVal)
|
||||
{
|
||||
// verifiche validità chiave
|
||||
if ( sNotes.empty() || ! IsValidKey( sKey))
|
||||
return false ;
|
||||
// verifiche validità del token
|
||||
if ( sToken.empty())
|
||||
return false ;
|
||||
// chiave con carattere finale speciale
|
||||
std::string sTkey = sKey ;
|
||||
if ( sKey.back() != COLON)
|
||||
sTkey += EQUAL ;
|
||||
// ricerca
|
||||
STRVECTOR vsTokens ;
|
||||
Tokenize( sNotes, sToken, vsTokens) ;
|
||||
for ( const auto& sToken : vsTokens) {
|
||||
if ( FindKey( sToken, sTkey, true)) {
|
||||
sVal = sToken.substr( sTkey.length()) ;
|
||||
return true ;
|
||||
}
|
||||
}
|
||||
return false ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
template <class T>
|
||||
inline bool
|
||||
GetValInNotes( const std::string& sNotes, const std::string& sKey, const std::string& sToken, T& Val)
|
||||
{
|
||||
std::string sVal ;
|
||||
return ( GetValInNotes( sNotes, sKey, sToken, sVal) && FromString( sVal, Val)) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
inline bool
|
||||
RemoveValInNotes( const std::string& sKey, std::string& sNotes)
|
||||
{
|
||||
// verifiche validità chiave
|
||||
// verifiche validità chiave
|
||||
if ( sNotes.empty() || ! IsValidKey( sKey))
|
||||
return false ;
|
||||
// chiave con carattere finale speciale
|
||||
|
||||
+149
-54
@@ -1,13 +1,14 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2013-2014
|
||||
// EgalTech 2013-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGnStringUtils.h Data : 17.03.14 Versione : 1.5c2
|
||||
// File : EGnStringUtils.h Data : 18.09.25 Versione : 2.7i1
|
||||
// Contenuto : Dichiarazione delle funzioni di utilità per le stringhe.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 20.11.13 DS Creazione modulo.
|
||||
// 20.10.15 DS Agg. FromString e ToString per std::array<double,N>.
|
||||
// 18.09.25 DS Agg. FromString e ToString per long long.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -15,8 +16,10 @@
|
||||
|
||||
#include "/EgtDev/Include/EgtStringBase.h"
|
||||
#include "/EgtDev/Include/EgtNumCollection.h"
|
||||
#include "/EgtDev/Extern/fast_float/fast_float.h"
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <charconv>
|
||||
|
||||
//----------------------- Macro per import/export -----------------------------
|
||||
#undef EGN_EXPORT
|
||||
@@ -123,20 +126,20 @@ ValidateDxfName( std::string& sName, bool bAdvanced)
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#define FAST_FLOAT_FMT fast_float::chars_format::general | fast_float::chars_format::allow_leading_plus | fast_float::chars_format::skip_white_space
|
||||
#define FAST_FLOAT_OPTS fast_float::parse_options( FAST_FLOAT_FMT)
|
||||
inline bool
|
||||
FromString( const std::string& sVal, int& nVal)
|
||||
{ const char* pStart = sVal.c_str() ;
|
||||
char* pStop ;
|
||||
errno = 0 ;
|
||||
nVal = strtol( pStart, &pStop, 10) ;
|
||||
return ( pStop != pStart && errno == 0) ; }
|
||||
{ auto answer = fast_float::from_chars_advanced( sVal.data(), sVal.data() + sVal.size(), nVal, FAST_FLOAT_OPTS) ;
|
||||
return ( answer.ec == std::errc() && answer.ptr != sVal.data()) ; }
|
||||
inline bool
|
||||
FromString( const std::string& sVal, unsigned int& nVal)
|
||||
{ const char* pStart = sVal.c_str() ;
|
||||
char* pStop ;
|
||||
errno = 0 ;
|
||||
nVal = strtoul( pStart, &pStop, 10) ;
|
||||
return ( pStop != pStart && errno == 0) ; }
|
||||
{ auto answer = fast_float::from_chars_advanced( sVal.data(), sVal.data() + sVal.size(), nVal, FAST_FLOAT_OPTS) ;
|
||||
return ( answer.ec == std::errc() && answer.ptr != sVal.data()) ; }
|
||||
inline bool
|
||||
FromString( const std::string& sVal, long long& nVal)
|
||||
{ auto answer = fast_float::from_chars_advanced( sVal.data(), sVal.data() + sVal.size(), nVal, FAST_FLOAT_OPTS) ;
|
||||
return ( answer.ec == std::errc() && answer.ptr != sVal.data()) ; }
|
||||
inline bool
|
||||
FromString( const std::string& sVal, bool& bVal)
|
||||
{ int nTmp ;
|
||||
@@ -146,49 +149,40 @@ FromString( const std::string& sVal, bool& bVal)
|
||||
return true ; }
|
||||
inline bool
|
||||
FromString( const std::string& sVal, double& dVal)
|
||||
{ const char* pStart = sVal.c_str() ;
|
||||
char* pStop ;
|
||||
errno = 0 ;
|
||||
dVal = strtod( pStart, &pStop) ;
|
||||
return ( pStop != pStart && errno == 0) ; }
|
||||
{ auto answer = fast_float::from_chars( sVal.data(), sVal.data() + sVal.size(), dVal, FAST_FLOAT_FMT) ;
|
||||
return ( answer.ec == std::errc() && answer.ptr != sVal.data()) ; }
|
||||
template <size_t size>
|
||||
bool FromString( const std::string& sVal, int (&nVal)[size])
|
||||
{ const char* pStart = sVal.c_str() ;
|
||||
char* pStop ;
|
||||
errno = 0 ;
|
||||
{ const char* pFirst = sVal.data() ;
|
||||
for ( int i = 0 ; i < size ; ++ i) {
|
||||
nVal[i] = strtol( pStart, &pStop, 10) ;
|
||||
if ( ( i < size - 1 && *pStop != ',') || errno != 0)
|
||||
auto answer = fast_float::from_chars_advanced( pFirst, sVal.data() + sVal.size(), nVal[i], FAST_FLOAT_OPTS) ;
|
||||
if ( answer.ec != std::errc() || ( i < size - 1 && answer.ptr[0] != ','))
|
||||
return false ;
|
||||
pStart = pStop + 1 ;
|
||||
pFirst = answer.ptr + 1 ;
|
||||
}
|
||||
return ( errno == 0) ;
|
||||
return true ;
|
||||
}
|
||||
template <size_t size>
|
||||
bool FromString( const std::string& sVal, double (&dVal)[size])
|
||||
{ const char* pStart = sVal.c_str() ;
|
||||
char* pStop ;
|
||||
errno = 0 ;
|
||||
{ const char* pFirst = sVal.data() ;
|
||||
for ( int i = 0 ; i < size ; ++ i) {
|
||||
dVal[i] = strtod( pStart, &pStop) ;
|
||||
if ( ( i < size - 1 && *pStop != ',') || errno != 0)
|
||||
auto answer = fast_float::from_chars( pFirst, sVal.data() + sVal.size(), dVal[i], FAST_FLOAT_FMT) ;
|
||||
if ( answer.ec != std::errc() || ( i < size - 1 && answer.ptr[0] != ','))
|
||||
return false ;
|
||||
pStart = pStop + 1 ;
|
||||
pFirst = answer.ptr + 1 ;
|
||||
}
|
||||
return ( errno == 0) ;
|
||||
return true ;
|
||||
}
|
||||
template <size_t size>
|
||||
bool FromString( const std::string& sVal, std::array<double,size>& dVal)
|
||||
{ const char* pStart = sVal.c_str() ;
|
||||
char* pStop ;
|
||||
errno = 0 ;
|
||||
{ const char* pFirst = sVal.data() ;
|
||||
for ( int i = 0 ; i < size ; ++ i) {
|
||||
dVal[i] = strtod( pStart, &pStop) ;
|
||||
if ( ( i < size - 1 && *pStop != ',') || errno != 0)
|
||||
auto answer = fast_float::from_chars( pFirst, sVal.data() + sVal.size(), dVal[i], FAST_FLOAT_FMT) ;
|
||||
if ( answer.ec != std::errc() || ( i < size - 1 && answer.ptr[0] != ','))
|
||||
return false ;
|
||||
pStart = pStop + 1 ;
|
||||
pFirst = answer.ptr + 1 ;
|
||||
}
|
||||
return ( errno == 0) ;
|
||||
return true ;
|
||||
}
|
||||
EGN_EXPORT bool FromString( const std::string& sVal, INTVECTOR& vnVal) ;
|
||||
EGN_EXPORT bool FromString( const std::string& sVal, DBLVECTOR& vdVal) ;
|
||||
@@ -196,45 +190,146 @@ EGN_EXPORT bool FromString( const std::string& sVal, STRVECTOR& vsVal) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
inline const std::string
|
||||
ToString( int nVal, int nPrec = 1, int nRadix = 10)
|
||||
ToStringAdv( int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr)
|
||||
{
|
||||
// eseguo conversione
|
||||
char szBuff[24] ;
|
||||
int nErr = _itoa_s( nVal, szBuff, nRadix) ;
|
||||
// se errore, ritorno stringa opportuna
|
||||
if ( nErr != 0) {
|
||||
_ASSERT( 0) ;
|
||||
const int nBuffSize = 36 ;
|
||||
char szBuff[nBuffSize]{} ;
|
||||
auto Res = std::to_chars( szBuff, szBuff + nBuffSize - 1, nVal, nRadix) ;
|
||||
if ( Res.ec != std::errc()) {
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = int( Res.ec) ;
|
||||
return "#Error" ;
|
||||
}
|
||||
// verifico lunghezza minima
|
||||
// gestione codice di errore
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = 0 ;
|
||||
// verifico lunghezza minima
|
||||
int nLen = (int) strlen( szBuff) ;
|
||||
if ( nLen >= nPrec)
|
||||
return szBuff ;
|
||||
// porto la stringa alla minima lunghezza
|
||||
// porto la stringa alla minima lunghezza
|
||||
std::string sBuff( szBuff) ;
|
||||
sBuff.insert( 0, ( nPrec - nLen), '0') ;
|
||||
return sBuff ;
|
||||
}
|
||||
inline const std::string
|
||||
ToString( unsigned int nVal, int nPrec = 1, int nRadix = 10)
|
||||
ToString( int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr)
|
||||
{
|
||||
// se necessario processing avanzato
|
||||
if ( nPrec > 1 || nRadix < 6)
|
||||
return ToStringAdv( nVal, nPrec, nRadix, pnErr) ;
|
||||
// eseguo conversione
|
||||
char szBuff[24] ;
|
||||
int nErr = _ultoa_s( nVal, szBuff, nRadix) ;
|
||||
// se errore, ritorno stringa opportuna
|
||||
if ( nErr != 0) {
|
||||
_ASSERT( 0) ;
|
||||
const int nBuffSize = 16 ;
|
||||
char szBuff[nBuffSize]{} ;
|
||||
auto Res = std::to_chars( szBuff, szBuff + nBuffSize - 1, nVal, nRadix) ;
|
||||
if ( Res.ec != std::errc()) {
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = int( Res.ec) ;
|
||||
return "#Error" ;
|
||||
}
|
||||
// verifico lunghezza minima
|
||||
// gestione codice di errore
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = 0 ;
|
||||
return szBuff ;
|
||||
}
|
||||
|
||||
inline const std::string
|
||||
ToStringAdv( unsigned int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr)
|
||||
{
|
||||
// eseguo conversione
|
||||
const int nBuffSize = 36 ;
|
||||
char szBuff[nBuffSize]{} ;
|
||||
auto Res = std::to_chars( szBuff, szBuff + nBuffSize - 1, nVal, nRadix) ;
|
||||
if ( Res.ec != std::errc()) {
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = int( Res.ec) ;
|
||||
return "#Error" ;
|
||||
}
|
||||
// gestione codice di errore
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = 0 ;
|
||||
// verifico lunghezza minima
|
||||
int nLen = (int) strlen( szBuff) ;
|
||||
if ( nLen >= nPrec)
|
||||
return szBuff ;
|
||||
// porto la stringa alla minima lunghezza
|
||||
// porto la stringa alla minima lunghezza
|
||||
std::string sBuff( szBuff) ;
|
||||
sBuff.insert( 0, ( nPrec - nLen), '0') ;
|
||||
return sBuff ;
|
||||
}
|
||||
inline const std::string
|
||||
ToString( unsigned int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr)
|
||||
{
|
||||
// se necessario processing avanzato
|
||||
if ( nPrec > 1 || nRadix < 6)
|
||||
return ToStringAdv( nVal, nPrec, nRadix, pnErr) ;
|
||||
// eseguo conversione
|
||||
const int nBuffSize = 16 ;
|
||||
char szBuff[nBuffSize]{} ;
|
||||
auto Res = std::to_chars( szBuff, szBuff + nBuffSize - 1, nVal, nRadix) ;
|
||||
if ( Res.ec != std::errc()) {
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = int( Res.ec) ;
|
||||
return "#Error" ;
|
||||
}
|
||||
// gestione codice di errore
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = 0 ;
|
||||
return szBuff ;
|
||||
}
|
||||
template <size_t size>
|
||||
const std::string ToString( const unsigned int (&nVal)[size], int nPrec = 1)
|
||||
{ std::string sDest ; sDest.reserve( 8 * size) ;
|
||||
for ( const auto& nV : nVal)
|
||||
sDest += ToString( nV, nPrec) + "," ;
|
||||
sDest.pop_back() ;
|
||||
return sDest ; }
|
||||
|
||||
inline const std::string
|
||||
ToStringAdv( long long nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr)
|
||||
{
|
||||
// eseguo conversione
|
||||
const int nBuffSize = 68 ;
|
||||
char szBuff[nBuffSize]{} ;
|
||||
auto Res = std::to_chars( szBuff, szBuff + nBuffSize - 1, nVal, nRadix) ;
|
||||
if ( Res.ec != std::errc()) {
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = int( Res.ec) ;
|
||||
return "#Error" ;
|
||||
}
|
||||
// gestione codice di errore
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = 0 ;
|
||||
// verifico lunghezza minima
|
||||
int nLen = (int) strlen( szBuff) ;
|
||||
if ( nLen >= nPrec)
|
||||
return szBuff ;
|
||||
// porto la stringa alla minima lunghezza
|
||||
std::string sBuff( szBuff) ;
|
||||
sBuff.insert( 0, ( nPrec - nLen), '0') ;
|
||||
return sBuff ;
|
||||
}
|
||||
inline const std::string
|
||||
ToString( long long nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr)
|
||||
{
|
||||
// se necessario processing avanzato
|
||||
if ( nPrec > 1 || nRadix < 6)
|
||||
return ToStringAdv( nVal, nPrec, nRadix, pnErr) ;
|
||||
// eseguo conversione
|
||||
const int nBuffSize = 16 ;
|
||||
char szBuff[nBuffSize]{} ;
|
||||
auto Res = std::to_chars( szBuff, szBuff + nBuffSize - 1, nVal, nRadix) ;
|
||||
if ( Res.ec != std::errc()) {
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = int( Res.ec) ;
|
||||
return "#Error" ;
|
||||
}
|
||||
// gestione codice di errore
|
||||
if ( pnErr != nullptr)
|
||||
*pnErr = 0 ;
|
||||
return szBuff ;
|
||||
}
|
||||
template <size_t size>
|
||||
const std::string ToString( const int (&nVal)[size], int nPrec = 1)
|
||||
{ std::string sDest ; sDest.reserve( 8 * size) ;
|
||||
|
||||
@@ -75,6 +75,8 @@ class IEGrScene
|
||||
virtual bool ZoomChange( double dCoeff) = 0 ;
|
||||
virtual bool ZoomOnPoint( const Point3d& ptWin, double dCoeff) = 0 ;
|
||||
virtual bool ZoomWin( const Point3d& ptWin1, const Point3d& ptWin2) = 0 ;
|
||||
virtual bool SetCameraType( bool bOrthoOrPersp) = 0 ;
|
||||
virtual bool SetZoomType( int nZoomMode) = 0 ;
|
||||
// ShowMode
|
||||
virtual bool SetShowMode( int nShowMode) = 0 ;
|
||||
virtual int GetShowMode( void) const = 0 ;
|
||||
@@ -90,6 +92,7 @@ class IEGrScene
|
||||
virtual bool SetExtension( const BBox3d& b3Ext) = 0 ;
|
||||
virtual bool UpdateExtension( void) = 0 ;
|
||||
virtual bool SetMark( Color colMark) = 0 ;
|
||||
virtual bool SetMark2( Color colMark) = 0 ;
|
||||
virtual bool SetSelSurf( Color colSelSurf) = 0 ;
|
||||
virtual bool SetLineWidth( int nW) = 0 ;
|
||||
// Grid
|
||||
@@ -170,6 +173,9 @@ enum CameraDir { CT_NONE = 0,
|
||||
CT_ISO_NE = 9,
|
||||
CT_ISO_NW = 10,
|
||||
CT_CPLANE = 11} ;
|
||||
//------------------------ Costanti per tipologia di zoom nel caso prospettico ---------------------
|
||||
enum PerspZoom { ZT_STD = 0,
|
||||
ZT_DOLLY = 1} ;
|
||||
//------------------------ Costanti per tipo di visualizzazione --------------
|
||||
enum ShowMode { SM_WIREFRAME = 0,
|
||||
SM_HIDDENLINE = 1,
|
||||
|
||||
@@ -34,8 +34,8 @@ extern "C" {
|
||||
// General
|
||||
EIN_EXPORT BOOL __stdcall EgtInit( int nDebug, const wchar_t* wsLogFile, const wchar_t* wsLogMsg) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtExit( void) ;
|
||||
typedef bool (__stdcall * pfOnTerminateProcess) ( int) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetOnTerminateProcess( pfOnTerminateProcess pFun) ;
|
||||
typedef bool (__stdcall * psfOnTerminateProcess) ( int) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetOnTerminateProcess( psfOnTerminateProcess pFun) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetUserLevel( int nUserLev) ;
|
||||
EIN_EXPORT int __stdcall EgtGetUserLevel( void) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetKey( const wchar_t* wsKey) ;
|
||||
@@ -59,15 +59,16 @@ EIN_EXPORT BOOL __stdcall EgtGetKeyOptions( int nProd, int nVer, int nLev, unsig
|
||||
EIN_EXPORT BOOL __stdcall EgtGetKeyLeftDays( int* pnLeftDays) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetKeyAssLeftDays( int* pnAssLeftDays) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetKeyOptLeftDays( int* pnOptLeftDays) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetNetHwKey( void) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetOsInfo( wchar_t*& wsOs) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetCpuInfo( wchar_t*& wsCpu) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetMemoryInfo( wchar_t*& wsMem) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtFreeMemory( void* pMem) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtOutLog( const wchar_t* wsMsg) ;
|
||||
typedef int (__stdcall * pfProcEvents) (int, int) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetProcessEvents( pfProcEvents pFun) ;
|
||||
typedef BOOL (__stdcall * pfOutTextW) (wchar_t*&) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetOutText( pfOutTextW pFun) ;
|
||||
typedef int (__stdcall * psfProcEvents) (int, int) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetProcessEvents( psfProcEvents pFun) ;
|
||||
typedef BOOL (__stdcall * psfOutTextW) (wchar_t*&) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetOutText( psfOutTextW pFun) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetTempDir( const wchar_t* wsTempDir) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetTempDir( wchar_t*& wsTempDir) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetMainWindowHandle( HWND hMainWnd) ;
|
||||
@@ -102,8 +103,8 @@ EIN_EXPORT BOOL __stdcall EgtNewFile( void) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtOpenFile( const wchar_t* wsFilePath) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtInsertFile( const wchar_t* wsFilePath) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSaveFile( const wchar_t* wsFilePath, int nFlag) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSaveObjToFile( int nId, const wchar_t* wsFilePath, int nFlag) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSaveMachGroupToFile( int nMGroupId, const wchar_t* wsFilePath, int nFlag) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSaveObjToFile( int nNumId, const int nIds[], const wchar_t* wsFilePath, int nFlag) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSaveMachGroupToFile( int nMGroupId, int nNumPlusId, const int nPlusIds[], const wchar_t* wsFilePath, int nFlag) ;
|
||||
|
||||
// Exchange
|
||||
EIN_EXPORT int __stdcall EgtGetFileType( const wchar_t* wsFilePath) ;
|
||||
@@ -115,10 +116,12 @@ 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 EgtImport3MF( const wchar_t* wsFilePath) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtImportOff( const wchar_t* wsFilePath, double dScaleFactor) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtImportPly( const wchar_t* wsFilePath, double dScaleFactor) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtImport3MF( const wchar_t* wsFilePath, int nFlag) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtImport3dm( const wchar_t* wsFilePath) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtAdvancedImportIsEnabled( void) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtAdvancedImport( const wchar_t* wsFilePath, double dLinToler) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtAdvancedImport( const wchar_t* wsFilePath, double dLinToler, int nFlag) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtExportDxf( int nId, const wchar_t* wsFilePath, int nFlag, int nFilter) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtExportStl( int nId, const wchar_t* wsFilePath, int nFilter) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtExport3MF( int nId, const wchar_t* wsFilePath, int nFilter) ;
|
||||
@@ -153,11 +156,13 @@ EIN_EXPORT int __stdcall EgtBeamModifyProcess( int nGeomId, int nGroup, int nPr
|
||||
int nCrvId, int nCrv2Id, BOOL bUpdate) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamEraseProcess( int nGeomId, BOOL bUpdate) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamEnableProcess( int nGeomId, BOOL bEnable, BOOL bUpdate) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamCalcAllSolids( BOOL bShow, BOOL bRecalc) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamShowAllSolids( BOOL bShow) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamCalcSolid( int nPartId, BOOL bRecalc) ;
|
||||
EIN_EXPORT int __stdcall EgtBeamGetSolid( int nPartId) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamShowSolid( int nPartId, BOOL bShow) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamGetBuildingIsOn( void) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamShowBuilding( BOOL bShow) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamGetBuildingIsOn( int nAssGrpId) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtBeamShowBuilding( int nAssGrpId, BOOL bShow) ;
|
||||
|
||||
// Tsc Executor
|
||||
EIN_EXPORT BOOL __stdcall EgtInitTscExec( void) ;
|
||||
@@ -251,6 +256,8 @@ EIN_EXPORT int __stdcall EgtCreateArcC2PEx( int nParentId, const double ptCen[3
|
||||
const double ptNearEnd[3], int nRefType) ;
|
||||
EIN_EXPORT int __stdcall EgtCreateArc3P( int nParentId, const double ptP1[3],
|
||||
const double ptP2[3], const double ptP3[3], int nRefType) ;
|
||||
EIN_EXPORT int __stdcall EgtCreateArc2PR( int nParentId, const double ptStart[3], const double ptEnd[3],
|
||||
double dRad, BOOL bCCW, int nRefType) ;
|
||||
EIN_EXPORT int __stdcall EgtCreateArc2PD( int nParentId, const double ptStart[3], const double ptEnd[3],
|
||||
double dDirSDeg, int nRefType) ;
|
||||
EIN_EXPORT int __stdcall EgtCreateArc2PDEx( int nParentId, const double ptStart[3],
|
||||
@@ -290,6 +297,8 @@ EIN_EXPORT int __stdcall EgtCreatePolygonFromApothem( int nParentId, int nNumSi
|
||||
const double ptMid[3], int nRefType) ;
|
||||
EIN_EXPORT int __stdcall EgtCreatePolygonFromSide( int nParentId, int nNumSides, const double ptIni[3],
|
||||
const double ptFin[3], int nRefType) ;
|
||||
EIN_EXPORT int __stdcall EgtSurfBezierGetCurveU( int nSurfId, double dU, int nDestGroup) ;
|
||||
EIN_EXPORT int __stdcall EgtSurfBezierGetCurveV( int nSurfId, double dV, int nDestGroup) ;
|
||||
|
||||
// GeomDB Create Surf
|
||||
EIN_EXPORT int __stdcall EgtCreateSurfFrRectangle( int nParentId, const double ptIni[3], const double ptCross[3], int nRefType) ;
|
||||
@@ -315,9 +324,10 @@ EIN_EXPORT int __stdcall EgtCreateSurfTmByRevolve( int nParentId, int nCrvId,
|
||||
const double ptAx[3], const double vtAx[3],
|
||||
BOOL bCapEnds, double dLinTol, int nRefType) ;
|
||||
EIN_EXPORT int __stdcall EgtCreateSurfTmByScrewing( int nParentId, int nCrvId,
|
||||
const double ptAx[3], const double vtAx[3],
|
||||
double dAngRotDeg, double dMove, BOOL bCapEnds, double dLinTol, int nRefType) ;
|
||||
EIN_EXPORT int __stdcall EgtCreateSurfTmSwept( int nParentId, int nSectId, int nGuideId, BOOL bCapEnds, double dLinTol) ;
|
||||
const double ptAx[3], const double vtAx[3],
|
||||
double dAngRotDeg, double dMove, BOOL bCapEnds, double dLinTol, int nRefType) ;
|
||||
EIN_EXPORT int __stdcall EgtCreateSurfTmSwept( int nParentId, int nSectId, int nGuideId, const double vtAx[3],
|
||||
BOOL bCapEnds, double dLinTol, int nRefType) ;
|
||||
EIN_EXPORT int __stdcall EgtCreateSurfTmRuled( int nParentId, int nPntOrCrvId1, int nCrvId2, int nType, double dLinTol) ;
|
||||
EIN_EXPORT int __stdcall EgtCreateSurfTmByTriangles( int nParentId, int nNumId, const int nIds[], BOOL bErase) ;
|
||||
EIN_EXPORT int __stdcall EgtCreateSurfTmBySewing( int nParentId, int nNumId, const int nIds[], BOOL bErase) ;
|
||||
@@ -384,7 +394,9 @@ EIN_EXPORT BOOL __stdcall EgtGetBBoxRef( int nId, int nFlag, const double ptOrig
|
||||
const double vtX[3], const double vtY[3], const double vtZ[3],
|
||||
double ptMin[3], double ptMax[3]) ;
|
||||
EIN_EXPORT int __stdcall EgtCopy( int nSouId, int nRefId, int nSonBeforeAfter) ;
|
||||
EIN_EXPORT int __stdcall EgtCopyEx( int nSouCtx, int nSouId, int nDestCtx, int nRefId, int nSonBeforeAfter) ;
|
||||
EIN_EXPORT int __stdcall EgtCopyGlob( int nSouId, int nRefId, int nSonBeforeAfter) ;
|
||||
EIN_EXPORT int __stdcall EgtCopyGlobEx( int nSouCtx, int nSouId, int nDestCtx, int nRefId, int nSonBeforeAfter) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtRelocate( int nSouId, int nRefId, int nSonBeforeAfter) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtRelocateGlob( int nSouId, int nRefId, int nSonBeforeAfter) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGroupSwap( int nId1, int nId2, BOOL bSwapRef, BOOL bMark) ;
|
||||
@@ -409,7 +421,7 @@ EIN_EXPORT BOOL __stdcall EgtSetStatus( int nId, int nStat) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtRevertStatus( int nId) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetStatus( int nId, int* pnStat) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetCalcStatus( int nId, int* pnStat) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetMark( int nId) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetMark( int nId, int nMark) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtResetMark( int nId) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetMark( int nId, BOOL* pnMark) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetCalcMark( int nId, BOOL* pnMark) ;
|
||||
@@ -443,6 +455,7 @@ EIN_EXPORT BOOL __stdcall EgtGetInfoBBox( int nId, const wchar_t* wsKey,
|
||||
double ptMin[3], double ptMax[3]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetInfoFrame( int nId, const wchar_t* wsKey, double ptOrig[3],
|
||||
double vtX[3], double vtY[3], double vtZ[3]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetAllInfo( int nId, wchar_t*& wsInfos) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtExistsInfo( int nId, const wchar_t* wsKey) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtRemoveInfo( int nId, const wchar_t* wsKey) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetTextureName( int nId, const wchar_t* wsTxrName) ;
|
||||
@@ -547,6 +560,7 @@ EIN_EXPORT BOOL __stdcall EgtCutSurfTmClosedCurve( int nSurfId, int nCurveId, BO
|
||||
EIN_EXPORT BOOL __stdcall EgtSurfTmAdd( int nId1, int nId2, BOOL bTwoColors) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSurfTmSubtract( int nId1, int nId2, BOOL bTwoColors) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSurfTmIntersect( int nId1, int nId2, BOOL bTwoColors) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSurfTmSetFaceColor( int nId, int nFacet, int nColor) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSurfTmResetTwoColors( int nId) ;
|
||||
EIN_EXPORT int __stdcall EgtSurfTmSplit( int nId, int nSplitterId, int* pnCount) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSurfTmCut( int nId, int nCutterId, BOOL bInVsOut, BOOL bSaveOnEq) ;
|
||||
@@ -570,6 +584,9 @@ EIN_EXPORT BOOL __stdcall EgtCurveParamAtLength( int nId, double dLen, double* p
|
||||
EIN_EXPORT BOOL __stdcall EgtCurveLengthAtPoint( int nId, const double ptOn[3], double dExtend, double* pdLen) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtCurveIsClosed( int nId) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtCurveIsFlat( int nId, BOOL bUseExtrusion, double dToler, double vtN[3], double* pdDist) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtCurveIsACircle( int nId, double dToler, double ptC[3], double vtN[3], double* pdRad, BOOL* pbCCW) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtCurveIsARectangle( int nId, double dToler, double ptP[3], double vtL1[3], double vtL2[3]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtCurveIsATrapezoid( int nId, double dToler, double ptP[3], double vtB1[3], double vtL1[3], double vtB2[3]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtCurveAreaXY( int nId, double* pdArea) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtCurveArea( int nId, double vtN[3], double* pdDist, double* pdArea) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtCurveNearestExtremityToPoint( int nId, const double ptP[3], BOOL* pbStart) ;
|
||||
@@ -585,6 +602,8 @@ EIN_EXPORT BOOL __stdcall EgtArcAngCenter( int nId, double* pdAngDeg) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtArcDeltaN( int nId, double* pdDeltaN) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtArcNormVersor( int nId, int nRefId, double vtNorm[3]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtCurveCompoCenter( int nId, int nSimpCrv, int nRefId, double ptCen[3]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtCopyCompoSubCurve( int nId, int nSubCrvToCopy, int nParentId) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtCopyParamRange( int nId, double dUStart, double dUEnd, int nParentId) ;
|
||||
|
||||
// GeomDb Surf Get
|
||||
EIN_EXPORT BOOL __stdcall EgtSurfArea( int nId, double* pdArea) ;
|
||||
@@ -594,6 +613,7 @@ EIN_EXPORT BOOL __stdcall EgtSurfFrNormVersor( int nId, int nRefId, double vtNor
|
||||
EIN_EXPORT BOOL __stdcall EgtSurfFrGrossArea( int nId, double* pdArea) ;
|
||||
EIN_EXPORT int __stdcall EgtSurfFrChunkCount( int nId) ;
|
||||
EIN_EXPORT int __stdcall EgtSurfFrChunkSimpleClassify( int nId1, int nChunk1, int nId2, int nChunk2, double dToler) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSurfFrChunkCenter( int nId, int nChunk, int nRefId, double ptCen[3], double vtNorm[3]) ;
|
||||
EIN_EXPORT int __stdcall EgtExtractSurfFrChunkLoops( int nId, int nChunk, int nDestGrpId, int* pnCount) ;
|
||||
EIN_EXPORT int __stdcall EgtSurfTmPartCount( int nId) ;
|
||||
EIN_EXPORT int __stdcall EgtSurfTmFacetCount( int nId) ;
|
||||
@@ -615,6 +635,10 @@ EIN_EXPORT int __stdcall EgtGetSurfTmSilhouette( int nId, const double vtDir[3]
|
||||
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) ;
|
||||
EIN_EXPORT int __stdcall EgtExtractSurfTmTriaLoop( int nId, int nT, int nDestGrpId) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSurfBezierParamsFromPoint( int nSurfId, const double ptOnSurf[3], int nRefId, double* pdU, double* pdV) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSurfBezierGetPointNrmD1( int nSurfId, double dU, double dV, int nUsd, int nVsd, int nRefId,
|
||||
double ptP[3], double vtNorm[3], double vtDerU[3], double vtDerV[3]) ;
|
||||
EIN_EXPORT int __stdcall EgtExtractSurfBezierLoops( int nId, int nDestGrpId, int* pnCount) ;
|
||||
|
||||
// Geo Snap Vector/Point/Frame
|
||||
@@ -760,7 +784,7 @@ EIN_EXPORT int __stdcall EgtAddRawPart( const double ptOrig[3],
|
||||
EIN_EXPORT BOOL __stdcall EgtModifyRawPart( int nRawId, const double ptOrig[3],
|
||||
double dLength, double dWidth, double dHeight, const int vCol[4]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtModifyRawPart2( int nRawId, int nCrvId,
|
||||
double dOverMat, double dZmin, double dHeight, const int vCol[4]) ;
|
||||
double dOverMat, double dHeight, const int vCol[4]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtModifyRawPartSize( int nRawId, double dLength, double dWidth, double dHeight) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtModifyRawPartHeight( int nRawId, double dHeight) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtKeepRawPart( int nRawId, int nSouPhase) ;
|
||||
@@ -791,7 +815,10 @@ EIN_EXPORT BOOL __stdcall EgtGetTableArea( int nInd, double ptMin[3], double ptM
|
||||
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 BOOL __stdcall EgtMoveDispAxis( const wchar_t* wsName, double dPos) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtRemoveDispAxis( const wchar_t* wsName) ;
|
||||
EIN_EXPORT int __stdcall EgtAddFixture( const wchar_t* wsName, const double ptPos[3], double dAngRotDeg, double dMov) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtKeepAllDispAxes( int nSouPhase) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtKeepFixture( int nFxtId, int nSouPhase) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtRemoveFixture( int nFxtId) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtVerifyFixture( int nFxtId) ;
|
||||
@@ -799,7 +826,9 @@ EIN_EXPORT int __stdcall EgtGetFirstFixture( void) ;
|
||||
EIN_EXPORT int __stdcall EgtGetNextFixture( int nFxtId) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtMoveFixture( int nFxtId, const double vtMove[3]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtRotateFixture( int nFxtId, double dDeltaAngDeg) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetFixtureLink( int nFxtId, const wchar_t* wsTaLink) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtMoveFixtureMobile( int nFxtId, double dDeltaMov) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetFixtureMobile( int nFxtId, double dMov) ;
|
||||
// Tools DataBase
|
||||
EIN_EXPORT BOOL __stdcall EgtTdbGetToolNewName( const wchar_t* wsName, wchar_t*& wsNewName) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtTdbAddTool( const wchar_t* wsName, int nType) ;
|
||||
@@ -879,16 +908,16 @@ EIN_EXPORT int __stdcall EgtGetFirstOperation( void) ;
|
||||
EIN_EXPORT int __stdcall EgtGetNextOperation( int nId) ;
|
||||
EIN_EXPORT int __stdcall EgtGetLastOperation( void) ;
|
||||
EIN_EXPORT int __stdcall EgtGetPrevOperation( int nId) ;
|
||||
EIN_EXPORT int __stdcall EgtGetFirstActiveOperation( void) ;
|
||||
EIN_EXPORT int __stdcall EgtGetNextActiveOperation( int nId) ;
|
||||
EIN_EXPORT int __stdcall EgtGetLastActiveOperation( void) ;
|
||||
EIN_EXPORT int __stdcall EgtGetPrevActiveOperation( int nId) ;
|
||||
EIN_EXPORT int __stdcall EgtGetFirstActiveOperation( bool bNeedMachNotEmpty) ;
|
||||
EIN_EXPORT int __stdcall EgtGetNextActiveOperation( int nId, bool bNeedMachNotEmpty) ;
|
||||
EIN_EXPORT int __stdcall EgtGetLastActiveOperation( bool bNeedMachNotEmpty) ;
|
||||
EIN_EXPORT int __stdcall EgtGetPrevActiveOperation( int nId, bool bNeedMachNotEmpty) ;
|
||||
EIN_EXPORT int __stdcall EgtGetOperationType( int nId) ;
|
||||
EIN_EXPORT int __stdcall EgtGetOperationPhase( int nId) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetOperationName( int nId, const wchar_t* wsName) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetOperationName( int nId, wchar_t*& wsName) ;
|
||||
EIN_EXPORT int __stdcall EgtGetOperationId( const wchar_t* wsName) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtIsOperationEmpty( int nId) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtIsOperationEmpty( int nId, int nEmptyType) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtRemoveOperation( int nId) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtRemoveAllPhaseOperations( int nPhase) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtRemoveAllOperations( void) ;
|
||||
@@ -921,15 +950,17 @@ EIN_EXPORT BOOL __stdcall EgtSetMachiningGeometry( int nNumId, const int nIds[],
|
||||
EIN_EXPORT BOOL __stdcall EgtPreviewMachining( BOOL bRecalc) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtApplyMachining( BOOL bRecalc) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtUpdateMachining( void) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtChangePreviewMachiningToolShow( int nLookFlag) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtPreparePreviewMachiningTool( void) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtRemovePreviewMachiningTool( void) ;
|
||||
EIN_EXPORT int __stdcall EgtPreviewMachiningTool( int nEntId, int nFlag) ;
|
||||
EIN_EXPORT int __stdcall EgtGetPreviewMachiningToolStepCount( void) ;
|
||||
EIN_EXPORT int __stdcall EgtPreviewMachiningTool( int nEntId, int nStep) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetMachiningParamBool( int nType, BOOL* pbVal) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetMachiningParamInt( int nType, int* pnVal) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetMachiningParamDouble( int nType, double* pdVal) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetMachiningParamString( int nType, wchar_t*& wsVal) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetMachiningGeometry( int nInd, int* pnId, int* pnSub) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtIsMachiningEmpty( void) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtIsMachiningEmpty( int nEmptyType) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetMachiningStartPoint( double ptP[3]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetMachiningEndPoint( double ptP[3]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtApplyAllMachinings( BOOL bRecalc, BOOL bStopOnFirstErr, wchar_t*& wsErrList) ;
|
||||
@@ -941,6 +972,7 @@ EIN_EXPORT BOOL __stdcall EgtSimMove( int* pnStatus) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSimHome( void) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSimSetStep( double dStep) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSimSetUiStatus( int nUiStatus) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSimEnableToolTipTrace( BOOL bEnable) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSimGetAxisInfoPos( int nI, wchar_t*& wsName, wchar_t*& wsToken, BOOL* pbLinear, double* pdVal) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSimGetToolInfo( wchar_t*& wsTool, double* pdSpeed) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSimGetOperationInfo( wchar_t*& wsName, int* pnType) ;
|
||||
@@ -955,28 +987,33 @@ EIN_EXPORT int __stdcall EgtGetTableId( const wchar_t* wsTable) ;
|
||||
EIN_EXPORT int __stdcall EgtGetAxisId( const wchar_t* wsAxis) ;
|
||||
EIN_EXPORT int __stdcall EgtGetHeadId( const wchar_t* wsHead) ;
|
||||
EIN_EXPORT int __stdcall EgtGetHeadExitCount( const wchar_t* wsHead) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetAxisType( const wchar_t* wsAxis, BOOL* pbLinear) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetAxisDir( const wchar_t* wsAxis, double vtDir[3]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetAxisInvert( const wchar_t* wsAxis, BOOL* pbInvert) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetAxisOffset( const wchar_t* wsAxis, double* pdOffset) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetAxisPos( const wchar_t* wsAxis, double* pdVal) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetAxisMin( const wchar_t* wsAxis, double* pdMin) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetAxisMax( const wchar_t* wsAxis, double* pdMax) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetAxisHomePos( const wchar_t* wsAxis, double* pdHome) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetAllHeadsNames( wchar_t*& wsNames) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetAllTablesNames( wchar_t*& wsNames) ;
|
||||
// Machine Calc
|
||||
EIN_EXPORT BOOL __stdcall EgtSetCalcTool( const wchar_t* wsTool, const wchar_t* wsHead, int nExit) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetCalcTool( wchar_t*& wsTool, wchar_t*& wsHead, int* pnExit) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetAllCurrAxesNames( wchar_t*& wsAxNames) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetCalcAngles( const double vtDirT[3], const double vtDirA[3],
|
||||
int* pnStat, double* pdAngA1, double* pdAngB1, double* pdAngA2, double* pdAngB2) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetCalcPositions( const double ptP[3], double dAngA, double dAngB,
|
||||
EIN_EXPORT BOOL __stdcall EgtGetCalcAnglesEx( const double vtDirT[3], const double vtDirA[3],
|
||||
int* pnStat, double*& vAngs1, double*& vAngs2, int* pnCount) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetCalcPositions( const double ptP[3], int nCount, const double dAngs[],
|
||||
int* pnStat, double* pdX, double* pdY, double* pdZ) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetCalcTipFromPositions( double dX, double dY, double dZ, double dAngA, double dAngB,
|
||||
EIN_EXPORT BOOL __stdcall EgtGetCalcTipFromPositions( double dX, double dY, double dZ, int nCount, const double dAngs[],
|
||||
BOOL bBottom, double ptTip[3]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetCalcToolDirFromAngles( double dAngA, double dAngB, double vtDir[3]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetCalcToolDirFromAngles( int nCount, const double dAngs[], double vtDir[3]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtVerifyOutstroke( double dX, double dY, double dZ, double dAngA, double dAngB, int* pnStat) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetOutstrokeInfo( wchar_t*& wsInfo) ;
|
||||
// Machine Move
|
||||
EIN_EXPORT BOOL __stdcall EgtSetAxisPos( const wchar_t* wsAxis, double dVal) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetAxisPos( const wchar_t* wsAxis, double* pdVal) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetAxisMin( const wchar_t* wsAxis, double* pdMin) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetAxisMax( const wchar_t* wsAxis, double* pdMax) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetAxisHomePos( const wchar_t* wsAxis, double* pdHome) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtLoadTool( const wchar_t* wsHead, int nExit, const wchar_t* wsTool) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtResetHeadSet( const wchar_t* wsHead) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetMachineLook( int nFlag) ;
|
||||
@@ -986,7 +1023,7 @@ EIN_EXPORT BOOL __stdcall EgtInitScene( HWND hWnd, int nDriver, BOOL b2Buff, int
|
||||
EIN_EXPORT BOOL __stdcall EgtGetSceneInfo( wchar_t*& wsInfo) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetBackground( const int nTopCol[4], const int nBottomCol[4], BOOL bRedraw) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetLineAttribs( int nWidth) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetMarkAttribs( const int MarkCol[4]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetMarkAttribs( const int MarkCol[4], const int Mark2Col[4]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetSelSurfAttribs( const int SelSurfCol[4]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetGeoLineAttribs( const int GlCol[4]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetGeoTriaAttribs( const int GtCol[4]) ;
|
||||
@@ -999,6 +1036,7 @@ EIN_EXPORT BOOL __stdcall EgtSetGridGeoAdv( double dSnapStep, int nMinLineSstep,
|
||||
EIN_EXPORT BOOL __stdcall EgtSetGridColor( const int nMinCol[4], const int nMajCol[4]) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtResize( int nW, int nH) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtDraw( void) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtRedraw( void) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSelect( int nWinX, int nWinY, int nSelW, int nSelH, int* pnSel) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetObjFilterForSelWin( BOOL bZerodim, BOOL bCurve, BOOL bSurf, BOOL bVolume, BOOL bExtra) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtUnselectableAdd( int nId) ;
|
||||
@@ -1018,6 +1056,8 @@ EIN_EXPORT BOOL __stdcall EgtSetShowCurveDirection( BOOL bShow, BOOL bRedraw) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetShowCurveDirection( void) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetShowTriaAdv( BOOL bAdvanced, BOOL bRedraw) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetShowTriaAdv( void) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetShowSurfBezierTol( double dLinTol, BOOL bRedraw) ;
|
||||
EIN_EXPORT double __stdcall EgtGetShowSurfBezierTol( void) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetShowZmap( int nMode, BOOL bRedraw) ;
|
||||
EIN_EXPORT int __stdcall EgtGetShowZmap( void) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtZoom( int nZoom, BOOL bRedraw) ;
|
||||
@@ -1051,6 +1091,8 @@ EIN_EXPORT BOOL __stdcall EgtGetTextureDimensions( const wchar_t* wsName, double
|
||||
EIN_EXPORT BOOL __stdcall EgtChangeTextureDimensions( const wchar_t* wsName, double dDimX, double dDimY) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtGetImage( int nShowMode, const int TopCol[4], const int BottomCol[4],
|
||||
int nWidth, int nHeight, const wchar_t* wsName) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetCameraType( BOOL bOrthoOrPersp, BOOL bRedraw) ;
|
||||
EIN_EXPORT BOOL __stdcall EgtSetZoomType( int nZoomType, BOOL bRedraw) ;
|
||||
|
||||
// Image
|
||||
EIN_EXPORT BOOL __stdcall EgtGetImagePixels( const wchar_t* wsFile, int* pnPixelX, int* pnPixelY) ;
|
||||
|
||||
@@ -30,5 +30,7 @@ enum RawPartCenterPos { MCH_CE_TC = 1, // top center
|
||||
|
||||
//------------------------ Costanti per fixtures ------------------------------
|
||||
static std::string FXT_MOBILE = "MOBILE" ; // gruppo parte mobile
|
||||
static std::string FXT_MOB_MINPOS = "MINPOS" ; // posizione minima della parte mobile
|
||||
static std::string FXT_MOB_MAXPOS = "MAXPOS" ; // posizione massima della parte mobile
|
||||
static std::string FXT_MOB_CPOS = "CPOS" ; // posizione corrente della parte mobile
|
||||
static std::string FXT_MOB_MOVEDIR = "MDIR" ; // direzione di movimento della parte mobile (default Z di gruppo)
|
||||
|
||||
+50
-17
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2023
|
||||
// EgalTech 2015-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EMkMachMgr.h Data : 28.10.23 Versione : 2.5j4
|
||||
// File : EMkMachMgr.h Data : 09.09.25 Versione : 2.7i2
|
||||
// Contenuto : Dichiarazione della interfaccia IMachMgr.
|
||||
//
|
||||
//
|
||||
@@ -15,6 +15,11 @@
|
||||
// 21.09.22 DS Aggiunta in interfaccia GetAxisOffset.
|
||||
// 25.08.23 DS Aggiunta in interfaccia CopyMachGroup.
|
||||
// 28.10.23 DS Aggiunte in interfaccia GetClEntAxesVal, GetToolSetupPosInCurrSetup e GetAllCurrAxesName.
|
||||
// 30.03.24 DS Aggiunte in interfaccia GetAllAxesNames e GetCalcTable.
|
||||
// 02.04.24 DS Aggiunta in interfaccia GetClEntAxesMask.
|
||||
// 22.04.24 DS Aggiunta in interfaccia GetExitId.
|
||||
// 25.11.24 DS Aggiunta in interfaccia GetMachiningSkippedGeometry.
|
||||
// 09.09.25 DS Aggiunta in interfaccia GetRobotAngles.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -82,7 +87,7 @@ class __declspec( novtable) IMachMgr
|
||||
virtual int AddRawPart( const Point3d& ptOrig, double dLen, double dWidth, double dHeight, Color cCol) = 0 ;
|
||||
virtual int AddRawPartWithPart( int nPartId, int nCrvSrfId, double dOverMat, Color cCol) = 0 ;
|
||||
virtual bool ModifyRawPart( int nRawId, const Point3d& ptOrig, double dLen, double dWidth, double dHeight, Color cCol) = 0 ;
|
||||
virtual bool ModifyRawPart( int nRawId, int nCrvId, double dOverMat, double dZmin, double dHeight, Color cCol) = 0 ;
|
||||
virtual bool ModifyRawPart( int nRawId, int nCrvId, double dOverMat, double dHeight, Color cCol) = 0 ;
|
||||
virtual bool ModifyRawPartSize( int nRawId, double dLength, double dWidth, double dHeight) = 0 ;
|
||||
virtual bool ModifyRawPartHeight( int nRawId, double dHeight) = 0 ;
|
||||
virtual bool KeepRawPart( int nRawId, int nSouPhase) = 0 ;
|
||||
@@ -114,6 +119,9 @@ class __declspec( novtable) IMachMgr
|
||||
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 bool MoveDispAxis( const std::string& sName, double dPos) = 0 ;
|
||||
virtual bool RemoveDispAxis( const std::string& sName) = 0 ;
|
||||
virtual bool KeepAllDispAxes( int nSouPhase) = 0 ;
|
||||
virtual int AddFixture( const std::string& sName, const Point3d& ptPos, double dAngRotDeg, double dMov) = 0 ;
|
||||
virtual bool KeepFixture( int nFxtId, int nSouPhase) = 0 ;
|
||||
virtual bool RemoveFixture( int nFxtId) = 0 ;
|
||||
@@ -122,7 +130,9 @@ class __declspec( novtable) IMachMgr
|
||||
virtual int GetNextFixture( int nFxtId) const = 0 ;
|
||||
virtual bool MoveFixture( int nId, const Vector3d& vtMove) = 0 ;
|
||||
virtual bool RotateFixture( int nId, double dDeltaAngDeg) = 0 ;
|
||||
virtual bool SetFixtureLink( int nId, const std::string& sTaLink) = 0 ;
|
||||
virtual bool MoveFixtureMobile( int nId, double dDeltaMov) = 0 ;
|
||||
virtual bool SetFixtureMobile( int nId, double dMov) = 0 ;
|
||||
// Tools DataBase
|
||||
virtual bool TdbGetToolNewName( std::string& sName) const = 0 ;
|
||||
virtual bool TdbAddTool( const std::string& sName, int nType) = 0 ;
|
||||
@@ -166,10 +176,11 @@ class __declspec( novtable) IMachMgr
|
||||
virtual int GetCurrSetup( void) const = 0 ;
|
||||
virtual bool GetDefaultSetupName( std::string& sName) const = 0 ;
|
||||
virtual bool ImportSetup( const std::string& sName) = 0 ;
|
||||
virtual bool ExistsCurrSetup( void) const = 0 ;
|
||||
virtual bool VerifyCurrSetup( STRVECTOR& vsErrors) = 0 ;
|
||||
virtual bool FindToolInCurrSetup( const std::string& sTool) = 0 ;
|
||||
virtual bool GetToolSetupPosInCurrSetup( const std::string& sTool, std::string& sTcPos) = 0 ;
|
||||
virtual bool GetToolsInCurrSetupPos( const std::string& sTcPos, STRVECTOR& vsTools) = 0 ;
|
||||
virtual bool FindToolInCurrSetup( const std::string& sTool) const = 0 ;
|
||||
virtual bool GetToolSetupPosInCurrSetup( const std::string& sTool, std::string& sTcPos) const = 0 ;
|
||||
virtual bool GetToolsInCurrSetupPos( const std::string& sTcPos, STRVECTOR& vsTools) const = 0 ;
|
||||
virtual bool UpdateCurrSetup( void) = 0 ;
|
||||
virtual bool EraseCurrSetup( void) = 0 ;
|
||||
// Machinings DataBase
|
||||
@@ -210,16 +221,16 @@ class __declspec( novtable) IMachMgr
|
||||
virtual int GetNextOperation( int nId) const = 0 ;
|
||||
virtual int GetLastOperation( void) const = 0 ;
|
||||
virtual int GetPrevOperation( int nId) const = 0 ;
|
||||
virtual int GetFirstActiveOperation( void) const = 0 ;
|
||||
virtual int GetNextActiveOperation( int nId) const = 0 ;
|
||||
virtual int GetLastActiveOperation( void) const = 0 ;
|
||||
virtual int GetPrevActiveOperation( int nId) const = 0 ;
|
||||
virtual int GetFirstActiveOperation( bool bNeedMachNotEmpty = false) const = 0 ;
|
||||
virtual int GetNextActiveOperation( int nId, bool bNeedMachNotEmpty = false) const = 0 ;
|
||||
virtual int GetLastActiveOperation( bool bNeedMachNotEmpty = false) const = 0 ;
|
||||
virtual int GetPrevActiveOperation( int nId, bool bNeedMachNotEmpty = false) const = 0 ;
|
||||
virtual int GetOperationType( int nId) const = 0 ;
|
||||
virtual int GetOperationPhase( int nId) const = 0 ;
|
||||
virtual bool SetOperationName( int nId, const std::string& sName) = 0 ;
|
||||
virtual std::string GetOperationName( int nId) const = 0 ;
|
||||
virtual int GetOperationId( const std::string& sName) const = 0 ;
|
||||
virtual bool IsOperationEmpty( int nId) const = 0 ;
|
||||
virtual bool IsOperationEmpty( int nId, int nEmptyType = 0) const = 0 ;
|
||||
virtual bool RemoveOperation( int nId) = 0 ;
|
||||
virtual bool RemoveAllPhaseOperations( int nPhase) = 0 ;
|
||||
virtual bool RemoveAllOperations( void) = 0 ;
|
||||
@@ -237,6 +248,7 @@ class __declspec( novtable) IMachMgr
|
||||
virtual int GetPhaseDisposition( int nPhase) const = 0 ;
|
||||
virtual bool DispositionSpecialApply( int nId, bool bRecalc) = 0 ;
|
||||
virtual bool DispositionSpecialUpdate( int nId) = 0 ;
|
||||
virtual bool GetDispositionToolData( int nId, std::string& sName, std::string& sHead, int& nExit, std::string& sTcPos) = 0 ;
|
||||
// Operations : machinings
|
||||
virtual int AddMachining( const std::string& sName, const std::string& sMachining) = 0 ;
|
||||
virtual int AddMachining( const std::string& sName, int nMchType, const std::string& sTool) = 0 ;
|
||||
@@ -254,22 +266,33 @@ class __declspec( novtable) IMachMgr
|
||||
virtual bool RemoveMachiningPreview( void) = 0 ;
|
||||
virtual bool MachiningApply( bool bRecalc, bool bPostApply = true) = 0 ;
|
||||
virtual bool MachiningUpdate( bool bPostApply = true) = 0 ;
|
||||
virtual bool ChangePreviewMachiningToolShow( int nLookFlag) = 0 ;
|
||||
virtual bool PreparePreviewMachiningTool( void) const = 0 ;
|
||||
virtual bool RemovePreviewMachiningTool( void) const = 0 ;
|
||||
virtual int PreviewMachiningTool( int nEntId, int nFlag) const = 0 ;
|
||||
virtual int GetPreviewMachiningToolStepCount( void) const = 0 ;
|
||||
virtual int PreviewMachiningTool( int nEntId, int nStep) const = 0 ;
|
||||
virtual bool GetMachiningParam( int nType, bool& bVal) const = 0 ;
|
||||
virtual bool GetMachiningParam( int nType, int& nVal) const = 0 ;
|
||||
virtual bool GetMachiningParam( int nType, double& dVal) const = 0 ;
|
||||
virtual bool GetMachiningParam( int nType, std::string& sVal) const = 0 ;
|
||||
virtual bool GetMachiningGeometry( SELVECTOR& vIds) const = 0 ;
|
||||
virtual bool IsMachiningEmpty( void) const = 0 ;
|
||||
virtual bool GetMachiningSkippedGeometry( SELVECTOR& vIds) const = 0 ;
|
||||
virtual bool IsMachiningEmpty( int nEmptyType = 0) const = 0 ;
|
||||
virtual bool GetMachiningStartPoint( Point3d& ptStart) const = 0 ;
|
||||
virtual bool GetMachiningEndPoint( Point3d& ptEnd) const = 0 ;
|
||||
virtual bool GetMachiningStartAxes( bool bSkipClimb, DBLVECTOR& vAxVal) const = 0 ;
|
||||
virtual bool GetMachiningEndAxes( bool bSkipRise, DBLVECTOR& vAxVal) const = 0 ;
|
||||
// CL Entities Interrogations
|
||||
virtual bool GetClEntMove( int nEntId, int& nMove) const = 0 ;
|
||||
virtual bool GetClEntFlag( int nEntId, int& nFlag, int& nFlag2) const = 0 ;
|
||||
virtual bool GetClEntIndex( int nEntId, int& nIndex) const = 0 ;
|
||||
virtual bool GetClEntFeed( int nEntId, double& dFeed) const = 0 ;
|
||||
virtual bool GetClEntAxesStatus( int nEntId, int& nStatus) const = 0 ;
|
||||
virtual bool GetClEntAxesMask( int nEntId, int& nMask) const = 0 ;
|
||||
virtual bool GetClEntAxesVal( int nEntId, DBLVECTOR& vAxes) const = 0 ;
|
||||
virtual bool GetClEntTDir( int nEntId, Vector3d& vtTDir) const = 0 ;
|
||||
virtual bool GetClEntCDir( int nEntId, Vector3d& vtCDir) const = 0 ;
|
||||
virtual bool GetClEntADir( int nEntId, Vector3d& vtADir) const = 0 ;
|
||||
// Simulation
|
||||
virtual bool SimInit( void) = 0 ;
|
||||
virtual bool SimStart( bool bFirst) = 0 ;
|
||||
@@ -280,6 +303,7 @@ class __declspec( novtable) IMachMgr
|
||||
virtual bool SimGetMoveInfo( int& nGmove, double& dFeed) const = 0 ;
|
||||
virtual bool SimSetStep( double dStep) = 0 ;
|
||||
virtual bool SimSetUiStatus( int nUiStatus) = 0 ;
|
||||
virtual bool SimEnableToolTipTrace( bool bEnable) = 0 ;
|
||||
virtual bool SimGoHome( void) = 0 ;
|
||||
virtual bool SimExit( void) = 0 ;
|
||||
// Generation
|
||||
@@ -288,20 +312,25 @@ class __declspec( novtable) IMachMgr
|
||||
// Machine Calc
|
||||
virtual bool SetCalcTable( const std::string& sTable) = 0 ;
|
||||
virtual bool SetCalcTool( const std::string& sTool, const std::string& sHead, int nExit) = 0 ;
|
||||
virtual bool GetAllCurrAxesName( STRVECTOR& vAxName) const = 0 ;
|
||||
virtual bool SetCalcSolCh( int nScc, bool bExact) = 0 ;
|
||||
virtual bool SetRotAxisBlock( const std::string& sAxis, double dVal) = 0 ;
|
||||
virtual bool GetRotAxisBlocked( int nInd, std::string& sAxis, double& dVal) const = 0 ;
|
||||
virtual bool GetCalcTable( std::string& sTable) const = 0 ;
|
||||
virtual bool GetCalcTool( std::string& sTool) const = 0 ;
|
||||
virtual bool GetCalcHead( std::string& sHead) const = 0 ;
|
||||
virtual bool GetCalcExit( int& nExit) const = 0 ;
|
||||
virtual bool GetCalcSolCh( int& nScc, bool& bExact) const = 0 ;
|
||||
virtual bool GetAllCurrAxesNames( STRVECTOR& vAxName) const = 0 ;
|
||||
virtual bool GetRotAxisBlocked( int nInd, std::string& sAxis, double& dVal) const = 0 ;
|
||||
virtual bool GetCalcAngles( const Vector3d& vtDirT, const Vector3d& vtDirA,
|
||||
int& nStat, double& dAngA1, double& dAngB1, double& dAngA2, double& dAngB2) const = 0 ;
|
||||
virtual bool GetCalcAngles( const Vector3d& vtDirT, const Vector3d& vtDirA,
|
||||
int& nStat, DBLVECTOR& vAng1, DBLVECTOR& vAng2) const = 0 ;
|
||||
virtual bool GetCalcPositions( const Point3d& ptP, double dAngA, double dAngB,
|
||||
int& nStat, double& dX, double& dY, double& dZ) const = 0 ;
|
||||
double& dX, double& dY, double& dZ) const = 0 ;
|
||||
virtual bool GetCalcPositions( const Point3d& ptP, const DBLVECTOR& vAng,
|
||||
int& nStat, double& dX, double& dY, double& dZ) const = 0 ;
|
||||
double& dX, double& dY, double& dZ) const = 0 ;
|
||||
virtual bool GetRobotAngles( const Point3d& ptP, const Vector3d& vtDirT, const Vector3d& vtDirA,
|
||||
DBLVECTOR& vAng1, DBLVECTOR& vAng2) const = 0 ;
|
||||
virtual bool GetCalcTipFromPositions( double dX, double dY, double dZ, double dAngA, double dAngB,
|
||||
bool bOverall, bool bBottom, Point3d& ptTip) const = 0 ;
|
||||
virtual bool GetCalcTipFromPositions( double dX, double dY, double dZ, const DBLVECTOR& vAng,
|
||||
@@ -311,6 +340,7 @@ class __declspec( novtable) IMachMgr
|
||||
virtual bool GetNearestAngleInStroke( int nInd, double dAngRef, double& dAng) const = 0 ;
|
||||
virtual bool LimitAngleToStroke( int nInd, double& dAng) const = 0 ;
|
||||
virtual bool VerifyOutstroke( double dX, double dY, double dZ, double dAngA, double dAngB, int& nStat) const = 0 ;
|
||||
virtual bool VerifyOutstroke( double dX, double dY, double dZ, const DBLVECTOR& vAng, bool bClear, int& nStat) const = 0 ;
|
||||
virtual std::string GetOutstrokeInfo( bool bMM = true) const = 0 ;
|
||||
// Machine
|
||||
virtual int GetBaseId( const std::string& sBase) const = 0 ;
|
||||
@@ -318,9 +348,11 @@ class __declspec( novtable) IMachMgr
|
||||
virtual int GetAxisId( const std::string& sAxis) const = 0 ;
|
||||
virtual int GetHeadId( const std::string& sHead) const = 0 ;
|
||||
virtual int GetHeadExitCount( const std::string& sHead) const = 0 ;
|
||||
virtual int GetExitId( const std::string& sHead, int nExit) const = 0 ;
|
||||
virtual int GetTcPosId( const std::string& sTcPos) const = 0 ;
|
||||
virtual bool GetAxisToken( const std::string& sAxis, std::string& sToken) const = 0 ;
|
||||
virtual bool GetAxisType( const std::string& sAxis, bool& bLinear) const = 0 ;
|
||||
virtual bool GetAxisDir( const std::string& sAxis, Vector3d& vtDir) const = 0 ;
|
||||
virtual bool GetAxisInvert( const std::string& sAxis, bool& bInvert) const = 0 ;
|
||||
virtual bool GetAxisOffset( const std::string& sAxis, double& dOffset) const = 0 ;
|
||||
virtual bool SetAxisPos( const std::string& sAxis, double dVal, double* pdNewVal = nullptr) = 0 ;
|
||||
@@ -331,6 +363,7 @@ class __declspec( novtable) IMachMgr
|
||||
virtual bool ResetAxisPos( const std::string& sAxis) = 0 ;
|
||||
virtual bool ResetAllAxesPos( void) = 0 ;
|
||||
virtual bool GetAllTablesNames( STRVECTOR& vNames) const = 0 ;
|
||||
virtual bool GetAllAxesNames( STRVECTOR& vNames) const = 0 ;
|
||||
virtual bool GetAllHeadsNames( STRVECTOR& vNames) const = 0 ;
|
||||
virtual bool GetAllTcPosNames( STRVECTOR& vNames) const = 0 ;
|
||||
virtual bool LoadTool( const std::string& sHead, int nExit, const std::string& sTool) = 0 ;
|
||||
|
||||
+44
-13
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2023
|
||||
// EgalTech 2015-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EmkMachiningConst.h Data : 06.09.23 Versione : 2.5i1
|
||||
// File : EmkMachiningConst.h Data : 20.01.25 Versione : 2.7a1
|
||||
// Contenuto : Costanti delle lavorazioni.
|
||||
//
|
||||
//
|
||||
@@ -13,6 +13,9 @@
|
||||
// 09.11.20 DS Agg. MPA_SIDEANGFEED e MPA_STEPLAST.
|
||||
// 04.02.22 DS Agg. MPA_EPICYCLESRAD e MPA_EPICYCLESDIST.
|
||||
// 06.09.23 DS Agg. 5AxMachining.
|
||||
// 29.03.24 DS Agg. MGP_APPROXLINTOL.
|
||||
// 04.12.24 ES Agg. SURFFIN_SUB_Z_CONST e SURFFIN_SUB_OPTIMAL.
|
||||
// 20.01.25 ES Agg. SURFFIN_SUB_PROJECT.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -39,7 +42,8 @@ enum MgpType { MGP_NONE = 0,
|
||||
MGP_EXTSAWARCMINRAD = ( MGP_DOU + 4),
|
||||
MGP_INTSAWARCMAXSIDEANG =( MGP_DOU + 5),
|
||||
MGP_SAFEAGGRBOTTZ = ( MGP_DOU + 6),
|
||||
MGP_MAXDEPTHSAFE = ( MGP_DOU + 7)} ;
|
||||
MGP_MAXDEPTHSAFE = ( MGP_DOU + 7),
|
||||
MGP_APPROXLINTOL = ( MGP_DOU + 8)} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Costanti per tipologia di split arcs
|
||||
@@ -64,7 +68,8 @@ enum MachiningType {
|
||||
MT_SURFROUGHING = OPER_SURFROUGHING,
|
||||
MT_SURFFINISHING = OPER_SURFFINISHING,
|
||||
MT_WATERJETTING = OPER_WATERJETTING,
|
||||
MT_5AXMACHINING = OPER_5AXMACHINING
|
||||
MT_FIVEAXISMILLING = OPER_FIVEAXISMILLING,
|
||||
MT_PROBING = OPER_PROBING
|
||||
} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -154,6 +159,7 @@ enum MpaType { MPA_NONE = 0,
|
||||
MPA_STEPLAST = ( MPA_DOU + 51), // per tagli con lama
|
||||
MPA_EPICYCLESRAD = ( MPA_DOU + 52), // per svuotature con epicicli
|
||||
MPA_EPICYCLESDIST = ( MPA_DOU + 53), // per svuotature con epicicli
|
||||
MPA_SUBSTEP = ( MPA_DOU + 54), // per sgrossature superfici
|
||||
MPA_NAME = ( MPA_STR + 0),
|
||||
MPA_TOOL = ( MPA_STR + 1),
|
||||
MPA_DEPTH_STR = ( MPA_STR + 2),
|
||||
@@ -295,10 +301,12 @@ enum { SAWROU_HS_LEFT = 1,
|
||||
SAWROU_HS_RIGHT = 2} ;
|
||||
// Tipo di lavorazione a step
|
||||
enum { SAWROU_ST_ZIGZAG = 0,
|
||||
SAWROU_ST_ONEWAY = 1} ;
|
||||
SAWROU_ST_ONEWAY = 1,
|
||||
SAWROU_ST_ZCONST = 2} ;
|
||||
// Tipo di attacco/uscita/link
|
||||
enum { SAWROU_LL_CENT = 0,
|
||||
SAWROU_LL_OUT = 1} ;
|
||||
SAWROU_LL_OUT = 1,
|
||||
SAWROU_LL_INT = 2} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Parametri per finitura con lama
|
||||
@@ -322,7 +330,9 @@ enum { SAWFIN_LL_STD = 0,
|
||||
enum { POCKET_SUB_ZIGZAG = 0,
|
||||
POCKET_SUB_ONEWAY = 1,
|
||||
POCKET_SUB_SPIRALIN = 2,
|
||||
POCKET_SUB_SPIRALOUT = 3} ;
|
||||
POCKET_SUB_SPIRALOUT = 3,
|
||||
POCKET_SUB_CONFORMAL_ZIGZAG = 4,
|
||||
POCKET_SUB_CONFORMAL_ONEWAY = 5} ;
|
||||
// Tipo di attacco
|
||||
enum { POCKET_LI_NONE = 0,
|
||||
POCKET_LI_GLIDE = 1,
|
||||
@@ -359,7 +369,26 @@ enum { MORTISE_PLUNGE_STEP = 0,
|
||||
MORTISE_PLUNGE_START = 1,
|
||||
MORTISE_PLUNGE_END = 2,
|
||||
MORTISE_PLUNGE_START_END = 3,
|
||||
MORTISE_PLUNGE_START_TO_END = 4} ;
|
||||
MORTISE_PLUNGE_START_TO_END = 4,
|
||||
MORTISE_PLUNGE_STEP_NO_SAFEZ = 10} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Parametri per sgrossatura superfici
|
||||
// Sottotipo di lavorazione
|
||||
enum { SURFROU_SUB_ZIGZAG = 0,
|
||||
SURFROU_SUB_ONEWAY = 1,
|
||||
SURFROU_SUB_SPIRALIN = 2,
|
||||
SURFROU_SUB_SPIRALOUT = 3,
|
||||
SURFROU_SUB_CONFORMAL_ZIGZAG = 4,
|
||||
SURFROU_SUB_CONFORMAL_ONEWAY = 5} ;
|
||||
// Tipo di attacco
|
||||
enum { SURFROU_LI_NONE = 0,
|
||||
SURFROU_LI_GLIDE = 1,
|
||||
SURFROU_LI_ZIGZAG = 2,
|
||||
SURFROU_LI_HELIX = 3} ;
|
||||
// Tipo di uscita
|
||||
enum { SURFROU_LO_NONE = 0,
|
||||
SURFROU_LO_GLIDE = 1} ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Parametri per finitura superfici
|
||||
@@ -367,14 +396,15 @@ enum { MORTISE_PLUNGE_STEP = 0,
|
||||
enum { SURFFIN_SUB_ZIGZAG = 0,
|
||||
SURFFIN_SUB_ONEWAY = 1,
|
||||
SURFFIN_SUB_SPIRALIN = 2,
|
||||
SURFFIN_SUB_SPIRALOUT = 3} ;
|
||||
SURFFIN_SUB_SPIRALOUT = 3,
|
||||
SURFFIN_SUB_Z_CONST = 4,
|
||||
SURFFIN_SUB_OPTIMAL = 5,
|
||||
SURFFIN_SUB_PROJECT = 6,
|
||||
SURFFIN_SUB_PENCIL = 7} ;
|
||||
// Tipo di attacco
|
||||
enum { SURFFIN_LI_NONE = 0,
|
||||
SURFFIN_LI_LINEAR = 1,
|
||||
SURFFIN_LI_TANGENT = 2} ;
|
||||
// Tipo di link
|
||||
enum { SURFFIN_LL_STD = 0,
|
||||
SURFFIN_LL_CENT = 1} ;
|
||||
// Tipo di uscita
|
||||
enum { SURFFIN_LO_NONE = 0,
|
||||
SURFFIN_LO_LINEAR = 1,
|
||||
@@ -393,7 +423,8 @@ enum { WJET_EC_NONE = 0,
|
||||
WJET_EC_LOOP = 2} ;
|
||||
// Comportamento su angolo interno
|
||||
enum { WJET_IC_NONE = 0,
|
||||
WJET_IC_SLOW = 1} ;
|
||||
WJET_IC_SLOW = 1,
|
||||
WJET_IC_SLOW_FULL = 2} ;
|
||||
// Tipo di attacco
|
||||
enum { WJET_LI_NONE = 0,
|
||||
WJET_LI_LINEAR = 1,
|
||||
|
||||
+18
-2
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2016-2016
|
||||
// EgalTech 2016-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EmkMachiningGeoConst.h Data : 06.01.16 Versione : 1.6l6
|
||||
// File : EmkMachiningGeoConst.h Data : 25.11.24 Versione : 2.6k5
|
||||
// Contenuto : Costanti per le geometrie delle lavorazioni.
|
||||
//
|
||||
//
|
||||
@@ -26,25 +26,32 @@ static std::string KEY_STRAIGHT = "STR" ;
|
||||
static std::string KEY_NUM = "NUM" ;
|
||||
// Chiave per stato di aggiornamento di lavorazione
|
||||
static std::string KEY_STAT = "STAT" ;
|
||||
// Chiave per elenco identificativi non lavorati
|
||||
static std::string KEY_SKIPS = "SKIPS" ;
|
||||
// Sottogruppi delle lavorazioni
|
||||
static std::string MCH_AUX = "AUX" ;
|
||||
static std::string MCH_AUXVIEW = "AVIEW" ;
|
||||
static std::string MCH_TABS = "TABS" ;
|
||||
static std::string MCH_PV = "PV" ;
|
||||
static std::string MCH_ST = "ST" ;
|
||||
static std::string MCH_ST_DBL = "STDBL" ;
|
||||
static std::string MCH_CL = "CL" ;
|
||||
static std::string MCH_DBL = "DBL" ;
|
||||
static std::string MCH_HOME = "HOME" ;
|
||||
static std::string MCH_PATH = "P" ;
|
||||
// Nomi di entità CL speciali
|
||||
static std::string MCH_CL_CLIMB = "CLIMB" ;
|
||||
static std::string MCH_CL_RISE = "RISE" ;
|
||||
static std::string MCH_CL_HOME = "HOME" ;
|
||||
static std::string MCH_CL_SAFEIN = "SI" ;
|
||||
static std::string MCH_CL_LEADIN = "LI" ;
|
||||
static std::string MCH_CL_LEADOUT = "LO" ;
|
||||
static std::string MCH_CL_SAFEOUT = "SO" ;
|
||||
static std::string MCH_CL_AGB_DWN = "AGBD" ;
|
||||
static std::string MCH_CL_AGB_IN = "AGBI" ;
|
||||
static std::string MCH_CL_AGB_OUT = "AGBO" ;
|
||||
static std::string MCH_CL_AGB_UP = "AGBU" ;
|
||||
static std::string MCH_CL_PARALLEL_DBL = "DBP" ;
|
||||
// Nomi di entità di preview
|
||||
static std::string MCH_PV_CUT = "CUT" ;
|
||||
static std::string MCH_PV_PRE_CUT = "PRC" ;
|
||||
@@ -108,6 +115,15 @@ static std::string KEY_MMAX = "MMAX" ;
|
||||
// Chiavi info in gruppo CL per punti assi minimo e massimo di ingombro di tutta la lavorazione
|
||||
static std::string KEY_MAXMIN = "MAXMIN" ;
|
||||
static std::string KEY_MAXMAX = "MAXMAX" ;
|
||||
// Chiave info in gruppo CL per indicare il tipo di catena cinematica
|
||||
static std::string KEY_KINTYPE = "KINTYPE" ;
|
||||
// Chiave info in sottogruppo di CL per uscite attivate (per forature con gang drill)
|
||||
static std::string KEY_DRACEX = "DRACEX" ;
|
||||
// Chiave info in sottogruppo di testa per abilitarne visualizzazione in Preview (0/1 default)
|
||||
static std::string KEY_PREVIEWSHOW = "PreviewShow" ;
|
||||
// Chiavi info in entità di CL e DBL per riferimenti reciproci
|
||||
static std::string KEY_DBL_MAIN = "Main" ;
|
||||
static std::string KEY_CL_DOUBLE = "Double" ;
|
||||
|
||||
//----------------- Costanti posizione per preview utensile in lavorazione ------
|
||||
enum MchToolShow { MCH_TPM_CURR = 0,
|
||||
|
||||
+21
-18
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2023
|
||||
// EgalTech 2015-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EmkOperationConst.h Data : 06.09.23 Versione : 2.5i1
|
||||
// File : EmkOperationConst.h Data : 09.06.25 Versione : 2.7f2
|
||||
// Contenuto : Costanti delle operazioni.
|
||||
//
|
||||
//
|
||||
@@ -13,27 +13,29 @@
|
||||
// 25.05.19 DS Agg. SurfRoughing e SurfFinishing.
|
||||
// 08.07.19 DS Agg. WaterJetting.
|
||||
// 06.09.23 DS Agg. 5AxMachining.
|
||||
// 09.06.25 DS Agg. Probing.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
//------------------------ Costanti per tipo Operazioni -----------------------
|
||||
enum OperType { OPER_NULL = 0, // nulla
|
||||
OPER_DISP = 0x000100, // disposizione
|
||||
OPER_DRILLING = 0x000200, // foratura
|
||||
OPER_SAWING = 0x000400, // taglio di lama
|
||||
OPER_MILLING = 0x000800, // fresatura
|
||||
OPER_POCKETING = 0x001000, // svuotatura
|
||||
OPER_MORTISING = 0x002000, // mortasatura
|
||||
OPER_SAWROUGHING = 0x004000, // sgrossatura con lama
|
||||
OPER_SAWFINISHING = 0x008000, // finitura con lama
|
||||
OPER_GENMACHINING = 0x010000, // lavorazione generica
|
||||
OPER_CHISELING = 0x020000, // scalpellatura
|
||||
OPER_SURFROUGHING = 0x040000, // sgrossatura superficie
|
||||
OPER_SURFFINISHING = 0x080000, // finitura superficie
|
||||
OPER_WATERJETTING = 0x100000, // taglio water jet
|
||||
OPER_5AXMACHINING = 0x200000} ; // lavorazione 5 assi
|
||||
enum OperType { OPER_NULL = 0, // nulla
|
||||
OPER_DISP = 0x000100, // disposizione
|
||||
OPER_DRILLING = 0x000200, // foratura
|
||||
OPER_SAWING = 0x000400, // taglio di lama
|
||||
OPER_MILLING = 0x000800, // fresatura
|
||||
OPER_POCKETING = 0x001000, // svuotatura
|
||||
OPER_MORTISING = 0x002000, // mortasatura
|
||||
OPER_SAWROUGHING = 0x004000, // sgrossatura con lama
|
||||
OPER_SAWFINISHING = 0x008000, // finitura con lama
|
||||
OPER_GENMACHINING = 0x010000, // lavorazione generica
|
||||
OPER_CHISELING = 0x020000, // scalpellatura
|
||||
OPER_SURFROUGHING = 0x040000, // sgrossatura superficie
|
||||
OPER_SURFFINISHING = 0x080000, // finitura superficie
|
||||
OPER_WATERJETTING = 0x100000, // taglio water jet
|
||||
OPER_FIVEAXISMILLING = 0x200000, // lavorazione 5 assi
|
||||
OPER_PROBING = 0x400000} ; // tastatura
|
||||
// Controllo tipo valido
|
||||
bool inline IsValidDispositionType( int nType)
|
||||
{
|
||||
@@ -53,5 +55,6 @@ bool inline IsValidMachiningType( int nType)
|
||||
nType == OPER_SURFROUGHING ||
|
||||
nType == OPER_SURFFINISHING ||
|
||||
nType == OPER_WATERJETTING ||
|
||||
nType == OPER_5AXMACHINING) ;
|
||||
nType == OPER_FIVEAXISMILLING ||
|
||||
nType == OPER_PROBING) ;
|
||||
}
|
||||
|
||||
+15
-4
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2021
|
||||
// EgalTech 2015-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EmkToolConst.h Data : 16.09.21 Versione : 2.3i6
|
||||
// File : EmkToolConst.h Data : 09.06.25 Versione : 2.7f2
|
||||
// Contenuto : Costanti degli utensili.
|
||||
//
|
||||
//
|
||||
@@ -11,6 +11,7 @@
|
||||
// 20.09.18 DS Agg. costanti per ToolHolder
|
||||
// 05.04.21 DS Agg. TPA_DIST e TPA_STEMDIAM.
|
||||
// 16.09.21 DS Agg. TPA_CORE.
|
||||
// 09.06.25 DS Agg. probe.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -27,6 +28,7 @@ const int TF_MORTISE = 0x0800 ; // 2048
|
||||
const int TF_CHISEL = 0x1000 ; // 4096
|
||||
const int TF_WATERJET = 0x2000 ; // 8192
|
||||
const int TF_COMPO = 0x4000 ; // 16384
|
||||
const int TF_PROBE = 0x8000 ; // 32768
|
||||
// Costante per tutte le famiglie
|
||||
const int TF_ALL = 0xFF00 ;
|
||||
// Tipologie di utensili
|
||||
@@ -42,7 +44,8 @@ enum ToolType {
|
||||
TT_MORTISE_STD = TF_MORTISE + 0, // 2048
|
||||
TT_CHISEL_STD = TF_CHISEL + 0, // 4096
|
||||
TT_WATERJET = TF_WATERJET + 0, // 8192
|
||||
TT_COMPO = TF_COMPO + 0 // 16384
|
||||
TT_COMPO = TF_COMPO + 0, // 16384
|
||||
TT_PROBE = TF_PROBE + 0 // 32768
|
||||
} ;
|
||||
// Controllo tipo valido
|
||||
bool inline IsValidToolType( int nType)
|
||||
@@ -53,7 +56,8 @@ bool inline IsValidToolType( int nType)
|
||||
nType == TT_MORTISE_STD ||
|
||||
nType == TT_CHISEL_STD ||
|
||||
nType == TT_WATERJET ||
|
||||
nType == TT_COMPO) ;
|
||||
nType == TT_COMPO ||
|
||||
nType == TT_PROBE) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -122,3 +126,10 @@ const std::string TTH_BASE = "B" ; // posizione base portau
|
||||
const std::string TTH_LEN = "H" ; // lunghezza portautensile da naso mandrino
|
||||
const std::string TTH_DIAM = "D" ; // diametro massimo portautensile
|
||||
const std::string TTH_STEM_DIAM = "D_STEM" ; // diametro massimo gambo utensile
|
||||
const std::string TTH_TYPE = "TYPE" ; // stringa tipo di portautensile
|
||||
const std::string TTH_TYPE_STD = "Std" ; // tipo standard (default)
|
||||
const std::string TTH_TYPE_FLOAT = "Float" ; // tipo flottante
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Costanti per nomi di parti di utensile
|
||||
const std::string TNA_TOOL_START = "Tool_" ; // inizio nome delle geometrie che costituiscono il vero utensile
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2025-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : ENkMachOptimization.h Data : 31.03.25 Versione : 2.7a1
|
||||
// Contenuto : Classe per calcolo ottimizzato per le lavorazioni.
|
||||
//
|
||||
//
|
||||
// Modifiche : 31.03.2025 RE Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EgtNumCollection.h"
|
||||
|
||||
//----------------------- Macro per import/export ----------------------------
|
||||
#undef ENK_EXPORT
|
||||
#if defined( I_AM_ENK) // da definirsi solo nella DLL
|
||||
#define ENK_EXPORT __declspec( dllexport)
|
||||
#else
|
||||
#define ENK_EXPORT __declspec( dllimport)
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
// Definizione utensile
|
||||
struct ToolOptm {
|
||||
int nId ; // Id dell'utensile ( univoco)
|
||||
|
||||
double dTCX ; // Coordinata cambio utensile per X
|
||||
double dTCY ; // Coordinata cambio utensile per Y
|
||||
double dTCZ ; // Coordinata cambio utensile per Z
|
||||
double dTCA ; // Coordinata cambio utensile per A
|
||||
double dTCB ; // Coordinata cambio utensile per B
|
||||
double dTCC ; // Coordinata cambio utensile per C
|
||||
|
||||
bool bTCX ; // Flag per condsiderare/scartare il controllo sulla coordinata X
|
||||
bool bTCY ; // Flag per condsiderare/scartare il controllo sulla coordinata Y
|
||||
bool bTCZ ; // Flag per condsiderare/scartare il controllo sulla coordinata Z
|
||||
bool bTCA ; // Flag per condsiderare/scartare il controllo sulla coordinata A
|
||||
bool bTCB ; // Flag per condsiderare/scartare il controllo sulla coordinata B
|
||||
bool bTCC ; // Flag per condsiderare/scartare il controllo sulla coordinata C
|
||||
|
||||
double dTLoad ; // Tempo di carico
|
||||
double dTUnLoad ; // Tempo di scarico
|
||||
|
||||
ToolOptm( int nI, double dX, double dY, double dZ, double dA, double dB, double dC,
|
||||
bool bX, bool bY, bool bZ, bool bA, bool bB, bool bC, double dTL, double dTUL) :
|
||||
nId( nI), dTCX( dX), dTCY( dY), dTCZ( dZ), dTCA( dA), dTCB( dB), dTCC( dC),
|
||||
bTCX( bX), bTCY( bY), bTCZ( bZ), bTCA( bA), bTCB( bB), bTCC( bC), dTLoad( dTL), dTUnLoad( dTUL) {}
|
||||
} ;
|
||||
typedef std::vector<ToolOptm> TOOLOPTMVECTOR ;
|
||||
|
||||
// Definizione strutta per singola lavorazione
|
||||
struct MachOptm {
|
||||
int nId ; // Id della lavorazione corrente
|
||||
int nIdTool ; // Id dell'utensile corrente
|
||||
int nGroup ; // Gruppo di appartenenza della lavorazione
|
||||
|
||||
double dX_Start ; // Stato iniziale asse lineare X
|
||||
double dY_Start ; // Stato iniziale asse lineare Y
|
||||
double dZ_Start ; // Stato iniziale asse lineare Z
|
||||
double dA_Start ; // Stato iniziale asse rotante A
|
||||
double dB_Start ; // Stato iniziale asse rotante B
|
||||
double dC_Start ; // Stato iniziale asse rotante C
|
||||
|
||||
double dX_End ; // Stato finale asse lineare X
|
||||
double dY_End ; // Stato finale asse lineare Y
|
||||
double dZ_End ; // Stato finale asse lineare Z
|
||||
double dA_End ; // Stato finale asse rotante A
|
||||
double dB_End ; // Stato finale asse rotante B
|
||||
double dC_End ; // Stato finale asse rotante C
|
||||
|
||||
MachOptm( int nIdL, int nToolL, int nGroupL,
|
||||
double dX_Start, double dY_Start, double dZ_Start, double dA_Start, double dB_Start, double dC_Start,
|
||||
double dX_End, double dY_End, double dZ_End, double dA_End, double dB_End, double dC_End) :
|
||||
nId( nIdL), nIdTool( nToolL), nGroup( nGroupL),
|
||||
dX_Start( dX_Start), dY_Start( dY_Start), dZ_Start( dZ_Start),
|
||||
dA_Start( dA_Start) , dB_Start( dB_Start), dC_Start( dC_Start),
|
||||
dX_End( dX_End), dY_End( dY_End), dZ_End( dZ_End),
|
||||
dA_End( dA_End), dB_End( dB_End), dC_End( dC_End) {}
|
||||
MachOptm()
|
||||
: nId( -1), nIdTool( -1), nGroup( -1),
|
||||
dX_Start( 0.), dY_Start( 0.), dZ_Start( 0.),
|
||||
dA_Start( 0.) , dB_Start( 0.), dC_Start( 0.),
|
||||
dX_End( 0.), dY_End( 0.), dZ_End( 0.),
|
||||
dA_End( 0.), dB_End( 0.), dC_End( 0.) {} ;
|
||||
} ;
|
||||
typedef std::vector<MachOptm> MACHOPTMVECTOR ;
|
||||
typedef std::vector<MACHOPTMVECTOR> MACHOPTMMATRIX ;
|
||||
|
||||
// Definizione struttura per OpenBounds
|
||||
struct OpenBoundOptm {
|
||||
int nGroup ;
|
||||
bool bStartVsEnd ;
|
||||
int nFlag ;
|
||||
double dX ;
|
||||
double dY ;
|
||||
double dZ ;
|
||||
|
||||
OpenBoundOptm( int nOBGroup, bool bOBStartVsEnd, int nOBFlag, double dOBX, double dOBY, double dOBZ )
|
||||
: nGroup( nOBGroup), bStartVsEnd( bOBStartVsEnd), nFlag( nOBFlag), dX( dOBX), dY( dOBY), dZ( dOBZ) {}
|
||||
} ;
|
||||
typedef std::vector<OpenBoundOptm> MACHOPTOPENBOUNDVECTOR ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class __declspec( novtable) IMachOptimization
|
||||
{
|
||||
public :
|
||||
virtual ~IMachOptimization( void) {}
|
||||
virtual bool InsertTool( int nId, double dTCX, double dTCY, double dTCZ, double dTCA,
|
||||
double dTCB, double dTCC, bool bX, bool bY, bool bZ, bool bA,
|
||||
bool bB, bool bC, double dTLoad, double dTUnL) ;
|
||||
virtual bool InsertMachining( int nId, int nToolId, int nGroup,
|
||||
double dX_Start, double dY_Start, double dZ_Start,
|
||||
double dA_Start, double dB_Start, double dC_Start,
|
||||
double dX_End, double dY_End, double dZ_End,
|
||||
double dA_End, double dB_End, double dC_End) = 0 ;
|
||||
virtual bool InsertDependence( int nIdPrec, int nIdSucc) = 0 ;
|
||||
virtual bool InsertSuggestedDependences( int nIdPrec, int nIdSucc) = 0 ;
|
||||
virtual bool SetFirstMachining( int nId) = 0 ;
|
||||
virtual bool SetLastMachining( int nId) = 0 ;
|
||||
virtual bool SetFeeds( double dFeedL, double dFeedA) = 0 ;
|
||||
virtual bool SetAllGroupsAsMandatory( bool bAllMandatory = false) = 0 ;
|
||||
virtual bool SetOptimizationForGroups( bool bOptForGroups = false) = 0 ;
|
||||
virtual bool SetOpenBound( bool bStartVsEnd, int nFlag, double dX, double dY, double dZ) = 0 ;
|
||||
virtual bool SetOpenBoundForGroups( int nGroup, bool bStartVsEnd, int nFlag, double dX, double dY, double dZ) = 0 ;
|
||||
virtual bool Calculate( INTVECTOR& vIds) = 0 ;
|
||||
} ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
ENK_EXPORT IMachOptimization* CreateMachOptimization( void) ;
|
||||
@@ -39,6 +39,9 @@ class __declspec( novtable) IShortestPath
|
||||
virtual bool Calculate( int nType) = 0 ;
|
||||
virtual bool GetOrder( INTVECTOR& vOrder) = 0 ;
|
||||
virtual bool GetMinLength( double& dMinLen) = 0 ;
|
||||
virtual bool SetConstraintOrder( int nPrev, int nNext) = 0 ;
|
||||
virtual bool SetSuggestedOrder( int nPrev, int nNext) = 0 ;
|
||||
virtual bool SetDistMatrix( const INTMATRIX& mDistMatrix) = 0 ;
|
||||
|
||||
public :
|
||||
enum SpType{ SP_NONE = 0,
|
||||
|
||||
@@ -57,11 +57,13 @@ class __declspec( novtable) IAutoNester
|
||||
virtual bool SetStripYconstraintToPart( int nPartId, const Point3d& ptRef, double dStripStart, double dStripRepeat) = 0 ;
|
||||
virtual bool SetStripXconstraintToPart( int nPartId, const Point3d& ptRef, double dStripStart, double dStripRepeat) = 0 ;
|
||||
virtual bool SetInterpartGap( double dGap) = 0 ;
|
||||
virtual bool SetShearGap( double dShearGap) = 0 ;
|
||||
virtual bool SetReportFile( const std::string& sReportFile) = 0 ;
|
||||
virtual bool Compute( bool bMinimizeOnXvsY, int nMaxTime) = 0 ;
|
||||
virtual bool CancelComputation( void) = 0 ;
|
||||
virtual bool GetComputationStatus( int& nStatus) = 0 ;
|
||||
virtual bool GetResults( double& dTotFillRatio, ANIVECT& vANI) = 0 ;
|
||||
virtual bool CalcShearSequence( int nNesting, std::vector<Point3d>& vPtStart, std::vector<Point3d>& vPtEnd) = 0 ;
|
||||
virtual bool PrintResults( const std::string& sHtmlFile) = 0 ;
|
||||
} ;
|
||||
|
||||
|
||||
+45
-30
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2014-2022
|
||||
// EgalTech 2014-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EXeConst.h Data : 11.01.22 Versione : 2.4a
|
||||
// File : EXeConst.h Data : 11.05.25 Versione : 2.7e2
|
||||
// Contenuto : Costanti generali per EgtExecuter.
|
||||
//
|
||||
//
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
//----------------- Costanti per tipo di file ----------------------------------
|
||||
enum FileType { FT_NULL = 0,
|
||||
@@ -28,8 +29,10 @@ 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_PLY = 24,
|
||||
FT_IGES = 31,
|
||||
FT_STEP = 32,
|
||||
FT_ACIS = 33,
|
||||
@@ -56,7 +59,8 @@ const int RTY_DEFAULT = RTY_LOC ;
|
||||
//----------------- Costanti tipo di interpolazione ----------------------------
|
||||
enum InterpType{ ITT_ARCS = 0, // stima tg Akima, curve risultanti archi
|
||||
ITT_ARCS_CORNER = 1, // stima tg AkimaCorner, curve risultanti archi
|
||||
ITT_CUBICS = 2} ; // stima tg Bessel, curve risultanti Bezier cubiche
|
||||
ITT_CUBICS = 2, // stima tg Bessel, curve risultanti Bezier cubiche
|
||||
ITT_CUBICS_LONG = 3} ; // interpolazione con nurbs, poi convertite in bezier
|
||||
|
||||
//----------------- Costanti tipo di approssimazione di curve ------------------
|
||||
enum ApprType{ APP_LINES = 0, // come ICurve::APL_STD
|
||||
@@ -65,7 +69,8 @@ enum ApprType{ APP_LINES = 0, // come ICurve::APL_STD
|
||||
APP_LEFT_CONVEX_LINES = 11, // come ICurve::APL_LEFT_CONVEX
|
||||
APP_RIGHT_LINES = 2, // come ICurve::APL_RIGHT
|
||||
APP_RIGHT_CONVEX_LINES = 12, // come ICurve::APL_RIGHT_CONVEX
|
||||
APP_ARCS = 3} ;
|
||||
APP_ARCS = 3,
|
||||
APP_CUBIC_BEZIER = 4} ;
|
||||
|
||||
//----------------- Costanti tipo punto intersezione Linea Curva ---------------
|
||||
enum CLiType { CLT_NONE = 0,
|
||||
@@ -81,8 +86,9 @@ enum CLiType { CLT_NONE = 0,
|
||||
//----------------- Costanti tipo di costruzione di superficie rigata ----------
|
||||
enum RuledType{ RUL_TYPE_ISOPAR = 0, // come ISurfTrimesh::RLT_ISOPAR
|
||||
RUL_TYPE_MINDIST = 1, // come ISurfTrimesh::RLT_MINDIST
|
||||
RUL_TYPE_ISOPAR_SMOOTH = 3} ; // come ISurfTrimesh::RLT_ISOPAR_SMOOTH
|
||||
RUL_TYPE_ISOPAR_SMOOTH = 2} ; // come ISurfTrimesh::RLT_ISOPAR_SMOOTH
|
||||
|
||||
//----------------- Costanti per classificazione di curve rispetto a regioni ---------
|
||||
enum CrvRegClass { CRC_NULL = 0,
|
||||
CRC_IN = 1,
|
||||
CRC_OUT = 2,
|
||||
@@ -95,6 +101,10 @@ enum RSCapType { RSCT_NONE = 0, // come RSCAP_NONE
|
||||
RSCT_ROUND = 2, // come RSCAP_ROUND
|
||||
RSCT_BEVEL = 3} ; // come RSCAP_BEVEL
|
||||
|
||||
//----------------- Costanti tipo Zoom -----------------------------------------
|
||||
enum ZoomType { ZM_ALL = 1, // zoom tutto
|
||||
ZM_IN = 2, // ingrandisci
|
||||
ZM_OUT = 3} ; // rimpicciolisci
|
||||
|
||||
//----------------- Costanti flag import CNC -----------------------------------
|
||||
enum EicFlag { EIC_FLAG_NONE = 0, // come EImCncFlag::EICFLAG_NONE
|
||||
@@ -109,36 +119,41 @@ enum EibFlag { EIB_FLAG_NONE = 0, // come EImBtlFlag::EIBFLAG_NONE
|
||||
EIB_FLAG_SPECIAL_TRIM = 4} ; // come EImBtlFlag::EIBFLAG_SPECIAL_TRIM
|
||||
|
||||
//----------------- Costanti tipo costruzione pezzi piani ----------------------
|
||||
enum FpcType{ FPC_NGE = 0, // costruzione da pezzo Nge
|
||||
FPC_REGION = 1, // costruzione da regione
|
||||
FPC_LAYER = 2, // costruzione da layer
|
||||
FPC_CLOSEDCURVE = 3} ; // costruzione da curva chiusa
|
||||
enum FpcType { FPC_NGE = 0, // costruzione da pezzo Nge
|
||||
FPC_REGION = 1, // costruzione da regione
|
||||
FPC_LAYER = 2, // costruzione da layer
|
||||
FPC_CLOSEDCURVE = 3} ; // costruzione da curva chiusa
|
||||
|
||||
//----------------- Costanti tipo interferenza di lavorazioni piane ------------
|
||||
enum FmiType{ FMI_NONE = 0, // nessuna interferenza
|
||||
FMI_LI = 1, // interferenza con attacco
|
||||
FMI_RM = 2, // interferenza con lavorazione ridotta
|
||||
FMI_LO = 4} ; // interferenza con uscita
|
||||
enum FmiType { FMI_NONE = 0, // nessuna interferenza
|
||||
FMI_LI = 1, // interferenza con attacco
|
||||
FMI_RM = 2, // interferenza con lavorazione ridotta
|
||||
FMI_LO = 4} ; // interferenza con uscita
|
||||
|
||||
//----------------- Costanti risultato verifica tagli lama allungati -----------
|
||||
enum CarRes{ CAR_INTERF = 0, // interferiscono entrambi gli allungamenti
|
||||
CAR_LI_OK = 1, // allungamento inizio va bene
|
||||
CAR_LO_OK = 2, // allungameno uscita va bene
|
||||
CAR_LI_LO_OK = 1 + 2} ; // entrambi gli allungamenti vanno bene
|
||||
enum CarRes { CAR_INTERF = 0, // interferiscono entrambi gli allungamenti
|
||||
CAR_LI_OK = 1, // allungamento inizio va bene
|
||||
CAR_LO_OK = 2, // allungameno uscita va bene
|
||||
CAR_LI_LO_OK = 1 + 2} ; // entrambi gli allungamenti vanno bene
|
||||
|
||||
//----------------- Costanti tipo Zoom -----------------------------------------
|
||||
enum ZoomType { ZM_ALL = 1, // zoom tutto
|
||||
ZM_IN = 2, // ingrandisci
|
||||
ZM_OUT = 3} ; // rimpicciolisci
|
||||
//----------------- Costanti tipo controllo lavorazione vuota -------------------
|
||||
enum EmptyNeed { EMP_NEED_GEOM = 0, // necessaria solo presenza geometria di definizione
|
||||
EMP_NEED_ONE_TP_OK = 1, // almeno un percorso utensile non vuoto
|
||||
EMP_NEED_ALL_TP_OK = 2} ; // tutti i percorsi utensile non vuoti
|
||||
|
||||
//----------------- Costanti errore simulatore in cieco ------------------------
|
||||
enum SimHideErr { SHE_NONE = 0, // nessun errore
|
||||
SHE_INIT = 1, // errore nell'avvio della simulazione
|
||||
SHE_OUTSTROKE = 2, // errore di extracorsa
|
||||
SHE_DIR_ERR = 3, // errore direzione utensile non raggiungibile
|
||||
SHE_COLLISION = 4, // errore collisione testa-pezzo
|
||||
SHE_SPECIAL = 5, // errore speciale/custom
|
||||
SHE_GENERAL = 6} ; // errore generico
|
||||
enum SimHideErr { SHE_NONE = 0, // nessun errore
|
||||
SHE_INIT = 1, // errore nell'avvio della simulazione
|
||||
SHE_OUTSTROKE = 2, // errore di extracorsa
|
||||
SHE_DIR_ERR = 3, // errore direzione utensile non raggiungibile
|
||||
SHE_COLLISION = 4, // errore collisione testa-pezzo
|
||||
SHE_SPECIAL = 5, // errore speciale/custom
|
||||
SHE_GENERAL = 6} ; // errore generico
|
||||
|
||||
//----------------- Costanti Offset per VolZmap --------------------------------
|
||||
enum VolZmapOffset { FILLET = 0 , // come in VolZmap
|
||||
CHAMFER = 1, // come in VolZmap
|
||||
EXTEND = 2 } ; // come in VolZmap
|
||||
|
||||
//----------------- Costanti per sostituzione direttorio e nome progetto --------------------
|
||||
const std::string SUB_PROJECT_DIR = "%PRJDIR%" ;
|
||||
|
||||
+254
-46
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2024
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EXcExecutor.h Data : 09.01.24 Versione : 2.5l6
|
||||
// File : EXcExecutor.h Data : 30.03.24 Versione : 2.6d1
|
||||
// Contenuto : Interfaccia Executor.
|
||||
//
|
||||
//
|
||||
@@ -37,7 +37,7 @@ class LuaMgr ;
|
||||
// General
|
||||
EXE_EXPORT bool ExeInit( int nDebug, const std::string& sLogFile, const std::string& sLogMsg) ;
|
||||
EXE_EXPORT bool ExeExit( void) ;
|
||||
EXE_EXPORT bool ExeSetOnTerminateProcess( pfOnTerminateProcess pFun) ;
|
||||
EXE_EXPORT bool ExeSetOnTerminateProcess( psfOnTerminateProcess pFun) ;
|
||||
EXE_EXPORT bool ExeOnTerminateProcess( int nExitCode) ;
|
||||
EXE_EXPORT int ExeGetDebugLevel( void) ;
|
||||
EXE_EXPORT bool ExeSetUserLevel( int nUserLev) ;
|
||||
@@ -64,6 +64,7 @@ EXE_EXPORT bool ExeGetKeyOptions( int nProd, int nVer, int nLev, unsigned int& n
|
||||
EXE_EXPORT bool ExeGetKeyLeftDays( int& nLeftDays) ;
|
||||
EXE_EXPORT bool ExeGetKeyAssLeftDays( int& nAssLeftDays) ;
|
||||
EXE_EXPORT bool ExeGetKeyOptLeftDays( int& nOptLeftDays) ;
|
||||
EXE_EXPORT bool ExeGetNetHwKey( void) ;
|
||||
EXE_EXPORT bool ExeGetOsInfo( std::string& sOs) ;
|
||||
EXE_EXPORT bool ExeGetCpuInfo( std::string& sCpu) ;
|
||||
EXE_EXPORT bool ExeGetMemoryInfo( std::string& sMem) ;
|
||||
@@ -71,9 +72,9 @@ EXE_EXPORT bool ExeOutLog( const std::string& sMsg, int nDebugLevel = 0) ;
|
||||
EXE_EXPORT bool ExeSetEnableUI( bool bEnableUI) ;
|
||||
EXE_EXPORT bool ExeGetEnableUI( void) ;
|
||||
EXE_EXPORT int ExeMessageBox( const std::string& sText, const std::string& sTitle, int nType) ;
|
||||
EXE_EXPORT bool ExeSetProcessEvents( pfProcEvents pFun) ;
|
||||
EXE_EXPORT bool ExeSetProcessEvents( psfProcEvents pFun) ;
|
||||
EXE_EXPORT int ExeProcessEvents( int nProg, int nPause) ;
|
||||
EXE_EXPORT bool ExeSetOutText( pfOutText pFun) ;
|
||||
EXE_EXPORT bool ExeSetOutText( psfOutText pFun) ;
|
||||
EXE_EXPORT bool ExeOutText( const std::string& sText) ;
|
||||
EXE_EXPORT bool ExeSetTempDir( const std::string& sTempDir) ;
|
||||
EXE_EXPORT bool ExeGetTempDir( std::string& sTempDir) ;
|
||||
@@ -110,8 +111,8 @@ EXE_EXPORT bool ExeNewFile( void) ;
|
||||
EXE_EXPORT bool ExeOpenFile( const std::string& sFilePath) ;
|
||||
EXE_EXPORT bool ExeInsertFile( const std::string& sFilePath) ;
|
||||
EXE_EXPORT bool ExeSaveFile( const std::string& sFilePath, int nFlag) ;
|
||||
EXE_EXPORT bool ExeSaveObjToFile( int nId, const std::string& sFilePath, int nFlag) ;
|
||||
EXE_EXPORT bool ExeSaveMachGroupToFile( int nMGroupId, const std::string& sFilePath, int nFlag) ;
|
||||
EXE_EXPORT bool ExeSaveObjToFile( const INTVECTOR& vId, const std::string& sFilePath, int nFlag) ;
|
||||
EXE_EXPORT bool ExeSaveMachGroupToFile( int nMGroupId, const INTVECTOR& vPlusId, const std::string& sFilePath, int nFlag) ;
|
||||
|
||||
// Exchange
|
||||
EXE_EXPORT int ExeGetFileType( const std::string& sFilePath) ;
|
||||
@@ -123,10 +124,12 @@ 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 ExeImport3MF( const std::string& sFilePath) ;
|
||||
EXE_EXPORT bool ExeImportOff( const std::string& sFilePath, double dScaleFactor) ;
|
||||
EXE_EXPORT bool ExeImportPly( const std::string& sFilePath, double dScaleFactor) ;
|
||||
EXE_EXPORT bool ExeImport3MF( const std::string& sFilePath, int nFlag = 0) ;
|
||||
EXE_EXPORT bool ExeImport3dm( const std::string& sFilePath) ;
|
||||
EXE_EXPORT bool ExeAdvancedImportIsEnabled( void) ;
|
||||
EXE_EXPORT bool ExeAdvancedImport( const std::string& sFilePath, double dToler = 0.1) ;
|
||||
EXE_EXPORT bool ExeAdvancedImport( const std::string& sFilePath, double dToler = 0.1, int nFlag = 0) ;
|
||||
EXE_EXPORT bool ExeExportDxf( int nId, const std::string& sFilePath, int nFlag = 1, int nFilter = 393) ;
|
||||
EXE_EXPORT bool ExeExportStl( int nId, const std::string& sFilePath, int nFilter = 393) ;
|
||||
EXE_EXPORT bool ExeExport3MF( int nId, const std::string& sFilePath, int nFilter = 393) ;
|
||||
@@ -157,11 +160,13 @@ EXE_EXPORT int ExeBeamModifyProcess( int nGeomId, int nGroup, int nProc, int nS
|
||||
int nCrvId, int nCrv2Id, bool bUpdate = true) ;
|
||||
EXE_EXPORT bool ExeBeamEraseProcess( int nGeomId, bool bUpdate = true) ;
|
||||
EXE_EXPORT bool ExeBeamEnableProcess( int nGeomId, bool bEnable, bool bUpdate = true) ;
|
||||
EXE_EXPORT bool ExeBeamCalcAllSolids( bool bShow, bool bRecalc = false) ;
|
||||
EXE_EXPORT bool ExeBeamShowAllSolids( bool bShow) ;
|
||||
EXE_EXPORT bool ExeBeamCalcSolid( int nPartId, bool bRecalc = false) ;
|
||||
EXE_EXPORT int ExeBeamGetSolid( int nPartId) ;
|
||||
EXE_EXPORT bool ExeBeamShowSolid( int nPartId, bool bShow) ;
|
||||
EXE_EXPORT bool ExeBeamGetBuildingIsOn( void) ;
|
||||
EXE_EXPORT bool ExeBeamShowBuilding( bool bShow) ;
|
||||
EXE_EXPORT bool ExeBeamGetBuildingIsOn( int nAssGrpId) ;
|
||||
EXE_EXPORT bool ExeBeamShowBuilding( int nAssGrpId, bool bShow) ;
|
||||
|
||||
// Tsc Executor
|
||||
EXE_EXPORT bool ExeInitTscExec( void) ;
|
||||
@@ -210,6 +215,29 @@ EXE_EXPORT bool ExeSpCalculate( int nType) ;
|
||||
EXE_EXPORT bool ExeSpGetOrder( INTVECTOR& vOrder) ;
|
||||
EXE_EXPORT bool ExeSpGetMinLength( double& dMinLen) ;
|
||||
|
||||
// Machining Order Optimization
|
||||
EXE_EXPORT bool ExeOptMachInit( void) ;
|
||||
EXE_EXPORT bool ExeOptMachTerminate( void) ;
|
||||
EXE_EXPORT bool ExeOptMachAddTool( int nId,
|
||||
double dTCX, double dTCY, double dTCZ, double dTCA, double dTCB, double dTCC,
|
||||
bool bX, bool bY, bool bZ, bool bA, bool bB, bool bC,
|
||||
double dTLoad, double dTUnL) ;
|
||||
EXE_EXPORT bool ExeOptMachAddMachining( int nId, int nToolId, int nGroup,
|
||||
double dX_Start, double dY_Start, double dZ_Start,
|
||||
double dA_Start, double dB_Start, double dC_Start,
|
||||
double dX_End, double dY_End, double dZ_End,
|
||||
double dA_End, double dB_End, double dC_End) ;
|
||||
EXE_EXPORT bool ExeOptMachSetFirstMachining( int nId) ;
|
||||
EXE_EXPORT bool ExeOptMachSetLastMachining( int nId) ;
|
||||
EXE_EXPORT bool ExeOptMachSetFeeds( double dFeedL, double dFeedA) ;
|
||||
EXE_EXPORT bool ExeOptMachAddDependence( int nIdPrec, int nIdNext) ;
|
||||
EXE_EXPORT bool ExeOptMachAddSuggestedDependence( int nIdPrec, int nIdNext) ;
|
||||
EXE_EXPORT bool ExeOptMachSetAllGroupDependencesAsMandatory( bool bAllMandatory) ;
|
||||
EXE_EXPORT bool ExeOptMachSetOptimizationForGroups( bool bOptForGroups) ;
|
||||
EXE_EXPORT bool ExeOptMachSetOpenBound( bool bStartVsEnd, int nFlag, double dX, double dY, double dZ) ;
|
||||
EXE_EXPORT bool ExeOptMachSetOpenBoundForGroups( int nGroup, bool bStartVsEnd, int nFlag, double dX, double dY, double dZ) ;
|
||||
EXE_EXPORT bool ExeOptMachCalculate( INTVECTOR& vIds) ;
|
||||
|
||||
// GeomDB Create
|
||||
EXE_EXPORT int ExeCreateGroup( int nParentId, const Frame3d& frFrame, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateGeoPoint( int nParentId, const Point3d& ptP, int nRefType) ;
|
||||
@@ -274,6 +302,8 @@ EXE_EXPORT int ExeCreateArcC2PEx( int nParentId, const Point3d& ptCen,
|
||||
const Point3d& ptNearEnd, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateArc3P( int nParentId, const Point3d& ptP1,
|
||||
const Point3d& ptP2, const Point3d& ptP3, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateArc2PR( int nParentId, const Point3d& ptStart, const Point3d& ptEnd,
|
||||
double dRad, bool bCCW, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateArc2PB( int nParentId, const Point3d& ptStart, const Point3d& ptEnd,
|
||||
double dBulge, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateArc2PD( int nParentId, const Point3d& ptStart, const Point3d& ptEnd,
|
||||
@@ -294,6 +324,7 @@ EXE_EXPORT int ExeCreateCurveChamfer( int nParentId, int nCrv1, const Point3d&
|
||||
EXE_EXPORT int ExeCreateCurveBezier( int nParentId, int nDegree, const PNTVECTOR& vPnt, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateCurveBezierRational( int nParentId, int nDegree, const PNTUVECTOR& vPntW, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateCurveBezierFromArc( int nParentId, int nArcId, bool bErase) ;
|
||||
EXE_EXPORT int ExeCreateCurveBezierFromCurve( int nParentId, int nCrvId, bool bRational = true) ;
|
||||
EXE_EXPORT int ExeCreateCurveCompo( int nParentId, const INTVECTOR& vIds, bool bErase) ;
|
||||
EXE_EXPORT int ExeCreateCurveCompoByChain( int nParentId, const INTVECTOR& vIds,
|
||||
const Point3d& ptNear, bool bErase, int nRefType, int* pnCount) ;
|
||||
@@ -320,6 +351,7 @@ EXE_EXPORT int ExeCreatePolygonFromSide( int nParentId, int nNumSides, const Po
|
||||
const Point3d& ptFin, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateCirclesAlongCurve( int nParentId, int nCrvId, double dOffset, double dOverlap,
|
||||
double dStartAdd, double dEndAdd, double dDiam, int* pnCount) ;
|
||||
|
||||
// GeomDB Create Surf
|
||||
EXE_EXPORT int ExeCreateSurfFlatRegion( int nParentId, const INTVECTOR& vCrvIds, int* pnCount) ;
|
||||
EXE_EXPORT int ExeCreateSurfFrFatCurve( int nParentId, int nCrvId, double dRad, bool bSquaredEnds, bool bSquaredMids, double dLinTol) ;
|
||||
@@ -328,6 +360,7 @@ EXE_EXPORT int ExeCreateSurfFrRectangle3P( int nParentId, const Point3d& ptIni,
|
||||
const Point3d& ptCross, const Point3d& ptDir, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfFrStadium( int nParentId, const Point3d& ptIni, const Point3d& ptCross, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfFrDisk( int nParentId, const Point3d& ptOrig, double dRad, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmEmpty( int nParentId) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmPlaneInBBox( int nParentId, const Point3d& ptP, const Vector3d& vtN, const BBox3d& b3Box, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmConvexHullInBBox( int nParentId, int nId, const BBox3d& b3Box, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmBBox( int nParentId, const BBox3d& b3Box, bool bRegular, int nRefType) ;
|
||||
@@ -341,8 +374,13 @@ EXE_EXPORT int ExeCreateSurfTmCone( int nParentId, const Point3d& ptOrig, const
|
||||
double dRad, double dHeight, double dLinTol, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmSphere( int nParentId, const Point3d& ptOrig,
|
||||
double dRad, double dLinTol, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmPyramidFrustum( int nParentId, double dBaseDimX, double dBaseDimY,
|
||||
double dTopDimX, double dTopDimY, double dHeight) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmConeFrustum( int nParentId, double dBaseRad, double dTopRad, double dHeight, double dLinTol) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmTriangle( int nParentId, const Point3d& ptP1, const Point3d& ptP2, const Point3d& ptP3, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmRectangle( int nParentId, const Point3d& ptO, const Point3d& ptL, const Point3d& ptT, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmByPolygon( int nParentId, const PolyLine& PL, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmByPolygonWithHoles( int nParentId, const POLYLINEVECTOR& vPL, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmByFlatContour( int nParentId, int nCrvId, double dLinTol) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmByRegion( int nParentId, const INTVECTOR& vCrvIds, double dLinTol) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmByExtrusion( int nParentId, const INTVECTOR& vCrvIds, const Vector3d& vtExtr,
|
||||
@@ -357,24 +395,48 @@ EXE_EXPORT int ExeCreateSurfTmByScrewing( int nParentId, int nCrvId,
|
||||
double dAngRotDeg, double dMove, bool bCapEnds, double dLinTol, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmRectSwept( int nParentId, double dDimH, double dDimV, double dBevelH, double dBevelV,
|
||||
int nGuideId, int nCapType, double dLinTol) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmSwept( int nParentId, int nSectId, int nGuideId, bool bCapEnds, double dLinTol) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmSwept( int nParentId, int nSectId, int nGuideId, const Vector3d& vtAx,
|
||||
bool bCapEnds, double dLinTol, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmTransSwept( int nParentId, int nSectId, int nGuideId, bool bCapEnds, double dLinTol) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmRuled( int nParentId, int nPtOrCrvId1, int nPtOrCrvId2, int nType, double dLinTol) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmByTriangles( int nParentId, const INTVECTOR& vIds, bool bErase) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmBySewing( int nParentId, const INTVECTOR& vIds, bool bErase) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmBySurfBezier( int nParentId, int nSbezId) ;
|
||||
EXE_EXPORT int ExeCreateSurfTmByVolZmap( int nParentId, int nZmapId, int nPart) ;
|
||||
EXE_EXPORT int ExeCreateSurfShell( int nParentId, int nSurfId, double dThick, double dLinTol) ;
|
||||
EXE_EXPORT int ExeSurfTmOffset( int nParentId, const INTVECTOR& vIds, double dOffs, double dLinTol, int nType) ;
|
||||
EXE_EXPORT int ExeSurfTmThickeningOffset( int nParentId, const INTVECTOR& vIds, double dOffs, double dLinTol, int nType) ;
|
||||
EXE_EXPORT int ExeCreateSurfBezier( int nParentId, int nDegU, int nDegV, int nSpanU, int nSpanV, const PNTVECTOR& vPnt, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfBezierRational( int nParentId, int nDegU, int nDegV, int nSpanU, int nSpanV, const PNTUVECTOR& vPntW, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfBezierLeaves( int nParentId, int nSurfBzId, int nTextHeight = 50, bool bShowTrim = false, int* pnCount = nullptr) ;
|
||||
EXE_EXPORT int ExeCreateSurfBezierLeaves( int nParentId, int nSurfBzId, int nTextHeight = 50, bool bShowTrim = false, bool bRefined = false, int* pnCount = nullptr) ;
|
||||
EXE_EXPORT int ExeCreateBezierSphere( int nParentId, const Point3d& ptCenter, double dR, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfBezierTria2D( int nParentId, int nSurfBzId, int nTextHeight, bool bShowTrim, int* pnCount) ;
|
||||
EXE_EXPORT int ExeCreateSurfBzByFlatContour( int nParentId, int nCrvId, double dLinTol) ;
|
||||
EXE_EXPORT int ExeCreateSurfBzByRegion( int nParentId, const INTVECTOR& vCrvId, double dLinTol) ;
|
||||
EXE_EXPORT int ExeCreateSurfBzByExtrusion( int nParentId, int nCrvId, const Vector3d& vtExtr, bool bCapEnds,
|
||||
double dLinTol, int nRefType, int* pnCount = nullptr) ;
|
||||
EXE_EXPORT int ExeCreateSurfBzByRegionExtrusion( int nParentId, const INTVECTOR& vCrvIds, const Vector3d& vtExtr, bool bCapEnds,
|
||||
double dLinTol, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfBzByScrewing( int nParentId, int nCrvId,
|
||||
const Point3d& ptAx, const Vector3d& vtAx,
|
||||
double dAngRotDeg, double dMove, bool bCapEnds, double dLinTol, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfBzByRevolve( int nParentId, int nCrvId,
|
||||
const Point3d& ptAx, const Vector3d& vtAx,
|
||||
bool bCapEnds, double dLinTol, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfBzByPointCurve( int nParentId, int nCrvId, const Point3d& ptAx, bool bCapEnds, double dLinTol, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateSurfBzRuled( int nParentId, int nCrvId1, int nCrvId2, int nRuledType, bool bCapEnds, double dLinTol) ;
|
||||
EXE_EXPORT int ExeCreateSurfBzRuledGuided( int nParentId, int nCrvId1, int nCrvId2, const BIPNTVECTOR& vGuidesCrv,
|
||||
bool bCapEnds, double dLinTol, int nLayGuides = GDB_ID_NULL) ;
|
||||
EXE_EXPORT int ExeCreateSurfBzSkinned( int nParentId, const INTVECTOR& nCrvId1, bool bCapEnds, double dLinTol) ;
|
||||
EXE_EXPORT int ExeCreateSurfBzSwept( int nParentId, int nSectId, int nGuideId, const Vector3d& vtAx,
|
||||
bool bCapEnds, double dLinTol, int nRefType) ;
|
||||
|
||||
// GeomDB Create Volume
|
||||
EXE_EXPORT int ExeCreateVolZmap( int nParentId, const Point3d& ptIni, double dDimX,
|
||||
double dDimY, double dDimZ, double dPrec, bool bTriDex, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateVolZmapEmpty( int nParentId, const Point3d& ptIni, double dDimX,
|
||||
double dDimY, double dDimZ, double dPrec, bool bTriDex, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateVolZmapByRegionExtrusion( int nParentId, int nSfrId, double dDimZ, double dPrec, bool bTriDex) ;
|
||||
EXE_EXPORT int ExeCreateVolZmapFromSurfTm( int nParentId, int nStmId, double dPrec, bool bTriDex) ;
|
||||
EXE_EXPORT int ExeCreateVolZmapFromSurfTm( int nParentId, int nStmId, double dPrec, bool bTriDex, double dExtraBox = 0) ;
|
||||
|
||||
// GeomDB PartLayer
|
||||
EXE_EXPORT bool ExeIsPart( int nPartId) ;
|
||||
@@ -434,11 +496,16 @@ EXE_EXPORT int ExeGetFirstNameInGroup( int nGroupId, const std::string& sName)
|
||||
EXE_EXPORT int ExeGetNextName( int nId, const std::string& sName) ;
|
||||
EXE_EXPORT int ExeGetLastNameInGroup( int nGroupId, const std::string& sName) ;
|
||||
EXE_EXPORT int ExeGetPrevName( int nId, const std::string& sName) ;
|
||||
EXE_EXPORT bool ExeGetNameInGroup( int nGroupId, const std::string& sName, INTVECTOR& vIds) ;
|
||||
EXE_EXPORT bool ExeGetInfoInGroup( int nGroupId, const std::string& sKey, INTVECTOR& vIds) ;
|
||||
EXE_EXPORT bool ExeGetBBox( int nId, int nFlag, BBox3d& b3Box) ;
|
||||
EXE_EXPORT bool ExeGetBBoxGlob( int nId, int nFlag, BBox3d& b3Box) ;
|
||||
EXE_EXPORT bool ExeGetBBoxRef( int nId, int nFlag, const Frame3d& frRef, BBox3d& b3Box) ;
|
||||
EXE_EXPORT int ExeCopy( int nSouId, int nRefId, int nSonBeforeAfter) ;
|
||||
EXE_EXPORT int ExeCopyEx( int nSouCtx, int nSouId, int nDestCtx, int nRefId, int nSonBeforeAfter) ;
|
||||
EXE_EXPORT int ExeCopyGlob( int nSouId, int nRefId, int nSonBeforeAfter) ;
|
||||
EXE_EXPORT int ExeCopyGlobEx( int nSouCtx, int nSouId, int nDestCtx, int nRefId, int nSonBeforeAfter) ;
|
||||
EXE_EXPORT bool ExeDuplicateGeomDB( int nSouCtx, int nDestCtx, bool bSkipTemp = false) ;
|
||||
EXE_EXPORT bool ExeRelocate( int nSouId, int nRefId, int nSonBeforeAfter) ;
|
||||
EXE_EXPORT bool ExeRelocateGlob( int nSouId, int nRefId, int nSonBeforeAfter) ;
|
||||
EXE_EXPORT bool ExeGroupSwap( int nId1, int nId2, bool bSwapRef, bool bMark) ;
|
||||
@@ -453,11 +520,11 @@ EXE_EXPORT bool ExeGeoObjDump( int nId, std::string& sDump) ;
|
||||
|
||||
// GeomDB Obj Attributes
|
||||
EXE_EXPORT bool ExeCopyAttributes( int nSouId, int nDestId) ;
|
||||
EXE_EXPORT bool ExeSetLevel( int nId, int nLevel) ;
|
||||
EXE_EXPORT bool ExeSetLevel( const INTVECTOR& vIds, int nLevel) ;
|
||||
EXE_EXPORT bool ExeRevertLevel( int nId) ;
|
||||
EXE_EXPORT bool ExeGetLevel( int nId, int* pnLevel) ;
|
||||
EXE_EXPORT bool ExeGetCalcLevel( int nId, int* pnLevel) ;
|
||||
EXE_EXPORT bool ExeSetMode( int nId, int nMode) ;
|
||||
EXE_EXPORT bool ExeSetMode( const INTVECTOR& vIds, int nMode) ;
|
||||
EXE_EXPORT bool ExeRevertMode( int nId) ;
|
||||
EXE_EXPORT bool ExeGetMode( int nId, int* pnMode) ;
|
||||
EXE_EXPORT bool ExeGetCalcMode( int nId, int* pnMode) ;
|
||||
@@ -465,7 +532,7 @@ EXE_EXPORT bool ExeSetStatus( const INTVECTOR& vIds, int nStat) ;
|
||||
EXE_EXPORT bool ExeRevertStatus( int nId) ;
|
||||
EXE_EXPORT bool ExeGetStatus( int nId, int* pnStat) ;
|
||||
EXE_EXPORT bool ExeGetCalcStatus( int nId, int* pnStat) ;
|
||||
EXE_EXPORT bool ExeSetMark( int nId) ;
|
||||
EXE_EXPORT bool ExeSetMark( int nId, int nMark = 1) ;
|
||||
EXE_EXPORT bool ExeResetMark( int nId) ;
|
||||
EXE_EXPORT bool ExeGetMark( int nId, int* pnMark) ;
|
||||
EXE_EXPORT bool ExeGetCalcMark( int nId, int* pnMark) ;
|
||||
@@ -509,6 +576,7 @@ EXE_EXPORT bool ExeSetTextureFrame( int nId, const Frame3d& frTxrRef, int nRefTy
|
||||
EXE_EXPORT bool ExeRemoveTextureData( int nId) ;
|
||||
EXE_EXPORT bool ExeGetTextureName( int nId, std::string& sTxrName) ;
|
||||
EXE_EXPORT bool ExeGetTextureFrame( int nId, int nRefId, Frame3d& frTxrRef) ;
|
||||
EXE_EXPORT bool ExeSetStipple( int nId, int nFactor, int nPattern) ;
|
||||
|
||||
// GeomDb Obj Selection
|
||||
EXE_EXPORT bool ExeSetObjFilterForSelect( bool bZerodim, bool bCurve, bool bSurf, bool bVolume, bool bExtra) ;
|
||||
@@ -575,6 +643,7 @@ EXE_EXPORT int ExeGetCurveLinearConvexHullXY( int nId, double dLinTol, int nRef
|
||||
EXE_EXPORT bool ExeModifyCircleCP( int nId, const Point3d& ptOn, int nRefType) ;
|
||||
EXE_EXPORT bool ExeModifyCircle3P( int nId, const Point3d& ptP1, const Point3d& ptP2, const Point3d& ptP3, int nRefType) ;
|
||||
EXE_EXPORT bool ExeModifyArcRadius( int nId, double dRad, bool bKeepCenter = true) ;
|
||||
EXE_EXPORT bool ExeModifyArcAngCenter( int nId, double dAngCenter) ;
|
||||
EXE_EXPORT bool ExeModifyArcC2P( int nId, const Point3d& ptEnd, int nRefType) ;
|
||||
EXE_EXPORT bool ExeModifyArc3P( int nId, const Point3d& ptMid, int nRefType) ;
|
||||
EXE_EXPORT bool ExeModifyArcToExplementary( int nId) ;
|
||||
@@ -596,23 +665,34 @@ EXE_EXPORT bool ExeModifyCurveCompoCurveToLine( int nId, int nCrv) ;
|
||||
EXE_EXPORT int ExeExplodeCurveCompo( int nId, int* pnCount) ;
|
||||
EXE_EXPORT bool ExeMergeCurvesInCurveCompo( int nId, double dLinTol, bool bStartEnd) ;
|
||||
EXE_EXPORT bool ExeRemoveCurveCompoUndercutOnY( int nId, double dLinTol) ;
|
||||
EXE_EXPORT bool ExeChainCurvesInGroup( int nGroupId, const Point3d& ptNear, int nRefType) ;
|
||||
EXE_EXPORT bool ExeReorderCurvesInGroup( int nGroupId, const Point3d& ptNear, int nRefType) ;
|
||||
EXE_EXPORT bool ExeProjectCurveOnSurfTm( int nCurveId, int nSurfTmId, const Vector3d& vtDir, int nDestGrpId,
|
||||
double dLinTol, double dMaxSegmLen, int nRefType) ;
|
||||
EXE_EXPORT int ExeCurveGetVoronoi( int nId, int nDestGrpId, int nBound, int* pnCount) ;
|
||||
EXE_EXPORT int ExeCurveGetMedialAxis( int nId, int nDestGrpId, int nSide, int* pnCount) ;
|
||||
EXE_EXPORT bool ExeCurveCompoSetTempProp( int nId, int nCrv, int nProp, int nPropInd = 0) ;
|
||||
EXE_EXPORT bool ExeCurveCompoSetTempParam( int nId, int nCrv, double dParam, int nParamInd = 0) ;
|
||||
EXE_EXPORT bool ExeChainCurvesInGroup( int nGroupId, const Point3d& ptNear, int nRefType, double dToler = 10 * EPS_SMALL) ;
|
||||
EXE_EXPORT bool ExeReorderCurvesInGroup( int nGroupId, const Point3d& ptNear, int nRefType, double dToler = 10 * EPS_SMALL) ;
|
||||
EXE_EXPORT bool ExeProjectCurveOnSurf( int nCurveId, const INTVECTOR& vnSurfId, int nDestGrpId,
|
||||
double dLinTol, double dMaxSegmLen) ;
|
||||
EXE_EXPORT bool ExeProjectCurveOnSurfDir( int nCurveId, const INTVECTOR& vnSurfId, const Vector3d& vtProj, int nDestGrpId,
|
||||
double dLinTol, double dMaxSegmLen, bool bDirFromProj, bool bFromVsTo, int nRefType) ;
|
||||
EXE_EXPORT bool ExeProjectCurveOnSurfExt( int nCurveId, const INTVECTOR& vnSurfId, int nGuideId, int nDestGrpId,
|
||||
double dLinTol, double dMaxSegmLen, bool bDirFromGuide, bool bFromVsTo) ;
|
||||
EXE_EXPORT int ExeCurveGetVoronoi( const INTVECTOR& vIds, int nDestGrpId, int nBound, int* pnCount) ;
|
||||
EXE_EXPORT int ExeCurveGetMedialAxis( const INTVECTOR& vIds, int nDestGrpId, int nSide, int* pnCount) ;
|
||||
EXE_EXPORT int ExeCurveGetFatCurve( int nId, int nDestGrpId, double dRad, bool bSquareEnds, bool bSquareMids, int* pnCount) ;
|
||||
EXE_EXPORT bool ExeCurveBezierIncreaseDegree( int nCrvId) ;
|
||||
EXE_EXPORT bool ExeCurveBezierDecreaseDegree( int nCrvId, double dTol = 100) ;
|
||||
EXE_EXPORT bool ExeCurveBezierApproxToNonRat( int nCrvId, double dTol = 10 * EPS_SMALL) ;
|
||||
EXE_EXPORT bool ExeCurveBezierApproxWithCubicBeziers( int nCrvId, double dTol = 10 * EPS_SMALL) ;
|
||||
|
||||
// GeomDb Surf Modify
|
||||
EXE_EXPORT bool ExeInvertSurface( const INTVECTOR& vIds) ;
|
||||
EXE_EXPORT int ExeExplodeSurface( int nId, int* pnCount) ;
|
||||
EXE_EXPORT bool ExeApproxSurface( int nId, double dLinTol) ;
|
||||
EXE_EXPORT bool ExeApproxSurface( int nId, double dLinTol, double dTriaMinSide = 100 * EPS_SMALL) ;
|
||||
EXE_EXPORT bool ExeSurfFrAdd( int nId1, int nId2) ;
|
||||
EXE_EXPORT bool ExeSurfFrSubtract( int nId1, int nId2) ;
|
||||
EXE_EXPORT bool ExeSurfFrIntersect( int nId1, int nId2) ;
|
||||
EXE_EXPORT bool ExeSurfFrOffset( int nId, double dDist, int nType) ;
|
||||
EXE_EXPORT bool ExeSurfFrOffsetAdv( int nId, double dDist, int nType, int& nNewId) ;
|
||||
EXE_EXPORT bool ExeSurfFrEraseChunk( int nId, int nChunk) ;
|
||||
EXE_EXPORT bool ExeSurfFrMoveSimpleNoCollision( int nId1, int nId2, const Vector3d& vtDir, double& dLen, int nRefType) ;
|
||||
EXE_EXPORT bool ExeSurfFrRotateSimpleNoCollision( int nId1, int nId2, const Point3d& ptCen, double& dAngDeg, int nRefType) ;
|
||||
EXE_EXPORT bool ExeSurfTmMoveVertex( int nId, int nVert, const Point3d& ptNewVert, int nRefType, bool bUpdate) ;
|
||||
@@ -622,7 +702,6 @@ EXE_EXPORT bool ExeSurfTmRemoveFacet( int nId, int nFacet) ;
|
||||
EXE_EXPORT bool ExeSurfTmSwapFacets( int nId, int nFacet1, int nFacet2) ;
|
||||
EXE_EXPORT bool ExeSurfTmRemovePart( int nId, int nPart) ;
|
||||
EXE_EXPORT bool ExeCutSurfTmPlane( int nId, const Point3d& ptOn, const Vector3d& vtN, bool bSaveOnEq, int nRefType) ;
|
||||
EXE_EXPORT bool ExeCutSurfBzPlane( int nId, const Point3d& ptOn, const Vector3d& vtN, bool bSaveOnEq, int nRefType) ;
|
||||
EXE_EXPORT bool ExeCutSurfTmClosedCurve( int nSurfId, int nCurveId, bool bSaveOnEq) ;
|
||||
EXE_EXPORT bool ExeSurfTmAdd( int nId1, int nId2, bool bTwoColors = false) ;
|
||||
EXE_EXPORT bool ExeSurfTmSubtract( int nId1, int nId2, bool bTwoColors = false) ;
|
||||
@@ -632,14 +711,21 @@ EXE_EXPORT bool ExeSurfTmCut( int nId, int nCutterId, bool bInVsOut, bool bSaveO
|
||||
EXE_EXPORT bool ExeSurfTmSubtractProjectedFacesOnFace( int nSurfId, int nFaceInd, int nDestGrpId,
|
||||
INTVECTOR vSurfsId, bool bOCFlag,
|
||||
bool& bExistProjection, int& nNewId, int& nNewFaceNbr) ;
|
||||
EXE_EXPORT bool ExeSurfTmSetFaceColor( int nId, int nFacet, int nColor) ;
|
||||
EXE_EXPORT bool ExeSurfTmGetTriaColor( int nId, int nTria, int& nColor) ;
|
||||
EXE_EXPORT bool ExeSurfTmResetTwoColors( int nId) ;
|
||||
EXE_EXPORT bool ExeSurfTmSetShowEdges( int nId, bool bShow) ;
|
||||
EXE_EXPORT bool ExeSurfTmGetShowEdges( int nId, bool& bShow) ;
|
||||
EXE_EXPORT bool ExeSurfTmSetSmoothAng( int nId, double dAngDeg) ;
|
||||
EXE_EXPORT bool ExeSurfTmGetSmoothAng( int nId, double& dAngDeg) ;
|
||||
EXE_EXPORT bool ExeCutSurfBzPlane( int nId, const Point3d& ptOn, const Vector3d& vtN, bool bSaveOnEq, int nRefType) ;
|
||||
EXE_EXPORT bool ExeSurfBzTrim( int nId, int nCutterId) ;
|
||||
|
||||
// GeomDb Volume Modify
|
||||
EXE_EXPORT int ExeExplodeVolume( int nId, int* pnCount) ;
|
||||
EXE_EXPORT bool ExeVolZmapChangeResolution( int nId, int nNewRes) ;
|
||||
EXE_EXPORT bool ExeVolZmapSetShowEdges( int nId, bool bShow) ;
|
||||
EXE_EXPORT bool ExeVolZmapGetShowEdges( int nId, bool& bShow) ;
|
||||
EXE_EXPORT bool ExeRemoveVolZmapPart( int nId, int nPart) ;
|
||||
EXE_EXPORT bool ExeVolZmapSetStdTool( const INTVECTOR& vIds, const std::string& sToolName,
|
||||
double dLen, double dDiam, double dCornR, double dCutterH, int nFlag, bool bFirst) ;
|
||||
@@ -652,6 +738,8 @@ EXE_EXPORT bool ExeVolZmapSetMortiserTool( const INTVECTOR& vIds, const std::str
|
||||
double dLen, double dWidth, double dThick, double dCornR, int nFlag, bool bFirst) ;
|
||||
EXE_EXPORT bool ExeVolZmapSetChiselTool( const INTVECTOR& vIds, const std::string& sToolName,
|
||||
double dLen, double dWidth, double dThick, int nFlag, bool bFirst) ;
|
||||
EXE_EXPORT bool ExeVolZmapSetAdditiveTool( const INTVECTOR& vIds, const std::string& sToolName,
|
||||
double dLen, double dDiam, double dCornR, int nFlag, bool bFirst) ;
|
||||
EXE_EXPORT bool ExeVolZmapResetTools( const INTVECTOR& vIds) ;
|
||||
EXE_EXPORT int ExeVolZmapGetToolOutline( int nId, int nDestGrpId, bool bApprox = false) ;
|
||||
EXE_EXPORT bool ExeVolZmapMillingStep( int nId, const Point3d& ptPs, const Vector3d& vtDs,
|
||||
@@ -659,6 +747,10 @@ EXE_EXPORT bool ExeVolZmapMillingStep( int nId, const Point3d& ptPs, const Vecto
|
||||
EXE_EXPORT bool ExeVolZmapMillingStep( int nId, const Point3d& ptPs, const Vector3d& vtDs, const Vector3d& vtAs,
|
||||
const Point3d& ptPe, const Vector3d& vtDe, const Vector3d& vtAe, int nRefType) ;
|
||||
EXE_EXPORT bool ExeCutVolZmapPlane( int nId, const Point3d& ptOn, const Vector3d& vtN, int nRefType) ;
|
||||
EXE_EXPORT bool ExeUpdateVolZmapByAddingSurfTm( int nVolZmapId, int nStmId) ;
|
||||
EXE_EXPORT bool ExeVolZmapMakeUniform( int nVolZmapId, double dToler, bool bExtensionFirst, int nToolNum) ;
|
||||
EXE_EXPORT bool ExeVolZMapOffset( int nId, double dDist, int nType) ;
|
||||
EXE_EXPORT bool ExeVolZMapRemoveFins( int nVolZMapId, const Vector3d& vtDir, double dThick, int nRefType) ;
|
||||
|
||||
// GeomDB Get
|
||||
EXE_EXPORT bool ExeTextNormVersor( int nId, int nRefId, Vector3d& vtNorm) ;
|
||||
@@ -668,12 +760,13 @@ EXE_EXPORT bool ExeTextGetHeight( int nId, double& dH) ;
|
||||
EXE_EXPORT bool ExeTextGetItalic( int nId, bool& bItl) ;
|
||||
|
||||
// GeomDb Get Pocketing
|
||||
EXE_EXPORT bool ExePocketing( const int nId, double dRad, double dStep, double dAngle, int nType, bool bSmooth, int nDestGrpId, int& nFirstId, int& nCrvCount) ;
|
||||
EXE_EXPORT int ExeSurfFrGetZigZagInfill( int nId, int nDestGrpId, double dStep, double dAng, bool bSmooth, bool bRemoveOverlapLink,int* pnCount) ;
|
||||
EXE_EXPORT bool ExePocketing( int nId, double dRad, double dStep, double dAngle, int nType, bool bSmooth, int nDestGrpId, int& nFirstId, int& nCrvCount) ;
|
||||
EXE_EXPORT int ExeSurfFrGetZigZagInfill( int nId, int nDestGrpId, double dStep, double dAng, bool bSmooth, bool bRemoveOverlapLink,int* pnCount) ;
|
||||
|
||||
// GeomDb Curve Get
|
||||
EXE_EXPORT bool ExeCurveDomain( int nId, double* pdStart, double* pdEnd) ;
|
||||
EXE_EXPORT bool ExeCurveLength( int nId, double* pdLen) ;
|
||||
EXE_EXPORT bool ExeCurveLengthAtParam( int nId, double dPar, double* pdLen) ;
|
||||
EXE_EXPORT bool ExeCurveParamAtLength( int nId, double dLen, double* pdPar) ;
|
||||
EXE_EXPORT bool ExeCurveParamAtPoint( int nId, const Point3d& pt, double dTol, int nRefType, double* pdPar) ;
|
||||
EXE_EXPORT bool ExeCurveLengthAtPoint( int nId, const Point3d& ptOn, double dExtend, double* pdLen) ;
|
||||
@@ -684,6 +777,7 @@ EXE_EXPORT bool ExeCurveIsARectangle( int nId, Point3d& ptP, Vector3d& vtL1, Vec
|
||||
EXE_EXPORT bool ExeCurveIsATrapezoid( int nId, Point3d& ptP, Vector3d& vtB1, Vector3d& vtL1, Vector3d& vtB2, double dToler = EPS_SMALL) ;
|
||||
EXE_EXPORT bool ExeCurveAreaXY( int nId, double& dArea) ;
|
||||
EXE_EXPORT bool ExeCurveArea( int nId, Plane3d& Plane, double& dArea) ;
|
||||
EXE_EXPORT bool ExeCurveMaxOffset( int nId, double& dMaxOffset) ;
|
||||
EXE_EXPORT bool ExeCurveNearestExtremityToPoint( int nId, const Point3d& ptP, bool& bStart) ;
|
||||
EXE_EXPORT bool ExeCurveExtrusion( int nId, int nRefId, Vector3d& vtExtr) ;
|
||||
EXE_EXPORT bool ExeCurveThickness( int nId, double* pdThick) ;
|
||||
@@ -700,6 +794,11 @@ EXE_EXPORT bool ExeCurveCompoCenter( int nId, int nSimpCrv, int nRefId, Point3d&
|
||||
EXE_EXPORT bool ExeCurveCompoRadius( int nId, int nSimpCrv, double& dRad) ;
|
||||
EXE_EXPORT bool ExeCurveCompoAngCenter( int nId, int nSimpCrv, double& dAngCen) ;
|
||||
EXE_EXPORT bool ExeCurveCompoNormVersor( int nId, int nSimpCrv, int nRefId, Vector3d& vtNorm) ;
|
||||
EXE_EXPORT bool ExeCurveCompoGetTempProp( int nId, INTVECTOR& vProp, int nPropInd) ;
|
||||
EXE_EXPORT bool ExeCurveCompoGetTempParam( int nId, DBLVECTOR& vParam, int nParamInd) ;
|
||||
EXE_EXPORT int ExeShowCurveBezierControlPoints( int nCrvId, int nDestGrpId, int* pnCount) ;
|
||||
EXE_EXPORT int ExeCopyCompoSubCurve( int nCrvId, int nSubCrvToCopy, int nDestGrpId) ;
|
||||
EXE_EXPORT int ExeCopyParamRange( int nCrvId, double dUStart, double dUEnd, int nDestGrpId) ;
|
||||
|
||||
// GeomDb Surf Get
|
||||
EXE_EXPORT bool ExeSurfArea( int nId, double& dArea) ;
|
||||
@@ -707,16 +806,21 @@ EXE_EXPORT bool ExeSurfIsClosed( int nId) ;
|
||||
EXE_EXPORT bool ExeSurfVolume( int nId, double& dVol) ;
|
||||
EXE_EXPORT bool ExeSurfFrNormVersor( int nId, int nRefId, Vector3d& vtNorm) ;
|
||||
EXE_EXPORT bool ExeSurfFrGrossArea( int nId, double& dArea) ;
|
||||
EXE_EXPORT bool ExeSurfFrChunkMaxOffset( int nId, int nChunk, double& dMaxOffset) ;
|
||||
EXE_EXPORT bool ExeSurfFrTestExternal( int nId1, int nId2, double dMinDist) ;
|
||||
EXE_EXPORT int ExeSurfFrChunkCount( int nId) ;
|
||||
EXE_EXPORT int ExeSurfFrChunkSimpleClassify( int nId1, int nChunk1, int nId2, int nChunk2, double dToler = 0) ;
|
||||
EXE_EXPORT int ExeSurfFlatRegionInterference( int nId1, int nChunk1, int nId2, int nChunk2, double dToler = 0) ;
|
||||
EXE_EXPORT bool ExeSurfFrChunkCenter( int nId, int nChunk, int nRefId, Point3d& ptCen, Vector3d& vtN) ;
|
||||
EXE_EXPORT int ExeExtractSurfFrChunkLoops( int nId, int nChunk, int nDestGrpId, int* pnCount) ;
|
||||
EXE_EXPORT int ExeSurfFrGetZigZagInfill( int nId, int nDestGrpId, double dStep, double dAng, bool bSmooth, int* pnCount) ;
|
||||
EXE_EXPORT int ExeSurfTmVertexCount( int nId) ;
|
||||
EXE_EXPORT int ExeSurfTmFacetCount( int nId) ;
|
||||
EXE_EXPORT int ExeSurfTmPartCount( int nId) ;
|
||||
EXE_EXPORT bool ExeSurfTmGetPartAndShellFromFacet( int nSurfTm, int nFacet, int& nPart, int& nShell) ;
|
||||
EXE_EXPORT bool ExeSurfTmGetVertex( int nId, int nVert, int nRefId, Point3d& ptVert) ;
|
||||
EXE_EXPORT bool ExeSurfTmGetNearestVertex( int nId, const Point3d& ptNear, int nRefId, int& nVert, Point3d& ptVert) ;
|
||||
EXE_EXPORT bool ExeSurfTmTriangleNormVersor( int nId, int nTria, int nRefId, Vector3d& vtNorm) ;
|
||||
EXE_EXPORT int ExeSurfTmFacetFromTria( int nId, int nT) ;
|
||||
EXE_EXPORT bool ExeSurfTmFacetAdjacencies( int nId, int nFacet, INTMATRIX& vAdj) ;
|
||||
EXE_EXPORT bool ExeSurfTmFacetNearestEndPoint( int nId, int nFacet, const Point3d& ptNear, int nRefId,
|
||||
@@ -735,24 +839,33 @@ EXE_EXPORT bool ExeSurfTmFacetOppositeSideEx( int nId, int nFacet, const Vector3
|
||||
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, double dToler, int nDestGrpId, int nRefType, int* pnCount, bool bAllTria = false) ;
|
||||
EXE_EXPORT int ExeGetSurfTmParSilhouettes( const INTVECTOR& vIds, const Point3d& ptOn, const Vector3d& vtN, const DBLVECTOR& vdDist,
|
||||
double dToler, int nDestGrpId, int nRefType, int* pnCount) ;
|
||||
EXE_EXPORT int ExeExtractSurfTmFacetLoops( int nId, int nFacet, int nDestGrpId, int* pnCount) ;
|
||||
EXE_EXPORT int ExeExtractSurfTmTriaLoop( int nId, int nT, int nDestGrpId) ;
|
||||
EXE_EXPORT int ExeCopySurfTmFacet( int nId, int nFacet, int nDestGrpId) ;
|
||||
EXE_EXPORT bool ExeSurfTmGetAllVertInFacet( int nId, int nFacet, INTVECTOR& vVert) ;
|
||||
EXE_EXPORT bool ExeSurfTmGetFacetBBox( int nId, int nFacet, int nFlag, BBox3d& b3Box) ;
|
||||
EXE_EXPORT bool ExeSurfTmGetFacetBBoxGlob( int nId, int nFacet, int nFlag, BBox3d& b3Box) ;
|
||||
EXE_EXPORT bool ExeSurfTmGetFacetBBoxRef( int nId, int nFacet, int nFlag, const Frame3d& frRef, BBox3d& b3Box) ;
|
||||
EXE_EXPORT bool ExeSurfTmGetFacetOutlineInfo( int nId, int nFacet, int nRefId,
|
||||
int& nStatus, BOOLVECTOR& vbOpen, INTVECTOR& vnAdj, DBLVECTOR& vdLen,
|
||||
PNTVECTOR& vptStart, VCT3DVECTOR& vvtNorm, DBLVECTOR& vdElev) ;
|
||||
EXE_EXPORT int ExeSurfTmGetEdges( int nId, int nDestGrpId, bool bSmoothAng, int* pnCount) ;
|
||||
EXE_EXPORT bool ExeSurfTmGetCurvatures( int nId, int nV, double& dK1, Vector3d& vtK1, double& dK2, Vector3d& vtK2) ;
|
||||
EXE_EXPORT bool ExeSurfBezierGetPoint( int nSurfId, double dU, double dV, int nRefId, Point3d& ptP) ;
|
||||
EXE_EXPORT bool ExeSurfBezierGetPointD1( int nSurfId, double dU, double dV, int nUsd, int nVsd, int nRefId,
|
||||
Point3d& ptP, Vector3d& vtDerU, Vector3d& vtDerV) ;
|
||||
EXE_EXPORT bool ExeSurfBezierGetPointNrmD1( int nSurfId, double dU, double dV, int nUsd, int nVsd, int nRefId,
|
||||
Point3d& ptP, Vector3d& vtN, Vector3d& vtDerU, Vector3d& vtDerV) ;
|
||||
EXE_EXPORT bool ExeSurfBezierParamsFromPoint( int nSurfId, const Point3d& ptOnSurf, int nRefId, double& dU, double& dV) ;
|
||||
EXE_EXPORT bool ExeSurfBezierGetInfo( int nSurfId, int& nDegU, int& nDegV, int& nSpanU, int& nSpanV, bool& bIsRat, bool& bTrimmed) ;
|
||||
EXE_EXPORT int ExeSurfBezierGetCurveU( int nSurfId, double dV, int nDestGrpId) ;
|
||||
EXE_EXPORT int ExeSurfBezierGetCurveV( int nSurfId, double dU, int nDestGrpId) ;
|
||||
EXE_EXPORT bool ExeSurfBezierGetInfo( int nSurfId, int& nDegU, int& nDegV, int& nSpanU, int& nSpanV, bool& bIsRat, bool& bTrimmed) ;
|
||||
EXE_EXPORT int ExeSurfBezierGetControlCurveU( int nSurfId, int nIndV, int nDestGrpId) ;
|
||||
EXE_EXPORT int ExeSurfBezierGetControlCurveV( int nSurfId, int nIndU, int nDestGrpId) ;
|
||||
EXE_EXPORT int ExeExtractSurfBezierLoops( int nId, int nDestGrpId, int* pnCount) ;
|
||||
EXE_EXPORT int ExeShowSurfBezierControlPoints( int nSrfId, int nDestGrpId, int* pnCount) ;
|
||||
|
||||
// GeomDb Volume Get
|
||||
EXE_EXPORT bool ExeVolZmapVolume( int nId, double& dVol) ;
|
||||
@@ -810,9 +923,11 @@ EXE_EXPORT bool ExePointCurveDistSide( const Point3d& ptP, int nCurveId, const V
|
||||
double* pdDist, Point3d& ptMin, int* pnSide) ;
|
||||
EXE_EXPORT bool ExePointSurfTmDist( const Point3d& ptP, int nStmId, int nRefType,
|
||||
double* pdDist, Point3d& ptMin, int* pnTria) ;
|
||||
EXE_EXPORT bool ExePointSurfBzDist( const Point3d& ptP, int nSbzId, int nRefType,
|
||||
double* pdDist, Point3d& ptMin, Vector3d& vtN) ;
|
||||
|
||||
// Geo Intersect
|
||||
EXE_EXPORT bool ExeLineCurveInters( const Point3d& ptP, const Vector3d& vtDir, const int nId, const int nRefType,
|
||||
EXE_EXPORT bool ExeLineCurveInters( const Point3d& ptP, const Vector3d& vtDir, int nId, int nRefType,
|
||||
INTDBLVECTOR& vInters) ;
|
||||
EXE_EXPORT bool ExeLineBoxInters( const Point3d& ptP, const Vector3d& vtDir, const BBox3d& b3Box,
|
||||
INTDBLVECTOR& vInters) ;
|
||||
@@ -822,7 +937,7 @@ EXE_EXPORT bool ExeLineSurfBzInters( const Point3d& ptP, const Vector3d& vtDir,
|
||||
INTDBLVECTOR& vInters) ;
|
||||
EXE_EXPORT bool ExeLineVolZmapInters( const Point3d& ptP, const Vector3d& vtDir, int nId, int nRefType,
|
||||
INTDBLVECTOR& vInters) ;
|
||||
EXE_EXPORT int ExePlaneCurveInters( const Point3d& ptOn, const Vector3d& vtN, const int nId, const int nDestGrpId, const int nRefType,
|
||||
EXE_EXPORT int ExePlaneCurveInters( const Point3d& ptOn, const Vector3d& vtN, int nId, int nDestGrpId, int nRefType,
|
||||
int* pnCount) ;
|
||||
EXE_EXPORT int ExePlaneBoxInters( const Point3d& ptOn, const Vector3d& vtN, const BBox3d& b3Box, int nDestGrpId, int nRefType,
|
||||
int* pnPntCount, int* pnCrvCount, int* pnSrfCount) ;
|
||||
@@ -832,12 +947,13 @@ EXE_EXPORT int ExeParPlanesSurfTmInters( const Point3d& ptOn, const Vector3d& v
|
||||
int* pnGrpCount) ;
|
||||
EXE_EXPORT int ExePlaneVolZmapInters( const Point3d& ptOn, const Vector3d& vtN, int nId, int nDestGrpId, int nRefType,
|
||||
int* pnCount) ;
|
||||
EXE_EXPORT int ExeCurveCurveInters( const int nId1, const int nId2, const int nDestGrpId,
|
||||
int* pnPntCount, int* pnCrvCount) ;
|
||||
EXE_EXPORT int ExeCurveSurfTmInters( const int nCrvId, const int nStmId, const int nDestGrpId,
|
||||
EXE_EXPORT int ExeCurveCurveInters( int nId1, int nId2, int nDestGrpId,
|
||||
int* pnPntCount, int* pnCrvCount, bool bOnly3D = false) ;
|
||||
EXE_EXPORT int ExeCurveSurfTmInters( int nCrvId, int nStmId, int nDestGrpId,
|
||||
int* pnPntCount, int* pnCrvCount) ;
|
||||
EXE_EXPORT int ExeSurfTmSurfTmInters( int nId1, int nId2, int nDestGrpId, double dToler,
|
||||
int* pnPntCount, int* pnCrvCount, int* pnSrfCount) ;
|
||||
EXE_EXPORT bool ExeBBoxOverlap( const BBox3d& bboxA, const Frame3d& frA, const BBox3d& bboxB, const Frame3d& frB) ;
|
||||
|
||||
// Collision Detection
|
||||
EXE_EXPORT int ExeCDeBoxSolid( const Frame3d& frBox, const Vector3d& vtDiag, int nSolidId, double dSafeDist, int nRefType) ;
|
||||
@@ -849,6 +965,16 @@ EXE_EXPORT int ExeCDeConeSolid( const Frame3d& frCone, double dR1, double dR2,
|
||||
EXE_EXPORT int ExeCDeSpheSolid( const Point3d& ptCen, double dR, int nSolidId, double dSafeDist, int nRefType) ;
|
||||
EXE_EXPORT int ExeCDeSolidSolid( int nSolid1Id, int nSolid2Id, double dSafeDist) ;
|
||||
|
||||
// Test Interference
|
||||
EXE_EXPORT int ExeTestBoxSurface( const Frame3d& frBox, const Vector3d& vtDiag, int nSurfId, double dSafeDist, int nRefType) ;
|
||||
EXE_EXPORT int ExeTestRectPrismoidSurface( const Frame3d& frPrismoid, double dBaseLenX, double dBaseLenY,
|
||||
double dTopLenX, double dTopLenY, double dHeight,
|
||||
int nSurfId, double dSafeDist, int nRefType) ;
|
||||
EXE_EXPORT int ExeTestCylSurface( const Frame3d& frCyl, double dR, double dH, int nSurfId, double dSafeDist, int nRefType) ;
|
||||
EXE_EXPORT int ExeTestConeSurface( const Frame3d& frCone, double dR1, double dR2, double dH, int nSurfId, double dSafeDist, int nRefType) ;
|
||||
EXE_EXPORT int ExeTestSpheSurface( const Point3d& ptCen, double dR, int nSurfId, double dSafeDist, int nRefType) ;
|
||||
EXE_EXPORT int ExeTestSurfaceSurface( int nSurf1Id, int nSurf2Id, double dSafeDist, bool bTestEnclosion = false) ;
|
||||
|
||||
// Maximum Filler
|
||||
EXE_EXPORT bool ExeMaxFillerStart( void) ;
|
||||
EXE_EXPORT bool ExeMaxFillerAddPart( int nPartId, double dLen) ;
|
||||
@@ -909,6 +1035,7 @@ EXE_EXPORT bool ExeAutoNestSetRestrictedZoneToPart( int nPartId, int nRzConstrId
|
||||
EXE_EXPORT bool ExeAutoNestSetStripYconstraintToPart( int nPartId, const Point3d& ptRef, double dStripStart, double dStripRepeat) ;
|
||||
EXE_EXPORT bool ExeAutoNestSetStripXconstraintToPart( int nPartId, const Point3d& ptRef, double dStripStart, double dStripRepeat) ;
|
||||
EXE_EXPORT bool ExeAutoNestSetInterpartGap( double dGap) ;
|
||||
EXE_EXPORT bool ExeAutoNestSetShearGap( double dShearGap) ;
|
||||
EXE_EXPORT bool ExeAutoNestSetReportFile( const std::string& sReportFile) ;
|
||||
EXE_EXPORT bool ExeAutoNestCompute( bool bMinimizeOnXvsY, int nMaxTime) ;
|
||||
EXE_EXPORT bool ExeAutoNestCancelComputation( void) ;
|
||||
@@ -916,6 +1043,7 @@ EXE_EXPORT bool ExeAutoNestGetComputationStatus( int& nStatus) ;
|
||||
EXE_EXPORT bool ExeAutoNestPrintResults( const std::string& sHtmlFile) ;
|
||||
EXE_EXPORT bool ExeAutoNestGetResults( int& nNestedParts, int& nParts, int& nSheets, int& nNestings, double& dTotFillRatio) ;
|
||||
EXE_EXPORT bool ExeAutoNestGetOneResult( int nInd, int& nType, int& nId, int& nFlag, double& dX, double& dY, double& dAngRot) ;
|
||||
EXE_EXPORT bool ExeAutoNestCalcShearSequence( int nNesting, PNTVECTOR& vPtStart, PNTVECTOR& vPtEnd) ;
|
||||
|
||||
// Collision Avoidance Tool SurfaceTriMesh
|
||||
EXE_EXPORT bool ExeCAvSetStdTool( double dToolLen, double dToolDiam, double dToolCornR) ;
|
||||
@@ -971,7 +1099,7 @@ EXE_EXPORT bool ExeIsRawPart( int nRawId) ;
|
||||
EXE_EXPORT int ExeAddRawPart( Point3d ptOrig, double dLength, double dWidth, double dHeight, Color cCol) ;
|
||||
EXE_EXPORT int ExeAddRawPartWithPart( int nPartId, int nCrvId, double dOverMat, Color cCol) ;
|
||||
EXE_EXPORT bool ExeModifyRawPart( int nRawId, Point3d ptOrig, double dLength, double dWidth, double dHeight, Color cCol) ;
|
||||
EXE_EXPORT bool ExeModifyRawPart( int nRawId, int nCrvId, double dOverMat, double dZmin, double dHeight, Color cCol) ;
|
||||
EXE_EXPORT bool ExeModifyRawPart( int nRawId, int nCrvId, double dOverMat, double dHeight, Color cCol) ;
|
||||
EXE_EXPORT bool ExeModifyRawPartSize( int nRawId, double dLength, double dWidth, double dHeight) ;
|
||||
EXE_EXPORT bool ExeModifyRawPartHeight( int nRawId, double dHeight) ;
|
||||
EXE_EXPORT bool ExeKeepRawPart( int nRawId, int nSouPhase) ;
|
||||
@@ -1003,6 +1131,9 @@ 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 bool ExeMoveDispAxis( const std::string& sName, double dPos) ;
|
||||
EXE_EXPORT bool ExeRemoveDispAxis( const std::string& sName) ;
|
||||
EXE_EXPORT bool ExeKeepAllDispAxes( int nSouPhase) ;
|
||||
EXE_EXPORT int ExeAddFixture( const std::string& sName, const Point3d& ptPos, double dAngRotDeg, double dMov) ;
|
||||
EXE_EXPORT bool ExeKeepFixture( int nFxtId, int nSouPhase) ;
|
||||
EXE_EXPORT bool ExeRemoveFixture( int nFxtId) ;
|
||||
@@ -1011,7 +1142,9 @@ EXE_EXPORT int ExeGetFirstFixture( void) ;
|
||||
EXE_EXPORT int ExeGetNextFixture( int nFxtId) ;
|
||||
EXE_EXPORT bool ExeMoveFixture( int nFxtId, const Vector3d& vtMove) ;
|
||||
EXE_EXPORT bool ExeRotateFixture( int nFxtId, double dDeltaAngDeg) ;
|
||||
EXE_EXPORT bool ExeSetFixtureLink( int nFxtId, const std::string& sTaLink) ;
|
||||
EXE_EXPORT bool ExeMoveFixtureMobile( int nFxtId, double dDeltaMove) ;
|
||||
EXE_EXPORT bool ExeSetFixtureMobile( int nFxtId, double dMove) ;
|
||||
// Tools Database
|
||||
EXE_EXPORT bool ExeTdbGetToolNewName( std::string& sName) ;
|
||||
EXE_EXPORT bool ExeTdbAddTool( const std::string& sName, int nType) ;
|
||||
@@ -1043,6 +1176,7 @@ EXE_EXPORT bool ExeTdbGetCurrToolValInNotes( int nType, const std::string& sKey,
|
||||
EXE_EXPORT bool ExeTdbGetCurrToolMaxDepth( double& dMaxDepth) ;
|
||||
EXE_EXPORT bool ExeTdbGetCurrToolThDiam( double& dThDiam) ;
|
||||
EXE_EXPORT bool ExeTdbGetCurrToolThLength( double& dThLen) ;
|
||||
EXE_EXPORT bool ExeTdbCurrToolIsStandardDraw( bool& bStandard) ;
|
||||
EXE_EXPORT int ExeTdbCurrToolDraw( int nGenCtx, int nToolCtx) ;
|
||||
EXE_EXPORT bool ExeTdbReload( void) ;
|
||||
EXE_EXPORT bool ExeTdbSave( void) ;
|
||||
@@ -1055,6 +1189,7 @@ EXE_EXPORT bool ExeTdbImport( const std::string& sFile, const STRVECTOR& vsTools
|
||||
EXE_EXPORT int ExeGetCurrSetup( void) ;
|
||||
EXE_EXPORT bool ExeGetDefaultSetupName( std::string& sName) ;
|
||||
EXE_EXPORT bool ExeImportSetup( const std::string& sName) ;
|
||||
EXE_EXPORT bool ExeExistsCurrSetup( void) ;
|
||||
EXE_EXPORT bool ExeVerifyCurrSetup( STRVECTOR& vsErrors) ;
|
||||
EXE_EXPORT bool ExeFindToolInCurrSetup( const std::string& sTool) ;
|
||||
EXE_EXPORT bool ExeGetToolSetupPosInCurrSetup( const std::string& sTool, std::string& sTcPos) ;
|
||||
@@ -1097,16 +1232,16 @@ EXE_EXPORT int ExeGetFirstOperation( void) ;
|
||||
EXE_EXPORT int ExeGetNextOperation( int nId) ;
|
||||
EXE_EXPORT int ExeGetLastOperation( void) ;
|
||||
EXE_EXPORT int ExeGetPrevOperation( int nId) ;
|
||||
EXE_EXPORT int ExeGetFirstActiveOperation( void) ;
|
||||
EXE_EXPORT int ExeGetNextActiveOperation( int nId) ;
|
||||
EXE_EXPORT int ExeGetLastActiveOperation( void) ;
|
||||
EXE_EXPORT int ExeGetPrevActiveOperation( int nId) ;
|
||||
EXE_EXPORT int ExeGetFirstActiveOperation( bool bNeedMachNotEmpty = false) ;
|
||||
EXE_EXPORT int ExeGetNextActiveOperation( int nId, bool bNeedMachNotEmpty = false) ;
|
||||
EXE_EXPORT int ExeGetLastActiveOperation( bool bNeedMachNotEmpty = false) ;
|
||||
EXE_EXPORT int ExeGetPrevActiveOperation( int nId, bool bNeedMachNotEmpty = false) ;
|
||||
EXE_EXPORT int ExeGetOperationType( int nId) ;
|
||||
EXE_EXPORT int ExeGetOperationPhase( int nId) ;
|
||||
EXE_EXPORT bool ExeSetOperationName( int nId, const std::string& sName) ;
|
||||
EXE_EXPORT bool ExeGetOperationName( int nId, std::string& sName) ;
|
||||
EXE_EXPORT int ExeGetOperationId( const std::string& sName) ;
|
||||
EXE_EXPORT bool ExeIsOperationEmpty( int nId) ;
|
||||
EXE_EXPORT bool ExeIsOperationEmpty( int nId, int nEmptyType = 0) ;
|
||||
EXE_EXPORT bool ExeRemoveOperation( int nId) ;
|
||||
EXE_EXPORT bool ExeRemoveAllPhaseOperations( int nPhase) ;
|
||||
EXE_EXPORT bool ExeRemoveAllOperations( void) ;
|
||||
@@ -1124,6 +1259,7 @@ EXE_EXPORT bool ExeRemoveOperationHome( int nId) ;
|
||||
EXE_EXPORT int ExeGetPhaseDisposition( int nPhase) ;
|
||||
EXE_EXPORT bool ExeSpecialApplyDisposition( int nId, bool bRecalc) ;
|
||||
EXE_EXPORT bool ExeSpecialUpdateDisposition( int nId) ;
|
||||
EXE_EXPORT bool ExeGetDispositionToolData( int nId, std::string& sName, std::string& sHead, int& nExit, std::string& sTcPos) ;
|
||||
// Machinings
|
||||
EXE_EXPORT int ExeAddMachining( const std::string& sName, const std::string& sMachining) ;
|
||||
EXE_EXPORT int ExeAddMachining( const std::string& sName, int nMchType, const std::string& sTool) ;
|
||||
@@ -1139,17 +1275,22 @@ EXE_EXPORT bool ExeSetMachiningGeometry( const SELVECTOR& vIds) ;
|
||||
EXE_EXPORT bool ExePreviewMachining( bool bRecalc) ;
|
||||
EXE_EXPORT bool ExeApplyMachining( bool bRecalc, bool bPostApply = true) ;
|
||||
EXE_EXPORT bool ExeUpdateMachining( bool bPostApply = true) ;
|
||||
EXE_EXPORT bool ExeChangePreviewMachiningToolShow( int nLookFlag) ;
|
||||
EXE_EXPORT bool ExePreparePreviewMachiningTool( void) ;
|
||||
EXE_EXPORT bool ExeRemovePreviewMachiningTool( void) ;
|
||||
EXE_EXPORT int ExePreviewMachiningTool( int nEntId, int nFlag) ;
|
||||
EXE_EXPORT int ExeGetPreviewMachiningToolStepCount( void) ;
|
||||
EXE_EXPORT int ExePreviewMachiningTool( int nEntId, int nStep) ;
|
||||
EXE_EXPORT bool ExeGetMachiningParam( int nType, bool& bVal) ;
|
||||
EXE_EXPORT bool ExeGetMachiningParam( int nType, int& nVal) ;
|
||||
EXE_EXPORT bool ExeGetMachiningParam( int nType, double& dVal) ;
|
||||
EXE_EXPORT bool ExeGetMachiningParam( int nType, std::string& sVal) ;
|
||||
EXE_EXPORT bool ExeGetMachiningGeometry( SELVECTOR& vIds) ;
|
||||
EXE_EXPORT bool ExeIsMachiningEmpty( void) ;
|
||||
EXE_EXPORT bool ExeGetMachiningSkippedGeometry( SELVECTOR& vIds) ;
|
||||
EXE_EXPORT bool ExeIsMachiningEmpty( int nEmptyType) ;
|
||||
EXE_EXPORT bool ExeGetMachiningStartPoint( Point3d& ptStart) ;
|
||||
EXE_EXPORT bool ExeGetMachiningEndPoint( Point3d& ptEnd) ;
|
||||
EXE_EXPORT bool ExeGetMachiningStartAxes( bool bSkipClimb, DBLVECTOR& vAxVal) ;
|
||||
EXE_EXPORT bool ExeGetMachiningEndAxes( bool bSkipRise, DBLVECTOR& vAxVal) ;
|
||||
EXE_EXPORT bool ExeApplyAllMachinings( bool bRecalc, bool bStopOnFirstErr, std::string& sErrList) ;
|
||||
EXE_EXPORT bool ExeApplyAllMachiningsEx( bool bRecalc, bool bStopOnFirstErr, std::string& sErrList, std::string& sWarnList) ;
|
||||
EXE_EXPORT bool ExeUpdateAllMachinings( bool bStopOnFirstErr, std::string& sErrList) ;
|
||||
@@ -1158,8 +1299,13 @@ EXE_EXPORT bool ExeUpdateAllMachiningsEx( bool bStopOnFirstErr, std::string& sEr
|
||||
EXE_EXPORT bool ExeGetClEntMove( int nEntId, int& nMove) ;
|
||||
EXE_EXPORT bool ExeGetClEntFlag( int nEntId, int& nFlag, int& nFlag2) ;
|
||||
EXE_EXPORT bool ExeGetClEntIndex( int nEntId, int& nIndex) ;
|
||||
EXE_EXPORT bool ExeGetClEntFeed( int nEntId, double& dFeed) ;
|
||||
EXE_EXPORT bool ExeGetClEntAxesStatus( int nEntId, int& nStatus) ;
|
||||
EXE_EXPORT bool ExeGetClEntAxesMask( int nEntId, int& nMask) ;
|
||||
EXE_EXPORT bool ExeGetClEntAxesVal( int nEntId, DBLVECTOR& vAxes) ;
|
||||
|
||||
EXE_EXPORT bool ExeGetClEntTDir( int nEntId, Vector3d& vtTDir) ;
|
||||
EXE_EXPORT bool ExeGetClEntCDir( int nEntId, Vector3d& vtCDir) ;
|
||||
EXE_EXPORT bool ExeGetClEntADir( int nEntId, Vector3d& vtADir) ;
|
||||
// Simulation
|
||||
EXE_EXPORT bool ExeSimInit( void) ;
|
||||
EXE_EXPORT bool ExeSimStart( bool bFirst) ;
|
||||
@@ -1167,6 +1313,7 @@ EXE_EXPORT bool ExeSimMove( int& nStatus) ;
|
||||
EXE_EXPORT bool ExeSimHome( void) ;
|
||||
EXE_EXPORT bool ExeSimSetStep( double dStep) ;
|
||||
EXE_EXPORT bool ExeSimSetUiStatus( int nUiStatus) ;
|
||||
EXE_EXPORT bool ExeSimEnableToolTipTrace( bool bEnable) ;
|
||||
EXE_EXPORT bool ExeSimGetAxisInfoPos( int nI, std::string& sName, std::string& sToken, bool& bLinear, double& dVal) ;
|
||||
EXE_EXPORT bool ExeSimGetToolInfo( std::string& sName, double& dSpeed) ;
|
||||
EXE_EXPORT bool ExeSimGetOperationInfo( std::string& sName, int& nType) ;
|
||||
@@ -1182,29 +1329,37 @@ EXE_EXPORT int ExeGetTableId( const std::string& sTable) ;
|
||||
EXE_EXPORT int ExeGetAxisId( const std::string& sAxis) ;
|
||||
EXE_EXPORT int ExeGetHeadId( const std::string& sHead) ;
|
||||
EXE_EXPORT int ExeGetHeadExitCount( const std::string& sHead) ;
|
||||
EXE_EXPORT int ExeGetExitId( const std::string& sHead, int nExit) ;
|
||||
EXE_EXPORT int ExeGetTcPosId( const std::string& sTcPos) ;
|
||||
EXE_EXPORT bool ExeGetAxisToken( const std::string& sAxis, std::string& sToken) ;
|
||||
EXE_EXPORT bool ExeGetAxisType( const std::string& sAxis, bool& bLinear) ;
|
||||
EXE_EXPORT bool ExeGetAxisDir( const std::string& sAxis, Vector3d& vtDir) ;
|
||||
EXE_EXPORT bool ExeGetAxisInvert( const std::string& sAxis, bool& bInvert) ;
|
||||
EXE_EXPORT bool ExeGetAxisOffset( const std::string& sAxis, double& dOffset) ;
|
||||
EXE_EXPORT bool ExeGetAllTablesNames( STRVECTOR& vNames) ;
|
||||
EXE_EXPORT bool ExeGetAllAxesNames( STRVECTOR& vNames) ;
|
||||
EXE_EXPORT bool ExeGetAllHeadsNames( STRVECTOR& vNames) ;
|
||||
EXE_EXPORT bool ExeGetAllTcPosNames( STRVECTOR& vNames) ;
|
||||
// Machine Calc
|
||||
EXE_EXPORT bool ExeSetCalcTable( const std::string& sTable) ;
|
||||
EXE_EXPORT bool ExeSetCalcTool( const std::string& sTool, const std::string& sHead, int nExit) ;
|
||||
EXE_EXPORT bool ExeGetAllCurrAxesName( STRVECTOR& vAxName) ;
|
||||
EXE_EXPORT bool ExeSetCalcSolCh( int nScc, bool bExact) ;
|
||||
EXE_EXPORT bool ExeSetRotAxisBlock( const std::string& sAxis, double dVal) ;
|
||||
EXE_EXPORT bool ExeGetCalcTable( std::string& sTable) ;
|
||||
EXE_EXPORT bool ExeGetCalcTool( std::string& sTool, std::string& sHead, int& nExit) ;
|
||||
EXE_EXPORT bool ExeGetCalcSolCh( int& nScc, bool& bExact) ;
|
||||
EXE_EXPORT bool ExeGetAllCurrAxesNames( STRVECTOR& vAxName) ;
|
||||
EXE_EXPORT bool ExeGetRotAxisBlocked( int nInd, std::string& sAxis, double& dVal) ;
|
||||
EXE_EXPORT bool ExeGetCalcAngles( const Vector3d& vtDirT, const Vector3d& vtDirA,
|
||||
int& nStat, double& dAngA1, double& dAngB1, double& dAngA2, double& dAngB2) ;
|
||||
EXE_EXPORT bool ExeGetCalcAngles( const Vector3d& vtDirT, const Vector3d& vtDirA,
|
||||
int& nStat, DBLVECTOR& vAng1, DBLVECTOR& vAng2) ;
|
||||
EXE_EXPORT bool ExeGetCalcPositions( const Point3d& ptP, double dAngA, double dAngB,
|
||||
int& nStat, double& dX, double& dY, double& dZ) ;
|
||||
double& dX, double& dY, double& dZ) ;
|
||||
EXE_EXPORT bool ExeGetCalcPositions( const Point3d& ptP, const DBLVECTOR& vAng,
|
||||
int& nStat, double& dX, double& dY, double& dZ) ;
|
||||
double& dX, double& dY, double& dZ) ;
|
||||
EXE_EXPORT bool ExeGetRobotAngles( const Point3d& ptP, const Vector3d& vtDirT, const Vector3d& vtDirA,
|
||||
DBLVECTOR& vAng1, DBLVECTOR& vAng2) ;
|
||||
EXE_EXPORT bool ExeGetCalcTipFromPositions( double dX, double dY, double dZ, double dAngA, double dAngB,
|
||||
bool bBottom, Point3d& ptTip) ;
|
||||
EXE_EXPORT bool ExeGetCalcTipFromPositions( double dX, double dY, double dZ, const DBLVECTOR& vAng,
|
||||
@@ -1212,6 +1367,7 @@ EXE_EXPORT bool ExeGetCalcTipFromPositions( double dX, double dY, double dZ, con
|
||||
EXE_EXPORT bool ExeGetCalcToolDirFromAngles( const DBLVECTOR& vAng, Vector3d& vtDir) ;
|
||||
EXE_EXPORT bool ExeGetCalcAuxDirFromAngles( const DBLVECTOR& vAng, Vector3d& vtDir) ;
|
||||
EXE_EXPORT bool ExeVerifyOutstroke( double dX, double dY, double dZ, double dAngA, double dAngB, int& nStat) ;
|
||||
EXE_EXPORT bool ExeVerifyOutstroke( double dX, double dY, double dZ, const DBLVECTOR& vAng, int& nStat) ;
|
||||
EXE_EXPORT bool ExeGetOutstrokeInfo( std::string& sInfo) ;
|
||||
// Machine Move
|
||||
EXE_EXPORT bool ExeSetAxisPos( const std::string& sAxis, double dVal, double* pdNewVal = nullptr) ;
|
||||
@@ -1232,7 +1388,7 @@ EXE_EXPORT bool ExeGetSceneInfo( std::string& sInfo) ;
|
||||
EXE_EXPORT bool ExeSetBackground( Color TopCol, Color BottomCol, bool bRedraw) ;
|
||||
EXE_EXPORT bool ExeGetBackground( Color& TopCol, Color& BottomCol) ;
|
||||
EXE_EXPORT bool ExeSetLineAttribs( int nWidth) ;
|
||||
EXE_EXPORT bool ExeSetMarkAttribs( Color MarkCol) ;
|
||||
EXE_EXPORT bool ExeSetMarkAttribs( Color MarkCol, Color Mark2Col) ;
|
||||
EXE_EXPORT bool ExeSetSelSurfAttribs( Color SelSurfCol) ;
|
||||
EXE_EXPORT bool ExeSetGeoLineAttribs( Color GlCol) ;
|
||||
EXE_EXPORT bool ExeSetGeoTriaAttribs( Color GtCol) ;
|
||||
@@ -1243,8 +1399,11 @@ EXE_EXPORT bool ExeSetGridGeo( double dSnapStep, int nMinLineSstep, int nMajLine
|
||||
EXE_EXPORT bool ExeSetGridGeoAdv( double dSnapStep, int nMinLineSstep, int nMajLineSstep,
|
||||
double dXmin, double dXmax, double dYmin, double dYmax) ;
|
||||
EXE_EXPORT bool ExeSetGridColor( Color colMin, Color colMaj) ;
|
||||
EXE_EXPORT bool ExeSetCameraType( bool bOrthoOrPersp, bool bRedraw) ;
|
||||
EXE_EXPORT bool ExeSetZoomType( int nMode, bool bRedraw) ;
|
||||
EXE_EXPORT bool ExeResize( int nW, int nH) ;
|
||||
EXE_EXPORT bool ExeDraw( void) ;
|
||||
EXE_EXPORT bool ExeRedraw( void) ;
|
||||
EXE_EXPORT bool ExeSelect( int nWinX, int nWinY, int nSelW, int nSelH, int* pnSel) ;
|
||||
EXE_EXPORT bool ExeSetObjFilterForSelWin( bool bZerodim, bool bCurve, bool bSurf, bool bVolume, bool bExtra) ;
|
||||
EXE_EXPORT bool ExeUnselectableRemove( int nId) ;
|
||||
@@ -1264,6 +1423,8 @@ EXE_EXPORT bool ExeSetShowCurveDirection( bool bShow, bool bRedraw) ;
|
||||
EXE_EXPORT bool ExeGetShowCurveDirection( void) ;
|
||||
EXE_EXPORT bool ExeSetShowTriaAdv( bool bAdvanced, bool bRedraw) ;
|
||||
EXE_EXPORT bool ExeGetShowTriaAdv( void) ;
|
||||
EXE_EXPORT bool ExeSetShowSurfBezierTol( double dLinTol, bool bRedraw) ;
|
||||
EXE_EXPORT double ExeGetShowSurfBezierTol( void) ;
|
||||
EXE_EXPORT bool ExeSetShowZmap( int nMode, bool bRedraw) ;
|
||||
EXE_EXPORT int ExeGetShowZmap( void) ;
|
||||
EXE_EXPORT bool ExeZoomRadius( double dRadius, bool bRedraw) ;
|
||||
@@ -1300,6 +1461,9 @@ EXE_EXPORT bool ExeGetTextureDimensions( const std::string& sName, double& dDimX
|
||||
EXE_EXPORT bool ExeChangeTextureDimensions( const std::string& sName, double dDimX, double dDimY) ;
|
||||
EXE_EXPORT bool ExeGetImage( int nShowMode, Color colBackTop, Color colBackBottom,
|
||||
int nWidth, int nHeight, const std::string& sFile) ;
|
||||
EXE_EXPORT bool ExeGetImageEx( int nDriver, bool b2Buff, int nColorBits, int nDepthBits,
|
||||
int nShowMode, Color colBackTop, Color colBackBottom,
|
||||
int nCameraDir, int nWidth, int nHeight, const std::string& sFile) ;
|
||||
|
||||
// Image
|
||||
EXE_EXPORT bool ExeGetImagePixels( const std::string& sFile, int& nPixelX, int& nPixelY) ;
|
||||
@@ -1330,3 +1494,47 @@ EXE_EXPORT int ExeAddPicture( int nParentId, const std::string& sName, const st
|
||||
EXE_EXPORT bool ExeLoadMessages( const std::string& sMsgFilePath) ;
|
||||
EXE_EXPORT const std::string& ExeGetLanguage( void) ;
|
||||
EXE_EXPORT const std::string& ExeGetMsg( int nMsg) ;
|
||||
|
||||
// Redis
|
||||
EXE_EXPORT bool ExeRedisConnect( const std::string& sConnection, int& nIdConnection) ;
|
||||
EXE_EXPORT bool ExeRedisDisconnect( int nIdConnection) ;
|
||||
EXE_EXPORT bool ExeRedisSetValFromKey( int nIdConnection, const std::string& sKey, const std::string& sVal) ;
|
||||
EXE_EXPORT bool ExeRedisGetValFromKey( int nIdConnection, const std::string& sKey, std::string& sVal) ;
|
||||
EXE_EXPORT bool ExeRedisAsyncConnect( const std::string& sConnection, int& nIdConnection) ;
|
||||
EXE_EXPORT bool ExeRedisAsyncDisconnect( int nIdConnection) ;
|
||||
EXE_EXPORT bool ExeRedisAsyncPublish( int nIdConnection, const std::string& sChannel, const std::string& sMessage) ;
|
||||
EXE_EXPORT bool ExeRedisAsyncSubscribe( int nIdConnection, const std::string& sChannel) ;
|
||||
EXE_EXPORT bool ExeRedisAsyncUnsubscribe( int nIdConnection, const std::string& sChannel) ;
|
||||
EXE_EXPORT bool ExeRedisAsyncSubscribeOneMessage( int nIdConnection, const std::string& sChannel, double dMaxTimeOut, std::string& sMessage) ;
|
||||
EXE_EXPORT bool ExeRedisAsyncGetMessage( int nIdConnection, const std::string& sChannel, int& nCount, std::string& sMessage) ;
|
||||
|
||||
// Base64
|
||||
EXE_EXPORT bool ExeBase64Encode( const std::string& sFile, std::string& sB64Dest) ;
|
||||
EXE_EXPORT bool ExeBase64Decode( const std::string& sB64Sou, const std::string& sFile) ;
|
||||
|
||||
// Trimming
|
||||
EXE_EXPORT int ExeTrimmingGetSurfTmFaceAdj( int nParentId, int nSurfId, int nTria, const Point3d& vPts,
|
||||
double dAngTol, double dSize, double dSizeTol) ;
|
||||
EXE_EXPORT int ExeTrimmingGetSurfTmFromStmFaces( int nParentId, int nSurfId, const INTVECTOR& vFaces) ;
|
||||
EXE_EXPORT bool ExeTrimmingGetAdjSurfs( const INTVECTOR& vSurfId, const INTVECTOR& vOtherSurfId, double dLinTol,
|
||||
double dAngTol, double dAngFaceTol, INTVECTOR& vResId) ;
|
||||
EXE_EXPORT bool ExeTrimmingGetBorders( int nParentId, const SELVECTOR& vIds, double dSurfLinTol, double dSurfAngTol,
|
||||
double dLinTol, double dAngTol, int& nFirstId, int& nCount) ;
|
||||
EXE_EXPORT bool ExeTrimmingGetBordersByNormals( int nParentId, const SELVECTOR& vIds, double dSurfLinTol,
|
||||
double dSurfAngTol, double dLinTol, double dAngTol,
|
||||
double dThick, int& nFirstId, int& nCount) ;
|
||||
EXE_EXPORT bool ExeTrimmingGetFinalBorders( int nParentId, const INTVECTOR& vCrvBezierId, double dLinTol, double dAngTol,
|
||||
const PNTVECTOR& vBreakingPts, double dThick, double dThickTol,
|
||||
int& nFirstId, int& nCount) ;
|
||||
EXE_EXPORT int ExeTrimmingGetRuledBezier( int nParentId, const INTVECTOR& vIds, int nEdge1Id, int nEdge2Id, double dLinTol,
|
||||
const INTVECTOR& vnLineIds) ;
|
||||
EXE_EXPORT bool ExeTrimmingInterpolateSyncLines( int nParentId, int nSync1Id, int nSync2Id,
|
||||
int nBorder1Id, int nBorder2Id, double dEdgeLinTol,
|
||||
double dEdgeAngTol, int& nFirstId, int& nCount) ;
|
||||
EXE_EXPORT bool ExeTrimmingGetSurfBzSyncPoints( int nParentId, int nEdge1Id, int nEdge2Id, double dLinTol,
|
||||
double dAngTol, int nLineNbr, bool bShowOnCorners,
|
||||
int& nFirstId, int& nCount) ;
|
||||
EXE_EXPORT bool ExeTrimmingGetHoleBorder( int nParentId, const INTVECTOR& vSurfIds, const INTVECTOR& vOtherSurfIds,
|
||||
double dSurfLinTol, double dSurfAngTol, double dEdgeLinTol, double dEdgeAngTol,
|
||||
double dEdgeThick, int& nFirstId, int& nCount) ;
|
||||
EXE_EXPORT int ExeRegolarizeSurfaceLocally( int nParentId, int nSurfId, int nSyncStartId, int nSyncEndId, double dLinTol, int nType) ;
|
||||
|
||||
+3
-3
@@ -101,9 +101,9 @@ B64Decode( const std::string& sB64Sou, std::string& sDest)
|
||||
if ( p != nullptr)
|
||||
nVal = char( p - EncB64) ;
|
||||
in[phase] = (( c < 43 || c > 122) ? -1 : (int) DecB64[ c - 43]) ;
|
||||
if ( in[phase] != 0 )
|
||||
in[phase] = ((in[phase] == (int)'$') ? -1 : in[phase] - 62) ;
|
||||
if ( in[phase] != -1 ) {
|
||||
if ( in[phase] != 0 )
|
||||
in[phase] = ((in[phase] == (int)'$') ? -1 : in[phase] - 62) ;
|
||||
if ( in[phase] != -1 ) {
|
||||
phase = (phase + 1) % 4 ;
|
||||
if ( phase == 0) {
|
||||
decodeblock( in, sDest) ;
|
||||
|
||||
+9
-5
@@ -1,13 +1,14 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2018-2023
|
||||
// EgalTech 2018-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EgtFunPtrType.h Data : 23.11.23 Versione : 2.5k5
|
||||
// File : EgtFunPtrType.h Data : 12.10.25 Versione : 2.7j25
|
||||
// Contenuto : Dichiarazione tipi puntatori a funzione.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 19.07.18 DS Creazione modulo.
|
||||
// 23.11.23 DS Aggiunta pfOnTerminateProcess.
|
||||
// 12.10.25 DS Aggiunta pfCdeclProcEvents.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -16,6 +17,9 @@
|
||||
#include <string>
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
typedef bool (__stdcall * pfOnTerminateProcess) ( int) ;
|
||||
typedef int (__stdcall * pfProcEvents) ( int, int) ;
|
||||
typedef bool (__stdcall * pfOutText) ( const std::string&) ;
|
||||
typedef bool (__stdcall * psfOnTerminateProcess) ( int) ;
|
||||
typedef int (__stdcall * psfProcEvents) ( int, int) ;
|
||||
typedef bool (__stdcall * psfOutText) ( const std::string&) ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
typedef int (__cdecl * pcfProcEvents) ( int, int) ;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user