Compare commits

...

174 Commits

Author SHA1 Message Date
Daniele Bariletti 3d95e582ef Include:
- aggiunta funzione per una trimesh più fine per le bezier.
2025-04-14 11:20:32 +02:00
Daniele Bariletti ced3d3d75c Merge branch 'master' into FasterBezier 2025-04-11 16:03:33 +02:00
Dario Sassi 8f83a54310 Include :
- modifica solo estetica.
2025-04-08 13:07:16 +02:00
Daniele Bariletti 67fa641522 Merge remote-tracking branch 'origin/master' into FasterBezier 2025-04-08 12:55:03 +02:00
SaraP 3349069674 Include :
- aggiunto prototipo.
2025-04-08 08:35:14 +02:00
Dario Sassi 9a89e851d2 Include :
- aggiunto l'operatore == alla struttura SelData (per consentire confronti con funzioni STL direttamente sui contenitori).
2025-04-07 11:49:36 +02:00
Daniele Bariletti ffd321457b Merge branch 'master' into FasterBezier 2025-04-07 10:17:50 +02:00
Dario Sassi eb563b913d Include :
- aggiunte costanti per percorsi di lavorazione MCH_CL_SAFEIN e MCH_CL_SAFEOUT.
2025-04-03 09:12:29 +02:00
SaraP 38cbba2e35 Include :
- aggiornamento mensile codici protezione librerie.
2025-04-02 08:32:17 +02:00
Dario Sassi 36ce862054 Include :
- aggiornamento prototipi.
2025-03-28 20:16:47 +01:00
Dario Sassi c0beda4a1e Include :
- aggiornamento prototipi.
2025-03-27 19:20:18 +01:00
Daniele Bariletti a6ccbb0653 Merge remote-tracking branch 'origin/master' into FasterBezier 2025-03-27 16:01:31 +01:00
Dario Sassi 4fbd8d0b30 Merge branch 'master' of https://gitlab.steamware.net/egaltech/include 2025-03-27 15:23:03 +01:00
Dario Sassi 3db25e173f Include :
- aggiornamento prototipi.
2025-03-27 15:21:54 +01:00
Daniele Bariletti 8d2d58c455 Merge branch 'master' into FasterBezier 2025-03-27 10:24:19 +01:00
Daniele Bariletti 865e6e7090 - aggiunti prototipi per copie di pezzi di curve. 2025-03-27 10:22:20 +01:00
Daniele Bariletti df125db2ae - aggiunte funzioni per le copie di pezzi di curve. 2025-03-27 08:53:41 +01:00
Dario Sassi cf6b8e7572 Include :
- aggiornamento prototipi.
2025-03-26 11:24:48 +01:00
Dario Sassi f5724206d5 Include :
- aggiornamento prototipi.
2025-03-22 18:09:03 +01:00
SaraP 8bac9f6885 Include :
- aggiunto prototipo.
2025-03-13 15:21:53 +01:00
Riccardo Elitropi 3c26cd87cb Include :
- aggiunto parametro a funzione CalcPocketing.
2025-03-13 12:30:59 +01:00
Daniele Bariletti ef1b7e0952 Merge remote-tracking branch 'origin/HEAD' into FasterBezier 2025-03-12 09:40:43 +01:00
Daniele Bariletti 7b09526919 - nuova funzione per il calcolo dei punti di una bezier. 2025-03-11 14:50:02 +01:00
Riccardo Elitropi 9577094c3d Include :
- Semplificazione funzioni per CAvToolSilhouette e CAvToolSurfTm.
2025-03-11 11:16:07 +01:00
Riccardo Elitropi 9de2ae9561 Include :
- aggiunto parametro a CalcPocketing.
2025-03-04 17:41:02 +01:00
Dario Sassi c1a3773e7a Include :
- aggiornamento mensile codici protezione librerie.
2025-03-04 17:14:04 +01:00
Dario Sassi adebd1315b Include :
- aggiunta costante FT_PLY
- aggiornamento prototipi.
2025-03-02 19:48:08 +01:00
Dario Sassi 48c1ed4bcc Include :
- aggiornamento mensile codici protezione librerie.
2025-02-28 12:08:31 +01:00
Riccardo Elitropi 3bcc803f47 Include :
- aggiunto parametro in CalcPocketing
- Aggiunte definizioni in GeoCollection
- Aggiunta funzione per ottenere i Loop dalle Part per le TriMesh
- Aggiunta funzione di Test avanzata per le collisioni in CAvToolSurfTm.
2025-02-21 11:04:39 +01:00
SaraP 52b0802dfb Include :
- piccola correzione.
2025-02-17 14:58:31 +01:00
Daniele Bariletti f912437d87 Merge branch 'master' of https://gitlab.steamware.net/egaltech/Include 2025-02-06 16:57:21 +01:00
Daniele Bariletti 6816497c5e - aggiunta funzione per offset massimo di una curva. 2025-02-06 16:57:17 +01:00
Dario Sassi eb75cfd6e3 Include :
- aggiunta costante per chiave info di uscite attivate in sottogruppo di CL.
2025-02-04 14:53:30 +01:00
Dario Sassi d5fcae0eec Include :
- aggiornamento prototipi per SetFixtureLink.
2025-01-31 08:58:44 +01:00
Riccardo Elitropi d9d4f8c6dc Include :
- Modifiche valori delle costanti per CurveComposite/Curve in CalcPocketing.
2025-01-31 08:43:57 +01:00
Dario Sassi 3ad00a017f Include :
- aggiornamento prototipi.
2025-01-25 12:10:25 +01:00
Dario Sassi 689197717c Include :
- aggiornamento prototipi.
2025-01-23 11:37:45 +01:00
SaraP 34888a1204 Include :
- aggiunti prototipi per camera prospettica.
2025-01-23 10:09:14 +01:00
Dario Sassi d2bc22a9c3 Include :
- aggiunta costante SURFFIN_SUB_PROJECT.
2025-01-20 10:49:57 +01:00
Dario Sassi 34e42aaece Include :
- aggiunte costanti per TYPE utensile (per ora Std o Float).
2025-01-20 08:35:36 +01:00
Dario Sassi d2f7b89b04 Include :
- unificata proiezione di curve su superfici trimesh e bezier.
2025-01-15 15:21:37 +01:00
Dario Sassi c47feff394 Include :
- aggiunta seconda versione di CalcNormal per normale in un punto di un triangolo come media baricentrica di quelle ai vertici.
2025-01-14 08:44:31 +01:00
Dario Sassi 4b73f70232 Include :
- migliorie e ottimizzazioni a ToString con interi.
2025-01-10 16:27:56 +01:00
Dario Sassi 6c57d57be1 Include :
- aggiornamento codici protezione librerie a 27
- aggiornamento ToString con uso std::to_chars.
2025-01-09 17:53:27 +01:00
Dario Sassi 481a86c2fa Include :
- modifiche a FromString con integer per uso libreria fast_float.
2025-01-06 18:12:49 +01:00
Dario Sassi fd4b84807f Include :
- modifiche a FromString con double per uso libreria fast_float.
2025-01-03 12:16:52 +01:00
Dario Sassi 59a4239226 Include :
- aggiornamento prototipi.
2024-12-23 12:02:03 +01:00
SaraP 3ecbb9b55a Include :
- aggiunti prototipi.
2024-12-19 10:50:03 +01:00
Dario Sassi bc0ac3c336 Include :
- aggiornamento prototipi.
2024-12-17 10:20:54 +01:00
SaraP 0dd9b62386 Include :
- aggiornamento prototipi per conservare la gerarchia nell'importazione 3MF.
2024-12-16 10:54:39 +01:00
Riccardo Elitropi 2549d720df Include :
- in CavSilhouette aggiunte funzioni per calcolo silhouette all'interno di una regione piana.
2024-12-12 11:50:56 +01:00
Dario Sassi 9d7e968fb7 Include :
- migliorie e correzioni a funzioni inline per accedere a variabili globali strutturate lua.
2024-12-05 17:38:36 +01:00
Dario Sassi 916c8bf793 Include :
- aggiornamento prototipi.
2024-12-04 15:00:55 +01:00
Dario Sassi a311b4bd0f Include :
- aggiunte costanti SURFFIN_SUB_Z_CONST e SURFFIN_SUB_OPTIMAL per tipo finitura superfici.
2024-12-04 10:07:33 +01:00
Dario Sassi 3b65b5c13a Include :
- aggiunta interfaccia IImportOff
- aggiornamento codici mensili di protezione delle librerie.
2024-11-29 18:56:58 +01:00
Riccardo Elitropi 5aebd3a873 Include:
- in GeoObjSave, aggiunta funzione di salvataggio.
2024-11-27 16:03:05 +01:00
Dario Sassi 32ede62dc8 Include :
- aggiunta costante per entità non lavorate
- aggiornamento prototipi.
2024-11-25 15:01:26 +01:00
Dario Sassi d35b0931e0 Include :
- aggiornamento mensile codici protezione librerie.
2024-11-04 08:29:47 +01:00
Dario Sassi 2fe3f8c68b Merge branch 'master' of https://gitlab.steamware.net/egaltech/include 2024-10-31 18:26:28 +01:00
Dario Sassi b6799c548c Include :
- aggiornamento prototipi
- aggiunte costanti per morse.
2024-10-31 18:25:39 +01:00
Riccardo Elitropi 83a983100a Include :
- in GeoObjSave, aggiunta funzione per salvataggio booleane tra Sfr.
2024-10-28 08:26:22 +01:00
Dario Sassi a9b4243c08 Include :
- aggiornamento prototipi.
2024-10-16 19:54:29 +02:00
SaraP 942b26229f Include :
- aggiunto prototipo.
2024-10-16 16:27:10 +02:00
Dario Sassi e41ede6cf4 Include :
- aggiornamento prototipi.
2024-10-15 17:33:32 +02:00
Dario Sassi 5831ac0c99 Include :
- aggiornamento prototipi.
2024-10-10 15:42:37 +02:00
Riccardo Elitropi 45229d2c52 Include :
in ConvertCurveToComposite vengono copiati anche i tempParams.
2024-10-08 12:54:48 +02:00
Dario Sassi 9ccea92086 Include :
- aggiunti prototipi di EgtBasis.
2024-10-06 18:17:57 +02:00
Daniele Bariletti 15c7bdca64 Merge branch 'MoreBezier' 2024-10-04 15:41:41 +02:00
Daniele Bariletti b385f19273 Merge remote-tracking branch 'origin/master' into MoreBezier 2024-10-04 15:22:43 +02:00
Daniele Bariletti 5525970ea1 EgtExecutor :
- aggiunto un parametro alla ExeCreateSurfBzSwept.
2024-10-04 15:22:18 +02:00
Dario Sassi 0deab361c2 Include :
- aggiornamento prototipi
-  aggiornamento mensile codici protezione librerie.
2024-10-01 15:21:48 +02:00
Dario Sassi f4d5bb773e Include :
- aggiornamento prototipi.
2024-09-23 13:01:39 +02:00
Dario Sassi f9f1e61a52 Include :
- aggiunte costanti per nuovi tipi di svuotature CONFORMAL.
2024-09-20 14:19:21 +02:00
SaraP 3c02ee2dc0 Include :
- aggiunti e modificati prototipi.
2024-09-19 16:29:04 +02:00
Riccardo Elitropi d3528e3660 Include :
- aggiunte costanti per CalcPocketing.
- aggiunta funzione di salvataggio su file.
2024-09-19 09:03:49 +02:00
Daniele Bariletti 0399218643 Include :
- aggiunta la funzione lua per SurfBzSwept
- aggiunta la funzione IsLine per CrvBez
- aggiunta la funzione InterpolatePointSetWithBezier
- aggiunte la SweptInPlane e Swept3d ( questa da implementare)
- modificata la CreateBySetOfCurves.
2024-09-17 17:31:14 +02:00
Dario Sassi 83cfdfc50e Include :
- aggiornamento mensile codici protezione librerie.
2024-09-05 17:39:08 +02:00
Daniele Bariletti fe30d8316d Merge branch 'MoreBezier' 2024-09-05 15:04:26 +02:00
Daniele Bariletti 9b3ee95672 Include :
- modifca agli argomenti della CalcRegionPolyLines.
2024-09-05 12:10:28 +02:00
Daniele Bariletti 67e90e56dd Merge branch 'master' into MoreBezier 2024-09-04 15:52:58 +02:00
Daniele Bariletti 41671e933f Merge branch 'MoreBezier' 2024-09-04 15:52:05 +02:00
Daniele Bariletti d5b6c5c278 Include :
- aggiunto un argomento alla CalcRegionPolyLines
- aggiunta la funzione CreateSurfBzByRegion Extrusion.
2024-09-04 15:51:32 +02:00
Riccardo Elitropi a9b5a7285f Include :
- In CalcPocketing aggiunto parametro Conformal One Way.
2024-09-02 09:19:10 +02:00
Daniele Bariletti e07eaed52b Merge branch 'MoreBezier' 2024-08-30 16:16:51 +02:00
Dario Sassi 398a083be6 Include :
- estese funzioni inline per leggere e scrivere variabili lua globali (ora anche tabelle complesse).
2024-08-30 10:10:51 +02:00
Daniele Bariletti 843f69c529 Merge branch 'master' into MoreBezier 2024-08-29 09:25:44 +02:00
Daniele Bariletti 415493927e Include :
- integrazione del codice per calcolo di una region.
2024-08-29 08:52:51 +02:00
Daniele Bariletti d87a1037e6 Include :
- modifica di parametri per la gestione dell'errore per le bezier.
2024-08-26 16:48:53 +02:00
Dario Sassi 9891ab1d29 Merge remote-tracking branch 'origin/master' 2024-08-23 09:20:47 +02:00
Daniele Bariletti 32b9ee9f24 Include :
- aggiunte e modificate funzioni per l'approssimazione delle curve di bezier.
2024-08-22 16:01:30 +02:00
Riccardo Elitropi 6944705676 Include :
- aggiornamento prototipo CalcPocketing.
2024-08-22 12:53:04 +02:00
Dario Sassi 00f5e38f61 Include :
- aggiornamento prototipi e costanti (per Mark).
2024-08-22 09:09:18 +02:00
Dario Sassi 020dca78bd Include :
- aggiornamento prototipi.
2024-08-21 14:39:39 +02:00
Riccardo Elitropi 65b3fe80d1 Include :
- in CalcPocketing, aggiunto parametro temporaneo di Smusso.
2024-08-06 15:07:06 +02:00
Dario Sassi c57e44db02 Include :
- unificazione funzioni AreSamePoint***
- aggiornamento mensile codici protezione librerie.
2024-08-06 14:41:25 +02:00
Daniele Bariletti 30a394960c Merge branch 'MoreBezier' 2024-08-05 10:08:10 +02:00
Daniele Bariletti 50df61a97a Merge branch 'master' into MoreBezier 2024-08-05 08:47:10 +02:00
Dario Sassi 992b4d1562 Include :
- aggiunta costante per parte iniziale del nome delle superfici che costituiscono l'utensile vero e proprio (per migliorare calcolo ingombri in link tra lavorazioni).
2024-07-31 20:24:29 +02:00
Riccardo Elitropi 74c9c8d04e Include :
- aggiunto parametro SURFROU_SUB_CONFORMAL_ZIGZAG.
2024-07-30 18:37:40 +02:00
Daniele Bariletti e51df31d13 Include :
- aggiunta di una funzione per la distanza tra punti.
2024-07-30 16:25:17 +02:00
Riccardo Elitropi dd0a2818ee Include :
- aggiunto parametro POCKET_CONFORMAL_ZIGZAG per CalcPocketing.
2024-07-30 13:59:51 +02:00
Daniele Bariletti d6e6531d92 Include :
- aggiunta di un enum per il calcolo della planarità di una superficie di Bezier.
2024-07-25 16:25:43 +02:00
Riccardo Elitropi 5919ebd8ec Include :
- aggiornamento prototipi.
2024-07-25 12:28:43 +02:00
Daniele Bariletti f0968a8d40 Include :
- aggiunte le skinned con le bezier.
2024-07-19 13:14:53 +02:00
Riccardo Elitropi ba10a0cd58 EgtInclude :
- aggiunte costanti in CalcPocketing.
2024-07-19 10:21:00 +02:00
Dario Sassi f81bb32e20 Include :
- aggiornamento prototipi (aggiunta classe Distanza Punto Regione).
2024-07-18 20:16:07 +02:00
Daniele Bariletti 7d0a641b6d Merge branch 'master' into MoreBezier 2024-07-17 16:22:56 +02:00
SaraP d026cc2db7 Include :
- aggiunto nuovo parametro per lavorazione WaterJet.
2024-07-17 14:22:23 +02:00
Daniele Bariletti b691854993 Include :
- aggiornamento prototipi.
2024-07-16 17:10:30 +02:00
Daniele Bariletti fe25f6e009 Include :
- aggiornamento prototipi.
2024-07-16 11:23:35 +02:00
Daniele Bariletti 1c088f9e50 Merge branch 'MoreBezier' 2024-07-15 17:30:42 +02:00
Daniele Bariletti 88bbc2580b Merge branch 'master' into MoreBezier 2024-07-15 17:08:12 +02:00
SaraP 2468e5c1c5 Include:
- aggiunto prototipo.
2024-07-15 10:25:16 +02:00
Riccardo Elitropi af000e7c37 EgtInclude :
- modifica parametri per funzione CalcPocketing.
2024-07-12 17:35:15 +02:00
Daniele Bariletti 9464b52c0b Merge branch 'master' into MoreBezier 2024-07-12 12:09:29 +02:00
Dario Sassi 6534f7bc32 Include :
- modifica estetica.
2024-07-12 08:46:27 +02:00
Riccardo Elitropi 5ba17dda50 Include :
- aggiornamento prototipi.
2024-07-10 12:32:43 +02:00
Daniele Bariletti 64e225c11c Merge branch 'master' into MoreBezier 2024-07-10 08:53:51 +02:00
Dario Sassi 26869b633d Include :
- aggiornamento prototipi.
2024-07-09 16:49:17 +02:00
Daniele Bariletti fef9dd4ae5 Include :
- aggiornamento modalità per le superfici rigate con le bezier.
2024-07-09 15:53:36 +02:00
SaraP 1c6d7ed4ff Include :
- aggiunti prototipi.
2024-07-09 10:25:09 +02:00
SaraP dec545da2e Include :
- aggiunto prototipo.
2024-07-05 15:08:41 +02:00
Daniele Bariletti c4241bfb88 Merge branch 'master' into MoreBezier 2024-07-03 10:34:31 +02:00
Dario Sassi 77b84fdd17 Include :
- aggiornamento prototipi.
2024-07-01 12:45:27 +02:00
Dario Sassi 9a8be81fd6 Include :
- aggiornamento mensile codici protezione librerie.
2024-07-01 10:45:50 +02:00
Dario Sassi e148024db1 Include :
- aggiornamento prototipi.
2024-06-29 18:42:26 +02:00
Dario Sassi 4ede19d2ee Include :
- a Vector3d aggiunta funzione inline GetRotate.
2024-06-27 12:53:17 +02:00
Dario Sassi b4ee9e2b42 Include :
- aggiornamento prototipi.
2024-06-26 17:38:10 +02:00
Dario Sassi 5644f837ed Include :
- aggiornamento prototipi.
2024-06-26 08:41:10 +02:00
Dario Sassi d731ea7164 Merge branch 'master' of https://gitlab.steamware.net/egaltech/include 2024-06-25 19:13:08 +02:00
Riccardo Elitropi ca4eb9f166 Include :
- modifica prototipo funzione CalcPocketing.
2024-06-25 13:27:38 +02:00
Dario Sassi 29bc318eaa Merge remote-tracking branch 'origin/Shell&Parts' 2024-06-24 16:28:29 +02:00
Daniele Bariletti fda893f8e2 Merge branch 'master' into MoreBezier 2024-06-19 10:11:07 +02:00
Dario Sassi 675c09e36b Include :
- aggiornamento prototipi.
2024-06-18 07:33:33 +02:00
Dario Sassi e5873f66ce Include :
- aggiornamento prototipi.
2024-06-17 07:10:50 +02:00
Riccardo Elitropi d2880b5167 Include :
- aggiunta funzioni in GeoObjSave.
2024-06-14 16:49:09 +02:00
Dario Sassi a933bea836 Include :
- aggiornamento prototipi.
2024-06-13 07:58:47 +02:00
Dario Sassi 9dbb6fac60 Include :
- aggiornamento prototipi.
2024-06-11 09:32:30 +02:00
Dario Sassi d3c44f2241 Include :
- negli oggetti HashGridsNd vietati costruttore di copia e assegnazione con copia di default.
2024-06-07 19:04:05 +02:00
Daniele Bariletti e6f0be1896 Merge branch 'master' into MoreBezier 2024-06-06 09:23:23 +02:00
Dario Sassi 5d2497bc9c Include :
- aggiornamento costanti di lavorazione.
2024-06-05 17:15:47 +02:00
Daniele Bariletti b4c5b74e8a Merge branch 'master' into MoreBezier 2024-06-04 09:58:20 +02:00
Dario Sassi 38b0309079 Include :
- aggiornamento parametri.
2024-06-03 09:09:30 +02:00
Dario Sassi 60f71c0601 Include :
- aggiornamento prototipi
- aggiornamento codice mensile di protezione librerie.
2024-06-03 08:08:36 +02:00
Daniele Bariletti b3f6bd148a Include :
- corretto un enum.
2024-05-30 16:51:58 +02:00
Dario Sassi 3ded442847 Include :
- aggiornamento prototipi.
2024-05-30 15:20:45 +02:00
Dario Sassi 756f13e6d7 Include :
- rese pubbliche costanti di tipo per calcolo svuotature.
2024-05-30 08:45:10 +02:00
Dario Sassi 127fbb4be6 Include :
- aggiornamento prototipi.
2024-05-29 18:55:46 +02:00
Daniele Bariletti f72ee830ff Include :
- aggiunte le funzioni per creare una rigata ( ruled ) come superficie Bezier.
- aggiunto l'enum per i tipi di rigata.
2024-05-28 16:21:26 +02:00
Riccardo Elitropi c40a9a64c0 Include :
- Aggiornamento prototipi.
2024-05-28 11:02:53 +02:00
Riccardo Elitropi 196e037ace Include :
- modifica classe DistPointSurfTm
2024-05-27 09:23:54 +02:00
Dario Sassi a6ccda3670 Include :
- aggiornamento prototipi.
2024-05-27 07:52:13 +02:00
Dario Sassi a19e0e63a5 Include :
- aggiunte costanti per sgrossatura superfici.
2024-05-24 19:00:33 +02:00
Daniele Bariletti fa91c10973 Include :
- cambiato il nome ad una funzione.
2024-05-24 12:12:19 +02:00
Dario Sassi ad970a39f5 Include :
- aggiornamento costanti per lavorazione 5 assi.
2024-05-23 11:47:28 +02:00
Dario Sassi 3d7308fbd3 Merge remote-tracking branch 'origin/master' 2024-05-23 11:37:49 +02:00
Daniele Bariletti 85e69405f1 Merge branch 'master' into MoreBezier 2024-05-23 09:59:12 +02:00
Daniele Bariletti f4bb934999 Include :
- piccola correzione.
2024-05-23 09:58:05 +02:00
Daniele Bariletti 129bff73f0 Include :
- cambiato nome alla funzione per mostrare i punti di controllo di una curva di Bezier.
2024-05-23 09:40:24 +02:00
Daniele Bariletti 43eb33cf34 Merge remote-tracking branch 'origin/SetSmoothAngle' 2024-05-23 09:32:48 +02:00
Daniele Bariletti 88a4a91835 Include :
- aggiunta la funzione per ridurre di grado una curva Bezier.
2024-05-22 12:15:35 +02:00
Daniele Bariletti a78f73f1f1 Include :
- aggiunta la funzione per creare una surf bezier da rivoluzione ( revolve)
2024-05-22 10:38:41 +02:00
Dario Sassi 90d548b69d Include :
- aggiunta DistPointline.
2024-05-22 08:17:30 +02:00
Daniele Bariletti 37768dc318 Merge branch 'master' into MoreBezier 2024-05-21 15:49:47 +02:00
Daniele Bariletti 82e86fcdee Include :
- aggiunta la funzione di screwing con superfci di Bezier.
2024-05-21 15:40:05 +02:00
Daniele Bariletti bdd2f34184 Include :
- aggiunte le funzioni per Bezier da FlatContour, da Region, da Extrusion e da Screwing.
2024-05-13 10:32:02 +02:00
Daniele Bariletti 987a84181d Include :
- spostata la funzione CalcRegionPolyLines.
2024-05-13 10:29:48 +02:00
Daniele Bariletti 9617f36230 Include :
- gestione del grado e della razionalità delle curve convertite in Bezier.
2024-05-13 10:28:20 +02:00
Daniele Bariletti 14fe1a913a Include :
- aggiunte le funziondi di SurfBez da estrusione e da FlatContour.
2024-05-09 15:11:59 +02:00
Daniele Bariletti f1ce998815 Include :
- aggiunta funzione MakeRational per le curve di Bezier
- aggiunta funzione di conversione da ICurve a curva di Bezier semplice o composta.
2024-05-08 17:50:46 +02:00
Daniele Bariletti c3d3c1e0bc Merge branch 'master' into MoreBezier 2024-05-08 08:52:35 +02:00
Daniele Bariletti ad87ee5da8 Include :
- aggiunte le chiamate per le funzioni di creazioni di superfici Bezier da curve.
2024-05-07 17:38:32 +02:00
Daniele Bariletti 079e9e027a Include :
- aggiunte le funzioni per proiettare curve su una superficie di Bezier.
2024-05-07 14:51:49 +02:00
Daniele Bariletti 88fa15f216 Merge branch 'master' into MoreBezier 2024-05-07 10:32:35 +02:00
54 changed files with 1175 additions and 251 deletions
+57
View File
@@ -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
+4 -1
View File
@@ -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} ;
+1
View File
@@ -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) ;
}
+38
View File
@@ -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) ;
}
+38
View File
@@ -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) ;
}
+42
View File
@@ -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) ;
+12 -2
View File
@@ -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 ;
} ;
//-----------------------------------------------------------------------------
+48 -2
View File
@@ -25,7 +25,53 @@
#endif
//-----------------------------------------------------------------------------
EGK_EXPORT bool CalcPocketing( const ISurfFlatRegion* pSfr, double dRad, double dStep, double dAngle, int nType,
bool bSmooth, ICRVCOMPOPOVECTOR& vCrv) ;
EGK_EXPORT bool CalcPocketing( const ISurfFlatRegion* pSfr, double dRad, double dRadOffs, double dStep,
double dAngle, double dOpenMinSafe, int nType, bool bSmooth, bool bInvert, bool bAvoidOpt,
bool bAllowZigZagOneWayBorders, bool bCalcFeed, const Point3d& ptEndPrec, const ISurfFlatRegion* pSfrLimit,
bool bAllOffs, ICRVCOMPOPOVECTOR& vCrv) ;
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
} ;
// 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,
} ;
// 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
} ;
+41 -7
View File
@@ -48,19 +48,39 @@ struct CNurbsData
//----------------------------------------------------------------------------
//! Trasforma una linea in una nuova curva di Bezier semplice
EGK_EXPORT ICurveBezier* LineToBezierCurve( const ICurveLine* pLine) ;
EGK_EXPORT ICurve* CurveToBezierCurve( const ICurve* pCrv, int nDeg = 3, bool bMakeRatOrNot = true) ;
//----------------------------------------------------------------------------
//! Trasforma una linea in una nuova curva di Bezier semplice
EGK_EXPORT ICurveBezier* LineToBezierCurve( const ICurveLine* pLine, int nDeg = 3, bool bMakeRatOrNot = true) ;
//----------------------------------------------------------------------------
//! Trasforma un arco in una nuova curva di Bezier semplice o composta
EGK_EXPORT ICurve* ArcToBezierCurve( const ICurve* pArc, bool bDeg3OrDeg2 = true) ;
EGK_EXPORT ICurve* ArcToBezierCurve( const ICurve* 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* pCrvCompo) ;
EGK_EXPORT ICurve* CompositeToBezierCurve( const ICurveComposite* pCrvCompo, int nDeg = 3, bool bMakeRatOrNot = true) ;
//----------------------------------------------------------------------------
//! Trasforma una curva bezier in una nuova curva di Bezier semplice o composta di grado 2 e razionale
EGK_EXPORT ICurve* BezierToBasicBezierCurve( const ICurveBezier* pCrvBezier) ;
//! 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* pCrvBezier, int nDeg = 3, bool bMakeRatOrNot = true, double dTol = 10 * EPS_SMALL) ;
//----------------------------------------------------------------------------
//! Approssima una bezier con una serie di bezier cubiche
EGK_EXPORT ICurve* ApproxBezierWithCubics( const ICurveBezier* pCrvBezier, double dTol) ;
//----------------------------------------------------------------------------
//! Approssima una bezier con una serie di bezier cubiche
EGK_EXPORT ICurveBezier* ApproxArcCurveBezierWithSingleCubic( const ICurveBezier* pCrvBezier, const Point3d& ptCen) ;
//----------------------------------------------------------------------------
//! Campiona una serie di punti dalla curva e li approssima con una o più curve di bezier
EGK_EXPORT ICurve* ApproxCurveWithBezier( const ICurve*, double dTol) ;
//----------------------------------------------------------------------------
//! Interpola un set di punti e li approssima con una o più curve di bezier cubiche
EGK_EXPORT ICurve* InterpolatePointSetWithBezier( const PNTVECTOR& vPnt, double dTol) ;
//----------------------------------------------------------------------------
//! Aumento il grado della curva di Bezier
@@ -70,6 +90,10 @@ 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 CalcBezierApproxError( const ICurveBezier* pCrvOri, const ICurveBezier* pCrvNew, double& dErr, int nPoints = 20) ;
//----------------------------------------------------------------------------
//! Trasforma una curva in una nuova curva semplice o composta senza archi (solo linee o curve di Bezier)
EGK_EXPORT ICurve* CurveToNoArcsCurve( const ICurve* pCrv) ;
@@ -102,21 +126,31 @@ 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) ;
//----------------------------------------------------------------------------
//! 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) ;
//----------------------------------------------------------------------------
//! Resetta l'oggetto voronoi associato alla curva liberandone la memoria
EGK_EXPORT void ResetCurveVoronoi( const ICurve& crvC) ;
+5
View File
@@ -28,6 +28,7 @@ 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 ;
@@ -37,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 ;
} ;
//-----------------------------------------------------------------------------
+2
View File
@@ -110,6 +110,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 -3
View File
@@ -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.
//
//
@@ -68,7 +68,6 @@ class DistPointCurve
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) ;
+65
View File
@@ -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 ;
} ;
+72
View File
@@ -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) ;}
+6 -2
View File
@@ -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
{
@@ -47,7 +48,9 @@ class DistPointSurfTm
EGK_EXPORT bool GetMinDistPoint( Point3d& ptMinDistPoint) const ;
EGK_EXPORT bool GetMinDistTriaIndex( int& nMinDistTriaIndex) 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) ;
@@ -57,6 +60,7 @@ class DistPointSurfTm
Point3d m_ptMinDistPoint ;
int m_nMinDistTriaIndex ;
bool m_bIsInside ;
bool m_bIsSurfClosed ;
} ;
//----------------------------------------------------------------------------
+12 -1
View File
@@ -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) ;
+2 -1
View File
@@ -58,7 +58,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
View File
@@ -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
View File
@@ -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 ;
+12
View File
@@ -70,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
+180 -2
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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) ;
+6 -2
View File
@@ -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 ;
} ;
+30 -3
View File
@@ -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) ;
}
//----------------------------------------------------------------------------
+2
View File
@@ -113,6 +113,7 @@ class PolyLine
EGK_EXPORT bool MakeConvex( const Vector3d& vtN, bool bLeftSide) ;
EGK_EXPORT bool Invert( bool bInvertU = true) ;
EGK_EXPORT bool Flatten( double dZ = 0) ;
EGK_EXPORT bool FlattenInAutoPlane( double dToler = 10 * EPS_SMALL) ;
EGK_EXPORT bool GetConvexHullXY( PNTVECTOR& vConvHull) const ;
EGK_EXPORT bool GetMinAreaRectangleXY( Point3d& ptCen, Vector3d& vtAx, double& dLen, double& dHeight) const ;
EGK_EXPORT bool Trim( const Plane3d& plPlane, bool bInVsOut = true) ;
@@ -126,6 +127,7 @@ class PolyLine
bool MyChangeStart( int nPos) ;
bool MyApproxOnSide( const Vector3d& vtN, bool bLeftSide, double dToler = EPS_SMALL) ;
bool MyMakeConvex( const Vector3d& vtN, bool bLeftSide) ;
bool MyRemoveSamePoints( double dToler = EPS_SMALL) ;
private :
int m_nRejected ; // numero punti rifiutati perchè coincidenti
@@ -15,7 +15,7 @@
#include "/EgtDev/Include/EGkGeoPoint3d.h"
#include "/EgtDev/Include/EGkCurve.h"
#include "/EgtDev/Include/EGkSurfTriMesh.h"
#include "/EgtDev/Include/EGkSurf.h"
//----------------------- Macro per import/export ----------------------------
#undef EGK_EXPORT
@@ -29,25 +29,28 @@
// Definizione di Punto 5assi e sue raccolte
struct Point5ax {
Point3d ptP ;
Vector3d vtDir ;
Vector3d vtDir1 ;
Vector3d vtDir2 ;
double dPar ;
int nFlag ;
Point5ax( void) : ptP(), vtDir(), vtDir2(), dPar(), nFlag() {} ;
Point5ax( void) : ptP(), vtDir1(), vtDir2(), dPar(), nFlag() {} ;
Point5ax( const Point3d& ptBase, const Vector3d& vtTool, double dU, int nData)
: ptP( ptBase), vtDir( vtTool), vtDir2(), dPar( dU), nFlag( nData) {} ;
: ptP( ptBase), vtDir1( vtTool), vtDir2(), dPar( dU), nFlag( nData) {} ;
Point5ax( const Point3d& ptBase, const Vector3d& vtTool, const Vector3d& vtTool2, double dU, int nData)
: ptP( ptBase), vtDir( vtTool), vtDir2( vtTool2), dPar( dU), nFlag( nData) {} ;
: ptP( ptBase), vtDir1( vtTool), vtDir2( vtTool2), 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) ;
EGK_EXPORT bool ProjectCurveOnSurfTm( const ICurve& crCrv, const ISurfTriMesh& tmSurf, const IGeoPoint3d& gpRef,
double dLinTol, double dMaxSegmLen, PNT5AXVECTOR& vPt5ax) ;
EGK_EXPORT bool ProjectCurveOnSurfTm( const ICurve& crCrv, const ISurfTriMesh& tmSurf, const ICurve& crRef,
double dLinTol, double dMaxSegmLen, PNT5AXVECTOR& vPt5ax) ;
EGK_EXPORT bool ProjectCurveOnSurfTm( const ICurve& crCrv, const ISurfTriMesh& tmSurf, const ISurfTriMesh& tmRef,
double dLinTol, double dMaxSegmLen, PNT5AXVECTOR& vPt5ax) ;
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const ISurf& sfSurf, const Vector3d& vtDir,
double dLinTol, double dMaxSegmLen, bool bSharpEdges, PNT5AXVECTOR& vPt5ax) ;
// Proiezione di una curva su una superficie TriMesh in direzione del punto
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const ISurf& sfSurf, const IGeoPoint3d& gpRef,
double dLinTol, double dMaxSegmLen, bool bSharpEdges, PNT5AXVECTOR& vPt5ax) ;
// Proiezione di una curva su una superficie TriMesh in direzione della curva
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const ISurf& sfSurf, const ICurve& crRef,
double dLinTol, double dMaxSegmLen, bool bSharpEdges, PNT5AXVECTOR& vPt5ax) ;
// Proiezione di una curva su una superficie TriMesh in direzione della superficie
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const ISurf& sfSurf, const ISurf& sfRef,
double dLinTol, double dMaxSegmLen, bool bSharpEdges, PNT5AXVECTOR& vPt5ax) ;
-37
View File
@@ -1,37 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2024
//----------------------------------------------------------------------------
// File : EGkProjectCurveSurfTm.h Data : 07.05.24 Versione : 2.6e3
// Contenuto : Dichiarazione funzioni proiezione curve su superficie Bezier.
//
//
//
// Modifiche : 07.05.24 DB Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkGeoPoint3d.h"
#include "/EgtDev/Include/EGkCurve.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
//----------------------------------------------------------------------------
// Proiezione di una curva su una superficie TriMesh lungo la direzione data.
EGK_EXPORT bool ProjectCurveOnSurfBez( const ICurve& crCrv, const ISurfBezier& surfBez, const Vector3d& vtDir,
double dLinTol, double dMaxSegmLen, PNT5AXVECTOR& vPt5ax) ;
EGK_EXPORT bool ProjectCurveOnSurfBez( const ICurve& crCrv, const ISurfBezier& surfBez, const IGeoPoint3d& gpRef,
double dLinTol, double dMaxSegmLen, PNT5AXVECTOR& vPt5ax) ;
EGK_EXPORT bool ProjectCurveOnSurfBez( const ICurve& crCrv, const ISurfBezier& surfBez, const ICurve& crRef,
double dLinTol, double dMaxSegmLen, PNT5AXVECTOR& vPt5ax) ;
EGK_EXPORT bool ProjectCurveOnSurfBez( const ICurve& crCrv, const ISurfBezier& surfBez, const ISurfTriMesh& tmRef,
double dLinTol, double dMaxSegmLen, PNT5AXVECTOR& vPt5ax) ;
+49
View File
@@ -0,0 +1,49 @@
//----------------------------------------------------------------------------
// 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* 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) ;
+1 -1
View File
@@ -24,4 +24,4 @@
#endif
//----------------------------------------------------------------------------
EGK_EXPORT ISurfBezier* CreateBezierSphere( const Point3d& ptCenter, double dR) ;
EGK_EXPORT ISurfBezier* GetSurfBezierSphere( const Point3d& ptCenter, double dR) ;
+2
View File
@@ -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) ; }
} ;
//----------------------------------------------------------------------------
+2
View File
@@ -35,6 +35,8 @@ EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromFatCurve( ICurve* pCrv, double
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
+6 -3
View File
@@ -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) ;
+19 -1
View File
@@ -28,7 +28,16 @@ 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 : // IGeoObj
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 :
virtual bool CopyFrom( const IGeoObj* pGObjSrc) = 0 ;
@@ -45,6 +54,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,
@@ -59,6 +69,7 @@ class __declspec( novtable) ISurfBezier : public ISurf
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 const ISurfTriMesh* GetAuxSurfRefined( void) const = 0 ;
virtual ISurfTriMesh* GetApproxSurf( double dTol, double dSideMin = 100 * EPS_SMALL) const = 0 ;
virtual bool GetLeaves ( std::vector<std::tuple<int, Point3d, Point3d>>& vLeaves) const = 0 ;
virtual bool GetTriangles2D( std::vector<std::tuple<int,Point3d, Point3d, Point3d>>& vTria2D) const = 0 ;
@@ -73,6 +84,13 @@ class __declspec( novtable) ISurfBezier : public ISurf
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 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, bool bDeg3OrDeg2 = false) = 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 ;
} ;
//-----------------------------------------------------------------------------
+23 -11
View File
@@ -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,30 @@ 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 ; // compare only outsides
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 ;
} ;
//-----------------------------------------------------------------------------
+11 -3
View File
@@ -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 ;
@@ -123,7 +124,14 @@ class __declspec( novtable) ISurfTriMesh : public ISurf
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 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 SetTFlag( int nId, int nTFlag) = 0 ;
+7
View File
@@ -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 };
+11
View File
@@ -441,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
//----------------------------------------------------------------------------
+85 -17
View File
@@ -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 ;
@@ -462,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 ;
}
@@ -483,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 ;
}
@@ -511,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 ;
}
}
@@ -536,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 ;
}
}
@@ -560,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 ;
}
+55 -64
View File
@@ -15,8 +15,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 +125,16 @@ 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, bool& bVal)
{ int nTmp ;
@@ -146,94 +144,87 @@ 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) ;
EGN_EXPORT bool FromString( const std::string& sVal, STRVECTOR& vsVal) ;
//----------------------------------------------------------------------------
EGN_EXPORT const std::string ToStringAdv( int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr) ;
inline const std::string
ToString( 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 = _itoa_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
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 ;
// gestione codice di errore
if ( pnErr != nullptr)
*pnErr = 0 ;
return szBuff ;
}
EGN_EXPORT const std::string ToStringAdv( unsigned int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr) ;
inline const std::string
ToString( unsigned int nVal, int nPrec = 1, int nRadix = 10)
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
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
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 ;
// 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)
+6
View File
@@ -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,
+28 -8
View File
@@ -116,7 +116,9 @@ 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, int nFlag) ;
@@ -413,7 +415,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) ;
@@ -447,6 +449,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) ;
@@ -551,6 +554,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) ;
@@ -574,6 +578,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) ;
@@ -589,6 +596,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) ;
@@ -598,6 +607,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) ;
@@ -795,7 +805,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) ;
@@ -803,7 +816,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) ;
@@ -927,7 +942,8 @@ EIN_EXPORT BOOL __stdcall EgtApplyMachining( BOOL bRecalc) ;
EIN_EXPORT BOOL __stdcall EgtUpdateMachining( void) ;
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) ;
@@ -959,8 +975,14 @@ 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
@@ -979,10 +1001,6 @@ EIN_EXPORT BOOL __stdcall EgtVerifyOutstroke( double dX, double dY, double dZ, d
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) ;
@@ -992,7 +1010,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]) ;
@@ -1057,6 +1075,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) ;
+2
View File
@@ -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)
+13 -2
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2024
//----------------------------------------------------------------------------
// File : EMkMachMgr.h Data : 22.04.24 Versione : 2.6d4
// File : EMkMachMgr.h Data : 25.11.24 Versione : 2.6k5
// Contenuto : Dichiarazione della interfaccia IMachMgr.
//
//
@@ -18,6 +18,7 @@
// 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.
//
//----------------------------------------------------------------------------
@@ -117,6 +118,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 ;
@@ -125,7 +129,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 ;
@@ -240,6 +246,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 ;
@@ -259,12 +266,14 @@ class __declspec( novtable) IMachMgr
virtual bool MachiningUpdate( bool bPostApply = true) = 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 GetMachiningSkippedGeometry( SELVECTOR& vIds) const = 0 ;
virtual bool IsMachiningEmpty( void) const = 0 ;
virtual bool GetMachiningStartPoint( Point3d& ptStart) const = 0 ;
virtual bool GetMachiningEndPoint( Point3d& ptEnd) const = 0 ;
@@ -272,6 +281,7 @@ class __declspec( novtable) IMachMgr
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 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 ;
// Simulation
@@ -327,6 +337,7 @@ class __declspec( novtable) IMachMgr
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 ;
+33 -9
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2024
// EgalTech 2015-2025
//----------------------------------------------------------------------------
// File : EmkMachiningConst.h Data : 29.03.24 Versione : 2.6di1
// File : EmkMachiningConst.h Data : 20.01.25 Versione : 2.7a1
// Contenuto : Costanti delle lavorazioni.
//
//
@@ -14,6 +14,8 @@
// 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.
//
//----------------------------------------------------------------------------
@@ -66,7 +68,7 @@ enum MachiningType {
MT_SURFROUGHING = OPER_SURFROUGHING,
MT_SURFFINISHING = OPER_SURFFINISHING,
MT_WATERJETTING = OPER_WATERJETTING,
MT_5AXMACHINING = OPER_5AXMACHINING
MT_FIVEAXISMILLING = OPER_FIVEAXISMILLING
} ;
//----------------------------------------------------------------------------
@@ -156,6 +158,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),
@@ -324,7 +327,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,
@@ -363,20 +368,38 @@ enum { MORTISE_PLUNGE_STEP = 0,
MORTISE_PLUNGE_START_END = 3,
MORTISE_PLUNGE_START_TO_END = 4} ;
//----------------------------------------------------------------------------
// 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
// Sottotipo di lavorazione
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} ;
// 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,
@@ -395,7 +418,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,
+8 -2
View File
@@ -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,6 +26,8 @@ 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" ;
@@ -39,8 +41,10 @@ static std::string MCH_PATH = "P" ;
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" ;
@@ -108,6 +112,8 @@ 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 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" ;
+18 -18
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2023
// EgalTech 2015-2024
//----------------------------------------------------------------------------
// File : EmkOperationConst.h Data : 06.09.23 Versione : 2.5i1
// File : EmkOperationConst.h Data : 22.05.24 Versione : 2.6e5
// Contenuto : Costanti delle operazioni.
//
//
@@ -19,21 +19,21 @@
#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
// Controllo tipo valido
bool inline IsValidDispositionType( int nType)
{
@@ -53,5 +53,5 @@ bool inline IsValidMachiningType( int nType)
nType == OPER_SURFROUGHING ||
nType == OPER_SURFFINISHING ||
nType == OPER_WATERJETTING ||
nType == OPER_5AXMACHINING) ;
nType == OPER_FIVEAXISMILLING) ;
}
+7
View File
@@ -122,3 +122,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
+5 -2
View File
@@ -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,
+72 -16
View File
@@ -124,7 +124,9 @@ 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, int nFlag = 0) ;
@@ -323,7 +325,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) ;
EXE_EXPORT int ExeCreateCurveBezierForm( int nParentId, int nCrvId) ;
EXE_EXPORT int ExeCreateCurveBezierForm( int nParentId, int nCrvId, int nDeg) ;
// GeomDB Create Surf
EXE_EXPORT int ExeCreateSurfFlatRegion( int nParentId, const INTVECTOR& vCrvIds, int* pnCount) ;
@@ -333,6 +335,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) ;
@@ -346,8 +349,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,
@@ -374,6 +382,23 @@ EXE_EXPORT int ExeCreateSurfBezierRational( int nParentId, int nDegU, int nDegV
EXE_EXPORT int ExeCreateSurfBezierLeaves( int nParentId, int nSurfBzId, int nTextHeight = 50, bool bShowTrim = 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) ;
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 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,
@@ -443,6 +468,8 @@ 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) ;
@@ -474,7 +501,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) ;
@@ -518,6 +545,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) ;
@@ -605,19 +633,21 @@ 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 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) ;
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 bool ExeProjectCurveOnSurfTmExt( int nCurveId, int nSurfTmId, int nGuideId, int nDestGrpId,
double dLinTol, double dMaxSegmLen, bool bDirFromGuide) ;
EXE_EXPORT bool ExeProjectCurveOnSurfBz( int nCurveId, int nSurfBzId, const Vector3d& vtDir, int nDestGrpId,
double dLinTol, double dMaxSegmLen, int nRefType) ;
EXE_EXPORT bool ExeProjectCurveOnSurfBzExt( int nCurveId, int nSurfBzId, int nGuideId, int nDestGrpId,
double dLinTol, double dMaxSegmLen, bool bDirFromGuide) ;
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 ExeProjectCurveOnSurf( int nCurveId, int nSurfTmId, const Vector3d& vtProj, int nDestGrpId,
double dLinTol, double dMaxSegmLen, bool bDirFromProj, int nRefType) ;
EXE_EXPORT bool ExeProjectCurveOnSurfExt( int nCurveId, int nSurfTmId, int nGuideId, int nDestGrpId,
double dLinTol, double dMaxSegmLen, bool bDirFromGuide) ;
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) ;
@@ -628,6 +658,7 @@ 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) ;
@@ -695,6 +726,7 @@ EXE_EXPORT int ExeSurfFrGetZigZagInfill( int nId, int nDestGrpId, double dStep,
// 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) ;
@@ -705,6 +737,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) ;
@@ -721,7 +754,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 ExeShowBezierCurveControlPoints( int nCrvId, int* pnCount) ;
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) ;
@@ -729,9 +766,11 @@ 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 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) ;
@@ -739,6 +778,7 @@ EXE_EXPORT int ExeSurfTmFacetCount( int nId) ;
EXE_EXPORT int ExeSurfTmPartCount( int nId) ;
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,
@@ -757,6 +797,8 @@ 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 ExeCopySurfTmFacet( int nId, int nFacet, int nDestGrpId) ;
EXE_EXPORT bool ExeSurfTmGetAllVertInFacet( int nId, int nFacet, INTVECTOR& vVert) ;
@@ -777,6 +819,7 @@ EXE_EXPORT bool ExeSurfBezierGetInfo( int nSurfId, int& nDegU, int& nDegV, int&
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) ;
@@ -1037,6 +1080,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) ;
@@ -1045,7 +1091,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) ;
@@ -1077,6 +1125,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) ;
@@ -1158,6 +1207,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) ;
@@ -1175,12 +1225,14 @@ EXE_EXPORT bool ExeApplyMachining( bool bRecalc, bool bPostApply = true) ;
EXE_EXPORT bool ExeUpdateMachining( bool bPostApply = true) ;
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 ExeGetMachiningSkippedGeometry( SELVECTOR& vIds) ;
EXE_EXPORT bool ExeIsMachiningEmpty( void) ;
EXE_EXPORT bool ExeGetMachiningStartPoint( Point3d& ptStart) ;
EXE_EXPORT bool ExeGetMachiningEndPoint( Point3d& ptEnd) ;
@@ -1192,6 +1244,7 @@ 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 ExeGetClEntAxesStatus( int nEntId, int& nStatus) ;
EXE_EXPORT bool ExeGetClEntAxesMask( int nEntId, int& nMask) ;
EXE_EXPORT bool ExeGetClEntAxesVal( int nEntId, DBLVECTOR& vAxes) ;
@@ -1221,6 +1274,7 @@ 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) ;
@@ -1270,7 +1324,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) ;
@@ -1338,6 +1392,8 @@ 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 ExeSetCameraType( bool bOrthoOrPersp, bool bRedraw) ;
EXE_EXPORT bool ExeSetZoomType( int nMode, bool bRedraw) ;
// Image
EXE_EXPORT bool ExeGetImagePixels( const std::string& sFile, int& nPixelX, int& nPixelY) ;
+3 -3
View File
@@ -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) ;
+4 -3
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2024
// EgalTech 2015-2025
//----------------------------------------------------------------------------
// File : EgtKeyCodes.h Data : 16.01.24 Versione : 2.6a1
// File : EgtKeyCodes.h Data : 04.03.25 Versione : 2.7a3
// Contenuto : Costanti per codici di protezione librerie di base.
//
//
@@ -18,6 +18,7 @@
// 01.01.22 DS Passaggio a versione 24.
// 01.01.23 DS Passaggio a versione 25.
// 16.01.24 DS Passaggio a versione 26.
// 07.01.25 DS Passaggio a versione 27.
//
//----------------------------------------------------------------------------
@@ -25,7 +26,7 @@
//----------------------------------------------------------------------------
const int KEY_BASELIB_PROD = 207 ;
const int KEY_BASELIB_VER = 2605 ;
const int KEY_BASELIB_VER = 2704 ;
const int KEY_BASELIB_LEV = 1 ;
//----------------------------------------------------------------------------