Compare commits

...

316 Commits

Author SHA1 Message Date
andrea.villa a53a6f3e63 Modificato limite dimensione tasca per utilizzo lama come SideGroove 2024-11-04 15:18:45 +01:00
luca.mazzoleni dbf17d942c Merge branch 'release/2.6j1' 2024-10-29 09:16:33 +01:00
luca.mazzoleni 72020a8874 update version e log 2024-10-29 09:16:24 +01:00
luca.mazzoleni 5d422b6edc - in NestProcess corretta rotazione in caso di flip deciso da nesting 2024-10-29 09:10:57 +01:00
luca.mazzoleni abc61f53ba - in nesting e flipRotate correzioni a rotazione pezzi 2024-10-16 17:01:45 +02:00
luca.mazzoleni 32fdaf5096 Merge tag '2.6i2' into develop
release
2024-09-30 12:29:49 +02:00
luca.mazzoleni 2ea09e3ebc Merge branch 'release/2.6i2' 2024-09-30 12:29:34 +02:00
luca.mazzoleni ce8072ad1b update version e log 2024-09-30 12:29:23 +02:00
luca.mazzoleni 88fd8d525c Merge branch 'master' into develop 2024-09-25 12:34:57 +02:00
luca.mazzoleni 01c5037d77 update version e log 2024-09-25 12:33:03 +02:00
luca.mazzoleni 34e7befc10 Merge remote-tracking branch 'origin/master' into develop 2024-09-10 15:13:35 +02:00
Emmanuele Sassi 846d96b967 - correzione in lettura array per cambio dll di lettura 2024-09-10 09:09:51 +02:00
luca.mazzoleni cfd3379c98 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataWall into develop 2024-09-02 10:52:47 +02:00
andrea.villa 6f06755539 Aggiunta nota altezza sottopezzo, per pareti a layer 2024-08-30 09:13:33 +02:00
andrea.villa a0af959c9f Merge remote-tracking branch 'origin/master' into develop 2024-08-30 09:13:20 +02:00
luca.mazzoleni f397b66e26 Merge branch 'master' into develop 2024-08-28 10:12:53 +02:00
luca.mazzoleni 31782b904e Merge commit '93fe741f8439bf0abf51c0ab2e086e07fc77a58d' 2024-08-28 10:11:38 +02:00
luca.mazzoleni 93fe741f84 update log e version 2024-08-28 10:11:26 +02:00
luca.mazzoleni ba2158a909 - in FreeContour corretto caso in cui si chiedevano informazioni sulla faccia non presenti 2024-08-28 10:09:40 +02:00
Dario Sassi 6e0758218c Aggiunto controllo licenza/chiave per abilitazione generazione PartProgram. 2024-08-21 11:52:59 +02:00
luca.mazzoleni 401108ce56 Merge branch 'master' into develop 2024-08-20 16:53:05 +02:00
luca.mazzoleni b7973541e4 update log 2024-08-20 16:52:11 +02:00
Dario Sassi bf1e9065ae Wall 2.6h1 :
- aggiunti nuovi parametri alla chiamata della funzione GetChainSawStartAngs da WallData della macchina.
2024-08-20 14:43:45 +02:00
luca.mazzoleni 1faa9e2075 Merge branch 'master' into develop 2024-08-19 16:11:51 +02:00
Dario Sassi ceef5b78f3 Merge commit '66e2bd6e45d6990a8b30ecf39791437618ca85cd' 2024-08-19 15:04:00 +02:00
luca.mazzoleni 66e2bd6e45 - in Collect analisi facce limitata a feature che ne hanno meno di 50 2024-08-09 12:40:59 +02:00
andrea.villa 0508f12673 In ProcessLapJoint, se fresa Side trovata ma non applicabile, si considera come se non trovata 2024-08-09 11:46:43 +02:00
luca.mazzoleni 2bbfe1f3ce Merge branch 'master' into develop 2024-07-19 18:13:35 +02:00
luca.mazzoleni 4a67fdeeff Merge branch 'develop' 2024-07-19 18:13:18 +02:00
luca.mazzoleni 1c86ed925a in BatchProcess e BatchProcessNew bToRecalc forzato se flag 3 o 4 2024-07-19 18:13:07 +02:00
luca.mazzoleni 3f8540b3df Merge tag '2.6g1' into develop
i
2024-07-17 15:51:11 +02:00
luca.mazzoleni c92327641c Merge branch 'release/2.6g1' 2024-07-17 15:50:55 +02:00
luca.mazzoleni 499e49f4f6 - update log e version
- piccola modifica in ProcessDrill
2024-07-17 15:50:41 +02:00
luca.mazzoleni 099e81cbfd - in ProcessDrill aggiunti, se foro verticale passante, riduzione affondamento di 5 mm sostituito con tab.
Attualmente limite dal diametro di 200 mm, da verificare
2024-07-17 11:25:17 +02:00
luca.mazzoleni 0f38de8f58 Merge branch 'DefaultRawNoExtraWidth' into develop 2024-06-27 16:39:42 +02:00
luca.mazzoleni d5e30baf06 - ulteriori correzioni per DEFAULT_RAW_NO_EXTRA_WIDTH 2024-06-27 16:38:45 +02:00
luca.mazzoleni 4531434e79 - correzioni a DEFAULT_RAW_NO_EXTRA_WIDTH 2024-06-27 15:50:24 +02:00
luca.mazzoleni e56074f662 modifiche ulteriori per parametro DEFAULT_RAW_NO_EXTRA_WIDTH 2024-06-27 14:56:37 +02:00
luca.mazzoleni 5866566ebe - in BatchProcess, in caso di DEFAULT_RAW_NO_EXTRA_WIDTH, azzerati eventuali PosX e PosZ in arrivo sul pezzo 2024-06-24 09:57:21 +02:00
luca.mazzoleni c4272d917e Merge tag '2.6f1' into develop
a
2024-06-21 12:23:02 +02:00
luca.mazzoleni 52a10eeb9f Merge branch 'release/2.6f1' 2024-06-21 12:22:51 +02:00
luca.mazzoleni 1d5689c007 update log e versione 2024-06-21 12:22:36 +02:00
luca.mazzoleni f402590534 - in BatchProcess e BatchProcessNew aggiunto DEFAULT_RAW_NO_EXTRA_WIDTH per eliminare il sovramateriale grezzo in vista 2024-06-18 15:17:15 +02:00
luca.mazzoleni b3289195f4 Merge branch 'master' into develop 2024-05-24 15:36:24 +02:00
luca.mazzoleni f0a07554b2 update log 2024-05-24 15:36:15 +02:00
luca.mazzoleni 1ed45a8569 Merge branch 'develop' 2024-05-24 15:33:56 +02:00
luca.mazzoleni 43482f5a6d - in LapJoint se non si trova una lavorazione di tipo side si cerca una pocketing 2024-05-24 15:33:36 +02:00
luca.mazzoleni e66831d223 Merge branch 'develop' 2024-05-24 12:09:05 +02:00
luca.mazzoleni 548bc7bc6c - ora per verificare se la gerenazione è abilitata si controlla il valore NoPartProgram nella sezione Mach del file ini del Cam5; se 0 o non esiste tutto è come prima 2024-05-24 12:08:42 +02:00
luca.mazzoleni 3f7a2c016d Merge tag '2.6e2' into develop
release
2024-05-24 11:21:02 +02:00
luca.mazzoleni 3763338bb3 Merge branch 'release/2.6e2' 2024-05-24 11:20:54 +02:00
luca.mazzoleni 767acf2579 update log e version 2024-05-24 11:20:23 +02:00
luca.mazzoleni 4da70c0d3c - ora se la licenza non è abilitata alla generazione questa fase si salta invece di restituire errore bloccante 2024-05-24 11:17:16 +02:00
luca.mazzoleni d939e07fd3 - piccole correzioni LapJoint e DoubleCut per errori cliente Belga 2024-05-24 10:44:28 +02:00
luca.mazzoleni 67bf77fe19 Merge tag '2.6e1' into develop
release
2024-05-03 12:16:12 +02:00
luca.mazzoleni 384d72eb13 Merge branch 'release/2.6e1' 2024-05-03 12:15:42 +02:00
luca.mazzoleni 22541cfc9b update log e version 2024-05-03 12:15:21 +02:00
luca.mazzoleni 1dac9716e7 Merge branch 'master' into develop 2024-05-03 12:13:11 +02:00
Dario Sassi 68464cf5b1 DataWall :
- correzione per assegnazione a SawCut di flag passante (bIsThrough).
2024-05-03 11:31:53 +02:00
luca.mazzoleni 78bf456326 Merge tag '2.6c3' into develop
release
2024-03-26 18:12:23 +01:00
luca.mazzoleni cb4d597369 Merge branch 'release/2.6c3' 2024-03-26 18:12:00 +01:00
luca.mazzoleni 7bcd159db0 - in processSawCut si ignora verso vettore se taglio passante 2024-03-26 18:11:21 +01:00
luca.mazzoleni abed970b7a Merge remote-tracking branch 'origin/master' into develop 2024-03-26 14:54:34 +01:00
Dario Sassi 96760ac284 DataWall :
- tolte info di debug anche in compilazione automatica su commit.
2024-03-25 09:10:57 +01:00
Dario Sassi 392040f8d6 DataWall 2.6c2 :
- modifica per richiamare le nuove funzioni di Test interferenza solidi superfici nel controllo validità lavorazione pulizia spigoli interni
- in compilazione vengono eliminate le info di degìbug.
2024-03-25 09:08:24 +01:00
luca.mazzoleni 56dc61a9d6 Merge branch 'master' into develop 2024-03-12 14:16:37 +01:00
luca.mazzoleni ea5e62222c Merge branch 'develop' 2024-03-12 14:15:27 +01:00
luca.mazzoleni 3b098e1541 - update yml per rimuovere simboli di debug da compilazione 2024-03-12 14:15:14 +01:00
luca.mazzoleni 354cbe85b9 Merge tag '2.6b2' into develop
2.6b2
2024-02-21 15:23:10 +01:00
luca.mazzoleni 25779abb81 Merge branch 'release/2.6b2' 2024-02-21 15:20:05 +01:00
luca.mazzoleni 1a4baaf1be update log 2024-02-21 15:19:37 +01:00
luca.mazzoleni 20fccb24af correzione a lettura Delta X Y Z da btl 2024-02-21 15:11:08 +01:00
luca.mazzoleni aa94102b28 Merge branch 'master' into develop 2024-02-21 13:15:51 +01:00
Dario Sassi a2d89cd98d DataWall 2.6b2 :
- aggiunta gestione spostamento pannello rispetto a origine da dato BTL di TS3v7.
2024-02-20 19:32:53 +01:00
luca.mazzoleni 6e2e976675 Merge branch 'develop' 2024-02-20 09:20:53 +01:00
luca.mazzoleni db5ae17d63 update log e version 2024-02-20 09:20:30 +01:00
luca.mazzoleni 3e9da2724b In BatchProcess tolleranza su altezza pannello in grezzo portata a 0.1 mm 2024-02-20 09:17:56 +01:00
luca.mazzoleni a1946a4a41 in LapJoint piccola correzione ai casi in cui si utilizza il SIDESTEP 2024-02-20 09:07:55 +01:00
luca.mazzoleni 87cb7480be Merge branch 'master' into develop 2023-12-21 10:46:43 +01:00
luca.mazzoleni 9563735770 Merge branch 'develop' 2023-12-21 10:46:30 +01:00
luca.mazzoleni d1218915f7 update log e versione 2023-12-21 10:45:13 +01:00
luca.mazzoleni 19c7a54aa7 Merge tag '2.5l2' into develop
Finish Release: 2.5l2
2023-12-21 10:38:16 +01:00
luca.mazzoleni 7bbed3cb8a Merge branch 'release/2.5l2' 2023-12-21 10:38:15 +01:00
luca.mazzoleni 25f599a1fa -In FreeContour -> MakeByPocket corretto un bug che provocava la cancellazione della feature dopo averla lavorata 2023-12-21 10:37:10 +01:00
luca.mazzoleni c0970c52ff Merge branch 'master' into develop 2023-12-20 17:58:31 +01:00
luca.mazzoleni 61590f611d corretto problema mancata compilazione (file placeholder in bin non creato) 2023-12-20 17:57:32 +01:00
luca.mazzoleni f8011493f2 Merge tag '2.5l1' into develop
Finish Release: 2.5l1
2023-12-13 17:09:08 +01:00
luca.mazzoleni a76bd31fe4 Merge branch 'release/2.5l1' 2023-12-13 17:09:08 +01:00
luca.mazzoleni 07a80248dc update log e version 2023-12-13 17:07:52 +01:00
luca.mazzoleni 89838c6f28 -In FreeContour -> MakeByPocket aggiunta la possibilità di svuotare tasche passanti
-In FreeContour -> MakeByPocket in tasche speciali cliente 90480029 forzato step unico
2023-12-13 16:57:30 +01:00
luca.mazzoleni 764c80824a modifiche a WallExec, WallLib, FeatureTopology per allineamento Topology con Beam 2023-12-11 11:27:54 +01:00
luca.mazzoleni 37da3ba714 Merge branch 'master' into develop 2023-12-07 16:20:19 +01:00
Dario Sassi a1a74390c0 Merge commit 'c04e97a01dd857fa36fe8918abf2ad73d93d5469' 2023-11-16 18:15:10 +01:00
luca.mazzoleni c04e97a01d Fresature a salire estese a groove cieche 2023-11-16 09:39:33 +01:00
luca.mazzoleni 111c541f8b Merge branch 'release/2.5k1' 2023-11-14 18:58:19 +01:00
luca.mazzoleni 760563e0f8 Merge tag '2.5k1' into develop
Finish Release: 2.5k1
2023-11-14 18:58:19 +01:00
luca.mazzoleni 15c80a8628 update log e versione 2023-11-14 18:54:46 +01:00
luca.mazzoleni 29a2ec8bae aggiunta commenti 2023-11-14 18:50:06 +01:00
luca.mazzoleni e1d58a1d70 Merge branch 'feature/MirroredMachinings' into develop 2023-11-14 18:16:35 +01:00
luca.mazzoleni da7d2a7159 - in WallExec aggiunte al sorting le lavorazioni PreSideMill che vengono sempre fatte prima delle SideMill
- LapJoint -> MakeSideGrooveByMill, se rabbet doppio uno verso l'alto e uno verso il basso, aggiunto step extra iniziale per ripulire la lamina che potrebbe rimanere nella rabbet che guarda in alto.
2023-11-13 18:18:48 +01:00
luca.mazzoleni d1ca35e29d correzione minore in WallExec -> SetMirroredFeatures 2023-11-10 15:11:28 +01:00
luca.mazzoleni e92ba3e740 - In WallExec doppio disattivato se side e la lavorazione mirror è troppo distante dal grezzo. 2023-11-10 11:48:06 +01:00
luca.mazzoleni a84fb0608f - varie modifiche, principalmente a MachiningLib e LapJoint, che migliorano il funzionamento delle tasche, anche in doppio. 2023-11-09 18:17:17 +01:00
luca.mazzoleni f9bb10bf6e - in LapJoint -> FindPocketing le lavorazioni con attacco speciale (rampa molto lunga e step basso) ignorano il flag per escludere le frese che non lavorano di testa. 2023-10-31 18:47:38 +01:00
luca.mazzoleni fea5cfd8ed - In LapJoint -> VerifyPocket, se topologia pocket, forzata ricerca fresa che possa lavorare di testa. 2023-10-31 17:25:20 +01:00
luca.mazzoleni 31172238d8 - In LpJoint -> IsToolDoubleOk permessa una lunghezza inferiore di 5.5mm dell'utensile secondario rispetto al principale 2023-10-31 16:41:10 +01:00
luca.mazzoleni f29816c693 - In LapJoint -> VerifyPocket, per tasche in doppio forzata ricerca fresa che possa lavorare di testa.
- In MachiningLib -> FindPocketing aggiunto parametro per poter escludere le frese che non lavorano di testa.
- In WallExec -> SetMirroredFeatures permesso il doppio per groove con specchiata non sul fianco se settate per essere lavorate come pocket.
2023-10-30 18:22:04 +01:00
luca.mazzoleni 164e0474fa Merge branch 'develop' into feature/MirroredMachinings 2023-10-23 14:57:55 +02:00
luca.mazzoleni 10bfb3273c Merge branch 'release/2.5j3' 2023-10-23 13:18:21 +02:00
luca.mazzoleni 732e6c0390 Merge tag '2.5j3' into develop
Finish Release: 2.5j3
2023-10-23 13:18:21 +02:00
luca.mazzoleni 1ef5ae8f0c update log 2023-10-23 13:18:07 +02:00
luca.mazzoleni 5340c6a92c - update del compile per includere topology 2023-10-19 18:10:45 +02:00
luca.mazzoleni 9edd6aec23 - nella ricerca lavorazione da usare controllo di utensile attivo sostituito con controllo utensile presente nel setup corrente 2023-10-19 09:54:01 +02:00
luca.mazzoleni 7c67b24b37 Merge branch 'develop' into feature/MirroredMachinings 2023-10-19 09:33:14 +02:00
luca.mazzoleni 12bb64bacb Merge remote-tracking branch 'origin/master' into develop 2023-10-19 09:13:47 +02:00
Dario Sassi 35fa519eb3 DataWall 2.5j3 :
- nella ricerca lavorazione da usare controllo di utensile attivo sostituito con controllo utensile presente nel setup corrente
- aggiunta gestione aree vietate per chiodature (LockOut for Nail).
2023-10-18 11:19:37 +02:00
luca.mazzoleni 64ca535056 Merge branch 'develop' into feature/MirroredMachinings 2023-10-16 10:07:19 +02:00
luca.mazzoleni fdd6b7f7bb Merge remote-tracking branch 'origin/master' into develop 2023-10-16 10:07:03 +02:00
Dario Sassi 7c2bc2ec5d DataWall 2.5j2 :
- in FreeContour conversione automatica di facce non fattibili con lama per limiti di orientamento in facce da fare con fresa.
2023-10-12 10:53:11 +02:00
luca.mazzoleni f6286d839a Merge remote-tracking branch 'origin/master' into develop 2023-10-02 14:41:20 +02:00
luca.mazzoleni 3b998e5fba Merge remote-tracking branch 'origin/master' into feature/MirroredMachinings 2023-10-02 14:41:09 +02:00
Dario Sassi 33deb8b5e3 DataWall 2.5l1 :
- in FreeContour correzione a MakeCustomPath per calcolare correttamente puliture spigoli di tipo 2 (Clean 30) e 3 (Gola di Scarico)
- in LapJoint aggiunta segnalazione lavorazione tipo Side non trovata.
2023-10-02 13:24:03 +02:00
luca.mazzoleni 47ec893959 - piccole correzioni bug 2023-09-28 16:36:43 +02:00
luca.mazzoleni 79e97c9e1f - migliorata WallLib -> Is3EdgesApprox 2023-09-28 09:26:38 +02:00
luca.mazzoleni 18ae1a71cc Merge branch 'develop' into feature/MirroredMachinings 2023-09-28 09:23:46 +02:00
luca.mazzoleni 736065eaad Merge branch 'master' into develop 2023-09-28 09:17:08 +02:00
luca.mazzoleni 09ce7d2d01 Merge branch 'develop' 2023-09-28 09:16:59 +02:00
luca.mazzoleni 84eb8ec1b9 update log 2023-09-28 09:04:29 +02:00
luca.mazzoleni a2fc9b4ade Merge remote-tracking branch 'origin/HEAD' into develop 2023-09-28 08:56:02 +02:00
Dario Sassi bb5b13d122 DataWall :
- in Is3EdgesApprox di FreeContour aggiunta cancellazione dei loop temporanei.
2023-09-27 21:06:49 +02:00
luca.mazzoleni ee04bed533 Merge branch 'master' into develop 2023-09-27 15:23:40 +02:00
luca.mazzoleni 5452ceda9f Merge branch 'develop' 2023-09-27 15:23:29 +02:00
luca.mazzoleni a875f9758b - rem compilazione FeatureTopology 2023-09-27 15:23:08 +02:00
luca.mazzoleni c091137ffc Merge branch 'master' into develop 2023-09-27 12:02:23 +02:00
luca.mazzoleni 007288b9c9 Merge branch 'develop' into feature/MirroredMachinings 2023-09-27 12:00:37 +02:00
luca.mazzoleni 9d0206984b Merge commit '84339a584359a77b30d2a0406482357d0930e2e4' 2023-09-27 12:00:20 +02:00
luca.mazzoleni 84339a5843 - aggiunto WFeatureTopology a Compile 2023-09-27 11:59:46 +02:00
luca.mazzoleni efc9a89bf5 Merge branch 'develop' into feature/MirroredMachinings 2023-09-21 17:04:54 +02:00
luca.mazzoleni 780b0addc1 Merge branch 'master' into develop 2023-09-21 16:56:03 +02:00
luca.mazzoleni 6c1d2e5cc5 Merge branch 'release/2.5i3' 2023-09-21 16:53:04 +02:00
luca.mazzoleni 1c623206df update log, versione e commenti 2023-09-21 16:52:32 +02:00
luca.mazzoleni eca052bd67 Merge branch 'develop' into feature/MirroredMachinings 2023-09-21 16:10:49 +02:00
luca.mazzoleni 4034898f6e - in FreeContour e Lapjoint, in MakeByMill, modificato SCC 2023-09-21 16:10:32 +02:00
luca.mazzoleni aa7099539e Merge branch 'master' into develop 2023-09-21 15:52:33 +02:00
Dario Sassi 510724a627 Merge branch 'master' of https://gitlab.steamware.net/egaltech/DataWall 2023-09-21 09:49:00 +02:00
Dario Sassi 23a831cf50 DataWall 2.5i3 :
- per pulizia corner di FreeContour disabilitato metodo con tunnel ed esteso metodo con tre punti
- in LapJoint aggiornata pulizia corner come FreeContour.
2023-09-21 09:47:27 +02:00
luca.mazzoleni 8b999fad88 Merge branch 'develop' into feature/MirroredMachinings 2023-09-20 10:33:27 +02:00
luca.mazzoleni b2fe513d2d Merge tag '2.5i2' into develop
Finish Release: 2.5i2
2023-09-20 10:28:30 +02:00
luca.mazzoleni 4e0a87fbf6 Merge branch 'release/2.5i2' 2023-09-20 10:28:30 +02:00
luca.mazzoleni e43afd5af4 update log 2023-09-20 10:27:59 +02:00
luca.mazzoleni 8b095a195a Merge branch 'master' into develop 2023-09-20 10:22:38 +02:00
Dario Sassi f2a066192f DataWall 2.5i2 :
- corretta impostazione allargamento aree disposizone grezzi su tavola
- in LapJoint con una sola faccia controllo lavorabilità ora come per FreeContour
- in CleanCorner ora AuxDir (SCC) sempre Z+.
2023-09-20 10:12:51 +02:00
luca.mazzoleni 11b6a8716e Merge branch 'develop' into feature/MirroredMachinings 2023-09-19 18:35:17 +02:00
luca.mazzoleni e59030ed4b Merge branch 'develop' 2023-09-19 18:33:58 +02:00
luca.mazzoleni a859e72707 -in FreeContour piccola correzione a alle corner milling 2023-09-19 18:29:58 +02:00
luca.mazzoleni 4bcf2c8068 Merge branch 'develop' into feature/MirroredMachinings 2023-09-19 10:25:52 +02:00
luca.mazzoleni 55050a17d2 Merge branch 'release/2.5i1' 2023-09-19 10:25:12 +02:00
luca.mazzoleni fa9a8a7e49 Merge tag '2.5i1' into develop
Finish Release: 2.5i1
2023-09-19 10:25:12 +02:00
luca.mazzoleni ff9320993c update log 2023-09-19 10:24:34 +02:00
luca.mazzoleni 93f9df0d5f Merge branch 'develop' into feature/MirroredMachinings 2023-09-13 08:54:17 +02:00
luca.mazzoleni 9f32c5fd87 Merge remote-tracking branch 'origin/master' into develop 2023-09-12 18:29:21 +02:00
Dario Sassi 41f85808e2 DataWall 2.5i1 :
- correzioni per pulizia corner in FreeContour.
2023-09-12 11:25:15 +02:00
luca.mazzoleni 9f014c70f7 - lievi correzioni 2023-09-11 09:56:22 +02:00
luca.mazzoleni b2fdd27130 in WallExec -> SetMirroredOperations ora si controlla che la lavorazione non sia vuota prima di aggiungerla alla lista delle plausibili per doppio 2023-09-07 17:03:12 +02:00
luca.mazzoleni 6a2a87b91f - la Topology tunnel chiuso diventa pocket
- piccole correzioni alla raccolta features in doppio in WallExec
- correzione in LApJoint per evitare di lavorare groove completamente affondate nel grezzo
2023-09-07 12:23:27 +02:00
luca.mazzoleni 61e5ce6359 - aggiunta costante if WD.DOUBLE_HEAD_MILLCORNER per attivazione puliture in doppio 2023-09-05 16:14:05 +02:00
luca.mazzoleni fa276949a2 - in WallExec completata ricerca e esecuzione di fresature in doppio da percorso specchiato
- in WMachiningLib resa globale la funzione IsToolDoubleOk
- piccole correzioni
2023-09-04 17:56:07 +02:00
luca.mazzoleni d24a86bcdd - aggiunta ricerca e esecuzione di fresature in doppio da percorso specchiato
- piccole correzioni
2023-08-30 18:21:10 +02:00
luca.mazzoleni 5524fbf0cb - spostate funzioni per verifica lavorazione adatta a doppio in MachiningLib
- aggiunte (commentate per ora) prime righe per riconoscimento percorsi fresature da specchiare
2023-08-30 12:09:08 +02:00
luca.mazzoleni afb33aa7c6 - in WallLib -> GetProcessDistanceToNearestParts piccole correzioni al calcolo del solido della parte
- in LapJoint -> MakeByPocketing migliorata la scelta utensile e la forzatura tasca chiusa nel caso di parti vicine
2023-08-29 13:12:34 +02:00
luca.mazzoleni 924313a0ea - alcune correzioni 2023-08-24 18:40:00 +02:00
luca.mazzoleni 9d812ab33a - in LapJoint -> MakeByPocketing, se doppio, escludo ottimizzazioni e forzo attacco interno perchè la tasca specchiata potrebbe essere nel mezzo del pannello 2023-08-24 17:08:39 +02:00
luca.mazzoleni 3c7c22ae7c - in WallLib aggiunta la funzione GetProcessDistanceToRawPart
- alcune correzioni in WallExec
2023-08-24 16:05:42 +02:00
luca.mazzoleni b9c9cc5167 - in WallExec -> Collect viene ora calcolata e scritta in Proc la distanza dalle parti vicine, nelle direzioni Y+/Y-/X+/X-, tramite la funzione GetProcessDistanceToNearestParts da WallLib
- in WallExec -> SetMirroredFeatures semplificato il calcolo di IsFeatureOnEdge
- in LapJoint -> IsMachiningDamagingOtherParts eliminata la verifica di overlap nelle singole direzioni (ora già calcolata nel Collect)
2023-08-24 09:53:18 +02:00
luca.mazzoleni 756d58b3e4 - piccole correzioni a WallExec
- in LapJoint -> MakeByPocketing aggiunta forzatura tasche chiuse se la lavorazione potrebbe danneggiare  i pezzi limitrofi
2023-08-23 12:24:45 +02:00
luca.mazzoleni 4a5c213de6 - refactoring di SetMirroredMachinings
- da definire cosa specchiare se feature non sul bordo
2023-08-11 18:51:02 +02:00
luca.mazzoleni d0cecd6a0d - in WallLib -> affectedFaces modificata tolleranza
- in WallExec introduzione costanti distinte per tolleranze ricerca tasche e fori in doppio
- altre piccole migliorie
2023-08-10 16:54:02 +02:00
luca.mazzoleni 3326f8ef4e - corretto id geometria per disattivazione fori
- massima distanza dal bordo pannello portata a 200 mm
- migliorie stilistiche
2023-08-09 18:25:32 +02:00
luca.mazzoleni 5e6dfe320f - aggiunta gestione in doppio di forature e groove passanti (rivolte verso Z+)
- lieve correzione a check utensile doppio
- aggiunto interasse minimo per lavorazioni in doppio
2023-08-09 17:16:47 +02:00
luca.mazzoleni a4c3b74434 Merge branch 'develop' into feature/MirroredMachinings 2023-08-08 08:56:19 +02:00
luca.mazzoleni f1d81ffb4d Merge tag '2.5h1' into develop
Finish Release: 2.5h1
2023-08-07 18:27:13 +02:00
luca.mazzoleni a4dcf78c9b Merge branch 'release/2.5h1' 2023-08-07 18:27:13 +02:00
luca.mazzoleni 8ddad9f183 update log e version 2023-08-07 18:27:00 +02:00
luca.mazzoleni 46a299b83d Merge branch 'develop' into feature/MirroredMachinings 2023-08-07 17:13:10 +02:00
luca.mazzoleni 82b518bd54 Merge branch 'master' into develop 2023-08-07 17:08:19 +02:00
luca.mazzoleni fcd7ee98a0 update log 2023-08-07 17:08:08 +02:00
luca.mazzoleni d1fe91e68a Merge branch 'develop' 2023-08-07 17:05:39 +02:00
luca.mazzoleni b65a4e2220 In Lapjoint -> MakeSideGrooveByMill controllo testa sotto al grezzo escluso se richiesto il move after 2023-08-07 16:40:39 +02:00
luca.mazzoleni e6bd4e7e94 piccola correzione a WallExec 2023-08-07 10:53:35 +02:00
luca.mazzoleni 5ff950015e - a WallExec aggiunta rimozione operazioni se legate a lavorazioni specchiate
- modifiche varie per forzare sideGroove in caso la lavorazione principale sia una tasca cieca che guarda in alto
- modificata MakeMoreFaces per contemplare lavorazioni in doppio
2023-08-04 18:57:04 +02:00
luca.mazzoleni 57ed0d934f Merge branch 'develop' into feature/MirroredMachinings 2023-08-03 16:33:02 +02:00
luca.mazzoleni 515dbabde9 Merge branch 'release/2.5g4' 2023-08-01 14:56:10 +02:00
luca.mazzoleni ea8852115c Merge tag '2.5g4' into develop
Finish Release: 2.5g4
2023-08-01 14:56:10 +02:00
luca.mazzoleni dda6389ab2 update log e versione 2023-08-01 14:55:56 +02:00
luca.mazzoleni 69611fb9eb in ProcessLapJoint->SideGroove migliorato il controllo che la testa non scenda sotto al livello del grezzo (ora usa i diametri minimo e massimo della testa) 2023-08-01 11:39:27 +02:00
luca.mazzoleni 25a533dbf4 Merge branch 'hotfix/2.5g3H1' 2023-07-27 18:32:58 +02:00
luca.mazzoleni 3e189d6421 Merge tag '2.5g3H1' into develop
Finish Hotfix: 2.5g3H1
2023-07-27 18:32:58 +02:00
luca.mazzoleni 9bba651886 corretto bug in MachiningLib -> AddMachining che contempla il caso in cui Proc non sia una tabella 2023-07-27 18:31:58 +02:00
luca.mazzoleni e1a5625f18 Merge branch 'release/2.5g3' 2023-07-26 18:26:16 +02:00
luca.mazzoleni ff3a738d91 Merge tag '2.5g3' into develop
Finish Release: 2.5g3
2023-07-26 18:26:16 +02:00
luca.mazzoleni 8225bc93d5 update log e versione 2023-07-26 18:26:00 +02:00
luca.mazzoleni 59c9e6d1cd In Freecontour->MakeByCut migliorata la scelta della fresa secondaria in caso non sia disponibile una fresa di lunghezza sufficiente 2023-07-26 16:31:14 +02:00
luca.mazzoleni eae34681f3 In ProcessCut angolo Z minimo ora gestito tramite costante da WallData CUT_VZ_MIN (default -0.5) 2023-07-26 15:11:59 +02:00
luca.mazzoleni 098ef8deaf Merge branch 'release/2.5g2' 2023-07-26 11:39:35 +02:00
luca.mazzoleni 7f10b7219a Merge tag '2.5g2' into develop
Finish Release: 2.5g2
2023-07-26 11:39:35 +02:00
luca.mazzoleni 8cfd505f81 update log e versione 2023-07-26 11:19:26 +02:00
luca.mazzoleni 7f29b951c8 Merge branch 'feature/SideStepOnGroove' into develop 2023-07-25 18:31:11 +02:00
luca.mazzoleni 75d0d7fd13 - piccola correzione alla ricerca utensile SideGroove 2023-07-25 18:30:57 +02:00
luca.mazzoleni 808536a3aa - in LapJoint aggiunte passate laterali per SideGroove, se specificato SIDESTEP nelle note utensile
- piccole correzioni minori
2023-07-25 12:56:22 +02:00
luca.mazzoleni 5b5ce504b1 - qualche piccola modifica a WallExec
- in LapJoint (MakeTwoFaces e altri make, manca MakeMoreFaces) implementata parzialmente gestione doppio
- in MachiningLib aggiunta la possibilità di forzare una testa per milling e pocketing
2023-07-14 19:02:13 +02:00
luca.mazzoleni f2027d03a3 feature/MirroredMachinings:
- implementato riconoscimento tasche sul fianco (e relativa specchiata) da fare in doppio; funzionanti, da testare
- piccoli ritocchi a AffectedFaces e Topology
2023-07-12 18:35:36 +02:00
luca.mazzoleni d959e46f50 fix commenti 2023-07-10 15:19:07 +02:00
luca.mazzoleni a156b5d703 in ProcessLapJoint->SideGroove viene ora impedito di lavorare una groove se la testa deve scendere sotto al limite superiore del grezzo 2023-07-10 15:16:01 +02:00
luca.mazzoleni 5ee62cfee2 commenti funzioni e piccoli fix 2023-07-10 09:51:08 +02:00
luca.mazzoleni 3ca0ab1692 - altri piccoli miglioramenti legati al riconoscimento topologia 2023-07-07 18:07:11 +02:00
luca.mazzoleni 51e1425921 Merge branch 'develop' into feature/MirroredMachinings 2023-07-06 15:32:50 +02:00
luca.mazzoleni b0abe6d088 - alcune correzioni a Topology
- aggiunto riconoscimento topologie fino a 5 lati (da testare)
2023-07-06 15:32:40 +02:00
luca.mazzoleni be49385bb0 - riconoscimento bevel e rabbet funzionanti; da testare 2023-07-05 18:38:17 +02:00
luca.mazzoleni fe26308388 Merge branch 'master' into develop 2023-07-04 11:26:13 +02:00
luca.mazzoleni 9846bf2598 Merge branch 'develop' 2023-07-04 11:26:01 +02:00
luca.mazzoleni d3c43fdec1 update log 2023-07-04 11:25:43 +02:00
luca.mazzoleni cb26d23639 Merge tag '2.5g1' into develop
Finish Release: 2.5g1
2023-07-04 11:23:29 +02:00
luca.mazzoleni 7b991ddc7a Merge branch 'release/2.5g1' 2023-07-04 11:23:28 +02:00
luca.mazzoleni c685b0c4c5 Merge branch 'master' into develop 2023-07-04 11:22:34 +02:00
luca.mazzoleni 4e079f6708 completamento parziale della funzione per recuperare le facce parallele alla parte 2023-07-04 11:22:03 +02:00
DarioS 62d1c3cb29 DataWall 2.5g1 :
- sistemazione versione.
2023-07-04 08:53:33 +02:00
DarioS ed05f04de6 Merge branch 'master' of https://gitlab.steamware.net/egaltech/DataWall 2023-07-04 08:49:03 +02:00
DarioS aa341ed2b3 DataWall :
- modifica per posizione default del grezzo (ora assegno 0 per lasciare il compito a WD.GetOrigCorner di macchina).
2023-07-04 08:48:17 +02:00
luca.mazzoleni 18fb6622f5 Merge tag '2.5f3' into develop
Finish Release: 2.5f3
2023-06-30 16:30:34 +02:00
luca.mazzoleni 7f3aba6d1d Merge branch 'release/2.5f3' 2023-06-30 16:30:34 +02:00
luca.mazzoleni abfee0334d update log e versione 2023-06-30 16:28:40 +02:00
luca.mazzoleni e34ac566e1 -In LapJoint aggiunta lettura delle note esistenti dalle lavorazioni per evitare di sovrascriverle
- Alcune piccole correzioni
2023-06-30 16:22:17 +02:00
luca.mazzoleni 6550ddd456 altre aggiunte a WFeatureTopology 2023-06-30 09:54:33 +02:00
luca.mazzoleni 68ad658bc5 Merge branch 'develop' into feature/MirroredMachinings 2023-06-28 12:59:28 +02:00
luca.mazzoleni 9838bc7f31 Merge tag '2.5f2' into develop
Finish Release: 2.5f2
2023-06-28 11:35:36 +02:00
luca.mazzoleni dcc1e5b543 Merge branch 'release/2.5f2' 2023-06-28 11:35:35 +02:00
luca.mazzoleni 01260c7278 update log 2023-06-28 11:34:47 +02:00
luca.mazzoleni f2bdb23f9d Merge branch 'master' into develop 2023-06-28 11:33:58 +02:00
luca.mazzoleni 5bb7fdd634 - aggiunta libreria WFeatureTopology per il riconoscimento topologico delle feature (da completare)
- spostate alcune funzioni da FreeContour a WallLib
2023-06-28 11:32:48 +02:00
DarioS 1131948d33 DataWall 2.5f2 :
- aggiunte due nuove origini (TN e BN che come X usano WD.NEW_REF), in totale ora sono 8.
2023-06-28 10:50:00 +02:00
luca.mazzoleni 30c449bfad Merge branch 'develop' into feature/MirroredMachinings 2023-06-20 09:43:00 +02:00
luca.mazzoleni 1236d196ba - TestElleShape 3 e 4 spostati in WallLib
- a DoubleCut aggiunto riconoscimento della sola L011
- in WallLib aggiunta funzione GetProcessAffectedFaces che restituisce le facce del grezzo interessate dalla feature
- in WallExec aggiunte alle Proc informazioni sulle facce della feature
- alcune modifiche iniziali per Mirror
2023-06-20 09:35:25 +02:00
luca.mazzoleni be33225242 corretto update log 2023-06-19 18:26:16 +02:00
luca.mazzoleni 2db0e4b8a9 Merge tag '2.5f1' into develop
Finish Release: 2.5f1
2023-06-13 10:01:07 +02:00
luca.mazzoleni 8b3bb67710 Merge branch 'release/2.5f1' 2023-06-13 10:01:07 +02:00
luca.mazzoleni f9f6462dc2 update log e version 2023-06-13 10:00:51 +02:00
luca.mazzoleni 47b3298e89 modifica GetWallData per passare costante BTL_PRIORITY all'interfaccia 2023-06-13 09:55:28 +02:00
luca.mazzoleni 4f1c652dc0 - fix minore per priorità da btl 2023-06-08 15:01:18 +02:00
luca.mazzoleni de9fa79f8a - negli outline con priorità da btl aggiunta la rimozione sfridi per la lavorazione successiva 2023-06-07 18:28:12 +02:00
luca.mazzoleni f6caf21581 Merge branch 'feature/RecessedCounterbore' into develop 2023-06-06 12:57:00 +02:00
luca.mazzoleni b0b8e88c30 - Alcune correzioni minori
- Sistemati commenti
2023-06-06 12:54:35 +02:00
luca.mazzoleni d020fa143c - aggiunta gestione step verticale
- correzioni minori
2023-05-29 18:01:59 +02:00
luca.mazzoleni eeb34638cf - da testare funzionamento corretto
- da implementare step verticali
2023-05-26 18:12:53 +02:00
luca.mazzoleni 7f2d1895a1 Merge branch 'feature/OperationPriorityFromBtl' into develop 2023-05-26 13:03:54 +02:00
luca.mazzoleni 766bd61981 - sistemati commenti
- lettura costante BTL_PRIORITY da WallData
- altre piccole correzioni
2023-05-25 15:58:00 +02:00
luca.mazzoleni 1102a7c23a -aggiunta possibilità di scegliere l'ordine del sorting crescente o decrescente
-manca costante da WD
2023-05-24 17:45:28 +02:00
luca.mazzoleni 358df3cfdb prima versione funzionante completamente 2023-05-24 11:48:51 +02:00
luca.mazzoleni bd0dbbb41c modificata funzioni di sorting per gestire priorità 2023-05-23 18:25:16 +02:00
luca.mazzoleni 2606cf4f13 Merge branch 'develop' into feature/OperationPriorityFromBtl 2023-05-16 16:42:47 +02:00
luca.mazzoleni e63b498902 piccola correzione messaggio 2023-05-16 16:42:32 +02:00
luca.mazzoleni 63a3cfe698 primo implemento ciclo priorità 2023-05-15 13:31:33 +02:00
luca.mazzoleni 78cf115748 update gitignore 2023-05-09 09:02:27 +02:00
luca.mazzoleni ac853fc74c Merge remote-tracking branch 'origin/master' into develop 2023-05-04 12:53:19 +02:00
DarioS a5cc30adfc DataWall 2.5e1 :
- modifiche per gestione traduzione messaggi (possibile solo con interfaccia utente B&W).
2023-05-04 12:21:34 +02:00
luca.mazzoleni 1a1d48a2c1 update log modifiche 2023-04-21 10:13:00 +02:00
luca.mazzoleni a05741f7be Merge remote-tracking branch 'origin/master' into develop 2023-04-18 09:00:39 +02:00
DarioS 5da9d312d8 DataWall :
- in gestione batch TS3v7 aggiunta gestione flag per rotazione grezzo di 180deg (da parametro macchina WD.RAWPART_ROT)
- in DoubleCut passate a LapJoint si trasforma il Gruppo da 1 a 3 e da 2 a 4 (altrimenti sbaglia a ordinare le facce)
- in FreeContour e LapJoint la lavorazione CleanCorner viene sempre forzata con lato di lavoro in centro
- in LapJoint razionalizzata gestione parametri Q ed eliminta gestione forzatura lama non usatain realtà.
2023-04-17 17:40:28 +02:00
luca.mazzoleni d704e899a2 Merge remote-tracking branch 'origin/master' into develop 2023-04-17 10:26:42 +02:00
DarioS 5b0a274f00 DataWall 2.5d2 :
- in gestione batch TS3v7 aggiunta gestione flag per taglio feature con outline (da parametro macchina WD.CUT_WITH_OUTLINE)
- in FreeContour e assimilati aggiunta pulitura spigoli Q05=1 anche su sole fresature
- in LapJoint e assimilati corretta scelta tipo lavorazione 'SideGroove' aggiungendo massimo spessore
- in LapJoint con lavorazione di lato se MCH_SCC.ADIR_NEAR fa fallire Apply si riprova con MCH_SCC.ADIR_FAR.
2023-04-17 09:38:38 +02:00
DarioS 5fb1ffb86b Merge remote-tracking branch 'origin/master' 2023-04-14 19:13:16 +02:00
luca.mazzoleni c6cf8c9df3 Merge branch 'develop' 2023-04-06 16:00:29 +02:00
luca.mazzoleni 39d1c1dbd8 update log modifiche 2023-04-06 16:00:04 +02:00
luca.mazzoleni a0668a0f6d Merge tag '2.5d1' into develop
Finish Release: 2.5d1
2023-04-06 12:53:39 +02:00
luca.mazzoleni 53c68f8126 Merge branch 'release/2.5d1' 2023-04-06 12:53:38 +02:00
luca.mazzoleni ce835200c2 update version 2023-04-06 12:53:01 +02:00
luca.mazzoleni a941ba0d0d Merge branch 'release/2.5d1' 2023-04-06 12:51:00 +02:00
luca.mazzoleni e475c01057 Merge tag '2.5d1' into develop
Finish Release: 2.5d1
2023-04-06 12:51:00 +02:00
luca.mazzoleni 03647ee74c Merge branch 'master' into develop 2023-04-06 11:44:22 +02:00
DarioS 22f100ff6c DataWall 2.5c6 :
- aggiornamento versione.
2023-03-27 20:58:17 +02:00
SaraP 3d0d6526ca DataWall :
- nel nesting aggiunti valori di default per alcuni dati letti dal WallData
- migliorie stilistiche.
2023-03-24 11:13:17 +01:00
luca.mazzoleni a911191d5b Merge tag '2.5c5' into develop
Finish Release: 2.5c5
2023-03-22 17:42:46 +01:00
luca.mazzoleni aeba5edbad Merge branch 'release/2.5c5' 2023-03-22 17:42:46 +01:00
luca.mazzoleni 763ca86371 2.5c5:
- In LapJoint -> MakeByMill gestito correttamente il caso di Workside destro
2023-03-22 16:36:20 +01:00
luca.mazzoleni e6e9790a9c Merge remote-tracking branch 'origin/master' into develop 2023-03-22 16:34:12 +01:00
Samuele Locatelli becd669f6d Merge branch 'develop' 2023-03-21 15:26:22 +01:00
Samuele Locatelli 2fb6729240 Fix compilazione su disco rete lua scripts 2023-03-21 15:25:54 +01:00
DarioS a3ad73b4a0 DataWall :
- corretta replica come Beam.
2023-03-21 12:02:32 +01:00
DarioS e88e056c89 DataWall :
- aggiunti a Version.lua NAME e MIN_EXE.
2023-03-21 10:16:50 +01:00
luca.mazzoleni 3853e7c0c7 piccola correzione alle fessure poco inclinate con lama 2023-03-10 11:29:36 +01:00
luca.mazzoleni 4c41ecc7cb 2.5c4:
- in LapJoint aggiunta lavorazione fessure poco inclinate con lama
2023-03-09 17:40:24 +01:00
luca.mazzoleni b7384b9635 Merge branch 'BugFix/MisrecognizedUShapeLapjoint' into develop 2023-03-09 09:38:22 +01:00
luca.mazzoleni bc5c99422b 2.5c4
- in LapJoint Gestito caso riconoscimento errato Stype 3
- piccola correzione a MachiningLib -> FindMilling
2023-03-09 09:34:43 +01:00
luca.mazzoleni c5e3af9180 Merge remote-tracking branch 'origin/master' into develop 2023-03-09 09:19:23 +01:00
DarioS 714b3be628 DataWall :
- in FreeContour con fresa, se imposto Tool_ID non controllo più possibilità di lavorare di testa.
2023-03-08 13:05:30 +01:00
DarioS 29b63c77a6 DataWall 2.5c3 :
- aggiunta gestione DELTA_X e DELTA_Y per programma EgtBeamWall.
2023-03-08 11:51:30 +01:00
luca.mazzoleni 53af42724b Merge branch 'master' into develop 2023-03-08 10:41:07 +01:00
DarioS 0be8849f2e DataWall 2.5c2 :
- aggiunta possibilità di spostare grezzo da corner di riferimento anche in X.
2023-03-08 08:45:44 +01:00
DarioS 246f64e4ce DataWall 2.5c1 :
- corretto nome variabile restituzione stringa errore per sega a catena.
2023-03-02 12:13:40 +01:00
luca.mazzoleni 4d3669a24b Merge remote-tracking branch 'origin/master' into develop 2023-02-28 15:18:09 +01:00
DarioS de682d511c DataWall 2.5b2 :
- modifica a FreeContour con sega a catena per non usare MCH_SCC.OPPOSITE sostituiti con Invert e Left.
2023-02-28 15:13:33 +01:00
luca.mazzoleni 55e7d9f2e7 Merge branch 'master' into develop 2023-02-27 17:38:41 +01:00
DarioS bf08515edf Merge branch 'master' of https://gitlab.steamware.net/egaltech/DataWall 2023-02-27 17:33:17 +01:00
DarioS b0b5a7f91d DataWall 2.5b1 :
- aggiunto file Version.lua.
2023-02-27 17:32:51 +01:00
luca.mazzoleni 7cded14384 Improvement/SideMortisingAndMarking:
- modificato valore di accettazione offset z a 99.9
2023-01-24 12:47:48 +01:00
luca.mazzoleni 2bf9d01c50 Merge branch 'develop' 2023-01-24 12:02:45 +01:00
DarioS c654e00984 DataWall :
- modifiche per lua54 e compilati unificati 32/64 bit solo bin.
2023-01-12 15:19:08 +01:00
luca.mazzoleni f9f2b07489 Merge branch 'Improvement/SideMortisingAndMarking' into develop 2023-01-05 16:06:30 +01:00
luca.mazzoleni a21d93cc6b Improvement/SideMortisingAndMarking:
- in presenza di offset Z tra grezzo e tavola, rese possibili le lavorazioni di mortising e marking sul fianco
2023-01-05 16:04:20 +01:00
luca.mazzoleni 89f553a49f Merge branch 'develop' 2022-12-22 17:53:56 +01:00
luca.mazzoleni 577362c6d2 BugFix:
- in LapJoint esteso lo step negativo agli angoli ottusi
2022-12-22 17:53:40 +01:00
luca.mazzoleni de14fb91ce Merge remote-tracking branch 'origin/master' into develop 2022-12-22 16:14:26 +01:00
DarioS 564de1d22d DataWall :
- in LapJoint abilitato step negativo se tasca guarda verso il basso (MakeSideGrooveByMill).
2022-12-22 15:20:00 +01:00
DarioS 2051a327a5 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataWall 2022-12-22 10:04:06 +01:00
luca.mazzoleni 4237f50b5f Merge branch 'BugFix/Approx3EdgesFaces' into develop 2022-12-14 18:24:40 +01:00
luca.mazzoleni c01fa1f08a Merge branch 'develop' 2022-12-14 12:57:00 +01:00
luca.mazzoleni a0bd97e7aa BugFix/FreeContourBladeUpsideDownAdjFace:
- Aggiunto l'accorciamento della lama in caso di facce vicine orientate verso il basso
- in Lapjoint piccola modifica al modo di oridinare le facce
2022-12-14 12:02:54 +01:00
29 changed files with 3276 additions and 1600 deletions
+6 -7
View File
@@ -13,12 +13,11 @@
/Debug64 /Debug64
/Release64 /Release64
/ipch /ipch
/bin
/obj /obj
/.vs /.vs
/32/*.lua /bin/*.lua
/32/LuaLibs/*.lua /bin/*.ini
/32/Images/*.png /bin/LuaLibs/*.lua
/64/*.lua /bin/Images/*.png
/64/LuaLibs/*.lua .vscode/settings.json
/64/Images/*.png bin/Images/.placeholder
+33 -64
View File
@@ -2,96 +2,67 @@ variables:
VERS_MAIN: '1.0' VERS_MAIN: '1.0'
APP_NAME: 'Wall' APP_NAME: 'Wall'
NEW_REL: '' NEW_REL: ''
NET_SHARE_R: '\\10.74.82.201\EgwTech' NET_SHARE_X: '\\10.74.82.201\EgwTech'
NET_SHARE_Z: '\\10.74.82.201\Artifacts' NET_SHARE_Z: '\\10.74.82.201\Artifacts'
NET_USERQ: 'steamw\egalware' NET_USERQ: 'steamw\egalware'
#Note compilazione LUA: #Note compilazione LUA:
# lua53 -o 32\$FileName -s $FileName: -o = output, -s = NON include i debug symbols # lua54 -o bin\$FileName -s $FileName: -o = output, -s = NON include i debug symbols
# helper compilazione LUA a 32 bit # helper compilazione LUA a 32 e 64 bit
.LuaCompile32: &LuaCompile32 .LuaCompile: &LuaCompile
- | - |
Set-Alias lua53 C:\Tools\Lua32\luac53 Set-Alias lua54 C:\Tools\Lua32\luac54
echo "Copia file *.ini" echo "Copia file *.ini"
$FileList = Get-ChildItem("*.ini") $FileList = Get-ChildItem("*.ini")
ForEach ($File in $FileList) { ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf $FileName = Split-Path $File -leaf
Copy-Item -Path $FileName -Destination 32\$FileName Copy-Item -Path $FileName -Destination bin\$FileName
echo "Copy-Item -Path $FileName -Destination 32\$FileName" echo "Copy-Item -Path $FileName -Destination bin\$FileName"
} }
echo "Compilazione file *.lua 32bit" echo "Compilazione file *.lua 32/64bit"
$FileList = Get-ChildItem("*.lua") $FileList = Get-ChildItem("*.lua")
ForEach ($File in $FileList) { ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf $FileName = Split-Path $File -leaf
lua53 -o 32\$FileName $FileName lua54 -o bin\$FileName -s $FileName
echo "lua53 -o 32\$FileName $FileName" echo "lua54 -o bin\$FileName -s $FileName"
} }
$FileList = Get-ChildItem("LuaLibs\*.lua") $FileList = Get-ChildItem("LuaLibs\*.lua")
ForEach ($File in $FileList) { ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf $FileName = Split-Path $File -leaf
lua53 -o 32\LuaLibs\$FileName LuaLibs\$FileName lua54 -o bin\LuaLibs\$FileName -s LuaLibs\$FileName
echo "lua53 -o 32\LuaLibs\$FileName LuaLibs\$FileName" echo "lua54 -o bin\LuaLibs\$FileName -s LuaLibs\$FileName"
} }
# helper compilazione LUA a 64 bit # helper copia SORGENTI verso cartella di rete X:\ dei SORGENTI
.LuaCompile64: &LuaCompile64
- |
Set-Alias lua53 C:\Tools\Lua64\luac53
echo "Copia file *.ini"
$FileList = Get-ChildItem("*.ini")
ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf
Copy-Item -Path $FileName -Destination 64\$FileName
echo "Copy-Item -Path $FileName -Destination 64\$FileName"
}
echo "Compilazione file *.lua 64bit"
$FileList = Get-ChildItem("*.lua")
ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf
lua53 -o 64\$FileName $FileName
echo "lua53 -o 64\$FileName $FileName"
}
$FileList = Get-ChildItem("LuaLibs\*.lua")
ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf
lua53 -o 64\LuaLibs\$FileName LuaLibs\$FileName
echo "lua53 -o 64\LuaLibs\$FileName LuaLibs\$FileName"
}
# Copy-Item -Path $FileName -Destination 64\$FileName
# echo "Copy-Item -Path $FileName -Destination 64\$FileName"
# helper copia SORGENTI verso cartella di rete R:\ dei SORGENTI
.CodeReplicaR: &CodeReplicaR .CodeReplicaR: &CodeReplicaR
- | - |
net use R: /delete net use X: /delete
net use R: $env:NET_SHARE_R /u:$env:NET_USERQ $ZDRIVE_PASSWD
ROBOCOPY . R:\EgtData\$env:APP_NAME /MIR /XF .git* /XD .git
SLEEP 2 SLEEP 2
net use R: /delete net use X: $env:NET_SHARE_X /u:$env:NET_USERQ $ZDRIVE_PASSWD
ROBOCOPY . X:\EgtData\$env:APP_NAME /MIR /XF .git* /XD .git
SLEEP 2
net use X: /delete
# helper copia script verso cartella di rete X:\ delle cartelle bin
# helper copia script verso cartella di rete R:\ delle cartelle 32 e 64
.ReplicaR: &ReplicaR .ReplicaR: &ReplicaR
- | - |
net use R: /delete net use X: /delete
net use R: $env:NET_SHARE_R /u:$env:NET_USERQ $ZDRIVE_PASSWD
ROBOCOPY /MIR 32 R:\EgtData\$env:APP_NAME\32
ROBOCOPY /MIR 64 R:\EgtData\$env:APP_NAME\64
ROBOCOPY /MIR Images R:\EgtData\$env:APP_NAME\32\Images
ROBOCOPY /MIR Images R:\EgtData\$env:APP_NAME\64\Images
SLEEP 2 SLEEP 2
net use R: /delete net use X: $env:NET_SHARE_X /u:$env:NET_USERQ $ZDRIVE_PASSWD
ROBOCOPY /MIR bin X:\EgtData\$env:APP_NAME\bin
ROBOCOPY /MIR Images X:\EgtData\$env:APP_NAME\bin\Images
SLEEP 2
net use X: /delete
# helper copia script verso cartella di rete R:\ delle cartelle 32 e 64 # helper copia script verso cartella di rete X:\ delle cartelle bin
.ReplicaZ: &ReplicaZ .ReplicaZ: &ReplicaZ
- | - |
net use Z: /delete net use Z: /delete
SLEEP 2
net use Z: $env:NET_SHARE_Z /u:$env:NET_USERQ $ZDRIVE_PASSWD net use Z: $env:NET_SHARE_Z /u:$env:NET_USERQ $ZDRIVE_PASSWD
ROBOCOPY /MIR 32 Z:\EgtData\$env:APP_NAME\32 ROBOCOPY /MIR bin Z:\EgtData\$env:APP_NAME\bin
ROBOCOPY /MIR 64 Z:\EgtData\$env:APP_NAME\64 ROBOCOPY /MIR Images Z:\EgtData\$env:APP_NAME\bin\Images
ROBOCOPY /MIR Images Z:\EgtData\$env:APP_NAME\32\Images
ROBOCOPY /MIR Images Z:\EgtData\$env:APP_NAME\64\Images
SLEEP 2 SLEEP 2
net use Z: /delete net use Z: /delete
@@ -100,15 +71,13 @@ stages:
LuaCompile:build: LuaCompile:build:
stage: build stage: build
# only: only:
# - main - main
# - master - master
tags: tags:
- win - win
script: script:
- *LuaCompile32 - *LuaCompile
- *LuaCompile64
- *CodeReplicaR - *CodeReplicaR
- *ReplicaR - *ReplicaR
- *ReplicaZ - *ReplicaZ
View File
View File
View File
+31 -7
View File
@@ -1,4 +1,4 @@
-- BatchProcess.lua by Egaltech s.r.l. 2022/05/09 -- BatchProcess.lua by Egaltech s.r.l. 2023/04/17
-- Gestione calcolo batch disposizione e lavorazioni per Pareti -- Gestione calcolo batch disposizione e lavorazioni per Pareti
-- 2020/07/24 Nuvola di punti riferita allo Zero Tavola. -- 2020/07/24 Nuvola di punti riferita allo Zero Tavola.
-- 2020/10/28 Corretto spostamento pezzi per rotazioni (0 o 180) e inversioni( 0, 90, 180, o 270). -- 2020/10/28 Corretto spostamento pezzi per rotazioni (0 o 180) e inversioni( 0, 90, 180, o 270).
@@ -12,6 +12,9 @@
-- 2022/02/24 Se ricalcolo si aggiorna il setup. In ogni caso si verifica prima di simulazione. -- 2022/02/24 Se ricalcolo si aggiorna il setup. In ogni caso si verifica prima di simulazione.
-- 2022/04/28 In info generazione aggiunta indicazione se 64bit. -- 2022/04/28 In info generazione aggiunta indicazione se 64bit.
-- 2022/05/02 Consentito allargamento area disponibile per grezzi su tavola da WallData. -- 2022/05/02 Consentito allargamento area disponibile per grezzi su tavola da WallData.
-- 2023/04/09 Aggiunta gestione flag per taglio feature con outline (da WD.CUT_WITH_OUTLINE).
-- 2023/04/17 Aggiunta gestione flag per rotazione grezzo di 180deg (da WD.RAWPART_ROT).
-- 2024/02/20 Tolleranza su altezza pannello in grezzo portata a 0.1 mm.
-- Intestazioni -- Intestazioni
require( 'EgtBase') require( 'EgtBase')
@@ -179,9 +182,11 @@ if bToProcess then
if bBtl then if bBtl then
-- cancello eventuale vecchio progetto omonimo -- cancello eventuale vecchio progetto omonimo
EgtEraseFile( sNgeFile) EgtEraseFile( sNgeFile)
-- flag di importazione
local nFlag = EIB_FL.TS3_POS + EIB_FL.USEUATTR + EgtIf( WD.CUT_WITH_OUTLINE, EIB_FL.TRIM_WITH_OUTLINE or 128, EIB_FL.NONE)
-- eseguo import -- eseguo import
EgtNewFile() EgtNewFile()
if not EgtImportBtl( WALL.FILE, EIB_FL.TS3_POS + EIB_FL.USEUATTR) then if not EgtImportBtl( WALL.FILE, nFlag) then
WALL.ERR = 13 WALL.ERR = 13
WALL.MSG = 'Error importing BTL file : ' .. WALL.FILE WALL.MSG = 'Error importing BTL file : ' .. WALL.FILE
WriteErrToLogFile( WALL.ERR, WALL.MSG) WriteErrToLogFile( WALL.ERR, WALL.MSG)
@@ -228,6 +233,9 @@ if bToProcess then
end end
else else
dExtraW = 10 dExtraW = 10
if WD.DEFAULT_RAW_NO_EXTRA_WIDTH then
dExtraW = 0
end
dRawW = dRawW + dExtraW dRawW = dRawW + dExtraW
end end
end end
@@ -241,7 +249,7 @@ if bToProcess then
end end
if #vWall == 0 then if #vWall == 0 then
WALL.ERR = 14 WALL.ERR = 14
WALL.MSG = 'Error no beams in the file : ' .. WALL.FILE WALL.MSG = 'Error no walls in the file : ' .. WALL.FILE
WriteErrToLogFile( WALL.ERR, WALL.MSG) WriteErrToLogFile( WALL.ERR, WALL.MSG)
PostErrView( WALL.ERR, WALL.MSG) PostErrView( WALL.ERR, WALL.MSG)
return return
@@ -272,6 +280,11 @@ if bToProcess then
-- Ne recupero la posizione -- Ne recupero la posizione
for i = 1, #vWall do for i = 1, #vWall do
local PosX = EgtGetInfo( vWall[i].Id, 'POSX', 'd') local PosX = EgtGetInfo( vWall[i].Id, 'POSX', 'd')
local PosZ = EgtGetInfo( vWall[i].Id, 'POSZ', 'd')
if bProj and WD.DEFAULT_RAW_NO_EXTRA_WIDTH and #vWall == 1 then
PosX = 0
PosZ = 0
end
vWall[i].PosX = PosX + min( dExtraL, 1200) vWall[i].PosX = PosX + min( dExtraL, 1200)
if WD.USE_POSY then if WD.USE_POSY then
local PosY = EgtGetInfo( vWall[i].Id, 'POSY', 'd') local PosY = EgtGetInfo( vWall[i].Id, 'POSY', 'd')
@@ -279,7 +292,6 @@ if bToProcess then
else else
vWall[i].PosY = 0 vWall[i].PosY = 0
end end
local PosZ = EgtGetInfo( vWall[i].Id, 'POSZ', 'd')
vWall[i].PosZ = PosZ + dExtraW / 2 vWall[i].PosZ = PosZ + dExtraW / 2
end end
@@ -344,7 +356,7 @@ if bToProcess then
local vWallErr = {} local vWallErr = {}
for i = 2, #vWall do for i = 2, #vWall do
local dDimH = vWall[i].Box:getDimZ() + vWall[i].PosY local dDimH = vWall[i].Box:getDimZ() + vWall[i].PosY
if abs( dDimH - dRawH) > 10 * GEO.EPS_SMALL then if abs( dDimH - dRawH) > 100 * GEO.EPS_SMALL then
table.insert( vWallErr, i) table.insert( vWallErr, i)
end end
end end
@@ -361,6 +373,12 @@ if bToProcess then
return return
end end
-- se impostato flag apposito, in vista il grezzo è uguale al pezzo
if bProj and WD.DEFAULT_RAW_NO_EXTRA_WIDTH and #vWall == 1 then
dRawL = vWall[1].Box:getDimX()
dRawW = vWall[1].Box:getDimY()
end
-- Verifico dimensioni massime grezzo -- Verifico dimensioni massime grezzo
if dRawL > WD.MAX_LENGTH + 10 * GEO.EPS_SMALL or dRawW > WD.MAX_WIDTH + 10 * GEO.EPS_SMALL or dRawH > WD.MAX_HEIGHT + 10 * GEO.EPS_SMALL then if dRawL > WD.MAX_LENGTH + 10 * GEO.EPS_SMALL or dRawW > WD.MAX_WIDTH + 10 * GEO.EPS_SMALL or dRawH > WD.MAX_HEIGHT + 10 * GEO.EPS_SMALL then
local sOut = 'Grezzo (' .. EgtNumToString( dRawL, 2) .. ' x ' .. EgtNumToString( dRawW, 2) .. ' x ' .. EgtNumToString( dRawH, 2) .. ') ' .. local sOut = 'Grezzo (' .. EgtNumToString( dRawL, 2) .. ' x ' .. EgtNumToString( dRawW, 2) .. ' x ' .. EgtNumToString( dRawH, 2) .. ') ' ..
@@ -393,6 +411,11 @@ if bToProcess then
return return
end end
-- Se richiesto per la macchina, ruoto il grezzo di 180 gradi attorno a Z
if WD.RAWPART_ROT and abs( WD.RAWPART_ROT - 180) < 1 then
EgtRotateRawPart( EgtGetFirstRawPart() or GDB_ID.NULL, Z_AX(), 180)
end
-- Imposto Nome file CN -- Imposto Nome file CN
local _, sName, _ = EgtSplitPath( WALL.FILE) local _, sName, _ = EgtSplitPath( WALL.FILE)
EgtSetInfo( EgtGetCurrMachGroup(), 'NcName', sName .. '.cnc') EgtSetInfo( EgtGetCurrMachGroup(), 'NcName', sName .. '.cnc')
@@ -488,7 +511,7 @@ else
-- Passo in modalità lavora -- Passo in modalità lavora
EgtSetCurrMachGroup( EgtGetLastMachGroup()) EgtSetCurrMachGroup( EgtGetLastMachGroup())
-- Se necessario eseguo aggiornamento con ricalcolo delle lavorazioni -- Se necessario eseguo aggiornamento con ricalcolo delle lavorazioni
if bToRecalc then if bToRecalc or WALL.FLAG == 3 or WALL.FLAG == 4 then
EgtOutLog( ' +++ Recalculating all dispositions and machinings >>>') EgtOutLog( ' +++ Recalculating all dispositions and machinings >>>')
EgtImportSetup() EgtImportSetup()
EgtApplyAllMachinings() EgtApplyAllMachinings()
@@ -552,7 +575,8 @@ if ( WALL.FLAG == 0 and ( bToProcess or bToRecalc)) or WALL.FLAG == 3 or WALL.F
end end
-- *** Genero programma CN *** ( se richiesto) -- *** Genero programma CN *** ( se richiesto)
if WALL.FLAG == 0 or WALL.FLAG == 4 then local bIsGenerationEnabled = ( EgtVerifyKeyOption( 110) == false)
if bIsGenerationEnabled and ( WALL.FLAG == 0 or WALL.FLAG == 4) then
EgtOutLog( ' +++ Generating NC part program >>>') EgtOutLog( ' +++ Generating NC part program >>>')
local sInfo = 'EgtCAM5' .. EgtIf( EgtIs64bit(), ' 64bit', '') local sInfo = 'EgtCAM5' .. EgtIf( EgtIs64bit(), ' 64bit', '')
if EgtGetExeVersion then if EgtGetExeVersion then
+31 -23
View File
@@ -1,4 +1,4 @@
-- BatchProcess.lua by Egaltech s.r.l. 2022/05/09 -- BatchProcess.lua by Egaltech s.r.l. 2023/05/04
-- Gestione calcolo batch disposizione e lavorazioni per Pareti -- Gestione calcolo batch disposizione e lavorazioni per Pareti
-- 2021/01/15 Per nuova interfaccia Egt. -- 2021/01/15 Per nuova interfaccia Egt.
-- 2021/11/10 Aggiunta modifica per gestione modifiche manuali come in Beam. -- 2021/11/10 Aggiunta modifica per gestione modifiche manuali come in Beam.
@@ -7,6 +7,7 @@
-- 2022/01/20 Si aggiorna il setup anche quando si creano le lavorazioni (MachGroup vecchio...). -- 2022/01/20 Si aggiorna il setup anche quando si creano le lavorazioni (MachGroup vecchio...).
-- 2022/04/28 In info generazione aggiunta indicazione se 64bit. -- 2022/04/28 In info generazione aggiunta indicazione se 64bit.
-- 2022/05/02 Consentito allargamento area disponibile per grezzi su tavola da WallData. -- 2022/05/02 Consentito allargamento area disponibile per grezzi su tavola da WallData.
-- 2023/05/04 Traduzione messaggi ora fatta direttamente (eliminata codifica $$nn).
-- Intestazioni -- Intestazioni
require( 'EgtBase') require( 'EgtBase')
@@ -45,6 +46,18 @@ EgtOutLog( sLog)
local sLogFile = EgtChangePathExtension( WALL.FILE, '.txt') local sLogFile = EgtChangePathExtension( WALL.FILE, '.txt')
EgtEraseFile( sLogFile) EgtEraseFile( sLogFile)
-- Funzione per traduzione messaggi
local function BWMessageId( nMsgId, sMsg, params)
local sFmt
if WALL.BW and nMsgId and nMsgId > 0 then
sFmt = EgtMsg( 65000 + nMsgId)
end
if not sFmt or #sFmt == 0 then
sFmt = sMsg
end
return string.format( sFmt, table.unpack( params))
end
-- Funzioni per scrittura su file di log specifico -- Funzioni per scrittura su file di log specifico
local function WriteErrToLogFile( nErr, sMsg, nRot, nCutId, nTaskId) local function WriteErrToLogFile( nErr, sMsg, nRot, nCutId, nTaskId)
local hFile = io.open( sLogFile, 'a') local hFile = io.open( sLogFile, 'a')
@@ -55,17 +68,6 @@ local function WriteErrToLogFile( nErr, sMsg, nRot, nCutId, nTaskId)
hFile:write( 'TASKID=' .. tostring( nTaskId or 0) .. '\n') hFile:write( 'TASKID=' .. tostring( nTaskId or 0) .. '\n')
hFile:close() hFile:close()
end end
local function BWMessageId( nMsgId, sMsg, params)
if WALL.BW and nMsgId and nMsgId > 0 then
local sFinalMsg = '$$' .. nMsgId
for Index = 1, #params do
sFinalMsg = sFinalMsg .. ',' .. params[Index]
end
return sFinalMsg
else
return string.format( sMsg, table.unpack( params))
end
end
local function WriteTimeToLogFile( dTime) local function WriteTimeToLogFile( dTime)
local hFile = io.open( sLogFile, 'a') local hFile = io.open( sLogFile, 'a')
@@ -228,7 +230,7 @@ if bToProcess then
end end
if #vWall == 0 then if #vWall == 0 then
WALL.ERR = 14 WALL.ERR = 14
WALL.MSG = 'Error no beams in the file : ' .. WALL.FILE WALL.MSG = 'Error no walls in the file : ' .. WALL.FILE
WriteErrToLogFile( WALL.ERR, WALL.MSG) WriteErrToLogFile( WALL.ERR, WALL.MSG)
PostErrView( WALL.ERR, WALL.MSG) PostErrView( WALL.ERR, WALL.MSG)
return return
@@ -273,11 +275,15 @@ if bToProcess then
dMinY = ( WD.MINRAWY_HOR_DRILL or 2800) dMinY = ( WD.MINRAWY_HOR_DRILL or 2800)
end end
-- Assegno dimensioni del pannello -- Assegno dimensioni del pannello
dPanelLen = vWall[1].Box:getDimX() + 20 local dExtraW = 10
dPanelWidth = math.max( vWall[1].Box:getDimY() + 20, dMinY) if WD.DEFAULT_RAW_NO_EXTRA_WIDTH then
dExtraW = 0
end
dPanelLen = vWall[1].Box:getDimX() + 2 * dExtraW
dPanelWidth = math.max( vWall[1].Box:getDimY() + 2 * dExtraW, dMinY)
-- Assegno posizione prima ed unica parete -- Assegno posizione prima ed unica parete
vWall[1].PosX = 10 vWall[1].PosX = dExtraW
vWall[1].PosZ = 10 vWall[1].PosZ = dExtraW
vWall[1].Rot = 0 vWall[1].Rot = 0
vWall[1].Flip = 0 vWall[1].Flip = 0
end end
@@ -383,8 +389,8 @@ if bToProcess then
if dRawL > WD.MAX_LENGTH + 10 * GEO.EPS_SMALL or dRawW > WD.MAX_WIDTH + 10 * GEO.EPS_SMALL or dRawH > WD.MAX_HEIGHT + 10 * GEO.EPS_SMALL then if dRawL > WD.MAX_LENGTH + 10 * GEO.EPS_SMALL or dRawW > WD.MAX_WIDTH + 10 * GEO.EPS_SMALL or dRawH > WD.MAX_HEIGHT + 10 * GEO.EPS_SMALL then
ResetMachGroup( vWall) ResetMachGroup( vWall)
local sOut = BWMessageId( 1, 'Grezzo (%s x %s x %s) oltre il limite della macchina (%s x %s x %s)', local sOut = BWMessageId( 1, 'Grezzo (%s x %s x %s) oltre il limite della macchina (%s x %s x %s)',
{EgtNumToString( dRawL, 2), EgtNumToString( dRawW, 2), EgtNumToString( dRawH, 2), {EgtNumToString( dRawL, 2), EgtNumToString( dRawW, 2), EgtNumToString( dRawH, 2),
EgtNumToString( WD.MAX_LENGTH, 2), EgtNumToString( WD.MAX_WIDTH, 2), EgtNumToString( WD.MAX_HEIGHT, 2)}) EgtNumToString( WD.MAX_LENGTH, 2), EgtNumToString( WD.MAX_WIDTH, 2), EgtNumToString( WD.MAX_HEIGHT, 2)})
WALL.ERR = 17 WALL.ERR = 17
WALL.MSG = sOut WALL.MSG = sOut
WriteErrToLogFile( WALL.ERR, WALL.MSG) WriteErrToLogFile( WALL.ERR, WALL.MSG)
@@ -395,8 +401,9 @@ if bToProcess then
-- Verifico dimensioni minime del grezzo -- Verifico dimensioni minime del grezzo
if dRawL < WD.MIN_LENGTH - 10 * GEO.EPS_SMALL or dRawW < WD.MIN_WIDTH - 10 * GEO.EPS_SMALL or dRawH < WD.MIN_HEIGHT - 10 * GEO.EPS_SMALL then if dRawL < WD.MIN_LENGTH - 10 * GEO.EPS_SMALL or dRawW < WD.MIN_WIDTH - 10 * GEO.EPS_SMALL or dRawH < WD.MIN_HEIGHT - 10 * GEO.EPS_SMALL then
ResetMachGroup( vWall) ResetMachGroup( vWall)
local sOut = 'Grezzo (' .. EgtNumToString( dRawL, 2) .. ' x ' .. EgtNumToString( dRawW, 2) .. ' x ' .. EgtNumToString( dRawH, 2) .. ') ' .. local sOut = BWMessageId( 2, 'Grezzo (%s x %s x %s) sotto il limite della macchina (%s x %s x %s)',
'sotto il limite della macchina ('..EgtNumToString( WD.MIN_LENGTH, 2)..' x '..EgtNumToString( WD.MIN_WIDTH, 2)..' x '..EgtNumToString( WD.MIN_HEIGHT, 2)..')' {EgtNumToString( dRawL, 2), EgtNumToString( dRawW, 2), EgtNumToString( dRawH, 2),
EgtNumToString( WD.MIN_LENGTH, 2), EgtNumToString( WD.MIN_WIDTH, 2), EgtNumToString( WD.MIN_HEIGHT, 2)})
WALL.ERR = 17 WALL.ERR = 17
WALL.MSG = sOut WALL.MSG = sOut
WriteErrToLogFile( WALL.ERR, WALL.MSG) WriteErrToLogFile( WALL.ERR, WALL.MSG)
@@ -542,7 +549,7 @@ else
-- Passo in modalità lavora -- Passo in modalità lavora
EgtSetCurrMachGroup( EgtGetLastMachGroup()) EgtSetCurrMachGroup( EgtGetLastMachGroup())
-- Se necessario eseguo aggiornamento con setup corrente e ricalcolo delle lavorazioni -- Se necessario eseguo aggiornamento con setup corrente e ricalcolo delle lavorazioni
if bToRecalc then if bToRecalc or WALL.FLAG == 3 or WALL.FLAG == 4 then
EgtOutLog( ' +++ Recalculating all dispositions and machinings >>>') EgtOutLog( ' +++ Recalculating all dispositions and machinings >>>')
EgtImportSetup() EgtImportSetup()
EgtApplyAllMachinings() EgtApplyAllMachinings()
@@ -606,7 +613,8 @@ if ( WALL.FLAG == 0 and ( bToProcess or bToRecalc)) or WALL.FLAG == 3 or WALL.F
end end
-- *** Genero programma CN *** ( se richiesto) -- *** Genero programma CN *** ( se richiesto)
if WALL.FLAG == 0 or WALL.FLAG == 4 then local bIsGenerationEnabled = ( EgtVerifyKeyOption( 110) == false)
if bIsGenerationEnabled and ( WALL.FLAG == 0 or WALL.FLAG == 4) then
EgtOutLog( ' +++ Generating NC part program >>>') EgtOutLog( ' +++ Generating NC part program >>>')
local sInfo = 'EgtCAM5' .. EgtIf( EgtIs64bit(), ' 64bit', '') local sInfo = 'EgtCAM5' .. EgtIf( EgtIs64bit(), ' 64bit', '')
if EgtGetExeVersion then if EgtGetExeVersion then
+26 -49
View File
@@ -1,53 +1,30 @@
REM Compilazione degli script Wall Egaltech 2022.05.09 REM Compilazione degli script Wall Egaltech 2024.03.24
REM Per togliere info di debug aggiungere flag -s prima del nome del file di input REM Per togliere info di debug aggiungere flag -s prima del nome del file di input
REM Compilazione 32 bit REM Compilazione 32 e 64 bit
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WallExec.lua LuaLibs\WallExec.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WallExec.lua -s LuaLibs\WallExec.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WallLib.lua LuaLibs\WallLib.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WallLib.lua -s LuaLibs\WallLib.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WMachiningLib.lua LuaLibs\WMachiningLib.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WMachiningLib.lua -s LuaLibs\WMachiningLib.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessCut.lua LuaLibs\WProcessCut.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessCut.lua -s LuaLibs\WProcessCut.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessDoubleCut.lua LuaLibs\WProcessDoubleCut.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessDoubleCut.lua -s LuaLibs\WProcessDoubleCut.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessDrill.lua LuaLibs\WProcessDrill.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessDrill.lua -s LuaLibs\WProcessDrill.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessDtMortise.lua LuaLibs\WProcessDtMortise.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessDtMortise.lua -s LuaLibs\WProcessDtMortise.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessFreeContour.lua LuaLibs\WProcessFreeContour.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WFeatureTopology.lua -s LuaLibs\WFeatureTopology.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessLapJoint.lua LuaLibs\WProcessLapJoint.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessFreeContour.lua -s LuaLibs\WProcessFreeContour.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessMark.lua LuaLibs\WProcessMark.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessLapJoint.lua -s LuaLibs\WProcessLapJoint.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessMortise.lua LuaLibs\WProcessMortise.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessMark.lua -s LuaLibs\WProcessMark.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessSawCut.lua LuaLibs\WProcessSawCut.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessMortise.lua -s LuaLibs\WProcessMortise.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessText.lua LuaLibs\WProcessText.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessSawCut.lua -s LuaLibs\WProcessSawCut.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\WProcessVariant.lua LuaLibs\WProcessVariant.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessText.lua -s LuaLibs\WProcessText.lua
\EgtProg\Dll32\luac53 -o 32\BatchProcess.lua BatchProcess.lua \EgtProg\Dll32\luac54 -o bin\LuaLibs\WProcessVariant.lua -s LuaLibs\WProcessVariant.lua
\EgtProg\Dll32\luac53 -o 32\BatchProcessNew.lua BatchProcessNew.lua \EgtProg\Dll32\luac54 -o bin\BatchProcess.lua -s BatchProcess.lua
\EgtProg\Dll32\luac53 -o 32\GetWallData.lua GetWallData.lua \EgtProg\Dll32\luac54 -o bin\BatchProcessNew.lua -s BatchProcessNew.lua
\EgtProg\Dll32\luac53 -o 32\NestFlipAndRotate.lua NestFlipAndRotate.lua \EgtProg\Dll32\luac54 -o bin\GetWallData.lua -s GetWallData.lua
\EgtProg\Dll32\luac53 -o 32\NestProcess.lua NestProcess.lua \EgtProg\Dll32\luac54 -o bin\NestFlipAndRotate.lua -s NestFlipAndRotate.lua
\EgtProg\Dll32\luac53 -o 32\Overturn.lua Overturn.lua \EgtProg\Dll32\luac54 -o bin\NestProcess.lua -s NestProcess.lua
\EgtProg\Dll32\luac53 -o 32\Process.lua Process.lua \EgtProg\Dll32\luac54 -o bin\Overturn.lua -s Overturn.lua
\EgtProg\Dll32\luac53 -o 32\Rotate.lua Rotate.lua \EgtProg\Dll32\luac54 -o bin\Process.lua -s Process.lua
\EgtProg\Dll32\luac54 -o bin\Rotate.lua -s Rotate.lua
REM Compilazione 64 bit \EgtProg\Dll32\luac54 -o bin\Version.lua -s Version.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WallExec.lua LuaLibs\WallExec.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WallLib.lua LuaLibs\WallLib.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WMachiningLib.lua LuaLibs\WMachiningLib.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessCut.lua LuaLibs\WProcessCut.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessDoubleCut.lua LuaLibs\WProcessDoubleCut.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessDrill.lua LuaLibs\WProcessDrill.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessDtMortise.lua LuaLibs\WProcessDtMortise.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessFreeContour.lua LuaLibs\WProcessFreeContour.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessLapJoint.lua LuaLibs\WProcessLapJoint.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessMark.lua LuaLibs\WProcessMark.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessMortise.lua LuaLibs\WProcessMortise.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessSawCut.lua LuaLibs\WProcessSawCut.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessText.lua LuaLibs\WProcessText.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\WProcessVariant.lua LuaLibs\WProcessVariant.lua
\EgtProg\Dll64\luac53 -o 64\BatchProcess.lua BatchProcess.lua
\EgtProg\Dll64\luac53 -o 64\BatchProcessNew.lua BatchProcessNew.lua
\EgtProg\Dll64\luac53 -o 64\GetWallData.lua GetWallData.lua
\EgtProg\Dll64\luac53 -o 64\NestFlipAndRotate.lua NestFlipAndRotate.lua
\EgtProg\Dll64\luac53 -o 64\NestProcess.lua NestProcess.lua
\EgtProg\Dll64\luac53 -o 64\Overturn.lua Overturn.lua
\EgtProg\Dll64\luac53 -o 64\Process.lua Process.lua
\EgtProg\Dll64\luac53 -o 64\Rotate.lua Rotate.lua
+4 -1
View File
@@ -1,4 +1,4 @@
-- GetWallData.lua by Egaltech s.r.l. 2022/06/28 -- GetWallData.lua by Egaltech s.r.l. 2023/03/08
-- Recupero dati da file WallData.lua di macchina -- Recupero dati da file WallData.lua di macchina
-- Intestazioni -- Intestazioni
@@ -37,10 +37,13 @@ local WD = require( 'WallData')
-- Assegno valori di interesse -- Assegno valori di interesse
GWD.SIMUL_VIEW_DIR = WD.SIMUL_VIEW_DIR GWD.SIMUL_VIEW_DIR = WD.SIMUL_VIEW_DIR
GWD.ORIG_CORNER = WD.ORIG_CORNER GWD.ORIG_CORNER = WD.ORIG_CORNER
GWD.DELTA_X = WD.DELTA_X
GWD.DELTA_Y = WD.DELTA_Y
GWD.NESTING_CORNER = WD.NESTING_CORNER GWD.NESTING_CORNER = WD.NESTING_CORNER
GWD.HOR_DRILL_DIAM = WD.HOR_DRILL_DIAM GWD.HOR_DRILL_DIAM = WD.HOR_DRILL_DIAM
GWD.MIN_HEIGHT = WD.MIN_HEIGHT GWD.MIN_HEIGHT = WD.MIN_HEIGHT
GWD.MAX_HEIGHT = WD.MAX_HEIGHT GWD.MAX_HEIGHT = WD.MAX_HEIGHT
GWD.BTL_PRIORITY = WD.BTL_PRIORITY
-- Tutto ok -- Tutto ok
GWD.ERR = 0 GWD.ERR = 0
+253
View File
@@ -0,0 +1,253 @@
-- WFeatureTopology.lua by Egaltech s.r.l. 2023/06/23
-- Libreria per classificazione topologica feature pareti
-- 2023/12/11 Modifiche varie per allineamento con Beam.
-- Tabella per definizione modulo
local WFeatureTopology = {}
-- Include
require( 'EgtBase')
-- Carico le librerie
local WL = require( 'WallLib')
EgtOutLog( ' WFeatureTopology started', 1)
---------------------------------------------------------------------
-- restituisce la matrice delle adiacenze di Proc dove i e j sono le facce e a(ij) è l'angolo tra di esse; 0 se nessuna adiacenza
local function GetAdjacencyMatrix( Proc)
local vAdj = {}
for i = 1, Proc.Fct do
vAdj[i] = {}
for j = 1, Proc.Fct do
if i == j then
vAdj[i][j] = 0
else
_, _, _, vAdj[i][j] = EgtSurfTmFacetsContact( Proc.Id, i - 1, j - 1, GDB_ID.ROOT)
if not vAdj[i][j] then vAdj[i][j] = 0 end
end
j = j + 1
end
i = i + 1
end
return vAdj
end
---------------------------------------------------------------------
-- restituisce gli id delle facce di Proc che hanno il numero di adiacenze nAdj
function WFeatureTopology.GetFacesWithGivenAdjacencyNumber( Proc, nAdj)
local vAdj = GetAdjacencyMatrix( Proc)
local vFacesWithGivenAdj = {}
for i = 1, Proc.Fct do
local nAdjCount = 0
for j = 1, Proc.Fct do
if vAdj[i][j] and vAdj[i][j] ~= 0 then
nAdjCount = nAdjCount + 1
end
end
if nAdjCount == nAdj then
table.insert( vFacesWithGivenAdj, i - 1)
end
end
return vFacesWithGivenAdj
end
---------------------------------------------------------------------
-- restituisce true se Proc ha tutti gli angoli concavi (bAllConcave) e, nei casi in cui ha senso, se questi sono esattamente 90 deg (bAllRight)
local function AreAllAnglesConcaveOrRight( Proc)
local vAdj = GetAdjacencyMatrix( Proc)
local bAllConcave, bAllRight = true, true
for i = 1, Proc.Fct do
for j = 1, Proc.Fct do
-- se trovo un angolo convesso restituisco falso e esco subito
if vAdj[i][j] and vAdj[i][j] > 0 then
bAllConcave = false
bAllRight = false
break
elseif vAdj[i][j] and vAdj[i][j] ~= 0 and vAdj[i][j] + 90 > 500 * GEO.EPS_ANG_SMALL then
bAllRight = false
end
end
end
-- se 1 faccia oppure 2 facce con angolo convesso non ha senso ritornare valori per bAllRight
if Proc.Fct < 2 or ( Proc.Fct == 2 and vAdj[1][2] > 0) then
return bAllConcave
else
return bAllConcave, bAllRight
end
end
---------------------------------------------------------------------
-- restituisce true se almeno una delle dimensioni della feature è maggiore o uguale ad una delle dimensioni principali del pezzo (tolleranza 1 mm)
local function IsAnyDimensionLongAsPart( Proc)
local bResult = false
local nBoxSolidId = EgtGetFirstNameInGroup( Proc.PartId or GDB_ID.NULL, 'Box')
local b3Solid = EgtGetBBoxGlob( nBoxSolidId, GDB_BB.STANDARD)
if Proc.Box:getDimX() > b3Solid:getDimX() - 1000 * GEO.EPS_SMALL or
Proc.Box:getDimY() > b3Solid:getDimY() - 1000 * GEO.EPS_SMALL or
Proc.Box:getDimZ() > b3Solid:getDimZ() - 1000 * GEO.EPS_SMALL then
bResult = true
end
return bResult
end
---------------------------------------------------------------------
-- retituisce un vettore con gli indici (0 based) delle facce triangolari (o quasi) di Proc
local function GetTriangularFaces( Proc)
local vTriangularFaces = {}
for i = 1, Proc.Fct do
if WL.Is3EdgesApprox( Proc, i - 1) then
table.insert( vTriangularFaces, i - 1)
end
end
return vTriangularFaces
end
---------------------------------------------------------------------
-- restituisce un vettore contenente gli indici delle facce di Proc parallele ad una delle direzioni principali; il check varia in base alla famiglia topologica
local function GetFacesParallelToPart( Proc, sFamily, bIsThrough)
local vFacesParallelToPart = {}
for i = 0, Proc.Fct - 1 do
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, i, GDB_ID.ROOT)
if sFamily == 'Rabbet' or sFamily == 'Bevel' or sFamily == 'DoubleBevel' or sFamily == 'Strip' or sFamily == 'Tunnel' or ( sFamily == 'Groove' and bIsThrough) then
local vTriangularFaces = GetTriangularFaces( Proc)
local bIsTriangularFace = false
-- verifico se la faccia è triangolare
for j = 1, #vTriangularFaces do
if i == vTriangularFaces[j] then
bIsTriangularFace = true
end
end
-- se faccia triangolare deve avere la normale parallela ad una direzione principale
if bIsTriangularFace then
if AreSameOrOppositeVectorApprox( vtN, X_AX()) or AreSameOrOppositeVectorApprox( vtN, Y_AX()) or AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
table.insert( vFacesParallelToPart, i)
end
-- altrimenti deve avere una componente della normale nulla
else
if abs( vtN:getX()) < 10 * GEO.EPS_SMALL or abs( vtN:getY()) < 10 * GEO.EPS_SMALL or abs( vtN:getZ()) < 10 * GEO.EPS_SMALL then
table.insert( vFacesParallelToPart, i)
end
end
else
-- la normale deve essere parallela ad una direzione principale
if AreSameOrOppositeVectorApprox( vtN, X_AX()) or AreSameOrOppositeVectorApprox( vtN, Y_AX()) or AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
table.insert( vFacesParallelToPart, i)
end
end
end
return vFacesParallelToPart
end
---------------------------------------------------------------------
-- restituisce una stringa con il nome esteso della topologia della feature
-- *famiglia-passante-angoli tutti concavi a 90deg-facce tutte parallele alle dimensioni principali-numero di facce*
local function GetTopologyLongName( sFamily, bIsThrough, bAllRightAngles, bIsParallel, nNumberOfFaces)
-- feature passante o cieca
local sThrough = '_'
if bIsThrough ~= nil then sThrough = EgtIf( bIsThrough, 'Through', 'Blind') end
-- tutti gli angoli della feature sono retti oppure no
local sAllRightAngles = '_'
if bAllRightAngles ~= nil then sAllRightAngles = EgtIf( bAllRightAngles, 'RightAngles', 'NotRightAngles') end
-- tutte le dimensioni della feature sono parallele agli assi principali del pezzo oppure no
local sParallel = '_'
if bIsParallel ~= nil then sParallel = EgtIf( bIsParallel, 'Parallel', 'NotParallel') end
local sLongName = sFamily .. '-' .. sThrough .. '-' .. sAllRightAngles .. '-' .. sParallel .. '-' .. nNumberOfFaces
return sLongName
end
---------------------------------------------------------------------
-- riconosce se Proc è una delle topologie standard e, in caso positivo, ne scrive le caratteristiche in campi specifici della Proc stessa restituendo true
function WFeatureTopology.Classify( Proc, b3Raw)
if not Proc.AffectedFaces then Proc.AffectedFaces = WL.GetProcessAffectedFaces( Proc) end
if not Proc.Box or Proc.Box:isEmpty() then
return false
end
local bRecognized = false
local sFamily
local bIsThrough
local bAllRightAngles
local bIsParallel
local sLongName = ''
-- SE NON HA TUTTE LE FACCE PIANE RITORNARE NIL!!
local bAllAnglesConcave
bAllAnglesConcave, bAllRightAngles = AreAllAnglesConcaveOrRight( Proc)
local vTriangularFaces = GetTriangularFaces( Proc)
local bIsAnyDimensionLongAsPart = IsAnyDimensionLongAsPart( Proc)
local vFacesWithOneAdj = WFeatureTopology.GetFacesWithGivenAdjacencyNumber( Proc, 1)
local vFacesWithTwoAdj = WFeatureTopology.GetFacesWithGivenAdjacencyNumber( Proc, 2)
local vFacesWithThreeAdj = WFeatureTopology.GetFacesWithGivenAdjacencyNumber( Proc, 3)
local vFacesWithFourAdj = WFeatureTopology.GetFacesWithGivenAdjacencyNumber( Proc, 4)
local dRawW, dRawH, dRawL = b3Raw:getDimY(), b3Raw:getDimZ(), b3Raw:getDimX()
local bIsFeatureCuttingEntireSection = WL.IsFeatureCuttingEntireSection( Proc.Box, dRawW, dRawH, dRawL)
if Proc.IsOutline then
sFamily = 'OUTLINE'
elseif Proc.Prc == 40 then
sFamily = 'DRILLING'
elseif Proc.Fct == 1 and bIsAnyDimensionLongAsPart and bIsFeatureCuttingEntireSection then
sFamily = 'Cut'
bIsThrough = true
elseif Proc.Fct == 1 and bIsAnyDimensionLongAsPart then
sFamily = 'Bevel'
bIsThrough = true
elseif Proc.Fct == 2 and bAllAnglesConcave and #vTriangularFaces == 1 then
sFamily = 'Bevel'
bIsThrough = false
elseif Proc.Fct == 2 and bAllAnglesConcave and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right) and ( Proc.AffectedFaces.Front or Proc.AffectedFaces.Back) then
sFamily = 'Rabbet'
bIsThrough = true
elseif Proc.Fct == 2 and bAllAnglesConcave then
sFamily = 'Groove'
bIsThrough = true
elseif Proc.Fct == 2 and not bAllAnglesConcave and bIsAnyDimensionLongAsPart then
sFamily = 'DoubleBevel'
bIsThrough = true
elseif Proc.Fct == 3 and bAllAnglesConcave and #vFacesWithTwoAdj == 1 and #vTriangularFaces == 2 then
sFamily = 'Bevel'
bIsThrough = false
elseif Proc.Fct == 3 and bAllAnglesConcave and #vFacesWithTwoAdj == 1 and bIsAnyDimensionLongAsPart then
sFamily = 'Groove'
bIsThrough = true
elseif Proc.Fct == 3 and bAllAnglesConcave and #vFacesWithTwoAdj == 3 then
sFamily = 'Groove'
bIsThrough = false
elseif Proc.Fct == 4 and bAllAnglesConcave and #vFacesWithThreeAdj == 2 then
sFamily = 'Groove'
bIsThrough = false
elseif Proc.Fct == 4 and bAllAnglesConcave and #vFacesWithTwoAdj == 4 and bIsAnyDimensionLongAsPart then
sFamily = 'Tunnel'
bIsThrough = true
elseif Proc.Fct >= 4 and #vFacesWithOneAdj == 2 and bIsAnyDimensionLongAsPart then
sFamily = 'Strip'
bIsThrough = true
elseif Proc.Fct == 5 and bAllAnglesConcave and #vFacesWithFourAdj == 1 then
sFamily = 'Pocket'
bIsThrough = false
end
local vFacesParallelToPart = GetFacesParallelToPart( Proc, sFamily, bIsThrough)
bIsParallel = ( #vFacesParallelToPart == Proc.Fct)
if sFamily == 'OUTLINE' or sFamily == 'DRILLING' then
Proc.Topology = sFamily
Proc.TopologyLongName = sFamily
bRecognized = true
elseif sFamily then
sLongName = GetTopologyLongName( sFamily, bIsThrough, bAllRightAngles, bIsParallel, Proc.Fct)
Proc.Topology, Proc.IsThrough, Proc.AllRightAngles, Proc.IsParallel, Proc.TopologyLongName = sFamily, bIsThrough, bAllRightAngles, bIsParallel, sLongName
bRecognized = true
else
Proc.Topology = 'OTHER'
Proc.TopologyLongName = 'OTHER'
end
return bRecognized
end
-------------------------------------------------------------------------------------------------------------
return WFeatureTopology
+97 -8
View File
@@ -1,5 +1,10 @@
-- MachiningLib.lua by Egaltech s.r.l. 2022/01/12 -- MachiningLib.lua by Egaltech s.r.l. 2023/10/18
-- Libreria ricerca lavorazioni per Pareti -- Libreria ricerca lavorazioni per Pareti
-- 2023/03/09 Piccola correzione alla SideDepth in FindMilling
-- In FindMilling aggiunta gestione spessore e massimo materiale nel caso di lam
-- 2023/05/25 Aggiunta funzione AddMachining che incapsula EgtAddMachining trascrivendo le priorità btl dalle feature alle lavorazioni.
-- 2023/10/18 In SetCurrMachiningAndTool sostituito controllo di utensile attivo con controllo utensile nel setup corrente.
-- 2023/11/14 Modifiche sostanziali per l'aggiunta delle lavorazioni in doppio e per il miglioramento nella gestione delle tasche.
-- Tabella per definizione modulo -- Tabella per definizione modulo
local WMachiningLib = {} local WMachiningLib = {}
@@ -28,7 +33,7 @@ local function SetCurrMachiningAndTool( sMachName)
local sTool = EgtTdbGetToolFromUUID( sTuuid) local sTool = EgtTdbGetToolFromUUID( sTuuid)
if not sTool then return false end if not sTool then return false end
if not EgtTdbSetCurrTool( sTool) then return false end if not EgtTdbSetCurrTool( sTool) then return false end
return EgtTdbGetCurrToolParam( MCH_TP.ACTIVE) return EgtFindToolInCurrSetup( sTool)
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
@@ -51,19 +56,21 @@ function WMachiningLib.FindCutting( sType, dDepth, nTool_ID)
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function WMachiningLib.FindMilling( sType, dDepth, sTuuid, nTool_ID, dMaxDiam, dMaxMat, bTipFeed, dMinSideElev) function WMachiningLib.FindMilling( sType, dDepth, sTuuid, nTool_ID, dMaxDiam, dMaxMat, bTipFeed, dMinSideElev, sHead)
for i = 1, #Millings do for i = 1, #Millings do
local Milling = Millings[i] local Milling = Millings[i]
if Milling.On and Milling.Type == sType and SetCurrMachiningAndTool( Milling.Name) then if Milling.On and Milling.Type == sType and SetCurrMachiningAndTool( Milling.Name) then
local bIsBlade = ( EgtTdbGetCurrToolParam( MCH_TP.TYPE) & MCH_TF.SAWBLADE ~= 0) or false
local nMchType = EgtMdbGetCurrMachiningParam( MCH_MP.TYPE) local nMchType = EgtMdbGetCurrMachiningParam( MCH_MP.TYPE)
local sMyTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID) local sMyTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
local dTMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) local dTMaxMat = EgtIf( bIsBlade, EgtTdbGetCurrToolParam( MCH_TP.THICK), EgtTdbGetCurrToolParam( MCH_TP.MAXMAT))
local dTMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, dTMaxMat, EgtTdbGetCurrToolMaxDepth()) local dTMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, dTMaxMat, EgtTdbGetCurrToolMaxDepth())
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
local dTDiamTh = EgtTdbGetCurrToolThDiam() or 0 local dTDiamTh = EgtTdbGetCurrToolThDiam() or 0
local dTTipFeed = EgtTdbGetCurrToolParam( MCH_TP.TIPFEED) local dTTipFeed = EgtTdbGetCurrToolParam( MCH_TP.TIPFEED)
local dTMaxDepthOnSide = min( EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or 0, 0.5 * ( dTDiam - dTDiamTh)) local dTMaxDepthOnSide = EgtIf( bIsBlade, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), min( EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or 999, 0.5 * ( dTDiam - dTDiamTh)))
local nMyTool_ID = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'Tool_ID', 'i') local nMyTool_ID = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'Tool_ID', 'i')
local sMyHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
if nMchType == MCH_MY.MILLING and if nMchType == MCH_MY.MILLING and
( not sTuuid or sTuuid == sMyTuuid) and ( not sTuuid or sTuuid == sMyTuuid) and
( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) and ( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) and
@@ -71,7 +78,8 @@ function WMachiningLib.FindMilling( sType, dDepth, sTuuid, nTool_ID, dMaxDiam, d
( not dMaxMat or dTMaxMat < dMaxMat + GEO.EPS_SMALL) and ( not dMaxMat or dTMaxMat < dMaxMat + GEO.EPS_SMALL) and
( not bTipFeed or dTTipFeed > 1) and ( not bTipFeed or dTTipFeed > 1) and
( not dMinSideElev or dTMaxDepthOnSide > dMinSideElev - GEO.EPS_SMALL) and ( not dMinSideElev or dTMaxDepthOnSide > dMinSideElev - GEO.EPS_SMALL) and
( not nTool_ID or nTool_ID == 0 or nTool_ID == nMyTool_ID) then ( not nTool_ID or nTool_ID == 0 or nTool_ID == nMyTool_ID) and
( not sHead or sHead == sMyHead) then
return Milling.Name, dTMaxDepth, dTMaxMat, dTDiam return Milling.Name, dTMaxDepth, dTMaxMat, dTDiam
end end
end end
@@ -94,7 +102,8 @@ function WMachiningLib.FindNailing( nType)
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function WMachiningLib.FindPocketing( sType, dMaxDiam, dDepth, nTool_ID) function WMachiningLib.FindPocketing( sType, dMaxDiam, dDepth, nTool_ID, sHead, bExcludeNoTipFeed, dDistanceToNearestPart)
if not dMaxDiam then dMaxDiam = 999 end
for i = 1, #Pocketings do for i = 1, #Pocketings do
local Pocketing = Pocketings[i] local Pocketing = Pocketings[i]
if Pocketing.On and Pocketing.Type == sType and SetCurrMachiningAndTool( Pocketing.Name) then if Pocketing.On and Pocketing.Type == sType and SetCurrMachiningAndTool( Pocketing.Name) then
@@ -102,10 +111,23 @@ function WMachiningLib.FindPocketing( sType, dMaxDiam, dDepth, nTool_ID)
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
local dTMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), EgtTdbGetCurrToolMaxDepth()) local dTMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), EgtTdbGetCurrToolMaxDepth())
local nMyTool_ID = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'Tool_ID', 'i') local nMyTool_ID = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'Tool_ID', 'i')
local sMyHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
local bHasTipFeed = ( EgtTdbGetCurrToolParam( MCH_TP.TIPFEED) ~= 0)
-- attacco con rampa molto lunga e step basso, utilizzabile anche con frese che non lavorano di testa
local bIsSpecialLeadIn = ( EgtMdbGetCurrMachiningParam( MCH_MP.LEADINTYPE) == MCH_POCK_LI.ZIGZAG or MCH_POCK_LI.HELIX) and
( ( EgtMdbGetCurrMachiningParam( MCH_MP.LITANG) or 0) > dTDiam - 1 - 10 * GEO.EPS_SMALL) and
( ( EgtMdbGetCurrMachiningParam( MCH_MP.LIELEV) or 999) <= 2)
local bIsSpiralOut = EgtMdbGetCurrMachiningParam( MCH_MP.SUBTYPE) == MCH_POCK_SUB.SPIRALOUT
-- se ho un altro pezzo troppo vicino riduco il diametro massimo utensile
if dDistanceToNearestPart then
dMaxDiam = min( dMaxDiam, EgtIf( bIsSpiralOut, dDistanceToNearestPart * 2 + 5, dDistanceToNearestPart + 5))
end
if nMchType == MCH_MY.POCKETING and if nMchType == MCH_MY.POCKETING and
( not dMaxDiam or dTDiam < dMaxDiam + GEO.EPS_SMALL) and ( not dMaxDiam or dTDiam < dMaxDiam + GEO.EPS_SMALL) and
( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) and ( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) and
( not nTool_ID or nTool_ID == 0 or nTool_ID == nMyTool_ID) then ( not nTool_ID or nTool_ID == 0 or nTool_ID == nMyTool_ID) and
( not sHead or sHead == sMyHead) and
( not bExcludeNoTipFeed or bHasTipFeed or bIsSpecialLeadIn) then
return Pocketing.Name, dTDiam, dTMaxDepth return Pocketing.Name, dTDiam, dTMaxDepth
end end
end end
@@ -177,5 +199,72 @@ function WMachiningLib.FindSurfacing( sType)
end end
end end
---------------------------------------------------------------------
-- incapsulo EgtAddMachining e trascrivo alcune informazioni utili nelle note dell'operazione
function WMachiningLib.AddMachining( Proc, sName, sMachining)
local nMchId, sFinalName = EgtAddMachining( sName, sMachining)
if type( Proc) == 'table' then
local nPriority = EgtGetInfo( Proc.Id or GDB_ID.NULL, 'PRIORITY', 'i')
EgtSetInfo( nMchId or GDB_ID.NULL, 'PRIORITY', nPriority)
EgtSetInfo( nMchId or GDB_ID.NULL, 'ISOUTLINE', Proc.IsOutline)
end
return nMchId, sFinalName
end
---------------------------------------------------------------------
-- verifica se utensile sToolMasterName e gemello sToolDoubleName sono compatibili con la specchiatura
function WMachiningLib.IsToolDoubleOk( sToolMasterName, sToolDoubleName)
local bIsToolDoubleOk = false
-- dimensioni utensile master
EgtTdbSetCurrTool( sToolMasterName)
local bIsBlade = ( EgtTdbGetCurrToolParam( MCH_TP.TYPE) & MCH_TF.SAWBLADE ~= 0) or false
local dTMaxMat = EgtIf( bIsBlade, EgtTdbGetCurrToolParam( MCH_TP.THICK), EgtTdbGetCurrToolParam( MCH_TP.MAXMAT))
local dTMaxDepth = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, dTMaxMat, EgtTdbGetCurrToolMaxDepth())
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
local dTDiamTh = EgtTdbGetCurrToolThDiam() or 0
local bHasTipFeed = EgtTdbGetCurrToolParam( MCH_TP.TIPFEED) ~= 0
local dTMaxDepthOnSide = EgtIf( bIsBlade, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), min( EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or 999, 0.5 * ( dTDiam - dTDiamTh)))
local bIsPrimaryHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD) == 'H1'
-- dimensioni utensile double
EgtTdbSetCurrTool( sToolDoubleName)
local bIsBladeDouble = ( EgtTdbGetCurrToolParam( MCH_TP.TYPE) & MCH_TF.SAWBLADE ~= 0) or false
local dTMaxMatDouble = EgtIf( bIsBladeDouble, EgtTdbGetCurrToolParam( MCH_TP.THICK), EgtTdbGetCurrToolParam( MCH_TP.MAXMAT))
local dTMaxDepthDouble = EgtIf( WD.MILL_MAX_DEPTH_AS_MAT, dTMaxMatDouble, EgtTdbGetCurrToolMaxDepth())
local dTDiamDouble = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
local dTDiamThDouble = EgtTdbGetCurrToolThDiam() or 0
local bHasTipFeedDouble = EgtTdbGetCurrToolParam( MCH_TP.TIPFEED) ~= 0
local dTMaxDepthOnSideDouble = EgtIf( bIsBladeDouble, EgtTdbGetCurrToolParam( MCH_TP.MAXMAT), min( EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'SIDEDEPTH', 'd') or 999, 0.5 * ( dTDiamDouble - dTDiamThDouble)))
-- controllo che siano uguali ( permetto una leggera differenza di lunghezza)
local dMaxLengthDifference = 6.5
bIsToolDoubleOk = bIsPrimaryHead and
( bIsBlade == bIsBladeDouble) and
( dTMaxMatDouble > dTMaxMat - 100 * GEO.EPS_SMALL) and
( dTMaxDepthDouble > dTMaxDepth - dMaxLengthDifference) and
( abs( dTDiam - dTDiamDouble) < 100 * GEO.EPS_SMALL) and
( abs( dTDiamTh - dTDiamThDouble) < 100 * GEO.EPS_SMALL) and
( bHasTipFeed == bHasTipFeedDouble) and
( abs( dTMaxDepthOnSide - dTMaxDepthOnSideDouble) < GEO.EPS_SMALL) and
EgtFindToolInCurrSetup( sToolDoubleName)
return bIsToolDoubleOk
end
---------------------------------------------------------------------
-- verifica se la lavorazione sMachining è adatta alla specchiatura
function WMachiningLib.IsMachiningOkForDouble( sMachining)
local bDoubleOk = false
if sMachining and EgtMdbSetCurrMachining( sMachining) then
-- recupero l'utensile della lavorazione
local sToolMasterName = EgtMdbGetCurrMachiningParam( MCH_MP.TOOL)
if EgtTdbSetCurrTool( sToolMasterName or '') then
-- cerco eventuale utensile in doppio
local sToolDoubleName = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'DOUBLE', 's')
if sToolDoubleName and EgtTdbSetCurrTool( sToolDoubleName) then
bDoubleOk = WMachiningLib.IsToolDoubleOk( sToolMasterName, sToolDoubleName)
end
end
end
return bDoubleOk
end
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------
return WMachiningLib return WMachiningLib
+4 -3
View File
@@ -1,5 +1,6 @@
-- WProcessCut.lua by Egaltech s.r.l. 2020/11/25 -- WProcessCut.lua by Egaltech s.r.l. 2020/11/25
-- Gestione calcolo taglio di testa o longitudinale per Pareti -- Gestione calcolo taglio di testa o longitudinale per Pareti
-- 2023/07/26 Angolo Z minimo ora gestito tramite costante da WallData CUT_VZ_MIN (default sempre -0.5).
-- Tabella per definizione modulo -- Tabella per definizione modulo
local WPC = {} local WPC = {}
@@ -31,7 +32,7 @@ function WPC.Classify( Proc, b3Raw)
if Proc.Fct ~= 1 then return false end if Proc.Fct ~= 1 then return false end
-- controllo la normale -- controllo la normale
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, 0, GDB_ID.ROOT) local vtN = EgtSurfTmFacetNormVersor( Proc.Id, 0, GDB_ID.ROOT)
if vtN:getZ() < - 0.5 then return false end if vtN:getZ() < ( WD.CUT_VZ_MIN or - 0.5) then return false end
return true return true
end end
@@ -46,7 +47,7 @@ function WPC.FlipClassify( Proc)
local vtNZ = vtN:getZ() local vtNZ = vtN:getZ()
if vtNZ > - GEO.EPS_SMALL then if vtNZ > - GEO.EPS_SMALL then
nFlip0 = 100 nFlip0 = 100
elseif vtNZ < -0.5 then elseif vtNZ < ( WD.CUT_VZ_MIN or - 0.5) then
nFlip0 = 0 nFlip0 = 0
else else
nFlip0 = 50 nFlip0 = 50
@@ -54,7 +55,7 @@ function WPC.FlipClassify( Proc)
if - vtNZ > - GEO.EPS_SMALL then if - vtNZ > - GEO.EPS_SMALL then
nFlip1 = 100 nFlip1 = 100
elseif - vtNZ < -0.5 then elseif - vtNZ < ( WD.CUT_VZ_MIN or - 0.5) then
nFlip1 = 0 nFlip1 = 0
else else
nFlip1 = 50 nFlip1 = 50
+10 -1
View File
@@ -1,5 +1,7 @@
-- WProcessDoubleCut.lua by Egaltech s.r.l. 2021/04/28 -- WProcessDoubleCut.lua by Egaltech s.r.l. 2023/04/17
-- Gestione calcolo doppi tagli di lama per Pareti -- Gestione calcolo doppi tagli di lama per Pareti
-- 2023/04/17 Quando si chiama LapJoint si trasforma il Gruppo da 1 a 3 e da 2 a 4.
-- 2023/11/14 Aggiunta funzione IdentifyStrict per il riconoscimento della sola feature L011.
-- Tabella per definizione modulo -- Tabella per definizione modulo
local WPDC = {} local WPDC = {}
@@ -23,6 +25,12 @@ function WPDC.Identify( Proc)
( Proc.Grp == 0 and Proc.Prc == 12)) ( Proc.Grp == 0 and Proc.Prc == 12))
end end
---------------------------------------------------------------------
-- Riconoscimento della sola feature L011
function WPDC.IdentifyStrict( Proc)
return ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 11
end
--------------------------------------------------------------------- ---------------------------------------------------------------------
-- Classificazione della feature -- Classificazione della feature
function WPDC.Classify( Proc, b3Raw) function WPDC.Classify( Proc, b3Raw)
@@ -58,6 +66,7 @@ function WPDC.Make( Proc, nRawId, b3Raw)
-- se singola faccia, passo a quella lavorazione -- se singola faccia, passo a quella lavorazione
if Proc.Fct == 1 then return Cut.Make( Proc, nRawId, b3Raw) end if Proc.Fct == 1 then return Cut.Make( Proc, nRawId, b3Raw) end
-- altrimenti due facce e passo alla LapJoint -- altrimenti due facce e passo alla LapJoint
Proc.Grp = Proc.Grp + 2
return LapJoint.Make( Proc, nRawId, b3Raw) return LapJoint.Make( Proc, nRawId, b3Raw)
end end
+100 -27
View File
@@ -8,6 +8,8 @@
-- 2022/01/29 DS Corretta gestione ingombro portautensili per fori inclinati da sopra. -- 2022/01/29 DS Corretta gestione ingombro portautensili per fori inclinati da sopra.
-- 2022/02/22 ES Aggiunta gestione prefori. -- 2022/02/22 ES Aggiunta gestione prefori.
-- 2022/03/08 DS Vanno accettati fori orizzontali sul bordo anche senza foratori orizzontali speciali. -- 2022/03/08 DS Vanno accettati fori orizzontali sul bordo anche senza foratori orizzontali speciali.
-- 2023/05/25 Funzioni EgtAddMachining sostituite da WM.AddMachining in modo da trascrivere le priorità da btl alle lavorazioni.
-- 2023/11/14 Aggiunta gestione forature in doppio.
-- Tabella per definizione modulo -- Tabella per definizione modulo
local WPD = {} local WPD = {}
@@ -137,7 +139,7 @@ function WPD.RotateClassify( Proc)
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB) local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
local ptCen = EgtCP( AuxId, GDB_RT.GLOB) local ptCen = EgtCP( AuxId, GDB_RT.GLOB)
-- se foro orizzontale con punta lunga -- se foro orizzontale con punta lunga
if dDiam <= WD.HOR_DRILL_DIAM + WD.DRILL_TOL and dDiam >= WD.HOR_DRILL_DIAM - WD.DRILL_TOL and vtExtr:getZ() > -0.1 and vtExtr:getZ() < 0.1 then if dDiam <= ( WD.HOR_DRILL_DIAM or 35) + WD.DRILL_TOL and dDiam >= ( WD.HOR_DRILL_DIAM or 35) - WD.DRILL_TOL and vtExtr:getZ() > -0.1 and vtExtr:getZ() < 0.1 then
-- se orientato perpendicolare ad X -- se orientato perpendicolare ad X
if AreSameOrOppositeVectorApprox( vtExtr, X_AX()) then if AreSameOrOppositeVectorApprox( vtExtr, X_AX()) then
nRot0 = 0 nRot0 = 0
@@ -155,6 +157,41 @@ function WPD.RotateClassify( Proc)
end end
end end
---------------------------------------------------------------------
local function IsToolDoubleOk( sToolMasterName, sToolDoubleName)
local bIsToolDoubleOk = false
-- dimensioni utensile master
EgtTdbSetCurrTool( sToolMasterName)
local dTMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
-- dimensioni utensile double
EgtTdbSetCurrTool( sToolDoubleName)
local dTMaxMatDouble = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
local dTDiamDouble = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
-- controllo che siano uguali
bIsToolDoubleOk = ( dTMaxMatDouble > dTMaxMat - 100 * GEO.EPS_SMALL) and
( abs( dTDiam - dTDiamDouble) < 100 * GEO.EPS_SMALL) and
EgtFindToolInCurrSetup( sToolDoubleName)
return bIsToolDoubleOk
end
---------------------------------------------------------------------
local function IsMachiningOkForDouble( sMachining)
local bDoubleOk = false
if sMachining and EgtMdbSetCurrMachining( sMachining) then
-- recupero l'utensile della lavorazione
local sToolMasterName = EgtMdbGetCurrMachiningParam( MCH_MP.TOOL)
if EgtTdbSetCurrTool( sToolMasterName or '') then
-- cerco eventuale utensile in doppio
local sToolDoubleName = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'DOUBLE', 's')
if sToolDoubleName and EgtTdbSetCurrTool( sToolDoubleName) then
bDoubleOk = IsToolDoubleOk( sToolMasterName, sToolDoubleName)
end
end
end
return bDoubleOk
end
--------------------------------------------------------------------- ---------------------------------------------------------------------
local function IsHorizLongDrill( Proc) local function IsHorizLongDrill( Proc)
-- recupero e verifico l'entità foro -- recupero e verifico l'entità foro
@@ -262,10 +299,21 @@ function WPD.Make( Proc, nRawId, b3Raw)
end end
end end
end end
local bUseDLenToFindDrilling = true
local sDrilling, nType = WM.FindDrilling( dDiam, dLen, sHead) local sDrilling, nType = WM.FindDrilling( dDiam, dLen, sHead)
if not sDrilling then if not sDrilling then
bUseDLenToFindDrilling = false
sDrilling, nType = WM.FindDrilling( dDiam, nil, sHead) sDrilling, nType = WM.FindDrilling( dDiam, nil, sHead)
end end
-- se Proc è settata per essere specchiata cerco la lavorazione adatta e verifico possa essere effettivamente specchiata
if Proc.Double and Proc.Double == 2 then
local sDrillingBackup = sDrilling
sDrilling = WM.FindDrilling( dDiam, EgtIf( bUseDLenToFindDrilling, dLen, nil), 'H1')
if not IsMachiningOkForDouble( sDrilling) then
Proc.Double = 0
sDrilling = sDrillingBackup
end
end
if sHead and not sDrilling then if sHead and not sDrilling then
sDrilling, nType = WM.FindDrilling( dDiam, dLen) sDrilling, nType = WM.FindDrilling( dDiam, dLen)
if not sDrilling then if not sDrilling then
@@ -276,32 +324,41 @@ function WPD.Make( Proc, nRawId, b3Raw)
local bAngledContourDrill = false local bAngledContourDrill = false
local nAngledContourDrillId = GDB_ID.NULL local nAngledContourDrillId = GDB_ID.NULL
local dReduceDepth = 0 local dReduceDepth = 0
local bUseTabs = false
-- se trovata svuotatura, verifico se richiesta invece contornatura -- se trovata svuotatura, verifico se richiesta invece contornatura
if nType == 'Pocket' then if nType == 'Pocket' then
-- recupero eventuale flag per fare sola contornatura -- recupero eventuale flag per fare sola contornatura
local nContourOnly = ( EgtGetInfo( Proc.Id, sContourOnly, 'i') or 0) local nContourOnly = ( EgtGetInfo( Proc.Id, sContourOnly, 'i') or 0)
if nContourOnly == 1 then if nContourOnly == 1 then
-- imposto riduzione profondita' per evitare distacco pezzo interno -- se passante
dReduceDepth = 5 if Proc.Fcs > 0 and Proc.Fce > 0 then
-- se inclinato e passante -- se inclinato
if abs( vtExtr:getZ()) >= WD.DRILL_VZ_MIN and abs( vtExtr:getZ()) < 0.999 and Proc.Fcs > 0 and Proc.Fce > 0 then if abs( vtExtr:getZ()) >= WD.DRILL_VZ_MIN and abs( vtExtr:getZ()) < 0.999 then
-- gruppo ausiliario per preforo -- gruppo ausiliario per preforo
local nAddGrpId = WL.GetAddGroup( Proc.PartId) local nAddGrpId = WL.GetAddGroup( Proc.PartId)
-- ricavo contorno inferiore della superficie -- ricavo contorno inferiore della superficie
local nAngledCircleId, nAngledCircleCnt = EgtExtractSurfTmLoops( Proc.Id, nAddGrpId) local nAngledCircleId, nAngledCircleCnt = EgtExtractSurfTmLoops( Proc.Id, nAddGrpId)
local dMinZ = 10000 local dMinZ = 10000
local nMinCircleId = GDB_ID.NULL local nMinCircleId = GDB_ID.NULL
for Circleindex = 1, nAngledCircleCnt do for Circleindex = 1, nAngledCircleCnt do
local b3Circle = EgtGetBBoxGlob( nAngledCircleId + Circleindex -1, GDB_BB.EXACT) local b3Circle = EgtGetBBoxGlob( nAngledCircleId + Circleindex -1, GDB_BB.EXACT)
if b3Circle:getMin():getZ() < dMinZ then if b3Circle:getMin():getZ() < dMinZ then
nMinCircleId = nAngledCircleId + Circleindex -1 nMinCircleId = nAngledCircleId + Circleindex -1
end
end end
-- estrudo
EgtModifyCurveExtrusion( nMinCircleId, vtExtr, GDB_RT.GLOB)
EgtModifyCurveThickness( nMinCircleId, dLen)
bAngledContourDrill = true
nAngledContourDrillId = nMinCircleId
-- se non inclinato e abbastanza grande uso i tab
-- TODO se si risolve il problema dei tabs non funzionanti sotto ai 200 mm rimuovere il check sul diametro
elseif dDiam > 100 - 10 * GEO.EPS_SMALL then
bUseTabs = true
-- se non inclinato e piccolo non arrivo sul fondo
else
dReduceDepth = 5
end end
-- estrudo
EgtModifyCurveExtrusion( nMinCircleId, vtExtr, GDB_RT.GLOB)
EgtModifyCurveThickness( nMinCircleId, dLen)
bAngledContourDrill = true
nAngledContourDrillId = nMinCircleId
end end
sDrilling = WM.FindMilling( 'FreeContour', dLen, nil, nil, nil, nil, true) sDrilling = WM.FindMilling( 'FreeContour', dLen, nil, nil, nil, nil, true)
if sDrilling then if sDrilling then
@@ -375,7 +432,7 @@ function WPD.Make( Proc, nRawId, b3Raw)
end end
-- inserisco la lavorazione -- inserisco la lavorazione
local sName = EgtIf( sHead == 'H5' or sHead == 'H6', 'LhDrill_', 'Drill_') .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local sName = EgtIf( sHead == 'H5' or sHead == 'H6', 'LhDrill_', 'Drill_') .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchId = EgtAddMachining( sName, sDrilling) local nMchId = WM.AddMachining( Proc, sName, sDrilling)
if not nMchId then if not nMchId then
local sErr = 'Error adding machining ' .. sName .. '-' .. sDrilling local sErr = 'Error adding machining ' .. sName .. '-' .. sDrilling
EgtOutLog( sErr) EgtOutLog( sErr)
@@ -446,22 +503,38 @@ function WPD.Make( Proc, nRawId, b3Raw)
end end
end end
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth) EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
-- Note utente -- leggo eventuali note esistenti della lavorazione
local sUserNotes = '' local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES)
-- se foratura o svuotatura, dichiarazione nessuna generazione sfridi per Vmill -- se foratura o svuotatura, dichiarazione nessuna generazione sfridi per Vmill
if nType == 'Drill' or nType == 'Pocket' then if nType == 'Drill' or nType == 'Pocket' then
sUserNotes = 'VMRS=0;' sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
end end
-- se foratura -- se foratura
if nType == 'Drill' then if nType == 'Drill' then
-- aggiungo alle note massima elevazione (coincide con affondamento) -- aggiungo alle note massima elevazione (coincide con affondamento)
sUserNotes = sUserNotes .. 'MaxElev=' .. EgtNumToString( dDepth, 1) .. ';' sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dDepth, 1))
-- se foro passante, aggiungo questa qualifica alle note -- se foro passante, aggiungo questa qualifica alle note
if bOpen then if bOpen then
sUserNotes = sUserNotes .. 'Open=1;' sUserNotes = EgtSetValInNotes( sUserNotes, 'Open', 1)
end end
end end
-- se lavorazione in doppio aggiungo le rispettive note
if Proc.Double and Proc.Double == 2 then
sUserNotes = EgtSetValInNotes( sUserNotes, 'DOUBLE', Proc.Double)
sUserNotes = EgtSetValInNotes( sUserNotes, 'MirrorAx', Proc.MirrorAx)
end
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes) EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
if bUseTabs then
local dStep = EgtGetMachiningParam( MCH_MP.STEP)
EgtSetMachiningParam( MCH_MP.STEPTYPE, MCH_MILL_ST.ONEWAY)
EgtSetMachiningParam( MCH_MP.LEAVETAB, true)
EgtSetMachiningParam( MCH_MP.TABHEIGHT, EgtClamp( dStep, 0.15 * dDepth, 0.25 * dDepth ))
EgtSetMachiningParam( MCH_MP.TABLEN, EgtClamp( 2 * dDiamT, 0.1 * dDiam, 0.2 * dDiam ))
EgtSetMachiningParam( MCH_MP.TABANGLE, 45)
EgtSetMachiningParam( MCH_MP.TABDIST, 100)
EgtSetMachiningParam( MCH_MP.TABMIN, 3)
EgtSetMachiningParam( MCH_MP.TABMAX, 3)
end
-- eseguo -- eseguo
if not EgtApplyMachining( true, false) then if not EgtApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError() local _, sErr = EgtGetLastMachMgrError()
@@ -505,7 +578,7 @@ function WPD.Make( Proc, nRawId, b3Raw)
-- inserisco la lavorazione -- inserisco la lavorazione
local sName = 'PreDrill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local sName = 'PreDrill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchId = EgtAddMachining( sName, sDrilling) local nMchId = WM.AddMachining( Proc, sName, sDrilling)
if not nMchId then if not nMchId then
local sErr = 'Error adding machining ' .. sName .. '-' .. sDrilling local sErr = 'Error adding machining ' .. sName .. '-' .. sDrilling
EgtOutLog( sErr) EgtOutLog( sErr)
+3 -2
View File
@@ -2,6 +2,7 @@
-- Gestione calcolo mortase a coda di rondine per Pareti -- Gestione calcolo mortase a coda di rondine per Pareti
-- Tabella per definizione modulo -- Tabella per definizione modulo
-- 2023/05/25 Funzioni EgtAddMachining sostituite da WM.AddMachining in modo da trascrivere le priorità da btl alle lavorazioni.
local WPDM= {} local WPDM= {}
-- Include -- Include
@@ -159,7 +160,7 @@ function WPDM.Make( Proc, nRawId, b3Raw)
end end
-- inserisco la lavorazione di svuotatura -- inserisco la lavorazione di svuotatura
local sName = 'DtMtPck_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local sName = 'DtMtPck_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchFId = EgtAddMachining( sName, sPocketing) local nMchFId = WM.AddMachining( Proc, sName, sPocketing)
if not nMchFId then if not nMchFId then
local sErr = 'Error adding machining ' .. sName .. '-' .. sPocketing local sErr = 'Error adding machining ' .. sName .. '-' .. sPocketing
EgtOutLog( sErr) EgtOutLog( sErr)
@@ -189,7 +190,7 @@ function WPDM.Make( Proc, nRawId, b3Raw)
for i = nPass, 1, -1 do for i = nPass, 1, -1 do
-- inserisco la lavorazione di contornatura -- inserisco la lavorazione di contornatura
local sNameF = 'DtMt_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( nPass) local sNameF = 'DtMt_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( nPass)
local nMchFId = EgtAddMachining( sNameF, sMilling) local nMchFId = WM.AddMachining( Proc, sNameF, sMilling)
if not nMchFId then if not nMchFId then
local sErr = 'Error adding machining ' .. sNameF .. '-' .. sMilling local sErr = 'Error adding machining ' .. sNameF .. '-' .. sMilling
EgtOutLog( sErr) EgtOutLog( sErr)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+23 -9
View File
@@ -1,5 +1,7 @@
-- WProcessMark.lua by Egaltech s.r.l. 2021/04/20 -- WProcessMark.lua by Egaltech s.r.l. 2021/04/20
-- Gestione calcolo marcatura per Pareti -- Gestione calcolo marcatura per Pareti
-- 2023/01/05 Permesse le marcature laterali in presenza di offset Z, tra grezzo e tavola, di almeno 100 mm
-- 2023/05/25 Funzioni EgtAddMachining sostituite da WM.AddMachining in modo da trascrivere le priorità da btl alle lavorazioni.
-- Tabella per definizione modulo -- Tabella per definizione modulo
local WPMK = {} local WPMK = {}
@@ -33,8 +35,13 @@ function WPMK.Classify( Proc, b3Raw)
if not vtN then if not vtN then
return false return false
end end
-- verifico se la marcatura è lavorabile (solo da sopra) -- verifico se la marcatura è lavorabile (solo da sopra o dal lato se con offset Z)
return ( vtN:getZ() > WD.NZ_MINA) local dMinZRaw = b3Raw:getMin():getZ()
local b3Tab = EgtGetTableArea()
local dMaxZTable = b3Tab:getMax():getZ()
local dDeltaZ = dMinZRaw - dMaxZTable
local MIN_Z_OFFSET = 100
return EgtIf( dDeltaZ < MIN_Z_OFFSET - GEO.EPS_SMALL, vtN:getZ() > WD.NZ_MINA, vtN:getZ() > -0.1)
end end
---------------------------------------------------------------------- ----------------------------------------------------------------------
@@ -79,11 +86,18 @@ function WPMK.Make( Proc, nRawId, b3Raw)
EgtOutLog( sErr) EgtOutLog( sErr)
return false, sErr return false, sErr
end end
-- verifico che la marcatura non sia orientata verso il basso -- verifico se la marcatura è lavorabile (solo da sopra o dal lato se con offset Z)
if vtExtr:getZ() < WD.NZ_MINA then local dMinZRaw = b3Raw:getMin():getZ()
local sErr = 'Error : Mark from bottom impossible' local b3Tab = EgtGetTableArea()
EgtOutLog( sErr) local dMaxZTable = b3Tab:getMax():getZ()
return false, sErr local dDeltaZ = dMinZRaw - dMaxZTable
local MIN_Z_OFFSET = 99.9
if vtExtr:getZ() < WD.NZ_MINA then
if dDeltaZ < MIN_Z_OFFSET - GEO.EPS_SMALL or vtExtr:getZ() <= -0.1 then
local sErr = 'Error : Mark from bottom impossible'
EgtOutLog( sErr)
return false, sErr
end
end end
-- recupero la lavorazione -- recupero la lavorazione
local sMilling = WM.FindMilling( 'Text') local sMilling = WM.FindMilling( 'Text')
@@ -94,7 +108,7 @@ function WPMK.Make( Proc, nRawId, b3Raw)
end end
-- inserisco la lavorazione di fresatura -- inserisco la lavorazione di fresatura
local sName = 'Decor_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local sName = 'Decor_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchFId = EgtAddMachining( sName, sMilling) local nMchFId = WM.AddMachining( Proc, sName, sMilling)
if not nMchFId then if not nMchFId then
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
EgtOutLog( sErr) EgtOutLog( sErr)
@@ -118,7 +132,7 @@ function WPMK.Make( Proc, nRawId, b3Raw)
if AuxId then if AuxId then
-- inserisco la lavorazione di fresatura -- inserisco la lavorazione di fresatura
local sName2 = 'Decor2_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local sName2 = 'Decor2_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchF2Id = EgtAddMachining( sName, sMilling) local nMchF2Id = WM.AddMachining( Proc, sName, sMilling)
if not nMchF2Id then if not nMchF2Id then
local sErr = 'Error adding machining ' .. sName2 .. '-' .. sMilling local sErr = 'Error adding machining ' .. sName2 .. '-' .. sMilling
EgtOutLog( sErr) EgtOutLog( sErr)
+22 -8
View File
@@ -1,5 +1,7 @@
-- WProcessMortise.lua by Egaltech s.r.l. 2021/07/30 -- WProcessMortise.lua by Egaltech s.r.l. 2021/07/30
-- Gestione calcolo mortase per Pareti -- Gestione calcolo mortase per Pareti
-- 2023/01/05 Permesse le mortase laterali in presenza di offset Z, tra grezzo e tavola, di almeno 100 mm
-- 2023/05/25 Funzioni EgtAddMachining sostituite da WM.AddMachining in modo da trascrivere le priorità da btl alle lavorazioni.
-- Tabella per definizione modulo -- Tabella per definizione modulo
local WPM = {} local WPM = {}
@@ -45,8 +47,13 @@ function WPM.Classify( Proc, b3Raw)
return true return true
-- altrimenti è chiusa -- altrimenti è chiusa
else else
-- verifico se la mortasa è lavorabile da sopra -- verifico se la mortasa è lavorabile da sopra o dal lato se con offset Z
return ( vtN:getZ() > WD.NZ_MINA) local dMinZRaw = b3Raw:getMin():getZ()
local b3Tab = EgtGetTableArea()
local dMaxZTable = b3Tab:getMax():getZ()
local dDeltaZ = dMinZRaw - dMaxZTable
local MIN_Z_OFFSET = 99.9
return EgtIf( dDeltaZ < MIN_Z_OFFSET - GEO.EPS_SMALL, vtN:getZ() > WD.NZ_MINA, vtN:getZ() > -0.1)
end end
end end
@@ -182,11 +189,18 @@ function WPM.Make( Proc, nRawId, b3Raw)
local bForceOneSide local bForceOneSide
local bRevertSide local bRevertSide
if bClosedBtm then if bClosedBtm then
-- verifico che la mortasa non sia orientata verso il basso (limite -5 deg) -- verifico se la mortasa è lavorabile da sopra o dal lato se con offset Z
if vtN:getZ() < WD.NZ_MINA then local dMinZRaw = b3Raw:getMin():getZ()
local sErr = 'Error : Mortise from bottom impossible' local b3Tab = EgtGetTableArea()
EgtOutLog( sErr) local dMaxZTable = b3Tab:getMax():getZ()
return false, sErr local dDeltaZ = dMinZRaw - dMaxZTable
local MIN_Z_OFFSET = 100
if vtExtr:getZ() < WD.NZ_MINA then
if dDeltaZ < MIN_Z_OFFSET - GEO.EPS_SMALL or vtExtr:getZ() <= -0.1 then
local sErr = 'Error : Mortise from bottom impossible'
EgtOutLog( sErr)
return false, sErr
end
end end
-- altrimenti passante -- altrimenti passante
else else
@@ -237,7 +251,7 @@ function WPM.Make( Proc, nRawId, b3Raw)
end end
-- inserisco la lavorazione di svuotatura -- inserisco la lavorazione di svuotatura
local sName = 'Mort_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local sName = 'Mort_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchFId = EgtAddMachining( sName, sPocketing) local nMchFId = WM.AddMachining( Proc, sName, sPocketing)
if not nMchFId then if not nMchFId then
local sErr = 'Error adding machining ' .. sName .. '-' .. sPocketing local sErr = 'Error adding machining ' .. sName .. '-' .. sPocketing
EgtOutLog( sErr) EgtOutLog( sErr)
+5 -1
View File
@@ -29,7 +29,11 @@ function WPSC.Classify( Proc, b3Raw)
if not AuxId then return false end if not AuxId then return false end
AuxId = AuxId + Proc.Id AuxId = AuxId + Proc.Id
local vtDir = EgtSV( AuxId, GDB_ID.ROOT) local vtDir = EgtSV( AuxId, GDB_ID.ROOT)
return ( vtDir:getZ() > 0.5) local vtDirZ = vtDir:getZ()
if Proc.IsThrough then
vtDirZ = abs( vtDir:getZ())
end
return ( vtDirZ > 0.5)
end end
---------------------------------------------------------------------- ----------------------------------------------------------------------
+2 -1
View File
@@ -1,5 +1,6 @@
-- WProcessText.lua by Egaltech s.r.l. 2021/04/20 -- WProcessText.lua by Egaltech s.r.l. 2021/04/20
-- Gestione calcolo testi per Travi -- Gestione calcolo testi per Travi
-- 2023/05/25 Funzioni EgtAddMachining sostituite da WM.AddMachining in modo da trascrivere le priorità da btl alle lavorazioni.
-- Tabella per definizione modulo -- Tabella per definizione modulo
local WPT = {} local WPT = {}
@@ -77,7 +78,7 @@ function WPT.Make( Proc, nRawId, b3Raw)
end end
-- inserisco la lavorazione di fresatura -- inserisco la lavorazione di fresatura
local sName = 'Text_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local sName = 'Text_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchFId = EgtAddMachining( sName, sMilling) local nMchFId = WM.AddMachining( Proc, sName, sMilling)
if not nMchFId then if not nMchFId then
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
EgtOutLog( sErr) EgtOutLog( sErr)
+2 -1
View File
@@ -1,5 +1,6 @@
-- WProcessVariant.lua by Egaltech s.r.l. 2021/08/27 -- WProcessVariant.lua by Egaltech s.r.l. 2021/08/27
-- Gestione calcolo Feature Custom (Variant) per Pareti -- Gestione calcolo Feature Custom (Variant) per Pareti
-- 2023/05/25 Funzioni EgtAddMachining sostituite da WM.AddMachining in modo da trascrivere le priorità da btl alle lavorazioni.
-- Tabella per definizione modulo -- Tabella per definizione modulo
local WPV = {} local WPV = {}
@@ -71,7 +72,7 @@ local function MakeCode_1( Proc, nRawId, b3Raw)
end end
-- inserisco la lavorazione di finitura superficie -- inserisco la lavorazione di finitura superficie
local sName = 'SurfFin_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) local sName = 'SurfFin_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchFId = EgtAddMachining( sName, sSurfFin) local nMchFId = WM.AddMachining( Proc, sName, sSurfFin)
if not nMchFId then if not nMchFId then
local sErr = 'Error adding machining ' .. sName .. '-' .. sSurfFin local sErr = 'Error adding machining ' .. sName .. '-' .. sSurfFin
EgtOutLog( sErr) EgtOutLog( sErr)
+630 -43
View File
@@ -1,5 +1,15 @@
-- WallExec.lua by Egaltech s.r.l. 2022/05/12 -- WallExec.lua by Egaltech s.r.l. 2024/02/20
-- Libreria esecuzione lavorazioni per Pareti -- Libreria esecuzione lavorazioni per Pareti
-- 2023/05/25 Aggiunto ordinamento in base a priorità da btl.
-- 2023/06/07 Nel caso di outline con priorità aggiunta la rimozione degli sfridi nella lavorazione successiva.
-- 2023/06/27 Aggiunte origini TN e BN.
-- 2023/07/04 Se c'è funzione di macchina WD.GetOrigCorner si lascia scegliere posizione default a questa impostando 0 se non c'è 'REFPOS'.
-- 2023/10/16 Aggiunta gestione Aree vietate (LockOut) per chiodature.
-- 2023/11/14 Modifiche sostanziali per l'aggiunta delle lavorazioni in doppio.
-- In Collect aggiunto il recupero preliminare di varie informazioni sulla feature.
-- 2023/12/11 In ClassifyTopology si passa ora anche l'Id del grezzo (allineamento Topology con Beam).
-- 2024/02/20 Aggiunta gestione DeltaX/Y/Z del pannello dall'origine da BTL.
-- 2024/08/30 Aggiunta nota altezza sottopezzo, per pareti a layer
-- Tabella per definizione modulo -- Tabella per definizione modulo
local WallExec = {} local WallExec = {}
@@ -20,6 +30,7 @@ if WALL and WALL.NESTINGCORNERBL then WD.NESTING_CORNER = 'BL' end
-- Carico le librerie -- Carico le librerie
_G.package.loaded.WMachiningLib = nil _G.package.loaded.WMachiningLib = nil
_G.package.loaded.WallLib = nil _G.package.loaded.WallLib = nil
_G.package.loaded.WFeatureTopology = nil
_G.package.loaded.WProcessCut = nil _G.package.loaded.WProcessCut = nil
_G.package.loaded.WProcessDoubleCut = nil _G.package.loaded.WProcessDoubleCut = nil
_G.package.loaded.WProcessSawCut = nil _G.package.loaded.WProcessSawCut = nil
@@ -33,6 +44,7 @@ _G.package.loaded.WProcessFreeContour = nil
_G.package.loaded.WProcessVariant = nil _G.package.loaded.WProcessVariant = nil
local WM = require( 'WMachiningLib') local WM = require( 'WMachiningLib')
local WL = require( 'WallLib') local WL = require( 'WallLib')
local Topology = require( 'WFeatureTopology')
local Cut = require( 'WProcessCut') local Cut = require( 'WProcessCut')
local DoubleCut = require( 'WProcessDoubleCut') local DoubleCut = require( 'WProcessDoubleCut')
local SawCut = require( 'WProcessSawCut') local SawCut = require( 'WProcessSawCut')
@@ -70,32 +82,48 @@ function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bNewPr
local OrigOnTab local OrigOnTab
local nCorner local nCorner
local sOrigCorner = WD.ORIG_CORNER or 'BR' local sOrigCorner = WD.ORIG_CORNER or 'BR'
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL
if WD.GetOrigCorner then if WD.GetOrigCorner then
sOrigCorner = WD.GetOrigCorner( EgtGetInfo( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL, 'REFPOS', 'i') or 1) sOrigCorner = WD.GetOrigCorner( EgtGetInfo( BtlInfoId, 'REFPOS', 'i') or 0)
end end
-- offset da interfaccia
local dDeltaXFromBtl = EgtGetInfo( BtlInfoId, 'PANELDELTAY', 'd') or 0
local dDeltaYFromBtl = EgtGetInfo( BtlInfoId, 'PANELDELTAX', 'd') or 0
local dDeltaZFromBtl = EgtGetInfo( BtlInfoId, 'PANELDELTAZ', 'd') or 0
-- se da interfaccia arriva un valore > 0 si usa quello, altrimenti si legge da WallData (default 0)
local DeltaX = EgtIf( dDeltaXFromBtl > 0, dDeltaXFromBtl, WD.DELTA_X or 0)
local DeltaY = EgtIf( dDeltaYFromBtl > 0, dDeltaYFromBtl, WD.DELTA_Y or 0)
local DeltaZ = EgtIf( dDeltaZFromBtl > 0, dDeltaZFromBtl, WD.DELTA_Z or 0)
if sOrigCorner == 'TL' then if sOrigCorner == 'TL' then
nCorner = MCH_CR.TL nCorner = MCH_CR.TL
OrigOnTab = Point3d( 0, b3Tab:getDimY() - abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0)) OrigOnTab = Point3d( 0 + abs( DeltaX), b3Tab:getDimY() - abs( DeltaY), DeltaZ)
elseif sOrigCorner == 'BL' then elseif sOrigCorner == 'BL' then
nCorner = MCH_CR.BL nCorner = MCH_CR.BL
OrigOnTab = Point3d( 0, abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0)) OrigOnTab = Point3d( 0 + abs( DeltaX), abs( DeltaY), DeltaZ)
elseif sOrigCorner == 'TR' then elseif sOrigCorner == 'TR' then
nCorner = MCH_CR.TR nCorner = MCH_CR.TR
OrigOnTab = Point3d( b3Tab:getDimX(), b3Tab:getDimY() - abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0)) OrigOnTab = Point3d( b3Tab:getDimX() - abs( DeltaX), b3Tab:getDimY() - abs( DeltaY), DeltaZ)
elseif sOrigCorner == 'BR' then elseif sOrigCorner == 'BR' then
nCorner = MCH_CR.BR nCorner = MCH_CR.BR
OrigOnTab = Point3d( b3Tab:getDimX(), abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0)) OrigOnTab = Point3d( b3Tab:getDimX() - abs( DeltaX), abs( DeltaY), DeltaZ)
elseif sOrigCorner == 'TM' then elseif sOrigCorner == 'TM' then
nCorner = MCH_CR.TR nCorner = MCH_CR.TR
OrigOnTab = Point3d( WD.MID_REF, b3Tab:getDimY() - abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0)) OrigOnTab = Point3d( WD.MID_REF - abs( DeltaX), b3Tab:getDimY() - abs( DeltaY), DeltaZ)
elseif sOrigCorner == 'BM' then elseif sOrigCorner == 'BM' then
nCorner = MCH_CR.BR nCorner = MCH_CR.BR
OrigOnTab = Point3d( WD.MID_REF, abs( WD.DELTA_Y or 0), ( WD.DELTA_Z or 0)) OrigOnTab = Point3d( WD.MID_REF - abs( DeltaX), abs( DeltaY), DeltaZ)
elseif sOrigCorner == 'TN' then
nCorner = MCH_CR.TL
OrigOnTab = Point3d( WD.NEW_REF + abs( DeltaX), b3Tab:getDimY() - abs( DeltaY), DeltaZ)
elseif sOrigCorner == 'BN' then
nCorner = MCH_CR.BL
OrigOnTab = Point3d( WD.NEW_REF + abs( DeltaX), abs( DeltaY), DeltaZ)
end end
-- Impostazione dell'attrezzaggio di default -- Impostazione dell'attrezzaggio di default
EgtImportSetup() EgtImportSetup()
-- Impostazione eventuale allargamento area disponibile per grezzo -- Impostazione eventuale allargamento area disponibile per grezzo
EgtSetTableAreaOffset( WD.TAB_EXTRA_XP or 0, WD.TAB_EXTRA_XM or 0, WD.TAB_EXTRA_YP or 0, WD.TAB_EXTRA_YM or 0) EgtSetTableAreaOffset( WD.TAB_EXTRA_XP or 0, WD.TAB_EXTRA_YP or 0, WD.TAB_EXTRA_XM or 0, WD.TAB_EXTRA_YM or 0)
-- Creazione del grezzo e suo posizionamento in macchina -- Creazione del grezzo e suo posizionamento in macchina
local nRaw = GDB_ID.NULL local nRaw = GDB_ID.NULL
if nRawOutlineId and nRawOutlineId ~= GDB_ID.NULL then if nRawOutlineId and nRawOutlineId ~= GDB_ID.NULL then
@@ -138,6 +166,7 @@ function WallExec.ProcessWalls( dRawL, dRawW, dRawH, vWall, bMachGroupOk, bNewPr
end end
else else
local dPosH = EgtIf( vWall[i].PosY < 0.1, ( dRawH - PartHeight) / 2, vWall[i].PosY) local dPosH = EgtIf( vWall[i].PosY < 0.1, ( dRawH - PartHeight) / 2, vWall[i].PosY)
EgtSetInfo( nRaw, 'SUBPIECE', dPosH)
ptPos = Point3d( dRawL - vWall[i].PosX - PartLen, vWall[i].PosZ, dPosH) + vtOffs ptPos = Point3d( dRawL - vWall[i].PosX - PartLen, vWall[i].PosZ, dPosH) + vtOffs
end end
EgtAddPartToRawPart( Pz, ptPos, nRaw) EgtAddPartToRawPart( Pz, ptPos, nRaw)
@@ -179,6 +208,22 @@ function WallExec.CollectFeatures( PartId, b3Raw)
Proc.CutId = nCutId Proc.CutId = nCutId
Proc.TaskId = nTaskId Proc.TaskId = nTaskId
Proc.Box = EgtGetBBoxGlob( ProcId, GDB_BB.STANDARD) Proc.Box = EgtGetBBoxGlob( ProcId, GDB_BB.STANDARD)
Proc.IsOutline = ( Proc.Prc == 251 or Proc.Prc == 252)
if b3Raw then
-- recupero l'elenco delle facce della parte interessate dalla feature
Proc.AffectedFaces = WL.GetProcessAffectedFaces( Proc)
-- recupero le distanze tra la feature e le altre parti più vicine
Proc.DistanceToNearestParts = WL.GetProcessDistanceToNearestParts( Proc)
-- recupero le distanze tra la feature e il grezzo
Proc.DistanceToRawPart = WL.GetProcessDistanceToRawPart( Proc, b3Raw)
-- recupero informazioni sulle facce della feature
Proc.Face = {}
if Proc.Fct < 50 then
for i = 1, Proc.Fct do
Proc.Face[i] = { Id = i - 1, VtN = EgtSurfTmFacetNormVersor( Proc.Id, i - 1, GDB_ID.ROOT ), Elevation = WL.GetFaceElevation( Proc.Id, i - 1, PartId)}
end
end
end
if Proc.Box and not Proc.Box:isEmpty() then if Proc.Box and not Proc.Box:isEmpty() then
table.insert( vProc, Proc) table.insert( vProc, Proc)
-- se foro -- se foro
@@ -205,6 +250,16 @@ function WallExec.CollectFeatures( PartId, b3Raw)
Proc2.TaskId = Proc.TaskId Proc2.TaskId = Proc.TaskId
table.insert( vProc, Proc2) table.insert( vProc, Proc2)
end end
-- se free contour
elseif FreeContour.Identify( Proc) then
-- recupero il tipo e il dato della lavorazione
local nCntType = EgtGetInfo( Proc.Id, 'CNT_TYPE', 'i') or 0
local nCntData = EgtGetInfo( Proc.Id, 'CNT_DATA', 'i') or 0
-- imposto se area vietata
if nCntType == 200 then
Proc.LockOut = EgtIf( ( nCntData == 0 or ( nCntData & 1) ~= 0), 1, -1)
end
if Proc.LockOut then Proc.Flg = 0 end
end end
else else
EgtOutLog( ' Feature ' .. tostring( Proc.Id) .. ' is empty (no geometry)') EgtOutLog( ' Feature ' .. tostring( Proc.Id) .. ' is empty (no geometry)')
@@ -269,20 +324,34 @@ local function ClassifyFeatures( vProc, b3Raw)
end end
end end
-------------------------------------------------------------------------------------------------------------
local function ClassifyTopology( vProc, nRawId)
local b3Raw = EgtGetRawPartBBox( nRawId)
local nRecognized = 0
for i = 1, #vProc do
local Proc = vProc[i]
if Topology.Classify( Proc, b3Raw) then
nRecognized = nRecognized + 1
end
end
return nRecognized
end
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------
local function PrintFeatures( vProc) local function PrintFeatures( vProc)
EgtOutLog( ' *** Feature List ***') EgtOutLog( ' *** Feature List ***')
for i = 1, #vProc do for i = 1, #vProc do
local Proc = vProc[i] local Proc = vProc[i]
local sOut = string.format( 'Part=%3d Proc=%3d Grp=%1d Prc=%3d TC=%2d/%d Flg=%2d Fcse=%1d,%1d Diam=%.2f Fct=%2d Dbl=%2d Dlt=%.1f Box=%s', local sOut = string.format( 'Part=%3d Proc=%3d Grp=%1d Prc=%3d TC=%2d/%d Flg=%2d Lo=%d Fcse=%1d,%1d Diam=%.2f Fct=%2d Dbl=%2d Dlt=%.1f Box=%s TopoName=%s',
Proc.PartId, Proc.Id, Proc.Grp, Proc.Prc, Proc.TaskId, Proc.CutId, Proc.PartId, Proc.Id, Proc.Grp, Proc.Prc, Proc.TaskId, Proc.CutId,
Proc.Flg, Proc.Fcs, Proc.Fce, Proc.Diam, Proc.Fct, Proc.Double or 0, Proc.Delta or 0, tostring( Proc.Box)) Proc.Flg, EgtIf( Proc.LockOut, 1, 0), Proc.Fcs, Proc.Fce, Proc.Diam, Proc.Fct, Proc.Double or 0, Proc.Delta or 0, tostring( Proc.Box), Proc.TopologyLongName or '')
EgtOutLog( sOut) EgtOutLog( sOut)
end end
end end
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------
local function AddFeatureMachining( Proc, nRawId, b3Raw) local function AddFeatureMachining( Proc, nRawId, b3Raw, vNLO)
local bOk = true local bOk = true
local sErr = '' local sErr = ''
EgtOutLog( ' * Process ' .. tostring( Proc.Id) .. ' *', 1) EgtOutLog( ' * Process ' .. tostring( Proc.Id) .. ' *', 1)
@@ -324,8 +393,8 @@ local function AddFeatureMachining( Proc, nRawId, b3Raw)
bOk, sErr = Text.Make( Proc, nRawId, b3Raw) bOk, sErr = Text.Make( Proc, nRawId, b3Raw)
-- se contorno libero, outline o apertura ( 0/3/4-250/251/252-X) -- se contorno libero, outline o apertura ( 0/3/4-250/251/252-X)
elseif FreeContour.Identify( Proc) then elseif FreeContour.Identify( Proc) then
-- esecuzione contorno -- esecuzione contorno libero
bOk, sErr = FreeContour.Make( Proc, nRawId, b3Raw) bOk, sErr = FreeContour.Make( Proc, nRawId, b3Raw, vNLO)
-- se feature custom (Variant) -- se feature custom (Variant)
elseif Variant.Identify( Proc) then elseif Variant.Identify( Proc) then
-- esecuzione -- esecuzione
@@ -409,7 +478,7 @@ local function ContainsStartName( nOperId, StartNames)
end end
------ Ordinamento dei tagli, delle fresature e delle forature ------- ------ Ordinamento dei tagli, delle fresature e delle forature -------
local function SortMach( nPhase, PrevMch, nPartId, nType, StartNames, bExistName, sInfo, bExistInfo, bOneWay, bByTool, bByToolAngle) local function SortMach( nPhase, PrevMch, nPartId, nType, StartNames, bExistName, sInfo, bExistInfo, bOneWay, bByTool, bByToolAngle, nPriority)
-- dichiarazione tabella -- dichiarazione tabella
local TabCut = {} local TabCut = {}
-- Recupero gli identificativi delle lavorazioni e annullo eventuali allungamenti e Id di altre lavorazioni rappresentate -- Recupero gli identificativi delle lavorazioni e annullo eventuali allungamenti e Id di altre lavorazioni rappresentate
@@ -419,6 +488,7 @@ local function SortMach( nPhase, PrevMch, nPartId, nType, StartNames, bExistName
-- Se appartiene alla fase corrente e taglio con lama non da sopra (sempre su 1 sola entità) -- Se appartiene alla fase corrente e taglio con lama non da sopra (sempre su 1 sola entità)
if EgtGetOperationPhase( nOperId) == nPhase and ( nType & nOperType) == nOperType and if EgtGetOperationPhase( nOperId) == nPhase and ( nType & nOperType) == nOperType and
( not nPartId or EgtGetInfo( nOperId, 'Part', 'i') == nPartId) and ( not nPartId or EgtGetInfo( nOperId, 'Part', 'i') == nPartId) and
( not nPriority or EgtGetInfo( nOperId, 'PRIORITY', 'i') == nPriority ) and
( not StartNames or ( bExistName and ContainsStartName( nOperId, StartNames)) or ( not StartNames or ( bExistName and ContainsStartName( nOperId, StartNames)) or
( not bExistName and not ContainsStartName( nOperId, StartNames))) and ( not bExistName and not ContainsStartName( nOperId, StartNames))) and
( not sInfo or ( bExistInfo and EgtGetInfo( nOperId, sInfo, 'i') == 1) or ( not sInfo or ( bExistInfo and EgtGetInfo( nOperId, sInfo, 'i') == 1) or
@@ -535,17 +605,17 @@ local function SortMach( nPhase, PrevMch, nPartId, nType, StartNames, bExistName
end end
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------
local function SortMachinings( nPhase, PrevMch, nPartId) local function SortMachinings( nPhase, PrevMch, nPartId, nPriority)
-- Chiodature -- Chiodature
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'Nail_'}, true, nil, nil, nil, true) PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'Nail_'}, true, nil, nil, nil, true, nil, nPriority)
-- Tagli con sega a catena che sono rifiniture di spigoli -- Tagli con sega a catena che sono rifiniture di spigoli
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MORTISING, { 'Csaw_'}, false) PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MORTISING, { 'Csaw_'}, false, nil, nil, nil, nil, nil, nPriority)
-- Forature orizzontali con punte lunghe -- Forature orizzontali con punte lunghe
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING, { 'LhDrill_'}, true, 'MOVE_AFTER', false, true) PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING, { 'LhDrill_'}, true, 'MOVE_AFTER', false, true, nil, nil, nPriority)
-- Preforature per fori inclinati -- Preforature per fori inclinati
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.POCKETING, { 'PreDrill_'}, true) PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.POCKETING, { 'PreDrill_'}, true, nil, nil, nil, nil, nil, nPriority)
-- Forature e Svuotature -- Forature e Svuotature
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING + MCH_OY.POCKETING + MCH_OY.MILLING, { 'SideMill_', 'Clean_'}, false, 'MOVE_AFTER', false, false, true) PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING + MCH_OY.POCKETING + MCH_OY.MILLING, { 'SideMill_', 'Clean_'}, false, 'MOVE_AFTER', false, false, true, nil, nPriority)
-- -- Forature *** -- -- Forature ***
-- PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING, nil, nil, 'MOVE_AFTER', false) -- PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING, nil, nil, 'MOVE_AFTER', false)
-- -- Svuotature *** -- -- Svuotature ***
@@ -553,33 +623,460 @@ local function SortMachinings( nPhase, PrevMch, nPartId)
-- -- Fresature che sono rifiniture di spigoli -- -- Fresature che sono rifiniture di spigoli
-- PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'Clean_'}, false, 'MOVE_AFTER', false, false, true) -- PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'Clean_'}, false, 'MOVE_AFTER', false, false, true)
-- Lavorazioni di superficie -- Lavorazioni di superficie
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_MY.SURFFINISHING, nil, nil, 'MOVE_AFTER', false) PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_MY.SURFFINISHING, nil, nil, 'MOVE_AFTER', false, nil, nil, nil, nPriority)
-- Fresature per gole -- Fresature per gole
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'Gorge_'}, true, 'MOVE_AFTER', false) PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'Gorge_'}, true, 'MOVE_AFTER', false, nil, nil, nil, nPriority)
-- Fresature da fare prima delle SideMill
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'PreSideMill_'}, true, 'MOVE_AFTER', false, false, true, true, nPriority)
-- Fresature che sono rifiniture di spigoli -- Fresature che sono rifiniture di spigoli
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'SideMill_'}, true, 'MOVE_AFTER', false, false, true, true) PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'SideMill_'}, true, 'MOVE_AFTER', false, false, true, true, nPriority)
-- Fresature che sono puliture di spigoli -- Fresature che sono puliture di spigoli
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'Clean_'}, true, 'MOVE_AFTER', false, false, true) PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'Clean_'}, true, 'MOVE_AFTER', false, false, true, nil, nPriority)
-- Tagli per gole -- Tagli per gole
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.SAWING, { 'GorgeCut_'}, true) PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.SAWING, { 'GorgeCut_'}, true, nil, nil, nil, nil, nil, nPriority)
-- Tagli con lama -- Tagli con lama
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.SAWING) PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.SAWING, nil, nil, nil, nil, nil, nil, nil, nPriority)
-- Qui rimozione sfridi (se ci sono lavorazioni successive) -- Qui rimozione sfridi (se ci sono lavorazioni successive)
-- Fresature dei lapjoint che necessitano di gorge if not nPriority then
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'SideMill_'}, true, 'MOVE_AFTER', true, false, true, true) -- Fresature da fare prima delle SideMill
-- Tagli con sega a catena che vanno fatti dopo i tagli con lama PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'PreSideMill_'}, true, 'MOVE_AFTER', true, false, true, true)
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MORTISING, { 'Csaw_'}, true) -- Fresature dei lapjoint che necessitano di gorge
-- Fresature (puliture di spigoli) che vanno fatte dopo i tagli con lama PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, { 'SideMill_'}, true, 'MOVE_AFTER', true, false, true, true)
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, nil, nil, 'MOVE_AFTER', true) -- Tagli con sega a catena che vanno fatti dopo i tagli con lama
-- Forature che vanno fatte dopo i tagli con lama PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MORTISING, { 'Csaw_'}, true)
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING, nil, nil, 'MOVE_AFTER', true) -- Fresature (puliture di spigoli) che vanno fatte dopo i tagli con lama
-- Svuotature che vanno fatte dopo i tagli con lama PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.MILLING, nil, nil, 'MOVE_AFTER', true)
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.POCKETING, nil, nil, 'MOVE_AFTER', true) -- Forature che vanno fatte dopo i tagli con lama
-- Lavorazioni di superficie che vanno fatte dopo i tagli con lama PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.DRILLING, nil, nil, 'MOVE_AFTER', true)
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_MY.SURFFINISHING, nil, nil, 'MOVE_AFTER', true) -- Svuotature che vanno fatte dopo i tagli con lama
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_OY.POCKETING, nil, nil, 'MOVE_AFTER', true)
-- Lavorazioni di superficie che vanno fatte dopo i tagli con lama
PrevMch = SortMach( nPhase, PrevMch, nPartId, MCH_MY.SURFFINISHING, nil, nil, 'MOVE_AFTER', true)
end
return PrevMch return PrevMch
end end
-------------------------------------------------------------------------------------------------------------
-- setto la rimozione sfridi dopo le lavorazioni di outline
function InsertScrapRemoval( nPhase)
local nCurrentOperationId = EgtGetNextOperation( EgtGetPhaseDisposition( nPhase))
local nActiveMachiningId = EgtGetCurrMachining()
while nCurrentOperationId do
local bIsCurrentOperationOutline = ( EgtGetInfo( nCurrentOperationId or GDB_ID.NULL, 'ISOUTLINE', 'b' ) == true)
local bIsCurrentOperationWithPriority = ( ( EgtGetInfo( nCurrentOperationId or GDB_ID.NULL, 'PRIORITY', 'i' ) or 0) > 0)
local nNextOperationId = EgtGetNextOperation (nCurrentOperationId)
local bIsNextOperationOutline = ( EgtGetInfo( nNextOperationId or GDB_ID.NULL, 'ISOUTLINE', 'b' ) == true)
if bIsCurrentOperationOutline and bIsCurrentOperationWithPriority and nNextOperationId and not bIsNextOperationOutline then
EgtSetCurrMachining( nNextOperationId)
local sMachiningNotes = EgtGetMachiningParam( MCH_MP.USERNOTES)
sMachiningNotes = sMachiningNotes .. 'ScrapRemove=1;'
EgtSetMachiningParam( MCH_MP.USERNOTES, sMachiningNotes)
end
nCurrentOperationId = EgtGetNextOperation( nCurrentOperationId)
end
EgtSetCurrMachining( nActiveMachiningId or GDB_ID.NULL)
end
-------------------------------------------------------------------------------------------------------------
-- funzione per l'ordinamento delle features in doppio da accoppiare
-- ordinate prima in base alla X e poi alla Y
local function SortFeaturesForMirror( Proc1, Proc2)
-- tolleranza di ricerca
local TOL = EgtIf( Proc1.TopologyLongName == 'DRILLING', WD.DOUBLE_HEAD_DRILLING_TOLERANCE or 0.1 , WD.DOUBLE_HEAD_POCKET_TOLERANCE or 0.5)
-- recupero i centri dei box lungo X e Y
local Proc1X = Proc1.Box:getCenter():getX()
local Proc1Y = Proc1.Box:getCenter():getY()
local Proc2X = Proc2.Box:getCenter():getX()
local Proc2Y = Proc2.Box:getCenter():getY()
-- confronto per ordinamento
if Proc1X < Proc2X - TOL then
return true
elseif abs( Proc1X - Proc2X) < TOL then
if Proc1Y < Proc2Y - TOL then
return true
end
end
end
-------------------------------------------------------------------------------------------------------------
-- funzione per l'ordinamento delle operazioni in doppio da accoppiare
-- ordinate prima in base alla X e poi alla Y
local function SortOperationsForMirror( nOper1, nOper2)
-- tolleranza di ricerca
local TOL = 0.1
-- recupero il box della prima operazione
local nClId1 = EgtGetFirstNameInGroup( nOper1, 'CL')
local ptMin1 = EgtGetInfo( nClId1, 'MMIN', 'p')
local ptMax1 = EgtGetInfo( nClId1, 'MMAX', 'p')
local b3Oper1 = BBox3d( ptMin1, ptMax1)
-- recupero il box delle seconda operazione
local nClId2 = EgtGetFirstNameInGroup( nOper2, 'CL')
local ptMin2 = EgtGetInfo( nClId2, 'MMIN', 'p')
local ptMax2 = EgtGetInfo( nClId2, 'MMAX', 'p')
local b3Oper2 = BBox3d( ptMin2, ptMax2)
-- recupero i centri dei box lungo X e Y
local dOper1X = b3Oper1:getCenter():getX()
local dOper1Y = b3Oper1:getCenter():getY()
local dOper2X = b3Oper2:getCenter():getX()
local dOper2Y = b3Oper2:getCenter():getY()
-- confronto per ordinamento
if dOper1X < dOper2X - TOL then
return true
elseif abs( dOper1X - dOper2X) < TOL then
if dOper1Y < dOper2Y - TOL then
return true
end
end
end
-------------------------------------------------------------------------------------------------------------
-- Controlla in vProc la presenza di feature da lavorare in doppio e, se trovate, ne setta i parametri
local function SetMirroredFeatures( vProc, b3Raw)
-- interasse minimo
local dMinimumDistanceMirroredFeatures = 780
-- inizializzazione array tasche e forature
local vPockets = {}
local vDrillings = {}
-- raccolgo le feature compatibili con doppio
for i = 1, #vProc do
local Proc = vProc[i]
if Proc.Flg ~= 0 then
-- raccolgo le tasche compatibili
if WD.DOUBLE_HEAD_POCKET and
(
( Proc.TopologyLongName == 'Rabbet-Through-RightAngles-Parallel-2' and Proc.AffectedFaces.Left and Proc.AffectedFaces.Right) or
( Proc.TopologyLongName == 'Groove-Through-RightAngles-Parallel-3' and ( not Proc.AffectedFaces.Bottom and Proc.AffectedFaces.Left and Proc.AffectedFaces.Right)) or
( Proc.TopologyLongName == 'Groove-Blind-RightAngles-Parallel-3') or
( Proc.TopologyLongName == 'Groove-Blind-RightAngles-Parallel-4') or
( Proc.TopologyLongName == 'Pocket-Blind-RightAngles-Parallel-5' and not Proc.AffectedFaces.Bottom)
) then
table.insert( vPockets, Proc)
-- raccolgo i fori verticali e aperti verso Z+
elseif WD.DOUBLE_HEAD_DRILLING and Proc.TopologyLongName == 'DRILLING' then
-- recupero e verifico la geometria del foro
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') or 0
if AuxId then AuxId = AuxId + Proc.Id end
if not AuxId or EgtGetType( AuxId) ~= GDB_TY.CRV_ARC then
return false
end
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
if Proc.AffectedFaces.Top and AreSameOrOppositeVectorApprox( vtExtr, Z_AX()) then
table.insert( vDrillings, Proc)
end
end
end
end
-- ordinamento delle feature raccolte secondo X e poi Y crescente
table.sort( vPockets, SortFeaturesForMirror)
table.sort( vDrillings, SortFeaturesForMirror)
-- accoppio le tasche
local nCurrentPocket = 1
while nCurrentPocket <= #vPockets do
local Proc = vPockets[nCurrentPocket]
if Proc.Flg ~= 0 then
local b3Proc = EgtGetBBoxGlob( Proc.Id, GDB_BB.STANDARD)
-- cerco evenutale specchiata
local nCurrentMirrorPocket = nCurrentPocket + 1
while nCurrentMirrorPocket <= #vPockets do
local ProcMirror = vPockets[nCurrentMirrorPocket]
local b3ProcMirror = EgtGetBBoxGlob( ProcMirror.Id, GDB_BB.STANDARD)
-- feature non disattivata e diversa da nCurrentPocket
local bIsMirrorIdOk = ( Proc.Id ~= ProcMirror.Id and ProcMirror.Flg ~= 0)
-- feature mirror della stessa classe topologica
local bIsMirrorTopologyOk = ( Proc.TopologyLongName == ProcMirror.TopologyLongName)
-- determino se di fianco o in mezzo al singolo pannello
local bLapVsTop = Proc.AffectedFaces.Front and
(
Proc.TopologyLongName == 'Rabbet-Through-RightAngles-Parallel-2' or
Proc.TopologyLongName == 'Groove-Through-RightAngles-Parallel-3' or
Proc.TopologyLongName == 'Groove-Blind-RightAngles-Parallel-3' or
Proc.TopologyLongName == 'Groove-Blind-RightAngles-Parallel-4' or
Proc.TopologyLongName == 'Pocket-Blind-RightAngles-Parallel-5'
)
-- se di fianco, determino se è l'ultima parte prima della fine del grezzo
local bIsFeatureOnEdge, bIsMirrorFeatureOnEdge = false, false
if bLapVsTop then
bIsFeatureOnEdge = Proc.DistanceToNearestParts.Front > b3Raw:getDimY()
bIsMirrorFeatureOnEdge = ProcMirror.DistanceToNearestParts.Back > b3Raw:getDimY()
end
-- se di fianco, si sceglie se le feature sono compatibili con il doppio e nel caso che tipo di lavorazione fare
-- -1: no doppio, 0: nessuna preferenza, 1: pocket, 2: side (scambio faccia principale)
local nDoubleType = 0
local bAllowSideOnMirror = ( ProcMirror.DistanceToRawPart.Back - Proc.DistanceToRawPart.Front < 1 + 10 * GEO.EPS_SMALL) or ( not WD.SIDEMILL_BEFORE and ( not Proc.AffectedFaces.Top or not ProcMirror.AffectedFaces.Top))
if bLapVsTop and ( Proc.AffectedFaces.Top or Proc.AffectedFaces.Bottom) then
-- side
if bIsFeatureOnEdge and bIsMirrorFeatureOnEdge then
if not ( Proc.AffectedFaces.Top and ProcMirror.AffectedFaces.Top) then
nDoubleType = 2
end
-- no doppio
elseif Proc.AffectedFaces.Bottom or ProcMirror.AffectedFaces.Bottom then
nDoubleType = -1
-- tasca
else
nDoubleType = 1
end
end
-- corrispondenza nella posizione delle feature. Se di fianco il lato master è sempre quello verso l'operatore, se sopra nessun vincolo
local bIsMirrorSideOk = ( bLapVsTop and ProcMirror.AffectedFaces.Back and bIsFeatureOnEdge and bIsMirrorFeatureOnEdge and bAllowSideOnMirror) or
Proc.TopologyLongName == 'Groove-Through-RightAngles-Parallel-3' and Proc.AffectedFaces.Top and ProcMirror.AffectedFaces.Top or
Proc.TopologyLongName == 'Groove-Blind-RightAngles-Parallel-4' and Proc.AffectedFaces.Top and Proc.AffectedFaces.Left and ProcMirror.AffectedFaces.Top and ProcMirror.AffectedFaces.Left or
Proc.TopologyLongName == 'Groove-Blind-RightAngles-Parallel-4' and Proc.AffectedFaces.Top and Proc.AffectedFaces.Right and ProcMirror.AffectedFaces.Top and ProcMirror.AffectedFaces.Right or
Proc.TopologyLongName == 'Pocket-Blind-RightAngles-Parallel-5' and Proc.AffectedFaces.Top and ProcMirror.AffectedFaces.Top
-- box delle stesse dimensioni
local bIsMirrorFeatureSameDimension = abs( b3Proc:getDimX() - b3ProcMirror:getDimX()) < ( WD.DOUBLE_HEAD_POCKET_TOLERANCE or 0.5) and
abs( b3Proc:getDimY() - b3ProcMirror:getDimY()) < ( WD.DOUBLE_HEAD_POCKET_TOLERANCE or 0.5) and
abs( b3Proc:getDimZ() - b3ProcMirror:getDimZ()) < ( WD.DOUBLE_HEAD_POCKET_TOLERANCE or 0.5)
-- box allineati in X
local bIsMirrorBoxXAligned = abs( Proc.Box:getCenter():getX() - ProcMirror.Box:getCenter():getX()) < ( WD.DOUBLE_HEAD_POCKET_TOLERANCE or 0.5)
-- box che non si intersecano
local bIsNotMirrorBoxOverlapping = not OverlapsXY( b3Proc, b3ProcMirror)
-- distanza minima tra le feature
local dYMinDistance = max( b3Proc:getMin():getY(), b3ProcMirror:getMin():getY()) - min( b3Proc:getMax():getY(), b3ProcMirror:getMax():getY())
local bIsMirrorFeatureDistanceOk = dYMinDistance > dMinimumDistanceMirroredFeatures + 10 * GEO.EPS_SMALL
-- se tutte vere le condizioni, calcolo i parametri da passare alle lavorazioni
if nDoubleType > -1 and bIsMirrorIdOk and bIsMirrorTopologyOk and bIsMirrorSideOk and bIsMirrorFeatureSameDimension and bIsMirrorBoxXAligned and bIsNotMirrorBoxOverlapping and bIsMirrorFeatureDistanceOk then
local dYMirrorAx
local b3Tab = EgtGetTableArea()
local ptOnMirrorAx = ( Proc.Box:getCenter() + ProcMirror.Box:getCenter()) / 2
dYMirrorAx = ptOnMirrorAx:getY() - b3Tab:getMin():getY()
local dDeltaZ = ProcMirror.Box:getMax():getZ() - Proc.Box:getMax():getZ()
-- forzo side o pocket, se necessario
if nDoubleType == 1 then
EgtSetInfo( Proc.Id, 'PCKT', 1)
EgtSetInfo( ProcMirror.Id, 'PCKT', 1)
elseif nDoubleType == 2 then
Proc.Stype = 2
ProcMirror.Stype = 2
end
-- scrivo i parametri nella lavorazione
-- 2: specchiatura in Y
Proc.Double = 2
Proc.Mirror = ProcMirror
-- posizione Y dell'asse di specchiatura
Proc.MirrorAx = dYMirrorAx
-- Offset Z tra le feature
Proc.MirrorDeltaZ = dDeltaZ
-- rimuovo dalla lista le pocket già assegnate
local ProcMirrorOldId = ProcMirror.Id
table.remove( vPockets, nCurrentPocket)
-- avendo rimosso un elemento dall'array, potrebbe essere cambiato l'elemento nCurrentMirrorPocket
if nCurrentMirrorPocket > #vPockets or ( vPockets[nCurrentMirrorPocket].Id ~= ProcMirrorOldId) then nCurrentMirrorPocket = nCurrentMirrorPocket - 1 end
table.remove( vPockets, nCurrentMirrorPocket)
nCurrentPocket = 0
break
end
nCurrentMirrorPocket = nCurrentMirrorPocket + 1
end
end
nCurrentPocket = nCurrentPocket + 1
end
-- accoppio le forature
local nCurrentDrilling = 1
while nCurrentDrilling <= #vDrillings do
local Proc = vDrillings[nCurrentDrilling]
if Proc.Flg ~= 0 then
local b3Proc = EgtGetBBoxGlob( Proc.Id, GDB_BB.STANDARD)
-- cerco evenutale specchiata
local nCurrentMirrorDrilling = nCurrentDrilling + 1
while nCurrentMirrorDrilling <= #vDrillings do
local ProcMirror = vDrillings[nCurrentMirrorDrilling]
local b3ProcMirror = EgtGetBBoxGlob( ProcMirror.Id, GDB_BB.STANDARD)
-- feature non disattivata e diversa da nCurrentDrilling
local bIsMirrorIdOk = ( Proc.Id ~= ProcMirror.Id and ProcMirror.Flg ~= 0)
-- box delle stesse dimensioni
local bIsMirrorFeatureSameDimension = abs( b3Proc:getDimX() - b3ProcMirror:getDimX()) < ( WD.DOUBLE_HEAD_DRILLING_TOLERANCE or 0.1) and
abs( b3Proc:getDimY() - b3ProcMirror:getDimY()) < ( WD.DOUBLE_HEAD_DRILLING_TOLERANCE or 0.1) and
abs( b3Proc:getDimZ() - b3ProcMirror:getDimZ()) < ( WD.DOUBLE_HEAD_DRILLING_TOLERANCE or 0.1)
-- box allineati in X
local bIsMirrorBoxXAligned = abs( Proc.Box:getCenter():getX() - ProcMirror.Box:getCenter():getX()) < ( WD.DOUBLE_HEAD_DRILLING_TOLERANCE or 0.1)
-- box che non si intersecano
local bIsNotMirrorBoxOverlapping = not OverlapsXY( b3Proc, b3ProcMirror)
-- distanza minima tra le feature
local dYMinDistance = max( b3Proc:getMin():getY(), b3ProcMirror:getMin():getY()) - min( b3Proc:getMax():getY(), b3ProcMirror:getMax():getY())
local bIsMirrorFeatureDistanceOk = dYMinDistance > dMinimumDistanceMirroredFeatures + 10 * GEO.EPS_SMALL
-- se tutte vere le condizioni, calcolo i parametri da passare alle lavorazioni
if bIsMirrorIdOk and bIsMirrorFeatureSameDimension and bIsMirrorBoxXAligned and bIsNotMirrorBoxOverlapping and bIsMirrorFeatureDistanceOk then
local dYMirrorAx
local b3Tab = EgtGetTableArea()
local ptOnMirrorAx = ( Proc.Box:getCenter() + ProcMirror.Box:getCenter()) / 2
dYMirrorAx = ptOnMirrorAx:getY() - b3Tab:getMin():getY()
-- scrivo i parametri nella lavorazione
-- 2: specchiatura in Y
Proc.Double = 2
Proc.Mirror = ProcMirror
-- posizione Y dell'asse di specchiatura
Proc.MirrorAx = dYMirrorAx
-- rimuovo dalla lista le forature già assegnate
local ProcMirrorOldId = ProcMirror.Id
table.remove( vDrillings, nCurrentDrilling)
-- avendo rimosso un elemento dall'array, potrebbe essere cambiato l'elemento nCurrentMirrorDrilling
if nCurrentMirrorDrilling > #vDrillings or ( vDrillings[nCurrentMirrorDrilling].Id ~= ProcMirrorOldId) then nCurrentMirrorDrilling = nCurrentMirrorDrilling - 1 end
table.remove( vDrillings, nCurrentMirrorDrilling)
nCurrentDrilling = 0
break
end
nCurrentMirrorDrilling = nCurrentMirrorDrilling + 1
end
end
nCurrentDrilling = nCurrentDrilling + 1
end
end
-------------------------------------------------------------------------------------------------------------
-- verifico e imposto le fresature da specchiare
local function SetMirroredOperations()
-- interasse minimo
local dMinimumDistanceMirroredOperations = 780
-- inzializzazione array
local vMillings = {}
-- raccolgo le fresature non già fatte in doppio
if WD.DOUBLE_HEAD_MILLCORNER then
local nOperId = EgtGetNextOperation( EgtGetPhaseDisposition( 1))
while nOperId do
EgtSetCurrMachining( nOperId)
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES)
local bIsDouble = ( EgtGetValInNotes( sUserNotes, 'DOUBLE', 'i') or 0) > 0
if EgtGetOperationMode( nOperId) and not EgtIsMachiningEmpty( nOperId) and not bIsDouble and EgtGetOperationType( nOperId) == MCH_OY.MILLING then
table.insert( vMillings, nOperId)
end
nOperId = EgtGetNextOperation( nOperId)
end
end
-- ordinamento delle operazioni raccolte secondo X e poi Y crescente
table.sort( vMillings, SortOperationsForMirror)
-- accoppio le fresature
local nCurrentMilling = 1
while nCurrentMilling <= #vMillings do
local nOperIdMaster = vMillings[nCurrentMilling]
EgtSetCurrMachining( nOperIdMaster)
local sMachining = EgtGetMachiningParam( MCH_MP.NAME, 's')
local nClId = EgtGetFirstNameInGroup( nOperIdMaster, 'CL')
local nPathId = EgtGetFirstInGroup( nClId or GDB_ID.NULL)
-- vettore direzione utensile e somma normali facce per lavorazione master
local vtTool = EgtGetInfo( nPathId, 'EXTR', 'v')
local vtNormSum = EgtGetInfo( nOperIdMaster, 'NORM_SUM', 'v')
local ptMin = EgtGetInfo( nClId, 'MMIN', 'p')
local ptMax = EgtGetInfo( nClId, 'MMAX', 'p')
-- box percorso lavorazione master
local b3Operation = BBox3d( ptMin, ptMax)
-- lavorazione master adatta alla specchiatura
local bIsMachiningOk = WM.IsMachiningOkForDouble( sMachining)
if bIsMachiningOk then
-- recupero la distanza tra centro di rotazione e punta dell'utensile per aumentare o ridurre l'interasse minimo
local dTipToPivot, dTipToPivotDouble = 999, 999
local dToolMasterTotLength, dToolMasterTotLengthDouble = 999, 999
local sToolMasterName = ''
if EgtMdbSetCurrMachining( sMachining) then
-- recupero l'utensile della lavorazione e il suo doppio
sToolMasterName = EgtMdbGetCurrMachiningParam( MCH_MP.TOOL)
if EgtTdbSetCurrTool( sToolMasterName or '') then
dToolMasterTotLength = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN) or dToolMasterTotLength
local sToolDoubleName = EgtTdbGetCurrToolValInNotes( MCH_TP.USERNOTES, 'DOUBLE', 's')
if sToolDoubleName and EgtTdbSetCurrTool( sToolDoubleName) then
dToolMasterTotLengthDouble = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN) or dToolMasterTotLengthDouble
end
end
end
if WD.HEAD_PIVOT_MAIN and WD.HEAD_PIVOT_SECONDARY then
dTipToPivot = dToolMasterTotLength + WD.HEAD_PIVOT_MAIN
dTipToPivotDouble = dToolMasterTotLengthDouble + WD.HEAD_PIVOT_SECONDARY
else
local sOut = 'Error : HEAD_PIVOT_MAIN or HEAD_PIVOT_SECONDARY missing in WallData'
return false, sOut
end
-- cerco eventuale specchiata
local nCurrentMirrorMilling = nCurrentMilling + 1
while nCurrentMirrorMilling <= #vMillings do
local nOperIdMirror = vMillings[nCurrentMirrorMilling]
EgtSetCurrMachining( nOperIdMirror)
local nClIdMirror = EgtGetFirstNameInGroup( nOperIdMirror, 'CL')
local nPathIdMirror = EgtGetFirstInGroup( nClIdMirror or GDB_ID.NULL)
-- vettore direzione utensile e somma normali facce per lavorazione mirror
local vtToolMirror = EgtGetInfo( nPathIdMirror, 'EXTR', 'v')
local vtNormSumMirror = EgtGetInfo( nOperIdMirror, 'NORM_SUM', 'v')
local ptMinMirror = EgtGetInfo( nClIdMirror, 'MMIN', 'p')
local ptMaxMirror = EgtGetInfo( nClIdMirror, 'MMAX', 'p')
-- box percorso lavorazione mirror
local b3OperationMirror = BBox3d( ptMinMirror, ptMaxMirror)
-- utensile originale lavorazione specchiata
local sOriginalMirrorToolName = EgtGetMachiningParam( MCH_MP.TOOL)
local bIsOriginalMirrorToolSameSize = WM.IsToolDoubleOk( sToolMasterName, sOriginalMirrorToolName)
-- lavorazione mirror adatta alla specchiatura
local bIsMirrorMachiningOk = nOperIdMaster ~= nOperIdMirror
-- lavorazione master più a sinistra
local bIsMirrorSideOk = ( b3OperationMirror:getCenter():getY() - b3Operation:getCenter():getY()) > ( WD.DOUBLE_HEAD_POCKET_TOLERANCE or 0.5)
-- box delle stesse dimensioni
local bIsMirrorOperationSameDimension = abs( b3Operation:getDimX() - b3OperationMirror:getDimX()) < ( WD.DOUBLE_HEAD_POCKET_TOLERANCE or 0.5) and
abs( b3Operation:getDimY() - b3OperationMirror:getDimY()) < ( WD.DOUBLE_HEAD_POCKET_TOLERANCE or 0.5) and
abs( b3Operation:getDimZ() - b3OperationMirror:getDimZ()) < ( WD.DOUBLE_HEAD_POCKET_TOLERANCE or 0.5)
-- box allineati in X
local bIsMirrorBoxXAligned = abs( b3Operation:getCenter():getX() - b3OperationMirror:getCenter():getX()) < ( WD.DOUBLE_HEAD_POCKET_TOLERANCE or 0.5) and
abs( b3Operation:getCenter():getX() - b3OperationMirror:getCenter():getX()) < ( WD.DOUBLE_HEAD_POCKET_TOLERANCE or 0.5)
-- box che non si intersecano
local bIsNotMirrorBoxOverlapping = not OverlapsXY( b3Operation, b3OperationMirror)
-- distanza minima tra le feature
local dTipToPivotProjectionOnY = dTipToPivot * vtTool:getY()
local dTipToPivotProjectionOnYDouble = dTipToPivotDouble * vtToolMirror:getY()
local dYMinDistance = max( b3Operation:getMin():getY(), b3OperationMirror:getMin():getY()) - min( b3Operation:getMax():getY(), b3OperationMirror:getMax():getY())
local bIsMirrorOperationDistanceOk = dYMinDistance > dMinimumDistanceMirroredOperations + dTipToPivotProjectionOnY - dTipToPivotProjectionOnYDouble + 10 * GEO.EPS_SMALL
-- vettori utensile e somma normali facce specchiati
local vtToolMirrored = Vector3d( vtTool)
vtToolMirrored:mirror( Y_AX())
local bIsMirrorVectorOk = false
if AreSameVectorApprox( vtToolMirrored, vtToolMirror) then
if AreSameVectorApprox(vtTool, vtToolMirror) then
if vtNormSum and vtNormSumMirror then
local vtNormSumMirrored = Vector3d( vtNormSum)
vtNormSumMirrored:mirror( Y_AX())
bIsMirrorVectorOk = AreSameVectorApprox( vtNormSumMirrored, vtNormSumMirror)
end
else
bIsMirrorVectorOk = true
end
end
-- se condizioni corrette, scrivo le note e cancello la specchiata
if bIsOriginalMirrorToolSameSize and bIsMirrorMachiningOk and bIsMirrorSideOk and bIsMirrorOperationSameDimension and bIsMirrorBoxXAligned and bIsNotMirrorBoxOverlapping and bIsMirrorOperationDistanceOk and bIsMirrorVectorOk then
-- calcolo asse di specchiatura
local dYMirrorAx
local b3Tab = EgtGetTableArea()
local ptOnMirrorAx = ( b3Operation:getCenter() + b3OperationMirror:getCenter()) / 2
dYMirrorAx = ptOnMirrorAx:getY() - b3Tab:getMin():getY()
EgtSetCurrMachining( nOperIdMaster)
-- leggo note esistenti
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES)
-- aggiungo note per doppio
sUserNotes = EgtSetValInNotes( sUserNotes, 'DOUBLE', 2)
sUserNotes = EgtSetValInNotes( sUserNotes, 'MirrorAx', dYMirrorAx)
-- scrivo le note della lavorazione
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- cancello l'operazione specchiata
EgtRemoveOperation( nOperIdMirror)
-- rimuovo dalla lista le fresature già assegnate
local nCurrentMirrorMillingOldId = nCurrentMirrorMilling
table.remove( vMillings, nCurrentMilling)
-- avendo rimosso un elemento dall'array, potrebbe essere cambiato l'elemento nCurrentMirrorPocket
if nCurrentMirrorMilling > #vMillings or ( vMillings[nCurrentMirrorMilling] ~= nCurrentMirrorMillingOldId) then nCurrentMirrorMilling = nCurrentMirrorMilling - 1 end
table.remove( vMillings, nCurrentMirrorMilling)
nCurrentMilling = 0
break
end
nCurrentMirrorMilling = nCurrentMirrorMilling + 1
end
end
nCurrentMilling = nCurrentMilling + 1
end
end
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------
function WallExec.ProcessFeatures() function WallExec.ProcessFeatures()
-- errori e stato -- errori e stato
@@ -604,13 +1101,20 @@ function WallExec.ProcessFeatures()
local vPartProc = WallExec.CollectFeatures( vPart[i].Id, b3Raw) local vPartProc = WallExec.CollectFeatures( vPart[i].Id, b3Raw)
vProc = EgtJoinTables( vProc, vPartProc) vProc = EgtJoinTables( vProc, vPartProc)
end end
-- classifico topologicamente le feature
ClassifyTopology( vProc, nRawId)
-- classifico le feature -- classifico le feature
ClassifyFeatures( vProc, b3Raw) ClassifyFeatures( vProc, b3Raw)
-- Eventuale determinazione delle feature lavorabili in parallelo (implementata nella configurazione macchina) -- recupero l'elenco delle aree vietate alle chiodature
local vNLO = WL.GetNailLockOutAreas( vProc)
-- Se non ci sono aree vietate alle chiodature, eventuale determinazione delle feature lavorabili in parallelo (implementata nella configurazione macchina)
-- si impostano i flag Double (nil/0=no, 1=su X, 2=su Y) e Delta (offset tra T14 e T12 positivo o negativo) -- si impostano i flag Double (nil/0=no, 1=su X, 2=su Y) e Delta (offset tra T14 e T12 positivo o negativo)
if WD.FindFeaturesInDouble then if #vNLO == 0 and WD.FindFeaturesInDouble then
WD.FindFeaturesInDouble( vProc, b3Raw) WD.FindFeaturesInDouble( vProc, b3Raw)
end end
SetMirroredFeatures( vProc, b3Raw)
-- debug -- debug
if EgtGetDebugLevel() >= 1 then if EgtGetDebugLevel() >= 1 then
PrintFeatures( vProc) PrintFeatures( vProc)
@@ -621,7 +1125,7 @@ function WallExec.ProcessFeatures()
-- creo la lavorazione -- creo la lavorazione
local Proc = vProc[i] local Proc = vProc[i]
if Proc.Flg ~= 0 then if Proc.Flg ~= 0 then
local bOk, sMsg = AddFeatureMachining( Proc, nRawId, b3Raw) local bOk, sMsg = AddFeatureMachining( Proc, nRawId, b3Raw, vNLO)
if not bOk then if not bOk then
nTotErr = nTotErr + 1 nTotErr = nTotErr + 1
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId}) table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
@@ -630,19 +1134,102 @@ function WallExec.ProcessFeatures()
else else
table.insert( Stats, {Err=0, Msg='', Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId}) table.insert( Stats, {Err=0, Msg='', Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
end end
elseif not Proc.Double then elseif not Proc.Double and not Proc.LockOut then
local sMsg = 'Feature not machinable by orientation' local sMsg = 'Feature not machinable by orientation'
table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId}) table.insert( Stats, {Err=1, Msg=sMsg, Rot=0, CutId=Proc.CutId, TaskId=Proc.TaskId})
end end
end end
EgtOutLog( ' *** End AddMachinings ***', 1) EgtOutLog( ' *** End AddMachinings ***', 1)
-- setto quali sono le lavorazioni da disattivare perchè specchiate di lavorazioni in doppio
local vProcToDisable = {}
for i = 1, #vProc do
local Proc = vProc[i]
if Proc.Double and Proc.Double > 0 then
for j = 1, #vProc do
local ProcMirror = vProc[j]
if Proc.Mirror.Id == ProcMirror.Id then
-- per i fori l'operazione si basa sulla geometria ausiliaria
if Proc.TopologyLongName == 'DRILLING' then
local AuxId = EgtGetInfo( ProcMirror.Id, 'AUXID', 'i') or 0
if AuxId then AuxId = AuxId + ProcMirror.Id end
table.insert( vProcToDisable, AuxId)
-- per tutte le altre lavorazioni si usa la geometria della feature
else
table.insert( vProcToDisable, ProcMirror.Id)
end
end
end
end
end
-- cancello le operazioni legate a lavorazioni specchiate
local nOperId = EgtGetNextOperation( EgtGetPhaseDisposition( 1))
while nOperId do
EgtSetCurrMachining( nOperId)
local nOperationProcIds = EgtGetMachiningGeometry()
local nCurrentOperId = nOperId
if #nOperationProcIds > 0 then
local nOperationProcId = nOperationProcIds[1][1]
for i = 1, #vProcToDisable do
local ProcId = vProcToDisable[i]
if nOperationProcId == ProcId then
nOperId = EgtGetNextOperation( nOperId)
EgtRemoveOperation( nCurrentOperId)
break
end
end
end
if nCurrentOperId == nOperId then
nOperId = EgtGetNextOperation( nOperId)
end
end
SetMirroredOperations()
-- se macchina pareti -- se macchina pareti
if not WD.BEAM_MACHINE then if not WD.BEAM_MACHINE then
-- riordino le lavorazioni tra tutti i pezzi -- riordino le lavorazioni tra tutti i pezzi
local nPhase = 1 local nPhase = 1
local PrevMch = EgtGetPhaseDisposition( nPhase) local PrevMch = EgtGetPhaseDisposition( nPhase)
-- abilitazione ordinamento con priorità da btl: 0 = no, 1 = ordine crescente, 2 = ordine decrescente
-- le lavorazioni con priorità 0 o senza priorità saranno lasciate per ultime
local nGetPriorityFromBtl = WD.BTL_PRIORITY or 0
if nGetPriorityFromBtl > 0 then
local vPriority = {}
nOperId = EgtGetNextOperation( PrevMch)
local nCurrentPriorityId = 1
while nOperId do
local nPriority = EgtGetInfo( nOperId or GDB_ID.NULL, 'PRIORITY', 'i')
if nPriority and nPriority ~= 0 then
vPriority[nCurrentPriorityId] = nPriority
nCurrentPriorityId = nCurrentPriorityId + 1
end
nOperId = EgtGetNextOperation( nOperId)
end
-- sorting delle priorità
-- ordine crescente
if nGetPriorityFromBtl == 1 then
table.sort( vPriority)
-- ordine decrescente
else
table.sort( vPriority, function( a, b) return a > b end)
end
-- riordino le lavorazioni per priorità
for i = 1, #vPriority do
if i == 1 or ( vPriority[i] ~= vPriority[i - 1]) then
PrevMch = SortMachinings( nPhase, PrevMch, nil, vPriority[i])
end
end
end
-- ordinamento standard
SortMachinings( nPhase, PrevMch) SortMachinings( nPhase, PrevMch)
-- Aggiornamento finale di tutto -- Aggiornamento finale di tutto
if nGetPriorityFromBtl > 0 then
InsertScrapRemoval( nPhase)
end
EgtSetCurrPhase( 1) EgtSetCurrPhase( 1)
EgtApplyAllMachinings() EgtApplyAllMachinings()
-- altrimenti macchina travi -- altrimenti macchina travi
+237 -1
View File
@@ -1,5 +1,8 @@
-- WallLib.lua by Egaltech s.r.l. 2022/04/04 -- WallLib.lua by Egaltech s.r.l. 2023/10/16
-- Libreria globale per Pareti -- Libreria globale per Pareti
-- 2023/06/26 Spostata qui Is3EdgesApprox da FreeContour. Ora cerca autonomamente il gruppo se non viene passato.
-- 2023/11/14 Aggiunte funzioni GetProcessAffectedFaces, GetProcessDistanceToNearestParts, GetProcessDistanceToRawPart.
-- 2023/12/11 Aggiunta funzione IsFeatureCuttingEntireSection (allineamento Topology con Beam).
-- Tabella per definizione modulo -- Tabella per definizione modulo
local WallLib = {} local WallLib = {}
@@ -316,5 +319,238 @@ function WallLib.GetNearestOrthoOpposite( vtRef, vtNorm)
return nil return nil
end end
---------------------------------------------------------------------
function WallLib.TestElleShape3( nIdGeom, nNumFacet)
-- valida solo nel caso di tre facce
if nNumFacet ~= 3 then return false end
-- determino se L con una faccia terminale o U con tre facce
local bIsL = true
for i = 1, 3 do
local vFacAdj = EgtSurfTmFacetAdjacencies( nIdGeom, i - 1)[1]
-- le conto
local nCount = 0
for j = 1, #vFacAdj do
if vFacAdj[j] >= 0 then
nCount = nCount + 1
end
end
if nCount == 1 then
bIsL = false
break
end
end
return bIsL
end
---------------------------------------------------------------------
function WallLib.TestElleShape4( nIdGeom, nNumFacet)
-- valida solo nel caso di quattro facce
if nNumFacet ~= 4 then return false end
-- determino se L con due facce terminali o O
local nFac3Adj = 0
local dMinArea3 = GEO.INFINITO * GEO.INFINITO
local dMaxArea2 = 0
for i = 1, 4 do
local vFacAdj = EgtSurfTmFacetAdjacencies( nIdGeom, i - 1)[1]
-- le conto
local nCount = 0
for j = 1, #vFacAdj do
if vFacAdj[j] >= 0 then
nCount = nCount + 1
end
end
local _, dH, dV = EgtSurfTmFacetMinAreaRectangle( nIdGeom, i - 1, GDB_ID.ROOT)
local dArea = dH * dV
if nCount == 2 then
dMaxArea2 = max( dMaxArea2, dArea)
elseif nCount == 3 then
dMinArea3 = min( dMinArea3, dArea)
nFac3Adj = nFac3Adj + 1
end
end
if nFac3Adj ~= 2 then return false end
-- verifico se L profonda oppure lunga
if dMinArea3 < dMaxArea2 then
return 1
else
return 2
end
end
---------------------------------------------------------------------
-- Funzione per determinare se la faccia ha lati molto corti (trascurabili) ed è quindi approssimabile ad una 3 facce
function WallLib.Is3EdgesApprox( Proc, nFacet, nAddGrpId)
nAddGrpId = nAddGrpId or WallLib.GetAddGroup( Proc.PartId)
-- recupero il contorno della faccia
local nContourId, nContourCnt = EgtExtractSurfTmFacetLoops( Proc.Id, nFacet, nAddGrpId)
if not nContourId then return false end
EgtMergeCurvesInCurveCompo( nContourId)
-- recupero il numero di lati del contorno
local _, nEntityCount = EgtCurveDomain( nContourId)
if not nEntityCount then return false end
-- se sono già tre, ho finito
if nEntityCount == 3 then return true end
-- rimuovo i lati molto corti dal conteggio totale
local nEdges = nEntityCount
for i = 1, nEntityCount do
local dLength = EgtCurveCompoLength( nContourId, i - 1)
if dLength < 15 then nEdges = nEdges - 1 end
end
-- verifico il numero significativo di lati
local bResult = ( nEdges == 3)
-- cancello tutti i contorni appena creati
EgtErase( EgtTableFill( nContourId, nContourCnt))
if bResult then
EgtOutLog( 'FreeContour : Face with ' .. tostring( nEntityCount) .. ' edges skipped (approx 3 edges)')
end
return bResult
end
-------------------------------------------------------------------------------------------------------------
-- restituisce le facce della parte interessate dalla feature Proc
function WallLib.GetProcessAffectedFaces( Proc)
local nBoxSolidId = EgtGetFirstNameInGroup( Proc.PartId or GDB_ID.NULL, 'Box')
local b3Part = EgtGetBBoxGlob( nBoxSolidId, GDB_BB.STANDARD)
local vtFacesAffected = { Top = false, Bottom = false, Front = false, Back = false, Left = false, Right = false}
if Proc.Box and not Proc.Box:isEmpty() then
if Proc.Box:getMax():getZ() > b3Part:getMax():getZ() - 500 * GEO.EPS_SMALL then
vtFacesAffected.Top = true
end
if Proc.Box:getMin():getZ() < b3Part:getMin():getZ() + 500 * GEO.EPS_SMALL then
vtFacesAffected.Bottom = true
end
if Proc.Box:getMin():getY() < b3Part:getMin():getY() + 500 * GEO.EPS_SMALL then
vtFacesAffected.Front = true
end
if Proc.Box:getMax():getY() > b3Part:getMax():getY() - 500 * GEO.EPS_SMALL then
vtFacesAffected.Back = true
end
if Proc.Box:getMin():getX() < b3Part:getMin():getX() + 500 * GEO.EPS_SMALL then
vtFacesAffected.Left = true
end
if Proc.Box:getMax():getX() > b3Part:getMax():getX() - 500 * GEO.EPS_SMALL then
vtFacesAffected.Right = true
end
end
return vtFacesAffected
end
-------------------------------------------------------------------------------------------------------------
-- restituisce le distanze XY tra la feature Proc e le altre parti più vicine, secondo le direzioni Y-/Y+/X-/X+
function WallLib.GetProcessDistanceToNearestParts( Proc)
local b3Proc = Proc.Box
local ptMinProc = b3Proc:getMin()
local ptMaxProc = b3Proc:getMax()
local vtDistances = { Front = 0, Back = 0, Left = 0, Right = 0}
if Proc.AffectedFaces.Front then
vtDistances.Front = GEO.INFINITO
end
if Proc.AffectedFaces.Back then
vtDistances.Back = GEO.INFINITO
end
if Proc.AffectedFaces.Left then
vtDistances.Left = GEO.INFINITO
end
if Proc.AffectedFaces.Right then
vtDistances.Right = GEO.INFINITO
end
local nRawId = EgtGetFirstRawPart()
local nPartId = EgtGetFirstPartInRawPart( nRawId)
while nPartId do
if Proc.PartId ~= nPartId then
local nBoxSolidId = EgtGetFirstNameInGroup( nPartId, 'Box')
local b3Solid = EgtGetBBoxGlob( nBoxSolidId or GDB_ID.NULL, GDB_BB.STANDARD)
b3Solid:expand( - 10 * GEO.EPS_SMALL)
local ptMinPart = b3Solid:getMin()
local ptMaxPart = b3Solid:getMax()
if Proc.AffectedFaces.Front then
if OverlapsXY( b3Proc, b3Solid) then
vtDistances.Front = 0
elseif OverlapsX( b3Proc, b3Solid) then
if ptMaxPart:getY() < ptMinProc:getY() + 100 * GEO.EPS_SMALL then
vtDistances.Front = min( vtDistances.Front, max( 0, ptMinProc:getY() - ptMaxPart:getY()))
end
end
end
if Proc.AffectedFaces.Back then
if OverlapsXY( b3Proc, b3Solid) then
vtDistances.Back = 0
elseif OverlapsX( b3Proc, b3Solid) then
if ptMaxProc:getY() < ptMinPart:getY() + 100 * GEO.EPS_SMALL then
vtDistances.Back = min( vtDistances.Back, max( 0, ptMinPart:getY() - ptMaxProc:getY()))
end
end
end
if Proc.AffectedFaces.Left then
if OverlapsXY( b3Proc, b3Solid) then
vtDistances.Left = 0
elseif OverlapsY( b3Proc, b3Solid) then
if ptMaxPart:getX() < ptMinProc:getX() + 100 * GEO.EPS_SMALL then
vtDistances.Left = min( vtDistances.Left, max( 0, ptMinProc:getX() - ptMaxPart:getX()))
end
end
end
if Proc.AffectedFaces.Right then
if OverlapsXY( b3Proc, b3Solid) then
vtDistances.Right = 0
elseif OverlapsY( b3Proc, b3Solid) then
if ptMaxProc:getX() < ptMinPart:getX() + 100 * GEO.EPS_SMALL then
vtDistances.Right = min( vtDistances.Right, max( 0, ptMinPart:getX() - ptMaxProc:getX()))
end
end
end
end
nPartId = EgtGetNextPartInRawPart( nPartId)
end
return vtDistances
end
-------------------------------------------------------------------------------------------------------------
-- restituisce le distanze XY tra la feature Proc e il termine del grezzo, secondo le direzioni Y-/Y+/X-/X+
function WallLib.GetProcessDistanceToRawPart( Proc, b3Raw)
local b3Proc = Proc.Box
local ptMinProc = b3Proc:getMin()
local ptMaxProc = b3Proc:getMax()
local ptMinRaw = b3Raw:getMin()
local ptMaxRaw = b3Raw:getMax()
local vtDistances = { Front = GEO.INFINITO, Back = GEO.INFINITO, Left = GEO.INFINITO, Right = GEO.INFINITO}
if EnclosesXY( b3Raw, b3Proc) then
vtDistances.Front = max( 0, ptMinProc:getY() - ptMinRaw:getY())
vtDistances.Back = max( 0, ptMaxRaw:getY() - ptMaxProc:getY())
vtDistances.Left = max( 0, ptMinProc:getX() - ptMinRaw:getX())
vtDistances.Right = max( 0, ptMaxRaw:getX() - ptMaxProc:getX())
end
return vtDistances
end
-------------------------------------------------------------------------------------------------------------
function WallLib.GetNailLockOutAreas( vProc)
local vNLO = {}
for i = 1, #vProc do
if vProc[i].LockOut == 1 then
local AuxId = EgtGetInfo( vProc[i].Id, 'AUXID', 'i')
if AuxId then AuxId = AuxId + vProc[i].Id end
if AuxId then
local nAddGrpId = WallLib.GetAddGroup( vProc[i].PartId)
local nSfrId = EgtSurfFlatRegion( nAddGrpId, {AuxId})
if nSfrId then
table.insert( vNLO, nSfrId)
end
end
end
end
return vNLO
end
-------------------------------------------------------------------------------------------------------------
-- restituisce vero se la feature con box b3Proc taglia l'intera sezione della parete, rappresentata dalle sue dimensioni W, H e L
function WallLib.IsFeatureCuttingEntireSection( b3Proc, dRawW, dRawH, dRawL)
return ( ( ( abs( b3Proc:getDimY() - dRawW) < 10 * GEO.EPS_SMALL or b3Proc:getDimY() > dRawW) or ( abs( b3Proc:getDimX() - dRawL) < 10 * GEO.EPS_SMALL or b3Proc:getDimX() > dRawL)) and (abs(b3Proc:getDimZ() - dRawH) < 10 * GEO.EPS_SMALL or b3Proc:getDimZ() > dRawH))
end
------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------
return WallLib return WallLib
+8 -7
View File
@@ -56,6 +56,7 @@ local Text = require( 'WProcessText')
-- Carico i dati globali -- Carico i dati globali
local WD = require( 'WallData') local WD = require( 'WallData')
-------------------------------------------------------------------
local function ClassifyFlip( vPartProc, b3Part) local function ClassifyFlip( vPartProc, b3Part)
local FlipFeatureStates = {} local FlipFeatureStates = {}
@@ -132,7 +133,7 @@ local function ClassifyFlip( vPartProc, b3Part)
return FlipFeatureStates, bLapJoints return FlipFeatureStates, bLapJoints
end end
-------------------------------------------------------------------
local function ClassifyRotation( vPartProc) local function ClassifyRotation( vPartProc)
local RotateFeatureStates = {} local RotateFeatureStates = {}
@@ -144,12 +145,11 @@ local function ClassifyRotation( vPartProc)
end end
end end
end end
return RotateFeatureStates return RotateFeatureStates
end end
--- -------------------------------------------------------------------
-------------------------------------------------------------------
local vPartProc = WE.CollectFeatures( NFAR.PARTID) local vPartProc = WE.CollectFeatures( NFAR.PARTID)
local b3Part = EgtGetBBoxGlob( NFAR.PARTID, GDB_BB.STANDARD) local b3Part = EgtGetBBoxGlob( NFAR.PARTID, GDB_BB.STANDARD)
local bManualFlip = EgtGetInfo( NFAR.PARTID, "MANUALFLIP", 'b') local bManualFlip = EgtGetInfo( NFAR.PARTID, "MANUALFLIP", 'b')
@@ -157,9 +157,9 @@ local bManualRot = EgtGetInfo( NFAR.PARTID, "MANUALROT", 'b')
-- FLIP -- FLIP
local FlipFeatureStates, bLapJoints = ClassifyFlip( vPartProc, b3Part) local FlipFeatureStates, bLapJoints = ClassifyFlip( vPartProc, b3Part)
local bFlip
if not bManualFlip then if not bManualFlip then
local bFlip
-- analizzo stati flip delle feature -- analizzo stati flip delle feature
local nFlip0Min = 100 local nFlip0Min = 100
local nFlip0Cnt = 0 local nFlip0Cnt = 0
@@ -217,7 +217,7 @@ end
-- rimuovo parametri Q -- rimuovo parametri Q
local b3PartInside = BBox3d( b3Part) local b3PartInside = BBox3d( b3Part)
b3PartInside:expand( - WD.INSIDE_RAW_TOL) b3PartInside:expand( - ( WD.INSIDE_RAW_TOL or 30))
for nInd = 1, #vPartProc do for nInd = 1, #vPartProc do
local Proc = vPartProc[nInd] local Proc = vPartProc[nInd]
@@ -275,6 +275,7 @@ end
-- ROTATION -- ROTATION
nRotate = 0 nRotate = 0
-- venatura -- venatura
EgtRemoveInfo( NFAR.PARTID, "HasGrainDirection") EgtRemoveInfo( NFAR.PARTID, "HasGrainDirection")
local bGrain = false local bGrain = false
@@ -439,7 +440,7 @@ if not bManualRot then
-- setto info nel pezzo -- setto info nel pezzo
if nRotate > 0 then if nRotate > 0 then
local nPartRot = EgtGetInfo( NFAR.PARTID, "ROTATED", 'i') or 0 local nPartRot = EgtGetInfo( NFAR.PARTID, "ROTATED", 'i') or 0
local nTotRot = nPartRot - nRotate local nTotRot = nPartRot - EgtIf( bFlip, -nRotate, nRotate)
nTotRot = EgtIf( nTotRot < 0, nTotRot + 360, nTotRot) nTotRot = EgtIf( nTotRot < 0, nTotRot + 360, nTotRot)
EgtSetInfo( NFAR.PARTID, "ROTATED", nTotRot) EgtSetInfo( NFAR.PARTID, "ROTATED", nTotRot)
EgtSetInfo( NFAR.PARTID, "FLIPROTMODIFIED", 1) EgtSetInfo( NFAR.PARTID, "FLIPROTMODIFIED", 1)
+121 -299
View File
@@ -19,7 +19,7 @@ NEST.MACH_AREA_OTHER_DIAM = 200
NEST.MACH_AREA_IGNORE_3rdFACE = 1 -- 0 NEST.MACH_AREA_IGNORE_3rdFACE = 1 -- 0
local sLog = 'NestProcess : ' .. NEST.FILE .. ', ' .. NEST.MACHINE .. ', ' .. LEN["1"] .. ', ' .. WIDTH["1"] local sLog = 'NestProcess : ' .. NEST.FILE .. ', ' .. NEST.MACHINE .. ', ' .. LEN[1] .. ', ' .. WIDTH[1]
EgtOutLog( sLog) EgtOutLog( sLog)
-- Cancello file di log specifico -- Cancello file di log specifico
@@ -60,9 +60,21 @@ local FreeContour = require( 'WProcessFreeContour')
-- Carico i dati globali -- Carico i dati globali
local WD = require( 'WallData') local WD = require( 'WallData')
-- Recupero alcuni dati dal WallData o li setto a valori di default
local s_dSideMillDiamDown = WD.SIDEMILL_DIAM_DOWN or 350
local s_dSideMillDiamUp = WD.SIDEMILL_DIAM_UP or 65
local s_dHorDrillLen = WD.HOR_DRILL_LEN or 1780
local s_dHorDrillDiam = WD.HOR_DRILL_DIAM or 35
local s_sOrigCorner = WD.ORIG_CORNER or 'TL'
local s_dIntRulli = WD.INTRULLI or 1200
local s_dMinRawYHorDrill = WD.MINRAWY_HOR_DRILL or 2800
local s_dNestHoleMinArea = WD.NEST_HOLE_MIN_AREA or 200000
local s_dInsideRawTol = WD.INSIDE_RAW_TOL or 30
-- lista dei pezzi con flip o rotazione -- lista dei pezzi con flip o rotazione
local PartStates = {} local PartStates = {}
------------------------------------------------------------------
-- Funzioni per scrittura su file di log specifico -- Funzioni per scrittura su file di log specifico
local function WriteErrToLogFile( nErr, sMsg, nRot, nCutId, nTaskId) local function WriteErrToLogFile( nErr, sMsg, nRot, nCutId, nTaskId)
local hFile = io.open( sLogFile, 'a') local hFile = io.open( sLogFile, 'a')
@@ -74,12 +86,14 @@ local function WriteErrToLogFile( nErr, sMsg, nRot, nCutId, nTaskId)
hFile:close() hFile:close()
end end
------------------------------------------------------------------
local function WriteTimeToLogFile( dTime) local function WriteTimeToLogFile( dTime)
local hFile = io.open( sLogFile, 'a') local hFile = io.open( sLogFile, 'a')
hFile:write( 'TIME=' .. EgtNumToString( dTime) .. '\n') hFile:write( 'TIME=' .. EgtNumToString( dTime) .. '\n')
hFile:close() hFile:close()
end end
------------------------------------------------------------------
-- Funzione per gestire visualizzazione dopo errore -- Funzione per gestire visualizzazione dopo errore
local function PostErrView( nErr, sMsg) local function PostErrView( nErr, sMsg)
if nErr ~= 0 and ( NEST.FLAG == 1 or NEST.FLAG == 2 or NEST.FLAG == 5) then if nErr ~= 0 and ( NEST.FLAG == 1 or NEST.FLAG == 2 or NEST.FLAG == 5) then
@@ -89,6 +103,7 @@ local function PostErrView( nErr, sMsg)
end end
end end
------------------------------------------------------------------
-- Funzione per gestire visualizzazione dopo warning -- Funzione per gestire visualizzazione dopo warning
local function PostWarnView( nWarn, sMsg) local function PostWarnView( nWarn, sMsg)
if nWarn ~= 0 and ( NEST.FLAG == 1 or NEST.FLAG == 2 or NEST.FLAG == 5) then if nWarn ~= 0 and ( NEST.FLAG == 1 or NEST.FLAG == 2 or NEST.FLAG == 5) then
@@ -98,6 +113,7 @@ local function PostWarnView( nWarn, sMsg)
end end
end end
------------------------------------------------------------------
-- Funzione per aggiornare dati ausiliari -- Funzione per aggiornare dati ausiliari
local function UpdateAuxData( sAuxFile) local function UpdateAuxData( sAuxFile)
local bModif = false local bModif = false
@@ -111,6 +127,7 @@ local function UpdateAuxData( sAuxFile)
return bModif return bModif
end end
------------------------------------------------------------------
-- Funzione per trovare nome MachGroup -- Funzione per trovare nome MachGroup
local function NewMachGroupName() local function NewMachGroupName()
local nMachGroupId = EgtGetFirstMachGroup() local nMachGroupId = EgtGetFirstMachGroup()
@@ -127,6 +144,7 @@ local function NewMachGroupName()
return nMaxMachGroup + 1 return nMaxMachGroup + 1
end end
------------------------------------------------------------------
-- Funzione che crea il rettangolo della lavorazione -- Funzione che crea il rettangolo della lavorazione
local function CreateToolRectangle( ptP1, dValP1, ptP2, dValP2, vtFace, dValFace, nOutlineGrp) local function CreateToolRectangle( ptP1, dValP1, ptP2, dValP2, vtFace, dValFace, nOutlineGrp)
local dExtra = 5 local dExtra = 5
@@ -141,6 +159,7 @@ local function CreateToolRectangle( ptP1, dValP1, ptP2, dValP2, vtFace, dValFace
return nId return nId
end end
------------------------------------------------------------------
-- Funzione che verifica se la lavorazione è lap joint dal basso ed eventualmente ne calcola l'area di lavorazione -- Funzione che verifica se la lavorazione è lap joint dal basso ed eventualmente ne calcola l'area di lavorazione
local function IdentifyLJFromBottom( Proc, bCompute, nOutlineGrp) local function IdentifyLJFromBottom( Proc, bCompute, nOutlineGrp)
@@ -162,12 +181,11 @@ local function IdentifyLJFromBottom( Proc, bCompute, nOutlineGrp)
if bCompute then if bCompute then
local bAdj, ptP1, ptP2, dAng = EgtSurfTmFacetsContact( Proc.Id, 0, 1, GDB_ID.ROOT) local bAdj, ptP1, ptP2, dAng = EgtSurfTmFacetsContact( Proc.Id, 0, 1, GDB_ID.ROOT)
-- creo il rettangolo della lavorazione -- creo il rettangolo della lavorazione
nRectId = CreateToolRectangle( ptP1, WD.SIDEMILL_DIAM_DOWN / 2, ptP2, WD.SIDEMILL_DIAM_DOWN / 2, vtFace, WD.SIDEMILL_DIAM_DOWN, nOutlineGrp) nRectId = CreateToolRectangle( ptP1, s_dSideMillDiamDown / 2, ptP2, s_dSideMillDiamDown / 2, vtFace, s_dSideMillDiamDown, nOutlineGrp)
end end
end end
end end
elseif Proc.Fct == 3 then elseif Proc.Fct == 3 then
local nFacInd, dElev, nFacInd2 = WL.GetFaceWithMostAdj( Proc.Id, Proc.PartId) local nFacInd, dElev, nFacInd2 = WL.GetFaceWithMostAdj( Proc.Id, Proc.PartId)
@@ -181,7 +199,7 @@ local function IdentifyLJFromBottom( Proc, bCompute, nOutlineGrp)
if abs( ptP1:getZ() - ptP2:getZ()) < GEO.EPS_SMALL then if abs( ptP1:getZ() - ptP2:getZ()) < GEO.EPS_SMALL then
bLJFromBottom = true bLJFromBottom = true
if bCompute then if bCompute then
nRectId = CreateToolRectangle( ptP1, WD.SIDEMILL_DIAM_DOWN / 2, ptP2, WD.SIDEMILL_DIAM_DOWN / 2, vtFace, WD.SIDEMILL_DIAM_DOWN, nOutlineGrp) nRectId = CreateToolRectangle( ptP1, s_dSideMillDiamDown / 2, ptP2, s_dSideMillDiamDown / 2, vtFace, s_dSideMillDiamDown, nOutlineGrp)
end end
end end
end end
@@ -209,8 +227,8 @@ local function IdentifyLJFromBottom( Proc, bCompute, nOutlineGrp)
if AreSamePointApprox( ptP2, ptP3) or AreSamePointApprox( ptP2, ptP4) then if AreSamePointApprox( ptP2, ptP3) or AreSamePointApprox( ptP2, ptP4) then
ptP1, ptP2 = ptP2, ptP1 ptP1, ptP2 = ptP2, ptP1
end end
local dVal = EgtIf( NEST.MACH_AREA_IGNORE_3rdFACE == 1, WD.SIDEMILL_DIAM_DOWN / 2, 0) local dVal = EgtIf( NEST.MACH_AREA_IGNORE_3rdFACE == 1, s_dSideMillDiamDown / 2, 0)
nRectId = CreateToolRectangle( ptP1, dVal, ptP2, WD.SIDEMILL_DIAM_DOWN / 2, vtFace, WD.SIDEMILL_DIAM_DOWN, nOutlineGrp) nRectId = CreateToolRectangle( ptP1, dVal, ptP2, s_dSideMillDiamDown / 2, vtFace, s_dSideMillDiamDown, nOutlineGrp)
end end
end end
end end
@@ -237,7 +255,7 @@ local function IdentifyLJFromBottom( Proc, bCompute, nOutlineGrp)
if AreSamePointApprox( ptP2, ptP3) or AreSamePointApprox( ptP2, ptP4) then if AreSamePointApprox( ptP2, ptP3) or AreSamePointApprox( ptP2, ptP4) then
ptP1, ptP2 = ptP2, ptP1 ptP1, ptP2 = ptP2, ptP1
end end
nRectId = CreateToolRectangle( ptP1, 0, ptP2, WD.SIDEMILL_DIAM_DOWN / 2, vtFace, WD.SIDEMILL_DIAM_DOWN, nOutlineGrp) nRectId = CreateToolRectangle( ptP1, 0, ptP2, s_dSideMillDiamDown / 2, vtFace, s_dSideMillDiamDown, nOutlineGrp)
end end
end end
end end
@@ -249,11 +267,10 @@ local function IdentifyLJFromBottom( Proc, bCompute, nOutlineGrp)
if vtFace:getZ() < -dMinCompZ then vtFace = vtFace2 end if vtFace:getZ() < -dMinCompZ then vtFace = vtFace2 end
if bCompute then if bCompute then
local bAdj, ptP1, ptP2 = EgtSurfTmFacetsContact( Proc.Id, nFacInd, nFacInd2, GDB_ID.ROOT) local bAdj, ptP1, ptP2 = EgtSurfTmFacetsContact( Proc.Id, nFacInd, nFacInd2, GDB_ID.ROOT)
nRectId = CreateToolRectangle( ptP1, 0, ptP2, 0, vtFace, WD.SIDEMILL_DIAM_DOWN, nOutlineGrp) nRectId = CreateToolRectangle( ptP1, 0, ptP2, 0, vtFace, s_dSideMillDiamDown, nOutlineGrp)
end end
end end
end end
end end
end end
@@ -264,13 +281,14 @@ local function IdentifyLJFromBottom( Proc, bCompute, nOutlineGrp)
end end
end end
------------------------------------------------------------------
-- Funzione che verifica se la lavorazione è lap joint da sopra ed eventualmente ne calcola l'area di lavorazione -- Funzione che verifica se la lavorazione è lap joint da sopra ed eventualmente ne calcola l'area di lavorazione
local function IdentifyLJFromTop( Proc, bCompute, nOutlineGrp) local function IdentifyLJFromTop( Proc, bCompute, nOutlineGrp)
local bLJFromTop = false local bLJFromTop = false
local vtFace, nRectId local vtFace, nRectId
if not WD.SIDEMILL_DIAM_UP or WD.SIDEMILL_DIAM_UP < GEO.EPS_SMALL then return end if s_dSideMillDiamUp < GEO.EPS_SMALL then return end
local dMinComp = 0.95 local dMinComp = 0.95
if Proc.Fct == 2 then if Proc.Fct == 2 then
@@ -291,8 +309,8 @@ local function IdentifyLJFromTop( Proc, bCompute, nOutlineGrp)
elseif vtFace:getY() > dMinComp or vtFace:getY() < - dMinComp then elseif vtFace:getY() > dMinComp or vtFace:getY() < - dMinComp then
dDim = b3Face:getDimY() dDim = b3Face:getDimY()
end end
local dValFace = max( dDim + WD.SIDEMILL_DIAM_UP / 2, WD.SIDEMILL_DIAM_UP) local dValFace = max( dDim + s_dSideMillDiamUp / 2, s_dSideMillDiamUp)
local dVal = WD.SIDEMILL_DIAM_UP / 2 local dVal = s_dSideMillDiamUp / 2
if NEST.MACH_AREA_USE_OTHER_DIAM == 1 then if NEST.MACH_AREA_USE_OTHER_DIAM == 1 then
dVal = NEST.MACH_AREA_OTHER_DIAM / 2 dVal = NEST.MACH_AREA_OTHER_DIAM / 2
end end
@@ -314,7 +332,7 @@ local function IdentifyLJFromTop( Proc, bCompute, nOutlineGrp)
local nOtherFace = EgtIf( nFacInd == 0, 1, 0) local nOtherFace = EgtIf( nFacInd == 0, 1, 0)
local vtNOther = EgtSurfTmFacetNormVersor( Proc.Id, nOtherFace, GDB_ID.ROOT) local vtNOther = EgtSurfTmFacetNormVersor( Proc.Id, nOtherFace, GDB_ID.ROOT)
local vtDir = EgtIf( AreSameOrOppositeVectorApprox( vtNOther, X_AX()), Y_AX(), X_AX()) local vtDir = EgtIf( AreSameOrOppositeVectorApprox( vtNOther, X_AX()), Y_AX(), X_AX())
local dVal = WD.SIDEMILL_DIAM_UP / 2 + 5 local dVal = s_dSideMillDiamUp / 2 + 5
local ptMin = b3Face:getMin() - dVal * vtDir local ptMin = b3Face:getMin() - dVal * vtDir
local ptMax = b3Face:getMax() + dVal * vtDir local ptMax = b3Face:getMax() + dVal * vtDir
-- nRectId = EgtRectangle2P( nOutlineGrp, Point3d(ptMax:getX(), ptMax:getY(), 0), Point3d( ptMin:getX(), ptMin:getY(), 0)) -- nRectId = EgtRectangle2P( nOutlineGrp, Point3d(ptMax:getX(), ptMax:getY(), 0), Point3d( ptMin:getX(), ptMin:getY(), 0))
@@ -352,8 +370,8 @@ local function IdentifyLJFromTop( Proc, bCompute, nOutlineGrp)
elseif vtFace:getY() > dMinComp or vtFace:getY() < - dMinComp then elseif vtFace:getY() > dMinComp or vtFace:getY() < - dMinComp then
dDim = b3Face:getDimY() dDim = b3Face:getDimY()
end end
local dValFace = max( dDim + WD.SIDEMILL_DIAM_UP / 2, WD.SIDEMILL_DIAM_UP) local dValFace = max( dDim + s_dSideMillDiamUp / 2, s_dSideMillDiamUp)
local dVal = WD.SIDEMILL_DIAM_UP / 2 local dVal = s_dSideMillDiamUp / 2
if NEST.MACH_AREA_USE_OTHER_DIAM == 1 then if NEST.MACH_AREA_USE_OTHER_DIAM == 1 then
dVal = NEST.MACH_AREA_OTHER_DIAM / 2 dVal = NEST.MACH_AREA_OTHER_DIAM / 2
end end
@@ -370,6 +388,7 @@ local function IdentifyLJFromTop( Proc, bCompute, nOutlineGrp)
end end
end end
------------------------------------------------------------------
-- Funzione che crea le regioni occupate dalle lavorazioni -- Funzione che crea le regioni occupate dalle lavorazioni
local function ComputeToolOutlines( nPartId) local function ComputeToolOutlines( nPartId)
@@ -419,7 +438,7 @@ local function ComputeToolOutlines( nPartId)
local dDiam = 2 * EgtArcRadius( AuxId) local dDiam = 2 * EgtArcRadius( AuxId)
-- verifico se la lunghezza del foro è maggiore della lunghezza della punta -- verifico se la lunghezza del foro è maggiore della lunghezza della punta
if bOpen and AreSameOrOppositeVectorApprox( vtExtr, Y_AX()) and dLen > WD.HOR_DRILL_LEN - 1 then if bOpen and AreSameOrOppositeVectorApprox( vtExtr, Y_AX()) and dLen > s_dHorDrillLen - 1 then
local ptP1 = Proc.Box:getMin() local ptP1 = Proc.Box:getMin()
local ptP2 = Proc.Box:getMax() local ptP2 = Proc.Box:getMax()
local dExtra = 10 local dExtra = 10
@@ -451,49 +470,47 @@ local function ComputeToolOutlines( nPartId)
dVal = ( NEST.OFFSET + 0.1) * dCosAlpha dVal = ( NEST.OFFSET + 0.1) * dCosAlpha
end end
local frLoc, dDimX, dDimY = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nInd, GDB_ID.ROOT) local frLoc, dDimX, dDimY = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nInd, GDB_ID.ROOT)
local b3Face = EgtSurfTmGetFacetBBoxRef( Proc.Id, nInd, GDB_BB.STANDARD, frLoc) local b3Face = EgtSurfTmGetFacetBBoxRef( Proc.Id, nInd, GDB_BB.STANDARD, frLoc)
local ptA = b3Face:getMin() local ptA = b3Face:getMin()
local ptC = b3Face:getMax() local ptC = b3Face:getMax()
local ptB = ptA + dDimY * Y_AX() local ptB = ptA + dDimY * Y_AX()
local ptD = ptA + dDimX * X_AX() local ptD = ptA + dDimX * X_AX()
ptA:toGlob( frLoc) ptA:toGlob( frLoc)
ptB:toGlob( frLoc) ptB:toGlob( frLoc)
ptC:toGlob( frLoc) ptC:toGlob( frLoc)
ptD:toGlob( frLoc) ptD:toGlob( frLoc)
local ptP1, ptP2 local ptP1, ptP2
if bUnderCut then if bUnderCut then
ptP1 = EgtIf( ptA:getZ() > ptC:getZ(), ptA, ptC) ptP1 = EgtIf( ptA:getZ() > ptC:getZ(), ptA, ptC)
ptP2 = EgtIf( ptB:getZ() > ptD:getZ(), ptB, ptD) ptP2 = EgtIf( ptB:getZ() > ptD:getZ(), ptB, ptD)
else else
ptP1 = EgtIf( ptA:getZ() < ptC:getZ(), ptA, ptC) ptP1 = EgtIf( ptA:getZ() < ptC:getZ(), ptA, ptC)
ptP2 = EgtIf( ptB:getZ() < ptD:getZ(), ptB, ptD) ptP2 = EgtIf( ptB:getZ() < ptD:getZ(), ptB, ptD)
end end
local vtDir = ptP2 - ptP1 local vtDir = ptP2 - ptP1
vtDir:normalize() vtDir:normalize()
ptP1 = ptP1 - vtDir * 0.5 * NEST.OFFSET ptP1 = ptP1 - vtDir * 0.5 * NEST.OFFSET
ptP2 = ptP2 + vtDir * 0.5 * NEST.OFFSET ptP2 = ptP2 + vtDir * 0.5 * NEST.OFFSET
local vtNxy = Vector3d( vtN:getX(), vtN:getY(), 0) local vtNxy = Vector3d( vtN:getX(), vtN:getY(), 0)
vtNxy:normalize() vtNxy:normalize()
local ptP4 = ptP2 + dVal * vtNxy local ptP4 = ptP2 + dVal * vtNxy
local nRectId = EgtRectangle3P( nOutlineGrp, ptP1, ptP4, ptP2)
EgtSetColor( nRectId, EgtStdColor("AQUA"))
if nRectId ~= GDB_ID.NULL then table.insert( ToolOutlineId, nRectId) end
local nRectId = EgtRectangle3P( nOutlineGrp, ptP1, ptP4, ptP2)
EgtSetColor( nRectId, EgtStdColor("AQUA"))
if nRectId ~= GDB_ID.NULL then table.insert( ToolOutlineId, nRectId) end
end end
end end
end end
end end
end end
return ToolOutlineId return ToolOutlineId
end end
------------------------------------------------------------------
local function ClassifyDrillsOnLateralFaces( nPartId, dMinSheetWidth) local function ClassifyDrillsOnLateralFaces( nPartId, dMinSheetWidth)
local dDeltaRaw = WD.MAX_WIDTH - dMinSheetWidth + NEST.KERF local dDeltaRaw = WD.MAX_WIDTH - dMinSheetWidth + NEST.KERF
@@ -518,11 +535,11 @@ local function ClassifyDrillsOnLateralFaces( nPartId, dMinSheetWidth)
if not AuxId or EgtGetType( AuxId) ~= GDB_TY.CRV_ARC then break end if not AuxId or EgtGetType( AuxId) ~= GDB_TY.CRV_ARC then break end
-- verifico se diametro compatibile con la punta -- verifico se diametro compatibile con la punta
local dDiam = 2 * EgtArcRadius( AuxId) local dDiam = 2 * EgtArcRadius( AuxId)
if abs( dDiam - WD.HOR_DRILL_DIAM) < WD.DRILL_TOL + GEO.EPS_SMALL then if abs( dDiam - s_dHorDrillDiam) < WD.DRILL_TOL + GEO.EPS_SMALL then
local ptDrill = EgtCP( AuxId, GDB_RT.GLOB) local ptDrill = EgtCP( AuxId, GDB_RT.GLOB)
local dLen = abs( EgtCurveThickness( AuxId)) local dLen = abs( EgtCurveThickness( AuxId))
local bLong = dLen > WD.HOR_DRILL_LEN - 1 local bLong = dLen > s_dHorDrillLen - 1
local bOnlyOnRef = dLen + dDeltaRaw > WD.HOR_DRILL_LEN - GEO.EPS_SMALL and not bLong local bOnlyOnRef = dLen + dDeltaRaw > s_dHorDrillLen - GEO.EPS_SMALL and not bLong
-- faccia Front -- faccia Front
local dTol = GEO.EPS_SMALL local dTol = GEO.EPS_SMALL
@@ -632,13 +649,12 @@ local function ClassifyDrillsOnLateralFaces( nPartId, dMinSheetWidth)
end end
end end
if NEST.DRILL_MACH_AREA == 0 then if NEST.DRILL_MACH_AREA == 0 then
DrillOnFaces[sDrillFace].long = false DrillOnFaces[sDrillFace].long = false
end end
if nMax > 0 then if nMax > 0 then
DrillClassif = { sCase = sDrillFace, bClosed = DrillOnFaces[sDrillFace].closed, bLong = DrillOnFaces[sDrillFace].long, bOnlyOnRef = DrillOnFaces[sDrillFace].OnlyOnRef } DrillClassif = { sCase = sDrillFace, bClosed = DrillOnFaces[sDrillFace].closed, bLong = DrillOnFaces[sDrillFace].long, bOnlyOnRef = DrillOnFaces[sDrillFace].OnlyOnRef}
end end
local DrillClassif2 local DrillClassif2
@@ -646,13 +662,14 @@ local function ClassifyDrillsOnLateralFaces( nPartId, dMinSheetWidth)
if NEST.DRILL_MACH_AREA == 0 then if NEST.DRILL_MACH_AREA == 0 then
DrillOnFaces[sDrillFace2].long = false DrillOnFaces[sDrillFace2].long = false
end end
DrillClassif2 = { sCase = sDrillFace2, bClosed = DrillOnFaces[sDrillFace2].closed, bLong = DrillOnFaces[sDrillFace2].long, bOnlyOnRef = DrillOnFaces[sDrillFace2].OnlyOnRef } DrillClassif2 = { sCase = sDrillFace2, bClosed = DrillOnFaces[sDrillFace2].closed, bLong = DrillOnFaces[sDrillFace2].long, bOnlyOnRef = DrillOnFaces[sDrillFace2].OnlyOnRef}
end end
return DrillClassif, DrillClassif2 return DrillClassif, DrillClassif2
end end
------------------------------------------------------------------
local function ClassifyLapJointsFromBottom( nPartId) local function ClassifyLapJointsFromBottom( nPartId)
local res = { Nbr = 0, sCase = '', bParall = false} local res = { Nbr = 0, sCase = '', bParall = false}
@@ -735,7 +752,7 @@ local function ClassifyLapJointsFromBottom( nPartId)
end end
------------------------------------------------------------------
local function CreateDefectOnAngle( nPartId, RawPart, bDrillLong, bOnOppositeAng) local function CreateDefectOnAngle( nPartId, RawPart, bDrillLong, bOnOppositeAng)
local PartTab = {} local PartTab = {}
@@ -747,7 +764,7 @@ local function CreateDefectOnAngle( nPartId, RawPart, bDrillLong, bOnOppositeAng
EgtSetStatus( nOutlineGrp, GDB_ST.OFF) EgtSetStatus( nOutlineGrp, GDB_ST.OFF)
end end
local dExtraMachArea = WD.SIDEMILL_DIAM_DOWN -- per tenere conto dell'area di lavorazione local dExtraMachArea = s_dSideMillDiamDown -- per tenere conto dell'area di lavorazione
local dExtra = NEST.KERF local dExtra = NEST.KERF
-- local b3Part = EgtGetBBoxGlob( nPartId, GDB_BB.STANDARD) -- local b3Part = EgtGetBBoxGlob( nPartId, GDB_BB.STANDARD)
@@ -763,25 +780,25 @@ local function CreateDefectOnAngle( nPartId, RawPart, bDrillLong, bOnOppositeAng
-- calcolo i punti che definiscono il rettangolo -- calcolo i punti che definiscono il rettangolo
local ptP1, ptP2 local ptP1, ptP2
if ( WD.ORIG_CORNER == 'TL' and not bOnOppositeAng) or ( WD.ORIG_CORNER == 'BL' and bOnOppositeAng) then if ( s_sOrigCorner == 'TL' and not bOnOppositeAng) or ( s_sOrigCorner == 'BL' and bOnOppositeAng) then
-- angolo TL -- angolo TL
ptP1 = Point3d( 0, RawPart.Width - b3PartY - dExtra, 0) ptP1 = Point3d( 0, RawPart.Width - b3PartY - dExtra, 0)
ptP2 = Point3d( b3PartX + dExtra, RawPart.Width, 0) ptP2 = Point3d( b3PartX + dExtra, RawPart.Width, 0)
PartTab.posX = NEST.KERF PartTab.posX = NEST.KERF
PartTab.posY = RawPart.Width - b3Part:getDimY() - NEST.KERF PartTab.posY = RawPart.Width - b3Part:getDimY() - NEST.KERF
elseif ( WD.ORIG_CORNER == 'BL' and not bOnOppositeAng) or ( WD.ORIG_CORNER == 'TL' and bOnOppositeAng) then elseif ( s_sOrigCorner == 'BL' and not bOnOppositeAng) or ( s_sOrigCorner == 'TL' and bOnOppositeAng) then
-- angolo BL -- angolo BL
ptP1 = Point3d( 0, 0, 0) ptP1 = Point3d( 0, 0, 0)
ptP2 = Point3d( b3PartX + dExtra, b3PartY + dExtra, 0) ptP2 = Point3d( b3PartX + dExtra, b3PartY + dExtra, 0)
PartTab.posX = NEST.KERF PartTab.posX = NEST.KERF
PartTab.posY = NEST.KERF PartTab.posY = NEST.KERF
elseif ( WD.ORIG_CORNER == 'TR' and not bOnOppositeAng) or ( WD.ORIG_CORNER == 'BR' and bOnOppositeAng) then elseif ( s_sOrigCorner == 'TR' and not bOnOppositeAng) or ( s_sOrigCorner == 'BR' and bOnOppositeAng) then
-- angolo TR -- angolo TR
ptP1 = Point3d( RawPart.Len - b3PartX - dExtra, RawPart.Width - b3PartY - dExtra, 0) ptP1 = Point3d( RawPart.Len - b3PartX - dExtra, RawPart.Width - b3PartY - dExtra, 0)
ptP2 = Point3d( RawPart.Len, RawPart.Width, 0) ptP2 = Point3d( RawPart.Len, RawPart.Width, 0)
PartTab.posX = RawPart.Len - b3Part:getDimX() - NEST.KERF PartTab.posX = RawPart.Len - b3Part:getDimX() - NEST.KERF
PartTab.posY = RawPart.Width - b3Part:getDimY() - NEST.KERF PartTab.posY = RawPart.Width - b3Part:getDimY() - NEST.KERF
elseif ( WD.ORIG_CORNER == 'BR' and not bOnOppositeAng) or ( WD.ORIG_CORNER == 'TR' and bOnOppositeAng) then elseif ( s_sOrigCorner == 'BR' and not bOnOppositeAng) or ( s_sOrigCorner == 'TR' and bOnOppositeAng) then
-- angolo BR -- angolo BR
ptP1 = Point3d( RawPart.Len - b3PartX - dExtra, 0, 0) ptP1 = Point3d( RawPart.Len - b3PartX - dExtra, 0, 0)
ptP2 = Point3d( RawPart.Len, b3PartY + dExtra, 0) ptP2 = Point3d( RawPart.Len, b3PartY + dExtra, 0)
@@ -794,10 +811,9 @@ local function CreateDefectOnAngle( nPartId, RawPart, bDrillLong, bOnOppositeAng
EgtSetName( PartTab.DefectId, "Defect") EgtSetName( PartTab.DefectId, "Defect")
return PartTab return PartTab
end end
------------------------------------------------------------------
local function RotateOptimalCase( nPartId, nAngle, nAngleValidRot, RawPart, nPnt1, nPnt2) local function RotateOptimalCase( nPartId, nAngle, nAngleValidRot, RawPart, nPnt1, nPnt2)
local bOptimal = false local bOptimal = false
@@ -826,9 +842,9 @@ local function RotateOptimalCase( nPartId, nAngle, nAngleValidRot, RawPart, nPnt
end end
return nAnglePnt, nRotate, bOptimal return nAnglePnt, nRotate, bOptimal
end end
------------------------------------------------------------------
local function RotateOptimalCaseDrill( nPartId, bCanRotate, nPnt1, nPnt2) local function RotateOptimalCaseDrill( nPartId, bCanRotate, nPnt1, nPnt2)
local nRotate = 0 local nRotate = 0
@@ -846,7 +862,7 @@ local function RotateOptimalCaseDrill( nPartId, bCanRotate, nPnt1, nPnt2)
return nAnglePnt, nRotate return nAnglePnt, nRotate
end end
------------------------------------------------------------------
-- Funzione che classifica i pezzi in base alla loro necessità di stare negli angoli -- Funzione che classifica i pezzi in base alla loro necessità di stare negli angoli
local function ClassifyAngles( nPartId, RawPart, sRefOrig, bLockedRot, dMinSheetWidth) local function ClassifyAngles( nPartId, RawPart, sRefOrig, bLockedRot, dMinSheetWidth)
@@ -942,8 +958,8 @@ local function ClassifyAngles( nPartId, RawPart, sRefOrig, bLockedRot, dMinSheet
-- se non ho venature e fori scelgo una posizione che non faccia cadere il pezzo -- se non ho venature e fori scelgo una posizione che non faccia cadere il pezzo
if not bDrill and not bOnly180Rot and not bLockedRot then if not bDrill and not bOnly180Rot and not bLockedRot then
b3Part = EgtGetBBoxGlob( nPartId, GDB_BB.STANDARD) b3Part = EgtGetBBoxGlob( nPartId, GDB_BB.STANDARD)
local bIsValid = b3Part:getDimX() > ( WD.INTRULLI or 1200) local bIsValid = b3Part:getDimX() > s_dIntRulli
local bRotatedIsValid = b3Part:getDimY() > ( WD.INTRULLI or 1200) local bRotatedIsValid = b3Part:getDimY() > s_dIntRulli
if not bIsValid and not bRotatedIsValid then if not bIsValid and not bRotatedIsValid then
EgtSetInfo( nPartId, "REDUCECUT", 1) EgtSetInfo( nPartId, "REDUCECUT", 1)
elseif not bIsValid or not bRotatedIsValid then elseif not bIsValid or not bRotatedIsValid then
@@ -956,7 +972,6 @@ local function ClassifyAngles( nPartId, RawPart, sRefOrig, bLockedRot, dMinSheet
end end
end end
-- lap joints -- lap joints
local ResLapJoints = ClassifyLapJointsFromBottom( nPartId) local ResLapJoints = ClassifyLapJointsFromBottom( nPartId)
b3Part = EgtGetBBoxGlob( nPartId, GDB_BB.STANDARD) b3Part = EgtGetBBoxGlob( nPartId, GDB_BB.STANDARD)
@@ -964,7 +979,7 @@ local function ClassifyAngles( nPartId, RawPart, sRefOrig, bLockedRot, dMinSheet
if ResLapJoints.Nbr > 0 and bLockedRot then if ResLapJoints.Nbr > 0 and bLockedRot then
b3Part = EgtGetBBoxGlob( nPartId, GDB_BB.STANDARD) b3Part = EgtGetBBoxGlob( nPartId, GDB_BB.STANDARD)
if b3Part:getDimX() > ( WD.INTRULLI or 1200) then if b3Part:getDimX() > s_dIntRulli then
EgtSetInfo( nPartId, "REDUCECUT", 1) EgtSetInfo( nPartId, "REDUCECUT", 1)
end end
local PartAngleClassification = { PartId = tostring( nPartId), Angle = 100, nRotate = 0, bDrill = true, bLongDrill = true} local PartAngleClassification = { PartId = tostring( nPartId), Angle = 100, nRotate = 0, bDrill = true, bLongDrill = true}
@@ -1050,7 +1065,6 @@ local function ClassifyAngles( nPartId, RawPart, sRefOrig, bLockedRot, dMinSheet
nAngle = 100 nAngle = 100
end end
-- no fori -- no fori
else else
if ResLapJoints.Nbr == 0 then if ResLapJoints.Nbr == 0 then
@@ -1108,17 +1122,16 @@ local function ClassifyAngles( nPartId, RawPart, sRefOrig, bLockedRot, dMinSheet
nAngle, nRotate2 = RotateOptimalCase( nPartId, 0, 90, RawPart, 100, 100) nAngle, nRotate2 = RotateOptimalCase( nPartId, 0, 90, RawPart, 100, 100)
nRotate = nRotate + nRotate2 nRotate = nRotate + nRotate2
end end
end end
-- aggiorno le info di rotazione del pezzo -- aggiorno le info di rotazione del pezzo
if nRotate >= 360 then if nRotate >= 360 then
nRotate = nRotate - 360 nRotate = nRotate - 360
end end
if nRotate > 0 then if nRotate > 0 then
local bPartFlip = ( ( EgtGetInfo( nPartId, "INVERTED", 'i') or 0) == 180)
local nPartRot = EgtGetInfo( nPartId, "ROTATED", 'i') or 0 local nPartRot = EgtGetInfo( nPartId, "ROTATED", 'i') or 0
local nTotRot = nPartRot - nRotate local nTotRot = nPartRot - EgtIf( bPartFlip, -nRotate, nRotate)
nTotRot = EgtIf( nTotRot < 0, nTotRot + 360, nTotRot) nTotRot = EgtIf( nTotRot < 0, nTotRot + 360, nTotRot)
EgtSetInfo( nPartId, "ROTATED", nTotRot) EgtSetInfo( nPartId, "ROTATED", nTotRot)
EgtSetInfo( nPartId, "MODIFIEDFORNEST", 1) EgtSetInfo( nPartId, "MODIFIEDFORNEST", 1)
@@ -1130,7 +1143,7 @@ local function ClassifyAngles( nPartId, RawPart, sRefOrig, bLockedRot, dMinSheet
local PartAngleClassification = { PartId = tostring( nPartId), Angle = nAngle, nRotate = nRotate, bDrill = bDrill, bLongDrill = bLongDrill, bManual = bManual} local PartAngleClassification = { PartId = tostring( nPartId), Angle = nAngle, nRotate = nRotate, bDrill = bDrill, bLongDrill = bLongDrill, bManual = bManual}
local bCanBeOnOtherEdge = not bDrill or ( bDrill and RawPart.Width >= WD.MINRAWY_HOR_DRILL) local bCanBeOnOtherEdge = not bDrill or ( bDrill and RawPart.Width > s_dMinRawYHorDrill - GEO.EPS_SMALL)
if bOnly180Rot then if bOnly180Rot then
if bCanBeOnOtherEdge then if bCanBeOnOtherEdge then
EgtSetInfo( nPartId, "NestAllowRot", 1) EgtSetInfo( nPartId, "NestAllowRot", 1)
@@ -1143,14 +1156,14 @@ local function ClassifyAngles( nPartId, RawPart, sRefOrig, bLockedRot, dMinSheet
-- verifico se il pezzo cade (caso di foro) -- verifico se il pezzo cade (caso di foro)
b3Part = EgtGetBBoxGlob( nPartId, GDB_BB.STANDARD) b3Part = EgtGetBBoxGlob( nPartId, GDB_BB.STANDARD)
if b3Part:getDimX() > ( WD.INTRULLI or 1200) then if b3Part:getDimX() > s_dIntRulli then
EgtSetInfo( nPartId, "REDUCECUT", 1) EgtSetInfo( nPartId, "REDUCECUT", 1)
end end
return PartAngleClassification return PartAngleClassification
end end
------------------------------------------------------------------
local function ComputeRestrictedZones( RawParts) local function ComputeRestrictedZones( RawParts)
local dTotArea = 0 local dTotArea = 0
@@ -1206,7 +1219,6 @@ local function ComputeRestrictedZones( RawParts)
end end
nAnglesNbrEstimate = nAnglesNbrEstimate + nAngelsNbrCorrection nAnglesNbrEstimate = nAnglesNbrEstimate + nAngelsNbrCorrection
-- classificazione dei pezzi in base alla loro necessità di stare negli angoli -- classificazione dei pezzi in base alla loro necessità di stare negli angoli
local nTotParts = 0 local nTotParts = 0
for _ in pairs( PART) do nTotParts = nTotParts + 1 end for _ in pairs( PART) do nTotParts = nTotParts + 1 end
@@ -1215,7 +1227,7 @@ local function ComputeRestrictedZones( RawParts)
for nPartId, nCount in pairs( PART) do for nPartId, nCount in pairs( PART) do
nPartIndex = nPartIndex + 1 nPartIndex = nPartIndex + 1
local bManualRot = EgtGetInfo( nPartId, "MANUALROT", 'b') local bManualRot = EgtGetInfo( nPartId, "MANUALROT", 'b')
local PartClassif = ClassifyAngles(tonumber(nPartId), RawParts[nMaxSheet], WD.ORIG_CORNER, bManualRot, dMinSheetWidth) local PartClassif = ClassifyAngles(tonumber(nPartId), RawParts[nMaxSheet], s_sOrigCorner, bManualRot, dMinSheetWidth)
if PartClassif then if PartClassif then
for nI = 1, nCount do for nI = 1, nCount do
local newTab = {PartId = PartClassif.PartId, Angle = PartClassif.Angle, nRotate = PartClassif.nRotate, bDrill = PartClassif.bDrill, bLongDrill = PartClassif.bLongDrill, bManual = PartClassif.bManual} local newTab = {PartId = PartClassif.PartId, Angle = PartClassif.Angle, nRotate = PartClassif.nRotate, bDrill = PartClassif.bDrill, bLongDrill = PartClassif.bLongDrill, bManual = PartClassif.bManual}
@@ -1230,7 +1242,6 @@ local function ComputeRestrictedZones( RawParts)
table.sort( AngleClassification, function(a, b) return a.Angle > b.Angle end) table.sort( AngleClassification, function(a, b) return a.Angle > b.Angle end)
local vManuallyDone = {} local vManuallyDone = {}
local vPartsManuallyDone = {} local vPartsManuallyDone = {}
for nInd = 1, #vSheetNbrEstimate do for nInd = 1, #vSheetNbrEstimate do
@@ -1260,7 +1271,7 @@ local function ComputeRestrictedZones( RawParts)
if dPartWidth < vFilledSheets[nInd2].Width then if dPartWidth < vFilledSheets[nInd2].Width then
-- verifico se il grezzo aveva già un pezzo in un angolo -- verifico se il grezzo aveva già un pezzo in un angolo
if abs( vFilledSheets[nInd2].Width - vFilledSheets[nInd2].OrigWidth) < GEO.EPS_SMALL then if abs( vFilledSheets[nInd2].Width - vFilledSheets[nInd2].OrigWidth) < GEO.EPS_SMALL then
vFilledSheets[nInd2].Width = vFilledSheets[nInd2].Width - dPartWidth - WD.SIDEMILL_DIAM_DOWN vFilledSheets[nInd2].Width = vFilledSheets[nInd2].Width - dPartWidth - s_dSideMillDiamDown
else else
-- se il grezzo aveva già un pezzo nell'angolo, dopo il pezzo corrente non ne posso mettere altri -- se il grezzo aveva già un pezzo nell'angolo, dopo il pezzo corrente non ne posso mettere altri
vFilledSheets[nInd2].Width = 0 vFilledSheets[nInd2].Width = 0
@@ -1283,7 +1294,8 @@ local function ComputeRestrictedZones( RawParts)
local bOnlyOnRef = EgtGetInfo( AngleClassification[nInd].PartId, "OnlyOnRefSide", 'b') local bOnlyOnRef = EgtGetInfo( AngleClassification[nInd].PartId, "OnlyOnRefSide", 'b')
local bCanBeOnOtherAngle = not bOnlyOnRef and local bCanBeOnOtherAngle = not bOnlyOnRef and
( not AngleClassification[nInd].bDrill or ( not AngleClassification[nInd].bDrill or
( AngleClassification[nInd].bDrill and not AngleClassification[nInd].bLongDrill and RawParts[vManuallyDone[nInd2].RawPartId].Width >= WD.MINRAWY_HOR_DRILL)) ( AngleClassification[nInd].bDrill and not AngleClassification[nInd].bLongDrill and
RawParts[vManuallyDone[nInd2].RawPartId].Width > s_dMinRawYHorDrill - GEO.EPS_SMALL))
if #(vManuallyDone[nInd2].Parts) == 0 then if #(vManuallyDone[nInd2].Parts) == 0 then
-- verifico che il pezzo stia in questo grezzo -- verifico che il pezzo stia in questo grezzo
@@ -1298,24 +1310,25 @@ local function ComputeRestrictedZones( RawParts)
if not vManuallyDone[nInd2].Parts[1].bLongDrill then if not vManuallyDone[nInd2].Parts[1].bLongDrill then
-- oriento il pezzo in modo ottimale per andare su quell'angolo -- oriento il pezzo in modo ottimale per andare su quell'angolo
local sRefOrig local sRefOrig
if WD.ORIG_CORNER == 'TL' then sRefOrig = 'BL' end if s_sOrigCorner == 'TL' then sRefOrig = 'BL' end
if WD.ORIG_CORNER == 'BL' then sRefOrig = 'TL' end if s_sOrigCorner == 'BL' then sRefOrig = 'TL' end
if WD.ORIG_CORNER == 'TR' then sRefOrig = 'BR' end if s_sOrigCorner == 'TR' then sRefOrig = 'BR' end
if WD.ORIG_CORNER == 'BR' then sRefOrig = 'TR' end if s_sOrigCorner == 'BR' then sRefOrig = 'TR' end
local bManTmp local bManTmp
local res = ClassifyAngles( AngleClassification[nInd].PartId, RawParts[vManuallyDone[nInd2].RawPartId], sRefOrig, bManTmp, dMinSheetWidth) local res = ClassifyAngles( AngleClassification[nInd].PartId, RawParts[vManuallyDone[nInd2].RawPartId], sRefOrig, bManTmp, dMinSheetWidth)
-- verifico sia compatibile con pezzo già inserito -- verifico sia compatibile con pezzo già inserito
local b3OtherPart = EgtGetBBoxGlob( vManuallyDone[nInd2].Parts[1].Id, GDB_BB.STANDARD) local b3OtherPart = EgtGetBBoxGlob( vManuallyDone[nInd2].Parts[1].Id, GDB_BB.STANDARD)
local b3Part = EgtGetBBoxGlob( AngleClassification[nInd].PartId, GDB_BB.STANDARD) local b3Part = EgtGetBBoxGlob( AngleClassification[nInd].PartId, GDB_BB.STANDARD)
local dExtra = 2 * NEST.KERF + WD.SIDEMILL_DIAM_DOWN + 1 local dExtra = 2 * NEST.KERF + s_dSideMillDiamDown + 1
-- se è compatibile assegno questa rotazione al pezzo -- se è compatibile assegno questa rotazione al pezzo
if b3Part:getDimY() + b3OtherPart:getDimY() + dExtra < RawParts[vManuallyDone[nInd2].RawPartId].Width then if b3Part:getDimY() + b3OtherPart:getDimY() + dExtra < RawParts[vManuallyDone[nInd2].RawPartId].Width then
nIdx = nInd2 nIdx = nInd2
bOnOppositeSide = true bOnOppositeSide = true
-- aggiorno le info di rotazione -- aggiorno le info di rotazione
if res.nRotate > 0 then if res.nRotate > 0 then
local bPartFlip = ( ( EgtGetInfo( AngleClassification[nInd].PartId, "INVERTED", 'i') or 0) == 180)
local nPartRot = EgtGetInfo( AngleClassification[nInd].PartId, "ROTATED", 'i') or 0 local nPartRot = EgtGetInfo( AngleClassification[nInd].PartId, "ROTATED", 'i') or 0
local nTotRot = nPartRot - res.nRotate local nTotRot = nPartRot - EgtIf( bPartFlip, -res.nRotate, res.nRotate)
nTotRot = EgtIf( nTotRot < 0, nTotRot + 360, nTotRot) nTotRot = EgtIf( nTotRot < 0, nTotRot + 360, nTotRot)
EgtSetInfo( AngleClassification[nInd].PartId, "ROTATED", nTotRot) EgtSetInfo( AngleClassification[nInd].PartId, "ROTATED", nTotRot)
EgtSetInfo( AngleClassification[nInd].PartId, "MODIFIEDFORNEST", 1) EgtSetInfo( AngleClassification[nInd].PartId, "MODIFIEDFORNEST", 1)
@@ -1379,8 +1392,7 @@ local function ComputeRestrictedZones( RawParts)
return vManuallyDone, vPartsManuallyDone return vManuallyDone, vPartsManuallyDone
end end
------------------------------------------------------------------
-- Funzione che sposta e aggiunge pezzi per nesting -- Funzione che sposta e aggiunge pezzi per nesting
local function AddRawParts(RawParts, vDoneManually) local function AddRawParts(RawParts, vDoneManually)
@@ -1422,12 +1434,12 @@ local function AddRawParts(RawParts, vDoneManually)
EgtSetName(SheetOutlineId, OUTLINE) EgtSetName(SheetOutlineId, OUTLINE)
-- creo foglio per nesting -- creo foglio per nesting
EgtAutoNestAddSheet( SheetPartId, SheetOutlineId, NEST.KERF, 1, RawParts[nIndex].Qty - nTotSheetWithDefects) -- EgtAutoNestAddSheet( SheetId, OutlineId, dKerf, nPriority, nCount) EgtAutoNestAddSheet( SheetPartId, SheetOutlineId, NEST.KERF, 1, RawParts[nIndex].Qty - nTotSheetWithDefects)
-- EgtAutoNestAddSheet( SheetId, OutlineId, dKerf, nPriority, nCount)
end end
end end
------------------------------------------------------------------
local function AddParts(RawParts, vPartsDoneManually) local function AddParts(RawParts, vPartsDoneManually)
-- cerco la width massima dei grezzi -- cerco la width massima dei grezzi
@@ -1497,7 +1509,6 @@ local function AddParts(RawParts, vPartsDoneManually)
bRotNest = false bRotNest = false
elseif EgtExistsInfo( nPartId, "NestRot") then elseif EgtExistsInfo( nPartId, "NestRot") then
nStepRotNest = EgtGetInfo( nPartId, "NestStepRot", 'i') nStepRotNest = EgtGetInfo( nPartId, "NestStepRot", 'i')
nRotate = EgtGetInfo( nPartId, "NestRot", 'i')
bRotNest = EgtGetInfo( nPartId, "NestAllowRot", 'b') bRotNest = EgtGetInfo( nPartId, "NestAllowRot", 'b')
-- verifico se rotazione è valida (pezzo è contenuto nel grezzo) -- verifico se rotazione è valida (pezzo è contenuto nel grezzo)
local bValidRotationInRaw = b3Part:getDimX() < RawParts[1].Len - 2 * NEST.KERF + GEO.EPS_SMALL and b3Part:getDimY() < dRawMaxWidth - 2 * NEST.KERF + GEO.EPS_SMALL local bValidRotationInRaw = b3Part:getDimX() < RawParts[1].Len - 2 * NEST.KERF + GEO.EPS_SMALL and b3Part:getDimY() < dRawMaxWidth - 2 * NEST.KERF + GEO.EPS_SMALL
@@ -1507,54 +1518,6 @@ local function AddParts(RawParts, vPartsDoneManually)
end end
end end
-- aggiungo stato a lista stati del pezzo
-- table.insert( PartStates, { PartId = tonumber(nPartId), Flip = bFlip, Rotate = nRotate})
-- local bFtDown = false
-- local vPartProc = WE.CollectFeatures( nPartId, b3Raw)
-- for nInd = 1, #vPartProc do
-- if LapJoint.Identify( vPartProc[nInd]) then
-- local nFacOpt, dMinElev, nFacOpt2, dMinElev2 = WL.GetFaceWithMostAdj( vPartProc[nInd].Id, vPartProc[nInd].PartId)
-- if nFacOpt >= 0 then
-- local vtN = EgtSurfTmFacetNormVersor( vPartProc[nInd].Id, nFacOpt, GDB_ID.ROOT)
-- if vtN:getZ() < -0.09 then
-- bFtDown = true
-- break
-- end
-- end
-- end
-- LapJoint.FlipClassify(vPartProc[nInd])
-- end
-- -- ruoto se necessario
-- if bFtDown then
-- local b3Solid = EgtGetBBoxGlob(nPartId, GDB_BB.IGNORE_TEXT)
-- local ptRotCen = b3Solid:getCenter()
-- EgtRotate( nPartId, ptRotCen, X_AX(), 180, GDB_RT.GLOB)
-- end
-- -- recupero le feature di lavorazione della parete
-- local bFtDown = false
-- local vPartProc = WE.CollectFeatures( nPartId, b3Raw)
-- for nInd = 1, #vPartProc do
-- if LapJoint.Identify( vPartProc[nInd]) then
-- local nFacOpt, dMinElev, nFacOpt2, dMinElev2 = WL.GetFaceWithMostAdj( vPartProc[nInd].Id, vPartProc[nInd].PartId)
-- if nFacOpt >= 0 then
-- local vtN = EgtSurfTmFacetNormVersor( vPartProc[nInd].Id, nFacOpt, GDB_ID.ROOT)
-- if vtN:getZ() < -0.09 then
-- bFtDown = true
-- break
-- end
-- end
-- end
-- end
-- -- ruoto se necessario
-- if bFtDown then
-- local b3Solid = EgtGetBBoxGlob(nPartId, GDB_BB.IGNORE_TEXT)
-- local ptRotCen = b3Solid:getCenter()
-- EgtRotate( nPartId, ptRotCen, X_AX(), 180, GDB_RT.GLOB)
-- end
-- recupero vecchio contorno se già presente -- recupero vecchio contorno se già presente
local nOutlineLayer = EgtGetFirstNameInGroup(nPartId, "Outline") local nOutlineLayer = EgtGetFirstNameInGroup(nPartId, "Outline")
local nOldOutline = EgtGetFirstNameInGroup(nOutlineLayer, 'ON_TMP') local nOldOutline = EgtGetFirstNameInGroup(nOutlineLayer, 'ON_TMP')
@@ -1604,31 +1567,6 @@ local function AddParts(RawParts, vPartsDoneManually)
break break
end end
end end
--local frSum = EgtSurfFlatRegion(nOutlineLayer, nOutline)
--EgtSaveFile("c:\\Temp\\ProvaNesting.nge")
-- -- per ogni contorno creo flat region e le sommo
-- for nIndex = 0, nCnt - 1 do
-- EgtScale( nOutline + nIndex, GLOB_FRM(), 1, 1, 0, GDB_RT.GLOB)
-- EgtModifyCurveExtrusion( nOutline + nIndex, Z_AX(), GDB_RT.GLOB)
-- local frCurr = EgtSurfFlatRegion(nOutlineLayer, nOutline + nIndex)
-- if frCurr then
-- if frSum then
-- EgtSurfFrAdd(frSum, frCurr)
-- else
-- frSum = frCurr
-- end
-- end
-- EgtErase(frCurr)
-- end
-- --EgtSaveFile("c:/Temp/ProvaNesting.nge")
-- -- calcolo contorno della flat region somma
-- nCurrOutline = EgtExtractSurfFrChunkLoops(frSum, 0, nOutlineLayer)
-- EgtErase(frSum)
-- -- cancello contorni
-- for nIndex = 0, nCnt do
-- EgtErase(nOutline + nIndex)
-- end
end end
if nCurrOutline and nCurrOutline ~= GDB_ID.NULL then if nCurrOutline and nCurrOutline ~= GDB_ID.NULL then
@@ -1642,37 +1580,6 @@ local function AddParts(RawParts, vPartsDoneManually)
EgtOutLog("Impossible creating silhouette for part " .. tostring(nPartId)) EgtOutLog("Impossible creating silhouette for part " .. tostring(nPartId))
nCnt = 1 nCnt = 1
end end
--if nCnt == 0 then
-- -- se non ho trovato contorno, lo recupero dal Box
-- local nBoxLayer = EgtGetFirstNameInGroup(nPartId, "Box")
-- local nBox = EgtGetFirstNameInGroup(nBoxLayer, "Box")
-- local BBox = EgtGetBBoxGlob(nBox, GDB_BB.STANDARD)
-- nOutline = EgtRectangle2P(nOutlineLayer, Point3d( BBox:getMin():getX(), BBox:getMin():getY(), 0), Point3d( BBox:getMax():getX(), BBox:getMax():getY(), 0), GDB_RT.GLOB)
-- EgtOutLog("Impossible creating silhouette for part " .. tostring(nPartId))
--else
-- --EgtScale( nOutline, GLOB_FRM(), 1, 1, 0, GDB_RT.GLOB)
-- --EgtModifyCurveExtrusion( nOutline, Z_AX(), GDB_RT.GLOB)
-- --EgtSaveFile("c:/Temp/ProvaNesting.nge")
-- EgtScale( nOutline, GLOB_FRM(), 1, 1, 0, GDB_RT.GLOB)
-- EgtModifyCurveExtrusion( nOutline, Z_AX(), GDB_RT.GLOB)
-- local frSum = EgtSurfFlatRegion(nOutlineLayer, nOutline)
-- EgtSaveFile("c:\\Temp\\ProvaNesting.nge")
-- -- per ogni contorno creo flat region e le sommo
-- for nIndex = 1, nCnt - 1 do
-- EgtScale( nOutline + nIndex, GLOB_FRM(), 1, 1, 0, GDB_RT.GLOB)
-- EgtModifyCurveExtrusion( nOutline + nIndex, Z_AX(), GDB_RT.GLOB)
-- local frCurr = EgtSurfFlatRegion(nOutlineLayer, nOutline + nIndex)
-- if frCurr then
-- EgtSurfFrAdd(frSum, frCurr)
-- end
-- end
-- -- calcolo contorno della flat region somma
-- nOutline = EgtExtractSurfFrChunkLoops(frSum, 0, nOutlineLayer)
-- -- cancello contorni successivi
-- for nIndex = 1, nCnt do
-- EgtErase(nOutline + nIndex)
-- end
--end
EgtSetName( nOutline, 'ON_TMP') EgtSetName( nOutline, 'ON_TMP')
EgtSetStatus( nOutline, 0) EgtSetStatus( nOutline, 0)
@@ -1685,81 +1592,6 @@ local function AddParts(RawParts, vPartsDoneManually)
nCnt = #vOutlinesIds nCnt = #vOutlinesIds
end end
--[[ local nOutline
local nTrimesh
local bFirst = true
local bSecond = false
local bUseBox = false
nTrimesh = EgtGetFirstNameInGroup( nOutlineLayer, "1-Out")
if not nTrimesh then
nTrimesh = EgtGetFirstNameInGroup( nOutlineLayer, "2-Out")
end
if not nTrimesh then
nTrimesh = EgtGetFirstNameInGroup( nOutlineLayer, "3-Out")
end
if not nTrimesh then
nTrimesh = EgtGetFirstNameInGroup( nOutlineLayer, "4-Out")
end
-- se trovato contorno
if nTrimesh then
-- recupero la curva associata
local nAuxId = EgtGetInfo(nTrimesh, "AUXID", 'i')
nOutline = nTrimesh + nAuxId
-- verifico che il contorno sia verticale
local nFacetCount = EgtSurfTmFacetCount(nTrimesh)
for nIndex = 0, nFacetCount - 1 do
local vtNorm = EgtSurfTmFacetNormVersor(nTrimesh, nIndex, GDB_ID.ROOT)
if abs( vtNorm:getZ()) > 10 * GEO.EPS_SMALL then
bUseBox = true
break
end
end
-- se due compo o una e lati inclinati
if bUseBox then
-- calcolo box della trimesh
local b3Outline = EgtGetBBoxGlob(nTrimesh, GDB_BB.IGNORE_TEXT)
local ptP1 = Point3d( b3Outline:getMin():getX(), b3Outline:getMin():getY(), 0)
local ptP2 = Point3d( b3Outline:getMax():getX(), b3Outline:getMax():getY(), 0)
-- creo outline del box
nOutline = EgtRectangle2P(nOutlineLayer, ptP1, ptP2, GDB_RT.GLOB)
EgtSetStatus(nOutline, GDB_ST.OFF)
end
-- altrimenti cerco la regione sopra
else
-- cancello precedenti contorni calcolati
local nOldONId = EgtGetFirstNameInGroup( nOutlineLayer, 'ON_TMP')
if nOldONId then
EgtErase( nOldONId)
end
-- cerco la regione sopra
local nReg
for i = 1, 4 do
local sRegName = string.format( '%d-Top', i)
nReg = EgtGetFirstNameInGroup( nOutlineLayer, sRegName)
if nReg then
local vtNorm = EgtSurfFrNormVersor( nReg, GDB_ID.ROOT)
if vtNorm:getZ() > 0.99 then break end
end
end
if not nReg then
EgtOutLog("Errore: regione superiore non trovata")
end
-- recupero contorno della regione
local OutId, nCnt = EgtExtractSurfFrChunkLoops( nReg, 0, nOutlineLayer)
if OutId and nCnt > 1 then
for i = 2, nCnt do
EgtErase( OutId + i - 1)
end
end
if OutId then
EgtSetName( OutId, 'ON_TMP')
nOutline = OutId
end
end
]]--
-- calcolo aree lavorazione -- calcolo aree lavorazione
local nToolOutlineIds = ComputeToolOutlines( nPartId) local nToolOutlineIds = ComputeToolOutlines( nPartId)
if bFlipNest and #nToolOutlineIds > 0 then if bFlipNest and #nToolOutlineIds > 0 then
@@ -1774,7 +1606,7 @@ local function AddParts(RawParts, vPartsDoneManually)
-- aggiungo finestre -- aggiungo finestre
for nInd = 1, nCnt - 1 do for nInd = 1, nCnt - 1 do
local _, _, dArea = EgtCurveArea( nOutline + nInd) local _, _, dArea = EgtCurveArea( nOutline + nInd)
if dArea and dArea > WD.NEST_HOLE_MIN_AREA then if dArea and dArea > s_dNestHoleMinArea then
EgtModifyCurveExtrusion( nOutline + nInd, Z_AX(), GDB_RT.GLOB) EgtModifyCurveExtrusion( nOutline + nInd, Z_AX(), GDB_RT.GLOB)
EgtAutoNestAddHoleToPart( nPartId, nOutline + nInd) EgtAutoNestAddHoleToPart( nPartId, nOutline + nInd)
end end
@@ -1802,7 +1634,7 @@ local function AddParts(RawParts, vPartsDoneManually)
-- punto di riferimento sul pezzo -- punto di riferimento sul pezzo
local ptRef local ptRef
local dval = 10 local dval = 10
if ( WD.ORIG_CORNER == 'TL' or WD.ORIG_CORNER == 'TR') then if ( s_sOrigCorner == 'TL' or s_sOrigCorner == 'TR') then
ptRef = Point3d( b3Part:getMax():getX() - b3Part:getDimX() / 2, b3Part:getMax():getY() - dval, 0) ptRef = Point3d( b3Part:getMax():getX() - b3Part:getDimX() / 2, b3Part:getMax():getY() - dval, 0)
else else
ptRef = Point3d( b3Part:getMin():getX() + b3Part:getDimX() / 2, b3Part:getMin():getY() + dval, 0) ptRef = Point3d( b3Part:getMin():getX() + b3Part:getDimX() / 2, b3Part:getMin():getY() + dval, 0)
@@ -1811,7 +1643,7 @@ local function AddParts(RawParts, vPartsDoneManually)
-- vincolo StripY -- vincolo StripY
local bOnlyOnRefSide = EgtGetInfo( nPartId, "OnlyOnRefSide", 'b') local bOnlyOnRefSide = EgtGetInfo( nPartId, "OnlyOnRefSide", 'b')
if bOnlyOnRefSide then if bOnlyOnRefSide then
if WD.ORIG_CORNER == 'BL' or WD.ORIG_CORNER == 'BR' then if s_sOrigCorner == 'BL' or s_sOrigCorner == 'BR' then
EgtAutoNestSetStripYconstraintToPart( nPartId, ptRef, NEST.KERF + dval + dStripYCorr, 100000) EgtAutoNestSetStripYconstraintToPart( nPartId, ptRef, NEST.KERF + dval + dStripYCorr, 100000)
else else
EgtAutoNestSetStripYconstraintToPart( nPartId, ptRef, - 1000, dRawMaxWidth + 1000 - ( NEST.KERF + dval - dStripYCorr)) EgtAutoNestSetStripYconstraintToPart( nPartId, ptRef, - 1000, dRawMaxWidth + 1000 - ( NEST.KERF + dval - dStripYCorr))
@@ -1822,7 +1654,7 @@ local function AddParts(RawParts, vPartsDoneManually)
-- se sull'angolo aggiungo anche vincolo StripX -- se sull'angolo aggiungo anche vincolo StripX
if bOnAngle then if bOnAngle then
if WD.ORIG_CORNER == 'TL' or WD.ORIG_CORNER == 'BL' then if s_sOrigCorner == 'TL' or s_sOrigCorner == 'BL' then
EgtAutoNestSetStripXconstraintToPart( nPartId, ptRef, NEST.KERF + b3Part:getDimX() / 2 + dStripXCorr, 100000) EgtAutoNestSetStripXconstraintToPart( nPartId, ptRef, NEST.KERF + b3Part:getDimX() / 2 + dStripXCorr, 100000)
else else
EgtAutoNestSetStripXconstraintToPart( nPartId, ptRef, -100, RawParts[1].Len + 100 - NEST.KERF - b3Part:getDimX() / 2 + dStripXCorr) EgtAutoNestSetStripXconstraintToPart( nPartId, ptRef, -100, RawParts[1].Len + 100 - NEST.KERF - b3Part:getDimX() / 2 + dStripXCorr)
@@ -1840,6 +1672,8 @@ local function AddParts(RawParts, vPartsDoneManually)
return true return true
end end
------------------------------------------------------------------
------------------------------------------------------------------
-- Inizializzo contatori errori e avvisi -- Inizializzo contatori errori e avvisi
local nErrCnt = 0 local nErrCnt = 0
local nWarnCnt = 0 local nWarnCnt = 0
@@ -1973,7 +1807,7 @@ if bNestingOk then
end end
end end
-- aggiungo pezzi nestati a mano -- aggiungo pezzi nestati a mano
nPartCount = 0 nPartCount = 0
for nInd = 1, #vDoneManually do for nInd = 1, #vDoneManually do
if vDoneManually[nInd].SheetId == nId then if vDoneManually[nInd].SheetId == nId then
@@ -2006,7 +1840,6 @@ if bNestingOk then
end end
end end
end end
-- altrimenti pezzo -- altrimenti pezzo
@@ -2019,22 +1852,7 @@ if bNestingOk then
if nMachGroup and nMachGroup ~= GDB_ID.NULL then if nMachGroup and nMachGroup ~= GDB_ID.NULL then
-- creo pezzo copia -- creo pezzo copia
local nPartDuploId = EgtDuploNew( nId) local nPartDuploId = EgtDuploNew( nId)
-- applico flip e rotazioni fatte durante verifica posizionamento pezzo
-- local b3Part = EgtGetBBoxGlob( nPartDuploId, GDB_BB.STANDARD)
local nPartInd local nPartInd
-- for nInd = 1, #PartStates do
-- if PartStates[nInd].PartId == nId then
-- -- if PartStates[nInd].Flip then
-- -- EgtRotate( nPartDuploId, b3Part:getCenter(), X_AX(), 180, GDB_RT.GLOB)
-- -- end
-- -- if PartStates[nInd].Rotate and PartStates[nInd].Rotate > 0 then
-- -- EgtRotate( nPartDuploId, b3Part:getCenter(), Z_AX(), PartStates[nInd].Rotate, GDB_RT.GLOB)
-- -- end
-- nPartInd = nInd
-- end
-- end
-- aggiungo le curve corrispondenti alle aree di lavorazione del pezzo -- aggiungo le curve corrispondenti alle aree di lavorazione del pezzo
local sToolOutlines = EgtGetInfo( nId, "ToolOutlines", 's') local sToolOutlines = EgtGetInfo( nId, "ToolOutlines", 's')
@@ -2067,16 +1885,21 @@ if bNestingOk then
EgtSetInfo( nPartDuploId, "POSX", ptPos:getX() + dXCorr) EgtSetInfo( nPartDuploId, "POSX", ptPos:getX() + dXCorr)
EgtSetInfo( nPartDuploId, "POSY", ptPos:getY() + dYCorr) EgtSetInfo( nPartDuploId, "POSY", ptPos:getY() + dYCorr)
local nPartRot = EgtGetInfo( nId, "ROTATED", 'i') or 0 local nPartFlip = EgtGetInfo( nId, "INVERTED", 'i') or 0
local nTotRot = dAngRot - nPartRot
nTotRot = EgtIf( nTotRot < 0, nTotRot + 360, nTotRot)
EgtSetInfo( nPartDuploId, "ROT", nTotRot)
local nPartFlip = EgtGetInfo( nId, "INVERTED", 'i')
nPartFlip = EgtIf( nPartFlip == 180, 1, 0) nPartFlip = EgtIf( nPartFlip == 180, 1, 0)
local nTotFlip = EgtIf( nPartFlip ~= nFlag, 180, 0) local nTotFlip = EgtIf( nPartFlip ~= nFlag, 180, 0)
EgtSetInfo( nPartDuploId, "FLIP", nTotFlip) EgtSetInfo( nPartDuploId, "FLIP", nTotFlip)
local bPartFlip = ( nTotFlip == 180)
local nPartRot = EgtGetInfo( nId, "ROTATED", 'i') or 0
local nTotRot = nPartRot - EgtIf( bPartFlip, -dAngRot, dAngRot)
if nTotRot < 0 then
nTotRot = nTotRot + 360
elseif nTotRot >= 360 then
nTotRot = nTotRot - 360
end
EgtSetInfo( nPartDuploId, "ROT", nTotRot)
end end
end end
end end
@@ -2133,7 +1956,6 @@ if bNestingOk then
end end
end end
-- creo grezzi per ogni gruppo di lavorazione -- creo grezzi per ogni gruppo di lavorazione
local MachGroupToTCnt = EgtGetMachGroupCount() local MachGroupToTCnt = EgtGetMachGroupCount()
local MachGroupIndex = 0 local MachGroupIndex = 0
@@ -2159,7 +1981,7 @@ if bNestingOk then
local nRawPartId = EgtGetFirstRawPart() local nRawPartId = EgtGetFirstRawPart()
-- recupero box grezzo ridotto della tolleranza -- recupero box grezzo ridotto della tolleranza
local b3Raw = EgtGetRawPartBBox( nRawPartId) local b3Raw = EgtGetRawPartBBox( nRawPartId)
b3Raw:expand( - WD.INSIDE_RAW_TOL) b3Raw:expand( - s_dInsideRawTol)
EgtOutLog( 'RawBox='..tostring( b3Raw)) EgtOutLog( 'RawBox='..tostring( b3Raw))
local nPartDuploId = EgtGetFirstPartInRawPart( nRawPartId) local nPartDuploId = EgtGetFirstPartInRawPart( nRawPartId)
+122
View File
@@ -0,0 +1,122 @@
==== Wall Update Log ====
Versione 2.6j1 (29/10/2024)
- Fixed : in Nesting e Flip/Rot corretto problema in rotazione pezzi che causava ribaltamenti non voluti nella copia grezzo
Versione 2.6i2 (30/09/2024)
- Modif : aggiunta nota altezza sottopezzo, per pareti a layer
Versione 2.6i1 (25/09/2024)
- Fixed : in NestProcess correzione in lettura array per cambio dll di lettura
Versione 2.6h2 (28/08/2024)
- Modif : Aggiunto controllo licenza/chiave per abilitazione generazione PartProgram
- Fixed : in FreeContour corretto caso in cui si chiedevano informazioni sulla faccia non presenti.
Versione 2.6h1 (20/08/2024)
- Modif : in LapJoint, se fresa Side trovata ma non applicabile, si considera come se non trovata
- Modif : in Collect analisi facce limitata a feature che ne hanno meno di 50
- Modif : aggiunti nuovi parametri alla chiamata della funzione GetChainSawStartAngs da WallData della macchina
Versione 2.6g2 (19/07/2024)
- Modif : in BatchProcess e BatchProcessNew si forza ricalcolo ogni volta che si è in situazione di CHECK o CHECK + GENERATE
Versione 2.6g1 (17/07/2024)
- Modif : in ProcessDrill, se foro verticale passante e diametro inferiore a 100 mm, riduzione affondamento di 5 mm sostituito con tab
- Fixed : correzioni a utilizzo DEFAULT_RAW_NO_EXTRA_WIDTH
Versione 2.6f1 (21/06/2024)
- Added : in BatchProcess e BatchProcessNew aggiunto DEFAULT_RAW_NO_EXTRA_WIDTH per eliminare il sovramateriale grezzo in vista
Versione 2.6e2 (24/05/2024)
- Modif : in LapJoint se non si trova una lavorazione di tipo side si cerca una pocketing
- Fixed : in BatchProcessNew se generazione non abilitata si salta questa fase invece di restituire errore
- Fixed : piccoli errori in LapJoint e DoubleCut.
Versione 2.6e1 (03/03/5/2024)
- Fixed : correzione per assegnazione a SawCut di flag passante (bIsThrough).
Versione 2.6c3 (26/03/2024)
- Modif : modifica per richiamare le nuove funzioni di Test interferenza solidi superfici nel controllo validità lavorazione pulizia spigoli interni
- Modif : in compilazione vengono eliminate le info di debug
- Fixed : in processSawCut si ignora verso vettore se taglio passante.
Versione 2.6b2 (21/02/2024)
- Added : aggiunta gestione spostamento pannello rispetto a origine da dato BTL di TS3v7.
Versione 2.6b1 (20/02/2024)
- Modif : In BatchProcess tolleranza su altezza pannello in grezzo portata a 0.1 mm
- Fixed : in LapJoint piccola correzione ai casi in cui si utilizza il SIDESTEP.
Versione 2.5l2 (21/12/2023)
- Fixed : in FreeContour -> MakeByPocket corretto un bug che provocava la cancellazione della feature dopo averla lavorata
Versione 2.5l1 (13/12/2023)
- Modif : modifiche a WallExec, WallLib, FeatureTopology per allineamento Topology con Beam
- Modif : in FreeContour -> MakeByPocket aggiunta la possibilità di svuotare tasche passanti
- Modif : in FreeContour -> MakeByPocket in tasche speciali cliente 90480029 forzato step unico
Versione 2.5k1 (14/11/2023)
- Added : aggiunte lavorazioni in doppio.
- Modif : miglioramenti vari alla lavorazione tasche, in particolare in presenza di pezzi vicini.
Versione 2.5j3 (23/10/2023)
- Added : aggiunta gestione aree vietate per chiodature (LockOut for Nail)
- Modif : in FreeContour conversione automatica di facce non fattibili con lama per limiti di orientamento in facce da fare con fresa.
- Modif : in LapJoint aggiunta segnalazione lavorazione tipo Side non trovata.
- Modif : migliorata funzione Is3EdgesApprox in WallLib
- Modif : nella ricerca lavorazione da usare controllo di utensile attivo sostituito con controllo utensile presente nel setup corrente
- Fixed : in FreeContour correzione a MakeCustomPath per calcolare correttamente puliture spigoli di tipo 2 (Clean 30) e 3 (Gola di Scarico)
Versione 2.5i3 (21/09/2023)
- Modif : per pulizia corner di FreeContour disabilitato metodo con tunnel ed esteso metodo con tre punti
- Modif : in LapJoint aggiornata pulizia corner come FreeContour
- Fixed : in FreeContour e Lapjoint, in MakeByMill, modificato SCC per correggere caso con lama su testa fresa.
Versione 2.5i2 (20/09/2023)
- Modif : in LapJoint con una sola faccia controllo lavorabilità ora come per FreeContour
- Modif : in CleanCorner ora AuxDir (SCC) sempre Z+
- Fixed : in FreeContour piccola correzione alla pulizia corner
- Fixed : corretta impostazione allargamento aree disposizone grezzi su tavola.
Versione 2.5i1 (12/09/2023)
- Fixed : correzioni per pulizia corner in FreeContour.
Versione 2.5h1 (01/08/2023)
- Modif : in sideGroove migliorato il controllo che la testa non scenda sotto al livello del grezzo (ora considera anche il diametro minimo della testa e non interviene se la lavorazione è spostata a dopo il taglio outline).
- Fixed : corretto bug in MachiningLib -> AddMachining che contempla il caso in cui Proc non sia una tabella
Versione 2.5g3 (26/07/2023)
- Modif : Nei tagli di lama angolo Z minimo ora gestito tramite costante da WallData CUT_VZ_MIN (default -0.5)
- Modif : Nelle fresature di ripresa angoli dei contorni migliorata la scelta della fresa secondaria in caso non sia disponibile una fresa di lunghezza sufficiente.
Versione 2.5g2 (25/07/2023)
- Added : aggiunte passate laterali per SideGroove, se specificato SIDESTEP nelle note utensile.
Versione 2.5g1 (04/07/2023)
- Modif : per posizione default del grezzo ora si assegna 0 per lasciare il compito a WD.GetOrigCorner di macchina.
Versione 2.5f3 (30/06/2023)
- Modif : in LapJoint aggiunta lettura di eventuali note di lavorazione esistenti.
Versione 2.5f2 (28/06/2023)
- Added : aggiunte due nuove origini (TN e BN che come X usano WD.NEW_REF), in totale ora sono 8.
Versione 2.5f1 (13/06/2023)
- Added : aggiunta gestione priorità da btl
- Added : aggiunta gestione lavorazione per lamatura speciale affondata con Tool_ID specifico.
Versione 2.5e1 (04/05/2023)
- Modif : modifiche per gestione traduzione messaggi
Versione 2.5d2 (20/04/2023)
- Added : in TS3v7 aggiunta gestione flag per taglio feature con outline (da parametro macchina WD.CUT_WITH_OUTLINE)
- Added : in TS3v7 aggiunta gestione flag per rotazione grezzo di 180deg (da parametro macchina WD.RAWPART_ROT)
- Modif : in LapJoint con lavorazione di lato se MCH_SCC.ADIR_NEAR fallisce si riprova con MCH_SCC.ADIR_FAR
- Fixed : in FreeContour e assimilati aggiunta pulitura spigoli Q05=1 anche su sole fresature
- Fixed : in LapJoint e assimilati corretta ricerca utensile in lavorazione 'SideGroove'
- Fixed : in FreeContour e LapJoint la lavorazione CleanCorner viene sempre forzata con lato di lavoro in centro
- Fixed : in LapJoint razionalizzata gestione parametri Q ed eliminta gestione forzatura lama non usata.
Versione 2.5d1 (06/04/23)
- Added : in nesting aggiunti valori di default per alcuni parametri letti dal WallData.
+6
View File
@@ -0,0 +1,6 @@
-- Version.lua by Egalware s.r.l. 2024/08/20
-- Gestione della versione di Wall
NAME = 'Wall'
VERSION = '2.6j1'
MIN_EXE = '2.6h1'