Compare commits

...

1185 Commits

Author SHA1 Message Date
luca.mazzoleni 7e243bb9ea Merge branch 'release/3.1d2' 2026-04-10 09:42:48 +02:00
luca.mazzoleni ca21098226 - update log e txt 2026-04-10 09:42:21 +02:00
luca.mazzoleni 32052e3016 - piccola correzione in DtMortise 2026-04-09 16:46:18 +02:00
luca.mazzoleni 4138f89f69 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam into develop 2026-04-09 16:36:23 +02:00
luca.mazzoleni 66013f5e07 - in ProcessLapJoint MakePathsOnExtremePoints si costruisce il percorso solo per i punti sui bordi del grezzo 2026-04-09 16:36:20 +02:00
daniele.nicoli a9ec6744e3 In DtMortise - Aggiunto parametro Q01=1 per non eseguire l'antischeggia 2026-04-09 11:30:23 +02:00
daniele.nicoli 5c82ab27c8 ProcessStepJoint - Aggiunta possibilità di forzare lavorazione con fresa in caso di feature a 2 facce concava con angolo tra le facce > 90°. Q02=1 2026-04-08 17:10:25 +02:00
luca.mazzoleni 723f1a0d10 Merge tag '3.1d1' into develop
3.1d1
2026-04-08 16:01:22 +02:00
luca.mazzoleni 6c18d3fa95 Merge branch 'release/3.1d1' 2026-04-08 16:01:10 +02:00
luca.mazzoleni e910d6e6ba update log e version 2026-04-08 16:00:37 +02:00
daniele.nicoli 1f3906ab35 Merge branch 'develop' of https://gitlab.steamware.net/egalware-cadcam/lua/DataBeam into develop 2026-04-07 17:14:32 +02:00
daniele.nicoli 183a4a564a In ProcessLapJoint - aggiunto warning se non esiste il percorso e relativa disattivazione di esso in tutte le ApplyMachining(). 2026-04-07 17:14:25 +02:00
luca.mazzoleni be4575e984 - in DtMortise -> CalcPathAtHeight ora lo spostamento viene fatto correttamente anche nel caso di più curve 2026-04-07 14:58:39 +02:00
luca.mazzoleni 1af37a5589 - in BeamExec si abilita riduzione foratura con MaxElev anche per tagli di testa 2026-04-02 17:44:24 +02:00
luca.mazzoleni 7c9b20ae2e - in ProcessDrill correzione in caso il PreferredSide non sia definito nella macchina 2026-03-30 11:08:56 +02:00
luca.mazzoleni 5dd839dace - in LapJoint per Q02 solo contorno si inverte ordine lavorazione lato principale e opposto, in modo da avere sempre per ultima la lavorazione da sopra 2026-03-24 15:48:06 +01:00
daniele.nicoli 6ae1e94cd5 In LapJoint - FacesBySaw, nelle Slot di testa con forma a U, forzata lavorazione concorde a discapito della direzione (da sotto a sopra o viceversa) 2026-03-19 17:13:43 +01:00
luca.mazzoleni bbffd69e1e Merge tag '3.1c2' into develop
3.1c2
2026-03-18 15:38:49 +01:00
luca.mazzoleni 30028fecf0 Merge branch 'release/3.1c2' 2026-03-18 15:38:36 +01:00
luca.mazzoleni cf96d7bc90 update log e versione 2026-03-18 15:37:49 +01:00
luca.mazzoleni 89fefbcbad - in LapJoint per antischeggia Q06 contemplato valore 3 per scegliere in automatico la strategia (lama o fresa)
- in LapJoint Q17=0 significa nessun codolo (sempre abbinato a Q02)
2026-03-18 15:37:15 +01:00
luca.mazzoleni 6892759956 - in LapJoint per Q02 solo contorno sono ammessi anche i tunnel; aggiunti messagi in caso di lavorazione incompleta 2026-03-17 13:08:36 +01:00
luca.mazzoleni 78a3e907ce Merge branch 'ContourOnGroove3' into develop 2026-03-17 11:42:16 +01:00
luca.mazzoleni 63133c8813 - in BeamLib.GetToolfromMachining per le frese si leggono anche MaxDepth e StemDiameter. MaxDepth corretta se StemDiameter > Diameter
- in LapJoint correzioni a Q02 per solo contorno
2026-03-17 09:57:48 +01:00
luca.mazzoleni 58e32bdfd0 - in LapJoint aggiunta possibilità di fare solo contorno per tasche groove 3 aperte con Q02, pe L030 2026-03-16 18:23:16 +01:00
luca.mazzoleni 6528e6e77c Merge branch 'Test_Ticket#2842' into develop 2026-03-12 18:43:16 +01:00
luca.mazzoleni 48f1ac5e4d Merge branch 'develop' into Test_Ticket#2842 2026-03-12 18:43:05 +01:00
luca.mazzoleni fbca8d3abd - in ProcessSplit correzione per coda con spessore molto piccolo e separazione con testa sopra/sotto 2026-03-12 18:42:56 +01:00
luca.mazzoleni 6c61edc338 Merge branch 'develop' into Test_Ticket#2842 2026-03-11 17:42:41 +01:00
luca.mazzoleni 6643673196 - in LapJoint se svuotatura da due lati si usa la OpenPocket per groove3 aperta e rabbet 2026-03-11 17:38:13 +01:00
luca.mazzoleni 7d33ea6799 Merge branch 'DrillPocketDoubleFix' into develop 2026-03-11 09:50:05 +01:00
luca.mazzoleni 7dd0c14f5f - in ProcessDrill sistemato LastStep in caso di DrillPocket: ora si copia la lavorazione e si toglie il doppio 2026-03-11 09:22:00 +01:00
luca.mazzoleni 232adff332 Merge branch 'develop' into Test_Ticket#2842 2026-03-06 18:03:26 +01:00
luca.mazzoleni d55caac3c9 Merge tag '3.1c1' into develop
3.1c1
2026-03-04 17:59:15 +01:00
luca.mazzoleni 3edc65b785 Merge branch 'release/3.1c1' 2026-03-04 17:59:05 +01:00
luca.mazzoleni eb4f709db3 update version e log 2026-03-04 17:58:48 +01:00
andrea.villa f6316cc75a Nella OrderFeature non si considerano più le dipendenze, veniva già fatto tutto nella ReorderFeatureWithDependency 2026-03-04 17:32:36 +01:00
daniele.nicoli bd8a551005 Eliminata passata finale dopo il taglio di coda se non è presente un grezzo successivo. 2026-03-03 11:53:08 +01:00
daniele.nicoli 1729e57dbf ProcessLongDoubleCut, migliorata casistica pezzo da lavorare con testa 2 2026-03-02 16:38:08 +01:00
daniele.nicoli 261ce7992d Merge branch 'Fixed_duplicate_predrill' into develop 2026-02-27 15:49:12 +01:00
daniele.nicoli 48a1139eea - BeamExec, tolta duplicazione pre-foro nella BeamExec.ProcessBeam()
- ProcessDrill, sistemata dichiarazione local di alcune variabili usate anche dopo l'if
2026-02-27 15:31:47 +01:00
luca.mazzoleni 70b2002a24 Merge tag '3.1b1' into develop
3.1b1
2026-02-26 12:49:45 +01:00
luca.mazzoleni f14cb632d6 Merge branch 'release/3.1b1' 2026-02-26 12:49:35 +01:00
luca.mazzoleni f019633466 update version e log 2026-02-26 12:49:17 +01:00
luca.mazzoleni 57833ebad9 - in ProcessDrill se foratura in doppio si aggiunge la nota LastStep per garantire che non ci siano collisioni tra le punte e prevenire extracorsa 2026-02-26 11:34:41 +01:00
luca.mazzoleni 04a4458562 Merge commit 'b150b5387d73082d6f8904a270b115a1cabbb487' into develop 2026-02-25 19:00:14 +01:00
luca.mazzoleni b150b5387d - in Long2Cut correzione al LeadIn/Out 2026-02-25 18:34:59 +01:00
daniele.nicoli ce05aed8c9 LapJoint, Features lunghe spezzate, forzato parametro invert=false se tasca larga come l'utensile (solo 1 passata senza ritorno all'esterno del pezzo) 2026-02-25 15:14:52 +01:00
daniele.nicoli 6820d88560 Merge branch 'Test/Q_OnlyDrillContour' into develop 2026-02-24 12:03:03 +01:00
daniele.nicoli ae31898e05 - Spostamento del richiamo all'interno della Drill.Make
- Piccole modifiche alla gestione
- Step diventa il 75% del teorico o se più piccolo, il diametro utensile
2026-02-24 12:02:43 +01:00
daniele.nicoli eb1878c17c Definizione Parametro Q04=1 per esecuzione del solo contorno di un foro NON passante 2026-02-24 09:20:13 +01:00
andrea.villa 468fb5debc In DtMortaise, migliorato ingresso/uscita in caso di mortasa con svuotatura 2026-02-20 14:33:46 +01:00
luca.mazzoleni 67fa66cf4f - in LapJoint sistemati commenti 2026-02-20 12:28:25 +01:00
luca.mazzoleni e4b4e846ef Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam into develop 2026-02-20 12:00:56 +01:00
luca.mazzoleni 102bdc8018 - in FreeContoru.MakeByMill aggiunto Q10 per forzare MaxElev (come in LapJoint) 2026-02-20 12:00:52 +01:00
daniele.nicoli 5ca2c39506 Merge branch 'Test/OpenPocketSplit' into develop 2026-02-20 10:02:53 +01:00
daniele.nicoli 2c3aaf01dc In ProcessLapJoint :
- Eliminata forzatura ZigZag per tasche strette e utensili < 90
- Forzato OpenOutRaw se ce l'apertura sulla curva
2026-02-20 10:02:34 +01:00
daniele.nicoli f52bf933a1 Aggiornamento Versione minima Cam5 2026-02-19 16:54:15 +01:00
daniele.nicoli 993a022894 In LapJoint aggiunta gestione lato aperto in feature lunghe spezzate 2026-02-19 15:55:36 +01:00
luca.mazzoleni 60448c217a Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam into develop 2026-02-18 18:40:12 +01:00
luca.mazzoleni 3a5338c29b - migliorati commenti in LapJoint 2026-02-18 18:40:07 +01:00
daniele.nicoli 7177b58836 Merge branch 'Test/SpiralIn-Out' into develop 2026-02-18 15:00:17 +01:00
daniele.nicoli bedb274c0f - In ProcessLapJoint, Aggiunto 'OpenPocket_H2' come controllo per SpiralIn 2026-02-17 10:27:55 +01:00
luca.mazzoleni 1df1529bd1 Merge branch 'DoubleDrillPocketLastStep' into develop 2026-02-16 15:07:00 +01:00
luca.mazzoleni 51a8ad95b2 - in ProcessDrill correzione in LastStep 2026-02-16 13:27:35 +01:00
luca.mazzoleni 394fb2194f - in ProcessDrilling correzioni e migliorie alla lavorazione ultimo step di fori svuotati in doppio 2026-02-16 12:10:46 +01:00
luca.mazzoleni 9288304051 - in ProcessDrill per fori fatti con svuotatura in doppio si limita l'affondamento (sarebbe sempre in collisione) e si aggiunge una lavorazione ad hoc, non in doppio, per l'ultimo step 2026-02-16 09:41:37 +01:00
luca.mazzoleni 99b77ff1e0 - in headCut e Split corretti smussi con P08 e P09 2026-02-13 09:22:04 +01:00
luca.mazzoleni 5885954f22 - in LongDoubleCut possibilità di scegliere lavorazione in discordanza. Al momento il parametro arriva da Q14 dalla LapJoint 2026-02-12 12:41:49 +01:00
luca.mazzoleni 440c739e9c - in LongDoubleCut correzione per casi con Q03=1 2026-02-11 17:08:24 +01:00
luca.mazzoleni 026c86297e Merge branch 'master' into develop 2026-02-11 15:01:22 +01:00
andrea.villa d4454331c0 In Long2Cut quando si lavora di fresa, si considera come principale sempre quella ad elevazione minore. Se nei controlli iniziali avesse scelto l'altra, allora si inverte tutto di conseguenza. 2026-02-11 14:58:21 +01:00
luca.mazzoleni bb5b135694 - in LapJoint in caso di L derivanete da spezzatura si fa svuotatura anche se non arriva sul fondo 2026-02-10 15:50:10 +01:00
luca.mazzoleni c94e6f858b Merge remote-tracking branch 'origin/master' into develop 2026-02-10 08:45:02 +01:00
Dario Sassi 49f5ba9cc9 DataBeam 3.1a1 :
- aggiunta gestione UNLOAD da btm (come per LOAD90)
- ora UserNotes presenti nelle levarazioni in libreria vengono conservate.
2026-02-09 20:26:08 +01:00
luca.mazzoleni 1ed912ebfd - in batchProcess modifiche per lettura part offset da btl 2026-02-09 12:58:36 +01:00
luca.mazzoleni d1d204b260 Merge tag '2.7l3' into develop
2.7l3
2025-12-23 08:29:07 +01:00
luca.mazzoleni 3cd3557b12 Merge branch 'release/2.7l3' 2025-12-23 08:28:58 +01:00
luca.mazzoleni 70b0c3d3d2 2.7l3 2025-12-23 08:27:54 +01:00
andrea.villa 2798616813 - Gestione angolo massimo in caso di fori che attraversano un taglio. Paraemtro MAX_ANGLE_DRILL_CUT configurabile da BeamData
- Controllo per aggiunta dei 10mm extra in caso di pretaglio spostato dopo impostazione setup
- Aggiunta funzione "ReorderFeatureWithDependency" per riordinare i fori che dipendono da altre feture
2025-12-18 10:16:34 +01:00
luca.mazzoleni fa74016932 Merge tag '2.7l2' into develop
2.7l2
2025-12-16 13:17:31 +01:00
luca.mazzoleni f309179270 Merge branch 'release/2.7l2' 2025-12-16 13:17:22 +01:00
luca.mazzoleni 9a6e4f8904 - update version e log 2025-12-16 13:16:55 +01:00
andrea.villa ba2ff5a7a7 - se pretagli di coda sono attivi, si aumenta di 10mm la lunghezza del grezzo per fare effettivamente tagliare del materiale
- il calcolo per limitare dimensione cubetti in caso di cubetti romboidi è limitato a 0.5 del teorico
2025-12-12 16:45:29 +01:00
andrea.villa d10b99dc3c Lanciando automatismo una seconda volta, dopo flip del pezzo, restava settato il valore e faceva considerazioni sbagliate. Quindi se non trova taglio troncante si resetta la nota. 2025-12-11 11:04:18 +01:00
andrea.villa 743270ed4d Ripristinato valore per CLEAN_CORNER : Q15 2025-12-10 12:13:57 +01:00
luca.mazzoleni ad0f4048aa - corretta data in log 2025-12-10 10:07:01 +01:00
luca.mazzoleni cb7a114124 Merge tag '2.7l1' into develop
2.7l1
2025-12-10 10:05:08 +01:00
luca.mazzoleni b9a9ce1479 Merge branch 'release/2.7l1' 2025-12-10 10:05:02 +01:00
luca.mazzoleni 812adeed34 - update version e log 2025-12-10 10:04:28 +01:00
andrea.villa 4b41948819 Rimosso valore Q per CLEAN_CORNER perchè non deve finire in versione. Da ripristinare per prossime versioni a Q15 2025-12-10 10:03:36 +01:00
andrea.villa 77599a8c68 Tolta chiamata a debug 2025-12-05 13:04:30 +01:00
andrea.villa 4f43d74d41 In MachiningLib e LapJoint aggiunta gestione fresatura con aggregato flottante. Per ora solo su Groove 4 facce e con Q specifia da attivare 2025-12-05 12:05:32 +01:00
andrea.villa 92d0ac2e93 In LapJoint, la spezzatura della feature considera se è presente del grezzo. 2025-12-04 08:23:23 +01:00
andrea.villa f7dd6c9da2 Per CleanCorner con fresa a V, il default era attivo. Ora viene settato come disattivo. 2025-11-27 15:34:44 +01:00
andrea.villa 63b8ef4377 Merge branch 'CleanCornerMillV60' into develop 2025-11-27 11:30:08 +01:00
andrea.villa e0c4f85bfb Prima versione funzionante pulizia spigoli con fresa a V su tasche non passanti 2025-11-26 16:20:10 +01:00
andrea.villa 675b730dcf Modifiche per lavorazione spigoli feature su faccia frontale o posteriore 2025-11-25 10:28:02 +01:00
luca.mazzoleni c2e49d1804 Merge tag '2.7k1' into develop
2.7k1
2025-11-25 08:52:33 +01:00
luca.mazzoleni 5c4d7224f0 Merge branch 'release/2.7k1' 2025-11-25 08:52:22 +01:00
luca.mazzoleni bd956281e2 update log e version 2025-11-25 08:47:36 +01:00
andrea.villa 0f122feaac Tolti parametri non utilizzati passati alla funzione
Aggiunta lavorazione tramite funzione EGT
2025-11-24 17:13:20 +01:00
andrea.villa eec524a00f Merge branch 'develop' into CleanCornerMillV60 2025-11-24 15:47:17 +01:00
andrea.villa d4b7fe1910 Per DtMortise, si considera che attraversa un LapJoint solo se DtMortise è affondata nel grezzo 2025-11-24 13:29:50 +01:00
andrea.villa 880cecfde2 Riportate funzioni da Wall. Non funzionante. Da completare. 2025-11-24 08:24:34 +01:00
andrea.villa b05d1aa7b8 Spostata creazione del gruppo ausiliario prima della collect. Altrimenti andava in crash quando aggiungeva i prefori. 2025-11-20 09:19:20 +01:00
andrea.villa b775610125 - In ProcessCut, se taglio rivolto verso il basso, si controlla che non sia troppo profondo, cercando di evitare collisione tra pezzo e carro Z
- Il Q14 ha effetto solo su lati longitudinali che si trovano in faccia bottom
2025-11-18 13:11:24 +01:00
luca.mazzoleni 9e284d509b - in BeamExec se foratura in doppio non possibile per distanza punte troppo bassa si restituisce messaggio in Log Cam5 2025-11-13 13:07:27 +01:00
luca.mazzoleni dd7a1e80b2 - in ProcessDrill rimossa la variazione di step nel caso di foratura in doppio: le librerie Egt gestiscono ora correttamente questi casi
- aggiornata versione minima Cam5
2025-11-13 12:23:28 +01:00
andrea.villa 919b32ca8d In ProcessCut, se taglio rivolto verso il basso, si controlla che non sia troppo profondo, cercando di evitare collisione tra pezzo e carro Z 2025-11-12 15:48:10 +01:00
andrea.villa fef5db6046 In SplitCut e HeadCut aggiunti smussi con possibilità di raccordare o smussare spigoli 2025-11-07 10:02:16 +01:00
andrea.villa 0d5dd4d348 Aggiunta gestione Q14 per settare lavorazione discorde in caso di MillAsBlade 2025-11-06 08:38:34 +01:00
andrea.villa e526502177 In LapJoint, se applicazione svuotatura non andata a buon fine e si prova ad allargare tasca, allora si cambia anche il tipo in SPIRALIN 2025-11-04 15:28:09 +01:00
andrea.villa 325f30c61b Merge branch 'master' into develop 2025-11-04 13:18:30 +01:00
andrea.villa f824cde2d0 Nelle profilature, aggiunta tolleranza in calcolo doppia passata 2025-11-04 13:18:06 +01:00
andrea.villa a61b27f292 - Aggiunta tolleranza nel calcolo tipo di taglio
- In BeamLib, la funzione GetFaceHvRefDim non tiene più in considerazione il limite del grezzo, ma sempre il rettangolo minimo che racchiude la faccia.
2025-11-04 09:05:13 +01:00
luca.mazzoleni e582f7a38b Merge branch 'master' into develop 2025-10-30 15:56:15 +01:00
luca.mazzoleni a813d5d742 Merge branch 'develop' 2025-10-30 15:55:56 +01:00
luca.mazzoleni 93e92da027 update log e version 2025-10-30 15:55:41 +01:00
luca.mazzoleni d862e8a2c5 update log 2025-10-30 15:54:38 +01:00
andrea.villa d79151c1d3 in DoubleCut, gestione feature con più di due facce (caso insolito) 2025-10-30 12:38:23 +01:00
luca.mazzoleni 3d62e41811 Merge branch 'master' into develop 2025-10-28 16:43:31 +01:00
luca.mazzoleni c796a5351f - Hotfix: se testa sopra/sotto la distanza minima feature per attivare le tasche in doppio MIRROR_POCKETS_MIN_DISTANCE diventa 35 2025-10-28 16:42:42 +01:00
luca.mazzoleni 00d7dd2970 Merge tag '2.7j1' into develop
2.7j1
2025-10-28 12:56:46 +01:00
luca.mazzoleni eb09d0b65d Merge branch 'release/2.7j1' 2025-10-28 12:56:39 +01:00
luca.mazzoleni 0c7a7daba4 update log e version 2025-10-28 12:56:12 +01:00
andrea.villa 6f14e4f2c2 In ProcessMortise, se diametro utensile esattamente uguale a larghezza tasca, e tasca tonda, si setta un offset radiale negativo 2025-10-27 11:51:19 +01:00
andrea.villa 950060f4dc In ProcessMortise si considera il raggio minimo impostato da parametro P 2025-10-27 09:51:57 +01:00
andrea.villa 1007e08e9d Se lamavorazione di base ha il flag "inverti", allora il flag si deve togliere. 2025-10-17 13:25:02 +02:00
andrea.villa 04acc25535 In DtTenon, si controlla la somma di tutti i grezzi successivi e non solo il primo successivo 2025-10-10 15:37:29 +02:00
andrea.villa 38e26b9e48 Piccola modifica ordinamento feature 2025-10-07 10:11:15 +02:00
luca.mazzoleni 72b7cbac1b Merge tag '2.7i2' into develop
2.7i2
2025-09-30 10:16:16 +02:00
luca.mazzoleni 5f1b863013 Merge branch 'release/2.7i2' 2025-09-30 10:16:05 +02:00
luca.mazzoleni 250802048a update log e version 2025-09-30 10:15:55 +02:00
andrea.villa a8d0bcfec4 In DtTenon, aumentato angolo limite per decidere se ribaltare trave 2025-09-25 10:01:59 +02:00
andrea.villa 459eff5610 In Long2Cut, se le due facce sono ortogonali, si predilige lavorazione perpendicolare, con minore elevazione. 2025-09-23 12:51:31 +02:00
andrea.villa a749895229 In DtTenon, si controlla grezzo successivo per decidere se è necessario tagliare dal basso per ridurre sporgenza trave. 2025-09-18 09:32:50 +02:00
andrea.villa 04489421e7 In ProcessCut, si fa taglio verso Z solo se è possibile avere una direzione di taglio orizzontale e non in verticale. Altrimenti cerca sempre di scegliere in verticale. 2025-09-18 08:42:57 +02:00
andrea.villa 0c16b5e969 In LapJoint, revert della modifica fatta 12-09-2025 . Se la feature veniva lavorata giusto prima dello scarico, la pinza di scarico, che non si poteva più spostare, andava in extra-corsa. 2025-09-17 09:20:09 +02:00
andrea.villa 9193924fbd In Long2Cut, aggiunta tolleranza per calcolo SCC 2025-09-15 17:01:24 +02:00
andrea.villa adbd5e944e In Long2Cut, se lavorazione non completa si prova a lavorare altra facia solo se la feature è composta da due facce 2025-09-12 13:21:33 +02:00
andrea.villa f76797cbd8 In LapJoint, se non è trave corta e la feature è aperta in coda, si sposta dopo separazione a patto che non sia più lunga di metà trave circa 2025-09-12 12:56:42 +02:00
andrea.villa 09e93d600d In DtMortise, se il percorso sul quale calcolare antischeggia non è piano, si salta la lavorazione. 2025-09-03 15:04:20 +02:00
andrea.villa 63f4df2a7d Merge remote-tracking branch 'origin/master' into develop 2025-09-03 10:29:07 +02:00
andrea.villa 80c5035c74 #HOTFIX# Passaggio finitura tenone P14>0
- Corretto calcolo FaceUse
- Si cicla sulle ultime 5 facce anziché solo ultima
2025-09-03 10:28:53 +02:00
luca.mazzoleni c9451e65e1 Merge tag '2.7i1' into develop
2.7i1
2025-09-03 09:25:59 +02:00
luca.mazzoleni 19706d6264 Merge branch 'release/2.7i1' 2025-09-03 09:25:48 +02:00
luca.mazzoleni 46ca7c793f update version e log 2025-09-03 09:25:31 +02:00
andrea.villa e26540193c Aggiunto passaggio di finitura in caso il tenone non cominci dal bordo della trave (P14 > 0) 2025-09-02 15:35:20 +02:00
andrea.villa af107a780e Piccola modifica a valori di ritorno della funzione GetFaceWithMostAdj 2025-09-02 11:55:27 +02:00
andrea.villa 4befa4eee3 Gestione della funzione EgtSurfTmFacetElevationInClosedSurfTm in caso ritorni nil 2025-09-02 10:50:11 +02:00
luca.mazzoleni 07db2da825 - in LapJoint miglioria a TestTwoFacesDownHead 2025-08-28 16:40:21 +02:00
luca.mazzoleni a4e6600510 Merge tag '2.7h3' into develop
2.7h3
2025-08-26 08:46:18 +02:00
luca.mazzoleni cb8465d977 Merge branch 'release/2.7h3' 2025-08-26 08:46:12 +02:00
luca.mazzoleni e867e1decf update log e version 2025-08-26 08:46:04 +02:00
luca.mazzoleni 1cd697cf80 Merge branch 'ConsiderHeadTailCutsForElevation' into develop 2025-08-21 17:40:18 +02:00
luca.mazzoleni 729143ce45 - in BeamExec sia nelle dipendenze che dopo l'ordinamento si mettono i tagli di testa e coda troncanti sempre dopo taglio di testa e coda, rispettivamente;
- in LapJoint se Front Slot sul retro e pezzo lungo si setta di coda
2025-08-21 16:47:07 +02:00
luca.mazzoleni 3f707396bb - in BeamExec si salvano gli id delle eventuali feature troncanti di testa e coda nella parte, per poterle poi usare per ricalcolare l'elevazione
- in LapJoint, per svuotature, se possibile si ricalcolano le elevazioni in caso di feature troncanti
- in BeamLib rivista IsFeatureCuttingEntireSection, allineata con BeamNew
2025-08-20 17:39:08 +02:00
luca.mazzoleni 2b3a36a496 Merge tag '2.7h2' into develop
2.7h2
2025-08-19 10:21:19 +02:00
luca.mazzoleni d9e4285748 Merge branch 'release/2.7h2' 2025-08-19 10:21:07 +02:00
luca.mazzoleni 91d5b0ac84 update log e version 2025-08-19 10:20:34 +02:00
luca.mazzoleni db5334217b - in StepJointNotch se 3 facce si chiama LapJoint
- in LapJoint -> MachineByMill, in lavorazione faccia inclinata, se utensile troppo più grande dell'originale si salta la lavorazione
2025-08-08 17:15:08 +02:00
luca.mazzoleni 54c835f717 - in LapJoint migliorata spezzatura per feature lunghe rispetto al pezzo 2025-08-08 13:04:58 +02:00
luca.mazzoleni 86e2324856 - in Lapjoint lunghe si suddivide usando sempre ENDLEN per evitare problemi di pinzaggio. In futuro (o versione nuova) trattare come LongCut e usare EndLen agli estremi e MaxLen in mezzo 2025-08-08 11:39:26 +02:00
luca.mazzoleni 36f4014969 - in ProcessDrill in foratura in doppio si riduce lo step solo se foro passante e almeno 2 step 2025-08-08 09:52:14 +02:00
luca.mazzoleni 7248c44406 - migliorie a ottimizzazione teste 2025-08-07 17:37:37 +02:00
luca.mazzoleni 044a074b76 - in LapJoint migliorie a SawPlusChain 2025-08-06 17:26:15 +02:00
luca.mazzoleni c0e3dab107 Merge tag '2.7h1' into develop
2.7h1
2025-08-05 09:16:28 +02:00
luca.mazzoleni 2b2157c971 Merge branch 'release/2.7h1' 2025-08-05 09:16:18 +02:00
luca.mazzoleni 8c697d73ac update version e log 2025-08-05 09:15:37 +02:00
luca.mazzoleni c35d032da8 Merge branch 'feature/TrimmedMortiseFix' into develop 2025-07-23 18:10:36 +02:00
luca.mazzoleni 7447d3cc1b - in Mortise implementata lavorazione contorno non trimmato in caso di trim in/out non uniforme 2025-07-23 17:20:10 +02:00
andrea.villa bfdf80a44a In ProfCamb, creato nuovo tipo di lavorazione 'Prof_end' ed eliminata gestione Q06 fatta in precedenza 2025-07-21 08:44:25 +02:00
andrea.villa 3755521d2e In LapJoint, se bUseBHSideMill, si considera feature di coda a patto che il pezzo sia più lungo di VERY_SHORT 2025-07-17 10:01:28 +02:00
andrea.villa 104663a89a In LapJoint, riduzione massimo materiale lama per lavorazioni antischeggia di lama con direzione verticale. 2025-07-15 16:46:10 +02:00
luca.mazzoleni e322c15099 Merge branch 'master' into develop 2025-07-14 12:45:36 +02:00
luca.mazzoleni 5f55bc2f42 Merge branch 'develop' 2025-07-14 12:43:48 +02:00
luca.mazzoleni 6c3a16d59c update log e version 2025-07-14 12:43:23 +02:00
andrea.villa 8218fcc438 In FaceBySaw, corretto calcolo CompLength in caso di ?PerpendicularOutraw' 2025-07-14 12:41:49 +02:00
luca.mazzoleni 6a83320321 Merge tag '2.7g4' into develop
2.7g4
2025-07-11 17:44:17 +02:00
luca.mazzoleni b8b5ab2a65 Merge branch 'release/2.7g4' 2025-07-11 17:44:09 +02:00
luca.mazzoleni e27998599b update log e version 2025-07-11 17:43:53 +02:00
andrea.villa a386c74516 Ripristinato calcolo uso lama sotto in caso di rabbet in LapJoint - TestTwoFacesDownHead 2025-07-11 17:41:31 +02:00
luca.mazzoleni bb9dc261c1 Merge tag '2.7g3' into develop
2.7g3
2025-07-11 14:40:57 +02:00
luca.mazzoleni 0e2067e802 Merge branch 'release/2.7g3' 2025-07-11 14:40:50 +02:00
luca.mazzoleni 3008196992 update log e version 2025-07-11 14:40:31 +02:00
luca.mazzoleni 876e45e1a4 - in RidgeLap correzione alla direzione di lavoro cubetti 2025-07-11 13:03:02 +02:00
luca.mazzoleni fa4d3ab9f6 Merge branch 'master' into develop 2025-07-11 09:20:46 +02:00
luca.mazzoleni 4e6c38d82c update log 2025-07-11 09:20:33 +02:00
luca.mazzoleni d3e1ac5805 update version 2025-07-11 09:17:07 +02:00
luca.mazzoleni bc017d0de7 Merge branch 'master' into develop 2025-07-10 14:57:04 +02:00
luca.mazzoleni 18e180cd12 Merge branch 'develop' 2025-07-10 14:56:33 +02:00
luca.mazzoleni 6d8d32c9fb Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam into develop 2025-07-10 14:33:46 +02:00
luca.mazzoleni 20074c6ea0 - in LapJoint correzione importante a sega a catena 2025-07-10 14:33:35 +02:00
andrea.villa 806864e360 Merge remote-tracking branch 'origin/master' into develop 2025-07-09 15:42:20 +02:00
andrea.villa 052407a9be Merge branch 'develop' 2025-07-09 15:42:02 +02:00
andrea.villa b5660a8431 In LongDoubleCut corretta lavorazione aggiunta erroneamente dopo separazione 2025-07-09 15:41:35 +02:00
luca.mazzoleni 103d8d7eec Merge tag '2.7g1' into develop
2.7g1
2025-07-08 18:11:09 +02:00
luca.mazzoleni df47842888 Merge branch 'release/2.7g1' 2025-07-08 18:10:58 +02:00
luca.mazzoleni 5db475bcf7 update version e log 2025-07-08 18:10:42 +02:00
luca.mazzoleni 010e1421c7 - in LapJoint, attacco laterale con sega a catena temporaneamente disabilitato, finchè non si risolvono i problemi di movimentazione in macchina 2025-07-08 15:24:34 +02:00
luca.mazzoleni e908562ab6 Merge branch 'feature/DeepDtMortise' into develop 2025-07-02 09:51:37 +02:00
luca.mazzoleni aba4ebecc4 - in LapJoint per sega a catena con attacco laterale step minimo da sotto portato a 260 per macchine tipo PF 2025-07-02 09:51:25 +02:00
luca.mazzoleni a022ecbb7d Merge branch 'develop' into feature/DeepDtMortise 2025-07-01 12:20:04 +02:00
andrea.villa 605f0fcaf1 Merge branch 'develop' of https://gitlab.steamware.net/egalware-cadcam/lua/DataBeam into develop 2025-06-30 17:53:47 +02:00
andrea.villa 2676d67737 Merge branch 'FinishSmallMillProf' into develop 2025-06-30 17:52:39 +02:00
andrea.villa ea64a9a3f4 In FindMachining, se c'è un criterio di selezione utensile, allora non si ottimizzano le teste. 2025-06-30 17:39:18 +02:00
luca.mazzoleni a996d4beb3 - in LapJoint correzioni a sega a catena con attacco laterale 2025-06-30 16:13:19 +02:00
luca.mazzoleni 919f71481c Merge branch 'develop' into feature/DeepDtMortise 2025-06-27 09:21:16 +02:00
andrea.villa cac9ec767c Prima versione finitura con fresa piccola su profilo caudato 2025-06-26 17:30:21 +02:00
luca.mazzoleni 85e6c3c86d - in LapJoint migliorata sega a catena con attacco laterale 2025-06-26 14:48:59 +02:00
luca.mazzoleni c548172635 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam into develop 2025-06-25 15:25:51 +02:00
luca.mazzoleni 9869d1a61e - in LapJoint migliorata sega a catena con attacco laterale 2025-06-25 15:25:47 +02:00
andrea.villa e0c66df59b Merge branch 'develop' of https://gitlab.steamware.net/egalware-cadcam/lua/DataBeam into develop 2025-06-25 11:43:32 +02:00
andrea.villa c0156a4a97 In LongDoubleCut, se la faccia scelta non è completa, si lavora l'altra faccia (se completa) 2025-06-25 11:43:27 +02:00
luca.mazzoleni 93f1bc4d0d Merge branch 'feature/MortisingAttackFromSide' into develop 2025-06-24 18:07:06 +02:00
luca.mazzoleni adaeb1e19c Merge branch 'develop' into feature/MortisingAttackFromSide 2025-06-24 17:20:13 +02:00
luca.mazzoleni 2430b4e787 - in LapJoint si contempla Q13 per forzare la non rotazione. In questo caso, per sega a catena con groove 4 lati, si accetta di entrare di lato (Plunge=10) 2025-06-24 17:19:47 +02:00
andrea.villa b08710451a In Drill, se foro in testa che attraversa un taglio, si setta sempre la MaxElev. Serve in caso ci sia un grande sovramateriale di testa 2025-06-24 14:50:20 +02:00
andrea.villa 4adf62069f In RidgeLap, si utilizza direzione reale della faccia. Prima era solo verso X 2025-06-24 12:34:12 +02:00
luca.mazzoleni b6e904845e Merge branch 'develop' into feature/MortisingAttackFromSide 2025-06-24 11:56:09 +02:00
andrea.villa 118b9a88d2 Merge branch 'Probing' into develop 2025-06-24 10:33:35 +02:00
andrea.villa 73c86bd35f In MAchiningLib, le librerie di lavorazioni chiamate con pcall perchè non è detto che siano tutte presenti 2025-06-24 10:32:37 +02:00
luca.mazzoleni d0283d7885 Merge branch 'develop' into feature/DeepDtMortise 2025-06-23 17:12:32 +02:00
luca.mazzoleni 5de62b9563 update versione minima 2025-06-23 17:05:29 +02:00
luca.mazzoleni a7a9a23cf3 Merge branch 'feature/OutrawBladeHeadCutSplit' into develop 2025-06-23 16:59:56 +02:00
luca.mazzoleni 21fe8ca47d - in FacesBySaw piccola correzione alla distanza tangente in caso di attacco perpendicolare con OutRaw 2025-06-23 16:58:49 +02:00
andrea.villa 0f536b07c4 Aggiornato Compile 2025-06-23 16:26:39 +02:00
andrea.villa 3e01fb36b0 Si sceglie lavorazione che utilizza la stessa testa della lavorazione 2025-06-23 15:36:20 +02:00
luca.mazzoleni 3c4af3c335 Merge branch 'develop' into feature/OutrawBladeHeadCutSplit 2025-06-23 15:35:48 +02:00
andrea.villa 9480453e57 Disattivazione finale e altre modifiche 2025-06-23 14:53:33 +02:00
luca.mazzoleni e98f924630 - in FacesBySaw piccola correzione alla distanza di compensazione in caso di attacco perpendicolare con OutRaw 2025-06-23 14:41:57 +02:00
luca.mazzoleni eabbc883e4 - in DiceCut.GetDice si ritornano anche gli OffsetP e OffsetO utilizzati
- in ProcessCut si usano gli offset reali dei cubetti per il calcolo della lunghezza di compensazione per gli attacchi perpendicolari OutRaw
2025-06-23 12:38:04 +02:00
andrea.villa 8e19e87d3f Prima versiomne funzionante tastatura. Manca disattivazione finale 2025-06-23 12:15:45 +02:00
luca.mazzoleni 0c4f57a90b - in ProcessSplit si fa attacco perpendicolare OutRaw anche per tutti i tagli con Cut.Make
- in tagli testa e coda sistemata lunghezza compensazione per caso con OutRaw
2025-06-23 11:59:42 +02:00
andrea.villa 77310576bd In LongDoubleCut, se taglio concavo rivolto verso il basso, gestione lavorazione con lama DownUp se macchina senza testa sotto 2025-06-23 09:09:50 +02:00
luca.mazzoleni 1e2f559937 - in HeadCut e Split i tagli aggiuntivi di spezzatura sono ora con attacco perpendicolare e OutRaw=3 (non tornano ogni volta indietro fino al grezzo ipotetico); risolto, presumibilmente, il caso dei rulli che si chiudono
- modificate di conseguenza Cut e FacesBySaw
2025-06-20 17:59:14 +02:00
andrea.villa 6a6dc27560 Primo commit gestione tastatura 2025-06-20 17:30:08 +02:00
luca.mazzoleni ab6ed79a0e Merge branch 'develop' into feature/OutrawBladeHeadCutSplit 2025-06-19 17:57:54 +02:00
luca.mazzoleni 7bb237f7d2 - nei tagli bForceTangentLeadInOut sostituita da sLeadInOutType per forzare il tipo di attacco 2025-06-19 17:54:50 +02:00
andrea.villa 67bb55537e In LapJoint, aggiunti smussi anche se lavorazione con truciolatore 2025-06-19 15:42:07 +02:00
luca.mazzoleni 777179d1b2 Merge branch 'develop' into feature/OutrawBladeHeadCutSplit 2025-06-19 12:08:15 +02:00
luca.mazzoleni 06adbb0b5d Merge branch 'master' into develop 2025-06-19 12:07:46 +02:00
luca.mazzoleni 872a3ec899 update version e log 2025-06-19 12:07:23 +02:00
luca.mazzoleni 5dae07e2aa Merge branch 'hotfix/StepJointNotchMilingLeadInOut' 2025-06-19 12:04:08 +02:00
luca.mazzoleni fc26a8ad4a - in StepJointNotch corretta distanza attacco in/out 2025-06-19 12:03:15 +02:00
luca.mazzoleni ccf88745aa Merge branch 'develop' into feature/DeepDtMortise 2025-06-19 10:59:15 +02:00
luca.mazzoleni 04046787e3 Merge tag '2.7f2' into develop
2.7f2
2025-06-18 12:40:44 +02:00
luca.mazzoleni a12aaf86bc Merge branch 'release/2.7f2' 2025-06-18 12:40:35 +02:00
luca.mazzoleni 70d16909f5 update version e log 2025-06-18 12:40:16 +02:00
luca.mazzoleni b5145d4e99 - in MachiningLib si gestisce sortingCriterion anche per fresatura
- in DtMortise gestita lavorazione a più passate per mortasa profonda
- in DtTenon se profondità elevata si cerca una fresa più lunga
2025-06-17 09:46:18 +02:00
andrea.villa 5007cda21f - In StepJointNotch, se si forza truciolatore, si prende utensile più grande
- Per sovrapposizione in spezzatura LapJooint, corretto caso tipo Tunnel
2025-06-09 17:50:19 +02:00
andrea.villa 76d03160c5 In LapJoint, piccola correzione calcolo sovrapposizione trimesh per smuotatura 2025-06-09 15:35:03 +02:00
andrea.villa 534302f48e In Long2Cut, messaggio feature non completa se utensile non arriva sul fondo 2025-06-09 13:27:10 +02:00
luca.mazzoleni 60d73199e4 Merge tag '2.7f1' into develop
2.7f1
2025-06-03 14:56:29 +02:00
luca.mazzoleni 71a51e56e1 Merge branch 'release/2.7f1' 2025-06-03 14:56:11 +02:00
luca.mazzoleni bf9791ca9c update version e log 2025-06-03 14:56:03 +02:00
andrea.villa 249cb4eea5 Se fresa su aggregato e lavorazione rivolta verso Z-, si accede da lato aperto 2025-06-03 10:53:45 +02:00
andrea.villa 46cda4d472 Modificato angolo limite tenone per lavorazione sottosquadra 2025-05-28 15:02:59 +02:00
Dario Sassi 72b0e7f4a4 DataBeam :
- modifiche per sola macchina Scm-Oikos.
2025-05-27 19:56:51 +02:00
luca.mazzoleni 0e02959467 Merge tag '2.7e2' into develop
2.7e2
2025-05-23 18:30:13 +02:00
luca.mazzoleni b7837fe95c Merge branch 'release/2.7e2' 2025-05-23 18:29:59 +02:00
luca.mazzoleni d66eaf5322 - update version e log 2025-05-23 17:38:25 +02:00
andrea.villa 05ecf76312 In DTMortise, si fa trim quando il percorso è in basso. 2025-05-16 17:10:05 +02:00
andrea.villa 6e3a1ddc7a In FBS ripristinato calcolo vtFaceUse, risolto casi ambigui a 45° con nuovo comando EdgesFaceUse. 2025-05-09 12:31:11 +02:00
andrea.villa df47691da1 In ScarfJoint corretto caso in cui faccia di fondo sia più alta rispetto a faccia verticale centrale 2025-05-09 10:05:04 +02:00
andrea.villa 8a2200e0de Aumentato angolo limite per lavorazioni verso il basso, da 5° a 7° 2025-05-08 14:51:19 +02:00
luca.mazzoleni 0136ccac19 Merge tag '2.7e1' into develop
2.7e1
2025-05-05 16:58:07 +02:00
luca.mazzoleni 7ee683aeb8 Merge branch 'release/2.7e1' 2025-05-05 16:57:56 +02:00
luca.mazzoleni e81d1aef66 update log e version 2025-05-05 16:57:35 +02:00
andrea.villa 5331466c4f In BatchProcess, anche se non è da riprocessare, si setta come nota sul MachGroup il nome del codice CNC da utilizzare 2025-04-30 16:15:21 +02:00
luca.mazzoleni 7a972cccc8 - in LapJoint se tunnel verticale lavorato solo da sopra e l'utensile non arriva, si restituisce warning 2025-04-28 19:07:22 +02:00
andrea.villa 2ed5af9661 In Drill, dopo che l'utensile è stato scelto si verifica compatibilità considerando angolo foro. Se non arriva in fondo, si cerca utensile più lungo. 2025-04-28 15:08:16 +02:00
andrea.villa e25c24a33a Merge branch 'develop' of https://gitlab.steamware.net/egalware-cadcam/lua/DataBeam into develop 2025-04-23 15:21:16 +02:00
andrea.villa aeca298feb In SplitCut, si riduce percorso di taglio solo se il pezzo è effettivamente alto 2025-04-23 15:21:13 +02:00
luca.mazzoleni a09565cfb7 Merge branch 'master' into develop 2025-04-22 11:24:33 +02:00
luca.mazzoleni 862b375ee5 update log e version 2025-04-22 11:24:22 +02:00
luca.mazzoleni a34147ce15 - #CRITICAL# in LapJoint correzione parentesi che causavano la chiamata di LongCut in casi errati 2025-04-22 11:22:13 +02:00
luca.mazzoleni cb3ad1d24c Merge tag '2.7d2' into develop
2.7d2
2025-04-17 12:24:08 +02:00
luca.mazzoleni 06e266226a Merge branch 'release/2.7d2' 2025-04-17 12:24:00 +02:00
luca.mazzoleni 74b40a6ad7 update log e version 2025-04-17 12:23:40 +02:00
andrea.villa ab7971e5f9 - Aggiunto lettura Q03 su scanalatura epr forzare fresa
- In BeamLib, si considerano simili due facce che hanno elevazione oltre l'85%
2025-04-11 13:29:37 +02:00
luca.mazzoleni e188753f49 - in Cut se lungo, una faccia e rivolto sul retro verso l'alto si forzano i cubetti per evitare di rovinare il pezzo successivo
- in Cut, se taglio di coda anticipato, aggiunto messaggio che avvisa del possibile danneggiamento del pezzo successivo
2025-04-10 17:08:02 +02:00
andrea.villa 9b12a74591 In LapJoint, per abilitare lama da sotto non si verifica se esiste testa sotto, ma se è una FAST 2025-04-10 08:49:18 +02:00
andrea.villa e17e8189f7 In LapJoint, funzione SawPlusChain lavorazione di lama da sotto abilitata se la macchina ha solo la testa sopra 2025-04-10 08:29:38 +02:00
luca.mazzoleni a5d4503180 Merge tag '2.7d1' into develop
2.7d1
2025-04-04 12:15:59 +02:00
luca.mazzoleni 41f92e9dd4 Merge branch 'release/2.7d1' 2025-04-04 12:15:52 +02:00
luca.mazzoleni c5a6300d15 update log 2025-04-04 10:39:15 +02:00
andrea.villa bf5c12ec8a In FBS non si utilizza il vtFaceUse perchè in caso di edge a 45° sbaglia a concatenare edge da lavorare. Si è tornati alla gestione vecchia 2025-04-03 16:06:11 +02:00
andrea.villa 777ba74e4d - In FBS errore 'TwoFacesBySaw from bottom impossible' solo se entrambe le facce non sono ok
- In LapJoint, si controlla direzione faccia 1 e larghezza faccia 2 (e reciproci) per capire se si può lavorare con lama testa sotto
2025-04-03 15:28:31 +02:00
luca.mazzoleni 268e578125 - in Cut.Classify correzione 2025-04-03 12:04:28 +02:00
andrea.villa 13f0545ebe In HeadCut e Split, si aggiungono tagli extra orizzontali solo se il materiale da tagliare è meno di un cubetto. Altrimenti ci sarebbe collisione. 2025-04-02 11:01:04 +02:00
luca.mazzoleni 445a76f543 Merge tag '2.7d1' into develop
2.7d1
2025-04-01 09:09:36 +02:00
luca.mazzoleni 4b52653a2e Merge branch 'release/2.7d1' 2025-04-01 09:09:25 +02:00
luca.mazzoleni ced290604a update log e version 2025-04-01 09:09:16 +02:00
andrea.villa 2c68515b93 In HeadCut e Split, per decidere se BigSection, si somma CUT_EXTRA ( prima si utilizzava CUT_EXTRA_MIN) 2025-03-31 15:15:15 +02:00
luca.mazzoleni b26ad523ab Merge branch 'master' into develop 2025-03-24 18:00:43 +01:00
luca.mazzoleni cd346b8536 - in BatchProcessN piccola correzione per pezzi a caduta 2025-03-24 17:58:39 +01:00
luca.mazzoleni 2853731c4c Merge branch 'master' into develop 2025-03-24 16:06:06 +01:00
luca.mazzoleni d31efb1f2a - in BatchProcess (Ts7), in caso di verifica di un pezzo senza modifiche al btl, si riscrive il txt con lo stato precedente (informazioni salvate in nge) 2025-03-24 16:05:12 +01:00
andrea.villa e1702d1263 Corretto calcolo direzione di lavorazione in caso verticale e orizzontale entrambi a false. Se altezza faccia minore di massimo materiale, si fa orizzontale 2025-03-24 14:47:05 +01:00
andrea.villa 236254fed6 In Drill, calcolo AffectedFaces anche su Predrill 2025-03-20 11:59:55 +01:00
luca.mazzoleni 82f20f3c87 - correzione in log 2025-03-18 11:51:31 +01:00
luca.mazzoleni adc75c0504 Merge tag '2.7c1' into develop
2.7c1
2025-03-17 17:47:39 +01:00
luca.mazzoleni 761778b87c Merge branch 'release/2.7c1' 2025-03-17 17:47:29 +01:00
luca.mazzoleni 5fa40fad99 update version e log 2025-03-17 17:47:20 +01:00
luca.mazzoleni 8e608bd623 - in BeamExec aggiunto ritorno stato e messaggi a interfaccia per Double in tutti i casi 2025-03-17 10:15:36 +01:00
andrea.villa 60a1707d43 In Cut, se taglio rivolto verso il basso e non possibile tagliare di fianco, da fare in fase ribaltata 2025-03-13 09:55:09 +01:00
luca.mazzoleni 1848ed85d0 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam into develop 2025-03-12 18:19:12 +01:00
luca.mazzoleni 197673de11 - in BacthProcess (Ts7) si forza ricalcolo ad ogni check o check+generate 2025-03-12 18:19:05 +01:00
andrea.villa 19e1d4e760 - In HeadCut e Split, per decidere se fare doppio taglio verticale, si controlla anche il massimo possibile e non solo il minimo per farlo scaturire.
- In LapJoint si anticipa controllo per decidere se feature di coda
2025-03-10 13:22:30 +01:00
luca.mazzoleni abb1509314 Merge tag '2.7b3' into develop
2.7b3
2025-03-03 09:25:30 +01:00
luca.mazzoleni b9e4d9b01f Merge branch 'release/2.7b3' 2025-03-03 09:25:19 +01:00
luca.mazzoleni fcb541175a - update log e version 2025-03-03 09:24:24 +01:00
andrea.villa 99e0b9967e In LapJoint, se feature interessa la coda e il pezzo è lungo, la lavorazione viene fatta dopo separazioone. Non ha senso farla prima se non ci sono problemi di pinzaggio, meglio farla dopo. 2025-02-25 13:20:24 +01:00
luca.mazzoleni b88caa12ab - in BeamLib GetToolFromMachining aggiunte informazioni testa
- in ProcessDrill modifiche alla gestione lato preferenziale
2025-02-25 11:23:16 +01:00
andrea.villa 40912bb7b7 In FbS, per TURN, se taglio con bilinea che forma un angolo ottuso, invece di fare retrazione (in alcuni casi non completa il taglio) si segue bilinea per il tratto che manca per completare taglio e poi si esce perpendicolarmente. 2025-02-25 08:54:16 +01:00
luca.mazzoleni 7d6903d181 update log 2025-02-24 15:28:22 +01:00
luca.mazzoleni 43cf75d400 - in lavorazione tipo BHSideMIll migliorati allungamenti in caso di feature obliqua 2025-02-24 14:18:15 +01:00
luca.mazzoleni 2fa3ea24a5 - in DiceCut piccola correzione per Turn
- in LapJoint in lavorazione tipo BH permessa U passante non parallela agli assi principali
2025-02-20 09:43:11 +01:00
luca.mazzoleni c82a27ebae - in ProcessDrill, per le forature passanti fatte da un solo lato, eventuale inversione foro in base al lato di lavoro e al lato testa dell'utensile scelto (BD.GetSetupInfo) 2025-02-18 17:44:13 +01:00
luca.mazzoleni a7df54d8d2 - corretto log 2025-02-07 12:13:11 +01:00
luca.mazzoleni e8d11f150e Merge tag '2.7b2' into develop
2.7b2
2025-02-05 15:03:46 +01:00
luca.mazzoleni 6d8bd01266 Merge branch 'release/2.7b2' 2025-02-05 15:03:25 +01:00
luca.mazzoleni 65a256ba7b update log e version 2025-02-05 15:02:57 +01:00
luca.mazzoleni d403f9cfcf - in BeamExec si consentono DrillPocket in doppio solo se foro non passante 2025-02-05 14:59:44 +01:00
luca.mazzoleni 30cc274c2e Merge tag '2.7b1' into develop
2.7b1
2025-02-04 17:55:56 +01:00
luca.mazzoleni 6564bdc74f Merge branch 'release/2.7b1' 2025-02-04 17:55:47 +01:00
luca.mazzoleni 6cdf1583c0 update log e version 2025-02-04 17:55:18 +01:00
luca.mazzoleni 5441ff7b50 - in HeadCut e Split l'utilizzo delle lame grandi (es: 1000 su 1500MAX) è limitato a i pezzi più bassi di 300 mm e più larghi di 300 mm 2025-02-04 17:50:44 +01:00
luca.mazzoleni d03ed02b2c Merge tag '2.7a2' into develop
2.7a2
2025-01-23 10:58:29 +01:00
luca.mazzoleni 8c4000a74c Merge branch 'release/2.7a2' 2025-01-23 10:58:17 +01:00
luca.mazzoleni 4c48085e4f update version e log 2025-01-23 10:57:59 +01:00
luca.mazzoleni 37265932e9 - in BatchProcess piccola correzione 2025-01-23 10:44:28 +01:00
luca.mazzoleni 8f602fc10a - in RidgeLap aggiunta Q05 per usare la fresa (riconduce a LapJoint)
- in ScarfJoint, in caso di taglio dal lato, aggiunto offset CUT_EXTRA che mancava per errore
2025-01-22 17:09:35 +01:00
luca.mazzoleni f7ef38162b Merge branch 'master' into develop 2025-01-21 15:06:55 +01:00
luca.mazzoleni 1bc17e7bb7 - corretta versione in log 2025-01-21 15:06:47 +01:00
luca.mazzoleni 4d545c38ea Merge tag '2.7a1' into develop
2.7a1
2025-01-21 09:13:53 +01:00
luca.mazzoleni 83b9b3858d Merge branch 'release/2.7a1' 2025-01-21 09:13:44 +01:00
luca.mazzoleni 0de82a5fd9 update version 2025-01-21 09:08:11 +01:00
luca.mazzoleni 8dc16e1ed9 - in FreeContour aggiunta Q09 per inversione ultima lavorazione
- in Cut, si taglia dal basso solo se il pezzo piccolo è già staccato dalla barra
- in BatchProcess (Ts7) aggiunta scrittura id progetto e produzione in Btm
2025-01-21 08:54:31 +01:00
andrea.villa 4500f96d6d Aggiunto parametro Q09 per inversione ultimo passaggio su contorno libero 2025-01-17 16:33:28 +01:00
andrea.villa a9921f9b17 Merge commit '8c4f0e15de6c6398b35f7cfbb0524b939d6054da' into develop 2025-01-17 14:56:46 +01:00
andrea.villa 8c4f0e15de In Cut, si taglia dal basso solo se il pezzo piccolo è già staccato dalla barra 2025-01-17 14:53:57 +01:00
luca.mazzoleni 46802be7d8 Merge branch 'master' into develop 2025-01-08 09:17:09 +01:00
Dario Sassi 0a77cc2e12 DataBeam :
- aggiustata la versione a 2.6l2 nel file lua.
2025-01-07 19:00:07 +01:00
luca.mazzoleni 6d07e1638b Merge branch 'master' into develop 2025-01-07 18:30:55 +01:00
luca.mazzoleni 09d3df0fe1 Merge branch 'develop' 2025-01-07 18:30:11 +01:00
luca.mazzoleni 838671d968 corretto nome versione 2025-01-07 18:26:51 +01:00
luca.mazzoleni f286f50855 Merge branch 'master' into develop 2025-01-07 18:03:42 +01:00
luca.mazzoleni ff2dff29ee corretta data versione in log 2025-01-07 18:03:33 +01:00
luca.mazzoleni 28cdaff2d0 Merge tag '2.7a1' into develop
2.7a1
2025-01-07 18:00:57 +01:00
luca.mazzoleni 3c4d299c58 Merge branch 'release/2.7a1' 2025-01-07 18:00:47 +01:00
luca.mazzoleni f388cf47f3 update log e versione 2025-01-07 18:00:08 +01:00
andrea.villa 38b1eba03e Se foro aperto in faccia di coda (LEFT), non si considerano dipendenze 2024-12-30 12:14:44 +01:00
luca.mazzoleni 6caa4fb6b5 - in LapJoint aggiunta Q_SIDE_ROUGH_TOOL=4 per lavorare con fresa evitando tasche aperte testa/coda 2024-12-16 09:52:29 +01:00
luca.mazzoleni c1b781c142 Merge branch 'feature/SpecialBHSideMIllAggregate' into develop 2024-12-13 13:08:05 +01:00
luca.mazzoleni c219a6842b - in LapJoint la Q ForceSideMill ora funziona solo se la feature è aperta sul fronte o sul retro 2024-12-13 12:42:01 +01:00
luca.mazzoleni 677ff492e7 - correzione in LapJoint per SideMillAsBlade 2024-12-12 16:59:41 +01:00
luca.mazzoleni e4ba021482 - in LapJoint abiitata SideMillAsBlade anche da sotto 2024-12-12 09:26:35 +01:00
luca.mazzoleni 24218e8d8c Merge branch 'develop' into feature/SpecialBHSideMIllAggregate 2024-12-11 14:47:32 +01:00
luca.mazzoleni 739311a02b Merge tag '2.6l1' into develop
2.6l1
2024-12-11 13:10:53 +01:00
luca.mazzoleni 61ef5dd9ed Merge branch 'release/2.6l1' 2024-12-11 13:10:41 +01:00
luca.mazzoleni aed21e027c update log e version 2024-12-11 13:10:31 +01:00
luca.mazzoleni 1c64f500b3 - in BeamLib correzione in GetToolFromMachining 2024-12-11 11:56:57 +01:00
luca.mazzoleni 542c421ac8 - in FacesBySaw aggiuta, tramite nota lavorazione PATHINVERT, la possibilità di invertire il senso di percorrenza calcolato (e quindi lavorare in discordanza)
- in LapJoint modifiche per utilizzare aggregato speciale per fresa a disco
2024-12-11 11:26:37 +01:00
luca.mazzoleni 95e6f49e4f Merge remote-tracking branch 'origin/develop' into feature/SpecialBHSideMIllAggregate 2024-12-10 09:49:22 +01:00
luca.mazzoleni 4c19cc49e2 - in LapJoint modifiche per gestione fresa a disco su aggregato
- in BeamLib aggiunta funzione GetToolFromMachining estrapolata da SawPlusChain
2024-12-10 09:49:10 +01:00
andrea.villa 74681a1f1d In Tenon, se tenone chiuso aggiungo una piccola componente perpendicolare per approccio in miling 2024-12-10 09:27:50 +01:00
andrea.villa d7b88e738f Merge branch 'feature/Blade1000' into develop 2024-12-10 09:27:03 +01:00
andrea.villa d4c9843597 In LapJoint, la SawPlusChain è estesa alla topologia "Groove-Through-RightAngles-NotParallel-3" 2024-12-04 08:25:57 +01:00
luca.mazzoleni 077cb2c586 - in HeadCut e Split si sceglie sempre la lama primaria più grande
- in LapJoint -> SawPlusChain si sceglie la lama in base alla profondità della tasca
2024-12-02 17:51:59 +01:00
luca.mazzoleni 8e9de6026e Merge tag '2.6k2' into develop
2.6k2
2024-11-28 09:51:19 +01:00
luca.mazzoleni b382560cfa Merge branch 'release/2.6k2' 2024-11-28 09:51:03 +01:00
luca.mazzoleni 339c6acb37 update log e version 2024-11-28 09:50:47 +01:00
andrea.villa 570a65c7a1 In FacesBySaw ridotto a 15° limite per accorciare geometria bilinea 2024-11-21 12:12:09 +01:00
andrea.villa e18a816647 In LapJoint, se forma a U si ricalcola dimensione della tasca 2024-11-21 11:24:46 +01:00
andrea.villa d578194d43 In DiceCut migliorato controllo rimozione del primo cubetto molto piccolo 2024-11-20 11:50:10 +01:00
luca.mazzoleni e0f20d19f0 - in FacesBySaw migliorati i casi in cui si inverte l'SCC per facilitare la caduta del legno 2024-11-20 10:03:16 +01:00
luca.mazzoleni cff4ef0d47 Merge tag '2.6k1' into develop
2.6k1
2024-11-15 16:03:39 +01:00
luca.mazzoleni d9fb464066 Merge branch 'release/2.6k1' 2024-11-15 16:03:29 +01:00
luca.mazzoleni 9d6a5fb496 update version e log 2024-11-15 15:58:29 +01:00
luca.mazzoleni c3fab404a5 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam into develop 2024-11-15 15:45:44 +01:00
luca.mazzoleni fa139c84f3 - piccola correzione in ProcessDovetail 2024-11-15 15:45:40 +01:00
andrea.villa ae6853cd3f In Drill, se foro doppio si aumenta lo step per evitare collisione tra le punte durante lavorazione. 2024-11-12 09:40:24 +01:00
luca.mazzoleni c0618cd628 Merge branch 'master' into develop 2024-11-06 10:27:53 +01:00
luca.mazzoleni 524b6a470c update log e version 2024-11-06 10:26:52 +01:00
luca.mazzoleni cd4aa8ee11 -in Drill non si riclassificano come Down i fori fatti in doppio (risolve problemi di chariot collision su macchine tipo PF) 2024-11-06 10:22:01 +01:00
luca.mazzoleni 242f5f4516 -in Drill non si riclassificano come Down i fori fatti in doppio (risolve problemi di chariot collision su macchine tipo PF) 2024-11-05 14:29:23 +01:00
luca.mazzoleni e6a3e0c519 - in Cut correzione a utilizzo Q07 (forzatura fresa)
- in LapJoint se arriva da Cut si applica sempre svuotatura
- in LapJoint se birdsmouth a L si applica svuotatura anche in caso di elevazione non raggiunta (non si tenta la fresatura che fallirebbe non trovando facce sul lato lungo)
2024-11-05 11:17:39 +01:00
luca.mazzoleni 640c8af05f - in ProcessCut lunghezza minima feature per considerare taglio lungo portata a 400 mm per macchine tipo Fast 2024-10-29 11:56:40 +01:00
luca.mazzoleni 48ceceb8e0 Merge branch 'master' into develop 2024-10-29 10:05:46 +01:00
luca.mazzoleni 5165463dbd update log 2024-10-29 10:05:36 +01:00
luca.mazzoleni 9e1d424bc7 Merge branch 'master' into develop 2024-10-29 09:28:04 +01:00
luca.mazzoleni 15c96303de Merge branch 'develop' 2024-10-29 09:25:58 +01:00
luca.mazzoleni 3211f21869 Merge branch 'master' into develop 2024-10-18 12:12:52 +02:00
luca.mazzoleni 1f4fe3597b update version e log 2024-10-18 12:10:37 +02:00
luca.mazzoleni 0749e56b9f Merge tag 'DrillTenonTail' into develop
hotfix
2024-10-18 12:08:03 +02:00
luca.mazzoleni 7424bdc147 Merge branch 'hotfix/DrillTenonTail' 2024-10-18 12:07:46 +02:00
luca.mazzoleni a623072e89 - in BeamExec -> dipendenza feature rimosso foro di coda se tenone è di coda 2024-10-18 12:07:28 +02:00
luca.mazzoleni 7f15b08b20 Merge branch 'master' into develop 2024-10-17 12:26:09 +02:00
luca.mazzoleni 82d4fadaaa update log e versione 2024-10-17 12:25:43 +02:00
luca.mazzoleni d9f4d0584a Merge tag 'DrillSideAndDown' into develop
fix
2024-10-17 12:21:52 +02:00
luca.mazzoleni 2e5b4c9976 Merge branch 'hotfix/DrillSideAndDown' 2024-10-17 12:21:37 +02:00
luca.mazzoleni 511af04c8b - in Drill con precedenza corretto caso in cui il foro veniva ripetuto in rotazioni diverse 2024-10-17 12:20:39 +02:00
luca.mazzoleni 8b1d38c451 modifiche a FacesBySaw del commit precedente estese anche a Fast 2024-10-17 08:57:52 +02:00
andrea.villa abe3465514 - In FacesBySaw, se taglio orizzontale (con componente Z del vtTg a zero) si orienta SCC aggregato lama verso l'interno. In modo che quando si stacca il pezzo non cada sopra l'aggregato.
- In LapJoint, se si utilizza fresa per BlockHaus, si considera sempre di coda
2024-10-11 12:38:28 +02:00
luca.mazzoleni fc753c47be Merge branch 'master' into develop 2024-10-10 14:31:22 +02:00
luca.mazzoleni ad8a7bf73f Merge branch 'develop' 2024-10-10 14:06:22 +02:00
luca.mazzoleni 4a21a4be36 - in ProcessCut Classify corretta lettura Q per passare a LapJoint 2024-10-10 14:05:52 +02:00
andrea.villa aafe565474 In ScarfJoint corretto problema introdotto con modifica ottimizzazione richiesta per Ticket#1992 2024-10-10 12:40:27 +02:00
luca.mazzoleni b6ef0a8d7a Merge tag '2.6j1' into develop
r
2024-10-10 10:51:49 +02:00
luca.mazzoleni 779f2105ba Merge branch 'release/2.6j1' 2024-10-10 10:51:35 +02:00
luca.mazzoleni c2b9c4b19f update log e version 2024-10-10 10:50:40 +02:00
luca.mazzoleni 8eadb81e91 Merge branch 'master' into develop 2024-10-08 12:11:09 +02:00
luca.mazzoleni 2bac228fe9 update log e version 2024-10-08 12:10:57 +02:00
luca.mazzoleni c312e72fd2 Merge tag 'RidgeLapClamping' into develop
r
2024-10-08 12:08:18 +02:00
luca.mazzoleni fd4683e4fa Merge branch 'hotfix/RidgeLapClamping' 2024-10-08 12:08:09 +02:00
luca.mazzoleni 70661aa3d2 In RidgeLap, ingombro testa coda considera inclinazione feature per pinzaggio 2024-10-08 12:08:00 +02:00
andrea.villa a82486e9fb In RidgeLap, ingombro testa coda considera inclinazione feature per pinzaggio 2024-10-07 16:11:48 +02:00
luca.mazzoleni cd4a7d3b91 - in LapJoint miglioramenti vari alla lavorazione delle facce oblique 2024-10-03 17:28:27 +02:00
luca.mazzoleni 3764c58394 - in ProcessCut aggiunta Q07 per forzare uso fresa (si passa a LapJoint)
- in LapJoint gestita feature in arrivo da Cut e piccole correzioni
2024-10-01 15:57:17 +02:00
luca.mazzoleni e49b505fbe - in ordinamento tenoni sempre fatti dopo eventuale foro secante
- in FreeContour modificati criteri pinzaggio
- in FreeContour aggiunte Q per forzare come pinzabile l'area della feature e per ignorare possibili problemi di lettura laser (taglio di testa sotto non eseguito)
2024-10-01 12:30:07 +02:00
luca.mazzoleni 72c1eb81f3 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam into develop 2024-09-27 16:06:16 +02:00
luca.mazzoleni 037ac0d030 - se tenone di coda è attraversato da foro allora anche il foro deve essere di coda
- piccola correzione e TwoFacesBySaw
2024-09-27 16:06:12 +02:00
andrea.villa f1b64b1496 Se la macchina è tipo BlockHaus, i LapJpint vengono fatti prima del taglio di separazione 2024-09-27 15:44:26 +02:00
luca.mazzoleni 69ab03f3ec - in LongDoubleCut corretto typo nome variabile 2024-09-26 09:57:08 +02:00
luca.mazzoleni 3b86cd9633 Merge tag '2.6i2' into develop
release
2024-09-13 17:03:38 +02:00
luca.mazzoleni 56fc63d5ff Merge branch 'release/2.6i2' 2024-09-13 17:02:30 +02:00
luca.mazzoleni f27eeb9c3d update log e versione 2024-09-13 17:02:16 +02:00
luca.mazzoleni 5d603a57db - in HeadCut, Split modifiche ai tagli aggiuntivi orizzontali e verticali; disattivati attacchi tangenziali per tagli aggiuntivi verticali in PF1250 per evitare rischi di collisione con testa sotto che cambia utensile in tempo mascherato 2024-09-13 16:57:57 +02:00
luca.mazzoleni 6f45e63f11 Merge branch 'CheckGenerateFix' into develop 2024-09-13 12:38:07 +02:00
luca.mazzoleni eb8c78b7b1 Merge branch 'develop' into CheckGenerateFix 2024-09-13 10:03:05 +02:00
andrea.villa 4eefdf0842 In FacesBySaw per settare il FaceUse si usa il versore nelle UserNotes 2024-09-12 09:22:28 +02:00
luca.mazzoleni b536c30a88 Merge branch 'develop' into CheckGenerateFix 2024-09-11 13:51:11 +02:00
andrea.villa 9a0ea2e431 Merge branch 'develop' of https://gitlab.steamware.net/egalware-cadcam/lua/DataBeam into develop 2024-09-11 08:13:26 +02:00
andrea.villa d61a47755c - ProcessDrill In GetData corretta gestione modifica diametro foro 2024-09-11 08:13:23 +02:00
luca.mazzoleni c6b8b74f26 - in BatchProcess riportate modifiche alla BatchProcessNew: in caso sia richiesta generazione senza check, verifico prima che il file log specifico non contenga errori: se sì, forzo il check 2024-09-10 18:27:12 +02:00
luca.mazzoleni 53cd49bed1 Merge branch 'develop' into CheckGenerateFix 2024-09-10 18:18:17 +02:00
luca.mazzoleni 2f4a77c73e - in FacesBySaw si invertono gli accorciamenti solo se l'inversione del percorso non è forzata dall'esterno; adeguati HeadCut e Split 2024-09-10 18:12:47 +02:00
luca.mazzoleni 64a3f75b31 Merge branch 'develop' into CheckGenerateFix 2024-09-10 14:13:31 +02:00
luca.mazzoleni 000358b6a6 Merge remote-tracking branch 'origin/master' into develop 2024-09-10 14:12:58 +02:00
Emmanuele Sassi 6c16e7b70a - correzione in lettura array per cambio dll di lettura 2024-09-10 09:02:02 +02:00
luca.mazzoleni 1ae32451e5 Merge branch 'develop' into CheckGenerateFix 2024-09-09 14:43:55 +02:00
luca.mazzoleni 4c68955ba2 Merge tag '2.6i1' into develop
release
2024-09-09 14:42:36 +02:00
luca.mazzoleni dd80929ae1 Merge branch 'release/2.6i1' 2024-09-09 14:42:27 +02:00
luca.mazzoleni af80170976 update log e versione 2024-09-09 14:27:25 +02:00
luca.mazzoleni bf2742c6c7 - in BatchProcessNew, in caso sia richiesta generazione senza check, verifico prima che il file log specifico non contenga errori: se sì, forzo il check 2024-09-09 14:04:46 +02:00
luca.mazzoleni ec09b3f70c in FacesBySaw -> MakeOne correzione a scelta inversione / lato di lavoro 2024-09-06 09:11:14 +02:00
luca.mazzoleni 952d40cb2b Merge branch 'ZeroPreCutForHeadCutSplit' into develop 2024-09-05 15:57:23 +02:00
luca.mazzoleni 0a767d1afd - in Headcut e Split aggiunta gestione parametro MIN_HEIGHT_ADDED_CUTS da BeamData per scegliere l'altezza minima per cui devono essere aggiunti i tagli orizzontali supplementari 2024-09-05 12:12:29 +02:00
luca.mazzoleni d5be638099 Merge branch 'develop' into ZeroPreCutForHeadCutSplit 2024-09-04 18:28:17 +02:00
luca.mazzoleni b6c5514f9e - in HeadCut e Split correzioni a pretaglio a zero 2024-09-04 18:27:39 +02:00
luca.mazzoleni 4fd18d377f - in split modifiche per precut 2024-09-04 17:52:37 +02:00
andrea.villa 9dff37f1f4 Gestione dipendenza foro-tasca in caso di fase con pezzo ribaltato 2024-09-04 15:54:13 +02:00
luca.mazzoleni b71ad963f1 Merge branch 'develop' into ZeroPreCutForHeadCutSplit 2024-09-04 09:17:07 +02:00
andrea.villa 3aefca4613 - In Mark, gestita la lavorazione del testo 2024-09-04 09:16:24 +02:00
luca.mazzoleni cc5117aa11 - in Split refactoring e implemento pretaglio a zero
- in HeadCut piccole migliorie in pretaglio a zero
2024-09-03 18:02:18 +02:00
andrea.villa c5a8b852d9 - in LapJpint, in MakeLongMoreFaces si aggiunge faccia di fondo anche per topologia Groove passante a 3 facce 2024-09-03 15:11:53 +02:00
andrea.villa 69514074a9 - In ScarfJoint, in ApplyDiceCut, tagli paralleli fatti con unico passaggio di fianco 2024-09-03 12:45:28 +02:00
luca.mazzoleni 6ecd613f12 - in HeadCut corrette Width e Height invertite 2024-09-02 16:54:47 +02:00
luca.mazzoleni 6e4dee29af modifiche a HeadCut per introduzione tagli a zero (PreCut) per evitare problemi con pezzi non lunghi quanto ci si aspetta 2024-09-02 10:29:08 +02:00
luca.mazzoleni da7ebc6b97 - refactoring di ProcessHeadCut 2024-08-29 18:17:08 +02:00
luca.mazzoleni 4685b6bde6 - se lapjoint attraversata da L055, la lapjoint viene fatta prima 2024-08-29 10:47:51 +02:00
luca.mazzoleni 3a063bd2cf Merge branch 'master' into develop 2024-08-26 18:10:47 +02:00
luca.mazzoleni 710a1fe070 - HotFix: in FacesBySaw -> MakeOne corretto SCC in caso di soluzione alternativa 2024-08-26 18:10:20 +02:00
luca.mazzoleni d818492d67 Merge tag '2.6h2' into develop
release
2024-08-26 15:43:59 +02:00
luca.mazzoleni e55e33c40a Merge branch 'release/2.6h2' 2024-08-26 15:43:44 +02:00
luca.mazzoleni 8cadb25261 update log e version 2024-08-26 15:43:30 +02:00
luca.mazzoleni 2622b58cad Merge branch 'OneFaceCutAlternativeDirection' into develop 2024-08-26 15:31:03 +02:00
luca.mazzoleni b5be932955 - in FacesBySaw -> MakeOne aggiunta la possibilità di passare una direzione di lavoro alternativa per poter rispettare contemporaneamente la direzione di lavoro concorde e la direzione di taglio 2024-08-26 15:17:31 +02:00
luca.mazzoleni 44ac2f8c2a Merge branch 'test' into develop 2024-08-22 16:37:55 +02:00
luca.mazzoleni 0b928e987f - in LapJoint -> svuotatura, correzione all'utilizzo dell'elevazione custom 2024-08-22 15:49:25 +02:00
luca.mazzoleni c213c3f059 - in LapJoint -> svuotatura, se l'utente ha definito un'elevazione custom si lavora sempre la faccia standard 2024-08-22 15:23:03 +02:00
luca.mazzoleni 330698b6aa in tunnel LapJoint -> tunnel lo smusso funziona anche se è forzata la sega a catena 2024-08-22 12:01:43 +02:00
luca.mazzoleni eb1ef693c4 Merge branch 'test' into develop 2024-08-22 11:25:02 +02:00
luca.mazzoleni 862751c84a - in FacesBySaw attacchi tangenziali solo da un lato limitati a facce con Z negative
- in BatchProcess e New si verifica l'abilitazione della generazione con EgtVerifyKeyOption
- in Version, MIN_EXE modificato per richiesta compatibilità con EgtVerifyKeyOption
2024-08-21 13:05:31 +02:00
luca.mazzoleni e5a30c38d3 Merge tag '2.6h1' into develop
r
2024-08-20 17:45:26 +02:00
luca.mazzoleni e83d8db1cc Merge branch 'release/2.6h1' 2024-08-20 17:45:14 +02:00
luca.mazzoleni 9de88ffe84 update log e version 2024-08-20 17:45:00 +02:00
luca.mazzoleni ffaf33c62e in BatchProcessNew se flag apposito in Cam5 la generazione è disabilitata 2024-08-20 17:34:46 +02:00
luca.mazzoleni 8c0389582b Merge branch 'ImproveDicingParallelTangentLead' into develop 2024-08-20 17:05:20 +02:00
luca.mazzoleni ebe3d79c11 - in FacesBySaw attacchi tangenziali solo da un lato limitati a facce con basse componenti Y
- in split e headcut i tagli addizionali orizzontali o verticali, se la macchina ha i ruli, si fanno sempre con attacco tangenziale
2024-08-20 17:02:37 +02:00
luca.mazzoleni f8c40739da - in attacchi tangenziali solo da un lato alcune correzioni
- aggiunta la raccolta delle Affected Faces a tutti i casi in cui si crea una feature a posteriori (non presente nel btl)
2024-08-19 17:37:16 +02:00
luca.mazzoleni fa5aac926e - attacchi tangenziali solo da un lato lasciati solo per se FacesBySaw è chiamata da ProcessCut 2024-08-09 12:02:27 +02:00
luca.mazzoleni 749cd1e2bb - in FacesBySaw limiti alle normali se attacco tangenziale dallo stesso lato 2024-08-09 12:00:20 +02:00
luca.mazzoleni 587aaaafce - in FacesBySaw->MakeOne, se attacco tangenziale e cubetti paralleli, si attacca e stacca sempre dallo stesso lato
- modificate di conseguenza funzioni significative che generano questi tipi di taglio
2024-08-08 15:20:51 +02:00
luca.mazzoleni 2cfa7caba7 Merge branch 'ImproveChamferLapJoint' into develop 2024-08-07 17:46:16 +02:00
luca.mazzoleni fc0fba5bd3 - in FacesBySaw revert delle modifiche precedenti per problemi di chiusura rulli 2024-08-07 17:45:38 +02:00
luca.mazzoleni 94159f88f3 - in FacesBySaw.MakeOne se si ha outstroke si tenta attacco alternativo 2024-08-07 16:11:38 +02:00
luca.mazzoleni 4961d2d528 - in LapJoint gestito smusso nel caso Groove-Blind-RightAngles-Parallel-4 2024-08-06 15:25:37 +02:00
luca.mazzoleni 7b22f5cc47 Merge remote-tracking branch 'origin/develop' into develop 2024-08-06 15:19:50 +02:00
andrea.villa 5047d5b652 In SimpleSarf, se assimilabile ad un taglio (1 faccia) si considerare area non pinzabile testa/coda 2024-08-05 09:24:14 +02:00
luca.mazzoleni 7f9b880ff7 Merge branch 'master' into develop 2024-07-19 18:06:44 +02:00
luca.mazzoleni 7e457a22b0 update log e versione 2024-07-19 18:06:32 +02:00
luca.mazzoleni 3c080e2b1a in BatchProcess e BatchProcessNew bToRecalc forzato se flag 3 o 4 2024-07-19 18:04:16 +02:00
luca.mazzoleni 9d3edbfb54 - in BatchProcessNew bToRecalc forzato se flasg 3 o 4
- in ProcessLapJoint si evita di tentare di lavorare con sega a catena da sotto
2024-07-19 16:08:18 +02:00
luca.mazzoleni adf465c5e2 -in SawPlusChain non non si applicano lavorazioni con lama da sotto (lama da sotto al momento non gestita)
-in SawPlusChain ora se una lavorazione non è applicabile si prosegue con le altre invece di uscire
2024-07-18 18:41:09 +02:00
luca.mazzoleni 23f695fd56 Merge branch 'master' into develop 2024-07-18 16:03:36 +02:00
luca.mazzoleni 52f347def1 update log e version 2024-07-17 16:10:37 +02:00
luca.mazzoleni 028688b88a - in SawPlusChain con tunnel passante fatto da un solo lato, se apply della sega a catena fallisce per finecorsa, si riapplica dal lato opposto 2024-07-17 16:06:26 +02:00
luca.mazzoleni cde5b137ae update log e versione per 2.6g3 2024-07-17 15:24:10 +02:00
luca.mazzoleni d0cf5887d3 -in LongCut invertito senso di rotazione truciolatore (ora è in discordanza) 2024-07-17 12:28:21 +02:00
luca.mazzoleni afc4c6aaff - corretto problema in LongDoubleCut in cui si sbagliava la riduzione di affondamento con lama da sotto
- in Lapjoint aggiunta Q_FORCE_CHAINSAW per forzare sega a catena anche in casi in cui ci passerebbe la fresa
2024-07-17 11:46:07 +02:00
luca.mazzoleni caa1875309 Merge branch 'master' into develop 2024-07-12 12:53:14 +02:00
luca.mazzoleni 2e2c2188ce - gestite lavorazioni singole da fare dopo separazione, tramite restituzione di AddedIds dalle Make
- al momento implementato per caso specifico di LongDoubleCut (e Lapjoint riconducibile a LongDoubleCut)
2024-07-12 12:52:53 +02:00
Dario Sassi 0acd75bece DataBeam :
- inserito controllo massimo numero di facce (20) per eseguire GetFacetsInfo.
2024-07-09 18:18:56 +02:00
Dario Sassi db691cefe4 Merge commit 'd0ecd175c284b108acb1b4290cf5616b61d121c8' 2024-07-09 17:52:36 +02:00
luca.mazzoleni d0ecd175c2 Merge branch 'master' into develop 2024-07-08 15:52:25 +02:00
luca.mazzoleni 7e6d4189ef - corretto typo in nome variabile 2024-07-08 15:52:05 +02:00
Dario Sassi abbc200504 Beam :
- anche nel taglio a cubetti se cè' si chiama GetNzLimDownUp di macchina per decidere limite orientamento lama verso il basso.
2024-07-05 18:32:55 +02:00
Dario Sassi 9e4597b739 Beam :
- aggiunta possibilità di funzione GetNzLimDownUp specifica per ogni macchina.
2024-07-05 11:13:08 +02:00
luca.mazzoleni d84d146701 Merge branch 'master' into develop 2024-07-04 15:51:41 +02:00
luca.mazzoleni 00ff8818da Merge branch 'develop' 2024-07-04 15:51:00 +02:00
luca.mazzoleni d5c582f890 update version e log 2024-07-04 15:50:42 +02:00
luca.mazzoleni bc8b0490b7 Merge tag '2.6g2' into develop
r
2024-07-04 15:48:47 +02:00
luca.mazzoleni 5aad9dcbf2 Merge branch 'release/2.6g2' 2024-07-04 15:46:42 +02:00
andrea.villa 8a582f512f In IsTailFeature controllo per spostare lapjoint dopo taglio di separazione per lavorazioni tipo BH 2024-07-04 14:42:23 +02:00
luca.mazzoleni 1fde2e5fec Merge tag '2.6g1' into develop
r
2024-07-01 11:49:53 +02:00
luca.mazzoleni 7a89501cc9 Merge branch 'release/2.6g1' 2024-07-01 11:49:29 +02:00
luca.mazzoleni 89acdcc8f8 update log e version 2024-07-01 11:49:14 +02:00
andrea.villa f7c082e5b1 In StepJointNotch, MakeFourFaces aggiunta copia del parametro PartId sulla nuova Proc 2024-06-28 13:13:22 +02:00
andrea.villa 938c46b9d8 In LapJoint, in VerifySideMillAsSaw modificato criterio ricerca utensile in base a normale della faccia 2024-06-28 12:21:53 +02:00
luca.mazzoleni 917bf5ec4b - in MachiningLib miglioramenti a scelta testa ottimizzata
- in ProcessDtTenon correzione in scelta testa
- in MakeAntiSplintBySaw se non si trova adiacenza tra le facce si restituisce errore
2024-06-26 14:13:37 +02:00
luca.mazzoleni 27d4ab3309 - in LongDoubleCut gestita correttamente SCC per lama 2024-06-20 09:59:36 +02:00
luca.mazzoleni 0ece2d91f4 Merge tag '2.6f3' into develop
s
2024-06-19 16:03:50 +02:00
luca.mazzoleni e08b53d5cf Merge branch 'release/2.6f3' 2024-06-19 16:03:34 +02:00
luca.mazzoleni a330b2fd7f update log e versione 2024-06-19 16:03:26 +02:00
luca.mazzoleni acdd4e10fb - in StepJointNotch abilitati correttamente smussi con testa da sotto
- in Lapjoint lunghe che guardano il top, se sufficientemente lunghe, si blocca l'asse C per non sollecitare inutilmente l'asse B
2024-06-19 15:58:31 +02:00
luca.mazzoleni ee6afb65c1 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam into develop 2024-06-18 12:47:55 +02:00
luca.mazzoleni ea9db1631b in FacesBySaw -> MakeTwo si accettano facce con qualunque orientazione a patto che siano in testa o in coda e abbastanza piccole 2024-06-18 12:47:51 +02:00
andrea.villa 6513e75408 - Corretto accorciamento start/end in caso di inversione percorso
- In MakeByMillAsSaw si cerca di orientare il motore verso il lato più vicino
2024-06-18 12:09:01 +02:00
luca.mazzoleni 0e7d878f10 Merge tag '2.6f2' into develop
release
2024-06-17 12:06:47 +02:00
luca.mazzoleni 8bd0e5d145 Merge branch 'release/2.6f2' 2024-06-17 12:06:20 +02:00
luca.mazzoleni d8ecfc8463 correzione a tagli a cubetti (ripristinata versione pre 2.6f1) 2024-06-17 12:06:04 +02:00
andrea.villa e52a9c66b6 Ripristinata vecchia gestione tagli a cubetti per Ticket#1723 2024-06-06 16:25:15 +02:00
luca.mazzoleni f3785f8644 Merge tag '2.6f1' into develop
release#
2024-06-06 12:31:35 +02:00
luca.mazzoleni 350aaabbbe Merge branch 'release/2.6f1' 2024-06-06 12:31:24 +02:00
luca.mazzoleni 4eb3b38dd4 update log e version 2024-06-06 12:31:02 +02:00
luca.mazzoleni e9534b4eee correzioni a ottimizzazione teste 2024-06-06 11:31:40 +02:00
luca.mazzoleni da061a05e5 Merge branch 'feature/RidgeLapAndLapJointToLongcutModify' into develop 2024-06-05 16:04:43 +02:00
luca.mazzoleni ba432f5029 - piccola correzione a LapJoint 2024-06-05 11:01:47 +02:00
luca.mazzoleni 812397a047 - In LapJoint -> MakePocket abilitata Q per forzare massima elevazione 2024-06-05 09:33:52 +02:00
luca.mazzoleni cbb42ec088 - in BeamLib funzione IsCutNeeded per capire se il taglio viene sostituito da un headcut o split
- in RidgeLap abilitato Q04 come LapJoint, se riconducibile a 2 facce
- GetFacetsInfo richiamata ogni volta che c'è uno swap di facce
- In LapJoint -> MakePocket abilitata Q per forzare massima elevazione
2024-06-05 09:31:46 +02:00
andrea.villa 0c802464e1 In DiceCut.GetOrtoCutCenter se faccia piccola e lunga, tolto limite Z negativa per calcolare cubetti solo se esiste testa sotto. Altrimenti cubetti per forza. 2024-06-03 15:25:18 +02:00
luca.mazzoleni 498c65b006 in FacesBySaw corretto SCC in caso di asse bloccato parallelo 2024-06-03 12:55:50 +02:00
andrea.villa d81a0e8fbd In DiceCut.GetOrtoCutCenter se faccia piccola e lunga, tolto limite Z negativa per calcolare cubetti. 2024-05-30 15:32:47 +02:00
luca.mazzoleni 47fde315a3 Merge tag '2.6e5' into develop
release
2024-05-27 15:34:51 +02:00
luca.mazzoleni 3ac61219c9 Merge branch 'release/2.6e5' 2024-05-27 15:34:38 +02:00
luca.mazzoleni bad0018381 update log e version 2024-05-27 15:34:05 +02:00
luca.mazzoleni 48261c36d8 - in LapJoint - svuotature massimo diametro riportato a 3 volte la dimensione minima tasca perchè con certe tasche dà problemi di calcolo offset 2024-05-23 17:53:40 +02:00
luca.mazzoleni 4f9093b1d2 - in LapJoint corretto typo parentesi e modificato diametro massimo per svuotature 2024-05-23 15:46:58 +02:00
luca.mazzoleni 52830876e9 Merge tag '2.6e4' into develop
release
2024-05-20 11:01:00 +02:00
luca.mazzoleni 4513833fb3 Merge branch 'release/2.6e4' 2024-05-20 11:00:46 +02:00
luca.mazzoleni 26cc812ed1 - update log e commenti 2024-05-20 11:00:23 +02:00
luca.mazzoleni cc3ff75ea2 - modifica commento 2024-05-20 10:57:21 +02:00
luca.mazzoleni b150c75e96 - in MachiningLib -> FindMachining si considera ottimizzazione teste solo per macchine tipo PF e non più per macchine tipo PF1250
- in SawPlusChain varie migliorie
2024-05-15 17:08:50 +02:00
luca.mazzoleni cc3b0da9e5 - in SawPlusChain le lavorazioni di sega a catena aggiuntive (side) si fermano in mezzeria se tasca passante
- in SawPlusChain il tunnel con sega a catena viene fatto da un solo lato se possibile
2024-05-14 19:00:26 +02:00
luca.mazzoleni 6c8e3017d0 Merge tag '2.6e3' into develop
release
2024-05-14 13:14:45 +02:00
luca.mazzoleni 8613072ea2 Merge branch 'release/2.6e3' 2024-05-14 13:14:36 +02:00
luca.mazzoleni a89ad10f0b update log versione 2024-05-14 13:14:23 +02:00
luca.mazzoleni 91e0214243 Merge branch 'feature/SawPlusChainsawImprove' into develop 2024-05-14 13:08:33 +02:00
luca.mazzoleni f01790e725 Merge branch 'develop' into feature/SawPlusChainsawImprove 2024-05-14 13:08:18 +02:00
luca.mazzoleni 648fa1d9bf - in SawPlusChain si arriva al massimo materiale - 1 2024-05-14 13:07:37 +02:00
luca.mazzoleni 33be9ccaf0 in SawPlusChain:
- implementato tunnel con lama e con sega a catena
- modificata calcolo parametri mortising per gestire lati con elevazione negativa
2024-05-14 12:43:29 +02:00
luca.mazzoleni 1b6c1721c5 -in SawPlusChain implementato tunnel, per ora funzionante solo per lama 2024-05-13 18:02:54 +02:00
luca.mazzoleni d6c08628fb - in SawPlusChain corretto MaxElev sega a catena 2024-05-10 18:25:46 +02:00
luca.mazzoleni ce68e29112 in SawPlusChain modifiche per contemplare lavorazioni con lama dei lati aperti 2024-05-10 16:04:19 +02:00
andrea.villa e936f90086 Cut : in MakeFromTop ricalcolo direzione di lavorazione su facce a cubetti 2024-05-10 14:22:28 +02:00
luca.mazzoleni 6c62ec1fe4 Merge branch 'develop' into feature/SawPlusChainsawImprove 2024-05-10 09:42:26 +02:00
luca.mazzoleni 481cebb207 Merge tag '2.6e2' into develop
release
2024-05-10 09:34:40 +02:00
luca.mazzoleni 126e3f6f92 Merge branch 'release/2.6e2' 2024-05-10 09:34:26 +02:00
luca.mazzoleni 21349b690b update log e version 2024-05-10 09:34:07 +02:00
luca.mazzoleni 93f9af85e7 in SawPlusChain:
- modifiche per contemplare funzione EgtSurfTmGetFacetOutlineInfo
- migliorie alle funzioni di calcolo parametri lavorazione
- ciclo step orizzontali lama spostato in funzione apposita ApplyAllSteps
2024-05-10 09:20:11 +02:00
andrea.villa 366a93dedf LongCut : se non trova fresa per pulizia, da messaggio di warning anziché di errore 2024-05-09 10:16:50 +02:00
andrea.villa 3e83035483 LongCut : allungamento percorso ingresso per evitare collisioni durante approccio pezzo quando si setta OutRaw 2024-05-09 08:13:14 +02:00
luca.mazzoleni efb805cf98 in SawPlusChain:
- Chainsawing rinominata Mortising
- GetVerticalSteps e GetHorizontalSteps sostituiti da funzione unica GetMachiningSteps in BeamLib
- variabili specifiche della strategia ora fanno parte direttamente della tabella SawPlusChain
- alcune correzioni
2024-05-08 12:58:48 +02:00
luca.mazzoleni 1572648a7e - modifiche parziali a SawPlusChain per implemento funzione Egt che fornisce informazioni rigurado ai lati 2024-05-07 18:59:30 +02:00
luca.mazzoleni 3dea3d9be2 Merge branch 'develop' into feature/SawPlusChainsawImprove 2024-05-06 11:42:33 +02:00
luca.mazzoleni 0af620ba76 - in FeatureTopology aggiunta proprietà IsTrough = true anche a Cut 2024-05-06 11:42:22 +02:00
luca.mazzoleni 1fc7aeba75 Merge branch 'develop' into feature/SawPlusChainsawImprove 2024-05-03 14:43:04 +02:00
luca.mazzoleni 6711a2c166 Merge tag '2.6e1' into develop
release
2024-05-03 12:28:11 +02:00
luca.mazzoleni 6a4a53ccd6 Merge branch 'release/2.6e1' 2024-05-03 12:28:01 +02:00
luca.mazzoleni acdf228d52 update log e versione 2024-05-03 12:27:53 +02:00
luca.mazzoleni 769c73765d - in lapJoint -> SawPlusChain piccole modifiche
- in mortise -> AddCleanCornersMachining resa locale variabile erroneamente dichiarata globale
2024-05-03 12:21:41 +02:00
andrea.villa ec48260d73 In LapJoint : in IsTailFeature se LapJoint a 2 facce che taglia intera sezione, da fare dopo taglio di coda 2024-04-22 09:04:34 +02:00
luca.mazzoleni 06461550c3 In LapJoint -> MakeMoreLongFaces corretto calcolo divisione in parti per evitare problemi di ceil con interi perfetti (ceil(3) = 3 o 4??) 2024-04-17 11:11:04 +02:00
luca.mazzoleni f45bcd7651 - in LapJoint -> SideMillAsSaw gestito anche rabbet passante 2024-04-15 12:22:23 +02:00
luca.mazzoleni 05fe546e38 Merge branch 'FixPartInfoAfterRotation' into develop 2024-04-12 14:16:00 +02:00
luca.mazzoleni 63c5d39112 - in BeamExec GetProcessAffectedFaces e GetFacetsInfo rilanciati dopo rotazione
- in BeamExec box della feature aggiornato dopo rotazione
- in LapJoint Groove verso il basso lavorata di preferenza dal lato
2024-04-12 13:15:59 +02:00
luca.mazzoleni f8e56d8f49 Merge tag '2.6d2' into develop
release
2024-04-11 12:56:47 +02:00
luca.mazzoleni b07f2f6b19 Merge branch 'release/2.6d2' 2024-04-11 12:56:30 +02:00
luca.mazzoleni eefd8ba037 - update log e version 2024-04-11 12:56:21 +02:00
luca.mazzoleni 076178db2c Merge branch 'feature/SawPlusChainsaw' into develop 2024-04-11 12:49:21 +02:00
luca.mazzoleni 3699daf998 - in SawPlusChain corretta tolleranza spessore tasca 2024-04-11 12:45:56 +02:00
luca.mazzoleni 617058cdda - in SawPlusChain nei messaggi si scrive il FeatureId invece di TaskId
- commenti e piccole correzioni
2024-04-11 12:14:33 +02:00
luca.mazzoleni d7a517160d - in SawPlusChain piccole correzioni
- in SawPlusChain aggiunta attivazione con parametro Q11
2024-04-11 10:51:05 +02:00
luca.mazzoleni 139579dbef - in SawPlusChain corretta segnalazione errore tasca troppo stretta 2024-04-10 13:19:39 +02:00
luca.mazzoleni 72033c8b9f - in SawPlusChain, in messaggio elevazione non raggiunta, aggiunti valori elevazione e massima profondità raggiunta 2024-04-10 10:07:52 +02:00
luca.mazzoleni cc30f3aeb9 - chiamate a FeatureId (PRID) sostituite con TaskId
- in SawPlusChain angoli iniziali gestiti solo per sega a catena
2024-04-09 19:02:10 +02:00
luca.mazzoleni 969f4cb6a0 - in FeatureTopology modifiche alla definizione di parallelo per tunnel e groove
- in SawPlusChain piccole correzioni
2024-04-09 16:17:57 +02:00
luca.mazzoleni c05e58a61e - in SawPlusChain escluse le lapjoint lunghe
- in SawPlusChain aggiunta scrittura log per tutti gli errori
- proprietà facce della Proc ora lette tramite la funzione GetFacetsInfo in BeamLib
2024-04-09 09:59:00 +02:00
luca.mazzoleni 37026c548d -in SawPlusChain migliorata gestione nome lavorazione
- in SawPlusChain aggiunti angoli alternativi sega a catena
- in SawPlusChain incluso caso 3 facce con fondo che non guarda verso il basso
2024-04-08 15:26:49 +02:00
luca.mazzoleni bfaeb8e414 Merge branch 'develop' into feature/SawPlusChainsaw 2024-04-08 09:56:27 +02:00
luca.mazzoleni 3bd780d005 update log 2024-04-08 09:37:18 +02:00
luca.mazzoleni 1ffa11b2c1 Merge tag '2.6d1' into develop
release
2024-04-08 09:35:02 +02:00
luca.mazzoleni 3548d8593a Merge branch 'release/2.6d1' 2024-04-08 09:34:49 +02:00
luca.mazzoleni 0eac98ecaa update log e versione 2024-04-08 09:34:41 +02:00
luca.mazzoleni a950807979 - in SawPlusChain aggiunto messaggio danneggiamento pezzo successivo 2024-04-05 19:17:17 +02:00
luca.mazzoleni 7676693f66 in sawpluschain correzione tabella non definita 2024-04-04 12:49:19 +02:00
luca.mazzoleni e03896cfef in sawpluschain ulteriori correzioni al calcolo approccio e retrazione 2024-04-04 12:40:59 +02:00
luca.mazzoleni b5094daa43 - in sawpluschain correzione a attacchi 2024-04-04 10:14:16 +02:00
luca.mazzoleni 5f1aaac719 - in sawpluschain migliorati approccio e retrazione lama 2024-04-04 08:48:13 +02:00
luca.mazzoleni 57d696e2fc - in sawpluschain refactoring per migliorare leggibilità
- in sawpluschain gestita estensione start se tasca troppo stretta
- in BeamLib aggiunta funzione GetAdjacentFaces
2024-04-03 17:56:39 +02:00
luca.mazzoleni 99c0ada098 - in sawpluschain migliorata gestione errori chainsaw
- in sawpluschain migliorato riconoscimento facce laterali
2024-04-02 19:05:05 +02:00
luca.mazzoleni a828ca9804 Merge branch 'develop' into feature/Saw+Chainsaw 2024-04-02 12:48:39 +02:00
luca.mazzoleni 88baf851ee -- In LapJoint -> ForceSideMill escluso caso 4 facce senza possibilità di ingresso lungo Y. 2024-04-02 12:47:47 +02:00
luca.mazzoleni 1e094aac56 - in SawPlusChain correzioni a sega a catena 2024-04-02 10:30:27 +02:00
luca.mazzoleni 51b5c7ac80 - in SawPlusChain implementata sega a catena, da testare 2024-03-29 19:20:19 +01:00
luca.mazzoleni e3f8783c18 - in SawPlusChain piccole correzioni 2024-03-29 09:29:08 +01:00
luca.mazzoleni d0015d8252 Merge branch 'develop' into feature/Saw+Chainsaw 2024-03-28 11:56:01 +01:00
luca.mazzoleni 5ebdda4abd - refactoring e migliorie varie 2024-03-28 11:50:39 +01:00
andrea.villa 436dcf69ea In MakeTwo rimossa gestione calcolo differente su ultima passata in caso di macchina FAST 2024-03-27 12:24:44 +01:00
luca.mazzoleni b7b9ea2065 - implementate passate orizzontali 2024-03-27 11:32:09 +01:00
luca.mazzoleni 8b1d3a0efb modifiche a SawPlusChainsaw 2024-03-27 09:24:35 +01:00
luca.mazzoleni 3d0adbdd39 - in SawPlusChainsaw aggiunta gestione accorciamenti percorsi per faccia laterale 2024-03-26 10:59:34 +01:00
luca.mazzoleni 8b51f9dca8 Merge branch 'develop' into feature/Saw+Chainsaw 2024-03-22 17:49:24 +01:00
luca.mazzoleni f589464063 - aggiunte lavorazioni SawPlusChainsaw funzionanti
- manca la gestione nel caso la feature non sia parallela al pezzo
2024-03-22 17:48:50 +01:00
andrea.villa fc7150f9b0 In Long2Cut.Make corretto nome passato alla BL.GetBlockedAxis 2024-03-21 08:42:20 +01:00
luca.mazzoleni 5c83095891 Merge branch 'develop' into feature/Saw+Chainsaw 2024-03-20 17:23:35 +01:00
luca.mazzoleni fe76f4b859 Merge branch 'master' into develop 2024-03-20 09:30:13 +01:00
Dario Sassi 1d2eb24903 DataBeam :
- correzione in Mortise per utilizzo variabili non definite.
2024-03-19 18:00:16 +01:00
luca.mazzoleni 0bb90513b5 Merge tag '2.6c4' into develop
release#
2024-03-18 15:02:27 +01:00
luca.mazzoleni 2fa68977bf Merge branch 'release/2.6c4' 2024-03-18 15:02:07 +01:00
luca.mazzoleni 092ad0cb4c update log e versione 2024-03-18 15:01:47 +01:00
andrea.villa 3953d079c1 ProcessDrill : Per Predrill corretta direzione estrusione per fori con direzione verso il basso 2024-03-18 13:26:22 +01:00
luca.mazzoleni ddcea6524c update log 2024-03-15 12:31:07 +01:00
luca.mazzoleni fe78df8c26 Merge branch 'master' into develop 2024-03-15 12:19:34 +01:00
Dario Sassi 7a70f623d9 DataBeam :
- in LapJoint correzione a calcolo ingombro per feature basse e lunghe dalla testa.
2024-03-15 11:44:13 +01:00
luca.mazzoleni b8ac0ef249 Merge tag '2.6c3' into develop
release
2024-03-15 09:55:08 +01:00
luca.mazzoleni f456ea3c2a Merge branch 'release/2.6c3' 2024-03-15 09:54:50 +01:00
luca.mazzoleni 8732c2fc66 update log e version 2024-03-15 09:54:25 +01:00
luca.mazzoleni 6a135228b8 - piccola correzione ai fori in doppio 2024-03-15 09:41:29 +01:00
luca.mazzoleni 653557a23d - in lapjoint primo implemento di MakeBySawPlusChain, da completare
- in BeamExec -> collect si scrive l'id della feature btl
2024-03-15 09:09:08 +01:00
andrea.villa 036ea8bcc8 Merge branch 'Feature/Predrill' into develop 2024-03-14 10:58:38 +01:00
andrea.villa b620aef7b8 Aggiunta gestione prefori 2024-03-13 17:23:40 +01:00
andrea.villa 58eb8df247 - Gestion Predrill su foro da due parti
- Ordinamento, Predrill sempre prima del foro
2024-03-13 15:24:59 +01:00
andrea.villa 38ab9d4a40 Prima versione gestione Predrill 2024-03-13 12:30:00 +01:00
luca.mazzoleni 4b7c533ae3 Merge branch 'master' into develop 2024-03-12 14:16:59 +01:00
luca.mazzoleni d54c9c98d7 Merge branch 'develop' 2024-03-12 11:37:27 +01:00
luca.mazzoleni d0d5ff3917 - update yml per rimuovere simboli di debug da compilazione 2024-03-12 11:37:11 +01:00
luca.mazzoleni afb72bcf48 Merge tag '2.6c2' into develop
release
2024-03-12 09:42:40 +01:00
luca.mazzoleni 0d6566e2cc Merge branch 'release/2.6c2' 2024-03-12 09:41:46 +01:00
luca.mazzoleni db5503f828 update log e version 2024-03-12 09:41:07 +01:00
luca.mazzoleni 0cfa1207ec - In BeamExec -> CollectFeatures si scrive ora Width e Height della faccia sia trimmate con il grezzo che intere. 2024-03-11 16:08:29 +01:00
luca.mazzoleni d415034d1c Merge branch 'feature/ImproveMirrorDrillings' into develop 2024-03-07 16:11:18 +01:00
luca.mazzoleni 06964c5a34 - rimossi simboli di debug da compile 2024-03-07 16:11:03 +01:00
luca.mazzoleni 68921b5df5 - Implementate le lavorazioni in doppio per fori specchiati non passanti e DrillPocket 2024-03-07 15:08:57 +01:00
andrea.villa 7801a50ae0 Merge branch 'Ticket#1646' into develop 2024-03-05 11:36:48 +01:00
andrea.villa c418f5b92a In Mortise.Make: Aggiunta possibilità di inserire lavorazione di smusso 2024-03-05 11:32:18 +01:00
andrea.villa 3aa7979be4 In FreeContour aggiunto smusso se lav. di svuotatura e corretto caso non passante 2024-03-05 09:56:18 +01:00
andrea.villa 4fdf3ebdfa Merge branch 'Feature/ImproveOrderFeat' into develop 2024-03-04 12:17:05 +01:00
andrea.villa e25ad8e4a4 BeamExec: Creata funzione calcolo dipendenze tra feature
FeatureTopology : Feature senza topologia, calcolato in BeamExec
2024-03-04 12:16:57 +01:00
andrea.villa d5a45917ec Merge branch 'develop' into Feature/ImproveOrderFeat 2024-03-04 12:11:56 +01:00
luca.mazzoleni eb401d2695 - Implementato attacco esterno se tasca 4 facce sulla coda ma nessun pezzo successivo 2024-03-04 09:48:47 +01:00
luca.mazzoleni 604ffc6a35 - in LapJoint migliorata ricerca pocket (VerifyPocket) 2024-03-01 15:58:57 +01:00
luca.mazzoleni 43da69863d Merge tag '2.6c1' into develop
2.6c12.6c12.6c12.6c12.6c12.6c1
2024-02-29 17:57:44 +01:00
luca.mazzoleni f7b484d6bf Merge branch 'release/2.6c1' 2024-02-29 17:54:58 +01:00
luca.mazzoleni 4a8576bcb2 update log e version 2024-02-29 17:52:40 +01:00
andrea.villa a2854beb8d Migliorata 'CompareFeatures' per ordine forature 2024-02-29 17:20:44 +01:00
luca.mazzoleni aa9f7c577c Merge branch 'TwoFacesDownheadImprovement' into develop 2024-02-29 16:17:49 +01:00
luca.mazzoleni 6fb5c3803f - in LapJoint -> TestTwoFacesDownHead aggiunto default a BD.CUT_VZ_MIN 2024-02-29 16:17:32 +01:00
luca.mazzoleni 7d11c76bef Merge remote-tracking branch 'origin/develop' into TwoFacesDownheadImprovement 2024-02-29 15:15:34 +01:00
luca.mazzoleni 8f8dc23096 - in BeamExec -> Collect aggiunta la scrittura nella Proc di Width e Height delle facce
- in lapjoint 2 facce migliorata la scelta della lama da sotto
2024-02-29 15:14:54 +01:00
andrea.villa 2e2c897b47 In DTTenon.Make Aumentato numero passaggi (massimo 8) 2024-02-29 11:59:24 +01:00
andrea.villa 2c98483de0 In LapJoit.MakeMoreFaces passato b3Solid alla funzione ManageAntiSplintByMill 2024-02-29 09:19:38 +01:00
andrea.villa 8660ae3742 Forzata In Mortise.Make, SPIRAL_IN se c'è anche un solo lato aperto 2024-02-28 14:26:51 +01:00
andrea.villa 3c0d1c9593 In BeamExec : Migliorata 'CompareFeatures' per ordine forature 2024-02-26 17:10:30 +01:00
andrea.villa 005bb0a384 Migliorata 'CompareFeatures' per ordine lavorazioni 2024-02-26 09:42:58 +01:00
andrea.villa 897fa66d33 Rimosso un caso di controllo per HCING/TCING da LapJoint 2024-02-22 12:45:28 +01:00
andrea.villa 3069366ef2 Merge branch 'Feature/ImproveClamping' into develop 2024-02-22 12:37:18 +01:00
andrea.villa ec485c1c62 Migliorato calcolo area non pinzabile in testa HCING e coda TCING in FacesBySaw e LapJoint 2024-02-22 12:36:47 +01:00
luca.mazzoleni 4acaab29f7 in LapJoint correzione al massimo diametro utensile in alcuni casi 2024-02-20 09:54:33 +01:00
luca.mazzoleni 9b35408ef9 Merge branch 'master' into develop 2024-02-14 18:12:50 +01:00
luca.mazzoleni d420e630ce Merge branch 'develop' 2024-02-14 18:06:23 +01:00
luca.mazzoleni 8a9e198c43 update log e versione 2024-02-14 18:06:06 +01:00
luca.mazzoleni d1f1429eb5 - in LapJoint -> MakeMoreFaces escluse le Groove 2 facce dalla gestione Special3faces. 2024-02-13 17:58:58 +01:00
luca.mazzoleni 9184fa23ac - piccole correzioni in LapJoint e Long2Cut 2024-02-12 18:18:47 +01:00
luca.mazzoleni 0950eac628 Merge branch 'Feature/NoRotationForRabbetAlongXTowardsBottom' into develop 2024-02-09 12:55:35 +01:00
luca.mazzoleni 1f730989b3 - Ora i rabbet lungo X che guardano in basso sono sempre fatti con fresatura di lato per evitare di ruotare. 2024-02-09 10:05:38 +01:00
luca.mazzoleni 63169a3859 Merge remote-tracking branch 'origin/master' into develop 2024-01-31 11:34:00 +01:00
luca.mazzoleni f59dac3029 - In LapJoint -> tagli con sega a catena ora si considera l'ingombro della testa per il calcolo della massima profondità.
- In LapJoint aggiunta funzione GetToolEntryAngle per determinare l'angolo di ingresso dell'utensile nella faccia.
2024-01-31 11:33:44 +01:00
Dario Sassi 5a089a737c DataBeam :
- modifiche per limiti pinzaggio con pinze con fronte verticale (ONE, PF) anzichè inclinato (FAST) quindi parametro BD.VICE_MINH grande.
2024-01-30 11:37:25 +01:00
luca.mazzoleni 2ed2e28e8a Merge branch 'master' into develop 2024-01-26 16:58:51 +01:00
luca.mazzoleni 21144825dc hotfix: corretto bug in Split in cui si chiamava la EgtSurfTmFacetNormVersor senza riferimento 2024-01-26 16:58:39 +01:00
luca.mazzoleni 2aba85f3c9 Merge tag '2.6a1' into develop
Finish Release: 2.6a1
2024-01-26 13:24:02 +01:00
luca.mazzoleni 301cc10022 Merge branch 'release/2.6a1' 2024-01-26 13:24:01 +01:00
luca.mazzoleni 63a3d62807 update log 2024-01-24 17:00:23 +01:00
luca.mazzoleni c3b3a8e09a Merge branch 'MultipleChainsawsAndMachiningLibImprovements' into develop 2024-01-24 15:07:49 +01:00
luca.mazzoleni 23c31aa0be Merge remote-tracking branch 'origin/master' into MultipleChainsawsAndMachiningLibImprovements 2024-01-24 14:38:12 +01:00
luca.mazzoleni 4ba4ddb698 - Le lavorazioni possono essere ora ordinate per dimensioni utensile (Longest, Shortest, Biggest, Smallest). Al momento implementato solo per FindSawing.
- Nello split con sega a catena ora si cerca di preferenza una lavorazione di tipo 'SawingForSplitting'. Se non trovata si cerca il tipo 'Sawing' come in precedenza.
- In split con sega a catena aggiunta estensione start/end del percorso se utensile lungo, per evitare collisioni con il pezzo durante rotazione.
2024-01-24 14:37:58 +01:00
Dario Sassi 4a408e3f61 DataBeam 2.6a1 :
- modifiche per poter impostare offset intermedio anche se lanciato da EgtCam5
- corretto calcolo cubetti con superficie limitante parallela e opposta a quella di base
- modifiche a Split per tagli a cubetti su grandi sezioni.
2024-01-24 11:46:13 +01:00
Dario Sassi c3c767b839 Merge remote-tracking branch 'origin/MultipleChainsawsAndMachiningLibImprovements' 2024-01-24 09:43:18 +01:00
luca.mazzoleni 0400878279 update commenti 2024-01-23 10:42:17 +01:00
luca.mazzoleni 418fb4e284 - correzione in MachiningLib per gestire il caso in cui una lavorazione sia attiva ma non ha alcun utensile collegato 2024-01-23 10:39:40 +01:00
luca.mazzoleni 337e13dbde In Split con sega a catena ora si cerca di preferenza una lavorazione di tipo 'SawingForSplitting'. Se non trovata si cerca il tipo 'Sawing' come in precedenza. 2024-01-22 18:14:18 +01:00
luca.mazzoleni 8d80f389d3 - In MachiningLib -> FindSawing aggiunto parametro opzionale bConsiderCSimmEncumberance per considerare l'ingombro dell'asse C nel massimo materiale (default false).
- In MachiningLib -> GetMachinings vengono ora raccolti i parametri utensile necessari per i VerifyTool, scritti direttamente nella tabella Machining.Tool.
- Le lavorazioni possono essere ora ordinate per dimensioni utensile (Longest, Shortest, Biggest, Smallest) se passato l'apposito parametro SortingCriterion in FindMachining. Al momento implementato solo per FindSawing.
- In HeadCut e Split, nei tagli verticali aggiuntivi, si usa ora BD.MAX_LEN_DICE come dimensione (era BD.MAX_DIM_DICE).
- In LapJoint e LongCut implementata gestione seghe a catena multiple.
2024-01-22 16:34:39 +01:00
luca.mazzoleni 91608ce3f0 Merge branch 'Feature/BigSectionForWideBeams' into develop 2024-01-18 16:17:58 +01:00
luca.mazzoleni dbf0d3cf01 update commenti 2024-01-18 16:17:16 +01:00
luca.mazzoleni e5bab7f1ab - piccola correzione a split 2024-01-18 12:37:40 +01:00
luca.mazzoleni b8fb6816a6 correzione minore 2024-01-16 18:21:06 +01:00
luca.mazzoleni ffb7580a65 - implementata funzione GetBlockedAxis, in BeamLib, che sostituisce le altre specifiche per sega a catena e lama; modificate le relative chiamate 2024-01-16 15:51:59 +01:00
luca.mazzoleni 6255b4c1cb Merge branch 'develop' into Feature/BigSectionForWideBeams 2024-01-12 14:41:42 +01:00
luca.mazzoleni 3ae3bcf1d3 Merge remote-tracking branch 'origin/master' into develop 2024-01-12 14:41:28 +01:00
Dario Sassi a01733defd DataBeam :
- piccola correzione per tagli lama con doppia inclinazione su macchina OikosX.
2024-01-12 12:51:36 +01:00
luca.mazzoleni ba9df21ab1 Merge branch 'develop' into Feature/BigSectionForWideBeams 2024-01-11 16:30:51 +01:00
luca.mazzoleni 6a58e94af0 Merge remote-tracking branch 'origin/master' into develop 2024-01-11 16:30:40 +01:00
luca.mazzoleni eb93769055 - in Split gestiti i tagli aggiuntivi verticali in tutti i casi 2024-01-11 16:22:39 +01:00
luca.mazzoleni 0acffe8d52 - in HeadCut gestiti i tagli aggiuntivi verticali in tutti i casi
- in Cut gestito il passaggio di superficie limitante alla GetDice
- in Split manca la gestione dei tagli aggiuntivi verticali in caso di BigSection
2024-01-11 12:25:28 +01:00
Dario Sassi f2c28f3810 DataBeam :
- correzione a posizionamento barre centrate su tavola da nuova interfaccia.
2024-01-10 23:34:46 +01:00
luca.mazzoleni 0a830c7f4b correzioni alle chiamate a GetSawBlockedAxis per Oikos 2024-01-09 11:43:07 +01:00
luca.mazzoleni 0778516765 Merge branch 'develop' into Feature/BigSectionForWideBeams 2024-01-09 10:07:38 +01:00
luca.mazzoleni 334d8d369e Merge remote-tracking branch 'origin/master' into develop 2024-01-09 09:51:12 +01:00
Dario Sassi 4a6b3accb1 DataBeam :
- alcune modifiche per macchine OikosX e similari.
2024-01-08 19:10:57 +01:00
luca.mazzoleni e22db4a989 Merge branch 'develop' into Feature/BigSectionForWideBeams 2024-01-08 18:09:53 +01:00
luca.mazzoleni 6021a50136 Merge tag '2.5l3' into develop
Finish Release: 2.5l3
2024-01-08 18:07:45 +01:00
luca.mazzoleni 748a6e295a Merge branch 'release/2.5l3' 2024-01-08 18:07:44 +01:00
luca.mazzoleni 2bd563293c update log e version 2024-01-08 18:07:03 +01:00
luca.mazzoleni cc099fb54c - Correzione a Is3EdgesApprox per casi in cui nAddGroup non esista ancora. 2024-01-08 17:19:41 +01:00
luca.mazzoleni 22c74c3252 - in headcut e split varie correzioni a tagli aggiuntivi per trave larga; rimangono da implementare per BigSection
- test annotations @param, #return in funzione GetFaceHvRefDim del BeamLib
2024-01-08 16:55:31 +01:00
luca.mazzoleni 3acebbd892 in split -> bigSection piccola correzione al sormonto tra sega a catena e lama 2024-01-04 18:33:07 +01:00
luca.mazzoleni bc04b680d4 - aggiunta GetSawBlockedAxis per scegliere asse bloccato aggregato lama 2024-01-04 17:29:42 +01:00
luca.mazzoleni 6e8cd5f3bb Merge branch 'develop' into Feature/BigSectionForWideBeams 2024-01-04 11:45:17 +01:00
luca.mazzoleni 91aa9d049f Merge remote-tracking branch 'origin/HEAD' into develop 2024-01-04 11:44:59 +01:00
luca.mazzoleni 5f7f988552 - in split -> bigSection primo implemento sega a catena da sopra e lama da sotto
- in split -> bigSection scelta sega a catena in base a lunghezza
2024-01-04 11:44:44 +01:00
Dario Sassi 7d65813c32 DataBeam 2.5l4 :
- modifiche per centrare i pezzi in Y sulla tavola (da flag BeamData.CENTER_BEAM)
- modifiche per rendere più veloci i calcoli di FeatureTopology
- scorporata CalcHeadTailMachBeforeIntersDrillings da CollectFeatures
- migliorato calcolo attacco/uscite lame in FacesBySaw.
2024-01-02 16:07:40 +01:00
luca.mazzoleni 42d68d968d Merge branch 'develop' into Feature/BigSectionForWideBeams 2023-12-21 11:39:20 +01:00
luca.mazzoleni 01f0182ef5 Merge tag '2.5l2' into develop
Finish Release: 2.5l2
2023-12-20 17:42:28 +01:00
luca.mazzoleni e0f27b9abe Merge branch 'release/2.5l2' 2023-12-20 17:42:28 +01:00
luca.mazzoleni c8b29241ca update log 2023-12-20 17:41:39 +01:00
luca.mazzoleni b0dea42f31 primi test 2023-12-20 17:17:28 +01:00
luca.mazzoleni a9462e189c Merge branch 'master' into develop 2023-12-15 17:57:26 +01:00
Dario Sassi 27ee10d1ec DataBeam :
- piccola miglioria alla precedente correzione, rimanevano non cancellate delle regioni di uso temporaneo.
2023-12-15 17:29:01 +01:00
luca.mazzoleni d73f535a55 Merge remote-tracking branch 'origin/master' into develop 2023-12-15 10:04:02 +01:00
Dario Sassi 5ae487cb20 DataBeam 2.5l2 :
- correzione a GetFaceWithMostAdj per calcoli con facce che fanno ombra.
2023-12-15 09:53:48 +01:00
luca.mazzoleni a3dcabf860 Merge remote-tracking branch 'origin/master' into develop 2023-12-11 09:04:41 +01:00
Dario Sassi 7b854c87c0 DataBeam :
- altra correzione a RoundArch per senso rotazione fresa e modalità climb.
2023-12-08 16:14:06 +01:00
luca.mazzoleni d2fc60b7f1 Merge branch 'master' into develop 2023-12-07 12:53:32 +01:00
Dario Sassi 286816e8e9 DataBeam :
- in ProcessRoundArch aggiunta gestione senso di rotazione della fresa per lavorare sempre in concordanza (climb milling).
2023-12-07 11:16:11 +01:00
luca.mazzoleni 01fbcbbd01 Merge branch 'CutAvoidCollisionsWhenDownUp' into develop 2023-12-07 09:56:49 +01:00
luca.mazzoleni d1c014e20c In ProcessCut e DoubleCut correzione in scelta ribaltamento trave quando si è in condizioni downUp. 2023-12-07 09:55:19 +01:00
luca.mazzoleni 92a924dde1 Merge branch 'develop' into CutAvoidCollisionsWhenDownUp 2023-12-06 18:38:56 +01:00
luca.mazzoleni d033fee929 Merge branch 'SideMillAsSawImprovement' into develop 2023-12-06 18:12:21 +01:00
luca.mazzoleni 1070910b8c - In ProcessLapJoint -> VerifySideMillAsSaw, se SIDEDEPTH non definita, viene calcolata
- update commenti
2023-12-06 17:50:26 +01:00
luca.mazzoleni 306b5b6dff in ProcessCut -> Classify si forza la rotazione della trave se inclinata in Y e la lama non riesce a lavorare solo da un lato, come per doublecut 2023-12-06 15:12:08 +01:00
luca.mazzoleni d2a6d7e75c in ProcessDoubleCut -> Classify si forza la rotazione della trave se inclinata in Y e la lama non riesce a lavorare solo da un lato 2023-12-06 10:44:21 +01:00
luca.mazzoleni 6309092689 In FacesBySaw -> CalcLeadInOutPerpGeom gestito caso in cui la geometria della feature esce dal grezzo 2023-12-05 18:37:28 +01:00
luca.mazzoleni 2ec0d8162e in LapJoint->MakeMoreFaces, nelle OpenPocket, ammesso utensile con diametro fino a 3 volte la dimensione della tasca (era 2) 2023-12-01 10:40:15 +01:00
luca.mazzoleni 60919c595d Merge tag '2.5l1' into develop
Finish Release: 2.5l1
2023-12-01 09:33:29 +01:00
luca.mazzoleni 0638e3c6f3 Merge branch 'release/2.5l1' 2023-12-01 09:33:28 +01:00
luca.mazzoleni de80902a86 update log e versione 2023-12-01 09:33:10 +01:00
luca.mazzoleni 9fbd4a5156 - in MakeTwo di FacesBySaw raffinamento calcolo vtRef per casi dubbi. 2023-11-30 09:23:12 +01:00
luca.mazzoleni 6bd2e5ffb4 - nelle chiamate a EgtSurfTmFacetElevationInBBox aggiunto parametro per forzare calcolo anche se la faccia è esterna al grezzo
- update commenti
2023-11-30 09:12:49 +01:00
luca.mazzoleni f89129d2e8 Merge branch 'ElevationCalculationRefactoring' into develop 2023-11-29 16:50:17 +01:00
luca.mazzoleni e0e2f630d2 Merge remote-tracking branch 'origin/master' into develop 2023-11-29 16:07:49 +01:00
luca.mazzoleni 1664513c8f Ottimizzate le chiamate al calcolo elevazione. Si evita di calcolarla più volte inutilmente perchè calcolata inizialmente nel CollectFeatures. 2023-11-29 16:07:18 +01:00
Dario Sassi c701d4132f DataBeam :
- in MakeTwo di FacesBySaw raffinamento calcolo vtRef per casi dubbi.
2023-11-28 15:56:10 +01:00
Dario Sassi a9052c1d72 Merge commit 'b3bb386ec776ad753e1d9042d90ecd9834c2abd2' 2023-11-28 15:54:49 +01:00
luca.mazzoleni 593fdcfc24 Merge branch 'develop' into ElevationCalculationRefactoring 2023-11-28 15:44:43 +01:00
luca.mazzoleni b9c8921cb2 Merge tag '2.5k5' into develop
Finish Release: 2.5k5
2023-11-28 15:40:00 +01:00
luca.mazzoleni b3bb386ec7 Merge branch 'release/2.5k5' 2023-11-28 15:40:00 +01:00
luca.mazzoleni c69f80a903 update log e versione 2023-11-28 15:39:33 +01:00
luca.mazzoleni d8de7467b0 - tutte le chiamate alle funzioni GetFaceElevation e GetOtherFaceElevation sostituiti con la nuova funzione EgtSurfTmFacetElevationInBBox 2023-11-28 09:55:41 +01:00
luca.mazzoleni 42c043fcd7 Merge branch 'Q05InLong2Cut' into develop 2023-11-24 15:24:03 +01:00
luca.mazzoleni 344467a500 - In Long2Cut, in implemento Q05 come LongCut, aggiunte puliture.
- In Dovetail correzione per variabile sMilling portata da globale a locale.
2023-11-24 15:23:52 +01:00
luca.mazzoleni e82a8c9c1f -In Long2Cut, in implemento Q05 come LongCut, gestiti allungamenti e accorciamenti. Mancano le puliture.
-In LongCut aggiunti alcuni commenti riguardo al Q05.
2023-11-23 13:06:13 +01:00
luca.mazzoleni 85585c0b80 In Long2Cut primo implemento Q05 come LongCut. Ancora da gestire allungamenti e accorciamenti. 2023-11-21 16:23:03 +01:00
luca.mazzoleni 24e853ff92 Merge branch 'master' into develop 2023-11-20 09:51:52 +01:00
Dario Sassi 0bcdf65656 DataBeam 2.5k4 :
- in ProcessLongDoubleCut ora si utilizza la nuova funzione Lua EgtSurfTmFacetElevationInBBox per il calcolo esatto dell'elevazione di una faccia nel solido del pezzo.
2023-11-16 19:05:34 +01:00
Dario Sassi 1e442c7a01 Merge remote-tracking branch 'origin/develop' 2023-11-16 18:08:45 +01:00
luca.mazzoleni 24e38cdad5 in lapjoint modifiche a MakeStaircaseStep 2023-11-15 12:26:08 +01:00
andrea.villa a239a096cd FacesBySaw : In MakeOne migliorato calcolo scelta soluzione lama ( per macchina TURN) 2023-11-14 12:22:25 +01:00
andrea.villa 737abe7d30 Merge branch 'master' into develop 2023-11-14 12:19:19 +01:00
luca.mazzoleni b7b701f9d2 Merge branch 'develop' 2023-11-09 16:01:15 +01:00
Dario Sassi 5974edf8b1 DataBeam :
- aggiornato per compilazione manuale di ProcessVariant.
2023-11-08 17:50:59 +01:00
Dario Sassi 7fcf169b6b DataBeam 2.5k3 :
- aggiunta gestione features Variant (per ora solo con lavorazioni di tipo Pocket).
2023-11-08 17:46:20 +01:00
Dario Sassi f30558db04 DataBeam :
- migliorie e correzioni alla ricerca di lavorazioni di foratura con AngularTransmission ("_AT")
- migliorata gestione dei fori e delle tasche con AngularTransmission.
2023-11-07 09:37:33 +01:00
luca.mazzoleni cb17b9737e Merge branch 'master' into develop 2023-11-06 18:16:07 +01:00
luca.mazzoleni 5315b63163 Merge branch 'develop' 2023-11-06 18:15:53 +01:00
luca.mazzoleni a87c9f5789 update versione e log 2023-11-06 18:15:41 +01:00
luca.mazzoleni 1dc4efa397 Merge branch 'release/2.5k2' 2023-11-06 18:10:39 +01:00
luca.mazzoleni 50917a61b2 Merge tag '2.5k2' into develop
Finish Release: 2.5k2
2023-11-06 18:10:39 +01:00
luca.mazzoleni a843ef2e25 In MakeStaircaseStep gestito ritorno 2023-11-06 18:09:16 +01:00
luca.mazzoleni fc3f6f22ac - update commenti 2023-11-03 18:38:05 +01:00
luca.mazzoleni 84bc8d7bd7 Merge branch 'Feature/L020SpecialStaircase' into develop 2023-11-03 18:33:33 +01:00
luca.mazzoleni 7c7fa26b8d - in Topology -> Classify ora si settano le AffectedFaces nella Proc, se non già presenti
- in LapJoint -> MakeStaircaseStep aggiunta lavorazione smussi opzionale
2023-11-03 18:32:54 +01:00
luca.mazzoleni 54fcc27c49 - in LapJoint -> MakeStaircaseStep aggiunta riduzione profondità lama in caso di angolo inferiore a 90deg 2023-11-03 09:42:12 +01:00
luca.mazzoleni a5a8a0e98b Merge branch 'develop' into Feature/L020SpecialStaircase 2023-11-02 18:27:15 +01:00
luca.mazzoleni 27df151d3d Merge remote-tracking branch 'origin/master' into develop 2023-11-02 18:26:06 +01:00
Dario Sassi 34b4867a0d DataBeam :
- in ProcessSplit si imposta l'ingombro asse C correttamente anche per teste con asse rotante C con un solo braccio.
2023-11-02 18:10:49 +01:00
Dario Sassi 2bf15f2958 Merge branch 'master' of https://gitlab.steamware.net/egaltech/DataBeam 2023-11-02 17:36:38 +01:00
Dario Sassi bfa26e7610 DataBeam 2.5k1 :
- correzione a ProcessSplit per scrittura sbagliata nome variabile (ora dTLen invece di dTlen).
2023-11-02 17:34:55 +01:00
luca.mazzoleni 398ea82d2b Merge branch 'master' into develop 2023-11-02 11:04:17 +01:00
luca.mazzoleni 6f8c94705b Merge branch 'develop' 2023-11-02 11:03:49 +01:00
luca.mazzoleni a77d0b2652 update log e versione 2023-11-02 11:01:52 +01:00
Dario Sassi 6c14b873f9 Merge remote-tracking branch 'origin/master' 2023-10-28 12:27:35 +02:00
luca.mazzoleni 15d85e174b Merge branch 'develop' into Feature/L020SpecialStaircase 2023-10-27 18:25:53 +02:00
luca.mazzoleni a2ba993709 Merge branch 'release/2.5j2' 2023-10-27 18:18:48 +02:00
luca.mazzoleni e90a4db38c Merge tag '2.5j2' into develop
Finish Release: 2.5j2
2023-10-27 18:18:48 +02:00
luca.mazzoleni 5820ccb455 update versione, log, commenti 2023-10-27 18:18:32 +02:00
luca.mazzoleni 57fa9bb8b3 - correzioni minori a LapJoint e Cut 2023-10-27 18:00:09 +02:00
luca.mazzoleni 3fe16f87b7 In LapJoint -> MakeStaircaseStep:
- invertite taglio di lama alzata e pedata
- step lama della pedata limitati a 2, uno a metà e uno in fondo
- corretto faceuse nel caso di lama da sotto (esclusi casi downup)
2023-10-27 17:01:07 +02:00
andrea.villa 15af95a77e Merge branch 'Feature/L020AngleBigger90Deg' into develop 2023-10-27 16:19:46 +02:00
andrea.villa a9e378c468 In LapJoint gestito caso groove due facce >90° con fresa, come da parametro Q 2023-10-27 16:19:23 +02:00
andrea.villa a524a60a41 In BeamLib aggiunto controllo per permettere tagli da sotto con testa da sopra su pezzi molto alti 2023-10-27 13:15:37 +02:00
luca.mazzoleni fdb897ec68 - In LapJoint -> MakeStaircaseStep aggiunti tagli di lama per pedata e alzata. Da verificare gli step 2023-10-27 09:56:09 +02:00
luca.mazzoleni 4e4a1eca4d - In LapJoint -> MakeStaircaseStep correzioni al calcolo step orizzontali fresa 2023-10-26 15:07:17 +02:00
andrea.villa 03bf116341 Merge branch 'Feature/LapJointAsLong2CutFix' into develop 2023-10-25 17:12:28 +02:00
andrea.villa 82d9d4dfde Commenti e migliorie messaggi warning 2023-10-25 16:55:10 +02:00
luca.mazzoleni d39148a9e8 Merge branch 'develop' into Feature/L020SpecialStaircase 2023-10-25 15:58:49 +02:00
luca.mazzoleni a7e0c5a33d - In LapJoint -> MakeStaircaseStep aggiunta la lavorazione con fresa 2023-10-25 15:56:53 +02:00
andrea.villa 8ddf1f260a In LapJoint e LongDoubleCut corretto comportamento con messaggi di ritorno in caso possa fare con lama 2023-10-25 15:37:52 +02:00
andrea.villa 8671415d5e In LapJoint e LongDoubleCut faccio di lama solo se taglio completamente. Altrimenti fresa. 2023-10-25 12:36:38 +02:00
andrea.villa e496feff2c - In LongDoubleCut limito lavorazione a massimo materiale lama prima di applicare. Da completare 2023-10-25 10:15:59 +02:00
andrea.villa 73431c52ca In MakeOne migliorata gestione taglio con percorso bilinea. 2023-10-24 14:45:26 +02:00
andrea.villa 5420bc5165 Merge branch 'Feature/BetterClampManagementOnCutLong' into develop 2023-10-24 14:36:30 +02:00
andrea.villa 3ccc382d5b Merge branch 'develop' into Feature/BetterClampManagementOnCutLong 2023-10-24 14:34:33 +02:00
andrea.villa 29af699ad5 - LongCut e LongDoubleCut: migliorata spezzatura taglio passante con due spezzoni
- BeamExec: aggiunta scrittura parametro BARLEN nelle info del mach group
2023-10-24 14:28:35 +02:00
luca.mazzoleni 5865192e23 Merge branch 'develop' into Feature/L020SpecialStaircase 2023-10-23 14:57:14 +02:00
luca.mazzoleni 374d99ffd9 Merge tag '2.5j1' into develop
Finish Release: 2.5j1
2023-10-23 12:52:53 +02:00
luca.mazzoleni a31c026430 Merge branch 'release/2.5j1' 2023-10-23 12:52:52 +02:00
luca.mazzoleni 982b07ad32 update log 2023-10-23 12:52:18 +02:00
luca.mazzoleni 869683c99a - a Topology aggiunta groove 2 facce (tipo birdsmouth passante)
- prima aggiunta di MakeStaircaseStep
2023-10-23 12:39:15 +02:00
luca.mazzoleni f147f77133 Merge remote-tracking branch 'origin/master' into develop 2023-10-19 09:13:07 +02:00
Dario Sassi 9c5b23d15d DataBeam 2.5j1 :
- nella ricerca lavorazione da usare controllo di utensile attivo sostituito con controllo utensile presente nel setup corrente
2023-10-18 15:09:01 +02:00
andrea.villa 62b1c186f7 Merge branch 'BugFix/HeadCutSplitFixForKairos' into develop 2023-10-17 14:53:52 +02:00
andrea.villa 55f4effbb6 - In HeadCut e Split corretto calcolo allungamenti/accorciamenti per evitare lunghezze del percorso negative 2023-10-17 12:34:42 +02:00
Andrea Villa 70b9f9fe89 Merge remote-tracking branch 'origin/develop' into develop 2023-10-17 11:25:18 +02:00
luca.mazzoleni 2ff160f555 In FeatureTopology -> GetFacesParallelToPart rimossa Pocket e aggiunto Rabbet al check solo direzione principale 2023-10-16 18:35:26 +02:00
luca.mazzoleni 7ff3a8eba6 Merge remote-tracking branch 'origin/master' into develop 2023-10-16 09:42:26 +02:00
Dario Sassi 59934d0fdf DataBeam :
- in Process (lancio da EgtCAM5 quindi uso praticamente solo interno) aggiunta possibilità di tenere ordine pezzi in barra come da selezione.
2023-10-12 10:56:46 +02:00
luca.mazzoleni df99424632 Merge remote-tracking branch 'origin/master' into develop 2023-10-04 10:25:48 +02:00
luca.mazzoleni 61b1375c00 - in Lapjoint -> MakePocket aggiunto messaggio in caso si rovini il pezzo successivo 2023-10-04 10:25:38 +02:00
Dario Sassi 07c76f60c8 DataBeam :
- piccola correzione a Classify di FeatureTopology per casi senza geometria.
2023-10-04 09:28:20 +02:00
luca.mazzoleni 2c88c295c8 Merge tag '2.5i2' into develop
Finish Release: 2.5i2
2023-09-27 18:48:29 +02:00
luca.mazzoleni f0bd3d2e6f Merge branch 'release/2.5i2' 2023-09-27 18:48:29 +02:00
luca.mazzoleni a0d3bb9114 - update log 2023-09-27 18:48:13 +02:00
luca.mazzoleni 8f890f35e2 Merge branch 'develop' 2023-09-27 18:36:29 +02:00
luca.mazzoleni 30e2028ebf - in LapJoint -> MakeLongMoreFaces aggiunta Classify Topology alla AddProc creata 2023-09-27 18:35:35 +02:00
luca.mazzoleni 04454ac44f Merge branch 'Feature/BetterUndercutDetection' into develop 2023-09-27 17:43:17 +02:00
luca.mazzoleni d73dbfbffb Merge remote-tracking branch 'origin/HEAD' into develop 2023-09-27 17:36:06 +02:00
luca.mazzoleni b7ec0031e1 - piccola correzione a LapJoint 2023-09-27 17:35:56 +02:00
Dario Sassi d5f2422729 DataBeam 2.5i2 :
- aggiunta cancellazione curve temporanee da loop di facce in BeamLib.Is3EdgesApprox
- piccola modifica per Turn su bInvert di FacesBySaw.MakeOne
- in foratura quando errore in applicazione lavorazione si inverte e riprova solo se singola su foro aperto
- in MakeLongMoreFaces migliorata gestione spezzatura di Tunnel
- in lavorazione tenoni per Turn si assegna SCC per privilegiare accesso dal lato corto della trave.
2023-09-27 17:23:45 +02:00
luca.mazzoleni 1c25ca7667 - In LapJoint -> MakeMoreFaces e Classify refactoring della gestione scanalatura chiusa
- in FeatureTopology modificata GetFacesParallelToPart per tunnel, pocket e groove 3 lati
2023-09-27 11:54:33 +02:00
luca.mazzoleni f54cfa7eb3 - in BeamExec funzione IsFeatureCuttingEntireSection spostata in BeamLib; in ClassifyTopology aggiunto passaggio del parametro nRawId
- in BeamLib -> GetFaceWithMostAdj gestito primo parametro anche come Proc; gestito caso strip con facce tutte in sottosquadro; spostata qui funzione IsFeatureCuttingEntireSection da BeamExec
- In FeatureTopology aggiunte topologie Strip e Cut
- In ProcessDoveTail, ProcessLapJoint, ProcessLongCut, ProcessTyroleanDovetail modificata chiamata a GetFaceWithMostAdj
2023-09-26 17:39:16 +02:00
luca.mazzoleni 8cef86ffd5 - commenti e migliorie stilistiche 2023-09-25 11:38:58 +02:00
luca.mazzoleni 7402062859 - in BeamLib implementato metodo per rilevare sottosquadri da facce non adiacenti, da testare 2023-09-22 18:08:46 +02:00
luca.mazzoleni 36a663199c - in BeamLib implementato parzialmente metodo per rilevare sottosquadri da facce non adiacenti, da ultimare 2023-09-22 16:37:16 +02:00
luca.mazzoleni b628a4200d Merge branch 'BugFix/FixLapJointLongTunnel' into develop 2023-09-19 17:24:32 +02:00
luca.mazzoleni 0d3b3d1f04 Merge branch 'develop' into BugFix/FixLapJointLongTunnel 2023-09-19 17:22:27 +02:00
luca.mazzoleni c490d5d388 Merge branch 'master' into develop 2023-09-19 10:34:21 +02:00
luca.mazzoleni bc401eef07 update log 2023-09-19 10:27:53 +02:00
luca.mazzoleni a93326e3cd - in LapJoint -> MakeLongMoreFaces correzione allargamento superfici per caso di tunnel lungo 2023-09-19 10:08:42 +02:00
luca.mazzoleni 6b5d7525a1 - in LapJoint -> MakeLongMoreFaces modifiche finali per correzione caso tunnel lungo; da testare 2023-09-18 18:46:55 +02:00
luca.mazzoleni 111a733365 - in LapJoint -> MakeLongMoreFaces ulteriori modifiche parziali per correzione caso tunnel lungo 2023-09-18 17:01:22 +02:00
luca.mazzoleni 7ce6ca9f13 - in LapJoint -> MakeLongMoreFaces modifiche parziali per correzione caso tunnel lungo 2023-09-18 15:25:23 +02:00
luca.mazzoleni 6902620f5d - in BeamExec -> Collect aggiunto PartId anche in Proc2 2023-09-14 12:37:17 +02:00
luca.mazzoleni 7c6b5cf12c - in BeamExec -> CollectFeatures aggiunta la scrittura di PartId in Proc
- in LapJoint -> MakeMoreFaces se lavorazione con fresa di lato distinto caso 4 lati groove
2023-09-13 10:59:14 +02:00
luca.mazzoleni 9c0d2111f5 - aggiunta libreria FeatureTopology, clonata da Wall, per la classificazione topologica delle feature
- in BeamLib aggiunte funzioni Is3EdgesApprox e  GetProcessAffectedFaces, clonate da Wall
- in BeamExec aggiunta ClassifyTopology e la raccolta preliminare di alcune informazioni nel CollectFeatures
2023-09-13 09:19:58 +02:00
luca.mazzoleni 19d8be5c9e - in ProcessCut -> MakeFromTop abbassato a 590 mm il limite per convertire in LongCut
- aggiunto commento commit precedente
2023-09-12 10:24:34 +02:00
luca.mazzoleni 41a05b4199 Merge tag '2.5i1' into develop
Finish Release: 2.5i1
2023-09-12 09:05:24 +02:00
luca.mazzoleni ab48827689 Merge branch 'release/2.5i1' 2023-09-12 09:05:23 +02:00
luca.mazzoleni a859f170aa update log e versione 2023-09-12 09:05:05 +02:00
luca.mazzoleni 06f7fdb385 Merge branch 'master' into develop 2023-09-12 09:03:02 +02:00
luca.mazzoleni 36d0e0c198 Merge branch 'develop' 2023-09-12 09:02:34 +02:00
luca.mazzoleni e1dc521fe5 - in LapJoint gestito correttamente il ritorno nil di GetUShapeWidth 2023-09-12 09:01:17 +02:00
luca.mazzoleni 30fc2ab1a4 Merge tag '2.5h2' into develop
Finish Release: 2.5h2
2023-08-11 10:52:04 +02:00
luca.mazzoleni dacf2c5860 Merge branch 'release/2.5h2' 2023-08-11 10:52:03 +02:00
luca.mazzoleni abb7735f9d update log 2023-08-11 10:51:43 +02:00
luca.mazzoleni 2fb4338d50 Merge remote-tracking branch 'origin/master' into develop 2023-08-11 10:36:41 +02:00
Dario Sassi b0150f5b03 DataBeam 2.5h2 :
- in LapJoint e Mortise modificata posizione braccio per FAST quando vicino alla coda della trave
- in RidgeLap corretto ingombro lavorazione in testa e coda quando rivolta verso il basso.
2023-08-11 10:30:36 +02:00
luca.mazzoleni 5802f26bbf Merge branch 'master' into develop 2023-08-08 15:00:31 +02:00
luca.mazzoleni 3be500974a corrette forature con aggregato quando lato aperto 2023-08-08 14:52:03 +02:00
luca.mazzoleni 199c327151 Merge tag '2.5h1' into develop
Finish Release: 2.5h1
2023-08-07 18:31:32 +02:00
luca.mazzoleni 5b6ed18a8e Merge branch 'release/2.5h1' 2023-08-07 18:31:32 +02:00
luca.mazzoleni f34367da55 update log e version 2023-08-07 18:31:06 +02:00
luca.mazzoleni 6665209c66 Merge tag '2.5g4' into develop
Finish Release: 2.5g4
2023-08-07 17:35:21 +02:00
luca.mazzoleni ea7e9dedac Merge branch 'release/2.5g4' 2023-08-07 17:35:21 +02:00
luca.mazzoleni b7b8f30a8c update log e versione 2023-08-07 17:35:09 +02:00
luca.mazzoleni 9ea1c502e8 fix commenti 2023-08-02 11:36:13 +02:00
luca.mazzoleni 4a4c5e7349 in Lapjoint corretto incremento della profondità pari al raggio utensile per tunnel con sega a catena 2023-08-02 11:32:55 +02:00
luca.mazzoleni 2c1831a678 - in split e headcut corretto calcolo allungamenti/accorciamenti pezzi alti per contemplare anche taglio singolo
- in lapjoint piccola correzione al calcolo della distanza di sicurezza in base al gambo dell'utensile
2023-08-02 09:33:17 +02:00
luca.mazzoleni 5c4b609a56 tagli doppi di lato non effettuati se macchina tipo PF e pezzo alto 2023-08-01 16:18:12 +02:00
luca.mazzoleni 295f8059c4 Merge tag '2.5g3' into develop
Finish Release: 2.5g3
2023-08-01 15:29:44 +02:00
luca.mazzoleni b375b56f21 Merge branch 'release/2.5g3' 2023-08-01 15:29:43 +02:00
luca.mazzoleni 4a5d097256 update log e versione 2023-08-01 15:29:30 +02:00
luca.mazzoleni 9acb252f1b Merge branch 'master' into develop 2023-08-01 15:20:35 +02:00
Dario Sassi 70505bcf29 DataBeam :
- riaggiunto placeholder in bin\LuaLibs.
2023-08-01 15:13:02 +02:00
Dario Sassi 35337836a5 DataBeam :
- in Cut correzione calcolo offset per taglio doppio di lato
- in LongCut ammesso uso lama da sotto fino a Norm +3deg in verticale.
2023-08-01 15:08:30 +02:00
luca.mazzoleni 12bfe2ac27 Merge branch 'Feature/PocketWithAggregate' into develop 2023-08-01 15:06:10 +02:00
luca.mazzoleni 3ec2618f9b Feature/PocketWithAggregate: implementato per tasche 5 lati da sotto e perfettamente verticali 2023-08-01 12:28:08 +02:00
luca.mazzoleni b0e307d89d Merge branch 'develop' into Feature/PocketWithAggregate 2023-08-01 11:41:40 +02:00
luca.mazzoleni 834a1261c5 update log 2023-08-01 09:23:41 +02:00
luca.mazzoleni 0eea92b13d Merge branch 'master' into develop 2023-07-31 18:34:07 +02:00
luca.mazzoleni 29f1af5216 Merge branch 'develop' 2023-07-31 18:33:52 +02:00
luca.mazzoleni b18f7da20a update log 2023-07-31 18:33:40 +02:00
luca.mazzoleni e9a82086e3 Merge branch 'master' into develop 2023-07-31 18:27:58 +02:00
luca.mazzoleni d09069ad78 Merge branch 'master' of https://gitlab.steamware.net/egaltech/DataBeam 2023-07-31 18:26:51 +02:00
luca.mazzoleni 00078c65c1 corretto errore nelle mortase in doppio 2023-07-31 18:26:40 +02:00
Dario Sassi 303a69cbb3 DataBeam 2.5g3 :
- in ProfConvex, ProfConcave e ProfHead corretto e semplificato ModifySideInvertLead per invert.
2023-07-31 18:20:39 +02:00
luca.mazzoleni c762706e89 Merge tag '2.5g2' into develop
Finish Release: 2.5g2
2023-07-31 17:33:09 +02:00
luca.mazzoleni 73f90eefe5 Merge branch 'release/2.5g2' 2023-07-31 17:33:09 +02:00
luca.mazzoleni 4951a4c5c2 update log 2023-07-31 17:32:55 +02:00
luca.mazzoleni 688d43e463 in ProcessDrill modifica minore al riconoscimento forature con aggregato 2023-07-31 17:25:04 +02:00
luca.mazzoleni 300dea8f2c Feature/PocletWithAggregate:
- primo implemento tasca da sotto con aggregato (solo 5 lati, allineato con Z)
- manca ricerca utensile _AT
2023-07-31 16:57:33 +02:00
luca.mazzoleni ad6c7ef6af Merge branch 'Feature/DrillWithAggregate' into develop 2023-07-28 17:07:50 +02:00
luca.mazzoleni bc33759c14 fix commenti 2023-07-28 17:07:36 +02:00
luca.mazzoleni 36cf8f6de8 DrillWithAggregate:
-implemento completato, da testare
2023-07-28 15:45:23 +02:00
luca.mazzoleni e6837d160b In FreeContour, solo se pocket, aggiunta Q06 per specificare un eventuale offset radiale del contorno. 2023-07-28 10:28:35 +02:00
luca.mazzoleni 6c81ad1f1b Merge branch 'master' into develop 2023-07-24 09:27:15 +02:00
DarioS 5cde095b8e DataBeam :
- correzioni per mortise passanti con curva Aux che guarda in basso.
2023-07-21 11:07:47 +02:00
DarioS 76381e27f7 DataBeam 2.5g2 :
- corretta gestione antischeggia con lama su LapJoint (vedi #1351).
2023-07-19 17:33:07 +02:00
luca.mazzoleni 73a970bc20 alcune correzioni minori 2023-07-07 15:47:50 +02:00
luca.mazzoleni bf6b888d27 Merge tag '2.5g1' into develop
Finish Release: 2.5g1
2023-07-05 10:30:27 +02:00
luca.mazzoleni 4768c065ef Merge branch 'release/2.5g1' 2023-07-05 10:30:27 +02:00
luca.mazzoleni 133720bc34 update log e versione 2023-07-05 10:30:12 +02:00
luca.mazzoleni bad5b4aaa4 Merge branch 'master' into develop 2023-06-29 19:05:03 +02:00
luca.mazzoleni 21768ed542 in MakeMoreFaces impedito l'uso del truciolatore se tasca chiusa 2023-06-29 18:45:06 +02:00
DarioS e80e4e8a5d DataBeam :
- in DiceCut modificata scelta tagli ortogonali quando liberi (esteso caso di verticali ammessi)
- migliorato controllo fattibilità taglio di fianco con cubetti
- in LapJoint estesi casi riconoscimento in coda basato su lunghezza.
2023-06-29 18:27:31 +02:00
luca.mazzoleni c6566478e6 in ProcessMortise escluso il riconoscimento lati aperti per le mortase passanti 2023-06-27 17:54:24 +02:00
luca.mazzoleni 84d16b12a9 eliminati placeholder 2023-06-27 17:11:29 +02:00
luca.mazzoleni 43900018dd update ignore 2023-06-27 17:09:51 +02:00
luca.mazzoleni d6249a1f0f piccolo bugfix a Cut per dangerous relief cut 2023-06-27 17:09:15 +02:00
luca.mazzoleni 0954e86cc9 Merge branch 'master' into develop 2023-06-21 18:13:23 +02:00
luca.mazzoleni 79b210def9 Merge branch 'develop' 2023-06-21 18:13:11 +02:00
luca.mazzoleni acdceeb97f update log e versione 2023-06-21 18:12:59 +02:00
luca.mazzoleni 641aa5807d Merge branch 'release/2.5f4' 2023-06-21 17:54:41 +02:00
luca.mazzoleni f3c0987bc1 Merge tag '2.5f4' into develop
Finish Release: 2.5f4
2023-06-21 17:54:41 +02:00
luca.mazzoleni 676815c32b Merge branch 'Feature/DangerousReliefCutsFix' into develop 2023-06-21 17:52:16 +02:00
luca.mazzoleni bcde9ae19c Merge branch 'develop' into Feature/DangerousReliefCutsFix 2023-06-21 15:06:42 +02:00
luca.mazzoleni 5004bc97b6 In FreeContour aumentato l'angolo minimo che attiva l'attacco speciale 2023-06-21 11:11:09 +02:00
luca.mazzoleni c9cefa618e - modificato check direzione tagli perpendicolari per attivare o no i tagli speciali
- esclusi i tagli speciali in caso di longcut
2023-06-19 12:30:28 +02:00
luca.mazzoleni dedf1366e6 Merge tag '2.5f3' into develop
Finish Release: 2.5f3
2023-06-16 19:04:00 +02:00
luca.mazzoleni d72943e20b Merge branch 'release/2.5f3' 2023-06-16 19:03:59 +02:00
luca.mazzoleni 915f8973db correzioni varie al funzionamento 2023-06-16 19:03:18 +02:00
luca.mazzoleni 6ee0d46ff5 Merge branch 'develop' into Feature/DangerousReliefCutsFix 2023-06-14 16:01:35 +02:00
luca.mazzoleni a4d06ff6c6 Merge branch 'master' into develop 2023-06-14 16:00:45 +02:00
luca.mazzoleni bf9d0d2b8f Merge branch 'master' into Feature/DangerousReliefCutsFix 2023-06-14 16:00:31 +02:00
luca.mazzoleni 0443133557 - lieve correzione per la lettura di vCuts 2023-06-14 15:59:41 +02:00
DarioS 5c8f7dee7c DataBeam :
- per scubettatura tagli di testa e coda aggiunta MakeParallelOne
- tolti parametri nForceWorkSide, nForceSCC da MakeOne
2023-06-14 15:08:37 +02:00
luca.mazzoleni dabd2d2681 Merge branch 'develop' into Feature/DangerousReliefCutsFix 2023-06-14 11:44:47 +02:00
luca.mazzoleni 8bdde9e2bf - piccola correzione a tagli aggiuntivi orizzontali in ProcessSplit 2023-06-14 10:31:12 +02:00
luca.mazzoleni 2eccd38463 Merge branch 'develop' into Feature/DangerousReliefCutsFix 2023-06-13 09:25:51 +02:00
luca.mazzoleni 952190d792 Merge branch 'master' into develop 2023-06-13 09:25:36 +02:00
DarioS 9b32d12934 DataBeam :
- correzione a FacesBySaw.MakeTwo per scelta direzione di approccio lama in casi speciali.
2023-06-13 09:14:14 +02:00
luca.mazzoleni a339d49066 Merge tag '2.5f2' into develop
Finish Release: 2.5f2
2023-06-12 17:54:36 +02:00
luca.mazzoleni 3d58080915 Merge branch 'release/2.5f2' 2023-06-12 17:54:36 +02:00
luca.mazzoleni 2ef7e457c1 update log e version 2023-06-12 17:53:22 +02:00
luca.mazzoleni 44a36c4acd - In LapJoint corretto il recupero dati utensile che, in alcune funzioni, puntava all'utensile errato.
- In BeamLib ChangeOrOpenStart corretta ricerca segmento più lungo.
2023-06-12 16:44:51 +02:00
luca.mazzoleni 7a602639ba Merge remote-tracking branch 'origin/master' into develop 2023-06-12 16:13:53 +02:00
luca.mazzoleni 260b8f36bb Merge remote-tracking branch 'origin/master' into Feature/DangerousReliefCutsFix 2023-06-12 15:03:56 +02:00
DarioS 397251e9a3 DataBeam :
- correzione a precedente modifica su svuotatura di LapJoint.
2023-06-12 09:03:14 +02:00
luca.mazzoleni 0e0c78edf4 Merge branch 'develop' into Feature/DangerousReliefCutsFix 2023-06-08 11:11:27 +02:00
luca.mazzoleni 187a211491 Merge branch 'master' into develop 2023-06-08 11:10:58 +02:00
luca.mazzoleni 5e9ff056c2 Merge remote-tracking branch 'origin/master' into Feature/DangerousReliefCutsFix 2023-06-08 11:10:05 +02:00
DarioS 1f0905a34a DataBeam 2.5f1 :
- in Process (esecuzione manuale da Cam5) ordinamento travi di lunghezza praticamente uguale dipende da ordine di selezione
- in LongDoubleCut corretta scelta SCC (orientamento braccio testa) per macchine TURN nel caso di concavi
- in LapJoint limiti su svuotature tasche a L 4 facce come per L 3 facce
- in LapJoint su svuotature aggiunto recupero UserNotes da libreria per MaxOptSize.
2023-06-08 08:11:26 +02:00
luca.mazzoleni dbbdd9f0df funzionamento ok, da testare 2023-06-06 11:13:54 +02:00
luca.mazzoleni df1cb76993 Check per deicidere se fare taglio standard o speciale 2023-06-05 10:25:57 +02:00
luca.mazzoleni 6ee6ebd9be Merge branch 'master' into develop 2023-05-31 11:10:25 +02:00
DarioS 868161df0b DataBeam :
- correzione a foratura per fori annegati nel pezzo e quindi da non fare (quale è il vero ingresso ?)
- riconoscimento fori da sotto anche dalla faccia di ingresso
- in foratura se TURN aggiunta possibilità di forare da sotto
- correzioni a Profili Concavo e Convesso per TURN.
2023-05-26 08:37:02 +02:00
DarioS 240f2959fc Merge commit '5e5a4461ac373dc812c40fa8dec191998b0bc3c5' 2023-05-24 10:22:46 +02:00
luca.mazzoleni 5e5a4461ac update log 2023-05-23 14:59:09 +02:00
luca.mazzoleni 4eec2dcf19 Merge remote-tracking branch 'origin/master' into develop 2023-05-23 11:42:08 +02:00
DarioS c457ff9acf DataBeam :
- in LongCut migliorato calcolo e verifica affondamento per lavorazione con lama con codolo in mezzo
- in LongDoubleCut correzioni per TURN.
2023-05-23 09:31:14 +02:00
DarioS 5f9fc0b975 DataBeam 2.5e4 :
- modifiche per problemi su TURN (aggiustamenti su SCC).
2023-05-18 08:20:28 +02:00
DarioS 51261d1231 DataBeam :
- per le lavorazioni in doppio e precedenti no oppure di tipo diverso, forzo risalita a Zmax (per evitare possibili collisioni nel riposizionamento diretto della seconda testa).
2023-05-11 17:23:08 +02:00
DarioS 7f807d6114 DataBeam 2.5e3 :
- correzione riconoscimento per possibile lavorazione in doppio di tasche che si toccano sul fondo (ovviamente non possibili in doppio)
- in taglio di separazione aggiunta richiesta risalita preliminare a Zmax quando da sopra su macchine PF e ONE
- dopo aver fatto rotazioni e inversioni dei pezzi cambio chiave Info relative per evitare di rifarle se si parte da Nge e non da Btl.
2023-05-11 09:34:48 +02:00
luca.mazzoleni cbccd14b64 Merge branch 'master' into develop 2023-05-09 11:43:03 +02:00
luca.mazzoleni ac58afc627 Merge branch 'develop' 2023-05-04 18:09:02 +02:00
luca.mazzoleni 1d68e47bdf update log e versione 2023-05-04 18:08:51 +02:00
luca.mazzoleni 1d802852bd piccola modifica a SCC per LongCut derivanti da Cut 2023-05-04 18:06:55 +02:00
luca.mazzoleni 01386ce711 update log 2023-05-04 12:05:27 +02:00
luca.mazzoleni 4c4ae7bb6f Merge branch 'master' into develop 2023-05-03 15:54:00 +02:00
luca.mazzoleni b66bd700f4 Merge branch 'develop' 2023-05-03 15:45:34 +02:00
luca.mazzoleni 1c93a079bd update version 2023-05-03 15:45:22 +02:00
luca.mazzoleni 000454139d Merge branch 'release/2.5e1' 2023-05-03 15:23:19 +02:00
luca.mazzoleni b460b2c7a4 Merge tag '2.5e1' into develop
Finish Release: 2.5e1
2023-05-03 15:23:19 +02:00
luca.mazzoleni 65c344bb30 Merge branch 'BugFix/LongCutSccFix' into develop 2023-05-03 15:17:05 +02:00
luca.mazzoleni 587f4c61e2 - in Longcut corretto SCC in caso di asse utensile allineato con Z
- tolleranza su sezione portata a 0.1 mm anche per BatchProcess vecchia
2023-05-03 15:13:28 +02:00
luca.mazzoleni cc63560b19 Merge branch 'master' into develop 2023-04-26 09:46:59 +02:00
DarioS d6813e4efa DataBeam :
- modifica a LongCut per orientamento direzione ausiliaria testa con lama.
2023-04-24 16:42:36 +02:00
luca.mazzoleni 18ebaf8a16 update log modifiche 2023-04-21 09:18:31 +02:00
luca.mazzoleni 60c489f70b Merge remote-tracking branch 'origin/master' into develop 2023-04-21 09:18:01 +02:00
DarioS 270bca6bcc DataBeam :
- in tagli di testa e coda aumentato appena (10.123) spessore minimo applicazione cubetti speciali
- in tagli di coda cubetti speciali rimesse note lavorazione 'PreCut;' e 'Cut;'
- in tagli di coda cubetti speciali rimessa restituzione 3° parametro nNewPhase
- in tagli longitudinali per macchine PF (BD.C_SIMM) modificata assegnazione SCC.
2023-04-20 21:39:57 +02:00
luca.mazzoleni 8ae94c1de6 Merge tag '2.5d2' into develop
Finish Release: 2.5d2
2023-04-20 17:41:40 +02:00
luca.mazzoleni 3ec836ad9a Merge branch 'release/2.5d2' 2023-04-20 17:41:40 +02:00
luca.mazzoleni 479a28afb8 update versione 2023-04-20 17:40:27 +02:00
luca.mazzoleni 9cfccc29d6 Merge branch 'master' of https://gitlab.steamware.net/egaltech/DataBeam into develop 2023-04-20 16:27:10 +02:00
luca.mazzoleni c344493daf aggiunto settings di vs code a gitignore 2023-04-20 16:21:04 +02:00
luca.mazzoleni 9f68bbfeaf Merge branch 'Feature/HorizontalCutsForHeadCutAndSplit' into develop 2023-04-20 16:14:50 +02:00
luca.mazzoleni 60a3731aa3 Feature/HorizontalCutsForHeadCutAndSplit:
- corretto calcolo lead in e lead out in FacesBySaw per gestire faceuse paralleli
- corretto calcolo spessore materiale in coda
- commenti
2023-04-20 15:11:09 +02:00
luca.mazzoleni 8c1b8cb346 Feature/HorizontalCutsForHeadCutAndSplit:
- in HeadCut e Split implementati tagli orizzontali per travi alte per ridurre le dimensioni dei ritagli
- da sistemare calcolo allungamenti nel FacesBySaw che sbaglia con spessori elevati materiale da rimuovere
2023-04-19 18:41:02 +02:00
luca.mazzoleni 3236f8bf73 Merge branch 'Feature/LongCutSCCManagement' into develop 2023-04-18 11:27:27 +02:00
luca.mazzoleni 47f716b3c1 - commenti e piccole correzioni 2023-04-17 17:45:12 +02:00
luca.mazzoleni 81a12d2e98 - in LongCut aggiunta gestione Turn e tagli provenienti da ProcessCut 2023-04-14 18:48:37 +02:00
luca.mazzoleni 3376f50024 - LongCut completa, manca solamente integrazione Turn nella funzione GetSCC
- varie migliorie
2023-04-12 18:17:46 +02:00
luca.mazzoleni e3a42ec170 - alcune correzioni
- gestiti casi inversione e workside per fresa
- rimane ancora da gestire la direzione di lavoro con bAreCuttingStepsTowardsHead
2023-04-11 15:24:20 +02:00
luca.mazzoleni d88dea71d8 Commit modifiche parziali, in LongCut:
- funzione GetSCC per trovare la direzione SCC ottimale in tutti i casi
- da aggiungere casi per Turn in GetSCC
- da aggiungere gestione Invert e WS in tutti i casi, per poter usare la funzione GetSCC
2023-04-11 09:41:01 +02:00
luca.mazzoleni 5942332de8 Merge branch 'develop' 2023-04-06 15:59:31 +02:00
luca.mazzoleni 64020f1f8d update log modifiche 2023-04-06 15:58:05 +02:00
luca.mazzoleni 4578d461e0 Merge branch 'release/2.5d1' 2023-04-05 17:13:40 +02:00
luca.mazzoleni c9d25b6ee9 Merge tag '2.5d1' into develop
Finish Release: 2.5d1
2023-04-05 17:13:40 +02:00
luca.mazzoleni 3be734753a Merge branch 'master' of https://gitlab.steamware.net/egaltech/DataBeam into develop 2023-04-05 17:13:12 +02:00
luca.mazzoleni f0c1c37bc5 correzione typo nome variabile 2023-04-05 17:10:19 +02:00
DarioS 8949a511ee DataBeam :
- in taglio con lama piccola miglioria nella scelta della direzione di approccio per pezzi corti.
2023-04-05 15:56:45 +02:00
luca.mazzoleni e7619caaaf Merge branch 'master' into develop 2023-04-05 09:20:08 +02:00
DarioS ec69624941 DataBeam 2.5d1 :
- aggiornata versione.
2023-04-05 08:55:42 +02:00
DarioS aba419a16e DataBeam :
- modifiche a Split per travi con sezioni molto grandi e materiale inferiore allo spessore lama
- aggiunta possibilità di minima sicurezza su attacco da lato aperto per svuotatura.
2023-04-04 12:56:30 +02:00
luca.mazzoleni 7db7ff1226 Merge branch 'master' into develop 2023-04-03 18:39:58 +02:00
luca.mazzoleni 40dd008318 HotFix: correzione per gestire la lama principale sulla testa secondaria e questa non è una testa da sotto 2023-04-03 18:00:48 +02:00
luca.mazzoleni 30f1a156d6 Merge remote-tracking branch 'origin/master' into develop 2023-04-03 16:21:06 +02:00
DarioS 5e581096aa DataBeam :
- corretto ordinamento per fori di coda da lasciare in coda.
2023-04-03 10:09:52 +02:00
luca.mazzoleni 376f85d1f9 Fix: In LapJoint correzione al calcolo della distanza di collisione nel caso in cui il gambo sia più piccolo dell'utensile. 2023-03-31 14:59:46 +02:00
luca.mazzoleni 2124c7a25a Merge branch 'master' into develop 2023-03-30 12:33:59 +02:00
luca.mazzoleni ef37486f34 update log modifiche 2023-03-30 12:33:47 +02:00
luca.mazzoleni 711e6832c1 update log modifiche 2023-03-30 09:45:58 +02:00
luca.mazzoleni 6eb3cd6429 Update versione 2023-03-30 09:32:48 +02:00
luca.mazzoleni 091d710014 Merge branch 'develop' 2023-03-30 09:30:40 +02:00
luca.mazzoleni 3f3e4db7f4 aggiunto UpdateLog specifico per Beam 2023-03-30 09:30:30 +02:00
luca.mazzoleni dc2ea77a42 Merge branch 'release/2.5c8' 2023-03-30 09:18:49 +02:00
luca.mazzoleni 13c03ff601 Merge tag '2.5c8' into develop
Finish Release: 2.5c8
2023-03-30 09:18:49 +02:00
luca.mazzoleni 9f73a85cd8 Merge remote-tracking branch 'origin/master' into develop 2023-03-29 08:52:12 +02:00
DarioS 61f69ad50a DataBeam :
- in lavorazione DtMortise corretto calcolo larghezza della mortasa per derivare numero e step passate.
2023-03-28 19:02:33 +02:00
luca.mazzoleni 16c3d8467d Merge branch 'master' into develop 2023-03-28 15:05:13 +02:00
DarioS df75f1c760 DataBeam :
- in DtTenon corretto calcolo distanza di lato da lavorare quando faccia di base divisa in più parti.
2023-03-28 13:41:44 +02:00
luca.mazzoleni 23afe7b256 Merge remote-tracking branch 'origin/master' into develop 2023-03-27 18:56:33 +02:00
DarioS d5ebc24bf5 DataBeam :
- piccola miglioria nel calcolo altezza tenone.
2023-03-27 18:21:04 +02:00
luca.mazzoleni dd21a0ec16 - in ProcessTenon e ProcessDtTenon migliorate e unificate condizioni scelta pretaglio con lama o fresa 2023-03-27 13:02:31 +02:00
luca.mazzoleni 58c7d86f6b Merge remote-tracking branch 'origin/master' into develop 2023-03-24 09:13:04 +01:00
DarioS 641bf33e4b DataBeam :
- modifica ingombro tagli inclinati per macchine con trascinatori tipo PF (BD.PRESS_ROLLER).
2023-03-23 20:46:10 +01:00
DarioS 3af41a8d4d DataBeam :
- modifica per fare le mortase a coda di rondine prima dei tagli longitudinali indipendentemente dalla sovrapposizione in Y.
2023-03-23 19:06:50 +01:00
luca.mazzoleni 9ec91b1409 Merge tag '2.5c7' into develop
Finish Release: 2.5c7
2023-03-23 12:44:41 +01:00
luca.mazzoleni 79153f9051 Merge branch 'release/2.5c7' 2023-03-23 12:44:41 +01:00
luca.mazzoleni d486caa1a9 2.5c7 :
- Correzioni a LongCut e LongDoubleCut a seguito di ottimizzazione delle direzioni di avanzamento
2023-03-23 12:42:28 +01:00
luca.mazzoleni e07dfbe0f3 Merge remote-tracking branch 'origin/master' into develop 2023-03-23 12:29:32 +01:00
DarioS 33668827f7 DataBeam 2.5c6 :
- migliorato riconoscimento e gestione lati aperti
2023-03-22 17:32:37 +01:00
luca.mazzoleni 8abea3a099 Merge remote-tracking branch 'origin/master' into develop 2023-03-22 12:27:18 +01:00
DarioS 1ff8907b96 DataBeam :
- aggiornata gestione compilazione e copia in rete come Wall.
2023-03-21 17:07:14 +01:00
DarioS 274ad495bc DataBeam :
- aggiunti a Version.lua NAME e MIN_EXE.
2023-03-21 10:16:25 +01:00
DarioS 660d25ffc7 Merge remote-tracking branch 'origin/develop' 2023-03-20 15:59:41 +01:00
Samuele Locatelli b51737173e typo 2023-03-20 15:24:58 +01:00
Samuele Locatelli fc8dff216d Fix netuse x correzione copia su R: 2023-03-20 15:19:04 +01:00
luca.mazzoleni 5792c3111d fix 2023-03-16 12:39:32 +01:00
luca.mazzoleni cdfbd188fa 2.5c5 (errato 2.5c4 precedente) 2023-03-16 11:09:22 +01:00
luca.mazzoleni 4e98d2a2a4 Piccola correzione 2023-03-16 11:01:49 +01:00
luca.mazzoleni f4d9224d8d 2.5c4 2023-03-16 09:38:33 +01:00
luca.mazzoleni 40c277b95d In LongCut modifica alla lavorazione ulteriore con sega a catena per togliere il codolo e lasciare solo dei punti di supporto 2023-03-16 09:33:28 +01:00
luca.mazzoleni 04e487f782 Merge remote-tracking branch 'origin/master' into develop 2023-03-13 17:50:23 +01:00
DarioS 62e2cc8375 DataBeam 2.5c4 :
- modifiche a lavorazioni con frese che non lavorano di testa per avere nota OutRaw invece di StartOutRaw.
2023-03-13 17:13:46 +01:00
DarioS c78bc69dd1 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam 2023-03-11 10:12:17 +01:00
luca.mazzoleni 2db0d38ccb Merge remote-tracking branch 'origin/master' into develop 2023-03-10 09:09:50 +01:00
DarioS 89fb2101bf DataBeam 2.5c3 :
- gestione ingresso nel grezzo iniziale ma non in quello dinamico per tenoni.
2023-03-10 08:56:46 +01:00
DarioS 40f5c67bf5 DataBeam :
- su FAST allargate possibilità lama downup
- modifiche per controlli aggiunti su utensili NoTipMove.
2023-03-08 08:53:15 +01:00
luca.mazzoleni b6de243461 Merge tag 'LongCut2' into develop
2.5c2 - fix versione
2023-03-06 18:31:08 +01:00
luca.mazzoleni cc5d1f3e52 Merge branch 'hotfix/LongCut2' 2023-03-06 18:31:08 +01:00
luca.mazzoleni 8491922f6d 2.5c2 2023-03-06 18:30:53 +01:00
luca.mazzoleni aede7c527f Merge tag 'LongCut' into develop
2.5c2: hotfix - in LongCut, LongDoubleCut correzione accorciamenti e allungamenti
2023-03-06 18:27:03 +01:00
luca.mazzoleni bab5cb6fd4 Merge branch 'hotfix/LongCut' 2023-03-06 18:27:02 +01:00
luca.mazzoleni de6ffa3d73 in LongCut, LongDoubleCut correzione accorciamenti e allungamenti 2023-03-06 18:26:16 +01:00
luca.mazzoleni 4c4ac340fb Merge remote-tracking branch 'origin/master' into develop 2023-03-03 12:42:56 +01:00
DarioS bf454d6c0f DataBeam 2.5c1 :
- in FreeContour corretta gestione Mark (crash per box non definiti).
2023-03-03 12:23:12 +01:00
luca.mazzoleni abfbc2184f Merge remote-tracking branch 'origin/master' into develop 2023-02-27 17:37:03 +01:00
DarioS 4bbef85875 DataBeam 2.5b3 :
- aggiunto Version.lua.
2023-02-27 17:32:15 +01:00
luca.mazzoleni 09b7496b9d Fix: miglioria per direzione asse C FAST con lama anche su LongDoubleCut -2.5b4 2023-02-24 16:40:28 +01:00
luca.mazzoleni 24bc868527 Merge branch 'master' into develop 2023-02-24 09:36:41 +01:00
DarioS 8e8caf511a DataBeam :
- piccola miglioria per direzione asse C FAST su LongCut con lama.
2023-02-23 20:43:09 +01:00
luca.mazzoleni 73cac99934 fix ramo master 2023-02-23 19:44:37 +01:00
luca.mazzoleni 533575b916 Revert "Merge branch 'develop'"
This reverts commit 5532174bf6, reversing
changes made to 9aaaa5c1b1.
2023-02-23 19:39:52 +01:00
luca.mazzoleni 5532174bf6 Merge branch 'develop' 2023-02-23 19:38:05 +01:00
luca.mazzoleni cdab041283 Merge branch 'Improvement/LongCutBetterFeedDirection' into develop 2023-02-23 19:34:11 +01:00
luca.mazzoleni e303f8205d Improvement/LongCutBetterFeedDirection:
- fix inversione allungamenti / accorciamenti
2023-02-23 19:32:29 +01:00
luca.mazzoleni 9aaaa5c1b1 Revert "Merge branch 'develop' - 2.5b3"
This reverts commit 6ae3f987af, reversing
changes made to 0d8ac98869.
2023-02-23 19:19:53 +01:00
luca.mazzoleni 6ae3f987af Merge branch 'develop' - 2.5b3 2023-02-23 18:56:44 +01:00
luca.mazzoleni f03d4c08af Merge branch 'Improvement/LongCutBetterFeedDirection' into develop - 2.5b3 2023-02-23 18:12:54 +01:00
luca.mazzoleni 90b1215f31 Improvement/LongCutBetterFeedDirection:
- fix commenti
2023-02-23 15:59:50 +01:00
luca.mazzoleni 2e25eb86e3 Improvement/LongCutBetterFeedDirection:
- in LongCut e LongDoubleCut nuova gestione del verso di avanzamento ottimale che contempla tutti i casi
2023-02-23 15:01:29 +01:00
luca.mazzoleni 0a1c80d764 Improvement:
- in LongCut e LongDoubleCut migliorato il verso di avanzamento della lama anche per lama LC
2023-02-21 15:51:41 +01:00
luca.mazzoleni 1077d19eea BugFix:
- in LapJoint corretto il ritorno della funzione MakeByPockets
2023-02-21 12:06:02 +01:00
luca.mazzoleni 1ac895439b Improvement:
- Ora le mortase a coda di rondine laterali sono sempre fatte prima dei tagli longitudinali, se secanti.
2023-02-20 18:32:25 +01:00
luca.mazzoleni d74091d7f3 Merge branch 'master' into develop 2023-02-20 18:30:35 +01:00
DarioS 0d8ac98869 DataBeam :
- modifica a direzione limite in Y per invertire tagli perpendicolari di cubetti.
2023-02-20 12:24:39 +01:00
luca.mazzoleni 8b231d7fd3 Merge branch 'develop' 2023-02-17 18:45:53 +01:00
luca.mazzoleni 36bff56509 Improvement:
- Nelle tasche in doppio la distanza minima ammessa tra le feature è stata portata a 50.
2023-02-17 18:36:51 +01:00
luca.mazzoleni 29eb50649d Merge branch 'develop' 2023-02-17 15:08:59 +01:00
luca.mazzoleni bd503764ed Improvement:
- ora le forature che intersecano le mortase sono sempre fatte prima della mortasa stessa
2023-02-17 12:21:33 +01:00
DarioS ad63364303 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam 2023-02-16 16:54:03 +01:00
DarioS 261f4115f4 Merge branch 'master' of https://gitlab.steamware.net/egaltech/DataBeam 2023-02-16 16:53:28 +01:00
luca.mazzoleni d945e92272 Fix commenti 2023-02-16 11:58:37 +01:00
luca.mazzoleni 58dd72c963 Improvement:
- in LapJoint altra piccola correzione alla scelta utensile di svuotatura
2023-02-16 11:57:11 +01:00
luca.mazzoleni d4ed2d651f Improvement:
- in LapJoint piccola correzione alla scelta utensile di svuotatura
2023-02-16 10:28:29 +01:00
luca.mazzoleni 82d80616f1 Merge branch 'develop' 2023-02-15 19:01:09 +01:00
DarioS 05be6f1d89 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam 2023-02-15 18:21:33 +01:00
luca.mazzoleni 0487b0ac9a Improvement:
- in LongCut e LongDoubleCut migliorato il verso di avanzamento della lama
2023-02-15 13:17:01 +01:00
luca.mazzoleni 580ff476e2 FIx:
- in ScarfJoint, SimpleScarf, StepJoint gestite le rotazioni di 90 deg nell'aggiornamento del grezzo
2023-02-15 09:37:19 +01:00
luca.mazzoleni ce3b623c14 Merge branch 'develop' 2023-02-14 17:02:33 +01:00
luca.mazzoleni 4d57cc7c5b Improvement:
- in FacesBySaw migliorata la direzione di lavoro della lama in modo da essere tendenzialmente opposta all'avanzamento
2023-02-14 15:28:39 +01:00
luca.mazzoleni fb57f47258 Merge branch 'develop' 2023-02-09 17:11:02 +01:00
luca.mazzoleni dc301910e1 Improvement:
- Improvement:
- in ProcessDtTenon ampliato il range dei tenoni lavorabili in sottosquadro
2023-02-09 16:01:49 +01:00
luca.mazzoleni 1a1a5192ee Improvement:
- in ProcessDtTenon permessi tenoni dal basso anche se pezzo stretto e inclinazione laterale non eccessiva
2023-02-08 18:54:24 +01:00
luca.mazzoleni 2561f79c39 Merge branch 'develop' 2023-02-06 18:29:34 +01:00
luca.mazzoleni 123a983c75 Improvement:
- in LapJoint->MakeDrillOnCorner aggiunto controllo distanza di sicurezza minima
2023-02-06 16:21:58 +01:00
luca.mazzoleni b9ceef6f31 Merge remote-tracking branch 'origin/master' into develop 2023-02-06 09:28:01 +01:00
DarioS 39b72e3ab9 DataBeam :
- in DiceCut migliorato calcolo step tagli ortogonali
- in taglio con lama migliorata scelta attacco e uscita ortogonali o tangenti.
2023-02-06 08:31:48 +01:00
luca.mazzoleni 750ddd2c05 Merge remote-tracking branch 'origin/HEAD' into develop 2023-02-01 08:21:12 +01:00
DarioS 279a83b1f4 DataBeam :
- piccola modifica.
2023-01-31 21:01:23 +01:00
luca.mazzoleni e6704addb0 Merge branch 'master' into develop 2023-01-31 18:33:06 +01:00
DarioS 890b2a36e6 DataBeam :
- piccola modifica a messaggi di errore ( 'Clamp move error ' -> 'Special error ').
2023-01-31 18:31:38 +01:00
luca.mazzoleni 4468e24bb9 Merge branch 'develop' 2023-01-31 18:06:47 +01:00
luca.mazzoleni ae4cd29853 Merge branch 'Feature/FindMirroredFeatures' into develop 2023-01-31 17:36:55 +01:00
luca.mazzoleni 72e653fe4b Feature/FindMirroredFeatures:
- lieve bugfix
2023-01-31 17:36:39 +01:00
luca.mazzoleni 478288b018 Merge branch 'Feature/FindMirroredFeatures' into develop 2023-01-31 15:36:39 +01:00
luca.mazzoleni 14d2d14ba4 Feature/FindMirroredFeatures:
- aggiunta una minima distanza tra le feature specchiate al di sotto della quale la lavorazione non viene fatta in doppio
- alcuni bugfix minori
2023-01-31 15:23:44 +01:00
luca.mazzoleni f3d54fd124 Feature/FindMirroredFeatures:
- aggiunta gestione mortise L050/L051 in doppio
2023-01-31 09:20:05 +01:00
luca.mazzoleni a357faeabe Merge branch 'develop' into Feature/FindMirroredFeatures 2023-01-31 08:55:07 +01:00
luca.mazzoleni bbd04a33a2 Merge branch 'develop' 2023-01-27 18:28:52 +01:00
luca.mazzoleni 4b531271af Improvement:
- in LongCut con lavorazione aggiuntiva di sega a catena aggiunti step parziali per la lavorazione con lama da sotto
2023-01-27 17:31:07 +01:00
luca.mazzoleni 8bde91b13c Merge remote-tracking branch 'origin/master' into develop 2023-01-27 12:13:55 +01:00
luca.mazzoleni b21cc7a85b Fix:
- in LongCut e Long2Cut, nella pulitura della faccia laterale, lead out fissato a 10 mm
2023-01-27 10:21:40 +01:00
luca.mazzoleni c40f03e8a4 Fix minore 2023-01-26 17:18:47 +01:00
DarioS 59bfbd3bbe Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam 2023-01-26 17:18:42 +01:00
luca.mazzoleni 7beee74638 Bugfix minore 2023-01-26 17:13:05 +01:00
luca.mazzoleni 6eef34f1ef Fix:
- in longCut/longDoubleCut rimossa la pulitura della faccia laterale nel caso in cui la feature abbia almeno una faccia rivolta verso il basso
2023-01-26 16:30:58 +01:00
luca.mazzoleni 0738cde565 Merge remote-tracking branch 'origin/master' into develop 2023-01-26 15:03:16 +01:00
DarioS 4be2686584 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam 2023-01-26 12:41:15 +01:00
DarioS 4bd7ad4263 DataBeam :
- corretta scelta lavorazione per macchine con due teste solo da sopra (PF e PFrl)
- modifica a LapJoint trasversale stretto, se la lavorazione non genera toolpath allora si passa a tentare con la lama
- in Split aggiunto controllo per evitare sqrt di valori negativi.
2023-01-26 12:40:55 +01:00
luca.mazzoleni 1a2675ed56 fix commenti 2023-01-26 09:38:42 +01:00
luca.mazzoleni aa8fd354d9 Improvement:
- in ProcessCut migliorata in alcuni casi la direzione di lavoro della lama, per scaricare il truciolo nella direzione ottimale
- in ProcessLapJoint leggera correzione al diametro massimo utensile per tasche 3 facce a L
2023-01-26 09:35:40 +01:00
luca.mazzoleni 89b968f0d1 Fix:
- in LapJoint piccola modifica al diametro massimo dell'utensile per tasche 3 facce a L
2023-01-25 14:43:35 +01:00
luca.mazzoleni d5fdf37c9c BugFix:
- in LapJoint -> MakeByPocket gestito caso in cui poteva essere applicata una lavorazione con percorso vuoto
2023-01-25 09:26:11 +01:00
luca.mazzoleni ab67c86657 Merge branch 'master' into develop 2023-01-23 08:53:02 +01:00
DarioS ca9fa091cc DataBeam :
- aggiunta funzione BeamLib.GetDistanceToNextPart per facilitare controllo di non rovinare parti in coda su lavorazioni longitudinali
- utilizzata in LongCut, LongDoubleCut e in LapJoint dove serve.
2023-01-22 16:12:50 +01:00
DarioS 60a00a81fa DataBeam :
- in lavorazione Tenoni modificata scelta lato di attacco per pezzo piccolo su macchine con pinza speciale (pinza 5)
- in lavorazione LapJoint (sottospecie L020) migliorato riconoscimento caso Special3faces
- estesa funzione di libreria PutStartNearestToEdge per gestire lato preferito come Y+, Y-, z*, Z-.
2023-01-21 10:02:28 +01:00
luca.mazzoleni bd870c8ac6 Fix:
- in LongCut azzerato il sovramateriale lasciato dalla eventuale lavorazione aggiuntiva di sega a catena
2023-01-20 16:20:35 +01:00
luca.mazzoleni 623fd30a6c Merge branch 'Feature/L010MillStopIfUnloadableRawPiece' into develop 2023-01-20 15:34:29 +01:00
luca.mazzoleni 4c239cf6a7 Feature/L010MillStopIfUnloadableRawPiece:
- ora la LongCut accorcia il percorso del truciolatore se il grezzo rimanente è scaricabile
2023-01-20 14:56:57 +01:00
luca.mazzoleni bc6886394e BugFix:
- in ProcessLapJoint->MakeMoreFaces->MakeBySideMill aggiunto controllo che lo step finale non superi lo spessore utensile
2023-01-19 11:15:04 +01:00
luca.mazzoleni b4369e92ff Merge branch 'Feature/T010LongCutsFinishWithChainSaw' into develop 2023-01-18 18:16:04 +01:00
luca.mazzoleni aeef0a7180 Feature/T010LongCutsFinishWithChainSaw: Fix minore 2023-01-18 18:15:49 +01:00
luca.mazzoleni 6271975662 Feature/T010LongCutsFinishWithChainSaw: Fix minore 2023-01-18 14:58:50 +01:00
luca.mazzoleni 8709ea7646 Feature/T010LongCutsFinishWithChainSaw:
- aggiunta, per longcut da T010, lavorazione aggiuntiva con sega a catena nel caso la doppia lama non sia sufficiente.
Attivabile con valore opportuno di Q05
2023-01-18 11:56:07 +01:00
luca.mazzoleni a9be5bf51e Merge remote-tracking branch 'origin/master' into develop 2023-01-17 15:43:57 +01:00
DarioS 2f329961ba DataBeam :
- correzione al Nesting 1D.
2023-01-17 11:44:36 +01:00
luca.mazzoleni 1e71fd5c9f Merge remote-tracking branch 'origin/master' into develop 2023-01-12 09:04:16 +01:00
DarioS 5d6140fac3 DataBeam :
- aggiornata lista file da ignorare.
2023-01-11 19:27:28 +01:00
DarioS 6b27b7f0f8 DataBeam :
- compilazione 32 e 64 bit unificata in bin.
2023-01-11 19:23:49 +01:00
luca.mazzoleni a1b140c15e Merge branch 'master' into develop 2023-01-11 09:20:25 +01:00
DarioS e91ee09ac9 DataBeam :
- modifiche a gestione StepJointNotch (3/4-80-X).
2023-01-11 09:12:44 +01:00
luca.mazzoleni 07e07028a4 Merge branch 'develop' 2023-01-10 18:38:18 +01:00
luca.mazzoleni 2523475a06 fix commenti 2023-01-10 16:48:15 +01:00
luca.mazzoleni 3c5faceedf BugFix:
- in BeamLib.GetFaceWithMostAdj aggiunto controllo che la feature abbia almeno una faccia aperta
2023-01-10 16:46:55 +01:00
luca.mazzoleni 6adea859ce Merge branch 'master' into develop 2023-01-10 09:14:31 +01:00
DarioS 6996c5617e DataBeam :
- piccola modifica per rendere più robusti i calcoli.
2023-01-10 08:46:19 +01:00
luca.mazzoleni 8dddb4cc35 Fix dopo merge 2023-01-09 10:34:58 +01:00
luca.mazzoleni 0c6b36ed49 Merge branch 'master' into develop 2023-01-09 10:26:47 +01:00
DarioS 10f6830cad DataBeam :
- altre piccole modifiche per rendere più robusti alcuni test.
2023-01-09 09:54:15 +01:00
DarioS ab5dfef3eb DataBeam :
- piccola correzione delle precedenti modifiche.
2023-01-07 16:14:40 +01:00
DarioS 4cb7dce121 DataBeam :
- allineamento tra master e develop
- modifiche per lavorazioni in doppio su PF1250.
2023-01-07 11:05:04 +01:00
luca.mazzoleni 0ec9661d9a Feature/FindMirroredFeatures:
- fix commenti
2022-12-28 19:26:51 +01:00
luca.mazzoleni 75a4b30d18 Merge branch 'Feature/FindMirroredFeatures' into develop 2022-12-28 19:18:48 +01:00
luca.mazzoleni b60c76e64b Feature/FindMirroredFeatures:
- piccola correzione nel riconoscimento mortase specchiate
2022-12-28 19:18:35 +01:00
luca.mazzoleni 8e037e0943 Feature/FindMirroredFeatures:
- per le forature in doppio aggiunto controllo attivazione e lunghezza seconda punta
2022-12-28 19:02:03 +01:00
luca.mazzoleni 966d3a794a Merge remote-tracking branch 'origin/develop' into Feature/FindMirroredFeatures 2022-12-27 09:45:40 +01:00
Emmanuele Sassi b9c2a2e1b9 Merge branch 'develop' of https://gitlab.steamware.net/egaltech/DataBeam into develop 2022-12-23 17:57:59 +01:00
Emmanuele Sassi cb70e2a47d - nuovo nesting che fa piu' tentativi con diversi indici di pezzi piccoli 2022-12-23 17:57:10 +01:00
luca.mazzoleni c7b5570dd8 Feature/FindMirroredFeatures:
- aggiunto riconoscimento forature da fare in doppio, da testare
- aggiunto riconoscimento code di rondine in doppio, da testare
- in caso di riconoscimento lavorazione in doppio si scrivono le opportune note nella lavorazione
2022-12-22 19:04:52 +01:00
DarioS 4445ce4f11 DataBeam :
- modifiche a LapJoint per lavorazione fessure in X con SideMillAsSaw
- eliminato modulo sperimentale.
2022-12-22 09:57:48 +01:00
luca.mazzoleni 527bb52aba Merge remote-tracking branch 'origin/master' into Feature/FindMirroredFeatures 2022-12-22 09:11:56 +01:00
DarioS 0d5e2737e4 DataBeam :
- su Tenoni aggiunta gestione smusso, migliorata scelta tra sopra e sotto per il punto di inizio e in VerifyOrientation aggiunta trave medio alta
- su SawCut aggiunta gestione testa da sotto
- su Cut allargati i limiti di lunghezza per tagli verticali inclinati di fianco.
2022-12-21 09:42:33 +01:00
luca.mazzoleni e513a43ae9 Merge branch 'develop' into Feature/FindMirroredFeatures 2022-12-16 14:58:29 +01:00
luca.mazzoleni 8a58bf0fa6 Merge branch 'Feature/SideMillOnL20' into develop 2022-12-16 14:53:38 +01:00
luca.mazzoleni 18826b5302 Merge branch 'develop' into Feature/FindMirroredFeatures 2022-11-18 10:28:45 +01:00
luca.mazzoleni 07d3f5ffa8 Merge branch 'develop' into Feature/FindMirroredFeatures 2022-10-06 09:49:25 +02:00
luca.mazzoleni c7a9213a2c Merge branch 'develop' into Feature/FindMirroredFeatures 2022-10-05 10:50:54 +02:00
luca.mazzoleni d9f06eb07d Fix commenti 2022-10-04 17:14:51 +02:00
luca.mazzoleni d5f5eaa844 Merge branch 'develop' into Feature/FindMirroredFeatures 2022-10-04 17:01:13 +02:00
52 changed files with 12626 additions and 8457 deletions
+6 -7
View File
@@ -13,12 +13,11 @@
/Debug64
/Release64
/ipch
/bin
/obj
/.vs
/32/*.lua
/32/LuaLibs/*.lua
/32/Images/*.png
/64/*.lua
/64/LuaLibs/*.lua
/64/Images/*.png
/bin/*.lua
/bin/*.ini
/bin/LuaLibs/*.lua
/bin/Images/*.png
.vscode/settings.json
bin/Images/.placeholder
+30 -65
View File
@@ -2,100 +2,67 @@ variables:
VERS_MAIN: '1.0'
APP_NAME: 'Beam'
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_USERQ: 'steamw\egalware'
#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
.LuaCompile32: &LuaCompile32
# helper compilazione LUA a 32 e 64 bit
.LuaCompile: &LuaCompile
- |
Set-Alias lua53 C:\Tools\Lua32\luac53
Set-Alias lua54 C:\Tools\Lua32\luac54
echo "Copia file *.ini"
$FileList = Get-ChildItem("*.ini")
ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf
Copy-Item -Path $FileName -Destination 32\$FileName
echo "Copy-Item -Path $FileName -Destination 32\$FileName"
Copy-Item -Path $FileName -Destination bin\$FileName
echo "Copy-Item -Path $FileName -Destination bin\$FileName"
}
echo "Compilazione file *.lua 32bit"
echo "Compilazione file *.lua 32/64bit"
$FileList = Get-ChildItem("*.lua")
ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf
lua53 -o 32\$FileName $FileName
echo "lua53 -o 32\$FileName $FileName"
lua54 -o bin\$FileName -s $FileName
echo "lua54 -o bin\$FileName -s $FileName"
}
$FileList = Get-ChildItem("LuaLibs\*.lua")
ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf
lua53 -o 32\LuaLibs\$FileName LuaLibs\$FileName
echo "lua53 -o 32\LuaLibs\$FileName LuaLibs\$FileName"
lua54 -o bin\LuaLibs\$FileName -s LuaLibs\$FileName
echo "lua54 -o bin\LuaLibs\$FileName -s LuaLibs\$FileName"
}
# Copy-Item -Path $FileName -Destination 32\$FileName
# echo "Copy-Item -Path $FileName -Destination 32\$FileName"
# helper compilazione LUA a 64 bit
.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
# helper copia SORGENTI verso cartella di rete X:\ dei SORGENTI
.CodeReplicaR: &CodeReplicaR
- |
net use R: /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
net use X: /delete
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 R:\ delle cartelle 32 e 64
# helper copia script verso cartella di rete X:\ delle cartelle bin
.ReplicaR: &ReplicaR
- |
net use R: /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
net use X: /delete
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 Z:\ delle cartelle bin
.ReplicaZ: &ReplicaZ
- |
net use Z: /delete
SLEEP 2
net use Z: $env:NET_SHARE_Z /u:$env:NET_USERQ $ZDRIVE_PASSWD
ROBOCOPY /MIR 32 Z:\EgtData\$env:APP_NAME\32
ROBOCOPY /MIR 64 Z:\EgtData\$env:APP_NAME\64
ROBOCOPY /MIR Images Z:\EgtData\$env:APP_NAME\32\Images
ROBOCOPY /MIR Images Z:\EgtData\$env:APP_NAME\64\Images
ROBOCOPY /MIR bin Z:\EgtData\$env:APP_NAME\bin
ROBOCOPY /MIR Images Z:\EgtData\$env:APP_NAME\bin\Images
SLEEP 2
net use Z: /delete
@@ -110,9 +77,7 @@ LuaCompile:build:
tags:
- win
script:
- *LuaCompile32
- *LuaCompile64
- *LuaCompile
- *CodeReplicaR
- *ReplicaR
- *ReplicaZ
View File
View File
View File
+168 -20
View File
@@ -1,4 +1,4 @@
-- BatchProcess.lua by Egaltech s.r.l. 2022/04/28
-- BatchProcess.lua by Egaltech s.r.l. 2022/05/10
-- Gestione calcolo batch disposizione e lavorazioni per Travi
-- 2019/07/11 Aggiunta gestione stato rotazione di feature per TS3.
-- 2019/07/16 Aggiunta gestione modalità oltre 10 per impostazione macchina e uscita.
@@ -23,6 +23,8 @@
-- 2021/06/16 Se disponibile si aggiunge la versione dell'eseguibile alle info del programma CN.
-- 2021/08/04 Direzione vista simulazione da BD.SIMUL_VIEW_DIR se esiste.
-- 2022/04/28 In info generazione aggiunta indicazione se 64bit.
-- 2023/05/03 Tolleranza su sezione portata a 0.1 mm (100 * GEO.EPS_SMALL).
-- 2022/05/10 Dopo aver fatto rotazioni e inversioni dei pezzi cambio chiave Info relative.
-- Intestazioni
require( 'EgtBase')
@@ -57,9 +59,23 @@ end
local sLog = 'BatchProcess : ' .. BEAM.FILE .. ', ' .. BEAM.MACHINE .. ', ' .. sFlag
EgtOutLog( sLog)
-- Cancello file di log specifico
local sLogFile = EgtChangePathExtension( BEAM.FILE, '.txt')
EgtEraseFile( sLogFile)
-- in caso sia richiesta generazione senza check, verifico prima che il file log specifico non contenga errori: se sì, forzo il check
if BEAM.FLAG == 0 then
local hLogFile = io.open( sLogFile, 'r')
if hLogFile then
for line in hLogFile:lines() do
if EgtStartsWith( line, 'ERR') and tonumber( EgtSplitString( line, '=')[2] or 0) > 0 then
BEAM.FLAG = 4
break
end
end
hLogFile:close()
end
end
-- Cancello file di log specifico
EgtEraseFile( sLogFile)
-- Funzioni per scrittura su file di log specifico
local function WriteErrToLogFile( nErr, sMsg, nRot, nCutId, nTaskId)
@@ -85,6 +101,21 @@ local function WriteTimeToLogFile( dTime)
hFile:close()
end
-- Funzioni per riportare stato lavorazione o pezzo in nge
local function WriteErrToNge( nProcId, sErr, sMsg, sRot, sCutId, sTaskId)
EgtSetInfo( nProcId, 'STATUS.ERR', sErr)
EgtSetInfo( nProcId, 'STATUS.MSG', sMsg)
EgtSetInfo( nProcId, 'STATUS.ROT', sRot)
EgtSetInfo( nProcId, 'CUTID', sCutId)
EgtSetInfo( nProcId, 'TASKID', sTaskId)
end
local function WriteFallToNge( nPartId, sErr, sMsg, sCutId, sFall)
EgtSetInfo( nPartId, 'STATUS.ERR', sErr)
EgtSetInfo( nPartId, 'STATUS.MSG', sMsg)
EgtSetInfo( nPartId, 'CUTID', sCutId)
EgtSetInfo( nPartId, 'STATUS.FALL', sFall)
end
-- Funzione per gestire visualizzazione dopo errore
local function PostErrView( nErr, sMsg)
if nErr ~= 0 and ( BEAM.FLAG == 1 or BEAM.FLAG == 2) then
@@ -106,13 +137,31 @@ end
-- Funzione per aggiornare dati ausiliari
local function UpdateAuxData( sAuxFile)
local bModif = false
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL
-- Se definito LOAD90, aggiorno
local sLoad90 = EgtGetStringFromIni( 'AuxData', 'LOAD90', '', sAuxFile)
if sLoad90 ~= '' then
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL
EgtSetInfo( BtlInfoId, 'LOAD90', sLoad90)
bModif = true
end
-- Se definito UNLOAD, aggiorno
local sUnload = EgtGetStringFromIni( 'AuxData', 'UNLOAD', '', sAuxFile)
if sUnload ~= '' then
EgtSetInfo( BtlInfoId, 'UNLOAD', sUnload)
bModif = true
end
-- Se definito PROJID, aggiorno
local sProjId = EgtGetStringFromIni( 'AuxData', 'PROJID', '', sAuxFile)
if sProjId ~= '' then
EgtSetInfo( BtlInfoId, 'PROJECTNUMBER', sProjId)
bModif = true
end
-- Se definito PRODID, aggiorno
local sProdId = EgtGetStringFromIni( 'AuxData', 'PRODID', '', sAuxFile)
if sProdId ~= '' then
EgtSetInfo( BtlInfoId, 'PRODID', sProdId)
bModif = true
end
return bModif
end
@@ -198,7 +247,11 @@ if bToProcess then
EgtEraseFile( sNgeFile)
-- eseguo import
EgtNewFile()
if not EgtImportBtl( BEAM.FILE, EIB_FL.TS3_POS + EIB_FL.USEUATTR) then
local nBtlFlag = EIB_FL.TS3_POS + EIB_FL.USEUATTR
if BD.USE_PART_OFFSET then
nBtlFlag = nBtlFlag + EIB_FL.PARTOFFSET
end
if not EgtImportBtl( BEAM.FILE, nBtlFlag) then
BEAM.ERR = 13
BEAM.MSG = 'Error importing BTL file : ' .. BEAM.FILE
WriteErrToLogFile( BEAM.ERR, BEAM.MSG)
@@ -266,22 +319,26 @@ if bToProcess then
vBeam[i].PosX = PosX
end
-- Eseguo eventuali rotazioni e inversioni testa-coda
-- Se non già eseguite, applico eventuali rotazioni e inversioni testa-coda
for i = 1, #vBeam do
local b3Solid = vBeam[i].Box
-- rotazione
local dRotAng = EgtGetInfo( vBeam[i].Id, 'ROTATED', 'd')
if dRotAng and abs( dRotAng) > GEO.EPS_ANG_SMALL then
local dRotAng = EgtGetInfo( vBeam[i].Id, 'ROTATED', 'd') or 0
if abs( dRotAng) > GEO.EPS_ANG_SMALL then
local ptRotCen = b3Solid:getCenter()
EgtRotate( vBeam[i].Id, ptRotCen, X_AX(), dRotAng, GDB_RT.GLOB)
b3Solid:rotate( ptRotCen, X_AX(), dRotAng)
end
EgtRemoveInfo( vBeam[i].Id, 'ROTATED')
EgtSetInfo( vBeam[i].Id, 'ROTATED_OK', dRotAng)
-- inversione
local dInvAng = 180 - ( EgtGetInfo( vBeam[i].Id, 'INVERTED', 'd') or 0)
if abs( dInvAng) > GEO.EPS_ANG_SMALL then
local ptInvCen = b3Solid:getCenter()
EgtRotate( vBeam[i].Id, ptInvCen, Z_AX(), dInvAng, GDB_RT.GLOB)
end
EgtRemoveInfo( vBeam[i].Id, 'INVERTED')
EgtSetInfo( vBeam[i].Id, 'INVERTED_OK', 180 - dInvAng)
end
-- Ne verifico le dimensioni
@@ -291,8 +348,8 @@ if bToProcess then
for i = 2, #vBeam do
local dDimW = vBeam[i].Box:getDimY()
local dDimH = vBeam[i].Box:getDimZ()
if ( abs( dDimW - dRawW) > 10 * GEO.EPS_SMALL or abs( dDimH - dRawH) > 10 * GEO.EPS_SMALL) and
( abs( dDimH - dRawW) > 10 * GEO.EPS_SMALL or abs( dDimW - dRawH) > 10 * GEO.EPS_SMALL) then
if ( abs( dDimW - dRawW) > 100 * GEO.EPS_SMALL or abs( dDimH - dRawH) > 100 * GEO.EPS_SMALL) and
( abs( dDimH - dRawW) > 100 * GEO.EPS_SMALL or abs( dDimW - dRawH) > 100 * GEO.EPS_SMALL) then
table.insert( vBeamErr, i)
end
end
@@ -334,7 +391,7 @@ if bToProcess then
end
end
-- Verifico sezione barra non troppo piccola
-- Verifico sezione barra non troppo piccola
if dRawW < BD.MIN_WIDTH - 10 * GEO.EPS_SMALL or dRawH < BD.MIN_HEIGHT - 10 * GEO.EPS_SMALL then
local sOut = 'Sezione (' .. EgtNumToString( dRawW, 2) .. ' x ' .. EgtNumToString( dRawH, 2) .. ') ' ..
'sotto i limiti della macchina (' .. EgtNumToString( BD.MIN_WIDTH, 2) .. ' x ' .. EgtNumToString( BD.MIN_HEIGHT, 2) .. ')'
@@ -344,6 +401,63 @@ if bToProcess then
PostErrView( BEAM.ERR, BEAM.MSG)
return
end
-- Se presente offset da btl, verifico se offset uguale per tutti i pezzi
if BD.USE_PART_OFFSET then
vBeamErr = {}
local sPartOffset = EgtGetInfo( vBeam[1].Id, 'PARTOFFSET', 's') or ''
local vPartOffset = EgtSplitString( sPartOffset)
local dRotAng = EgtGetInfo( vBeam[1].Id, 'ROTATED_OK', 'd') or 0
for i = 2, #vBeam do
local sPartOffsetCurrent = EgtGetInfo( vBeam[i].Id, 'PARTOFFSET', 's') or ''
local vPartOffsetCurrent = EgtSplitString( sPartOffsetCurrent)
local dRotAngCurrent = EgtGetInfo( vBeam[i].Id, 'ROTATED_OK', 'd') or 0
local dRotAngDelta = abs( dRotAngCurrent - dRotAng)
if ( #vPartOffset == 5) and ( #vPartOffsetCurrent == 5) then
if dRotAngDelta < GEO.EPS_ANG_SMALL then
if ( vPartOffsetCurrent[2] ~= vPartOffsetCurrent[2])
or ( vPartOffsetCurrent[3] ~= vPartOffset[3])
or ( vPartOffsetCurrent[4] ~= vPartOffset[4])
or ( vPartOffsetCurrent[5] ~= vPartOffset[5]) then
table.insert( vBeamErr, i)
end
elseif dRotAngDelta - 180 < GEO.EPS_ANG_SMALL then
if ( vPartOffsetCurrent[2] ~= vPartOffsetCurrent[4])
or ( vPartOffsetCurrent[3] ~= vPartOffset[5])
or ( vPartOffsetCurrent[4] ~= vPartOffset[2])
or ( vPartOffsetCurrent[5] ~= vPartOffset[3]) then
table.insert( vBeamErr, i)
end
-- se pezzo ruotato di 90deg rispetto al principale, al momento si dà sempre errore
else
table.insert( vBeamErr, i)
end
else
if sPartOffsetCurrent ~= sPartOffset then
table.insert( vBeamErr, i)
end
end
end
if #vBeamErr > 0 then
local sOut = 'Part offset not consistent in beam(s) : '
for i = #vBeamErr, 1, -1 do
local sSeparator = ', '
if i == 1 then
sSeparator = ''
end
sOut = sOut .. vBeam[vBeamErr[i]].Name .. sSeparator
end
BEAM.ERR = 17
BEAM.MSG = sOut
WriteErrToLogFile( BEAM.ERR, BEAM.MSG)
PostErrView( BEAM.ERR, BEAM.MSG)
return
end
end
-- Lunghezza della barra
local dRawL = ( EgtGetInfo( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL, 'BARLEN', 'd') or 12000) + 0.1
@@ -351,7 +465,7 @@ if bToProcess then
local dOvmHead = vBeam[1].PosX or 0
-- Sistemo le travi nel grezzo
local bPbOk, sPbErr = BE.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, vBeam)
local bPbOk, sPbErr = BE.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, nil, vBeam)
if not bPbOk then
BEAM.ERR = 18
BEAM.MSG = sPbErr
@@ -381,6 +495,9 @@ if bToProcess then
BEAM.CUTID = Stats[i].CutId
BEAM.TASKID = Stats[i].TaskId
WriteErrToLogFile( BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
if Stats[i].ProcId then
WriteErrToNge( Stats[i].ProcId, BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
end
elseif Stats[i].Err > 0 then
nErrCnt = nErrCnt + 1
sOutput = sOutput .. string.format( '[%d,%d] %s\n', Stats[i].CutId, Stats[i].TaskId, sMsg)
@@ -390,6 +507,9 @@ if bToProcess then
BEAM.CUTID = Stats[i].CutId
BEAM.TASKID = Stats[i].TaskId
WriteErrToLogFile( BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
if Stats[i].ProcId then
WriteErrToNge( Stats[i].ProcId, BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
end
elseif Stats[i].Err < 0 then
-- se segnalazione scarico pezzo standard, incompleto o a caduta
if Stats[i].Err == -100 or Stats[i].Err == -101 or Stats[i].Err == -102 then
@@ -398,6 +518,9 @@ if bToProcess then
BEAM.CUTID = Stats[i].CutId
BEAM.FALL = abs( Stats[i].Err + 100)
WriteFallToLogFile( BEAM.ERR, BEAM.MSG, BEAM.CUTID, BEAM.FALL)
if Stats[i].ProcId then
WriteFallToNge( Stats[i].PartId, BEAM.ERR, BEAM.MSG, BEAM.CUTID, BEAM.FALL)
end
-- altri avvertimenti
else
nWarnCnt = nWarnCnt + 1
@@ -408,6 +531,9 @@ if bToProcess then
BEAM.CUTID = Stats[i].CutId
BEAM.TASKID = Stats[i].TaskId
WriteErrToLogFile( BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
if Stats[i].ProcId then
WriteErrToNge( Stats[i].ProcId, BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
end
end
end
end
@@ -423,39 +549,60 @@ if bToProcess then
PostWarnView( 19, sOutput)
end
-- Altrimenti carico il progetto salvato e dichiaro nessun errore
-- Altrimenti carico il progetto salvato, rileggo gli errori da nge e riscrivo il log txt con gli stati precedenti
else
EgtOutLog( ' +++ Loading Project already processed >>>')
-- Carico il progetto già fatto
EgtOpenFile( sNgeFile)
-- Dichiaro nessun errore
-- Riscrivo il log txt
local nPartId = EgtGetFirstPart()
while nPartId do
local nCutId = EgtGetInfo( nPartId, 'CUTID')
if nCutId then
-- stato a livello di singola feature
local nProcId = EgtGetFirstInGroup( EgtGetFirstNameInGroup( nPartId, 'Processings') or GDB_ID.NULL)
while nProcId do
local bIsFea = EgtExistsInfo( nProcId, 'GRP') and EgtExistsInfo( nProcId, 'PRC')
local nTaskId = EgtGetInfo( nProcId, 'TASKID')
local sErr = EgtGetInfo( nProcId, 'STATUS.ERR') or 0
local sMsg = EgtGetInfo( nProcId, 'STATUS.MSG') or '---'
local sRot = EgtGetInfo( nProcId, 'STATUS.ROT') or 0
if bIsFea and nTaskId then
BEAM.ERR = 0
BEAM.MSG = '---'
BEAM.ROT = 0
BEAM.ERR = sErr
BEAM.MSG = sMsg
BEAM.ROT = sRot
BEAM.CUTID = nCutId
BEAM.TASKID = nTaskId
WriteErrToLogFile( BEAM.ERR, BEAM.MSG, BEAM.ROT, BEAM.CUTID, BEAM.TASKID)
end
nProcId = EgtGetNext( nProcId)
end
-- stato a livello di pezzo
local sErr = EgtGetInfo( nPartId, 'STATUS.ERR') or 0
if sErr == -100 or sErr == -101 or sErr == -102 then
local sMsg = EgtGetInfo( nPartId, 'STATUS.MSG') or '---'
local sFall = EgtGetInfo( nPartId, 'STATUS.FALL') or 0
BEAM.ERR = sErr
BEAM.MSG = sMsg
BEAM.CUTID = nCutId
BEAM.FALL = sFall
WriteFallToLogFile( BEAM.ERR, BEAM.MSG, BEAM.CUTID, BEAM.FALL)
end
end
nPartId = EgtGetNextPart( nPartId)
end
-- Aggiorno eventuali dati ausiliari
UpdateAuxData( sBtmFile)
-- Anche se non è da riprocessare, imposto nome file CN.
-- Se file TS7 importato da altro PC, 'BEAM.FILE' è cambiato da un PC all'altro. Di conseguenza si deve aggiornare nome file che si andrà a generare.
local _, sName, _ = EgtSplitPath( BEAM.FILE)
EgtSetInfo( EgtGetLastMachGroup(), 'NcName', sName .. '.cnc')
-- Passo in modalità lavora
EgtSetCurrMachGroup( EgtGetLastMachGroup())
-- Se necessario eseguo aggiornamento con setup corrente e ricalcolo delle lavorazioni
if bToRecalc then
if bToRecalc or BEAM.FLAG == 3 or BEAM.FLAG == 4 then
EgtOutLog( ' +++ Recalculating all dispositions and machinings >>>')
EgtImportSetup()
EgtApplyAllMachinings()
@@ -496,7 +643,7 @@ if ( BEAM.FLAG == 0 and ( bToProcess or bToRecalc)) or BEAM.FLAG == 3 or BEAM.F
BEAM.MSG = 'Axis outstroke ' .. sErr
elseif nErr == MCH_SHE.SPECIAL then
BEAM.ERR = 24
BEAM.MSG = 'Clamp move error ' .. sErr
BEAM.MSG = 'Special error ' .. sErr
else
BEAM.ERR = 25
BEAM.MSG = 'General failure (contact supplier)'
@@ -519,7 +666,8 @@ if ( BEAM.FLAG == 0 and ( bToProcess or bToRecalc)) or BEAM.FLAG == 3 or BEAM.F
end
-- *** Genero programma CN *** ( se richiesto)
if BEAM.FLAG == 0 or BEAM.FLAG == 4 then
local bIsGenerationEnabled = ( EgtVerifyKeyOption( 110) == false)
if bIsGenerationEnabled and ( BEAM.FLAG == 0 or BEAM.FLAG == 4) then
EgtOutLog( ' +++ Generating NC part program >>>')
local sInfo = 'EgtCAM5' .. EgtIf( EgtIs64bit(), ' 64bit', '')
if EgtGetExeVersion then
+29 -11
View File
@@ -1,4 +1,4 @@
-- BatchProcessNew.lua by Egaltech s.r.l. 2022/08/01
-- BatchProcessNew.lua by Egaltech s.r.l. 2024/01/10
-- Gestione calcolo batch disposizione e lavorazioni per Travi
-- 2021/01/07 Per nuova interfaccia Egt.
-- 2021/01/15 CREATE_BAR ora FLAG = 6 (prima 5).
@@ -12,6 +12,7 @@
-- 2022/04/28 In info generazione aggiunta indicazione se 64bit.
-- 2022/07/24 Modifica per cancellare lavorazioni con ricalcolo e barra già definita.
-- 2022/08/01 Tolleranza su sezione portata a 0.1 mm (100 * GEO.EPS_SMALL).
-- 2024/01/10 Modifiche per centrare i pezzi in Y sulla tavola (come in BeamExec).
-- Intestazioni
require( 'EgtBase')
@@ -44,9 +45,23 @@ end
local sLog = 'BatchProcess : ' .. BEAM.FILE .. ', ' .. BEAM.MACHINE .. ', ' .. sFlag
EgtOutLog( sLog)
-- Cancello file di log specifico
local sLogFile = EgtChangePathExtension( BEAM.FILE, '.txt')
EgtEraseFile( sLogFile)
-- in caso sia richiesta generazione senza check, verifico prima che il file log specifico non contenga errori: se sì, forzo il check
if BEAM.FLAG == 0 then
local hLogFile = io.open( sLogFile, 'r')
if hLogFile then
for line in hLogFile:lines() do
if EgtStartsWith( line, 'ERR') and tonumber( EgtSplitString( line, '=')[2] or 0) > 0 then
BEAM.FLAG = 4
break
end
end
hLogFile:close()
end
end
-- Cancello file di log specifico
EgtEraseFile( sLogFile)
-- Funzioni per scrittura su file di log specifico
local function WriteErrToLogFile( nErr, sMsg, nRot, nCutId, nTaskId)
@@ -209,10 +224,7 @@ if bToProcess then
EgtSetCurrMachGroup()
-- Area tavola
local b3Tab = EgtGetTableArea()
-- Calcolo posizione estremo TR o BR della tavola rispetto a sua origine in BL
BD.OriXR = Point3d( b3Tab:getDimX(), EgtIf( BD.RIGHT_LOAD, 0, b3Tab:getDimY()), 0)
BD.PosXR = EgtIf( BD.RIGHT_LOAD, MCH_CR.BR, MCH_CR.TR)
-- Calcolo minimo grezzo scaricabile
-- Sezione del grezzo
local nRawId = EgtGetFirstRawPart()
if not nRawId then
BEAM.ERR = 14
@@ -222,6 +234,11 @@ if bToProcess then
return
end
local b3Raw = EgtGetRawPartBBox( nRawId)
-- Calcolo posizione estremo TR o BR della tavola rispetto a sua origine in BL
local dPosY = EgtIf( BD.CENTER_BEAM, ( b3Tab:getDimY() + b3Raw:getDimY() * EgtIf( BD.RIGHT_LOAD, -1, 1)) / 2, EgtIf( BD.RIGHT_LOAD, 0, b3Tab:getDimY()))
BD.OriXR = Point3d( b3Tab:getDimX(), dPosY, 0)
BD.PosXR = EgtIf( BD.RIGHT_LOAD, MCH_CR.BR, MCH_CR.TR)
-- Calcolo minimo grezzo scaricabile
BE.CalcMinUnloadableRaw( b3Raw:getDimY(), b3Raw:getDimZ())
-- altrimenti devo recuperare i pezzi per creare la barra
else
@@ -402,7 +419,7 @@ if bToProcess then
end
-- Sistemo le travi nel grezzo
local bPbOk, sPbErr = BE.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, vBeam, BEAM.FLAG == 6)
local bPbOk, sPbErr = BE.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, nil, vBeam, BEAM.FLAG == 6)
if not bPbOk then
BEAM.ERR = 18
BEAM.MSG = sPbErr
@@ -559,7 +576,7 @@ else
-- Passo in modalità lavora
EgtSetCurrMachGroup( EgtGetLastMachGroup())
-- Se necessario eseguo aggiornamento con setup corrente e ricalcolo delle lavorazioni
if bToRecalc then
if bToRecalc or BEAM.FLAG == 3 or BEAM.FLAG == 4 then
EgtOutLog( ' +++ Recalculating all dispositions and machinings >>>')
EgtImportSetup()
EgtApplyAllMachinings()
@@ -600,7 +617,7 @@ if ( BEAM.FLAG == 0 and ( bToProcess or bToRecalc)) or BEAM.FLAG == 3 or BEAM.F
BEAM.MSG = 'Axis outstroke ' .. sErr
elseif nErr == MCH_SHE.SPECIAL then
BEAM.ERR = 24
BEAM.MSG = 'Clamp move error ' .. sErr
BEAM.MSG = 'Special error ' .. sErr
else
BEAM.ERR = 25
BEAM.MSG = 'General failure (contact supplier)'
@@ -623,7 +640,8 @@ if ( BEAM.FLAG == 0 and ( bToProcess or bToRecalc)) or BEAM.FLAG == 3 or BEAM.F
end
-- *** Genero programma CN *** ( se richiesto)
if BEAM.FLAG == 0 or BEAM.FLAG == 4 then
local bIsGenerationEnabled = ( EgtVerifyKeyOption( 110) == false)
if bIsGenerationEnabled and ( BEAM.FLAG == 0 or BEAM.FLAG == 4) then
EgtOutLog( ' +++ Generating NC part program >>>')
local sInfo = 'EgtCAM5' .. EgtIf( EgtIs64bit(), ' 64bit', '')
if EgtGetExeVersion then
+52 -99
View File
@@ -1,103 +1,56 @@
REM Compilazione degli script Beam Egaltech 2022.05.09
REM Compilazione degli script Beam Egaltech 2023.11.08
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\BeamExec.lua LuaLibs\BeamExec.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\BeamLib.lua LuaLibs\BeamLib.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\DiceCut.lua LuaLibs\DiceCut.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\FaceByPocket.lua LuaLibs\FaceByPocket.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\FacesBySaw.lua LuaLibs\FacesBySaw.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\MachiningLib.lua LuaLibs\MachiningLib.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessBlockHausFront.lua LuaLibs\ProcessBlockHausFront.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessChamfer.lua LuaLibs\ProcessChamfer.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessCut.lua LuaLibs\ProcessCut.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessDecor.lua LuaLibs\ProcessDecor.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessDoubleCut.lua LuaLibs\ProcessDoubleCut.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessDovetail.lua LuaLibs\ProcessDovetail.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessDrill.lua LuaLibs\ProcessDrill.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessDtMortise.lua LuaLibs\ProcessDtMortise.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessDtTenon.lua LuaLibs\ProcessDtTenon.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessFreeContour.lua LuaLibs\ProcessFreeContour.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessFrenchRidgeLap.lua LuaLibs\ProcessFrenchRidgeLap.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessHeadCut.lua LuaLibs\ProcessHeadCut.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessLapJoint.lua LuaLibs\ProcessLapJoint.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessLapJointNew.lua LuaLibs\ProcessLapJointNew.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessLongCut.lua LuaLibs\ProcessLongCut.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessLongDoubleCut.lua LuaLibs\ProcessLongDoubleCut.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessMark.lua LuaLibs\ProcessMark.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessMortise.lua LuaLibs\ProcessMortise.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessProfCamb.lua LuaLibs\ProcessProfCamb.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessProfConcave.lua LuaLibs\ProcessProfConcave.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessProfConvex.lua LuaLibs\ProcessProfConvex.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessProfFront.lua LuaLibs\ProcessProfFront.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessProfHead.lua LuaLibs\ProcessProfHead.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessRidgeLap.lua LuaLibs\ProcessRidgeLap.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessRoundArch.lua LuaLibs\ProcessRoundArch.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessSawCut.lua LuaLibs\ProcessSawCut.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessScarfJoint.lua LuaLibs\ProcessScarfJoint.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessSimpleScarf.lua LuaLibs\ProcessSimpleScarf.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessSplit.lua LuaLibs\ProcessSplit.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessStepJoint.lua LuaLibs\ProcessStepJoint.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessStepJointNotch.lua LuaLibs\ProcessStepJointNotch.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessTenon.lua LuaLibs\ProcessTenon.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessText.lua LuaLibs\ProcessText.lua
\EgtProg\Dll32\luac53 -o 32\LuaLibs\ProcessTyroleanDovetail.lua LuaLibs\ProcessTyroleanDovetail.lua
\EgtProg\Dll32\luac53 -o 32\BatchProcess.lua BatchProcess.lua
\EgtProg\Dll32\luac53 -o 32\BatchProcessNew.lua BatchProcessNew.lua
\EgtProg\Dll32\luac53 -o 32\GetBeamData.lua GetBeamData.lua
\EgtProg\Dll32\luac53 -o 32\NestProcess.lua NestProcess.lua
\EgtProg\Dll32\luac53 -o 32\Process.lua Process.lua
\EgtProg\Dll32\luac53 -o 32\Rotate.lua Rotate.lua
\EgtProg\Dll32\luac53 -o 32\Swap.lua Swap.lua
REM Compilazione 64 bit
\EgtProg\Dll64\luac53 -o 64\LuaLibs\BeamExec.lua LuaLibs\BeamExec.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\BeamLib.lua LuaLibs\BeamLib.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\DiceCut.lua LuaLibs\DiceCut.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\FaceByPocket.lua LuaLibs\FaceByPocket.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\FacesBySaw.lua LuaLibs\FacesBySaw.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\MachiningLib.lua LuaLibs\MachiningLib.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessBlockHausFront.lua LuaLibs\ProcessBlockHausFront.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessChamfer.lua LuaLibs\ProcessChamfer.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessCut.lua LuaLibs\ProcessCut.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessDecor.lua LuaLibs\ProcessDecor.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessDoubleCut.lua LuaLibs\ProcessDoubleCut.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessDovetail.lua LuaLibs\ProcessDovetail.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessDrill.lua LuaLibs\ProcessDrill.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessDtMortise.lua LuaLibs\ProcessDtMortise.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessDtTenon.lua LuaLibs\ProcessDtTenon.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessFreeContour.lua LuaLibs\ProcessFreeContour.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessFrenchRidgeLap.lua LuaLibs\ProcessFrenchRidgeLap.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessHeadCut.lua LuaLibs\ProcessHeadCut.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessLapJoint.lua LuaLibs\ProcessLapJoint.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessLapJointNew.lua LuaLibs\ProcessLapJointNew.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessLongCut.lua LuaLibs\ProcessLongCut.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessLongDoubleCut.lua LuaLibs\ProcessLongDoubleCut.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessMark.lua LuaLibs\ProcessMark.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessMortise.lua LuaLibs\ProcessMortise.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessProfCamb.lua LuaLibs\ProcessProfCamb.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessProfConcave.lua LuaLibs\ProcessProfConcave.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessProfConvex.lua LuaLibs\ProcessProfConvex.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessProfFront.lua LuaLibs\ProcessProfFront.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessProfHead.lua LuaLibs\ProcessProfHead.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessRidgeLap.lua LuaLibs\ProcessRidgeLap.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessRoundArch.lua LuaLibs\ProcessRoundArch.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessSawCut.lua LuaLibs\ProcessSawCut.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessScarfJoint.lua LuaLibs\ProcessScarfJoint.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessSimpleScarf.lua LuaLibs\ProcessSimpleScarf.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessSplit.lua LuaLibs\ProcessSplit.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessStepJoint.lua LuaLibs\ProcessStepJoint.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessStepJointNotch.lua LuaLibs\ProcessStepJointNotch.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessTenon.lua LuaLibs\ProcessTenon.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessText.lua LuaLibs\ProcessText.lua
\EgtProg\Dll64\luac53 -o 64\LuaLibs\ProcessTyroleanDovetail.lua LuaLibs\ProcessTyroleanDovetail.lua
\EgtProg\Dll64\luac53 -o 64\BatchProcess.lua BatchProcess.lua
\EgtProg\Dll64\luac53 -o 64\BatchProcessNew.lua BatchProcessNew.lua
\EgtProg\Dll64\luac53 -o 64\GetBeamData.lua GetBeamData.lua
\EgtProg\Dll64\luac53 -o 64\NestProcess.lua NestProcess.lua
\EgtProg\Dll64\luac53 -o 64\Process.lua Process.lua
\EgtProg\Dll64\luac53 -o 64\Rotate.lua Rotate.lua
\EgtProg\Dll64\luac53 -o 64\Swap.lua Swap.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\BeamExec.lua -s LuaLibs\BeamExec.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\BeamLib.lua -s LuaLibs\BeamLib.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\DiceCut.lua -s LuaLibs\DiceCut.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\FaceByPocket.lua -s LuaLibs\FaceByPocket.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\FacesBySaw.lua -s LuaLibs\FacesBySaw.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\FeatureTopology.lua -s LuaLibs\FeatureTopology.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\MachiningLib.lua -s LuaLibs\MachiningLib.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessBlockHausFront.lua -s LuaLibs\ProcessBlockHausFront.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessChamfer.lua -s LuaLibs\ProcessChamfer.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessCut.lua -s LuaLibs\ProcessCut.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessDecor.lua -s LuaLibs\ProcessDecor.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessDoubleCut.lua -s LuaLibs\ProcessDoubleCut.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessDovetail.lua -s LuaLibs\ProcessDovetail.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessDrill.lua -s LuaLibs\ProcessDrill.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessDtMortise.lua -s LuaLibs\ProcessDtMortise.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessDtTenon.lua -s LuaLibs\ProcessDtTenon.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessFreeContour.lua -s LuaLibs\ProcessFreeContour.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessFrenchRidgeLap.lua -s LuaLibs\ProcessFrenchRidgeLap.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessHeadCut.lua -s LuaLibs\ProcessHeadCut.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessLapJoint.lua -s LuaLibs\ProcessLapJoint.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessLongCut.lua -s LuaLibs\ProcessLongCut.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessLongDoubleCut.lua -s LuaLibs\ProcessLongDoubleCut.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessMark.lua -s LuaLibs\ProcessMark.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessMortise.lua -s LuaLibs\ProcessMortise.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessProfCamb.lua -s LuaLibs\ProcessProfCamb.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessProfConcave.lua -s LuaLibs\ProcessProfConcave.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessProfConvex.lua -s LuaLibs\ProcessProfConvex.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessProfFront.lua -s LuaLibs\ProcessProfFront.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessProfHead.lua -s LuaLibs\ProcessProfHead.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessRidgeLap.lua -s LuaLibs\ProcessRidgeLap.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessRoundArch.lua -s LuaLibs\ProcessRoundArch.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessSawCut.lua -s LuaLibs\ProcessSawCut.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessScarfJoint.lua -s LuaLibs\ProcessScarfJoint.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessSimpleScarf.lua -s LuaLibs\ProcessSimpleScarf.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessSplit.lua -s LuaLibs\ProcessSplit.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessStepJoint.lua -s LuaLibs\ProcessStepJoint.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessStepJointNotch.lua -s LuaLibs\ProcessStepJointNotch.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessTenon.lua -s LuaLibs\ProcessTenon.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessText.lua -s LuaLibs\ProcessText.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessTyroleanDovetail.lua -s LuaLibs\ProcessTyroleanDovetail.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessVariant.lua -s LuaLibs\ProcessVariant.lua
\EgtProg\Dll32\luac54 -o bin\LuaLibs\ProcessProbing.lua -s LuaLibs\ProcessProbing.lua
\EgtProg\Dll32\luac54 -o bin\BatchProcess.lua -s BatchProcess.lua
\EgtProg\Dll32\luac54 -o bin\BatchProcessNew.lua -s BatchProcessNew.lua
\EgtProg\Dll32\luac54 -o bin\GetBeamData.lua -s GetBeamData.lua
\EgtProg\Dll32\luac54 -o bin\NestProcess.lua -s NestProcess.lua
\EgtProg\Dll32\luac54 -o bin\Process.lua -s Process.lua
\EgtProg\Dll32\luac54 -o bin\Rotate.lua -s Rotate.lua
\EgtProg\Dll32\luac54 -o bin\Swap.lua -s Swap.lua
\EgtProg\Dll32\luac54 -o bin\Version.lua -s Version.lua
+1043 -204
View File
File diff suppressed because it is too large Load Diff
+674 -256
View File
File diff suppressed because it is too large Load Diff
+16 -15
View File
@@ -1,4 +1,4 @@
-- DiceCut.lua by Egaltech s.r.l. 2022/02/18
-- DiceCut.lua by Egaltech s.r.l. 2024/01/23
-- Gestione dei piano paralleli nei tagli lunghi: equidistanziamento dei piani paralleli
-- Tabella per definizione modulo
@@ -144,8 +144,8 @@ local function GetOrtoCutCenter( FacetId, ptC, vtN, vtO, dOffsetEff, dNzLimDwnUp
EgtErase( IdAuxLocal)
EgtSetGridFrame(Frame3d())
-- riferimento intrinseco
local asseX = vtO
local asseY = asseX ^ vtN
local asseX = Vector3d( vtO)
local asseY = vtN ^ asseX
local Frame = Frame3d( ptC, ptC + asseX, ptC + asseY)
-- ingombro della faccia secondo questo riferimento
local Box = EgtGetBBoxRef( FacetId, GDB_BB.STANDARD, Frame)
@@ -160,12 +160,11 @@ local function GetOrtoCutCenter( FacetId, ptC, vtN, vtO, dOffsetEff, dNzLimDwnUp
end
local N = ceil( dLen / dOffsetEff)
local dOffsetRel = dLen / N
local dOffsetRel = ( dLen / N) + 10 * GEO.EPS_SMALL
local dCopyPlane
local dCenOffs = ( Box:getMax():getX() + Box:getMin():getX()) / 2
if dLen <= dOffsetRel then
--dOffsetRel = 0
dCopyPlane = 1
elseif dLen <= 2 * dOffsetRel then
dOffsetRel = dOffsetEff
@@ -177,8 +176,7 @@ local function GetOrtoCutCenter( FacetId, ptC, vtN, vtO, dOffsetEff, dNzLimDwnUp
dCopyPlane = 0.5
end
end
return dOffsetRel, dCopyPlane, dCenOffs, ptS
end
@@ -277,12 +275,15 @@ local function VerifyFirstOrthoCut( CutTable, OffsetP, BBoxRawPart, dNzLimDwnUp)
-- normale alla faccia ortogonale
local _, vtO = EgtSurfTmFacetCenter( CutOId, 0, GDB_ID.ROOT)
vtO = vtO - vtO * vtN1 * vtN1 ; vtO:normalize()
local dMaxElev = EgtSurfTmFacetElevationInBBox( CutOId, 0, BBoxRawPart, true, GDB_ID.ROOT)
-- calcolo lunghezza prima semi-faccia
local asseX1 = vtO
local asseY1 = vtN1 ^ asseX1
local Frame1 = Frame3d( ptC1, ptC1+asseX1, ptC1+asseY1)
local Box1 = EgtGetBBoxRef( Cut1Id, GDB_BB.STANDARD, Frame1)
local x1 = Box1:getDimX()
-- prendo il massimo tra la lugnhezza della faccia parallela e l'elevazione della corrispondente ortogonale
x1 = max( x1, dMaxElev)
-- calcolo lunghezza seconda semi-faccia
local asseX2 = vtO
local asseY2 = vtN2 ^ asseX2
@@ -398,7 +399,7 @@ function DiceCut.GetDice( nParent, BBoxRawPart, ptCPlanes, vtNPlanes, bGetOrtoPl
end
local dElevP = DistanzaMassima( nParent, ptCPlanes, vtNPlanes, ptCBond, vtNBond, BBoxRawPart, TBoxPoint)
local dElevO
if ptCBond and vtNBond then
if ptCBond and vtNBond and not AreOppositeVectorApprox( vtNBond, vtNPlanes) then
dElevO = DistanzaMassima( nParent, ptCBond, vtNBond, ptCPlanes, vtNPlanes, BBoxRawPart, TBoxPoint)
end
@@ -406,7 +407,7 @@ function DiceCut.GetDice( nParent, BBoxRawPart, ptCPlanes, vtNPlanes, bGetOrtoPl
local dNzLimDwnUp = BL.GetNzLimDownUp( BBoxRawPart)
-- se non c'è testa da sotto e normali senza componenti in Y con faccia quasi verticale e trave non alta, uso per offset i limiti dei tagli di testa e coda
if not BD.DOWN_HEAD and abs( vtNPlanes:getY()) < 0.1 and vtNPlanes:getZ() < 0.7071 and ( not vtNBond or abs( vtNBond:getY()) < 0.1) and BBoxRawPart:getDimZ() < BD.MIN_DIM_HBEAM then
if not BD.TURN and not BD.DOWN_HEAD and abs( vtNPlanes:getY()) < 0.1 and vtNPlanes:getZ() < 0.7071 and ( not vtNBond or abs( vtNBond:getY()) < 0.1) and BBoxRawPart:getDimZ() < BD.MIN_DIM_HBEAM then
OffsetO = dOrthoMaxDim or BD.MAX_DIM_HTCUT
end
@@ -422,7 +423,7 @@ function DiceCut.GetDice( nParent, BBoxRawPart, ptCPlanes, vtNPlanes, bGetOrtoPl
-- se piani non ortogonali, diminuisco la distanza di offset opportunamente
local originalOffsetP = OffsetP
if not bGetOrtoPlanes then
local dCoeff = ( vtNPlanes ^ vtNBond):len()
local dCoeff = max( ( vtNPlanes ^ vtNBond):len(), 0.5)
OffsetP = OffsetP * dCoeff
OffsetO = OffsetO * dCoeff
end
@@ -432,7 +433,7 @@ function DiceCut.GetDice( nParent, BBoxRawPart, ptCPlanes, vtNPlanes, bGetOrtoPl
if dElevO then
local m = ceil( dElevO / OffsetO)
OffsetO = dElevO / m
end
end
-- elenco di tutte le superfici generate dai tagli
local TabFUCHSIA = {}
@@ -475,7 +476,7 @@ function DiceCut.GetDice( nParent, BBoxRawPart, ptCPlanes, vtNPlanes, bGetOrtoPl
if vtNInner:getZ() > -0.0175 or vtNInner:getZ() < dNzLimDwnUp or abs( vtNInner:getY()) > 0.8 then
vtO:rotate( vtNInner, 90)
-- se diretto troppo ortogonalmente all'asse trave e taglio non da sotto, lo ruoto ulteriormente
if ( abs( vtO:getY()) > 3 * abs( vtO:getX()) or BBoxRawPart:getDimZ() > 620) and vtNInner:getZ() > dNzLimDwnUp then
if ( abs( vtO:getY()) > 4 * abs( vtO:getX()) or BBoxRawPart:getDimZ() > 620) and vtNInner:getZ() > dNzLimDwnUp then
vtO:rotate( vtNInner, 90)
-- se faccia principale verso il basso (almeno -3deg), lo inverto per iniziare da sopra
if vtNInner:getZ() < -0.05 then
@@ -483,9 +484,9 @@ function DiceCut.GetDice( nParent, BBoxRawPart, ptCPlanes, vtNPlanes, bGetOrtoPl
end
else
if vtNInner:getX() > -0.017 then
if vtO:getX() < 0 then vtO = - vtO end
if vtO:getX() < -0.001 then vtO = -vtO end
else
if vtO:getX() > 0 then vtO = - vtO end
if vtO:getX() > 0.001 then vtO = -vtO end
end
end
end
@@ -565,7 +566,7 @@ function DiceCut.GetDice( nParent, BBoxRawPart, ptCPlanes, vtNPlanes, bGetOrtoPl
end
end
return UltimateTable
return UltimateTable, OffsetP, OffsetO
end
----------------------------------------------------------------------------------------------------------------------------------------------------
+16 -9
View File
@@ -1,5 +1,6 @@
-- FaceByPocket.lua by Egaltech s.r.l. 2022/05/82
-- FaceByPocket.lua by Egaltech s.r.l. 2023/04/04
-- Gestione svuotatura di feature con una faccia
-- 2023/11/30 Calcolo elevazione velocizzato e centralizzato tramite la funzione GetFaceElevation.
-- Tabella per definizione modulo
local FaceByPocket = {}
@@ -15,7 +16,7 @@ local BD = require( 'BeamData')
local ML = require( 'MachiningLib')
---------------------------------------------------------------------
local function ApplyPocket( Proc, nSurfId, nFacet, sPocketing, nInd, dMaxElev, vtN)
local function ApplyPocket( Proc, nSurfId, nFacet, sPocketing, nInd, dMaxElev, vtN, dOpenMinSafe)
-- inserisco la lavorazione di svuotatura
local sName = 'Pock_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. nInd
@@ -28,11 +29,17 @@ local function ApplyPocket( Proc, nSurfId, nFacet, sPocketing, nInd, dMaxElev, v
EgtSetMachiningGeometry( {{ nSurfId, nFacet}})
-- imposto uso faccia
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.ORTHO_CONT)
-- imposto note utente
local sNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
-- eventuale massima elevazione
if dMaxElev > 0.1 then
-- imposto elevazione
local sNotes = 'MaxElev=' .. EgtNumToString( dMaxElev, 2) .. ';'
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
sNotes = EgtSetValInNotes( sNotes, 'MaxElev', EgtNumToString( dMaxElev, 2))
end
-- eventuale minima distanza di sicurezza di attacco su lati aperti
if dOpenMinSafe then
sNotes = EgtSetValInNotes( sNotes, 'OpenMinSafe', dOpenMinSafe)
end
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
-- imposto posizione braccio porta testa
local nSCC = MCH_SCC.NONE
if not BD.C_SIMM and not BD.TURN then
@@ -50,7 +57,7 @@ local function ApplyPocket( Proc, nSurfId, nFacet, sPocketing, nInd, dMaxElev, v
end
---------------------------------------------------------------------
function FaceByPocket.Make( Proc, nSurfId, nFacet, sPocketing, nPartId, b3Solid)
function FaceByPocket.Make( Proc, nSurfId, nFacet, sPocketing, nPartId, b3Solid, dOpenMinSafe)
local bOk = true
local sErr
-- recupero gruppo per geometria addizionale
@@ -72,7 +79,7 @@ function FaceByPocket.Make( Proc, nSurfId, nFacet, sPocketing, nPartId, b3Solid)
end
-- dati della faccia
local ptC, vtN = EgtSurfTmFacetCenter( nSurfId, nFacet, GDB_ID.ROOT)
local dElev = BL.GetFaceElevation( nSurfId, nFacet, nPartId)
local dElev = BL.GetFaceElevation( nSurfId, nFacet, b3Solid)
-- determino numero e valore degli step di lavorazione
local nSurfStep = ceil( dElev / dMaxDepth)
local dSurfStep = dElev / nSurfStep
@@ -84,14 +91,14 @@ function FaceByPocket.Make( Proc, nSurfId, nFacet, sPocketing, nPartId, b3Solid)
EgtSetName( nAddIdTmp, 'AddCut_' .. tostring( Proc.Id))
EgtSetInfo( nAddIdTmp, 'TASKID', Proc.TaskId)
-- aggiungo lavorazione
bOk, sErr = ApplyPocket( Proc, nAddIdTmp, 0, sPocketing, i, dSurfStep, vtN)
bOk, sErr = ApplyPocket( Proc, nAddIdTmp, 0, sPocketing, i, dSurfStep, vtN, dOpenMinSafe)
if not bOk then
return false, sErr
end
end
end
-- faccio ultima superfice
bOk, sErr = ApplyPocket( Proc, nSurfId, nFacet, sPocketing, 1, EgtIf( nSurfStep > 1, dSurfStep, 0), vtN)
bOk, sErr = ApplyPocket( Proc, nSurfId, nFacet, sPocketing, 1, EgtIf( nSurfStep > 1, dSurfStep, 0), vtN, dOpenMinSafe)
if not bOk then
return false, sErr
end
+610 -244
View File
File diff suppressed because it is too large Load Diff
+247
View File
@@ -0,0 +1,247 @@
-- FeatureTopology.lua by Egaltech s.r.l. 2023/09/12
-- Libreria per classificazione topologica feature travi
-- 2023/09/26 Aggiunte topologie Strip e Cut.
-- 2023/09/27 Modificata GetFacesParallelToPart per tunnel, pocket e groove 3 lati
-- 2023/10/16 In GetFacesParallelToPart rimossa Pocket e aggiunto Rabbet al check solo direzione principale
-- 2023/11/03 In Classify ora si settano le AffectedFaces nella Proc, se non già presenti.
-- Aggiunta groove 2 facce, differenziata da rabbet.
-- 2024/03/04 Feature senza topologia, calcolato in BeamExec
-- 2024/05/06 A topologia Cut aggiunta IsThrough = true
-- Tabella per definizione modulo
local FeatureTopology = {}
-- Include
require( 'EgtBase')
-- Carico le librerie
local BL = require( 'BeamLib')
EgtOutLog( ' FeatureTopology started', 1)
---------------------------------------------------------------------
-- restituisce gli id delle facce di Proc che hanno il numero di adiacenze nAdj
function FeatureTopology.GetFacesWithGivenAdjacencyNumber( Proc, vAdj, nAdj)
if not vAdj then vAdj = BL.GetAdjacencyMatrix( Proc) end
local nFct = #( vAdj or {})
local vFacesWithGivenAdj = {}
for i = 1, nFct do
local nAdjCount = 0
for j = 1, nFct 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( vAdj)
local bAllConcave, bAllRight = true, true
local nFct = #( vAdj or {})
for i = 1, nFct do
for j = 1, nFct 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 nFct < 2 or ( nFct == 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 BL.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)
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' 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 FeatureTopology.Classify( Proc, b3Raw)
-- la feature deve avere geometria
if not Proc.Box or Proc.Box:isEmpty() then
return false
end
-- se già calcolato, esco
if Proc.Topology then
return true
end
-- calcoli
if not Proc.AffectedFaces then
Proc.AffectedFaces = BL.GetProcessAffectedFaces( Proc)
end
if not Proc.Face then
Proc.Face = BL.GetFacetsInfo( Proc, b3Raw)
end
local vAdj = Proc.AdjacencyMatrix or BL.GetAdjacencyMatrix( Proc)
local bAllAnglesConcave, bAllRightAngles = AreAllAnglesConcaveOrRight( vAdj)
local vTriangularFaces = GetTriangularFaces( Proc)
local bIsAnyDimensionLongAsPart = IsAnyDimensionLongAsPart( Proc)
local vFacesWithOneAdj = FeatureTopology.GetFacesWithGivenAdjacencyNumber( Proc, vAdj, 1)
local vFacesWithTwoAdj = FeatureTopology.GetFacesWithGivenAdjacencyNumber( Proc, vAdj, 2)
local vFacesWithThreeAdj = FeatureTopology.GetFacesWithGivenAdjacencyNumber( Proc, vAdj, 3)
local vFacesWithFourAdj = FeatureTopology.GetFacesWithGivenAdjacencyNumber( Proc, vAdj, 4)
local dRawW = b3Raw:getDimY()
local dRawH = b3Raw:getDimZ()
local bIsFeatureCuttingEntireSection = BL.IsFeatureCuttingEntireSection( Proc.Box, dRawW, dRawH)
-- assegnazione tipologia
local sFamily
local bIsThrough
if 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
-- birdsmouth
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
-- verifico se facce parallele a quelle della trave
local vFacesParallelToPart = GetFacesParallelToPart( Proc, sFamily)
local bIsParallel = ( #vFacesParallelToPart == Proc.Fct)
-- assegnazioni
if sFamily then
Proc.Topology = sFamily
Proc.TopologyLongName = GetTopologyLongName( sFamily, bIsThrough, bAllRightAngles, bIsParallel, Proc.Fct)
Proc.IsThrough = bIsThrough
Proc.AllRightAngles = bAllRightAngles
Proc.IsParallel = bIsParallel
Proc.vAdj = vAdj
return true
else
Proc.Topology = 'OTHER'
Proc.TopologyLongName = Proc.Topology
return false
end
end
-------------------------------------------------------------------------------------------------------------
return FeatureTopology
+267 -145
View File
@@ -1,9 +1,19 @@
-- MachiningLib.lua by Egaltech s.r.l. 2022/05/07
-- MachiningLib.lua by Egaltech s.r.l. 2023/11/06
-- Libreria ricerca lavorazioni per Travi
-- 2022/05/07 ES Profonde modifiche per scelta ottimale lavorazioni in macchine con più teste.
-- 2022/07/27 Aggiunta la gestione del tipo di foratura "AngleDrill" per fori molto inclinati
-- 2022/11/02 Modificata scelta utensile ottimizzata. Ora se c'è un utensile più grande disponibile si dà preferenza a quello.
-- 2022/11/25 Per FindMilling implementata la possibilità di escludere la testa H3 dalla ricerca utensile.
-- 2022/12/28 Per FindMilling e FindDrilling possibilità di escludere la testa H2 dalla ricerca utensile.
-- 2023/01/31 Per FindPocketing implementata la possibilità di escludere le teste H2 o H3 dalla ricerca utensile.
-- 2023/07/28 Aggiunta gestione del tipo di foratura "Drill_AT".
-- 2023/11/06 Migliorie e correzioni alle forature con AngularTransmission ("_AT").
-- 2024/01/18 In FindSawing aggiunto il parametro opzionale dDepth.
-- 2024/01/19 In FindSawing aggiunto parametro opzionale bConsiderCSimmEncumberance per considerare l'ingombro dell'asse C nel massimo materiale (default false).
-- 2024/01/23 Nella GetMachinings vengono ora raccolti i parametri utensile necessari per i VerifyTool, scritti direttamente nella tabella Machining.Tool.
-- Le lavorazioni possono essere ora ordinate per dimensioni utensile (Longest, Shortest, Biggest, Smallest) se passato l'apposito parametro SortingCriterion in FindMachining. Al momento implementato solo per FindSawing.
-- 2024/03/01 In VerifyPocketing implementato l'ordinamento per dimensioni utensile.
-- 2024/03/13 Aggiunta gestione Predrill
-- Tabella per definizione modulo
local MachiningLib = {}
@@ -15,11 +25,14 @@ EgtOutLog( ' MachiningLib started', 1)
-- Dati
local BD = require( 'BeamData')
local Cuttings = require( 'CutData')
local Millings = require( 'MillingData')
local Pocketings = require( 'PocketingData')
local Sawings = require( 'SawingData')
local Drillings = require( 'DrillData')
-- librerie lavorazioni caricate con pcall perchè potrebbero non esserci
local Cuttings, Millings, Pocketings, Sawings, Drillings, Probing
if pcall( require, 'CutData') then Cuttings = require( 'CutData') end
if pcall( require, 'MillingData') then Millings = require( 'MillingData') end
if pcall( require, 'PocketingData') then Pocketings = require( 'PocketingData') end
if pcall( require, 'SawingData') then Sawings = require( 'SawingData') end
if pcall( require, 'DrillData') then Drillings = require( 'DrillData') end
if pcall( require, 'ProbingData') then Probing = require( 'ProbingData') end
-- tipo di teste macchina
local ONE_HEAD = 1 -- una testa (Fast, One, Turn1T)
@@ -64,154 +77,252 @@ local function SetCurrMachineHeadType()
end
---------------------------------------------------------------------
-- funzione che conferma e rende attivi testa e utensile ipotizzati
-- setta ultimi testa e utensile utilizzati se compatibili con ottimizzazione testa
local function ConfirmNextMachining()
-- se non definita testa successiva, esco
if not nNextMachHead or nNextMachHead < 1 or nNextMachHead > 2 then return end
-- altrimenti, la confermo come attiva
nActiveHead = nNextMachHead
if nNextMachHead == 1 then
H1_TOOL = H1_NEXT_TOOL
elseif nNextMachHead == 2 then
H2_TOOL = H2_NEXT_TOOL
-- utensile corrente
local sToolUuid = EgtGetMachiningParam( MCH_MP.TUUID)
local sToolName = EgtTdbGetToolFromUUID( sToolUuid or '')
EgtTdbSetCurrTool( sToolName or '')
-- testa dell'utensile corrente
local sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
local nHead = tonumber( sHead:sub( 2, #sHead)) + 0
if ( nHead < 10 and nHead >= 30) or vFixedHeads[nHead] then
-- testa che non richiede ottimizzazione
return
elseif nHead >= 20 then
nHead = 2
elseif nHead >= 10 then
nHead = 1
end
-- se la testa richiede ottimizzazione, confermo testa attiva
nActiveHead = nHead
if nActiveHead == 1 then
H1_TOOL = sToolName
elseif nActiveHead == 2 then
H2_TOOL = sToolName
end
-- reset prossima testa
nNextMachHead = 0
H1_NEXT_TOOL = ''
H2_NEXT_TOOL = ''
end
---------------------------------------------------------------------
-- funzione che traccia testa e utensile ipotizzati
local function SetNextMachining( sToolName, nHead, bFixed)
if nHead < 1 or nHead > 2 then return end
if bFixed then
nNextMachHead = 0
H1_NEXT_TOOL = ''
H2_NEXT_TOOL = ''
end
nNextMachHead = nHead
if nHead == 1 then
H1_NEXT_TOOL = sToolName
elseif nHead == 2 then
H2_NEXT_TOOL = sToolName
end
end
---------------------------------------------------------------------
local function SetCurrMachiningAndTool( sMachName)
if not EgtMdbSetCurrMachining( sMachName) then return false end
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
local sTool = EgtTdbGetToolFromUUID( sTuuid)
if not sTool then return false end
if not EgtTdbSetCurrTool( sTool) then return false end
local bActive = EgtTdbGetCurrToolParam( MCH_TP.ACTIVE)
local function SetCurrMachiningAndTool( Machining)
EgtMdbSetCurrMachining( Machining.Name)
EgtTdbSetCurrTool( Machining.Tool.Name)
local bActive = EgtFindToolInCurrSetup( Machining.Tool.Name)
local sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
local nHead = tonumber( sHead:sub( 2, #sHead))
local bH2 = ( nHead >= 21 and nHead <= 29)
local bH3 = ( nHead >= 31 and nHead <= 39)
local bH3 = ( nHead >= 31 and nHead <= 39)
local bFixed = ( vFixedHeads[nHead])
return bActive, sTool, bH2, bFixed, bH3
return bActive, Machining.Tool.Name, bH2, bFixed, bH3
end
---------------------------------------------------------------------
function VerifyDrill( dDiam, dDepth, bH2)
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
local dTMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
local dMaxToolLength = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN)
local dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
local dDiamTh = EgtTdbGetCurrToolThDiam()
local dLenTh = 72
if EgtTdbGetCurrToolThLength then dLenTh = EgtTdbGetCurrToolThLength() end
local dFreeLen = EgtTdbGetCurrToolParam( MCH_TP.LEN) - dLenTh - EgtMdbGetGeneralParam( MCH_GP.MAXDEPTHSAFE)
if dTDiam < dDiam + 10 * GEO.EPS_SMALL and
dTDiam > dDiam - BD.DRILL_TOL - 10 * GEO.EPS_SMALL and
( not dDepth or dTMaxMat > dDepth - GEO.EPS_SMALL) then
return true, { TMaxMat = dTMaxMat, MaxToolLength = dMaxToolLength, ToolDiam = dToolDiam, DiamTh = dDiamTh, FreeLen = dFreeLen, H2 = bH2}
function VerifyDrill( Machining, dDiam, dDepth, bH2)
local dFreeLen = Machining.Tool.Length - Machining.Tool.ToolHolderLength - EgtMdbGetGeneralParam( MCH_GP.MAXDEPTHSAFE)
if Machining.Tool.Diameter < dDiam + 10 * GEO.EPS_SMALL and
Machining.Tool.Diameter > dDiam - BD.DRILL_TOL - 10 * GEO.EPS_SMALL and
( not dDepth or Machining.Tool.MaxMat > dDepth - GEO.EPS_SMALL) then
return true, { TMaxMat = Machining.Tool.MaxMat, MaxToolLength = Machining.Tool.TotalLength, ToolDiam = Machining.Tool.Diameter, DiamTh = Machining.Tool.ToolHolderDiameter, FreeLen = dFreeLen, H2 = bH2}
end
end
---------------------------------------------------------------------
function VerifyDrillPocket( dDiam, dDepth, bH2)
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
local dTMaxDepth = EgtTdbGetCurrToolMaxDepth()
local dMaxToolLength = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN)
local dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
local dDiamTh = EgtTdbGetCurrToolThDiam()
local dFreeLen = dTMaxDepth
if dTDiam < dDiam - 10 * GEO.EPS_SMALL and
( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) then
return true, { TMaxDepth = dTMaxDepth, MaxToolLength = dMaxToolLength, ToolDiam = dToolDiam, DiamTh = dDiamTh, FreeLen = dFreeLen, H2 = bH2}
function VerifyDrillPocket( Machining, dDiam, dDepth, bH2)
if Machining.Tool.Diameter < dDiam - 10 * GEO.EPS_SMALL and
( not dDepth or Machining.Tool.MaxMat > dDepth - GEO.EPS_SMALL) then
return true, { TMaxDepth = Machining.Tool.MaxMat, MaxToolLength = Machining.Tool.TotalLength, ToolDiam = Machining.Tool.Diameter, DiamTh = Machining.Tool.ToolHolderDiameter, FreeLen = Machining.Tool.MaxMat, H2 = bH2}
end
end
---------------------------------------------------------------------
function VerifyMill( dDepth, sTuuidMstr, dMaxDiam, dMaxTotLen, bH2)
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
local dTMaxDepth = EgtTdbGetCurrToolMaxDepth()
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
local dTTotLen = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN)
if ( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) and
( not sTuuidMstr or sTuuidMstr == sTuuid) and
( not dMaxDiam or dTDiam < dMaxDiam + GEO.EPS_SMALL) and
( not dMaxTotLen or dTTotLen < dMaxTotLen + GEO.EPS_SMALL) then
return true, { TMaxDepth = dTMaxDepth, TDiam = dTDiam, H2 = bH2}
function VerifyMill( Machining, dDepth, sTuuidMstr, dMaxDiam, dMaxTotLen, bH2)
if ( not dDepth or Machining.Tool.MaxMat > dDepth - GEO.EPS_SMALL) and
( Machining.Type ~= 'FloatingAggregate' or abs( Machining.Tool.MaxMat - dDepth) < 100 * GEO.EPS_SMALL) and
( not sTuuidMstr or sTuuidMstr == Machining.Tool.UUID) and
( not dMaxDiam or Machining.Tool.Diameter < dMaxDiam + GEO.EPS_SMALL) and
( not dMaxTotLen or Machining.Tool.TotalLength < dMaxTotLen + GEO.EPS_SMALL) then
return true, { TMaxDepth = Machining.Tool.MaxMat, TDiam = Machining.Tool.Diameter, H2 = bH2}
end
end
---------------------------------------------------------------------
function VerifyPocket( dMaxDiam, dDepth, dMaxTotLen, bH2)
local dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
local dTMaxDepth = EgtTdbGetCurrToolMaxDepth()
local dTTotLen = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN)
if ( not dMaxDiam or dTDiam < dMaxDiam + GEO.EPS_SMALL) and
( not dDepth or dTMaxDepth > dDepth - GEO.EPS_SMALL) and
( not dMaxTotLen or dTTotLen < dMaxTotLen + GEO.EPS_SMALL) then
return true, { TDiam = dTDiam, TMaxDepth = dTMaxDepth, H2 = bH2}
function VerifyPocket( Machining, dMaxDiam, dDepth, dMaxTotLen, bH2)
if ( not dMaxDiam or Machining.Tool.Diameter < dMaxDiam + GEO.EPS_SMALL) and
( not dDepth or Machining.Tool.MaxMat > dDepth - GEO.EPS_SMALL) and
( not dMaxTotLen or Machining.Tool.TotalLength < dMaxTotLen + GEO.EPS_SMALL) then
return true, { TDiam = Machining.Tool.Diameter, TMaxDepth = Machining.Tool.MaxMat, H2 = bH2}
end
end
---------------------------------------------------------------------
function VerifyTool( MachiningType, sType, Params, bH2)
function VerifyChainSaw( Machining, dDepth, CSimmEncumberance, bH2)
-- riduco il massimo materiale dell'ingombro asse C. Se non richiesto, arriverà un valore di CSimmEncumberance nullo
Machining.Tool.MaxMat = min( Machining.Tool.MaxMat, Machining.Tool.TotalLength - CSimmEncumberance)
if not dDepth or Machining.Tool.MaxMat > dDepth - GEO.EPS_SMALL then
return true, { H2 = bH2}
end
end
---------------------------------------------------------------------
function VerifyTool( Machining, MachiningType, Params, bH2)
if MachiningType == MCH_MY.DRILLING then
if EgtStartsWith( sType, 'Drill') or EgtStartsWith( sType, 'AngleDrill') then
return VerifyDrill( Params.Diam, Params.Depth, bH2)
elseif EgtStartsWith( sType, 'Pocket') then
return VerifyDrillPocket( Params.Diam, Params.Depth, bH2)
if Machining.SubType == 'Drill' or Machining.SubType == 'AngleDrill' or Machining.SubType == 'Predrill' then
return VerifyDrill( Machining, Params.Diam, Params.Depth, bH2)
elseif Machining.SubType == 'DrillPocket' then
return VerifyDrillPocket( Machining, Params.Diam, Params.Depth, bH2)
end
elseif MachiningType == MCH_MY.SAWING then
return true, { H2 = bH2}
return ( not Params.Depth or Machining.Tool.MaxMat > Params.Depth - GEO.EPS_SMALL), { H2 = bH2}
elseif MachiningType == MCH_MY.MILLING then
return VerifyMill( Params.Depth, Params.TuuidMstr, Params.MaxDiam, Params.MaxTotLen, bH2)
return VerifyMill( Machining, Params.Depth, Params.TuuidMstr, Params.MaxDiam, Params.MaxTotLen, bH2)
elseif MachiningType == MCH_MY.POCKETING then
return VerifyPocket( Params.MaxDiam, Params.Depth, Params.MaxTotLen, bH2)
return VerifyPocket( Machining, Params.MaxDiam, Params.Depth, Params.MaxTotLen, bH2)
elseif MachiningType == MCH_MY.MORTISING then
return true, { H2 = bH2}
return VerifyChainSaw( Machining, Params.Depth, Params.CSimmEncumberance, bH2)
else
return false
end
end
---------------------------------------------------------------------
function GetMachinings( MachiningType)
function GetMachinings( MachiningType, sType)
local Machinings = {}
-- leggo le lavorazioni disponibili
if MachiningType == MCH_MY.DRILLING then
return Drillings
if Drillings and type( Drillings) == "table" then
Machinings = Drillings
end
elseif MachiningType == MCH_MY.SAWING then
return Cuttings
if Cuttings and type( Cuttings) == "table" then
Machinings = Cuttings
end
elseif MachiningType == MCH_MY.MILLING then
return Millings
if Millings and type( Millings) == "table" then
Machinings = Millings
end
elseif MachiningType == MCH_MY.POCKETING then
return Pocketings
if Pocketings and type( Pocketings) == "table" then
Machinings = Pocketings
end
elseif MachiningType == MCH_MY.MORTISING then
return Sawings
if Sawings and type( Sawings) == "table" then
Machinings = Sawings
end
elseif MachiningType == MCH_MY.PROBING then
if Probing and type( Probing) == "table" then
Machinings = Probing
end
end
-- scrivo i parametri utensile nella lavorazione
local validMachinings = {}
for i = 1, #Machinings do
local Machining = Machinings[i]
if EgtMdbSetCurrMachining( Machining.Name) then
Machining.Tool = {}
Machining.Tool.UUID = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
Machining.Tool.Name = EgtTdbGetToolFromUUID( Machining.Tool.UUID)
if Machining.Tool.Name then
if EgtTdbSetCurrTool( Machining.Tool.Name) then
table.insert( validMachinings, Machining)
-- se non è tastatura, recupero dati utensile
if MachiningType ~= MCH_MY.PROBING then
-- caso speciale utensile su aggregato flottante
if MachiningType == MCH_MY.MILLING and sType == 'FloatingAggregate' then
local sNotes = EgtTdbGetCurrToolParam( MCH_TP.USERNOTES)
Machining.Tool.MaxMat = EgtGetValInNotes( sNotes, 'TOOL_OVERHANG', 'd') or -1
elseif ( MachiningType == MCH_MY.MILLING) or ( MachiningType == MCH_MY.POCKETING) or ( MachiningType == MCH_MY.DRILLING and EgtStartsWith( sType, 'Pocket')) then
Machining.Tool.MaxMat = EgtTdbGetCurrToolMaxDepth()
else
Machining.Tool.MaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
end
if MachiningType == MCH_MY.DRILLING then
if EgtStartsWith( Machining.Type, 'Drill') then
Machining.SubType = 'Drill'
elseif EgtStartsWith( Machining.Type, 'AngleDrill') then
Machining.SubType = 'AngleDrill'
elseif EgtStartsWith( Machining.Type, 'Pocket') then
Machining.SubType = 'DrillPocket'
elseif EgtStartsWith( Machining.Type, 'Predrill') then
Machining.SubType = 'Predrill'
end
end
Machining.Tool.Diameter = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
Machining.Tool.Length = EgtTdbGetCurrToolParam( MCH_TP.LEN)
Machining.Tool.TotalLength = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN)
Machining.Tool.ToolHolderDiameter = EgtTdbGetCurrToolThDiam()
Machining.Tool.ToolHolderLength = EgtTdbGetCurrToolThLength() or 72
end
end
end
end
end
-- ritorno la lista delle sole lavorazioni valide
return validMachinings
end
---------------------------------------------------------------------
---restituisce la lista delle lavorazioni ordinata secondo il criterio *sCriterion*
---@param Machinings table lista della lavorazioni da riordinare
---@param sCriterion string criterio di ordinamento ('Longest', 'Shortest', 'Biggest', 'Smallest')
function ReorderMachinings( Machinings, sCriterion)
-- funzioni di ordinamento
local function SortMachiningsByLongestTool( Machining1, Machining2)
if Machining1.Tool.MaxMat > Machining2.Tool.MaxMat + 10 * GEO.EPS_SMALL then
return true
else
return false
end
end
local function SortMachiningsByShortestTool( Machining1, Machining2)
if Machining1.Tool.MaxMat < Machining2.Tool.MaxMat - 10 * GEO.EPS_SMALL then
return true
else
return false
end
end
local function SortMachiningsByBiggestTool( Machining1, Machining2)
if Machining1.Tool.Diameter > Machining2.Tool.Diameter + 10 * GEO.EPS_SMALL then
return true
else
return false
end
end
local function SortMachiningsBySmallestTool( Machining1, Machining2)
if Machining1.Tool.Diameter < Machining2.Tool.Diameter - 10 * GEO.EPS_SMALL then
return true
else
return false
end
end
-- ordinamento in base al criterio
-- ordine di default, ossia quello che arriva dal database
if not sCriterion then
return
-- prima gli utensili più lunghi
elseif sCriterion == 'Longest' then
table.sort( Machinings, SortMachiningsByLongestTool)
-- prima gli utensili più corti
elseif sCriterion == 'Shortest' then
table.sort( Machinings, SortMachiningsByShortestTool)
-- prima gli utensili con diametro più grande
elseif sCriterion == 'Biggest' then
table.sort( Machinings, SortMachiningsByBiggestTool)
-- prima gli utensili con diametro più piccolo
elseif sCriterion == 'Smallest' then
table.sort( Machinings, SortMachiningsBySmallestTool)
end
end
---------------------------------------------------------------------
function ReturnParams( MachiningType, MachiningName, sType, ToolParams)
if MachiningType == MCH_MY.DRILLING then
local _, sOrigType = EgtEndsWith( sType, '_H2')
return MachiningName, sType, EgtIf( sOrigType == 'Drill' or sOrigType == 'AngleDrill' , ToolParams.TMaxMat, ToolParams.TMaxDepth), ToolParams.MaxToolLength, ToolParams.ToolDiam, ToolParams.DiamTh, ToolParams.FreeLen
return MachiningName, sType, EgtIf( sOrigType == 'Drill' or sOrigType == 'Drill_AT' or sOrigType == 'AngleDrill' or sOrigType == 'Predrill' , ToolParams.TMaxMat, ToolParams.TMaxDepth), ToolParams.MaxToolLength, ToolParams.ToolDiam, ToolParams.DiamTh, ToolParams.FreeLen
elseif MachiningType == MCH_MY.SAWING then
return MachiningName, ToolParams.H2
elseif MachiningType == MCH_MY.MILLING then
@@ -224,7 +335,8 @@ function ReturnParams( MachiningType, MachiningName, sType, ToolParams)
end
---------------------------------------------------------------------
local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead, bExcludeH3)
local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead, bExcludeH2, bExcludeH3, sSortingCriterion)
local bOptimizeHeads = ( not sSortingCriterion or sSortingCriterion == '')
if bTopHead == nil and bDownHead == nil then
bTopHead = true
bDownHead = false
@@ -233,7 +345,17 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead,
elseif bDownHead == nil then
bDownHead = not bTopHead
end
if bExcludeH2 == nil then
bExcludeH2 = false
end
if bExcludeH3 == nil then
bExcludeH3 = false
end
SetCurrMachineHeadType()
-- verifico se non richiesta testa sopra e macchina ha solo teste sopra
if not bTopHead and MachineHeadType ~= TWO_UP_DOWN_HEADS and not BD.TURN then
return nil
end
-- verifico se testa attiva va bene
local sH1Mach = ''
local sH1Tool = ''
@@ -241,28 +363,29 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead,
local sH2Mach = ''
local sH2Tool = ''
local sH2Param
-- ricerca sulle forature, dal diametro maggiore al minore
local Machinings = GetMachinings( MachiningType)
local Machinings = GetMachinings( MachiningType, sType)
ReorderMachinings( Machinings, sSortingCriterion)
local ForStart = 1
local ForEnd = #Machinings
local ForStep = 1
if MachiningType == MCH_MY.DRILLING then
-- le forature vanno scorse dal diametro maggiore al minore, a meno che non sia stato passato un ordinamento specifico
if MachiningType == MCH_MY.DRILLING and ( not sSortingCriterion or sSortingCriterion == '') then
ForStart = #Machinings
ForEnd = 1
ForStep = -1
end
if ( BEAM and BEAM.BW) or MachineHeadType == ONE_HEAD or MachineHeadType == TWO_EQUAL_HEADS or ( MachineHeadType == TWO_UP_DOWN_HEADS and not bDownHead) then
if bOptimizeHeads or MachineHeadType == ONE_HEAD or MachineHeadType == TWO_EQUAL_HEADS or ( MachineHeadType == TWO_UP_DOWN_HEADS and not bDownHead) then
_, sType = EgtEndsWith( sType, '_H2')
elseif ( not BEAM or not BEAM.BW) and MachineHeadType == TWO_UP_DOWN_HEADS and bDownHead then
elseif not bOptimizeHeads and MachineHeadType == TWO_UP_DOWN_HEADS and not bTopHead and bDownHead then
if not EgtEndsWith( sType, '_H2') then
sType = sType .. '_H2'
end
end
local MachineHeadUse = MachineHeadType
if not BEAM or not BEAM.BW then
if not bOptimizeHeads and MachineHeadUse == TWO_EQUAL_HEADS then
MachineHeadUse = ONE_HEAD
end
if BEAM and BEAM.BW and MachineHeadUse == TWO_UP_DOWN_HEADS and bTopHead and bDownHead then
if MachineHeadUse == TWO_UP_DOWN_HEADS and bTopHead and bDownHead then
-- se posso usare entrambe le teste, la gestisco come una macchina a due teste da sopra
MachineHeadUse = TWO_EQUAL_HEADS
end
@@ -271,27 +394,24 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead,
for i = ForStart, ForEnd, ForStep do
local Machining = Machinings[i]
local sMachiningType = Machining.Type
if BEAM and BEAM.BW then
if bOptimizeHeads or MachineHeadUse == TWO_EQUAL_HEADS then
_, sMachiningType = EgtEndsWith( Machining.Type, '_H2')
end
-- recupero dati utensile
local bToolActive, sToolName, bH2, bFixed, bH3 = SetCurrMachiningAndTool( Machining.Name)
if Machining.On and sMachiningType == sType and bToolActive and ( not bH3 or bH3 == not bExcludeH3) then
local bOk, ToolParams = VerifyTool( MachiningType, sType, Params, bH2)
local bToolActive, sToolName, bH2, bFixed, bH3 = SetCurrMachiningAndTool( Machining)
if Machining.On and sMachiningType == sType and bToolActive and ( not bH2 or bH2 == not bExcludeH2) and ( not bH3 or bH3 == not bExcludeH3) then
local bOk, ToolParams = VerifyTool( Machining, MachiningType, Params, bH2)
if bOk then
if MachineHeadUse == ONE_HEAD then
SetNextMachining( sToolName, 1, bFixed)
return ReturnParams(MachiningType, Machining.Name, Machining.Type, ToolParams)
elseif MachineHeadUse == TWO_EQUAL_HEADS then
-- se nessuna testa attiva, prendo la prima lavorazione disponibile
if nActiveHead == 0 then
SetNextMachining( sToolName, EgtIf( bH2, 2, 1), bFixed)
return ReturnParams( MachiningType, Machining.Name, Machining.Type, ToolParams)
-- verifico se posso usare lo stesso utensile della testa attiva
elseif ( nActiveHead == 1 and not bH2 and sToolName == H1_TOOL) or ( nActiveHead == 2 and bH2 and sToolName == H2_TOOL) then
-- se l'utensile sulla testa attiva è molto più piccolo rispetto a quelli salvati non lo scelgo
if ( not sH1Param or not sH1Param.TDiam or sH1Param.TDiam < dBiggerToolTolerance * ToolParams.TDiam) and ( not sH2Param or not sH2Param.TDiam or sH2Param.TDiam < 1.25 * ToolParams.TDiam) then
SetNextMachining( sToolName, nActiveHead, bFixed)
-- se l'utensile sulla testa attiva è molto più piccolo rispetto a quelli salvati non lo scelgo, a meno che non siano entrambi grandi (truciolatori)
if ( not sH1Param or not sH1Param.TDiam or ( sH1Param.TDiam < 75 and ToolParams.TDiam < 75 and sH1Param.TDiam < dBiggerToolTolerance * ToolParams.TDiam)) and ( not sH2Param or not sH2Param.TDiam or ( sH2Param.TDiam < 75 and ToolParams.TDiam < 75 and sH2Param.TDiam < 1.25 * ToolParams.TDiam)) then
return ReturnParams( MachiningType, Machining.Name, Machining.Type, ToolParams)
end
end
@@ -311,10 +431,8 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead,
end
elseif MachineHeadUse == TWO_UP_DOWN_HEADS then
if bTopHead and not bH2 then
SetNextMachining( sToolName, 1, bFixed)
return ReturnParams( MachiningType, Machining.Name, Machining.Type, ToolParams)
elseif bDownHead and bH2 then
SetNextMachining( sToolName, 2, bFixed)
return ReturnParams( MachiningType, Machining.Name, Machining.Type, ToolParams)
end
end
@@ -322,55 +440,58 @@ local function FindMachining( MachiningType, sType, Params, bTopHead, bDownHead,
end
end
if MachineHeadUse == TWO_EQUAL_HEADS then
-- se uno dei due utensili è molto più grande dell'altro scelgo quello senza fare altre analisi
-- se entrambi gli utensili sono piccoli (no truciolatori) e uno dei due è molto più grande dell'altro scelgo quello senza fare altre analisi
if sH1Mach ~= "" and sH1Param.TDiam and sH2Mach ~= "" and sH2Param.TDiam then
if sH1Param.TDiam > dBiggerToolTolerance * sH2Param.TDiam then
SetNextMachining( sH1Tool, 1, bFixed)
return ReturnParams( MachiningType, sH1Mach, sType, sH1Param)
elseif sH2Param.TDiam > dBiggerToolTolerance * sH1Param.TDiam then
SetNextMachining( sH2Tool, 2, bFixed)
return ReturnParams( MachiningType, sH2Mach, sType, sH2Param)
if sH1Param.TDiam < 75 or sH2Param.TDiam < 75 then
if sH1Param.TDiam > dBiggerToolTolerance * sH2Param.TDiam then
return ReturnParams( MachiningType, sH1Mach, sType, sH1Param)
elseif sH2Param.TDiam > dBiggerToolTolerance * sH1Param.TDiam then
return ReturnParams( MachiningType, sH2Mach, sType, sH2Param)
end
end
end
-- verifico se cambiare testa o cambiare utensile su quella corrente
if nActiveHead == 1 then
if sH2Mach ~= "" then
SetNextMachining( sH2Tool, 2, bFixed)
return ReturnParams( MachiningType, sH2Mach, sType, sH2Param)
--return sH2Mach, sH2Param.Type, sH2Param.TMaxMat, sH2Param.MaxToolLength, sH2Param.ToolDiam, sH2Param.DiamTh, sH2Param.FreeLen
elseif sH1Mach ~= "" then
SetNextMachining( sH1Tool, 1, bFixed)
return ReturnParams( MachiningType, sH1Mach, sType, sH1Param)
--return sH1Mach, sH1Param.Type, sH1Param.TMaxMat, sH1Param.MaxToolLength, sH1Param.ToolDiam, sH1Param.DiamTh, sH1Param.FreeLen
end
elseif nActiveHead == 2 then
if sH1Mach ~= "" then
SetNextMachining( sH1Tool, 1, bFixed)
return ReturnParams( MachiningType, sH1Mach, sType, sH1Param)
--return sH1Mach, sH1Param.Type, sH1Param.TMaxMat, sH1Param.MaxToolLength, sH1Param.ToolDiam, sH1Param.DiamTh, sH1Param.FreeLen
elseif sH2Mach ~= "" then
SetNextMachining( sH2Tool, 2, bFixed)
return ReturnParams( MachiningType, sH2Mach, sType, sH2Param)
--return sH2Mach, sH2Param.Type, sH2Param.TMaxMat, sH2Param.MaxToolLength, sH2Param.ToolDiam, sH2Param.DiamTh, sH2Param.FreeLen
end
end
end
local bH2, sOrigType = EgtEndsWith( sType, '_H2')
if ( not BEAM or not BEAM.BW) and MachineHeadType == TWO_UP_DOWN_HEADS and bH2 and bTopHead then
if not bOptimizeHeads and MachineHeadType == TWO_UP_DOWN_HEADS and bH2 and bTopHead then
return FindMachining( MachiningType, sOrigType, Params, true, false)
end
end
---------------------------------------------------------------------
function MachiningLib.FindCutting( sType, bTopHead, bDownHead)
return FindMachining( MCH_MY.SAWING, sType, nil, bTopHead, bDownHead)
function MachiningLib.FindCutting( sType, bTopHead, bDownHead, dDepth, sSortingCriterion)
return FindMachining( MCH_MY.SAWING, sType, { Depth = dDepth}, bTopHead, bDownHead, nil, nil, sSortingCriterion)
end
---------------------------------------------------------------------
function MachiningLib.FindDrilling( dDiam, dDepth, bTopHead, bDownHead)
local MachiningName, MachiningType, Param1, Param2, Param3, Param4, Param5 = FindMachining( MCH_MY.DRILLING, 'Drill', { Diam = dDiam, Depth = dDepth}, bTopHead, bDownHead)
if not MachiningName or MachiningName == '' then
MachiningName, MachiningType, Param1, Param2, Param3, Param4, Param5 = FindMachining( MCH_MY.DRILLING, 'Pocket', { Diam = dDiam, Depth = dDepth}, bTopHead, bDownHead)
function MachiningLib.FindDrilling( dDiam, dDepth, bTopHead, bDownHead, bExcludeH2, bAngleTransmission, bIsPredrill, bExcludeH3, sSortingCriterion)
local MachiningName, MachiningType, Param1, Param2, Param3, Param4, Param5, sTypeMach
-- se il foro è un predrill, cerco solo punte abilitate al Predrill
if bIsPredrill then
sTypeMach = 'Predrill'
else
sTypeMach = EgtIf( bAngleTransmission, 'Drill_AT', 'Drill')
end
MachiningName, MachiningType, Param1, Param2, Param3, Param4, Param5 = FindMachining( MCH_MY.DRILLING, sTypeMach, { Diam = dDiam, Depth = dDepth}, bTopHead, bDownHead, bExcludeH2, bExcludeH3, sSortingCriterion)
if ( not MachiningName or MachiningName == '') then
MachiningName, MachiningType, Param1, Param2, Param3, Param4, Param5 = FindMachining( MCH_MY.DRILLING, EgtIf( bAngleTransmission, 'Pocket_AT', 'Pocket'), { Diam = dDiam, Depth = dDepth}, bTopHead, bDownHead, bExcludeH2, bExcludeH3, sSortingCriterion)
end
if MachiningName and MachiningName ~= '' then
return MachiningName, MachiningType, Param1, Param2, Param3, Param4, Param5
@@ -386,18 +507,19 @@ function MachiningLib.FindAngleDrilling( dDiam, dDepth, bTopHead, bDownHead)
end
---------------------------------------------------------------------
function MachiningLib.FindMilling( sType, dDepth, sTuuidMstr, dMaxDiam, dMaxTotLen, bTopHead, bDownHead, bExcludeH3)
return FindMachining( MCH_MY.MILLING, sType, { Depth = dDepth, TuuidMstr = sTuuidMstr, MaxDiam = dMaxDiam, MaxTotLen = dMaxTotLen}, bTopHead, bDownHead, bExcludeH3)
function MachiningLib.FindMilling( sType, dDepth, sTuuidMstr, dMaxDiam, dMaxTotLen, bTopHead, bDownHead, bExcludeH2, bExcludeH3, sSortingCriterion)
return FindMachining( MCH_MY.MILLING, sType, { Depth = dDepth, TuuidMstr = sTuuidMstr, MaxDiam = dMaxDiam, MaxTotLen = dMaxTotLen}, bTopHead, bDownHead, bExcludeH2, bExcludeH3, sSortingCriterion)
end
---------------------------------------------------------------------
function MachiningLib.FindPocketing( sType, dMaxDiam, dDepth, dMaxTotLen, bTopHead, bDownHead)
return FindMachining( MCH_MY.POCKETING, sType, { MaxDiam = dMaxDiam, Depth = dDepth, MaxTotLen = dMaxTotLen}, bTopHead, bDownHead)
function MachiningLib.FindPocketing( sType, dMaxDiam, dDepth, dMaxTotLen, bTopHead, bDownHead, bExcludeH2, bExcludeH3, sSortingCriterion)
return FindMachining( MCH_MY.POCKETING, sType, { MaxDiam = dMaxDiam, Depth = dDepth, MaxTotLen = dMaxTotLen}, bTopHead, bDownHead, bExcludeH2, bExcludeH3, sSortingCriterion)
end
---------------------------------------------------------------------
function MachiningLib.FindSawing( sType)
return FindMachining( MCH_MY.MORTISING, sType)
function MachiningLib.FindSawing( sType, dDepth, bConsiderCSimmEncumberance, sSortingCriterion)
if not BD.C_SIMM_ENC then BD.C_SIMM_ENC = EgtIf( BD.C_SIMM, 180, 90) end
return FindMachining( MCH_MY.MORTISING, sType, { Depth = dDepth, CSimmEncumberance = EgtIf( bConsiderCSimmEncumberance, BD.C_SIMM_ENC, 0)}, nil, nil, nil, nil, sSortingCriterion)
end
-------------------------------------------------------------------------------------------------------------
+4 -2
View File
@@ -151,7 +151,8 @@ function ProcessBlockHausFront.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dO
-- se va fatto, inserisco la lavorazione
if bCut then
local CutProc = { Id = AuxId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead)
-- se taglio applicato setto la nota al gruppo Mach per non doverla lavorare una seconda volta
if bOk then
@@ -242,7 +243,8 @@ function ProcessBlockHausFront.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dO
-- se va fatto, inserisco la lavorazione
if bCut then
local CutProc = { Id = AuxId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead)
-- se taglio applicato setto la nota al gruppo Mach per non doverla lavorare una seconda volta
if bOk then
+222 -93
View File
@@ -1,4 +1,4 @@
-- ProcessCut.lua by Egaltech s.r.l. 2022/09/30
-- ProcessCut.lua by Egaltech s.r.l. 2023/08/01
-- Gestione calcolo singoli tagli di lama per Travi
-- 2021/05/18 I due tagli con testa da sotto di un cubetto sono fatti di seguito.
-- 2021/06/06 Correzioni per tagli con testa da sotto.
@@ -17,6 +17,15 @@
-- 2022/08/25 In caso di AdvTail con taglio lungo Y la profondità di lavorazione è opportunamente diminuita.
-- 2022/08/30 Modificata la condizione che determina l'utilizzo della testa da sotto. Ora controlla se la trave è più grande del doppio della massima larghezza del cubetto.
-- 2022/09/23 Corretta la condizione per cui è richiesto l'aggiornamento del grezzo.
-- 2023/01/26 Migliorata la direzione di lavoro della lama in alcuni casi in cui il truciolo veniva scaricato dal lato errato.
-- 2023/06/19 Aggiunti tagli speciali per evitare il rischio che il cubetto rimanga appoggiato al motore.
-- 2023/08/01 Correzione su offset per taglio doppio di lato.
-- 2023/08/01 In caso di pezzi alti su macchina tipo PF i tagli doppi di lato non vengono usati, si usa il metodo standard.
-- 2023/09/12 In MakeFromTop abbassato a 590 mm il limite per convertire in LongCut.
-- 2023/10/27 In MakeFromTop corretto massimo materiale in caso di lavorazione da sotto.
-- 2023/12/07 Correzione in Classify in scelta ribaltamento trave quando si è in condizioni downUp.
-- 2024/01/18 Gestita superficie limitante opzionale da passare a diceCut.
-- 2024/05/10 In MakeFromTop ricalcolo direzione di lavorazione su facce a cubetti
-- Tabella per definizione modulo
local ProcessCut = {}
@@ -37,7 +46,14 @@ local ML = require( 'MachiningLib')
---------------------------------------------------------------------
-- Riconoscimento della feature
function ProcessCut.Identify( Proc)
return ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 10)
-- se richiesto si forza fresatura
Proc.bForceMill = ( ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 10) and ( ( EgtGetInfo( Proc.Id, 'Q07', 'd') or 0) == 1))
if Proc.bForceMill then
return false
else
return ( ( Proc.Grp == 1 or Proc.Grp == 2) and Proc.Prc == 10)
end
end
---------------------------------------------------------------------
@@ -49,11 +65,14 @@ function ProcessCut.Classify( Proc, b3Raw)
end
-- recupero i dati del taglio
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
if vtN:getZ() <= - 0.5 and abs( vtN:getY()) > 0.1 or ( vtN:getZ() <= - 0.174 and abs( vtN:getY()) > 0.866) then
-- calcolo le massime estensioni lineari orizzontale e verticale della faccia
local _, DimH, DimV = BL.GetFaceHvRefDim( Proc.Id, 0, b3Raw)
-- calcolo le massime estensioni lineari orizzontale e verticale della faccia
local _, DimH, DimV = BL.GetFaceHvRefDim( Proc.Id, 0, b3Raw)
if ( vtN:getZ() <= - 0.5 and abs( vtN:getY()) > 0.1) or
( vtN:getZ() <= - 0.174 and abs( vtN:getY()) > 0.866) or
( vtN:getZ() <= - 0.174 and abs( vtN:getZ()) * DimV > BD.MAX_DIM_DICE)
then
-- confronto queste estensioni con la massima dimensione del DiceCut (impossibile lavorare se entrambe maggiori)
if DimH > BD.MAX_DIM_DICE and DimV > BD.MAX_DIM_DICE then
if DimH > BD.MAX_DIM_DICE + 100 * GEO.EPS_SMALL and DimV > BD.MAX_DIM_DICE + 100 * GEO.EPS_SMALL then
return true, true
end
end
@@ -61,10 +80,22 @@ function ProcessCut.Classify( Proc, b3Raw)
local dNzLimDwnUp = BL.GetNzLimDownUp( b3Raw)
local bDownCut = ( vtN:getZ() <= dNzLimDwnUp)
if bDownCut then
-- recupero i dati della lama
local sCutType = EgtIf( Proc.Head, 'HeadSide', 'TailSide')
local sCutting = ML.FindCutting( sCutType, true, false)
local dMaxDepth = 0
local dMaxMat = 0
if EgtMdbSetCurrMachining( sCutting) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxMat
end
end
-- calcolo l'ingombro orizzontale della faccia
local _, DimH, DimV = BL.GetFaceHvRefDim( Proc.Id, 0)
-- confronto questo ingombro con il doppio della massima dimensione del DiceCut (impossibile lavorare sotto da sopra se più di 2 tagli)
if DimH > 2 * BD.MAX_DIM_DICE then
_, DimH, DimV = BL.GetFaceHvRefDim( Proc.Id, 0)
-- confronto questo ingombro con il doppio della massima dimensione del DiceCut (impossibile lavorare sotto da sopra se più di 2 tagli oppure se tipo PF, taglio inclinato in Y e non taglio singolo orizzontale)
if DimH > 2 * BD.MAX_DIM_DICE or ( BD.C_SIMM and ( abs( vtN:getY()) > 0.1) and dMaxMat < DimH + BD.CUT_EXTRA) then
return true, true
end
end
@@ -171,7 +202,7 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
EgtSetOperationMode( nMch1Id, false)
return false, sErr
end
-- Inserisco la lavorazione del lato opposto
@@ -194,7 +225,7 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
EgtSetOperationMode( nMch2Id, false)
return false, sErr
end
return true, nil
@@ -205,13 +236,14 @@ end
local function UpdateEncumbrance( Proc, vtN, dOvmHead, nRawId, b3Solid, b3Raw)
-- eventuale segnalazione ingombro di testa o coda (se non chiamata da altre feature)
local dMinHIng = min( 0.5 * BD.VICE_MINH, 0.5 * b3Raw:getDimZ())
if Proc.Box:getDimZ() > dMinHIng and Proc.Box:getMin():getZ() < b3Raw:getMin():getZ() + dMinHIng then
local dMinZ = max( BD.MIN_HEIGHT, 0.35 * b3Raw:getDimZ())
if Proc.Box:getDimZ() > dMinHIng and Proc.Box:getMin():getZ() < b3Raw:getMin():getZ() + dMinZ then
if Proc.Head then
local dOffs = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
if vtN:getZ() > 0.5 then
dOffs = dOffs - 0.6 * Proc.Box:getDimX()
elseif vtN:getZ() < -0.5 then
dOffs = dOffs - 0.2 * Proc.Box:getDimX()
dOffs = dOffs - EgtIf( BD.PRESS_ROLLER, 0.4, 0.2) * Proc.Box:getDimX()
elseif ( abs( vtN:getY()) > 0.9 and vtN:getZ() > 0.2) then
dOffs = dOffs - 0.3 * Proc.Box:getDimX()
end
@@ -221,7 +253,7 @@ local function UpdateEncumbrance( Proc, vtN, dOvmHead, nRawId, b3Solid, b3Raw)
if vtN:getZ() > 0.5 then
dOffs = dOffs - 0.6 * Proc.Box:getDimX()
elseif vtN:getZ() < -0.5 then
dOffs = dOffs - 0.2 * Proc.Box:getDimX()
dOffs = dOffs - EgtIf( BD.PRESS_ROLLER, 0.4, 0.2) * Proc.Box:getDimX()
elseif ( abs( vtN:getY()) > 0.9 and vtN:getZ() > 0.2) then
dOffs = dOffs - 0.3 * Proc.Box:getDimX()
end
@@ -232,7 +264,8 @@ end
---------------------------------------------------------------------
-- Applicazione della lavorazione con testa da sopra
local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes)
local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, nLimitingSurf, sLeadInOutType)
local sWarn
-- ingombro del grezzo
b3Raw = b3Raw or EgtGetRawPartBBox( nRawId)
-- ingombro del pezzo
@@ -243,16 +276,17 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
local dNzLimDwnUp = BL.GetNzLimDownUp( b3Raw, vtN)
local bDownCut = ( vtN:getZ() <= dNzLimDwnUp)
if bFromBottom == nil then
bFromBottom = ( vtN:getZ() > 0.25 and b3Solid:getDimX() < BD.LEN_SHORT_PART and not Proc.AdvTail and vtN:getX() < 0 and abs( vtN:getY()) < 0.259)
bFromBottom = ( vtN:getZ() > 0.25 and ( b3Solid:getDimX() < BD.LEN_SHORT_PART and BL.IsSplittedPartPhase( nPhase)) and not Proc.AdvTail and vtN:getX() < 0 and abs( vtN:getY()) < 0.259)
end
local dMinFeatureLengthForLongCut = EgtIf( BD.C_SIMM, 590, 400)
-- verifico se da considerare taglio lungo ( non da sotto, inclinato non più di 30deg, largo come la trave e abbastanza lungo)
local bLongCut = ( not bDownCut and vtN:getZ() > 0.865 and
Proc.Box:getDimY() > b3Solid:getDimY() - 10 * GEO.EPS_SMALL and
( Proc.Box:getDimX() > 0.75 * b3Solid:getDimX() or Proc.Box:getDimX() > 600.000))
( Proc.Box:getDimX() > 0.75 * b3Solid:getDimX() or Proc.Box:getDimX() > dMinFeatureLengthForLongCut))
-- verifico se da considerare taglio lungo dal lato, solo per macchine tipo PF1250, inclinato non più di 30deg
local bLongCutFromSide = ( not bDownCut and ( BD.C_SIMM and BD.DOWN_HEAD and ( abs(vtN:getY()) > 0.865) and
Proc.Box:getDimZ() > b3Solid:getDimZ() - 10 * GEO.EPS_SMALL) and
( Proc.Box:getDimX() > 0.75 * b3Solid:getDimX() or Proc.Box:getDimX() > 600.000))
( Proc.Box:getDimX() > 0.75 * b3Solid:getDimX() or Proc.Box:getDimX() > dMinFeatureLengthForLongCut))
-- se taglio lungo e Q04 = 1 allora lancio il processo dell'L10
local bNoDicing = EgtGetInfo( Proc.Id, 'Q04', 'i') == 1
if bNoDicing then
@@ -284,9 +318,9 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
-- se la faccia occupa tutta la trave in X e Z o occupa sicuramente la faccia in Z e almeno 3/4 della faccia in X e sborda in X,
if ( ( abs( Proc.Box:getMin():getX() - b3Solid:getMin():getX()) < 10*GEO.EPS_SMALL and abs( Proc.Box:getMax():getX() - b3Solid:getMax():getX()) < 10*GEO.EPS_SMALL) or
( ( abs( Proc.Box:getMin():getX() - b3Solid:getMin():getX()) < 10*GEO.EPS_SMALL or abs( Proc.Box:getMax():getX() - b3Solid:getMax():getX()) < 10*GEO.EPS_SMALL) and
Proc.Box:getDimX() > 0.75 * b3Solid:getDimX())) and
Proc.Box:getDimX() > 0.90 * b3Solid:getDimX())) and
abs( Proc.Box:getMin():getZ() - b3Solid:getMin():getZ()) < 10*GEO.EPS_SMALL and abs( Proc.Box:getMax():getZ() - b3Solid:getMax():getZ()) < 10*GEO.EPS_SMALL then
local sErr = 'Error : Impossible to machine by orientation (on side)'
local sErr = 'Error : Impossible to machine by orientation (on side A)'
EgtOutLog( sErr)
return false, sErr
end
@@ -304,7 +338,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
-- se la faccia termina davanti o dietro la trave e arriva in coda e non interessa la faccia inferiore, forzo il taglio a cubetti a partire dal davanti
if ( abs( Proc.Box:getMin():getZ() - b3Solid:getMin():getZ()) < 10*GEO.EPS_SMALL or abs( Proc.Box:getMax():getZ() - b3Solid:getMax():getZ()) < 10*GEO.EPS_SMALL) and
abs( Proc.Box:getMin():getX() - b3Solid:getMin():getX()) < 10*GEO.EPS_SMALL then
local sErr = 'Error : Impossible to machine by orientation (on side)'
local sErr = 'Error : Impossible to machine by orientation (on side B)'
EgtOutLog( sErr)
return false, sErr
end
@@ -341,17 +375,31 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
EgtOutLog( sErr)
return false, sErr
end
-- verifico se necessari tagli supplementari
-- verifico se necessari tagli supplementari o se presente superficie limitante
EgtOutLog( string.format( 'MaxDepth=%.1f MaxVertDepth=%.1f CutH=%.1f CutV=%.1f', dMaxDepth, dMaxVertDepth, dCutH, dCutV), 3)
-- se lungo, una faccia e rivolto sul retro verso l'alto si forzano i cubetti per evitare di rovinare il pezzo successivo
local bForceDicing = ( Proc.Fct == 1 and Proc.AffectedFaces.Left and bLongCut and vtN:getZ() > 10 * GEO.EPS_SMALL and vtN:getY() < 10 * GEO.EPS_SMALL)
local vCuts = {}
if not Proc.AdvTail and ( dCutH > dMaxDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC or dCutV > dMaxVertDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC) then
local dDicingOffsetP
local dDicingOffsetO
if ( ( not Proc.AdvTail) or bForceDicing) and
( dCutH - 100 * GEO.EPS_SMALL > dMaxDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC or
dCutV - 100 * GEO.EPS_SMALL > dMaxVertDepth - BD.CUT_EXTRA - 3 * BD.COLL_SIC) then
local ptExtra, vtExtra
local bAutoCalcSurf = true
if Proc.AdvTail then
-- do avviso che la lama può sbordare nel pezzo successivo
sWarn = 'Warning : Cut machining can damage next piece'
EgtOutLog( sWarn .. ' (process ' .. tostring( Proc.Id) .. ')')
end
if bFillAreaPiece or bFillTail then
local ptMiddle = ( b3Solid:getMin() + b3Solid:getMax()) / 2
ptExtra = Point3d( b3Solid:getMin():getX() + 5*GEO.EPS_SMALL, ptMiddle:getY(), ptMiddle:getZ())
vtExtra = X_AX()
bAutoCalcSurf = false
-- superficie limitante
elseif nLimitingSurf then
ptExtra, vtExtra = EgtSurfTmFacetCenter( nLimitingSurf, 0, GDB_ID.ROOT)
end
-- verifico elevazione max del materiale tagliato
local dMaxElev
@@ -368,9 +416,9 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
dMaxElev = Proc.Box:getMax():getX() - b3Solid:getMin():getX()
end
end
-- per macchina TURN aggiusto massima dimensione cubetto
-- per macchina TURN (ma non OikosX) aggiusto massima dimensione cubetto
local dNewDiceDim
if BD.TURN then
if BD.TURN and BD.TURN ~= 2 then
local dDimRef = GEO.INFINITO
if abs( vtN:getZ()) < 0.003 then
dDimRef = b3Raw:getDimZ()
@@ -382,11 +430,11 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
end
end
-- se il taglio è più spesso della lama abilito il dicing, altrimenti no
if dMaxElev > dSawThick then
vCuts = DC.GetDice( nAddGrpId, EgtIf( bForced, b3Raw, b3Solid), ptC, vtN, bAutoCalcSurf, ptExtra, vtExtra, dMaxVertDepth - BD.CUT_EXTRA, dNewDiceDim)
if ( dMaxElev > dSawThick) or bForceDicing then
vCuts, dDicingOffsetP = DC.GetDice( nAddGrpId, EgtIf( bForced, b3Raw, b3Solid), ptC, vtN, bAutoCalcSurf, ptExtra, vtExtra, dMaxVertDepth - BD.CUT_EXTRA, dNewDiceDim)
-- se taglio sborda in coda e non è stato inserito nessun taglio a cubetti, lo rilancio con le dimensioni customizzate
if ( bFillTail or bCustDiceCut) and #vCuts == 0 then
vCuts = DC.GetDice( nAddGrpId, b3Solid, ptC, vtN, bAutoCalcSurf, ptExtra, vtExtra, dMaxVertDepth - BD.CUT_EXTRA, Proc.Box:getDimY())
vCuts, dDicingOffsetP = DC.GetDice( nAddGrpId, b3Solid, ptC, vtN, bAutoCalcSurf, ptExtra, vtExtra, dMaxVertDepth - BD.CUT_EXTRA, Proc.Box:getDimY())
end
end
end
@@ -394,6 +442,19 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
if bCustDiceCut and #vCuts == 0 then
return false, -1
end
-- per caso speciale in cui c'è il rischio che il cubetto rimanga appoggiato sul motore, faccio solo i tagli perpendicolari seguiti da due tagli verticali laterali
local bDangerousReliefCut = false
-- verifico che i tagli perpendicolari siano perpendicolari al lato più vicino a Z
local nFirstPerpendicularCut = ( #vCuts > 0 and ( vCuts[1][1] or vCuts[3][1]))
if nFirstPerpendicularCut then
local frFace = BL.GetFaceHvRefDim( Proc.Id, 0)
local vtTemp = EgtSurfTmFacetNormVersor( nFirstPerpendicularCut, 0, GDB_ID.ROOT) ^ frFace:getVersX()
if not ( vtTemp:isSmall()) and not ( bDownCut or bFromBottom) and not bLongCut and ( not BD.C_SIMM or b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL) then
bDangerousReliefCut = true
end
end
--DC.PrintOrderCut( vCuts)
if #vCuts > 0 then
-- sistemo posizione nel DB e nome
@@ -404,8 +465,8 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
EgtSetInfo( vCuts[i][j], 'TASKID', Proc.TaskId)
if ( i % 2) == 1 then
local vtO = EgtSurfTmFacetNormVersor( vCuts[i][j], 0, GDB_ID.ROOT)
if ( vtN:getY() > 0.707 and vtO:getY() < -0.05) or
( vtN:getY() < -0.707 and vtO:getY() > 0.05) then
if ( vtN:getY() > 0.766 and vtO:getY() < -0.05) or
( vtN:getY() < -0.766 and vtO:getY() > 0.05) then
EgtInvertSurf( vCuts[i][j])
bOrthInv = true
end
@@ -441,7 +502,15 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
if vtO then
vtOrthoO = Vector3d( vtO) * EgtIf( bOrthInv, -1, 1)
else
if bHorizCut then
-- ricalcolo tipo taglio perché "bHorizCut" è calcolato sulla feature, mentre il cubetto potrebbe essere lavorato in un altro modo
local _, dLen, dWidth = BL.GetFaceHvRefDim( vCuts[i][1], 0, b3Raw)
local bCutDirection = bHorizCut
-- se bisogna tagliare di fianco ma la lunghezza faccia è più del massimo materiale, forzo lavorazione da sopra
if not bHorizCut and dLen > dMaxDepth then
bCutDirection = true
end
if bCutDirection then
vtOrthoO = Z_AX()
else
if vtN:getZ() < dNzLimDwnUp then
@@ -452,44 +521,101 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
end
end
end
-- lavoro la faccia
for j = 1, #vCuts[i] do
-- se taglio dal basso
if bDownCut then
-- se strato pari composto da 1 o 2 elementi
if ( i % 2) == 0 and #vCuts[i] <= 2 then
-- il primo elemento prende la direzione prevista, il secondo quella opposta
local vtNewOrthoO = Vector3d( vtOrthoO)
local dVzLimDwnUp = dNzLimDwnUp
if j ~= 1 then
vtNewOrthoO = -vtOrthoO
if not BD.C_SIMM and not BD.TURN and abs( vtN:getY()) > 0.05 then dVzLimDwnUp = -0.708 end
local dDiceFaceMaxH = 0
local dDiceFaceMinH = GEO.INFINITO
if ( i % 2) == 0 and bDangerousReliefCut then
for j = 1, #vCuts[i] do
local _, dDiceFaceH, dDiceFaceV = BL.GetFaceHvRefDim( vCuts[i][j], 0)
dDiceFaceMaxH = max( dDiceFaceMaxH, dDiceFaceH)
-- calcolo lato orizzontale minore ipotizzando sia un trapezio
local dDiceFaceH2 = ( 2 * EgtSurfArea( vCuts[i][j]) ) / dDiceFaceV - dDiceFaceH
dDiceFaceMinH = min( dDiceFaceMinH, dDiceFaceH2)
end
end
-- caso speciale con rischio cubetto sul motore
if ( i % 2) == 0 and bDangerousReliefCut and ( dMaxDepth > dDiceFaceMaxH - 0.5 * dDiceFaceMinH + BD.CUT_EXTRA_MIN) then
local bDoubleCut = false
local dCutExtra = BD.CUT_EXTRA
if dMaxDepth < dDiceFaceMaxH + BD.CUT_EXTRA then
bDoubleCut = true
dCutExtra = - 0.5 * dDiceFaceMinH + BD.CUT_EXTRA_MIN
end
local nSurfToCut = EgtSurfTmBySewing( nAddGrpId, vCuts[i], false)
local nFaceUseCut1, nFaceUseCut2 = MCH_MILL_FU.ORTHO_BACK, MCH_MILL_FU.ORTHO_FRONT
if Proc.Tail then
nFaceUseCut1, nFaceUseCut2 = nFaceUseCut2, nFaceUseCut1
end
if bDoubleCut then
local bOk, sErr = Fbs.MakeOne( nSurfToCut, 0, sCutting, dSawDiam, nFaceUseCut1, nil, dCutExtra, BD.CUT_SIC, 0, 0, 0, '', b3Raw, true)
if not bOk then return false, sErr end
end
local bOk2, sErr2 = Fbs.MakeOne( nSurfToCut, 0, sCutting, dSawDiam, nFaceUseCut2, nil, dCutExtra, BD.CUT_SIC, 0, 0, 0, '', b3Raw)
if not bOk2 then return false, sErr2 end
-- caso standard
else
-- lavoro la faccia
for j = 1, #vCuts[i] do
-- se taglio dal basso
if bDownCut then
-- se strato pari composto da 1 o 2 elementi
if ( i % 2) == 0 and #vCuts[i] <= 2 then
-- il primo elemento prende la direzione prevista, il secondo quella opposta
local vtNewOrthoO = Vector3d( vtOrthoO)
local dVzLimDwnUp = dNzLimDwnUp
if j ~= 1 then
vtNewOrthoO = -vtOrthoO
if BD.GetNzLimDownUp then
dVzLimDwnUp = BD.GetNzLimDownUp( b3Raw, vtN, V_NULL(), true)
elseif not BD.C_SIMM and not BD.TURN and abs( vtN:getY()) > 0.05 then
dVzLimDwnUp = -0.708
end
end
local bSpecialTangentLeadInOut = ( i % 2 == 0) and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right)
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtNewOrthoO, dVzLimDwnUp, BD.CUT_EXTRA, BD.CUT_SIC, 0, 0, 0, nil, b3Raw, nil, nil, bSpecialTangentLeadInOut)
if not bOk then return bOk, sErr end
end
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtNewOrthoO, dVzLimDwnUp, BD.CUT_EXTRA, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
-- tutti gli altri casi vengono saltati
-- caso generale
else
-- in generale sta sollevato di pochissimo
local dExtraCut = -0.1
-- se tagli paralleli
if ( i % 2) == 0 then
-- se non ci sono tagli ortogonali devo affondare
if bNoPerpCuts then
dExtraCut = BD.CUT_EXTRA
-- se altrimenti tagli ortogonali invertiti, devo approfondire dello spessore lama
elseif bOrthInv then
dExtraCut = dSawThick
-- se ultimo taglio, devo affondare
elseif j == #vCuts[i] then
dExtraCut = BD.CUT_EXTRA
end
end
local dVzLimDwnUp = dNzLimDwnUp
if BD.GetNzLimDownUp then
dVzLimDwnUp = BD.GetNzLimDownUp( b3Raw, vtN, V_NULL(), true)
elseif not BD.C_SIMM and not BD.TURN and vtN:getZ() > 0.707 then
dVzLimDwnUp = -0.708
end
local bSpecialTangentLeadInOut = ( i % 2 == 0) and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right)
local vtOrthoOAlternative
if ( i % 2 == 0) and ( Proc.Fct == 1) and bNoPerpCuts then
vtOrthoOAlternative = - vtOrthoO
end
local sLeadInOutTypeFbs = 'Calculated'
if ( ( i % 2) ~= 0) then
if ( sLeadInOutType == 'Tangent') then
sLeadInOutTypeFbs = 'Tangent'
elseif ( sLeadInOutType == 'Perpendicular') then
sLeadInOutTypeFbs = 'Perpendicular'
elseif ( sLeadInOutType == 'PerpendicularOutraw') then
sLeadInOutTypeFbs = 'PerpendicularOutraw'
end
end
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dExtraCut, BD.CUT_SIC, 0, 0, 0, sNotes, b3Raw, nil, nil, bSpecialTangentLeadInOut, sLeadInOutTypeFbs, vtOrthoOAlternative, dDicingOffsetP)
if not bOk then return bOk, sErr end
end
-- tutti gli altri casi vengono saltati
-- caso generale
else
-- in generale sta sollevato di pochissimo
local dExtraCut = -0.1
-- se tagli paralleli
if ( i % 2) == 0 then
-- se non ci sono tagli ortogonali devo affondare
if bNoPerpCuts then
dExtraCut = BD.CUT_EXTRA
-- se altrimenti tagli ortogonali invertiti, devo approfondire dello spessore lama
elseif bOrthInv then
dExtraCut = dSawThick
-- se ultimo taglio, devo affondare
elseif j == #vCuts[i] then
dExtraCut = BD.CUT_EXTRA
end
end
local dVzLimDwnUp = dNzLimDwnUp
if not BD.C_SIMM and not BD.TURN and vtN:getZ() > 0.707 then dVzLimDwnUp = -0.708 end
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dExtraCut, BD.CUT_SIC, 0, 0, 0, sNotes, b3Raw)
if not bOk then return bOk, sErr end
end
end
end
@@ -504,9 +630,10 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
end
-- lavoro la faccia
local vtOrthoO
if bFromBottom and dCutV < dMaxVertDepth - BD.CUT_EXTRA and vtN:getZ() > 0 then
if bFromBottom and dCutV < dMaxDepth - BD.CUT_EXTRA and vtN:getZ() > 0 then
vtOrthoO = -Z_AX()
elseif bHorizCut and ( not bVertCutOk or b3Solid:getDimX() > BD.LEN_SHORT_PART or Proc.AdvTail or vtN:getX() > 0 or ( abs( vtN:getY()) < 0.1 and vtN:getZ() <= 0)) then
elseif ( bHorizCut and not bVertCutOk) and
( not bVertCutOk or b3Solid:getDimX() > BD.LEN_SHORT_PART or Proc.AdvTail or ( vtN:getX() > 0 and vtN:getZ() <= 0.708) or ( abs( vtN:getY()) < 0.1 and vtN:getZ() <= 0)) then
vtOrthoO = Z_AX()
elseif b3Solid:getDimX() < BD.LEN_SHORT_PART and not Proc.AdvTail and abs( vtN:getY()) > 0.259 and
vtN:getZ() > -0.174 and abs( vtN:getY()) > abs( vtN:getZ()) and dCutH < dMaxDepth + 10 * GEO.EPS_SMALL then
@@ -522,8 +649,10 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
vtOrthoO = -X_AX()
end
else
if vtN:getZ() < dVzLimDwnUp or Proc.Head or Proc.Tail then
if vtN:getZ() < dVzLimDwnUp or Proc.Tail or ( Proc.Head and abs( vtN:getY()) > 0.01) then
vtOrthoO = EgtIf( vtN:getY() > -0.02, -Y_AX(), Y_AX())
elseif Proc.Head then
vtOrthoO = EgtIf( vtN:getY() > -0.02, Y_AX(), -Y_AX())
else
vtOrthoO = EgtIf( vtN:getY() > 0.02, Y_AX(), -Y_AX())
end
@@ -537,7 +666,7 @@ local function MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, b
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
if not bOk then return bOk, sErr end
end
return true
return true, sWarn
end
---------------------------------------------------------------------
@@ -667,14 +796,16 @@ local function MakeFromDown( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead)
end
-- taglio perpendicolare (limite Vz Down Up messo a -2 per non farlo mai intervenire)
if vCuts[i][j] then
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO_1, -2, dExtraCut_1, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
local bSpecialTangentLeadInOut = ( i % 2 == 0) and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right)
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO_1, -2, dExtraCut_1, BD.CUT_SIC, 0, 0, 0, nil, b3Raw, nil, nil, bSpecialTangentLeadInOut)
if not bOk then
return bOk, sErr
end
end
-- taglio parallelo (limite Vz Down Up messo a -2 per non farlo mai intervenire)
if vCuts[i+1][j] then
local bOk, sErr = Fbs.MakeOne( vCuts[i+1][j], 0, sCutting, dSawDiam, vtOrthoO_2, -2, dExtraCut_2, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
local bSpecialTangentLeadInOut = ( i % 2 == 0) and ( Proc.AffectedFaces.Left or Proc.AffectedFaces.Right)
local bOk, sErr = Fbs.MakeOne( vCuts[i+1][j], 0, sCutting, dSawDiam, vtOrthoO_2, -2, dExtraCut_2, BD.CUT_SIC, 0, 0, 0, nil, b3Raw, nil, nil, bSpecialTangentLeadInOut)
if not bOk then return bOk, sErr end
end
end
@@ -723,7 +854,7 @@ end
---------------------------------------------------------------------
-- Applicazione della lavorazione
function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, dOvmTail, bUpdateIng)
function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, dOvmTail, bUpdateIng, nLimitingSurf, sLeadInOutType)
-- sovramateriale di coda
dOvmTail = dOvmTail or BD.OVM_MID
-- ingombro del grezzo
@@ -739,20 +870,7 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom,
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
-- se taglio di testa
if not bForced then
if Proc.Head then
-- se coincide con il taglio di separazione precedente, non va fatto
if AreSameVectorApprox( vtN, X_AX()) and abs( ptC:getX() - b3Raw:getMax():getX() + dOvmHead) < 10 * GEO.EPS_SMALL then
return true
end
-- altrimenti taglio di coda
else
-- se coincide con taglio di separazione, non va fatto
if AreSameVectorApprox( vtN, - X_AX()) and abs( ptC:getX() - b3Raw:getMin():getX()) < dOvmTail + 10 * GEO.EPS_SMALL then
return true
end
end
-- se coincide con un taglio frontale non va fatto
if Proc.CutFront then
if not BL.IsCutNeeded( Proc, b3Raw, dOvmHead, dOvmTail) then
return true
end
end
@@ -764,29 +882,40 @@ function ProcessCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom,
-- recupero la lavorazione
local sCutType = EgtIf( Proc.Head, 'HeadSide', 'TailSide')
local sCutting
sCutting, bDownHead = ML.FindCutting( sCutType, bTopHead, bDownHead)
local bH2
sCutting, bH2 = ML.FindCutting( sCutType, bTopHead, bDownHead)
bDownHead = bH2 and bDownHead
if not sCutting then
local sErr = 'Error : cutting not found in library'
EgtOutLog( sErr)
return false, sErr
end
local bNoDicing = false
local sWarn
-- se taglio con testa da sopra
if not bDownHead and not bDownTurn then
local bOk, sErr, bNoDicing2 = MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes)
local bOk, sErr, bNoDicing2 = MakeFromTop( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut, bForced, b3Raw, sNotes, nLimitingSurf, sLeadInOutType)
bNoDicing = bNoDicing2
if not bOk then return false, sErr end
if not bOk then
return false, sErr
else
sWarn = sErr
end
-- altrimenti taglio con testa da sotto
else
local bOk, sErr = MakeFromDown( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom, bCustDiceCut)
if not bOk then return false, sErr end
local bOk, sErr = MakeFromDown( sCutting, Proc, nPhase, nRawId, nPartId, dOvmHead)
if not bOk then
return false, sErr
else
sWarn = sErr
end
end
-- Aggiornamento ingombro (se vero taglio o richiesto)
-- Se lascio il cordolo (bNoDicing) non aggiorno il grezzo perchè lo scarto rimane attaccato
if ( ProcessCut.Identify( Proc) or bUpdateIng) and not bNoDicing then
UpdateEncumbrance( Proc, vtN, dOvmHead, nRawId, b3Solid, b3Raw)
end
return true
return true, sWarn
end
---------------------------------------------------------------------
+56 -50
View File
@@ -1,6 +1,8 @@
-- ProcessDoubleCut.lua by Egaltech s.r.l. 2022/07/11
-- ProcessDoubleCut.lua by Egaltech s.r.l. 2023/03/22
-- Gestione calcolo doppi tagli di lama per Travi
-- 2022/08/29 Implementata la fresatura dal lato per tagli problematici per PF1250
-- 2022/08/29 Implementata la fresatura dal lato per tagli problematici per PF1250.
-- 2023/03/22 Eliminata SetOpenSide locale, si usa quella di libreria.
-- 2023/12/07 Correzione in Classify in scelta ribaltamento trave quando si è in condizioni downUp
-- Tabella per definizione modulo
local ProcessDoubleCut = {}
@@ -53,10 +55,22 @@ function ProcessDoubleCut.Classify( Proc, b3Raw)
local dNzLimDwnUp = BL.GetNzLimDownUp( b3Raw, vtN)
local bDownCut = ( vtN:getZ() <= dNzLimDwnUp)
if bDownCut then
-- recupero i dati della lama
local sCutType = EgtIf( Proc.Head, 'HeadSide', 'TailSide')
local sCutting = ML.FindCutting( sCutType, true, false)
local dMaxDepth = 0
local dMaxMat = 0
if EgtMdbSetCurrMachining( sCutting) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxMat
end
end
-- calcolo l'ingombro orizzontale della faccia
local _, DimH, DimV = BL.GetFaceHvRefDim( Proc.Id, nFac)
-- confronto questo ingombro con il doppio della massima dimensione del DiceCut (impossibile lavorare sotto da sopra se più di 2 tagli)
if DimH > 2 * BD.MAX_DIM_DICE then
local _, DimH = BL.GetFaceHvRefDim( Proc.Id, nFac)
-- confronto questo ingombro con il doppio della massima dimensione del DiceCut (impossibile lavorare sotto da sopra se più di 2 tagli oppure se tipo PF, taglio inclinato in Y e non taglio singolo orizzontale)
if DimH > 2 * BD.MAX_DIM_DICE or ( BD.C_SIMM and abs( vtN:getY()) > 0.1 and dMaxMat < DimH + BD.CUT_EXTRA) then
return true, true
end
end
@@ -160,7 +174,7 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
EgtSetOperationMode( nMch1Id, false)
return false, sErr
end
-- Inserisco la lavorazione del lato opposto
@@ -183,7 +197,7 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
EgtSetOperationMode( nMch2Id, false)
return false, sErr
end
return true
@@ -222,39 +236,6 @@ local function VerifyPocket( Proc, dDiam, dDepth, dMaxTotLen, sMchFindMaster, bP
return bUsePocketing, sPocketing, dMaxDepth, dToolDiam
end
---------------------------------------------------------------------
local function SetOpenSide( nPathInt, vtOrtho, b3Solid, nAddGrpId)
-- fondo tra loro le curve compatibili
EgtMergeCurvesInCurveCompo( nPathInt)
local nStartIdEnt, nNumEnt = EgtCurveDomain( nPathInt)
local pLastPIni, pLastPEnd
-- faccio una copia della curva e la esplodo
if nStartIdEnt then
-- ciclo i lati della curva e controllo per ognuno se giace in uno dei piani limite del pezzo: se sì allora il lato è aperto
for i = 1, nNumEnt do
local pPini = EgtUP( nPathInt, (i-1), GDB_RT.GLOB)
local pPend = EgtUP( nPathInt, EgtIf( i == nNumEnt, 0, i), GDB_RT.GLOB)
if ( abs( pPini:getX() - b3Solid:getMax():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMax():getX()) < 10 * GEO.EPS_SMALL) or
( abs( pPini:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL and abs( pPend:getX() - b3Solid:getMin():getX()) < 10 * GEO.EPS_SMALL) or
( abs( pPini:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMax():getY()) < 10 * GEO.EPS_SMALL) or
( abs( pPini:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL and abs( pPend:getY() - b3Solid:getMin():getY()) < 10 * GEO.EPS_SMALL) or
( abs( pPini:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMax():getZ()) < 10 * GEO.EPS_SMALL) or
( abs( pPini:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL and abs( pPend:getZ() - b3Solid:getMin():getZ()) < 10 * GEO.EPS_SMALL) then
-- scrivo nelle proprietà della curva quali sono i lati aperti
local sActInfo = EgtGetInfo( nPathInt, 'OPEN', 's') or ''
if #sActInfo > 0 then
-- se ci sono già altri lati aperti
EgtSetInfo( nPathInt, 'OPEN', sActInfo .. ',' .. (i-1))
else
-- se è l'unico
EgtSetInfo( nPathInt, 'OPEN', (i-1))
end
end
end
end
return false
end
---------------------------------------------------------------------
local function MakeBySidePocket( Proc, nPhase, nRawId, nPartId, nAddGrpId, b3Solid)
local nFirstMachId
@@ -287,7 +268,7 @@ local function MakeBySidePocket( Proc, nPhase, nRawId, nPartId, nAddGrpId, b3Sol
-- e assegno l'estrusione
nPathInt = EgtExtractSurfTmLoops( nSurfInt, nAddGrpId)
EgtModifyCurveExtrusion( nPathInt, vtOrtho, GDB_RT.GLOB)
SetOpenSide( nPathInt, vtOrtho, b3Solid, nAddGrpId)
BL.SetOpenSide( nPathInt, b3Solid)
-- variabili per parametri lavorazione
local dMachDepth
local dElev = 0
@@ -494,13 +475,36 @@ function ProcessDoubleCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- dati delle facce
local ptC = {}
local vtN = {}
ptC[1], vtN[1] = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
ptC[2], vtN[2] = EgtSurfTmFacetCenter( Proc.Id, 1, GDB_ID.ROOT)
local idFirstFace, idSecondFace
-- se ci sono più di due face (caso insolito), si prendono le facce più grandi
if Proc.Fct > 2 then
local Area = {}
-- si prendono le due più grandi, potrebbero essercene più di due
for i = 1, Proc.Fct do
local _, dL, dW = EgtSurfTmFacetMinAreaRectangle( Proc.Id, i - 1)
table.insert( Area, { nIndex = i-1, dArea = dL*dW})
end
-- ordina 'Area' in ordine decrescente
table.sort( Area, function( A, B)
return A.dArea > B.dArea
end
)
idFirstFace = Area[1].nIndex
idSecondFace = Area[2].nIndex
else
idFirstFace = 0
idSecondFace = 1
end
ptC[1], vtN[1] = EgtSurfTmFacetCenter( Proc.Id, idFirstFace, GDB_ID.ROOT)
ptC[2], vtN[2] = EgtSurfTmFacetCenter( Proc.Id, idSecondFace, GDB_ID.ROOT)
-- normale media per capire se taglio di testa o di coda
local vtNm = ( vtN[1] + vtN[2]) ; vtNm:normalize()
local bHead = ( vtNm:getX() > 0)
-- angolo diedro per stabilire se taglio convesso
local bAdj, ptP1, ptP2, dAng = EgtSurfTmFacetsContact( Proc.Id, 0, 1, GDB_ID.ROOT)
local bAdj, ptP1, ptP2, dAng = EgtSurfTmFacetsContact( Proc.Id, idFirstFace, idSecondFace, GDB_ID.ROOT)
local bConvex = true
local bOnY = true
local ptPs = ( ptC[1] + ptC[2]) / 2
@@ -511,8 +515,8 @@ function ProcessDoubleCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
bConvex = ( dAng > 0)
end
-- determino quale faccia è più grande
local _, dB1, dH1 = EgtSurfTmFacetMinAreaRectangle( Proc.Id, 0)
local _, dB2, dH2 = EgtSurfTmFacetMinAreaRectangle( Proc.Id, 1)
local _, dB1, dH1 = EgtSurfTmFacetMinAreaRectangle( Proc.Id, idFirstFace)
local _, dB2, dH2 = EgtSurfTmFacetMinAreaRectangle( Proc.Id, idSecondFace)
local nBigInd = EgtIf( dB1 * dH1 >= dB2 * dH2, 1, 2)
local nSmaInd = 3 - nBigInd
-- inserimento smussi
@@ -540,7 +544,8 @@ function ProcessDoubleCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
local b3Add = EgtGetBBoxGlob( AddId, GDB_BB.STANDARD)
-- applico lavorazione
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Add, Fct = 1, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead, nil, nil, bForced, b3Raw, sNotes, dOvmTail, true)
if not bOk then return bOk, sErr end
end
@@ -552,7 +557,8 @@ function ProcessDoubleCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
local b3Add = EgtGetBBoxGlob( AddId, GDB_BB.STANDARD)
-- applico lavorazione
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Add, Fct = 1, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead, nil, nil, bForced, b3Raw, sNotes, dOvmTail, true)
if not bOk then return bOk, sErr end
end
@@ -577,8 +583,8 @@ function ProcessDoubleCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
end
end
local _, _, dDimV1 = BL.GetFaceHvRefDim( Proc.Id, 0, b3Raw)
local _, _, dDimV2 = BL.GetFaceHvRefDim( Proc.Id, 1, b3Raw)
local _, _, dDimV1 = BL.GetFaceHvRefDim( Proc.Id, idFirstFace, b3Raw)
local _, _, dDimV2 = BL.GetFaceHvRefDim( Proc.Id, idSecondFace, b3Raw)
local bFace1TooLongForBlade, bFace2TooLongForBlade = ( dDimV1 >= dMaxDepth), ( dDimV2 >= dMaxDepth)
local dFace1Ang, dFace2Ang = vtN[1]:getZ(), vtN[2]:getZ()
if bFace1TooLongForBlade and dFace1Ang < ( BD.CUT_VZ_MIN or -0.484) or bFace2TooLongForBlade and dFace2Ang < ( BD.CUT_VZ_MIN or -0.484) then
+10 -8
View File
@@ -1,6 +1,7 @@
-- ProcessDovetail.lua by Egaltech s.r.l. 2021/02/04
-- Gestione calcolo giunzione coda di rondine
-- 2022/06/10 Aggiunto il parametro dOvmTail per gestire sovramateriali in coda diversi da OVM_MID (sezioni alte e larghe)
-- 2023/09/26 Modificata chiamata a GetFaceWithMostAdj.
-- Tabella per definizione modulo
local ProcessDovetail = {}
@@ -280,7 +281,7 @@ function ProcessDovetail.IsHeadFeature( Proc, b3Raw, dCurrOvmH)
end
-- deve avere la normale principale diretta verso la testa
local nPartId = EgtGetParent( EgtGetParent( Proc.Id) or GDB_ID.NULL)
local nFacInd, dElev, nFacInd2, dElev2 = BL.GetFaceWithMostAdj( Proc.Id, nPartId)
local nFacInd, dElev, nFacInd2, dElev2 = BL.GetFaceWithMostAdj( Proc, nPartId)
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd, GDB_ID.ROOT)
if vtN:getZ() < BD.NZ_MINA and nFacInd2 then
ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd2, GDB_ID.ROOT)
@@ -341,7 +342,7 @@ function ProcessDovetail.IsTailFeature( Proc, b3Raw)
end
end
-- deve avere la normale principale diretta verso la coda
local nFacInd, dElev, nFacInd2, dElev2 = BL.GetFaceWithMostAdj( Proc.Id, nPartId)
local nFacInd, dElev, nFacInd2, dElev2 = BL.GetFaceWithMostAdj( Proc, nPartId)
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd, GDB_ID.ROOT)
if vtN:getZ() < BD.NZ_MINA and nFacInd2 then
ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, nFacInd2, GDB_ID.ROOT)
@@ -933,10 +934,10 @@ local function MachSideFaces( Proc, nPartId, b3Raw, nFacetCnt, bForceUseRough,
end
else
-- recupero la faccia con il maggior numero di adiacenze e l'elevazione relativa
nFacInd, dFacElev = BL.GetFaceWithMostAdj( Proc.Id, nPartId, false, sin(dSideAngle))
nFacInd, dFacElev = BL.GetFaceWithMostAdj( Proc, nPartId, false, sin(dSideAngle))
if not nFacInd or nFacInd < 0 then
-- provo eliminando i sottosquadra
nFacInd, dFacElev = BL.GetFaceWithMostAdj( Proc.Id, nPartId, false, -2)
nFacInd, dFacElev = BL.GetFaceWithMostAdj( Proc, nPartId, false, -2)
if not nFacInd or nFacInd < 0 then
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' MachSideFaces could not find reference face'
EgtOutLog( sErr)
@@ -1189,14 +1190,14 @@ local function Make2Faces( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw, b3Sol
return MakeByBlade( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw, b3Solid)
-- altrimenti provo con il truciolatore
else
local sName = 'Mill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
-- se non ho la lavorazione esco
if not sMilling then
local sErr = 'Error, machining or tool not found ' .. sName .. '-' .. sMilling
local sErr = 'Error, machining or tool not found ' .. sName
EgtOutLog( sErr)
return false, sErr
end
-- inserisco la lavorazione di fresatura
local sName = 'Mill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchFId = EgtAddMachining( sName, sMilling)
if not nMchFId then
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
@@ -1432,7 +1433,8 @@ local function MakeAuxCut( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw, b3Sol
return true
end
-- inserisco la lavorazione
local CutProc = { Id = AuxId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg, Head = Proc.Head, Tail = Proc.Tail}
local CutProc = { Id = AuxId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg, Head = Proc.Head, Tail = Proc.Tail, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead)
if not bOk then return bOk, sErr end
-- imposto la nota nel gruppo aggiuntivo di lavorazione per evitare di tagliare una seconda volta
@@ -1683,7 +1685,7 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw, b3Sol
end
-- determino il massimo affondamento con l'utensile
local sMchFind = 'Long2Cut'
sMilling = ML.FindMilling( sMchFind)
local sMilling = ML.FindMilling( sMchFind)
if not sMilling then
local sErr = 'Milling not found in library : Error on Dovetail ' .. tostring( Proc.Id)
EgtOutLog( sErr)
+305 -56
View File
@@ -1,4 +1,4 @@
-- ProcessDrill.lua by Egaltech s.r.l. 2022/11/30
-- ProcessDrill.lua by Egaltech s.r.l. 2023/11/06
-- Gestione calcolo forature per Travi
-- 2021/04/14 DS Corretta gestione Invert con testa da sotto. Migliorato calcolo ingombro portautensile.
-- 2021/05/03 DS Su macchina con testa da sotto aggiunta possibilità di fare fori verticali metà sopra e l'altra sotto.
@@ -15,6 +15,15 @@
-- 2022/08/18 Aggiunta gestione macchine con testa da sotto e punta disabilitata.
-- 2022/10/25 Nella funzione Split aggiunto il controllo che le facce di ingresso e uscita siano differenti (potrebbe succedere per fori molto corti). Modifica importatore in futuro.
-- 2022/11/23 Aggiunta la gestione dei fori con angolo < 30 gradi, per i quali si usa la testa della macchina per accorciare l'utile di lavoro.
-- 2022/12/28 Implementata gestione forature in doppio
-- 2023/05/11 Se lavorazione in doppio e precedente no oppure di tipo diverso, forzo risalita a Zmax.
-- 2023/07/28 Aggiunta gestione rinvio 90deg solo per forature da sotto esattamente verticali.
-- 2023/09/26 Se errore in applicazione lavorazione si inverte e riprova solo se foratura singola su foro aperto.
-- 2023/11/06 Migliorata gestione dei fori con AngularTransmission.
-- 2024/03/13 Aggiunta gestione Predrill
-- 2024/03/18 Per Predrill corretta direzione estrusione per fori con direzione verso il basso
-- 2024/09/04 Gestione dipendenza foro-tasca in caso di fase con pezzo ribaltato
-- 2024/09/10 In GetData corretta gestione modifica diametro foro
-- Tabella per definizione modulo
local ProcessDrill = {}
@@ -28,6 +37,7 @@ EgtOutLog( ' ProcessDrill started', 1)
-- Dati
local BD = require( 'BeamData')
local ML = require( 'MachiningLib')
local FreeContour = require( 'ProcessFreeContour')
---------------------------------------------------------------------
-- Riconoscimento della feature
@@ -91,20 +101,22 @@ end
---------------------------------------------------------------------
-- Recupero dati foro e adattamento se speciale
function ProcessDrill.GetData( Proc, b3Raw)
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
-- verifico se foro da adattare
if EgtExistsInfo( Proc.Id, 'DiamUser') then
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
if AuxId then AuxId = AuxId + Proc.Id end
if AuxId and EgtGetType( AuxId) == GDB_TY.CRV_ARC and BD.USER_HOLE_DIAM and BD.USER_HOLE_DIAM > 1 then
EgtModifyArcRadius( AuxId, BD.USER_HOLE_DIAM / 2)
local nNewAuxId
if AuxId then nNewAuxId = AuxId + Proc.Id end
if AuxId and EgtGetType( nNewAuxId) == GDB_TY.CRV_ARC and BD.USER_HOLE_DIAM and BD.USER_HOLE_DIAM > 1 then
EgtModifyArcRadius( nNewAuxId, BD.USER_HOLE_DIAM / 2)
end
end
-- recupero diametro
-- recupero diametro e lunghezza
local dDiam = EgtGetInfo( Proc.Id, 'P12', 'd') or 0
local dLen = abs( EgtCurveThickness( Proc.Id + AuxId)) or 0
-- recupero faccia di entrata e uscita
local nFcs = EgtGetInfo( Proc.Id, 'FCS', 'i') or 0
local nFce = EgtGetInfo( Proc.Id, 'FCE', 'i') or 0
return dDiam, nFcs, nFce
return dDiam, dLen, nFcs, nFce
end
---------------------------------------------------------------------
@@ -123,19 +135,91 @@ function ProcessDrill.Split( Proc, b3Raw)
local bOpen = ( Proc.Fce ~= 0) and ( Proc.Fce ~= Proc.Fcs)
-- recupero flag abilitazione split (0=auto,1=no)
local bTrySplit = ( EgtGetInfo( Proc.Id, 'Q02', 'i') ~= 1)
if not bTrySplit then
local bOnlyContour = ( EgtGetInfo( Proc.Id, 'Q04', 'i') == 1)
if ( not bTrySplit) or bOnlyContour then
return false
end
-- restituisco se va fatto in doppio (solo fori orizzontali)
local bHoriz = ( abs( vtExtr:getZ()) < abs( BD.DRILL_VZ_MIN) and
( abs( vtExtr:getY()) * b3Raw:getDimZ() > abs( vtExtr:getZ()) * b3Raw:getDimY() or Proc.Fce == 5 or Proc.Fce == 6))
local bAngTransm = ( BD.ANG_TRASM and ML.FindDrilling( dDiam, nil, nil, nil, nil, true) and AreSameOrOppositeVectorApprox( vtExtr, Z_AX()))
local bSlant = ( abs( vtExtr:getX()) > BD.DRILL_VX_MAX)
return ( bOpen and ( bHoriz or BD.ROT90 or BD.DOWN_HEAD or BD.TURN) and not bSlant)
return ( bOpen and ( bHoriz or BD.ROT90 or BD.DOWN_HEAD or BD.TURN or bAngTransm) and not bSlant)
end
---------------------------------------------------------------------
-- Verifica se bisogna aggiungere un preforo
function ProcessDrill.IsPredrillNeeded( Proc)
local dDepthPredrill = EgtGetInfo( Proc.Id, 'Q03', 'i')
-- se non c'è la Q oppure se zero, allora non è da fare
if not dDepthPredrill or dDepthPredrill <= 0 then
return false
-- altrimenti Predrill da fare
else
return true
end
end
---------------------------------------------------------------------
-- Aggiunge il preforo alla feature passata
function ProcessDrill.AddPredrillFromDrillProc( Proc)
local dDepthPredrill = EgtGetInfo( Proc.Id, 'Q03', 'i')
-- foro più corto del preforo, allora è il foro che diventa il preforo stesso
if Proc.Len <= dDepthPredrill then
Proc.IsPredrill = true
Proc.IsPredrillOf = Proc.Id
return false
-- altrimenti creo un nuovo process
else
-- recupero gruppo per geometria aggiuntiva
local nAddGrpId = BL.GetAddGroup( Proc.PartId)
-- recupero e verifico l'entità foro
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') or 0
local ptCen = EgtCP( Proc.Id + AuxId, GDB_RT.GLOB)
local vtExtr = EgtCurveExtrusion( Proc.Id + AuxId, GDB_RT.GLOB)
-- copio foro originale
local nPreHoleId = EgtCopyGlob( Proc.Id, nAddGrpId)
local nPreHoleAux = EgtCopyGlob( Proc.Id + AuxId, nAddGrpId)
-- se foro invertito sposto geometria dall'altro lato del foro e inverto direzione estrusione
if Proc.Flg == -2 then
local vsExtr = -vtExtr * Proc.Len
EgtMove( nPreHoleAux, vsExtr, GDB_RT.GLOB)
EgtModifyCurveExtrusion( nPreHoleAux, -vtExtr, GDB_RT.GLOB)
end
EgtModifyCurveThickness( nPreHoleAux, -dDepthPredrill)
local PredrillProc = {}
-- definisco dati seconda parte
PredrillProc.PartId = Proc.PartId
PredrillProc.Id = nPreHoleId
PredrillProc.Grp = Proc.Grp
PredrillProc.Prc = Proc.Prc
PredrillProc.Flg = 1
PredrillProc.Box = Proc.Box
PredrillProc.Fct = Proc.Fct
PredrillProc.Diam = Proc.Diam
PredrillProc.Len = dDepthPredrill
PredrillProc.Head = Proc.Head
PredrillProc.Tail = Proc.Tail
PredrillProc.Fcs = Proc.Fcs
PredrillProc.Fce = 0 -- il preforo è sempre chiuso, non ha faccia di uscita
PredrillProc.CutId = Proc.CutId
PredrillProc.TaskId = Proc.TaskId
PredrillProc.AdjId = Proc.AdjId
PredrillProc.MainId = Proc.MainId
PredrillProc.IsPredrill = true
PredrillProc.IsPredrillOf = Proc.Id
-- recupero l'elenco delle facce della parte interessate dalla feature
PredrillProc.AffectedFaces = BL.GetProcessAffectedFaces( PredrillProc)
return true, PredrillProc
end
end
---------------------------------------------------------------------
-- Classificazione della feature
function ProcessDrill.Classify( Proc, b3Raw)
function ProcessDrill.Classify( Proc, b3Raw, sDownOrSideOrStd)
-- recupero e verifico l'entità foro
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i') or 0
if AuxId then AuxId = AuxId + Proc.Id end
@@ -154,18 +238,45 @@ function ProcessDrill.Classify( Proc, b3Raw)
ptCen = ptCen + vtExtr * dLen
end
end
-- verifico se foro annegato nel pezzo e quindi non lavorabile
if Proc.Fcs == 0 and Proc.Fce == 0 then
return false, false, false
end
-- verifico se troppo inclinato e quindi non lavorabile
if not ( Proc.Fcs == 5 or Proc.Fcs == 6 or Proc.Fce == 5 or Proc.Fce == 6) and abs( vtExtr:getX()) > BD.DRILL_VX_MAX then
return false, false, false
end
local bOpen = ( Proc.Fce ~= 0)
local bFaceDown = ( ptCen:getZ() < b3Raw:getMin():getZ() + 2 and (( not Proc.Head and not Proc.Tail) or (( BD.ROT90 or BD.DOWN_HEAD or BD.TURN) and ( Proc.Flg == 2 or Proc.Flg == -2))))
local bFaceDown = ( ptCen:getZ() < b3Raw:getMin():getZ() + 2 and (( not Proc.Head and not Proc.Tail) or (( BD.ROT90 or BD.DOWN_HEAD or BD.TURN) and abs( Proc.Flg) == 2)))
local bAngTransm = ( BD.ANG_TRASM and ML.FindDrilling( dDiam, nil, nil, nil, nil, true) and AreSameOrOppositeVectorApprox( vtExtr, Z_AX()))
-- se ci sono delle dipendenze da altre feature da rispettare
if sDownOrSideOrStd then
if sDownOrSideOrStd == 'DOWN' then
-- se foro fatto in doppio entrambe le forature (valore assoluto) devono essere sopra al valore limite, se foro singolo deve essere sopra al valore limite se ribaltato
if ( abs( Proc.Flg) == 2 and ( abs( vtExtr:getZ()) < - BD.DRILL_VZ_MIN) or ( abs( Proc.Flg) ~= 2 and vtExtr:getZ() < - BD.DRILL_VZ_MIN)) then
-- in doppio non cambio di fase al foro perchè devo garantire il lato master su H1
if not( Proc.Double) or Proc.Double == 0 then
Proc.Down = true
Proc.Side = false
end
return true
end
end
return false
end
-- verifico se il foro è sotto e quindi va spostato o sopra o sul fianco
if (( vtExtr:getZ() < BD.DRILL_VZ_MIN or bFaceDown) and ( not bOpen or Proc.Flg ~= 1)) then
if not bOpen then
return true, true, false
-- se da sotto e presente rinvio angolare verifico se c'è opportuna lavorazione
if bAngTransm then
return true, false, false
else
return true, true, false
end
else
return true, not ( BD.ROT90 or BD.DOWN_HEAD or BD.TURN), ( BD.ROT90 or BD.DOWN_HEAD or BD.TURN)
return true, not ( BD.ROT90 or BD.DOWN_HEAD or BD.TURN or bAngTransm), ( BD.ROT90 or BD.DOWN_HEAD or BD.TURN)
end
else
return true, false, false
@@ -204,9 +315,39 @@ local function GetHoleStartData( ptCen, vtExtr, b3Solid)
return nFac, CosB, vFaces
end
---------------------------------------------------------------------
local function GetSCC( Proc, vtExtr, b3Solid, bDrillAngTrasm, nPhase)
local nSCC = MCH_SCC.NONE
if bDrillAngTrasm then
nSCC = MCH_SCC.ADIR_NEAR
elseif BD.TURN == 2 then
nSCC = MCH_SCC.ADIR_ZP
elseif not BD.C_SIMM and not BD.TURN then
nSCC = MCH_SCC.ADIR_YM
if AreSameVectorApprox( vtExtr, Z_AX()) then
nSCC = MCH_SCC.ADIR_YM
elseif abs( vtExtr:getX()) < 0.1 then
local bNearTail = ( Proc.Box:getCenter():getX() < b3Solid:getCenter():getX() and Proc.Box:getCenter():getX() - b3Solid:getMin():getX() < 1000)
local bVeryShortPart = ( BD.LEN_VERY_SHORT_PART and b3Solid:getDimX() < BD.LEN_VERY_SHORT_PART)
nSCC = EgtIf( BL.IsPartFinalPhase( nPhase) or ( bNearTail and not bVeryShortPart), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
elseif vtExtr:getY() > 0.1 then
nSCC = MCH_SCC.ADIR_YP
end
else
nSCC = MCH_SCC.NONE
end
return nSCC
end
---------------------------------------------------------------------
-- Applicazione della lavorazione
function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- Se forzato contorno foro forzo richiamo a FreeContour e uscita dalla funzione
if EgtGetInfo( Proc.Id, 'Q04', 'i') == 1 then
return FreeContour.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- default per costanti
BD.DRILL_VX_MAX_ANGLEDRILL = ( BD.DRILL_VX_MAX_ANGLEDRILL or 0.928)
-- ingombro del pezzo
@@ -235,19 +376,22 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
end
local bOpen = ( Proc.Fcs ~= 0 and Proc.Fce ~= 0)
-- verifico possibilità di foratura da sotto
local bDownDrill = ( BD.DOWN_HEAD and ML.FindDrilling( dDiam, nil, false, true))
local bDownDrill = ( BD.TURN or ( BD.DOWN_HEAD and ML.FindDrilling( dDiam, nil, false, true)))
-- se presente rinvio angolare
local bDrillAngTrasm = ( BD.ANG_TRASM and ML.FindDrilling( dDiam, nil, nil, nil, nil, true) and AreOppositeVectorApprox( vtExtr, Z_AX()))
-- verifico che il foro non sia fattibile solo da sotto
local bToInvert = ( vtExtr:getZ() < BD.DRILL_VZ_MIN and not bDownDrill)
local bToInvert = ( vtExtr:getZ() < BD.DRILL_VZ_MIN and not bDownDrill and not bDrillAngTrasm)
if bToInvert and ( not bOpen or Proc.Flg ~= 1) then
local sErr = 'Error : drilling from bottom impossible'
EgtOutLog( sErr)
return false, sErr
end
local nFac, CosB
-- se non già richiesta inversione e invertibile
if not bToInvert and Proc.Flg == 1 and ( -vtExtr:getZ() >= BD.DRILL_VZ_MIN or bDownDrill) then
-- se il foro è cieco o troppo inclinato all'inizio, lo inverto
local _, CosB, _ = GetHoleStartData( ptCen, vtExtr, b3Solid)
if Proc.Fcs == 0 or ( CosB > BD.DRILL_VX_MAX and bOpen) then
if not bToInvert and Proc.Flg == 1 and -vtExtr:getZ() >= BD.DRILL_VZ_MIN then
-- se il foro è cieco o dalla faccia sotto o troppo inclinato all'inizio, lo inverto
nFac, CosB, _ = GetHoleStartData( ptCen, vtExtr, b3Solid)
if Proc.Fcs == 0 or (( nFac == 2 or CosB > BD.DRILL_VX_MAX) and bOpen) then
bToInvert = true
end
end
@@ -269,11 +413,37 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
-- abilitazione foratura da sotto
local bDrillDown = ( bDownDrill and ( Proc.Down or vtExtr:getZ() < -0.1 or vtExtr:getZ() < 0.259))
local bDrillUp = ( bDownDrill and vtExtr:getZ() > -0.421)
local bExcludeH2 = false
if Proc.Double and Proc.Double > 0 then
-- bMillUp = true
bDrillDown = false
bExcludeH2 = true
end
-- primo gruppo di controlli con lunghezza utensile pari a metà foro se passante
-- recupero la lavorazione
local sDrilling, sType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, dCheckDepth, bDrillUp, bDrillDown)
local sDrilling, sType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, dCheckDepth, bDrillUp, bDrillDown, bExcludeH2, bDrillAngTrasm, Proc.IsPredrill)
local dMaxDepthOri
local vFaces
if sDrilling then
-- Determino la faccia di inizio del foro e dati correlati
nFac, CosB, vFaces = GetHoleStartData( ptCen, vtExtr, b3Solid)
-- Calcolo acciorciamento affondamento utile per evitare collisione portautensile con faccia
local TgA = CosB / sqrt( 1 - CosB * CosB)
local dSubL = ( dDiamTh / 2 + ( Proc.Diam - dToolDiam) / 2 + 4) * TgA
-- Per fori molto inclinati ( < 30 gradi) si usa la testa della macchina per l'accorciamento. Fast esclusa
if BD.C_SIMM and CosB > 0.866 then
dSubL = ( 190 / 2 + ( Proc.Diam - dToolDiam) / 2 + 4) * TgA - 116
end
dMaxDepthOri = dMaxDepth
dMaxDepth = min( dMaxDepth, max( dToolFreeLen - dSubL, 0))
-- se utensile scelto non arriva in fondo, cerco il più lungo
if dMaxDepth < GEO.EPS_SMALL * 10 then
sDrilling, sType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, dCheckDepth, bDrillUp, bDrillDown, bExcludeH2, bDrillAngTrasm, Proc.IsPredrill, nil, 'Longest')
end
end
if not sDrilling and dCheckDepth then
sDrilling, sType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, 0, bDrillUp, bDrillDown)
sDrilling, sType, dMaxDepth, dMaxToolLength, dToolDiam, dDiamTh, dToolFreeLen = ML.FindDrilling( dDiam, 0, bDrillUp, bDrillDown, bExcludeH2, bDrillAngTrasm, Proc.IsPredrill)
if sDrilling then dCheckDepth = nil end
end
if not sDrilling then
@@ -366,19 +536,44 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
EgtOutLog( sErr)
return false, sErr
end
-- eventuale inversione foro in base al lato di lavoro e al lato testa dell'utensile scelto
-- se non già richiesta inversione e foro quasi orizzontale (15deg) passante
if not bToInvert and Proc.Flg == 1 and bOpen and abs( vtExtr:getZ()) < 0.259 and abs( vtExtr:getY()) > 0.966 then
local Tool = BL.GetToolFromMachining( sDrilling)
-- lato testa e lato di lavoro devono corrispondere
if Tool.PreferredSide then
if ( ( Tool.PreferredSide.bFront == true) and vtExtr:getY() > 10 * GEO.EPS_SMALL)
or ( ( Tool.PreferredSide.bBack == true) and vtExtr:getY() < - 10 * GEO.EPS_SMALL) then
ptCen = ptCen - vtExtr * dLen
vtExtr = - vtExtr
bToInvert = true
end
end
end
-- Determino la faccia di inizio del foro e dati correlati
local nFac, CosB, vFaces = GetHoleStartData( ptCen, vtExtr, b3Solid)
nFac, CosB, vFaces = GetHoleStartData( ptCen, vtExtr, b3Solid)
-- Calcolo acciorciamento affondamento utile per evitare collisione portautensile con faccia
local TgA = CosB / sqrt( 1 - CosB * CosB)
local dSubL = ( dDiamTh / 2 + ( Proc.Diam - dToolDiam) / 2 + 4) * TgA
TgA = CosB / sqrt( 1 - CosB * CosB)
dSubL = ( dDiamTh / 2 + ( Proc.Diam - dToolDiam) / 2 + 4) * TgA
-- Per fori molto inclinati ( < 30 gradi) si usa la testa della macchina per l'accorciamento. Fast esclusa
if BD.C_SIMM and CosB > 0.866 then
dSubL = ( 190 / 2 + ( Proc.Diam - dToolDiam) / 2 + 4) * TgA - 116
end
local dMaxDepthOri = dMaxDepth
dMaxDepthOri = dMaxDepth
dMaxDepth = min( dMaxDepth, max( dToolFreeLen - dSubL, 0))
-- Verifico inclinazione foro nei limiti
local bTryDrill = EgtIf( dMaxDepth > 0, ( CosB < BD.DRILL_VX_MAX), false)
-- se il foro deve essere eseguito dopo un taglio, potrebbe essere perchè il taglio crea una superficie perpendicolare
if Proc.Dependency and Proc.Dependency.ExecAfter then
local ptCut, vtCutN = EgtSurfTmFacetCenter( Proc.Dependency.ExecAfter.Id, 0, GDB_ID.ROOT)
local dMaxAngleDrillOnCut = BD.MAX_ANGLE_DRILL_CUT or 10
local dAngle = GetAngle( vtExtr, vtCutN)
CosB = cos( dAngle)
if dAngle < dMaxAngleDrillOnCut then
-- controllo di essere nei limiti
bTryDrill = true
end
end
if ( CosB > 0.8 * BD.DRILL_VX_MAX and CosB < BD.DRILL_VX_MAX_ANGLEDRILL) then
-- cerco le forature speciali AngleDrill
local sDrilling3, sType3, dMaxDepth3 = ML.FindAngleDrilling( dDiam, dCheckDepth, bDrillUp, bDrillDown)
@@ -393,12 +588,12 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
local dMaxElev
local sMyWarn
-- se c'è un taglio precedente di testa o coda in cui il foro "entra" devo ricalcolare i dati della foratura
if (( Proc.MachineAfterHeadCutId and vtExtr:getX() > 0) or ( Proc.MachineAfterTailCutId and vtExtr:getX() < 0)) then
if ( not Proc.Double or Proc.Double == 0) and(( Proc.MachineAfterHeadCutId and vtExtr:getX() > 0) or ( Proc.MachineAfterTailCutId and vtExtr:getX() < 0)) then
local bIntersectionOk, _, vDistance = EgtLineSurfTmInters( ptCen, -vtExtr, Proc.MachineAfterHeadCutId or Proc.MachineAfterTailCutId, GDB_RT.GLOB)
if bIntersectionOk then
local dHoleToCutDistance = vDistance[1]
-- se il taglio accorcia realmente il foro
if dHoleToCutDistance > 10 * GEO.EPS_SMALL and dHoleToCutDistance < dLen then
if ( dHoleToCutDistance > 10 * GEO.EPS_SMALL or Proc.AffectedFaces.Right) and dHoleToCutDistance < dLen then
dMaxDepth = dMaxDepthOri
dMaxElev = dLen - dHoleToCutDistance
bTryDrill = true
@@ -429,8 +624,9 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
dDepth = dMaxDepth
dMaxElev = dMaxDepth
end
-- inserisco la lavorazione
local sName = 'Drill_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local sName = EgtIf( EgtStartsWith( sType, 'Predrill'), 'Predrill_', 'Drill_') .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchId = EgtAddMachining( sName, sDrilling)
if not nMchId then
local sErr = 'Error adding machining ' .. sName .. '-' .. sDrilling
@@ -439,56 +635,70 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- eventuali note utente
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
-- eventuale inversione
if sType == 'Drill' or sType == 'Drill_H2' or sType == 'AngleDrill' then
if sType == 'Drill' or sType == 'Drill_H2' or sType == 'Drill_AT' or sType == 'AngleDrill' or sType == 'Predrill' then
EgtSetMachiningParam( MCH_MP.INVERT, bToInvert)
else
EgtSetMachiningParam( MCH_MP.TOOLINVERT, bToInvert)
end
-- imposto posizione braccio porta testa
local nSCC = MCH_SCC.NONE
if not BD.C_SIMM and not BD.TURN then
nSCC = MCH_SCC.ADIR_YM
if AreSameVectorApprox( vtExtr, Z_AX()) then
nSCC = MCH_SCC.ADIR_YM
elseif abs( vtExtr:getX()) < 0.1 then
local bNearTail = ( Proc.Box:getCenter():getX() < b3Solid:getCenter():getX() and Proc.Box:getCenter():getX() - b3Solid:getMin():getX() < 1000)
local bVeryShortPart = ( BD.LEN_VERY_SHORT_PART and b3Solid:getDimX() < BD.LEN_VERY_SHORT_PART)
nSCC = EgtIf( BL.IsPartFinalPhase( nPhase) or ( bNearTail and not bVeryShortPart), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
elseif vtExtr:getY() > 0.1 then
nSCC = MCH_SCC.ADIR_YP
end
else
nSCC = MCH_SCC.NONE
end
local nSCC = GetSCC( Proc, vtExtr, b3Solid, bDrillAngTrasm, nPhase)
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- imposto affondamento
local dLastStepDepth
if Proc.Double and Proc.Double > 0 then
if ( sType == 'Pocket_AT' or sType == 'Pocket') then
if bOpen then
local dReduceDepth = MIRROR_POCKETS_MIN_DISTANCE / 2 + 10
dLastStepDepth = dDepth + dReduceDepth
dDepth = dDepth - dReduceDepth
end
else
sUserNotes = EgtSetValInNotes( sUserNotes, 'LastStep', MIRROR_DRILLINGS_MIN_DISTANCE / 2 + 15)
end
if dDepth > Proc.MachDepthDouble + 10 * GEO.EPS_SMALL then
sMyWarn = 'Warning in double head drilling : depth (' .. EgtNumToString( dDepth, 1) .. ') reduced to (' .. EgtNumToString( Proc.MachDepthDouble, 1) .. ') to match H2 max tool depth'
dDepth = Proc.MachDepthDouble
dMaxElev = Proc.MachDepthDouble
end
end
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
-- imposto il valore della distanza di sicurezza per l'attacco. Se il valore del db utensili è troppo basso lo alzo a 10.
local dToolDbStartPos = EgtGetMachiningParam( MCH_MP.STARTPOS)
local dMinStartPos = 10
local dStartPos = max( dMinStartPos, dToolDbStartPos)
EgtSetMachiningParam( MCH_MP.STARTPOS, dStartPos)
-- Note utente con dichiarazione nessuna generazione sfridi per Vmill
local sUserNotes = 'VMRS=0;'
-- dichiarazione nessuna generazione sfridi per Vmill
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
-- aggiungo alle note massima elevazione (coincide con affondamento)
if dMaxElev then
sUserNotes = sUserNotes .. 'MaxElev=' .. EgtNumToString( dMaxElev, 1) .. ';'
local dCustomMaxElev
if Proc.dCustomMaxElev and type( Proc.dCustomMaxElev) == "number" and Proc.dCustomMaxElev > 10 * GEO.EPS_SMALL then
dCustomMaxElev = Proc.dCustomMaxElev
end
if dMaxElev or dCustomMaxElev then
if dCustomMaxElev then
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dCustomMaxElev, 1))
else
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev, 1))
end
end
-- se foro passante, aggiungo questa qualifica alle note
if ( sType == 'Drill' or sType == 'Drill_H2' or sType == 'AngleDrill') and bOpen then
sUserNotes = sUserNotes .. 'Open=1;'
sUserNotes = EgtSetValInNotes( sUserNotes, 'Open', 1)
end
-- se lavorazione in doppio
if EgtExistsInfo( Proc.Id, 'MAIN') then
sUserNotes = sUserNotes .. 'Double;'
elseif EgtExistsInfo( Proc.Id, 'DOU') then
sUserNotes = sUserNotes .. 'Main;'
if Proc.Double and Proc.Double > 0 then
sUserNotes = EgtSetValInNotes( sUserNotes, 'DOUBLE', Proc.Double)
if Proc.Double ~= Proc.PrevDouble then
sUserNotes = EgtSetValInNotes( sUserNotes, 'StartZmax', 2)
end
end
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- eseguo
local bOk = ML.ApplyMachining( true, false)
if not bOk and bDownDrill then
if not bOk and bDownDrill and bOpen and abs( Proc.Flg) == 1 then
if sType == 'Drill' or sType == 'Drill_H2' or sType == 'AngleDrill' then
EgtSetMachiningParam( MCH_MP.INVERT, true)
else
@@ -498,7 +708,7 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
end
if not bOk then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
EgtSetOperationMode( nMchId, false)
return false, sErr
else
local _, sWarn = EgtGetMachMgrWarning( 0)
@@ -506,6 +716,45 @@ function ProcessDrill.Make( Proc, nPhase, nRawId, nPartId)
EgtSetOperationMode( nMchId, false)
return false, sWarn
else
-- se DrillPocket passante in doppio si fa lavorazione aggiuntiva dell'ultimo step
if Proc.Double and Proc.Double > 0 and ( sType == 'Pocket_AT' or sType == 'Pocket') and bOpen then
local idMachiningLastStep = EgtCopyMachining( EgtIf( EgtStartsWith( sType, 'Predrill'), 'Predrill_', 'Drill_') .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)), sName)
EgtSetCurrMachining( idMachiningLastStep)
if dLastStepDepth > dMaxDepth + 10 * GEO.EPS_SMALL then
sMyWarn = 'Warning in drill pocket last step: depth (' .. EgtNumToString( dLastStepDepth, 1) .. ') bigger than max tool depth (' .. EgtNumToString( dMaxDepth, 1) .. ')'
dLastStepDepth = dMaxDepth
end
local dMaxElevLastStep = dLastStepDepth - dDepth
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElevLastStep, 1))
EgtSetMachiningParam( MCH_MP.DEPTH, dLastStepDepth)
sUserNotes = EgtSetValInNotes( sUserNotes, 'DOUBLE', '')
sUserNotes = EgtSetValInNotes( sUserNotes, 'StartZmax', '')
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
local bOkLastStep = ML.ApplyMachining( true, false)
if not bOkLastStep and bDownDrill and bOpen and abs( Proc.Flg) == 1 then
if sType == 'Drill' or sType == 'Drill_H2' or sType == 'AngleDrill' then
EgtSetMachiningParam( MCH_MP.INVERT, true)
else
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
end
bOkLastStep = ML.ApplyMachining( true, false)
end
if not bOkLastStep then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
return false, sErr
else
local _, sWarnLastStep = EgtGetMachMgrWarning( 0)
if not bOkLastStep then
sWarnLastStep = 'Drillpocket double : incomplete, last step missing'
end
local sPreviousWarn = sMyWarn or sWarn
if sWarnLastStep then
if not sPreviousWarn then sPreviousWarn = '' end
sMyWarn = EgtIf( #sPreviousWarn > 0, sPreviousWarn .. '\n' .. sWarnLastStep, sWarnLastStep)
end
end
end
return true, ( sMyWarn or sWarn)
end
end
+351 -121
View File
@@ -1,4 +1,4 @@
-- ProcessDtMortise.lua by Egaltech s.r.l. 2022/08/18
-- ProcessDtMortise.lua by Egaltech s.r.l. 2023/05/11
-- Gestione calcolo mortase a coda di rondine per Travi
-- 2021/04/08 Aggiunto controllo massimo materiale lavorabile dalla fresa.
-- 2021/04/08 Miglioria scelta lavorazione in presenza di testa da sotto.
@@ -8,6 +8,10 @@
-- 2022/06/01 Modifiche per evitare di entrare nel legno con mortase parziali.
-- 2022/08/18 Migliorato calcolo dello step.
-- 2022/09/29 Aggiunto riconoscimento della sola feature laterale.
-- 2022/12/28 Aggiunta gestione lavorazione in doppio.
-- 2023/03/06 Aggiunta forzatura ingresso fuori dal grezzo con pocket.
-- 2023/03/28 Corretto calcolo larghezza mortasa quando più larga che lunga.
-- 2023/05/11 Se lavorazione in doppio e precedente no oppure di tipo diverso, forzo risalita a Zmax.
-- Tabella per definizione modulo
local ProcessDtMortise = {}
@@ -16,6 +20,7 @@ local ProcessDtMortise = {}
require( 'EgtBase')
local BL = require( 'BeamLib')
local Cut = require( 'ProcessCut')
local Probe = require( 'ProcessProbing')
EgtOutLog( ' ProcessDtMortise started', 1)
@@ -34,6 +39,12 @@ function ProcessDtMortise.Identify( Proc)
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 56))
end
---------------------------------------------------------------------
-- Riconoscimento della sola feature laterale
function ProcessDtMortise.SideIdentify( Proc)
return (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 55)
end
---------------------------------------------------------------------
-- Riconoscimento della sola feature frontale
function ProcessDtMortise.FrontIdentify( Proc)
@@ -41,9 +52,20 @@ function ProcessDtMortise.FrontIdentify( Proc)
end
---------------------------------------------------------------------
-- Riconoscimento della sola feature laterale
function ProcessDtMortise.SideIdentify( Proc)
return (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 55)
-- Riconoscimento della feature profonda, non sulla faccia della trave
function ProcessDtMortise.IsDeeper( Proc, b3Raw)
-- recupero i dati della curva di contorno della faccia di fondo
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
if not AuxId then return false end
AuxId = AuxId + Proc.Id
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
if ( AreSameVectorApprox( vtExtr, -Y_AX()) and Proc.Box:getMin():getY() > b3Raw:getMin():getY() + 100 * GEO.EPS_SMALL) or
( AreSameVectorApprox( vtExtr, Y_AX()) and Proc.Box:getMax():getY() < b3Raw:getMax():getY() - 100 * GEO.EPS_SMALL) or
( AreSameVectorApprox( vtExtr, -Z_AX()) and Proc.Box:getMin():getZ() > b3Raw:getMin():getZ() + 100 * GEO.EPS_SMALL) or
( AreSameVectorApprox( vtExtr, Z_AX()) and Proc.Box:getMax():getZ() < b3Raw:getMax():getZ() - 100 * GEO.EPS_SMALL) then
return true
end
return false
end
---------------------------------------------------------------------
@@ -99,7 +121,7 @@ function ProcessDtMortise.GetCutPlane( Proc)
end
---------------------------------------------------------------------
local function CalcTopPath( nProcId, AuxId, nAddGrpId, dAltMort, dSideAng, b3Solid)
local function CalcPathAtHeight( nProcId, AuxId, nAddGrpId, dHeight, dSideAng, b3Solid)
-- copio la curva di base
local NewAuxId = EgtCopyGlob( AuxId, nAddGrpId)
if not NewAuxId then return end
@@ -107,16 +129,18 @@ local function CalcTopPath( nProcId, AuxId, nAddGrpId, dAltMort, dSideAng, b3Sol
EgtAddCurveCompoLineTg( NewAuxId, 100, false)
EgtAddCurveCompoLineTg( NewAuxId, 100, true)
EgtMergeCurvesInCurveCompo( NewAuxId)
-- eseguo traslazione e offset per portarla sul top
local vtMove = EgtCurveExtrusion( AuxId, GDB_RT.GLOB) * ( dAltMort - 10 * GEO.EPS_SMALL)
EgtMove( NewAuxId, vtMove, GDB_RT.GLOB)
local dOffset = dAltMort * tan( dSideAng)
local dOffset = dHeight * tan( dSideAng)
if not EgtOffsetCurve( NewAuxId, dOffset) then return end
-- la limito entro la trave
local refBox = Frame3d( b3Solid:getMin())
local vtBoxDiag = b3Solid:getMax() - b3Solid:getMin()
local nCount
NewAuxId, nCount = EgtTrimFlatCurveWithBox( NewAuxId, refBox, vtBoxDiag, true, true, GDB_RT.GLOB)
-- per ogni curva creata, eseguo traslazione e offset per portarla sul top
local vtMove = EgtCurveExtrusion( AuxId, GDB_RT.GLOB) * ( dHeight - 10 * GEO.EPS_SMALL)
for i = 1, nCount do
EgtMove( NewAuxId + i - 1, vtMove, GDB_RT.GLOB)
end
-- se divisa in più parti, le unisco congiungendole con segmenti
if nCount > 1 then
if EgtGetType( NewAuxId) ~= GDB_TY.CRV_COMPO then
@@ -125,13 +149,30 @@ local function CalcTopPath( nProcId, AuxId, nAddGrpId, dAltMort, dSideAng, b3Sol
for i = 2, nCount do
local CrvId = NewAuxId + i - 1
local ptStart = EgtSP( CrvId)
EgtAddCurveCompoLine( NewAuxId, ptStart)
EgtAddCurveCompoLine( NewAuxId, ptStart)
EgtAddCurveCompoCurve( NewAuxId, CrvId)
end
end
return NewAuxId
end
---------------------------------------------------------------------
local function GetVerticalSteps( dMachiningDepth, dStep )
local MachiningSteps = {}
MachiningSteps.StepLength = 0
if dMachiningDepth <= 0 then
MachiningSteps.Count = 0
return MachiningSteps
end
MachiningSteps.Count = ceil( (dMachiningDepth - 10 * GEO.EPS_SMALL) / dStep )
MachiningSteps.StepLength = dMachiningDepth / MachiningSteps.Count
return MachiningSteps
end
---------------------------------------------------------------------
-- verifica che il box includa il punto in XY
function EnclosesPoint( b3Box, ptP)
@@ -150,6 +191,8 @@ end
---------------------------------------------------------------------
-- Applicazione della lavorazione
function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
local sWarn
bMakeAntiSplitPath = true
-- ingombro del pezzo
local b3Solid = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
if not b3Solid then
@@ -175,16 +218,21 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtOutLog( sErr)
return false, sErr
end
-- determino l'altezza della mortasa (0=faccia di fondo)
local rfDtMrt, dLenMrt, dWidthMrt = EgtSurfTmFacetMinAreaRectangle( Proc.Id, 0, GDB_RT.GLOB)
local b3DtMrt = EgtGetBBoxRef( Proc.Id, GDB_BB.STANDARD, rfDtMrt)
local dAltMort = b3DtMrt:getDimZ()
-- ne determino l'asse (valido se non pocket)
-- ne determino l'asse
local vtAx = EgtEV( AuxId, GDB_RT.GLOB) - EgtSV( AuxId, GDB_RT.GLOB)
vtAx:normalize()
-- verifico se di tipo pocket
-- determino l'altezza della mortasa (0=faccia di fondo)
local rfDtMrt, dLenMrt, dWidthMrt = EgtSurfTmFacetMinAreaRectangle( Proc.Id, 0, GDB_RT.GLOB)
if abs( rfDtMrt:getVersY() * vtAx) > abs( rfDtMrt:getVersX() * vtAx) then
rfDtMrt:rotate( rfDtMrt:getOrigin(), rfDtMrt:getVersZ(), 90)
dLenMrt, dWidthMrt = dWidthMrt, dLenMrt
end
local b3DtMrt = EgtGetBBoxRef( Proc.Id, GDB_BB.STANDARD, rfDtMrt)
local dAltMort = b3DtMrt:getDimZ()
-- verifico se di tipo pocket o se antischeggia disabilitato
local bPocket = ( EgtGetInfo( Proc.Id, 'P05', 'i') == 1)
if bPocket then bMakeAntiSplitPath = false end
local bDisableAntiSplint = ( EgtGetInfo( Proc.Id, 'Q01', 'i') or 0) == 1
if bPocket or bDisableAntiSplint then bMakeAntiSplitPath = false end
-- verifico se frontale
local bFront = ( Proc.Prc == 56)
-- se mortasa di fronte, eseguo il taglio della faccia
@@ -202,7 +250,8 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
local AddId = EgtSurfTmPlaneInBBox( nAddGrpId, ptCutC, vtCutN, b3Solid, GDB_RT.GLOB)
local b3Cut = EgtGetBBoxGlob( AddId or GDB_ID.NULL, GDB_BB.STANDARD)
local CutProc = { Id = AddId, Grp = Proc.Grp - 2, Prc = 10, Box = b3Cut, Fct = 1, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bFromBottom = ( b3Solid:getDimX() < BD.LEN_SHORT_PART and vtExtr:getZ() > 0.25)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dCurrOvmH, bFromBottom)
if not bOk then return bOk, sErr end
@@ -232,10 +281,17 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
elseif bMillAngTrasm then
sMchExt = '_AT'
end
local bExcludeH2 = false
if Proc.Double and Proc.Double > 0 then
bMillUp = true
bMillDown = false
bExcludeH2 = true
sMchExt = ''
end
-- recupero la lavorazione : prima ricerca per sola tipologia
local sMilling = ML.FindMilling( sMillType..sMchExt, nil, nil, nil, nil, bMillUp, bMillDown)
local sMilling = ML.FindMilling( sMillType..sMchExt, nil, nil, nil, nil, bMillUp, bMillDown, bExcludeH2)
if not sMilling and bMillUp then
sMilling = ML.FindMilling( sMillType, nil, nil, nil, nil, bMillUp, bMillDown)
sMilling = ML.FindMilling( sMillType, nil, nil, nil, nil, bMillUp, bMillDown, bExcludeH2)
end
if not sMilling then
local sErr = 'Milling not found in library : Error on DtMortise ' .. tostring( Proc.Id)
@@ -243,9 +299,9 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
return false, sErr
end
-- recupero la lavorazione : seconda ricerca con tipologia e diametro massimo
sMilling = ML.FindMilling( sMillType..sMchExt, nil, nil, 2 * dMinRad, nil, bMillUp, bMillDown)
sMilling = ML.FindMilling( sMillType..sMchExt, nil, nil, 2 * dMinRad, nil, bMillUp, bMillDown, bExcludeH2)
if not sMilling and bMillUp then
sMilling = ML.FindMilling( sMillType, nil, nil, 2 * dMinRad, nil, bMillUp, bMillDown)
sMilling = ML.FindMilling( sMillType, nil, nil, 2 * dMinRad, nil, bMillUp, bMillDown, bExcludeH2)
sMchExt = ''
end
if not sMilling then
@@ -257,7 +313,9 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
local dToolDiam = 100
local dMaxMat = 30
local dSideAng = 0
local sHeadTool = 'H1'
local bCW = true
local bMillOnAggregate = sMchExt == '_AT'
if EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
@@ -265,24 +323,73 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
dToolDiam = max( dToolDiam, 10)
dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxMat
dSideAng = EgtTdbGetCurrToolParam( MCH_TP.SIDEANG) or dSideAng
sHeadTool = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
local dSpeed = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) or 0
bCW = ( dSpeed >= 0)
end
end
-- verifico che la profondità non superi il massimo materiale dell'utensile
local bMultipleZPasses = false
-- se necessario, cerco un utensile più lungo
if dAltMort > dMaxMat + 10 * GEO.EPS_SMALL then
local sErr = 'Error : DtMortise Depth bigger than Tool Cutting edge'
EgtOutLog( sErr)
return false, sErr
-- recupero la lavorazione : prima ricerca per sola tipologia
sMilling = ML.FindMilling( sMillType..sMchExt, nil, nil, nil, nil, bMillUp, bMillDown, bExcludeH2, nil, 'Longest')
if not sMilling and bMillUp then
sMilling = ML.FindMilling( sMillType, nil, nil, nil, nil, bMillUp, bMillDown, bExcludeH2, nil, 'Longest')
end
if not sMilling then
local sErr = 'Milling not found in library : Error on DtMortise ' .. tostring( Proc.Id)
EgtOutLog( sErr)
return false, sErr
end
-- recupero la lavorazione : seconda ricerca con tipologia e diametro massimo
sMilling = ML.FindMilling( sMillType..sMchExt, nil, nil, 2 * dMinRad, nil, bMillUp, bMillDown, bExcludeH2, nil, 'Longest')
if not sMilling and bMillUp then
sMilling = ML.FindMilling( sMillType, nil, nil, 2 * dMinRad, nil, bMillUp, bMillDown, bExcludeH2, nil, 'Longest')
sMchExt = ''
end
if not sMilling then
local sErr = 'Radius too small : Error on DtMortise ' .. tostring( Proc.Id)
EgtOutLog( sErr)
return false, sErr
end
if not sMilling then
local sErr = 'Error : DtMortise Depth bigger than Tool Cutting edge'
EgtOutLog( sErr)
return false, sErr
end
-- riassegno dati utensile
dToolDiam = 100
dMaxMat = 30
dSideAng = 0
bCW = true
bMillOnAggregate = sMchExt == '_AT'
if EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dToolDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dToolDiam
dToolDiam = max( dToolDiam, 10)
dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxMat
dSideAng = EgtTdbGetCurrToolParam( MCH_TP.SIDEANG) or dSideAng
local dSpeed = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) or 0
bCW = ( dSpeed >= 0)
end
end
bMultipleZPasses = true
end
-- se con tasca, la lavoro
-- tastatura se richiesta
local Info = { vtProbe = vtExtr, ptProbe = ptBC, sType = 'DTMortise', sHead = sHeadTool}
local bProbeExecuted, sErr = Probe.Make( Proc, nPartId, Info)
-- se con tasca, la lavoro (mai in doppio)
if bPocket then
-- recupero il contorno della tasca (seconda curva ausiliaria)
local sVal = EgtGetInfo( Proc.Id, 'AUXID')
local vsAuxId = EgtSplitString( sVal)
local vAuxId = EgtGetInfo( Proc.Id, 'AUXID', 'vi')
local Aux2Id
if vsAuxId and #vsAuxId >=2 then
Aux2Id = tonumber( vsAuxId[2])
if vAuxId and #vAuxId >=2 then
Aux2Id = vAuxId[2]
end
if Aux2Id then Aux2Id = Aux2Id + Proc.Id end
if not Aux2Id or ( EgtGetType( Aux2Id) & GDB_FY.GEO_CURVE) == 0 then
@@ -318,7 +425,9 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- aggiungo geometria
EgtSetMachiningGeometry( {{ Aux2Id, -1}})
-- dichiaro non si generano sfridi per VMill
local sUserNotes = 'MaxElev='.. EgtNumToString( dMaxMat - 0.1, 1) .. '; VMRS=0;'
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxMat - 0.1, 1))
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- eseguo
if not ML.ApplyMachining( true, false) then
@@ -329,13 +438,24 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- eventuale calcolo SCC
local nSCC
if BD.TURN and not bPocket then
if abs( vtAx:getY()) > abs( vtAx:getZ()) then
nSCC = EgtIf( vtAx:getY() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
else
nSCC = EgtIf( vtAx:getZ() > 0, MCH_SCC.ADIR_ZP, MCH_SCC.ADIR_ZM)
if BD.TURN then
if not bPocket then
if abs( vtAx:getY()) > abs( vtAx:getZ()) then
nSCC = EgtIf( vtAx:getY() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
else
nSCC = EgtIf( vtAx:getZ() > 0, MCH_SCC.ADIR_ZP, MCH_SCC.ADIR_ZM)
end
end
-- se aggregato e rivolto verso Z-, si accede da lato aperto
elseif bMillOnAggregate and AreSameVectorApprox( vtExtr, -Z_AX()) then
if Proc.AffectedFaces.Back then
nSCC = MCH_SCC.ADIR_YP
elseif Proc.AffectedFaces.Front then
nSCC = MCH_SCC.ADIR_YM
end
end
-- flag di mirror precedente aggiornabile localmente
local nMyPrevDouble = Proc.PrevDouble
-- se parametro interno abilitato e il percorso non è chiuso, aggiungo percorso e lavorazione antischeggia
if bMakeAntiSplitPath and not EgtCurveIsClosed( AuxId) then
-- recupero gruppo per geometria addizionale
@@ -346,85 +466,103 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
return false, sErr
end
-- calcolo il percorso top mortise
local nAuxId1 = CalcTopPath( Proc.Id, AuxId, nAddGrpId, dAltMort, dSideAng, b3Solid)
local nAuxId1 = CalcPathAtHeight( Proc.Id, AuxId, nAddGrpId, dAltMort, dSideAng, b3Solid)
-- se esiste il percorso
if nAuxId1 then
-- creo percorso sulla parte alta della mortasa
local dToolRadDelta = dAltMort * tan( dSideAng)
local dTopDiam = dToolDiam + 2 * dToolRadDelta
-- recupero punto iniziale e finale del percorso
local ptStart = EgtSP( nAuxId1, GDB_RT.GLOB)
local ptEnd = EgtEP( nAuxId1, GDB_RT.GLOB)
if ptStart and ptEnd then
local nId1
-- se richiesti due segmenti di linea
if not bMakeAsByArc then
-- determino il punto comune dei due segmenti
local vtDelta = ( ptEnd - ptStart) / 4
vtDelta:rotate( vtExtr, -90)
local ptMid = ( ptStart + ptEnd) / 2 + vtDelta
-- creo la spezzata formata dai due segmenti
nId1 = EgtCurveCompoFromPoints( nAddGrpId, { ptStart, ptMid, ptEnd}, GDB_RT.GLOB)
-- altrimenti richiesto arco
else
-- direzione del segmento
local vtDir = ptEnd - ptStart ;
local dLen = vtDir:len()
vtDir:normalize()
-- direzioni tangenti iniziale e finale
local vtStart = EgtSV( nAuxId1, GDB_RT.GLOB)
local vtEnd = EgtEV( nAuxId1, GDB_RT.GLOB)
-- angoli
local dAngStart = acos( vtStart * vtDir)
local dAngEnd = acos( vtEnd * vtDir)
local dMaxAng = min( 30, dAngStart, dAngEnd)
if dLen < dTopDiam then
dMaxAng = min( dMaxAng, asin( dLen / dTopDiam))
if EgtCurveIsFlat( nAuxId1) then
-- creo percorso sulla parte alta della mortasa
local dToolRadDelta = dAltMort * tan( dSideAng)
local dTopDiam = dToolDiam + 2 * dToolRadDelta
-- recupero punto iniziale e finale del percorso
local ptStart = EgtSP( nAuxId1, GDB_RT.GLOB)
local ptEnd = EgtEP( nAuxId1, GDB_RT.GLOB)
if ptStart and ptEnd then
local nId1
-- se richiesti due segmenti di linea
if not bMakeAsByArc then
-- determino il punto comune dei due segmenti
local vtDelta = ( ptEnd - ptStart) / 4
vtDelta:rotate( vtExtr, -90)
local ptMid = ( ptStart + ptEnd) / 2 + vtDelta
-- creo la spezzata formata dai due segmenti
nId1 = EgtCurveCompoFromPoints( nAddGrpId, { ptStart, ptMid, ptEnd}, GDB_RT.GLOB)
-- altrimenti richiesto arco
else
-- direzione del segmento
local vtDir = ptEnd - ptStart ;
local dLen = vtDir:len()
vtDir:normalize()
-- direzioni tangenti iniziale e finale
local vtStart = EgtSV( nAuxId1, GDB_RT.GLOB)
local vtEnd = EgtEV( nAuxId1, GDB_RT.GLOB)
-- angoli
local dAngStart = acos( vtStart * vtDir)
local dAngEnd = acos( vtEnd * vtDir)
local dMaxAng = min( 30, dAngStart, dAngEnd)
if dLen < dTopDiam then
dMaxAng = min( dMaxAng, asin( dLen / dTopDiam))
end
local vtTg = vtDir ; vtTg:rotate( vtExtr, -dMaxAng)
-- creo l'arco
nId1 = EgtArc2PV( nAddGrpId, ptStart, ptEnd, vtTg, GDB_RT.GLOB)
end
local vtTg = vtDir ; vtTg:rotate( vtExtr, -dMaxAng)
-- creo l'arco
nId1 = EgtArc2PV( nAddGrpId, ptStart, ptEnd, vtTg, GDB_RT.GLOB)
end
if not nId1 then
local sErr = 'Wrong geometry : Error on DtMortise '
if not nId1 then
local sErr = 'Wrong geometry : Error on DtMortise '
EgtOutLog( sErr)
return false, sErr
end
EgtModifyCurveExtrusion( nId1, vtExtr, GDB_RT.GLOB)
-- inserisco la lavorazione di contornatura anti splint
local sNameF = 'DtMtAS_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchFId = EgtAddMachining( sNameF, sMilling)
if not nMchFId then
local sErr = 'Error adding machining ' .. sNameF .. '-' .. sMilling
EgtOutLog( sErr)
return false, sErr
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ nId1, -1}})
-- setto affondamento pari all'altezza della mortsasa
EgtSetMachiningParam( MCH_MP.DEPTH, dAltMort)
-- setto offset radiale con aggiunto un ulteriore allargamento di 1mm
EgtSetMachiningParam( MCH_MP.OFFSR, dToolRadDelta - 1)
-- antischeggia sempre con una passata
if bMultipleZPasses then
EgtSetMachiningParam( MCH_MP.STEP, 0)
end
-- sistemo il lato e la direzione di lavoro
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( bCW, MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT))
EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bCW, false, true))
-- se necessario, imposto SCC
if nSCC then
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
end
-- dichiaro non si generano sfridi per VMill
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dAltMort, 1))
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
-- se lavorazione in doppio
if Proc.Double and Proc.Double > 0 then
sUserNotes = EgtSetValInNotes( sUserNotes, 'DOUBLE', Proc.Double)
if Proc.Double ~= nMyPrevDouble then
nMyPrevDouble = Proc.Double
sUserNotes = EgtSetValInNotes( sUserNotes, 'StartZmax', 2)
end
end
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchFId, false)
return false, sErr
end
else
local sErr = 'Wrong geometry : Error on DtMortise ' .. tostring( Proc.Id)
EgtOutLog( sErr)
return false, sErr
end
EgtModifyCurveExtrusion( nId1, vtExtr, GDB_RT.GLOB)
-- inserisco la lavorazione di contornatura anti splint
local sNameF = 'DtMtAS_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchFId = EgtAddMachining( sNameF, sMilling)
if not nMchFId then
local sErr = 'Error adding machining ' .. sNameF .. '-' .. sMilling
EgtOutLog( sErr)
return false, sErr
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ nId1, -1}})
-- setto affondamento pari all'altezza della mortsasa
EgtSetMachiningParam( MCH_MP.DEPTH, dAltMort)
-- setto offset radiale con aggiunto un ulteriore allargamento di 1mm
EgtSetMachiningParam( MCH_MP.OFFSR, dToolRadDelta - 1)
-- sistemo il lato e la direzione di lavoro
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( bCW, MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT))
EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bCW, false, true))
-- se necessario, imposto SCC
if nSCC then
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
end
-- dichiaro non si generano sfridi per VMill
local sUserNotes = 'MaxElev='.. EgtNumToString( dAltMort, 1) .. '; VMRS=0;'
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchFId, false)
return false, sErr
end
else
local sErr = 'Wrong geometry : Error on DtMortise ' .. tostring( Proc.Id)
EgtOutLog( sErr)
return false, sErr
sWarn = 'Warning : skipped DoveTail mortise antisplint'
end
else
local sErr = 'Wrong geometry : Error on DtMortise ' .. tostring( Proc.Id)
@@ -440,6 +578,23 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
local nPass = ceil( dDist / ( 1.9 * dToolDiam))
local dStep = 0
if nPass > 1 then dStep = max( ( dDist - 2 * dToolDiam) / ( 2 * nPass - 2), 0.25 * dToolDiam) end
local dVerticalStep = 0
if bMultipleZPasses then
local dToolVerticalStep = 0
if EgtMdbSetCurrMachining( sMilling) then
dToolVerticalStep = EgtMdbGetCurrMachiningParam( MCH_MP.STEP) or 0
end
if dToolVerticalStep < 10 * GEO.EPS_SMALL then
dToolVerticalStep = dMaxMat / 3
else
dToolVerticalStep = min( dToolVerticalStep, dMaxMat / 3)
end
local VerticalSteps = GetVerticalSteps( dAltMort, dToolVerticalStep)
dVerticalStep = VerticalSteps.StepLength
nPass = VerticalSteps.Count
end
for i = nPass, 1, -1 do
-- inserisco la lavorazione di contornatura
local sNameF = 'DtMt_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( nPass)
@@ -450,27 +605,80 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
return false, sErr
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
local GeomId = AuxId
if ( i > 1) and bMultipleZPasses then
local dCurrentHeight = dAltMort - ( ( nPass - i + 1) * dVerticalStep)
-- recupero gruppo per geometria addizionale
local nAddGrpId = BL.GetAddGroup( nPartId)
if not nAddGrpId then
local sErr = 'Error : missing AddGroup'
EgtOutLog( sErr)
return false, sErr
end
local b3MortiseNoPocket = EgtGetBBoxGlob( AuxId, GDB_BB.STANDARD)
GeomId = CalcPathAtHeight( Proc.Id, AuxId, nAddGrpId, dCurrentHeight, dSideAng, b3MortiseNoPocket)
if not GeomId then
local sErr = 'Wrong geometry : Error on DtMortise ' .. tostring( Proc.Id)
EgtOutLog( sErr)
return false, sErr
end
end
EgtSetMachiningGeometry( {{ GeomId, -1}})
-- imposto offset
local dOffs = ( i - 1) * dStep
if bMultipleZPasses then
if i > 1 then
dOffs = 1
else
dOffs = 0
end
end
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
-- in caso di passate in Z già calcolate lo step deve essere nullo per garantire passate singole
if bMultipleZPasses then
EgtSetMachiningParam( MCH_MP.STEP, 0)
end
-- sistemo il lato e la direzione di lavoro
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( bCW, MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT))
EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bCW, false, true))
local ptS = EgtSP( AuxId, GDB_ID.ROOT)
local ptE = EgtEP( AuxId, GDB_ID.ROOT)
-- in presenza di pocket imposto dati ingresso e uscita
if bPocket then
-- recupero il contorno della tasca (seconda curva ausiliaria)
local vAuxId = EgtGetInfo( Proc.Id, 'AUXID', 'vi')
-- si prende il centro del percorso da svuotare ( non si controlla che sia presente perchè già verificata in precedenza)
local ptPocketCenter = EgtGP( Proc.Id + vAuxId[2], GDB_ID.ROOT)
-- calcolo componente tangente e lineare di ingresso
local vtS = EgtSV( Proc.Id + vAuxId[1], GDB_ID.ROOT) -- vettore entrante percorso
local vtOffS = EgtSV( Proc.Id + vAuxId[1], GDB_ID.ROOT) ; vtOffS:rotate( vtExtr, 90) -- vettore da punto iniziale a centro utensile
local vtStartToCenter = ptPocketCenter - ( ptS + ( vtOffS * ( dToolDiam/2))) -- vettore da centro utensilenel punto iniziale e centro del percorso da svuotare
local dLenStartToCenter = vtStartToCenter:len() -- distanza da centro utensile a centro del percorso da svuotare
local dStartTangComp = abs( vtStartToCenter * vtS) -- prodotto scalare tra vettore entrante e vettore tra centro utensilee percordo da svuotare (componente tangente)
local dStartPerpComp = sqrt( dLenStartToCenter^2 - dStartTangComp^2) -- pitagora tra componente tangente e la lunghezza tra i due centri
-- calcolo componente tangente e lineare di uscita
local vtE = EgtEV( Proc.Id + vAuxId[1], GDB_ID.ROOT)
local vtOffE = EgtEV( Proc.Id + vAuxId[1], GDB_ID.ROOT) ; vtOffE:rotate( vtExtr, 90)
local vtEndToCenter = ptPocketCenter - ( ptE + ( vtOffE * ( dToolDiam/2)))
local dLenEndToCenter = vtEndToCenter:len()
local dEndTangComp = abs( vtEndToCenter * vtE)
local dEndPerpComp = sqrt( dLenEndToCenter^2 - dEndTangComp^2)
EgtSetMachiningParam( MCH_MP.STARTPOS, 5)
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.TANGENT)
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LO.AS_LI)
EgtSetMachiningParam( MCH_MP.STARTADDLEN, 5)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, 0)
EgtSetMachiningParam( MCH_MP.LITANG, dToolDiam / 2)
EgtSetMachiningParam( MCH_MP.LIPERP, 5)
EgtSetMachiningParam( MCH_MP.LITANG, dStartTangComp)
EgtSetMachiningParam( MCH_MP.LIPERP, dStartPerpComp)
EgtSetMachiningParam( MCH_MP.LIELEV, 0)
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LI.TANGENT)
EgtSetMachiningParam( MCH_MP.LOTANG, dEndTangComp)
EgtSetMachiningParam( MCH_MP.LOPERP, dEndPerpComp)
EgtSetMachiningParam( MCH_MP.LOELEV, 0)
EgtSetMachiningParam( MCH_MP.STARTADDLEN, 0)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, 0)
-- altrimenti verifico se sono bilanciati ingresso e uscita, per evitare inizio o fine nel legno
else
local ptS = EgtSP( AuxId, GDB_ID.ROOT)
local ptE = EgtEP( AuxId, GDB_ID.ROOT)
local dDistS = abs( ( ptS - rfDtMrt:getOrigin()) * rfDtMrt:getVersX())
local dDistE = abs( ( ptE - rfDtMrt:getOrigin()) * rfDtMrt:getVersX())
local dIni, dFin = EgtCurveDomain( AuxId)
@@ -486,11 +694,33 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
end
-- se necessario, imposto SCC
if nSCC then
if nSCC then
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
end
-- dichiaro non si generano sfridi per VMill
local sUserNotes = 'MaxElev='.. EgtNumToString( dMaxMat - 0.1, 1) .. '; VMRS=0;'
-- dichiaro massima elevazione e assenza sfridi per VMill
local dMaxElev = dMaxMat
if bMultipleZPasses then
dMaxElev = dVerticalStep
end
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxElev - 0.1, 1))
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
-- in presenza di pocket dichiaro che non sto entrando e uscendo nel grezzo
if bPocket then
sUserNotes = EgtSetValInNotes( sUserNotes, 'OutRaw', 3)
end
-- se lavorazione in doppio
if Proc.Double and Proc.Double > 0 then
sUserNotes = EgtSetValInNotes( sUserNotes, 'DOUBLE', Proc.Double)
if Proc.Double ~= nMyPrevDouble then
nMyPrevDouble = Proc.Double
sUserNotes = EgtSetValInNotes( sUserNotes, 'StartZmax', 2)
end
end
-- se c'è stata tastatura, si disattiva sull'ultima lavorazione
if bProbeExecuted and i == 1 then
sUserNotes = EgtSetValInNotes( sUserNotes, 'END-PROBE', true)
end
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- eseguo
if not ML.ApplyMachining( true, false) then
@@ -499,7 +729,7 @@ function ProcessDtMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
return false, sErr
end
end
return true
return true, sWarn
end
---------------------------------------------------------------------
+201 -75
View File
@@ -1,7 +1,11 @@
-- ProcessTenon.lua by Egaltech s.r.l. 2022/06/07
-- ProcessTenon.lua by Egaltech s.r.l. 2023/03/28
-- Gestione calcolo tenone a coda di rondine per Travi
-- 2021/04/08 Aggiunto controllo massimo materiale lavorabile dalla fresa.
-- 2022/04/14 Aumentati un poco i limiti di orientamento verso il basso per FAST e PF.
-- 2023/02/08 Aumentato il range per cui i tenoni vengono lavorati in sottosquadro.
-- 2023/03/27 Migliorate condizioni scelta pretaglio con lama o fresa; gestione unificata con ProcessTenon.
-- 2023/03/28 Corretta gestione faccia di base quando divisa in più parti per distanza massima da lavorare.
-- 2024/02/29 Aumentato numero passaggi CR su tenone. Massimo 8
-- Tabella per definizione modulo
local ProcessDtTenon = {}
@@ -9,6 +13,7 @@ local ProcessDtTenon = {}
-- Include
require( 'EgtBase')
local BL = require( 'BeamLib')
local Fbp = require( 'FaceByPocket')
local Cut = require( 'ProcessCut')
EgtOutLog( ' ProcessTenon started', 1)
@@ -38,14 +43,17 @@ local function VerifyOrientation( Proc, vtN, b3Raw)
-- se tenone praticamente in asse, accetto fino a -30 deg
if abs( vtN:getY()) < 0.088 then
return ( vtN:getZ() >= -0.51)
-- altrimenti accetto fino a -21deg
-- se macchina Fast, pezzo stretto e inclinazione laterale non eccessiva, accetto fino a -27deg
elseif ( not BD.C_SIMM) and abs( vtN:getY()) < 0.5 and b3Raw:getDimY() < 150.1 then
return ( vtN:getZ() >= -0.454)
-- altrimenti accetto fino a -23.5deg
else
return ( vtN:getZ() >= -0.359)
return ( vtN:getZ() >= -0.399)
end
-- se trave medio-bassa
elseif b3Raw:getDimZ() < 281 then
-- se tenone praticamente in asse, accetto fino a -25 deg
if abs( vtN:getY()) < 0.088 then
-- se tenone praticamente in asse oppure pezzo stretto e inclinazione laterale non eccessiva, accetto fino a -25 deg
if abs( vtN:getY()) < 0.088 or ( abs( vtN:getY()) < 0.5 and b3Raw:getDimY() < 150.1) then
return ( vtN:getZ() >= -0.422)
-- altrimenti, accetto fino a -15 deg
else
@@ -56,14 +64,14 @@ local function VerifyOrientation( Proc, vtN, b3Raw)
-- se tenone praticamente in asse, accetto fino a -22 deg
if abs( vtN:getY()) < 0.088 then
return ( vtN:getZ() >= -0.375)
-- altrimenti, accetto fino a -10 deg
-- altrimenti, accetto fino a -12.5 deg
else
return ( vtN:getZ() >= -0.174)
return ( vtN:getZ() >= -0.216)
end
-- altrimenti
else
-- accetto fino a -5deg
return ( vtN:getZ() >= -0.088)
-- accetto fino a -12.5 deg
return ( vtN:getZ() >= -0.216)
end
end
@@ -101,8 +109,9 @@ local function ApplyPocket( Proc, sPocketing, nStep, dSurfStep, nIdSurf, vtExtr)
-- imposto uso faccia
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.ORTHO_CONT)
if dSurfStep > 0 then
local sNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
-- imposto elevazione
local sNotes = 'MaxElev=' .. EgtNumToString( dSurfStep, 2) .. ';'
sNotes = EgtSetValInNotes( sNotes, 'MaxElev', EgtNumToString( dSurfStep, 2))
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
end
-- imposto posizione braccio porta testa
@@ -163,6 +172,9 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- ne determino l'asse
local vtAx = EgtEV( AuxId, GDB_RT.GLOB) - EgtSV( AuxId, GDB_RT.GLOB)
vtAx:normalize()
-- abilitazione lavorazione da sotto
local bMillUp = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.259)
local bMillDown = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.174)
-- se tenone inclinato o non esattamente alle estremità, necessario taglio di lama sulla testa
if not AreSameOrOppositeVectorApprox( vtN, X_AX()) or
( Proc.Box:getMax():getX() < b3Raw:getMax():getX() - dOvmHead - 100 * GEO.EPS_SMALL and
@@ -179,63 +191,47 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
if AddId then
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
-- se pezzo piccolo, in coda e piano inclinato attorno a Z applico svuotatura
if b3Solid:getDimX() < BD.LEN_SHORT_PART and vtExtr:getX() < 0 and abs( vtExtr:getY()) > 0.173 then
local sPocketing = ML.FindPocketing( 'OpenPocket')
local dMaxDepth = 100
local dStep = 30
local nSurfStep
-- acquisisco i dati necessari dall'utensile
if EgtMdbSetCurrMachining( sPocketing) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
dStep = EgtMdbGetCurrMachiningParam( MCH_MP.STEP) or dStep
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
end
end
-- acquisisco elevazione
local dElev = BL.GetFaceElevation( AddId, 0, nPartId)
nSurfStep = ceil( dElev / dMaxDepth)
dSurfStep = dElev / nSurfStep
local bOk = true
local sErr
-- copio superfice al passo superfice e ci applico la lavorazione
for i = nSurfStep, 2, -1 do
local nAddIdTmp = EgtSurfTmPlaneInBBox( nAddGrpId, ptC+((dSurfStep*(i-1))*vtN), vtN, b3Solid, GDB_RT.GLOB)
if nAddIdTmp then
EgtSetName( nAddIdTmp, 'AddCut_' .. tostring( Proc.Id))
EgtSetInfo( nAddIdTmp, 'TASKID', Proc.TaskId)
-- aggiungo lavorazione
bOk, sErr = ApplyPocket( Proc, sPocketing, i, (dSurfStep + 0), nAddIdTmp, vtExtr)
if not bOk then
break
end
end
end
if not bOk then
-- solo per macchine tipo PF e simili: se pezzo piccolo, in coda, piano inclinato attorno a Z e inclinato verso il basso applico svuotatura
if b3Solid:getDimX() < BD.LEN_SHORT_PART and vtExtr:getX() < 0 and abs( vtExtr:getY()) > 0.173 and vtExtr:getZ() < -0.1 and BD.C_SIMM then
-- recupero la lavorazione
local sPocketing = ML.FindPocketing( 'OpenPocket', nil, nil, nil, not bMillDown, bMillDown)
if not sPocketing then
local sErr = 'Error : pocketing '..sPockType..' not found in library'
EgtOutLog( sErr)
return false, sErr
end
-- faccio ultima superfice
bOk, sErr = ApplyPocket( Proc, sPocketing, 1, EgtIf( nSurfStep > 1, ( dSurfStep + 0), 0), AddId, vtExtr)
-- eseguo le svuotature necessarie
local bOk, sErr = Fbp.Make( Proc, AddId, 0, sPocketing, nPartId, b3Solid)
if not bOk then
return false, sErr
end
-- altrimenti applico taglio di lama
else
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
local bFromBottom = ( b3Solid:getDimX() < BD.LEN_SHORT_PART and vtExtr:getZ() > 0.25)
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
-- se esiste grezzo successivo non serve tagliare dal basso
local bFromBottom
local dTotalLength = 0
local nNextRawId = EgtGetNextRawPart( nRawId)
while nNextRawId do
dTotalLength = dTotalLength + EgtGetRawPartBBox( nNextRawId):getDimX()
nNextRawId = EgtGetNextRawPart( nNextRawId)
end
if dTotalLength > BD.MinRaw and not Proc.Tail then
bFromBottom = false
else
bFromBottom = ( b3Solid:getDimX() < BD.LEN_SHORT_PART and vtExtr:getZ() > 0.25)
end
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom)
if not bOk then return bOk, sErr end
end
end
end
-- abilitazione lavorazione da sotto
local bMillUp = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.259)
local bMillDown = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.174)
-- recupero la lavorazione
local sMillType = 'DtTenon'
local sMilling = ML.FindMilling( sMillType .. EgtIf( bMillDown, '_H2', ''), nil, nil, nil, nil, bMillUp, bMillDown)
local sMilling = ML.FindMilling( sMillType .. EgtIf( bMillDown and not bMillUp, '_H2', ''), nil, nil, nil, nil, bMillUp, bMillDown)
if not sMilling then
local sErr = 'Error : milling not found in library'
EgtOutLog( sErr)
@@ -254,35 +250,63 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
bCW = ( dSpeed >= 0)
end
end
-- verifico che l'altezza non superi il massimo materiale dell'utensile
-- se necessario, cerco un utensile più lungo
if dDtTenH > dMaxMat + 10 * GEO.EPS_SMALL then
local sErr = 'Error : DtTenon Height bigger than Tool Cutting edge'
EgtOutLog( sErr)
return false, sErr
end
-- calcolo distanza massima della curva dal punto più lontano della base tenone Dt (facet 0)
local dMaxDist = 0
local nLoopId, nLoopCnt = EgtExtractSurfTmFacetLoops( Proc.Id, 0, EgtGetParent( Proc.Id))
if nLoopId then
local dUmin, dUmax = EgtCurveDomain( nLoopId)
for dU = dUmin, dUmax do
local ptP = EgtUP( nLoopId, dU, GDB_ID.ROOT)
local ptNear = EgtNP( AuxId, ptP, GDB_ID.ROOT)
local dDist = dist( ptP, ptNear)
if dDist > dMaxDist then
dMaxDist = dDist
sMilling = ML.FindMilling( sMillType .. EgtIf( bMillDown and not bMillUp, '_H2', ''), nil, nil, nil, nil, bMillUp, bMillDown, nil, nil, 'Longest')
if not sMilling then
local sErr = 'Error : milling not found in library'
EgtOutLog( sErr)
return false, sErr
end
if not sMilling then
local sErr = 'Error : DtTenon Height bigger than Tool Cutting edge'
EgtOutLog( sErr)
return false, sErr
end
-- riassegno dati utensile
dTDiam = 50
dMaxMat = 30
bCW = true
if EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dTDiam
dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxMat
local dSpeed = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) or 0
bCW = ( dSpeed >= 0)
end
end
for i = 1, nLoopCnt do
EgtErase( nLoopId + i - 1)
end
-- calcolo distanza massima della curva dal punto più lontano della base tenone Dt (facet 0)
local dMaxDist
for i = 0, Proc.Fct - 1 do
local ptFC, vtFN = EgtSurfTmFacetCenter( Proc.Id, i, GDB_ID.ROOT)
if not AreSameVectorApprox( vtFN, vtN) or abs( ( ptFC - ptBC) * vtN) > 100 * GEO.EPS_SMALL then
break
end
else
local nLoopId, nLoopCnt = EgtExtractSurfTmFacetLoops( Proc.Id, i, EgtGetParent( Proc.Id))
if nLoopId then
local dUmin, dUmax = EgtCurveDomain( nLoopId)
for dU = dUmin, dUmax do
local ptP = EgtUP( nLoopId, dU, GDB_ID.ROOT)
local ptNear = EgtNP( AuxId, ptP, GDB_ID.ROOT)
local dDist = dist( ptP, ptNear)
if not dMaxDist or dDist > dMaxDist then
dMaxDist = dDist
end
end
for j = 1, nLoopCnt do
EgtErase( nLoopId + j - 1)
end
end
end
if not dMaxDist then
local b3DtAux = EgtGetBBoxRef( AuxId, GDB_BB.STANDARD, frDtTen)
dMaxDist = 2 * ( b3DtTen:getRadius() - b3DtAux:getRadius())
end
EgtOutLog( 'MaxDist=' .. EgtNumToString( dMaxDist, 3), 3)
-- Cicli di lavorazione (max 6)
local MAX_PASS = 6
-- Cicli di lavorazione (max 8)
local MAX_PASS = 8
local nStep = min( ceil( dMaxDist / ( 0.7 * dTDiam)), MAX_PASS)
local dStep = min( dMaxDist, 0.7 * dTDiam * MAX_PASS) / nStep
for i = nStep, 1, -1 do
@@ -299,7 +323,9 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- sistemo i parametri
local dOffs = ( i - 1) * dStep
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dDtTenH, 1) .. ';')
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dDtTenH, 1))
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- sistemo il lato e la direzione di lavoro
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( bCW, MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT))
EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bCW, true, false))
@@ -341,8 +367,108 @@ function ProcessDtTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
BL.UpdateTCING( nRawId, dOffs)
end
end
-- si controllano le ultime 5 facce della feature
local nIndFace = -1
for i = 1, 5 do
if abs( vtExtr * EgtSurfTmFacetNormVersor( Proc.Id, Proc.Fct-i, GDB_ID.ROOT)) < GEO.EPS_ANG_SMALL then
nIndFace = Proc.Fct-i
end
end
-- controllo se serve passaggio di finitura in caso il tenone non cominci dal bordo della trave (P14 > 0)
if nIndFace > 0 then
-- verifico se almeno uno dei punti iniziale e finale della curva giace in uno dei piani limite del pezzo, quindi se è un lato aperto
local bOpen = false
local ptIni = EgtSP( AuxId, GDB_RT.GLOB)
local ptFin = EgtEP( AuxId, GDB_RT.GLOB)
if ( abs( ptIni:getX() - b3Solid:getMax():getX()) < 100 * GEO.EPS_SMALL or abs( ptFin:getX() - b3Solid:getMax():getX()) < 100 * GEO.EPS_SMALL) or
( abs( ptIni:getX() - b3Solid:getMin():getX()) < 100 * GEO.EPS_SMALL or abs( ptFin:getX() - b3Solid:getMin():getX()) < 100 * GEO.EPS_SMALL) or
( abs( ptIni:getY() - b3Solid:getMax():getY()) < 100 * GEO.EPS_SMALL or abs( ptFin:getY() - b3Solid:getMax():getY()) < 100 * GEO.EPS_SMALL) or
( abs( ptIni:getY() - b3Solid:getMin():getY()) < 100 * GEO.EPS_SMALL or abs( ptFin:getY() - b3Solid:getMin():getY()) < 100 * GEO.EPS_SMALL) or
( abs( ptIni:getZ() - b3Solid:getMax():getZ()) < 100 * GEO.EPS_SMALL or abs( ptFin:getZ() - b3Solid:getMax():getZ()) < 100 * GEO.EPS_SMALL) or
( abs( ptIni:getZ() - b3Solid:getMin():getZ()) < 100 * GEO.EPS_SMALL or abs( ptFin:getZ() - b3Solid:getMin():getZ()) < 100 * GEO.EPS_SMALL) then
bOpen = true
end
-- se entrambi i punti non sono sul limite pezzo
if not bOpen then
-- recupero la lavorazione
sMillType = 'Tenon'
sMilling = ML.FindMilling( sMillType .. EgtIf( bMillDown and not bMillUp, '_H2', ''), nil, nil, nil, nil, bMillUp, bMillDown)
if not sMilling then
local sErr = 'Error : milling to finish the tenon not found in library'
EgtOutLog( sErr)
return false, sErr
end
-- recupero i dati dell'utensile
if EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dTDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dTDiam
dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxMat
local dSpeed = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) or 0
bCW = ( dSpeed >= 0)
end
-- inserisco la passata finale della lavorazione
local sNameF = 'TenF_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchFId = EgtAddMachining( sNameF, sMilling)
if not nMchFId then
local sErr = 'Error adding machining ' .. sNameF .. '-' .. sMilling
EgtOutLog( sErr)
return false, sErr
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ Proc.Id, nIndFace}})
-- sistemo i parametri
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH')
-- sistemo il lato e la direzione di lavoro
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( bCW, MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT))
EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bCW, true, false))
EgtSetMachiningParam( MCH_MP.LITANG, 0.7 * dTDiam)
EgtSetMachiningParam( MCH_MP.LIPERP, 20)
EgtSetMachiningParam( MCH_MP.LOTANG, 0.7 * dTDiam)
EgtSetMachiningParam( MCH_MP.LOPERP, 20)
local nFaceUse
if vtExtr:getX() > -GEO.EPS_SMALL then
nFaceUse = MCH_MILL_FU.PARAL_LEFT
else
nFaceUse = MCH_MILL_FU.PARAL_RIGHT
end
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
-- imposto elevazione
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dDtTenH, 1))
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- imposto posizione braccio porta testa
local nSCC = MCH_SCC.NONE
if BD.TURN then
if abs( vtAx:getY()) > abs( vtAx:getZ()) then
nSCC = EgtIf( vtAx:getY() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
else
nSCC = EgtIf( vtAx:getZ() > 0, MCH_SCC.ADIR_ZP, MCH_SCC.ADIR_ZM)
end
elseif not BD.C_SIMM then
nSCC = MCH_SCC.ADIR_YM
if abs( vtExtr:getY()) > 0.088 then
nSCC = EgtIf( vtExtr:getX() < GEO.EPS_SMALL, MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
end
end
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchFId, false)
return false, sErr
end
end
end
end
return true
end
end
---------------------------------------------------------------------
return ProcessDtTenon
+215 -52
View File
@@ -1,4 +1,4 @@
-- ProcessFreeContour.lua by Egaltech s.r.l. 2022/11/03
-- ProcessFreeContour.lua by Egaltech s.r.l. 2023/03/03
-- Gestione calcolo profilo libero per Travi
-- 2022/08/23 Aggiunta la funzione MakeByMark per la gestione del caso P13=10
-- 2022/09/21 In MakeByMill aggiunto messaggio per elevazione non raggiunta.
@@ -6,7 +6,11 @@
-- 2022/11/09 Aggiunta la gestione della chiamata della FreeContour da parte della SimpleScarf.
-- 2022/11/24 In MakeByMill aggiunta la lavorazione sopra/sotto nel caso di testa sotto
-- In MakeByMill se BeamData forza lettura codolo da Q questo viene sempre fatto indipendentemente dalle dimensioni della feature
-- 2023/03/03 Corretta MakeByMark ( non definiti b3Raw e b3Aux ).
-- 2023/06/21 In CalcSpecialAdd modificato l'angolo minimo da 5 a 15 deg.
-- 2023/07/28 In MakeByPocket aggiunta Q06 per specificare un eventuale offset radiale del contorno.
-- 2024/03/05 In MakebyPocket aggiunta lavorazione di smusso
-- In MakeByMill eliminata doppia lavorazione smusso se contorno non passante
-- Tabella per definizione modulo
local ProcessFreeContour = {}
@@ -25,13 +29,20 @@ local ML = require( 'MachiningLib')
local Q_DIM_STRIP = 'Q01' -- d
local Q_DEPTH_CHAMFER = 'Q02' -- d
local Q_OVERMAT_FOR_FINISH = 'Q03' -- d
local Q_ONLY_CONTOUR = 'Q04' -- i, valido solo per drill
local Q_ONLY_CHAMFER = 'Q00' -- i
local Q_RADIAL_OFFSET = 'Q06' -- d, valido solo per pocket
local Q_IGNORE_LASER_PROBLEMS = 'Q07'
local Q_FORCE_CLAMPABLE_AREA = 'Q08'
local Q_INVERT_LAST_PATH = 'Q09'
local Q_MAX_ELEVATION = 'Q10' -- d
---------------------------------------------------------------------
-- Riconoscimento della feature
function ProcessFreeContour.Identify( Proc)
return ( ( Proc.Grp == 0 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 250)
end
---------------------------------------------------------------------
-- Verifica se feature di testa
function ProcessFreeContour.IsHeadFeature( Proc, b3Raw, dCurrOvmH)
@@ -93,6 +104,8 @@ end
function ProcessFreeContour.Classify( Proc, b3Raw)
-- verifico se di tipo pocket
local bPocket = ( EgtGetInfo( Proc.Id, 'PCKT', 'i') == 1)
-- verifico se forzata esecuzione anche se di testa e ribaltata o ruotata (lettura laser)
local bDownSideOnHeadOk = ( EgtGetInfo( Proc.Id, Q_IGNORE_LASER_PROBLEMS, 'd') or 0) == 1
-- recupero la curva associata
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
if not AuxId then return false end
@@ -101,23 +114,23 @@ function ProcessFreeContour.Classify( Proc, b3Raw)
-- se tasca
if bPocket then
local bDown = ( vtN:getZ() < - 0.5)
return true, bDown, false
return true, bDown, false, bDownSideOnHeadOk
-- se altrimenti profilo orizzontale
elseif abs( vtN:getZ()) < 0.5 then
return true, false, false
return true, false, false, bDownSideOnHeadOk
-- se altrimenti profilo verticale che non interessa tutta la sezione
elseif Proc.Box:getDimZ() < 0.9 * b3Raw:getDimZ() then
local bDown = ( vtN:getZ() < - 0.5)
return true, bDown, false
return true, bDown, false, bDownSideOnHeadOk
-- altrimenti è profilo verticale che interessa tutta la sezione
else
-- recupero la massima capacità di lavoro dell'utensile da utilizzare
local sMilling, dMaxDepth = ML.FindMilling( 'FreeContour')
if not sMilling then dMaxDepth = 0 end
if Proc.Box:getDimZ() > dMaxDepth and BD.ROT90 then
return true, false, true
return true, false, true, bDownSideOnHeadOk
else
return true, false, false
return true, false, false, bDownSideOnHeadOk
end
end
end
@@ -173,6 +186,8 @@ local function VerifyChamfer( Proc, AuxId, nRawId, bMakeVertCham, bDownHead)
EgtOutLog( sErr)
return -1, 0, sErr
end
else
sMilling = ''
end
return nChamfer, dDepth, sMilling
@@ -206,8 +221,8 @@ local function CalcSpecialAdd( nCrv, bStartVsEnd, dToolDiam)
-- tangenti prima e dopo il punto interno
local vtPrev = EgtUV( nCrv, nIn, -1)
local vtNext = EgtUV( nCrv, nIn, 1)
-- se c'è perdita di tangenza (delta angolare oltre i 5 gradi)
if vtPrev * vtNext < 0.996 then
-- se c'è perdita di tangenza (delta angolare oltre i 15 gradi)
if vtPrev * vtNext < 0.966 then
-- lunghezza del tratto
local ptP0 = EgtUP( nCrv, nOut)
local ptP1 = EgtUP( nCrv, nIn)
@@ -224,6 +239,7 @@ end
local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- recupero l'ingombro del grezzo di appartenenza
local b3Raw = EgtGetRawPartBBox( nRawId)
local bContourFromDrill = EgtGetInfo( Proc.Id, Q_ONLY_CONTOUR, 'i') == 1
-- ingombro del pezzo
local Ls = EgtGetFirstNameInGroup( nPartId, 'Box')
local b3Solid = EgtGetBBoxGlob( Ls or GDB_ID.NULL, GDB_BB.STANDARD)
@@ -248,7 +264,7 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- verifico se in testa o coda
local bHead = Proc.Head
-- verifico i parametri Q per profondità smusso e per eseguirlo in esclusiva
local nChamfer, dDepthCham, sChamfer = VerifyChamfer( Proc, AuxId, nRawId, true)
local nChamfer, dDepthCham, sChamfer = VerifyChamfer( Proc, AuxId, nRawId, true, nil)
-- recupero la lavorazione
local bTopHead = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.1)
local bDownHead = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.1)
@@ -290,16 +306,18 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
local bCross = false
if abs( vtExtr:getX()) < 0.707 then
if abs( vtExtr:getY()) > abs( vtExtr:getZ()) then
-- se è passante
if b3Aux:getDimY() > b3Raw:getDimY() - 1.0 then
bCross = true
dDepth = min( dDepth, b3Raw:getDimY() / abs( vtExtr:getY()))
end
if bDown then
nSide = -1
nSide = -1
else
nSide = 1
nSide = 1
end
else
-- se è passante
if b3Aux:getDimZ() > b3Raw:getDimZ() - 1.0 then
bCross = true
dDepth = min( dDepth, b3Raw:getDimZ() / abs( vtExtr:getZ()))
@@ -369,28 +387,28 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
if nChamfer > 0 and Proc.Grp ~= 0 and dOriDepth > dDepthCham and Proc.Prc ~= 70 then
local bDoubleCham = false
local dExtra = 2
local sChamferDown, sChamferUp
if nDouble > 1 and bCanDouble then
if nSide == 0 then
if BD.DOWN_HEAD then
-- recupero la lavorazione
local nChamferDown
nChamferDown, _, sChamferDown = VerifyChamfer( Proc, AuxId, nRawId, true, true)
if nChamferDown < 0 then
local sChamferDown, sChamferUp
if nDouble > 1 and bCanDouble then
if nSide == 0 then
if BD.DOWN_HEAD then
-- recupero la lavorazione
local nChamferDown
nChamferDown, _, sChamferDown = VerifyChamfer( Proc, AuxId, nRawId, true, true)
if nChamferDown < 0 then
sWarn = 'Warning : chamfer from bottom not found in library'
sChamferDown = nil
EgtOutLog( sWarn)
end
end
local nChamferUp
nChamferUp, _, sChamferUp = VerifyChamfer( Proc, AuxId, nRawId, true, false)
if nChamferUp < 0 then
sWarn = 'Warning : chamfer from bottom not found in library'
sChamferDown = nil
sChamferUp = nil
EgtOutLog( sWarn)
end
end
local nChamferUp
nChamferUp, _, sChamferUp = VerifyChamfer( Proc, AuxId, nRawId, true, false)
if nChamferUp < 0 then
sWarn = 'Warning : chamfer from bottom not found in library'
sChamferUp = nil
EgtOutLog( sWarn)
end
end
end
-- eseguo
for i = 1, nStep do
-- inserisco la lavorazione
@@ -435,9 +453,9 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
end
if nSide == 0 then
bDoubleCham = EgtIf( sChamferDown and BD.DOWN_HEAD, true, false)
bDoubleCham = EgtIf( sChamferDown and BD.DOWN_HEAD, true, false) and bCanDouble
else
bDoubleCham = true
bDoubleCham = bCanDouble
end
-- assegno affondamento e offset radiale
EgtSetMachiningParam( MCH_MP.DEPTH, dDepthCham + dExtra)
@@ -458,7 +476,9 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
-- posizione braccio porta testa
local nSCC = MCH_SCC.NONE
if not BD.C_SIMM then
if BD.TURN == 2 then
nSCC = MCH_SCC.ADIR_ZP
elseif not BD.C_SIMM then
if Proc.Head then
nSCC = MCH_SCC.ADIR_XP
elseif Proc.Tail then
@@ -526,7 +546,9 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
-- posizione braccio porta testa
local nSCC = MCH_SCC.NONE
if not BD.C_SIMM then
if BD.TURN == 2 then
nSCC = MCH_SCC.ADIR_ZP
elseif not BD.C_SIMM then
if Proc.Head then
nSCC = MCH_SCC.ADIR_XP
elseif Proc.Tail then
@@ -576,6 +598,8 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
end
end
-- eventuale inversione ultimo segmento
local bInvertLastPath = ( ( EgtGetInfo( Proc.Id, Q_INVERT_LAST_PATH, 'd') or 0) == 1)
-- eseguo
for i = 1, nStep do
for j = 1, nDouble do
@@ -612,44 +636,95 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
EgtOutLog( sErr)
return false, sErr
end
-- eventuale elevazione forzata
local dCustomMaxElev = EgtGetInfo( Proc.Id, Q_MAX_ELEVATION, 'd')
if dCustomMaxElev and dCustomMaxElev < 1 then dCustomMaxElev = nil end
if dCustomMaxElev then
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dCustomMaxElev, 1))
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
end
-- assegno affondamento
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- eventuale accorciamento di testa
local dStartAddLen, dEndAddLen, dWorkSide, bToolInvert, bInvert
if ( j == 1 and i > 1) or ( j == 2 and i < nStep) then
local dStartAddLen = EgtIf( j == 1, - ( i - 1) * dStep, - ( nStep - i) * dStep)
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dStartAddLen)
dStartAddLen = EgtIf( j == 1, - ( i - 1) * dStep, - ( nStep - i) * dStep)
else
EgtSetMachiningParam( MCH_MP.STARTADDLEN, EgtIf( j == 1, dStartAddSpec, dEndAddSpec))
dStartAddLen = EgtIf( j == 1, dStartAddSpec, dEndAddSpec)
end
-- eventuale accorciamento di coda
if ( j == 1 and i < nStep) or ( j == 2 and i > 1) then
local dEndAddLen = EgtIf( j == 1, - ( nStep - i) * dStep, - ( i - 1) * dStep)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEndAddLen)
dEndAddLen = EgtIf( j == 1, - ( nStep - i) * dStep, - ( i - 1) * dStep)
else
EgtSetMachiningParam( MCH_MP.ENDADDLEN, EgtIf( j == 1, dEndAddSpec, dStartAddSpec))
dEndAddLen = EgtIf( j == 1, dEndAddSpec, dStartAddSpec)
end
-- se estrusione da sotto, inverto direzione fresa
if ( j == 1 and bToolInv) or ( j == 2 and not bToolInv) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
bToolInvert = true
else
bToolInvert = false
end
-- se seconda passata, inverto direzione di lavoro
if j == 2 then
EgtSetMachiningParam( MCH_MP.INVERT, true)
bInvert = true
else
bInvert = false
end
-- assegno lato di lavoro
if Proc.Grp == 0 then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.CENTER)
if bContourFromDrill then
dWorkSide = MCH_MILL_WS.LEFT
elseif Proc.Grp == 0 then
dWorkSide = MCH_MILL_WS.CENTER
elseif ( Proc.Grp == 3 and not bToolInv) or ( Proc.Grp == 4 and bToolInv) or ( Proc.Grp == 1 and bToolInv) or ( Proc.Grp == 2 and bToolInv) then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
dWorkSide = MCH_MILL_WS.LEFT
elseif ( Proc.Grp == 3 and bToolInv) or ( Proc.Grp == 4 and not bToolInv) or ( Proc.Grp == 1 and not bToolInv) or ( Proc.Grp == 2 and not bToolInv) then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
dWorkSide = MCH_MILL_WS.RIGHT
end
-- se ultimo step da invertire
if i == nStep and bInvertLastPath then
-- se profilo orizzontale
if abs( vtExtr:getZ()) < 10 * GEO.EPS_SMALL then
dStartAddLen, dEndAddLen = dEndAddLen, dStartAddLen
bInvert = not( bInvert)
bToolInvert = not( bToolInvert)
else
dStartAddLen, dEndAddLen = dEndAddLen, dStartAddLen
bInvert = not( bInvert)
if dWorkSide == MCH_MILL_WS.LEFT then
dWorkSide = MCH_MILL_WS.RIGHT
elseif dWorkSide == MCH_MILL_WS.RIGHT then
dWorkSide = MCH_MILL_WS.LEFT
end
end
end
-- setto i valori
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dStartAddLen)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEndAddLen)
EgtSetMachiningParam( MCH_MP.TOOLINVERT, bToolInvert)
EgtSetMachiningParam( MCH_MP.INVERT, bInvert)
EgtSetMachiningParam( MCH_MP.WORKSIDE, dWorkSide)
-- setto valori specifici se lavorazione nel pieno del solo contorno di un foro
if bContourFromDrill then
local dWorkStep = max( ( EgtGetMachiningParam( MCH_MP.STEP) or 0) * 0.75, dToolDiam)
EgtSetMachiningParam( MCH_MP.STEP, dWorkStep)
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.GLIDE)
EgtSetMachiningParam( MCH_MP.LIELEV, dWorkStep)
EgtSetMachiningParam( MCH_MP.LITANG, dWorkStep)
end
-- posizione braccio porta testa
local nSCC = MCH_SCC.NONE
if not BD.C_SIMM then
if BD.TURN == 2 then
nSCC = MCH_SCC.ADIR_ZP
elseif not BD.C_SIMM then
if Proc.Head then
nSCC = MCH_SCC.ADIR_XP
elseif Proc.Tail then
@@ -704,7 +779,14 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
-- eventuale segnalazione ingombro di testa o coda
local dMinHIng = min( 0.5 * BD.VICE_MINH, 0.5 * b3Raw:getDimZ())
if Proc.Box:getDimZ() > 0.75 * b3Raw:getDimZ() and Proc.Box:getMin():getZ() < b3Raw:getMin():getZ() + dMinHIng then
local dMinZ = max( BD.MIN_HEIGHT, 0.35 * b3Raw:getDimZ())
local bRawPartHas90Rotation = ( ( EgtGetInfo( nRawId, 'ROTATE90', 'd') or 0) == 1)
-- eventuale forzatura area feature pinzabile
local bForceClampableArea = ( ( EgtGetInfo( Proc.Id, Q_FORCE_CLAMPABLE_AREA, 'd') or 0) == 1)
-- se la feature è passante top/down oppure se è passante e si ruota di 90deg considero sempre non pinzabile; in alternativa si valuta in base all'ingombro
if not bForceClampableArea and ( ( Proc.Box:getDimZ() > 0.75 * b3Raw:getDimZ() and Proc.Box:getMin():getZ() < b3Raw:getMin():getZ() + dMinZ) or
( Proc.AffectedFaces.Top and Proc.AffectedFaces.Bottom and ( AreSameOrOppositeVectorApprox( vtExtr, Z_AX()))) or
( Proc.AffectedFaces.Front and Proc.AffectedFaces.Back and bRawPartHas90Rotation)) then
if Proc.Head then
local dOffs = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
BL.UpdateHCING( nRawId, dOffs)
@@ -713,6 +795,7 @@ local function MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
BL.UpdateTCING( nRawId, dOffs)
end
end
return true, sWarn
end
@@ -729,8 +812,74 @@ local function MakeByPocket( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- recupero i dati della curva e del profilo
local dDepth = abs( EgtCurveThickness( AuxId))
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
--local bToolInv = ( vtExtr:getZ() < -0.1)
-- recupero la lavorazione
local bDownHead = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.1)
local bToolInv = ( not bDownHead and vtExtr:getZ() < -0.1 and b3Aux:getDimZ() > b3Raw:getDimZ() - 5)
local dExtra = 2
-- verifico se servono gli smussi. Se lavorazione principale di svuotatura significa che è solo da un lato
-- generalmente sono lavorazioni non molto lunghe, quindi non si gestistono gli step
-- verifico i parametri Q per profondità smusso e per eseguirlo in esclusiva
local nChamfer, dDepthCham, sChamfer = VerifyChamfer( Proc, AuxId, nRawId, true)
-- se devo inserire il chamfer
if nChamfer > 0 and Proc.Grp ~= 0 and dDepth > dDepthCham and Proc.Prc ~= 70 then
-- inserisco la lavorazione
local sNameCh = 'Cham_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchId = EgtAddMachining( sNameCh, sChamfer)
if not nMchId then
local sErr = 'Error adding machining ' .. sNameCh .. '-' .. sChamfer
EgtOutLog( sErr)
return false, sErr
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- se lavorazione da sopra o da sotto
if Proc.Grp == 3 then
if not bToolInv then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
EgtSetMachiningParam( MCH_MP.INVERT, true)
else
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
EgtSetMachiningParam( MCH_MP.INVERT, true)
end
end
if Proc.Grp == 4 then
if not bToolInv then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
EgtSetMachiningParam( MCH_MP.INVERT, true)
else
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
end
end
-- assegno affondamento e offset radiale
EgtSetMachiningParam( MCH_MP.DEPTH, dDepthCham + dExtra)
EgtSetMachiningParam( MCH_MP.OFFSR, dExtra)
-- posizione braccio porta testa
local nSCC = MCH_SCC.NONE
if BD.TURN == 2 then
nSCC = MCH_SCC.ADIR_ZP
elseif not BD.C_SIMM then
if Proc.Head then
nSCC = MCH_SCC.ADIR_XP
elseif Proc.Tail then
nSCC = MCH_SCC.ADIR_XM
elseif AreSameOrOppositeVectorApprox( vtExtr, Z_AX()) then
nSCC = MCH_SCC.ADIR_YP
elseif vtExtr:getY() > -0.01 then
nSCC = MCH_SCC.ADIR_YP
else
nSCC = MCH_SCC.ADIR_YM
end
end
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
return false, sErr
end
end
-- recupero la lavorazione di svuotatura
local sPocketing = ML.FindPocketing( 'Pocket', nil, dDepth)
if not sPocketing then
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' pocketing not found in library'
@@ -771,7 +920,14 @@ local function MakeByPocket( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
-- imposto elevazione
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dMaxDepth, 1) .. ';')
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxDepth, 1))
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- imposto eventuale offset radiale, se impostato dall'utente
local dRadialOffset = EgtGetInfo( Proc.Id, Q_RADIAL_OFFSET, 'd') or 0
if abs( dRadialOffset) > 10 * GEO.EPS_SMALL then
EgtSetMachiningParam( MCH_MP.OFFSR, -dRadialOffset)
end
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
@@ -782,7 +938,9 @@ local function MakeByPocket( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
---------------------------------------------------------------------
local function MakeByMark( Proc, nRawId, b3Raw, nPartId)
local function MakeByMark( Proc, nRawId, nPartId)
-- ingombro del grezzo
local b3Raw = EgtGetRawPartBBox( nRawId)
-- ingombro del pezzo
local Ls = EgtGetFirstNameInGroup( nPartId, 'Box')
local b3Solid = EgtGetBBoxGlob( Ls or GDB_ID.NULL, GDB_BB.STANDARD)
@@ -802,6 +960,7 @@ local function MakeByMark( Proc, nRawId, b3Raw, nPartId)
-- recupero i dati della curva e del profilo
local dDepth = abs( EgtCurveThickness( AuxId))
local vtExtr = EgtCurveExtrusion( AuxId, GDB_RT.GLOB)
local b3Aux = EgtGetBBoxGlob( AuxId, GDB_BB.STANDARD)
local bToolInv = ( vtExtr:getZ() < -0.1 and b3Aux:getDimZ() > b3Raw:getDimZ() - 5)
-- verifico che la marcatura non sia orientata verso il basso (-5 deg)
if vtExtr:getZ() < - 0.1 and not BD.DOWN_HEAD and not BD.TURN then
@@ -859,6 +1018,10 @@ function ProcessFreeContour.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
Q_DEPTH_CHAMFER = 'Q01'
Q_DIM_STRIP = 'Q02'
end
if Proc.Prc == 40 then
Q_DIM_STRIP = ''
Q_OVERMAT_FOR_FINISH = ''
end
-- recupero la tipologia
local bPocket = ( EgtGetInfo( Proc.Id, 'PCKT', 'i') == 1)
-- se svuotatura
@@ -870,7 +1033,7 @@ function ProcessFreeContour.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
local nCntType = EgtGetInfo( Proc.Id, 'CNT_TYPE', 'i') or 0
-- se marcatura
if nCntType == 10 then
return MakeByMark( Proc, nRawId, b3Raw, nPartId)
return MakeByMark( Proc, nRawId, nPartId)
-- se fresatura
else
return MakeByMill( Proc, nPhase, nRawId, nPartId, dOvmHead)
+413 -84
View File
@@ -6,6 +6,11 @@
-- 2022/09/08 Migliorato verso di lavorazione in caso di DoubleCut
-- 2022/11/02 Corretti accorciamenti per DoubleCut
-- 2022/11/10 Corrette finiture lama per BigSection con trave alta
-- 2023/04/20 Per travi alte aggiunti tagli orizzontali per ridurre le dimensioni degli scarti
-- 2023/08/02 Corretto calcolo allungamenti/accorciamenti pezzi alti per contemplare anche taglio singolo
-- 2023/10/17 Corretto calcolo allungamenti/accorciamenti per evitare lunghezze del percorso negative
-- 2024/01/18 Gestiti tagli verticali aggiuntivi per travi larghe.
-- 2024/01/22 Nei tagli verticali aggiuntivi si usa ora BD.MAX_LEN_DICE come dimensione (era BD.MAX_DIM_DICE).
-- Tabella per definizione modulo
local ProcessHeadCut = {}
@@ -16,6 +21,8 @@ local BL = require( 'BeamLib')
local Fbs = require( 'FacesBySaw')
local Cut = require( 'ProcessCut')
local Pocket = require( 'FaceByPocket')
local Topology = require( 'FeatureTopology')
local Split = require( 'ProcessSplit')
EgtOutLog( ' ProcessHeadCut started', 1)
@@ -23,6 +30,10 @@ EgtOutLog( ' ProcessHeadCut started', 1)
local BD = require( 'BeamData')
local ML = require( 'MachiningLib')
if BD.PRECUT_HEAD == nil then
BD.PRECUT_HEAD = true
end
---------------------------------------------------------------------
-- Riconoscimento della feature
function ProcessHeadCut.Identify( Proc)
@@ -119,7 +130,7 @@ local function MakeChamfer( nOriId, Proc, nPhase, nRawId, nPartId, dOvmHead)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
EgtSetOperationMode( nMch1Id, false)
return false, sErr
end
-- Inserisco la lavorazione del lato opposto
@@ -142,12 +153,310 @@ local function MakeChamfer( nOriId, Proc, nPhase, nRawId, nPartId, dOvmHead)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
EgtSetOperationMode( nMch1Id, false)
return false, sErr
end
return true, nil
end
---------------------------------------------------------------------
-- smussi in testa
local function MakeHeadChamfer( idProc, nPartId)
local dDepthHeadChamfer = EgtGetInfo( idProc, 'Q08', 'd') or 0
-- se non attivo esco subito
if dDepthHeadChamfer < 100 * GEO.EPS_SMALL then
return
end
-- recupero gruppo per geometria aggiuntiva
local AddGrpId = BL.GetAddGroup( nPartId)
if not AddGrpId then
local sErr = 'Error on process StartFace impossible to find AddGroup'
EgtOutLog( sErr)
return false, sErr
end
-- recupero la lavorazione
local sMilling = ML.FindMilling( 'Mark')
if not sMilling then
local sErr = 'Error : milling not found in library'
EgtOutLog( sErr)
return false, sErr
end
local nLoopId, nLoopCnt = EgtExtractSurfTmFacetLoops( idProc, 0, AddGrpId)
if not nLoopId or nLoopCnt > 1 then
local sErr = 'Error MakeHeadChamfer : too many loops'
EgtOutLog( sErr)
return false, sErr
end
-- setto direzione estrusione corretta
EgtModifyCurveExtrusion( nLoopId, X_AX())
EgtSetGridFrame( Frame3d( 0,0,0, GDB_FR.RIGHT))
local dQ09Value = EgtGetInfo( idProc, 'Q09', 'd')
if not dQ09Value then
dQ09Value = 0.1
end
local bChamferedEdge = dQ09Value > 0
dQ09Value = EgtIf( bChamferedEdge, max( dQ09Value, 0.1), min( dQ09Value, -0.1))
local nIdFirstEntity, nEntityCnt = EgtExplodeCurveCompo( nLoopId)
local p3MidPoint = EgtMP( nIdFirstEntity, GDB_ID.GRID)
for i = 0, nEntityCnt - 1 do
if EgtCurveLength( nIdFirstEntity + i) - 10 < abs( dQ09Value) * 2 then
local sErr = 'Error MakeHeadChamfer : Q09 too high'
EgtOutLog( sErr)
return false, sErr
end
end
-- creo raccordo o fillet
for i = 0, nEntityCnt - 1 do
local idFirst = nIdFirstEntity + i
local idSecond = EgtIf( i == nEntityCnt - 1, nIdFirstEntity, idFirst + 1)
local ptEndPointFirst = EgtEP( idFirst, GDB_ID.GRID) - ( abs( dQ09Value) * EgtEV( idFirst, GDB_ID.GRID))
local ptStartPointSecond = EgtSP( idSecond, GDB_ID.GRID) + ( abs( dQ09Value) * EgtEV( idSecond, GDB_ID.GRID))
if bChamferedEdge then
EgtCurveChamfer( AddGrpId, idFirst, ptEndPointFirst, idSecond, ptStartPointSecond, abs( dQ09Value), true, GDB_RT.GRID)
else
EgtCurveFillet( AddGrpId, idFirst, ptEndPointFirst, idSecond, ptStartPointSecond, abs( dQ09Value), true, GDB_RT.GRID)
end
end
EgtSelectPathObjs( nIdFirstEntity, true)
local idGeom, idGeomCnt = EgtCurveCompoByChain( AddGrpId, GDB_ID.SEL, {0,0,0}, true)
if not idGeom or idGeomCnt > 1 then
local sErr = 'Error MakeHeadChamfer : too many loops'
EgtOutLog( sErr)
return false, sErr
end
EgtChangeClosedCurveStartPoint( idGeom, p3MidPoint, GDB_RT.GRID)
-- reimposto la griglia
EgtSetGridFrame()
-- Inserisco la lavorazione del lato standard
local dExtra = 2
local sName1 = 'HeadCham_' .. ( EgtGetName( idProc) or tostring( idProc))
local nMch1Id = EgtAddMachining( sName1, sMilling)
if not nMch1Id then
local sErr = 'Error adding machining ' .. sName1 .. '-' .. sMilling
EgtOutLog( sErr)
return false, sErr
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ idGeom, -1}})
-- assegno affondamento e offset radiale
EgtSetMachiningParam( MCH_MP.DEPTH, dDepthHeadChamfer + dExtra)
EgtSetMachiningParam( MCH_MP.OFFSR, dExtra)
-- assegno lato di lavoro
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMch1Id, false)
return false, sErr
end
return true, nil
end
---------------------------------------------------------------------
-- tagli verticali aggiuntivi
local function AddVerticalPreCuts( Proc, sCutting, dCutXOffset, b3Raw, dOffsetBetweenCuts)
local nVerticalCuts = ceil( Proc.Face[1].WidthTrimmed / ( BD.MAX_LEN_DICE)) - 1
local dVerticalSliceHeight = Proc.Face[1].WidthTrimmed / ( nVerticalCuts + 1)
-- recupero il diametro dell'utensile
local dSawDiam = 400
if EgtMdbSetCurrMachining( sCutting) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dSawDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam
end
end
local bOk, sErr
-- tagli orizzontali
for j = nVerticalCuts, 1, -1 do
local nFaceUse = MCH_MILL_FU.PARAL_FRONT
local dVerticalCutOffset = dVerticalSliceHeight * -j
local sLeadInOutType = 'PerpendicularOutraw'
bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nFaceUse, nil, -0.1 -dCutXOffset, BD.CUT_SIC, dVerticalCutOffset, 0, 0, '', b3Raw, nil, nil, nil, sLeadInOutType, nil, dOffsetBetweenCuts)
if not bOk then return bOk, sErr end
end
return bOk, sErr
end
---------------------------------------------------------------------
-- tagli standard
local function MakeStandardCuts( Proc, b3Raw, nCuts, dOffsetBetweenCuts, HeadCutType, Cutting1Data, Cutting2Data, dStartOffset, dOvmHead)
local PrecutType = { bBigSectionCut = HeadCutType.bBigSectionCut, bHorizCut = HeadCutType.bHorizCut, bDoubleHorizCut = HeadCutType.bDoubleHorizCut, bDoubleCut = HeadCutType.bDoubleCut, sType = 'Precut', bNeedVerticalAddedCuts = false, bNeedHorizontalAddedCuts = false}
if not HeadCutType.bDoubleHorizCut then
-- flag di lavorazione faccia
local nOrthoOpposite = EgtIf( HeadCutType.bHorizCut, MCH_MILL_FU.ORTHO_DOWN, MCH_MILL_FU.ORTHO_FRONT)
-- calcolo extra taglio ed accorciamento
local dCutExtra = 0
local dAccStart = 0
local dAccEnd = 0
if b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL or b3Raw:getDimY() < 2 * BD.MAX_DIM_HTCUT_HBEAM + 10 * GEO.EPS_SMALL then
dCutExtra = EgtIf( HeadCutType.bDoubleCut, - 0.5 * b3Raw:getDimY() + BD.CUT_EXTRA_MIN, BD.CUT_EXTRA)
else
dCutExtra = - ( b3Raw:getDimY() - Cutting1Data.dMaxDepth)
local dSawRad = Cutting1Data.dSawDiam / 2
-- distanza in Y tra il centro della lama e l'intersezione tra la lama stessa e la massima Z della trave, + extra
-- se taglio doppio l'intersezione sarà in mezzeria, se taglio singolo sarà all'estremo opposto della trave
local dKL = dSawRad - Cutting1Data.dMaxDepth + EgtIf( HeadCutType.bDoubleCut, b3Raw:getDimY() / 2 + BD.CUT_EXTRA_MIN, b3Raw:getDimY() + BD.CUT_EXTRA)
-- lunghezza minima del percorso di lavorazione, in caso accorciamento porti a lunghezza negativa
local dMinSawingLength = 5
if BD.C_SIMM then
dAccEnd = sqrt( max( dSawRad * dSawRad - dKL * dKL, 0))
-- non posso comunque accorciare più della dimensione della geometria, quindi in caso allungo entrata
if dAccEnd > b3Raw:getDimZ() - 100 * GEO.EPS_SMALL then
dAccStart = b3Raw:getDimZ() - dAccEnd - dMinSawingLength
end
else
dAccStart = sqrt( max( dSawRad * dSawRad - dKL * dKL, 0))
-- non posso comunque accorciare più della dimensione della geometria, quindi in caso allungo uscita
if dAccStart > b3Raw:getDimZ() - 100 * GEO.EPS_SMALL then
dAccEnd = b3Raw:getDimZ() - dAccStart - dMinSawingLength
end
end
end
-- per travi alte faccio dei tagli orizzontali aggiuntivi
if HeadCutType.bNeedHorizontalAddedCuts then
-- taglio a zero (con lama) per evitare problemi con grezzo più lungo del previsto. Se BigSection il pretaglio è già stato fatto.
if not ( HeadCutType.bBigSectionCut) and BD.PRECUT_HEAD then
dStartOffset = dOvmHead
local bOkPrecut, sErrPrecut = MakeStandardCuts( Proc, b3Raw, 1, 0, PrecutType, Cutting1Data, Cutting2Data, dStartOffset)
if not bOkPrecut then
return false, sErrPrecut
end
end
local nHorizontalCuts = ceil( Proc.Face[1].HeightTrimmed / BD.MAX_DIM_DICE) - 1
local dHorizontalSliceHeight = Proc.Face[1].HeightTrimmed / ( nHorizontalCuts + 1)
for i = nCuts, 1, -1 do
local dCutXOffset = ( i - 1) * dOffsetBetweenCuts
-- tagli orizzontali
for j = nHorizontalCuts, 1, -1 do
local nFaceUse = MCH_MILL_FU.PARAL_DOWN
local dHorizontalCutOffset = dHorizontalSliceHeight * -j
local sLeadInOutType = 'PerpendicularOutraw'
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, Cutting1Data.sCutting, Cutting1Data.dSawDiam, nFaceUse, nil, -0.1 -dCutXOffset, BD.CUT_SIC, dHorizontalCutOffset, 0, 0, '', b3Raw, nil, nil, nil, sLeadInOutType, nil, dOffsetBetweenCuts)
if not bOk then return bOk, sErr end
end
-- se necessario taglio verticale doppio, eseguo l'opposto
if HeadCutType.bDoubleCut then
-- gli accorciamenti vanno invertiti per il taglio opposto
local dAccStartDoubleCut, dAccEndDoubleCut = dAccEnd, dAccStart
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, Cutting1Data.sCutting, Cutting1Data.dSawDiam, MCH_MILL_FU.ORTHO_BACK, nil, dCutExtra, BD.CUT_SIC, dCutXOffset, dAccStartDoubleCut, dAccEndDoubleCut, '', b3Raw, true)
if not bOk then return false, sErr end
end
-- taglio verticale
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, Cutting1Data.sCutting, Cutting1Data.dSawDiam, nOrthoOpposite, nil, dCutExtra, BD.CUT_SIC, dCutXOffset, dAccStart, dAccEnd, '', b3Raw, true)
if not bOk then return bOk, sErr end
end
return true, sWarn
end
-- taglio a zero (con lama) per evitare problemi con grezzo più lungo del previsto. Se BigSection il pretaglio è già stato fatto.
if not ( HeadCutType.bBigSectionCut) and BD.PRECUT_HEAD and HeadCutType.bNeedVerticalAddedCuts then
dStartOffset = dOvmHead
local bOkPrecut, sErrPrecut = MakeStandardCuts( Proc, b3Raw, 1, 0, PrecutType, Cutting1Data, Cutting2Data, dStartOffset)
if not bOkPrecut then
return false, sErrPrecut
end
end
-- se necessari tagli in doppio, eseguo gli opposti
if HeadCutType.bDoubleCut then
-- gli accorciamenti vanno invertiti per il taglio opposto
local dAccStartDoubleCut, dAccEndDoubleCut = dAccEnd, dAccStart
for i = nCuts, 1, -1 do
local dCutOffset = ( i - 1) * dOffsetBetweenCuts
if i == 1 and HeadCutType.sType =='Precut' then
dCutOffset = dStartOffset
end
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, Cutting1Data.sCutting, Cutting1Data.dSawDiam, MCH_MILL_FU.ORTHO_BACK, nil, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStartDoubleCut, dAccEndDoubleCut, '', b3Raw, true)
if not bOk then return false, sErr end
end
end
-- eseguo i tagli necessari
for i = nCuts, 1, -1 do
local dCutOffset = ( i - 1) * dOffsetBetweenCuts
-- se trave larga effettuo tagli verticali aggiuntivi
if HeadCutType.bNeedVerticalAddedCuts then
local bOk, sErr = AddVerticalPreCuts( Proc, Cutting1Data.sCutting, dCutOffset, b3Raw, dOffsetBetweenCuts)
if not bOk then return bOk, sErr end
end
if i == 1 and HeadCutType.sType =='Precut' then
dCutOffset = dStartOffset
end
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, Cutting1Data.sCutting, Cutting1Data.dSawDiam, nOrthoOpposite, nil, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStart, dAccEnd, '', b3Raw, true)
if not bOk then return false, sErr end
end
-- altrimenti necessari tagli da sopra e sotto con testa opportuna
else
-- verifico esistenza della lavorazione con lama da sotto
if not Cutting2Data.sCutting then
local sErr = 'Error : cutting H2 not found in library'
EgtOutLog( sErr)
return false, sErr
end
-- verifico che le due lame riescano a lavorare la sezione
local dDimZ = b3Raw:getDimZ()
local dExtra = Cutting1Data.dMaxVertDepth + Cutting2Data.dMaxDepth - dDimZ
if ( dExtra - 2 * BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL < 0) and not HeadCutType.bBigSectionCut then
local sErr = 'Error : section too big for head cut'
EgtOutLog( sErr)
return false, sErr
end
-- calcolo extra taglio ed accorciamento
local dCutExtra = -Cutting2Data.dMaxDepth + dExtra / 2 + BD.CUT_EXTRA_MIN
local dCutExtra2 = -Cutting1Data.dMaxVertDepth + dExtra / 2 + BD.CUT_EXTRA_MIN
local dAccStart = 0
local dVzLimDwnUp
if BD.TURN then dVzLimDwnUp = -2 end
-- taglio a zero (con lama) per evitare problemi con grezzo più lungo del previsto. Se BigSection il pretaglio è già stato fatto.
if not ( HeadCutType.bBigSectionCut) and BD.PRECUT_HEAD and HeadCutType.bNeedVerticalAddedCuts then
dStartOffset = dOvmHead
local bOkPrecut, sErrPrecut = MakeStandardCuts( Proc, b3Raw, 1, 0, PrecutType, Cutting1Data, Cutting2Data, dStartOffset)
if not bOkPrecut then
return false, sErrPrecut
end
end
-- eseguo i tagli da sotto necessari
for i = nCuts, 1, -1 do
local dCutOffset = ( i - 1) * dOffsetBetweenCuts
if i == 1 and HeadCutType.sType =='Precut' then
dCutOffset = dStartOffset
end
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, Cutting2Data.sCutting, Cutting2Data.dSawDiam, MCH_MILL_FU.ORTHO_TOP, dVzLimDwnUp, dCutExtra2, BD.CUT_SIC, dCutOffset, dAccStart, 0, '', b3Raw, nil, true)
if not bOk then return false, sErr end
end
-- eseguo i tagli da sopra necessari
for i = nCuts, 1, -1 do
local dCutOffset = ( i - 1) * dOffsetBetweenCuts
if i == 1 and HeadCutType.sType =='Precut' then
dCutOffset = dStartOffset
end
-- se trave larga effettuo tagli verticali aggiuntivi
if HeadCutType.bNeedVerticalAddedCuts then
local bOk, sErr = AddVerticalPreCuts( Proc, Cutting1Data.sCutting, dCutOffset, b3Raw, dOffsetBetweenCuts)
if not bOk then return bOk, sErr end
end
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, Cutting1Data.sCutting, Cutting1Data.dSawDiam, MCH_MILL_FU.ORTHO_DOWN, dVzLimDwnUp, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStart, 0, '', b3Raw)
if not bOk then return false, sErr end
end
end
return true
end
---------------------------------------------------------------------
-- Applicazione della lavorazione
function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut)
@@ -159,8 +468,18 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
local bOkc, sErrC = MakeChamfer( nOriId, Proc, nPhase, nRawId, nPartId, dOvmHead)
if not bOkc then return bOkc, sErrC end
end
-- eventuali informazioni sul tipo di finitura
local nQ05 = EgtGetInfo( nOriId or GDB_ID.NULL, 'Q05', 'i') or 0
-- recupero la lavorazione
local sCutting = ML.FindCutting( 'HeadSide')
-- TODO questa parte andrà cambiata quando si gestiranno i volumi liberi in cui girare da mlse
local dMinWidthForBigBlade = 300
local dMaxHeightForBigBlade = 300
local sCutting
if b3Raw:getDimY() > dMinWidthForBigBlade and b3Raw:getDimZ() < dMaxHeightForBigBlade then
sCutting = ML.FindCutting( 'HeadSide', nil, nil, nil, 'Longest')
else
sCutting = ML.FindCutting( 'HeadSide')
end
if not sCutting then
local sErr = 'Error : cutting not found in library'
EgtOutLog( sErr)
@@ -190,31 +509,42 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid2) or '') then
dSawDiam2 = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam2
dMaxDepth2 = EgtTdbGetCurrToolMaxDepth() or dMaxDepth2
dSawThick2 = EgtTdbGetCurrToolParam(MCH_TP.THICK) or dSawThick2
dSawThick2 = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dSawThick2
end
end
-- determino se lo spessore del materiale da rimuovere è eccessivo e quindi vanno fatti più tagli con offset
local nCuts = max( ceil( dOvmHead / (( BD.MAX_LEN_SCRAP_START or BD.MAX_LEN_SCRAP) + 0.5)), 1)
local dOffsL = dOvmHead / nCuts
-- caratteristiche taglio
local dDimYRef = EgtIf( b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dMaxDepth, abs( BD.MAX_DIM_HTCUT_HBEAM))
local bBigSectionCut = ( b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) and
( b3Raw:getDimZ() > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dMaxDepth2) - 2 * BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
( b3Raw:getDimZ() > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dMaxDepth2) - 2 * BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
local bHorizCut = ( ( b3Raw:getDimY() > b3Raw:getDimZ() + 10 * GEO.EPS_SMALL or BD.TURN) and b3Raw:getDimZ() < dMaxVertDepth - BD.CUT_EXTRA)
local bDoubleHorizCut = ( ( BD.DOWN_HEAD or BD.TURN) and not bHorizCut and b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
local bDoubleCut = ( not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
local bDoubleCut = ( not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL) and
( b3Raw:getDimY() < 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
-- verifico necessità di tagli aggiuntivi orizzontali o verticali
local dMinOvmHeadForAddeddCuts = 10.123
local bNeedVerticalAddedCuts = ( Proc.Face[1].WidthTrimmed > BD.MAX_LEN_DICE) and ( dOvmHead > dMinOvmHeadForAddeddCuts - 10 * GEO.EPS_SMALL)
local bNeedHorizontalAddedCuts = ( Proc.Face[1].HeightTrimmed > ( BD.MIN_HEIGHT_ADDED_CUTS or BD.MAX_LEN_DICE)) and
not bBigSectionCut and ( dOvmHead > dMinOvmHeadForAddeddCuts - 10 * GEO.EPS_SMALL) and
dOffsL < BD.MAX_DIM_DICE
-- dati lavorazioni sopra e sotto
local Cutting1Data = { sCutting = sCutting, dSawDiam = dSawDiam, dMaxDepth = dMaxDepth, dSawThick = dSawThick, dMaxVertDepth = dMaxVertDepth}
local Cutting2Data = { sCutting = sCutting2, dSawDiam = dSawDiam2, dMaxDepth = dMaxDepth2, dSawThick = dSawThick2}
-- dati sul taglio di testa da effettuare
local HeadCutType = { bBigSectionCut = bBigSectionCut, bHorizCut = bHorizCut, bDoubleHorizCut = bDoubleHorizCut, bDoubleCut = bDoubleCut, bNeedVerticalAddedCuts = bNeedVerticalAddedCuts, bNeedHorizontalAddedCuts = bNeedHorizontalAddedCuts}
-- dati geometrici del taglio
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
-- se non obbligatorio e coincide con inizio grezzo, non va fatto
if not bNeedHCut and AreSameVectorApprox( vtN, X_AX()) and abs( ptC:getX() - b3Raw:getMax():getX()) < 10 * GEO.EPS_SMALL then
return true
end
-- determino se più tagli con offset
local nCuts = max( ceil( dOvmHead / ( BD.MAX_LEN_SCRAP_START or BD.MAX_LEN_SCRAP)), 1)
local dOffsL = dOvmHead / nCuts
end
-- se taglio per sezioni alte e larghe
if bBigSectionCut then
if dOvmHead > 0 then
local nQ05 = EgtGetInfo( nOriId or GDB_ID.NULL, 'Q05', 'i') or 0
-- se finitura con lama
if nQ05 == 1 or nQ05 == 0 then
if nQ05 < 2 then
local dSawThickCheck = dSawThick
if dSawThick2 > 0 and bDoubleHorizCut then
dSawThickCheck = min( dSawThick, dSawThick2)
@@ -225,9 +555,66 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
else
dMaxElev = Proc.Box:getMax():getX() - b3Raw:getMin():getX()
end
-- taglio a zero (con sega a catena o mix catena + lama) per evitare problemi con grezzo più lungo del previsto
if BD.PRECUT_HEAD then
-- recupero dati utensile della sega a catena più lunga a disposizione
local sSawing = ML.FindSawing( 'SawingForSplitting', nil, nil, 'Longest')
if not sSawing then
sSawing = ML.FindSawing( 'Sawing', nil, nil, 'Longest')
end
local dChainSawMaxMat = 0
local dChainSawLen = 0
if EgtMdbSetCurrMachining( sSawing or '') then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dChainSawMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dChainSawMaxMat
dChainSawLen = EgtTdbGetCurrToolParam( MCH_TP.LEN) or dChainSawLen
end
end
local SawingData = { sSawing = sSawing, dChainSawMaxMat = dChainSawMaxMat, dChainSawLen = dChainSawLen, bInvert = true}
local dOffset = dOvmHead
local bOkPrecut, sErrPrecut = Split.MakeBigSectionSplitting( Proc, b3Raw, dOffset, SawingData, Cutting2Data)
if not bOkPrecut then
return false, sErrPrecut
end
end
-- controllo se è necessario un taglio con dicing o si deve proseguire ai casi standard
if dMaxElev > dSawThickCheck then
local bOk, sErr = Cut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, nil, false, true, nil, nil, dCurrOvmT)
local bOk, sErr
-- se trave larga effettuo tagli verticali aggiuntivi
if bNeedVerticalAddedCuts then
-- ad ogni offset di taglio dovrò fare prima i tagli verticali e poi i cubetti
for i = nCuts, 1, -1 do
local nAddGrpId = BL.GetAddGroup( Proc.PartId)
-- faccia di taglio all'offset corrente
local AddId = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
local AddProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg, PartId = Proc.PartId}
Topology.Classify( AddProc, b3Raw)
local dCutOffset = ( i - 1) * dOffsL
local vtMove = Vector3d( dCutOffset, 0, 0)
EgtMove( AddId, vtMove, GDB_RT.GLOB)
-- eventuale faccia di taglio all'offset precedente, per limitare il dicing e evitare di tagliare i cubetti nel vuoto
local nLimitingSurf
if nCuts > 1 then
nLimitingSurf = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
local dLastCutOffset = i * dOffsL
local vtMoveLimitingSurf = Vector3d( dLastCutOffset - 10 * GEO.EPS_SMALL, 0, 0)
EgtMove( nLimitingSurf, vtMoveLimitingSurf, GDB_RT.GLOB)
local vtNLimitingSurf = EgtSurfTmFacetNormVersor( nLimitingSurf, 0, GDB_ID.ROOT)
if AreSameVectorApprox( X_AX(), vtNLimitingSurf) then EgtInvertSurf( nLimitingSurf) end
end
-- tagli verticali
bOk, sErr = AddVerticalPreCuts( AddProc, sCutting, 0, b3Raw, dOffsL)
if not bOk then return bOk, sErr end
-- tagli a cubetti con eventuale superficie limitante
local sLeadInOutType = 'PerpendicularOutraw'
bOk, sErr = Cut.Make( AddProc, nPhase, nRawId, nPartId, dOvmHead, nil, false, true, nil, nil, nil, nil, nLimitingSurf, sLeadInOutType)
end
-- tagli aggiuntivi non necessari
else
local sLeadInOutType = 'PerpendicularOutraw'
bOk, sErr = Cut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, nil, false, true, nil, nil, nil, nil, nil, sLeadInOutType)
end
return bOk, sErr
end
-- se finitura con truciolatore
@@ -249,79 +636,21 @@ function ProcessHeadCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, bNeedHCut
end
end
end
-- se tagli standard
if not bDoubleHorizCut then
-- flag di lavorazione faccia
local nOrthoOpposite = EgtIf( bHorizCut, MCH_MILL_FU.ORTHO_DOWN, MCH_MILL_FU.ORTHO_FRONT)
-- calcolo extra taglio ed accorciamento
local dCutExtra = 0
local dAccStart = 0
local dAccEnd = 0
if b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL or b3Raw:getDimY() < 2 * BD.MAX_DIM_HTCUT_HBEAM + 10 * GEO.EPS_SMALL then
dCutExtra = EgtIf( bDoubleCut, - 0.5 * b3Raw:getDimY() + BD.CUT_EXTRA_MIN, BD.CUT_EXTRA)
else
dCutExtra = - ( b3Raw:getDimY() - dMaxDepth)
local dSawRad = dSawDiam / 2
local dKL = dSawRad - dMaxDepth + b3Raw:getDimY() / 2 + BD.CUT_EXTRA_MIN
if BD.C_SIMM then
dAccEnd = sqrt( dSawRad * dSawRad - dKL * dKL)
else
dAccStart = sqrt( dSawRad * dSawRad - dKL * dKL)
end
end
-- se necessari tagli in doppio, eseguo gli opposti
if bDoubleCut then
-- gli accorciamenti vanno invertiti per il taglio opposto
local dAccStartDoubleCut, dAccEndDoubleCut = dAccEnd, dAccStart
for i = nCuts, 1, -1 do
local dCutOffset = ( i - 1) * dOffsL
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, MCH_MILL_FU.ORTHO_BACK, nil, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStartDoubleCut, dAccEndDoubleCut, '', b3Raw, true)
if not bOk then return false, sErr end
end
end
-- eseguo i tagli necessari
for i = nCuts, 1, -1 do
local dCutOffset = ( i - 1) * dOffsL
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nOrthoOpposite, nil, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStart, dAccEnd, '', b3Raw)
if not bOk then return false, sErr end
end
-- altrimenti necessari tagli da sopra e sotto con testa opportuna
local bOk, sErr = MakeStandardCuts( Proc, b3Raw, nCuts, dOffsL, HeadCutType, Cutting1Data, Cutting2Data, nil, dOvmHead)
-- alla fine del taglio si aggiungono gli smussi in testa
local _, sErrHeadChamfer = MakeHeadChamfer( nOriId or Proc.Id, nPartId)
if sErr then
sErr = sErr..'\n'..sErrHeadChamfer
else
-- verifico esistenza della lavorazione con lama da sotto
if not sCutting2 then
local sErr = 'Error : cutting H2 not found in library'
EgtOutLog( sErr)
return false, sErr
end
-- verifico che le due lame riescano a lavorare la sezione
local dDimZ = b3Raw:getDimZ()
local dExtra = dMaxVertDepth + dMaxDepth2 - dDimZ
if ( dExtra - 2 * BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL < 0) and not bBigSectionCut then
local sErr = 'Error : section too big for head cut'
EgtOutLog( sErr)
return false, sErr
end
-- calcolo extra taglio ed accorciamento
local dCutExtra = -dMaxDepth2 + dExtra / 2 + BD.CUT_EXTRA_MIN
local dCutExtra2 = -dMaxVertDepth + dExtra / 2 + BD.CUT_EXTRA_MIN
local dAccStart = 0
local dVzLimDwnUp
if BD.TURN then dVzLimDwnUp = -2 end
-- eseguo i tagli da sotto necessari
for i = nCuts, 1, -1 do
local dCutOffset = ( i - 1) * dOffsL
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting2, dSawDiam2, MCH_MILL_FU.ORTHO_TOP, dVzLimDwnUp, dCutExtra2, BD.CUT_SIC, dCutOffset, dAccStart, 0, '', b3Raw)
if not bOk then return false, sErr end
end
-- eseguo i tagli da sopra necessari
for i = nCuts, 1, -1 do
local dCutOffset = ( i - 1) * dOffsL
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, MCH_MILL_FU.ORTHO_DOWN, dVzLimDwnUp, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStart, 0, '', b3Raw)
if not bOk then return false, sErr end
end
sErr = sErrHeadChamfer
end
return true
end
return bOk, sErr
end
---------------------------------------------------------------------
return ProcessHeadCut
+3826 -646
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+618 -217
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+11 -11
View File
@@ -3,6 +3,7 @@
-- 2020/05/28 Tipo di lavorazione passato da Mark a Text.
-- 2021/05/03 Aggiunta gestione testa da sotto.
-- 2022/12/05 Aggiunta gestione tipo di lavorazione Text_AT.
-- 2024/09/04 In Make gestione di più geometrie ausiliarie ( ora si lavora anche il testo, oltre che alle linee di marcatura)
-- Tabella per definizione modulo
local ProcessMark = {}
@@ -50,9 +51,6 @@ end
---------------------------------------------------------------------
-- Applicazione della lavorazione
function ProcessMark.Make( Proc, nPhase, nRawId, nPartId)
-- recupero eventuale geometria ausiliaria
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
if AuxId then AuxId = AuxId + Proc.Id end
-- recupero i dati della marcatura
local vtExtr
if EgtGetType( Proc.Id) ~= GDB_TY.EXT_TEXT then
@@ -108,13 +106,15 @@ function ProcessMark.Make( Proc, nPhase, nRawId, nPartId)
EgtSetOperationMode( nMchFId, false)
return false, sErr
end
-- eventuale lavorazione su seconda geometria
if AuxId then
-- si verifica se ci sono altre geometrie da lavorare
local AdditionalGeometries = EgtSplitString( EgtGetInfo( Proc.Id, 'AUXID', 's')) or {}
for i = 1, #AdditionalGeometries do
local AuxId = Proc.Id + AdditionalGeometries[i]
-- inserisco la lavorazione di fresatura
local sName2 = 'Decor2_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchF2Id = EgtAddMachining( sName, sMilling)
if not nMchF2Id then
local sErr = 'Error adding machining ' .. sName2 .. '-' .. sMilling
local nOtherMachiningId = EgtAddMachining( sName, sMilling)
if not nOtherMachiningId then
sName = 'Decor' .. '_' .. tostring( i) .. '_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
EgtOutLog( sErr)
return false, sErr
end
@@ -125,14 +125,14 @@ function ProcessMark.Make( Proc, nPhase, nRawId, nPartId)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchF2Id, false)
EgtSetOperationMode( nOtherMachiningId, false)
return false, sErr
end
-- se geometria a X maggiore, la sposto prima
local ptS1 = EgtSP( Proc.Id, GDB_ID.ROOT)
local ptS2 = EgtSP( AuxId, GDB_ID.ROOT)
if ptS2:getX() > ptS1:getX() then
EgtRelocateGlob( nMchF2Id, nMchFId, GDB_IN.BEFORE)
EgtRelocateGlob( nOtherMachiningId, nMchFId, GDB_IN.BEFORE)
end
end
return true
+261 -63
View File
@@ -1,4 +1,4 @@
-- ProcessMortise.lua by Egaltech s.r.l. 2022/12/12
-- ProcessMortise.lua by Egaltech s.r.l. 2023/08/10
-- Gestione calcolo mortase per Travi
-- 2021/07/20 Aggiunta gestione rinvio angolare su FAST.
-- 2021/12/01 Se frontale aggiungo taglio con Grp e Proc di vero taglio (per aggiornare ingombro di testa /coda).
@@ -7,6 +7,15 @@
-- 2022/09/27 Migliorata la scelta utensile. Se c'è almeno una lavorazione 'mortise' si cerca di usare quelle, riducendo l'elevazione se necessario.
-- Se non c'è nemmeno una lavorazione 'mortise' si passa alle pocket.
-- 2022/12/12 Migliorato controllo necessità CleanCorners.
-- 2023/01/31 Aggiunta gestione lavorazione in doppio.
-- 2023/01/31 Creata la funzione ConvertToClosedCurve (parte della ProcessMortise.Make) e spostata in BeamLib.
-- 2023/05/11 Se lavorazione in doppio e precedente no oppure di tipo diverso, forzo risalita a Zmax.
-- 2023/06/27 Esclusa la ricerca lati aperti per le mortase passanti, per le quali il contorno finisce sulla faccia e il riconoscimento sbaglia.
-- 2023/07/21 Correzioni per mortise passanti con curva Aux che guarda in basso.
-- 2023/08/10 Modificata scelta SCC per tasche in Y+/- in coda o quasi.
-- 2024/01/18 Implementata GetBlockedAxis che gestisce gli assi bloccati per tutti i tipi di utensile.
-- 2024/02/28 Forzata SPIRAL_IN se c'è anche un solo lato aperto
-- 2024/03/05 Aggiunta possibilità di inserire lavorazione di smusso
-- Tabella per definizione modulo
local ProcessMortise = {}
@@ -22,6 +31,9 @@ EgtOutLog( ' ProcessMortise started', 1)
local BD = require( 'BeamData')
local ML = require( 'MachiningLib')
-- variabili assegnazione parametri Q
local Q_DEPTH_CHAMFER = 'Q02' -- d
---------------------------------------------------------------------
-- Riconoscimento della feature
function ProcessMortise.Identify( Proc)
@@ -36,6 +48,13 @@ function ProcessMortise.FrontIdentify( Proc)
return (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 51)
end
---------------------------------------------------------------------
-- Riconoscimento delle sole feature laterali
function ProcessMortise.SideIdentify( Proc)
return ( (( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 50) or
(( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 53))
end
---------------------------------------------------------------------
-- Classificazione della feature: decide se la feature è in una posizione che per lavorala
-- deve essere ribaltata o no
@@ -109,11 +128,12 @@ end
local nFaceUse = BL.GetNearestParalOpposite( vtN)
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
-- applico il parametro plunge, che setta la lavorazione per affondare solamente, senza lavorare tutto il contorno; 1: solo lato iniziale, 2: solo lato finale, 3: entrambi
sNotes = 'Plunge=3;'
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'Plunge' , 3)
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- imposto angolo 3° asse rot
local vtOrtho = BL.GetVersRef( nFaceUse)
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetChainSawBlockedAxis( 1))
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetBlockedAxis( sMortising, 'perpendicular'))
EgtSetMachiningParam( MCH_MP.INITANGS, BL.GetChainSawInitAngs( vtN, vtOrtho, 1))
-- calcolo la lavorazione
if not ML.ApplyMachining( true, false) then
@@ -123,7 +143,7 @@ end
return false, sErr
end
-- impostazione alternativa angolo 3° asse rot
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetChainSawBlockedAxis( 2))
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetBlockedAxis( sMortising, 'parallel'))
EgtSetMachiningParam( MCH_MP.INITANGS, BL.GetChainSawInitAngs( vtN, vtOrtho, 2))
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
@@ -234,20 +254,20 @@ local function CleanCorners( Proc, dMorH, vtN, bDoubleDir, AuxId)
end
---------------------------------------------------------------------
local function VerifyMortiseOrPocket( Proc, dDiam, dDepth, dMaxTotLen, sType, bPocketDown)
function ProcessMortise.VerifyMortiseOrPocket( Proc, dDiam, dDepth, dMaxTotLen, sType, bPocketDown, bExcludeH2)
-- ricerca della svuotatura
local sPocketing
if dDepth then
sPocketing = ML.FindPocketing( sType, dDiam, dDepth, dMaxTotLen, not bPocketDown, bPocketDown) or
ML.FindPocketing( sType, dDiam, 0.8 * dDepth, dMaxTotLen, not bPocketDown, bPocketDown) or
ML.FindPocketing( sType, dDiam, 0.6 * dDepth, dMaxTotLen, not bPocketDown, bPocketDown) or
ML.FindPocketing( sType, dDiam, 0.4 * dDepth, dMaxTotLen, not bPocketDown, bPocketDown) or
ML.FindPocketing( sType, dDiam, 0, dMaxTotLen)
sPocketing = ML.FindPocketing( sType, dDiam, dDepth, dMaxTotLen, not bPocketDown, bPocketDown, bExcludeH2) or
ML.FindPocketing( sType, dDiam, 0.8 * dDepth, dMaxTotLen, not bPocketDown, bPocketDown, bExcludeH2) or
ML.FindPocketing( sType, dDiam, 0.6 * dDepth, dMaxTotLen, not bPocketDown, bPocketDown, bExcludeH2) or
ML.FindPocketing( sType, dDiam, 0.4 * dDepth, dMaxTotLen, not bPocketDown, bPocketDown, bExcludeH2) or
ML.FindPocketing( sType, dDiam, 0, dMaxTotLen, bExcludeH2)
else
sPocketing = ML.FindPocketing( sType, dDiam, 0, dMaxTotLen)
sPocketing = ML.FindPocketing( sType, dDiam, 0, dMaxTotLen, bExcludeH2)
end
if not sPocketing then
return false
return nil
end
-- recupero i dati dell'utensile
local dMaxDepth = 0
@@ -262,7 +282,36 @@ local function VerifyMortiseOrPocket( Proc, dDiam, dDepth, dMaxTotLen, sType, bP
return sPocketing, dMaxDepth, dToolDiam
end
---------------------------------------------------------------------
---------------------------------------------------------------------
local function VerifyChamfer( Proc, AuxId, nRawId, bMakeVertCham, bDownHead)
local nChamfer = 0
-- ingombro del grezzo
local b3Raw = EgtGetRawPartBBox( nRawId)
-- verifico che lo smusso sia richiesto
local dDepth = EgtGetInfo( Proc.Id, Q_DEPTH_CHAMFER, 'd') or 0
if dDepth > 0 then
nChamfer = 1
end
-- recupero la lavorazione
local sMilling
if nChamfer > 0 then
if bDownHead then
sMilling = ML.FindMilling( 'Mark_H2', nil, nil, nil, nil, false, true)
else
sMilling = ML.FindMilling( 'Mark')
end
if not sMilling then
local sErr = 'Error : Mark not found in library'
EgtOutLog( sErr)
return -1, 0, sErr
end
end
return nChamfer, dDepth, sMilling
end
---------------------------------------------------------------------
-- Applicazione della lavorazione
function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- ingombro del pezzo
@@ -284,36 +333,6 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtOutLog( sErr)
return false, sErr
end
-- recupero versore estrusione della curva supplementare
local vtExtr = EgtCurveExtrusion( AuxId, GDB_ID.ROOT)
-- Se curva di contorno aperta
if not EgtCurveIsClosed( AuxId) then
local NewId, nCount = EgtExtractSurfTmFacetLoops( Proc.Id, 0, EgtGetParent( Proc.Id))
if NewId then
-- elimino eventuali loop interni (non dovrebbero comunque esserci)
for i = 1, nCount - 1 do
EgtErase( NewId + i)
end
-- sostituisco il loop esterno alla curva originale
EgtModifyCurveExtrusion( NewId, vtExtr, GDB_ID.ROOT)
EgtRelocate( NewId, AuxId, GDB_IN.AFTER)
EgtErase( AuxId)
EgtChangeId( NewId, AuxId)
-- sistemo i lati aperti
local vFacAdj = EgtSurfTmFacetAdjacencies( Proc.Id, 0)[1]
if vFacAdj then
local sOpen = ''
for i = 1, #vFacAdj do
if vFacAdj[i] < 0 then
sOpen = sOpen .. EgtIf( #sOpen > 0, ',', '') .. tostring( i - 1)
end
end
if #sOpen > 0 then
EgtSetInfo( AuxId, 'OPEN', sOpen)
end
end
end
end
-- verifico se frontale
local bFront = ( Proc.Prc == 51)
-- recupero i dati della faccia di fondo
@@ -324,8 +343,79 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
ptC = frMor:getOrigin()
vtN = frMor:getVersZ()
end
-- recupero versore estrusione della curva supplementare
local vtExtr = EgtCurveExtrusion( AuxId, GDB_ID.ROOT)
-- Confronto le direzioni dei 2 versori : se diverse la faccia 0 non è il fondo => mortasa passante
local bOpenBtm = not AreSameVectorApprox( vtExtr, vtN)
-- se curva di contorno aperta la rendo chiusa
local _, bModif = BL.ConvertToClosedCurve( Proc, AuxId)
-- se la mortasa passante il contorno è sulla faccia della trave e il riconoscimento lati aperti non è corretto
if not bModif and not bOpenBtm then
BL.SetOpenSide( AuxId, b3Solid)
end
-- recupero il raggio minimo della mortasa
local dMaxDiam = 1000
local nSt, nEnd = EgtCurveDomain( AuxId)
for i = nSt, nEnd - 1 do
local dRad = EgtCurveCompoRadius( AuxId, i)
-- se è un raggio, setto ed esco subito. Tutti i raggi sono uguali nella mortasa
if dRad > 0 then
dMaxDiam = dRad * 2
break
end
end
-- caso speciale feature trimmata diversamente in/out: si ricostruisce la curva non trimmata
-- recupero gruppo per geometria addizionale
local nAddGrpId = BL.GetAddGroup( nPartId)
if not nAddGrpId then
local sErr = 'Error : missing AddGroup'
EgtOutLog( sErr)
return false, sErr
end
-- estrazione loop trimesh: se 1 contorno ha il fondo, se due contorni è passante.
-- se passante si deve discriminare se i due contorni sono uguali (passante standard, trimmata allo stesso modo in/out) oppure se un contorno è diverso dall'altro (e quindi non è trimmata in egual modo in/out)
-- se più di 2 contorni si rimane nel caso standard
local idCurve1, nIdCount = EgtExtractSurfTmLoops( Proc.Id, nAddGrpId)
if nIdCount == 2 then
local idCurve2 = idCurve1 + 1
local dCurveLength1 = EgtCurveLength( idCurve1)
local dCurveLength2 = EgtCurveLength( idCurve2)
if abs( dCurveLength1 - dCurveLength2) > 100 * GEO.EPS_SMALL then
-- riferimento curva ausiliaria
local frAuxId = Frame3d( EgtGP( AuxId, GDB_RT.GLOB), vtExtr)
-- box dei due contorni nel riferimento della faccia di fondo
local b3Curve1 = EgtGetBBoxRef( idCurve1, GDB_BB.STANDARD, frAuxId)
local b3Curve2 = EgtGetBBoxRef( idCurve2, GDB_BB.STANDARD, frAuxId)
-- per creare la curva non trimmata si creerà un piano di intersezione con la trimesh appena sopra al contorno più vicino a AuxId, ossia a ptOffset
local ptOffset = b3Curve1:getMax()
if b3Curve1:getMin():getZ() > b3Curve2:getMin():getZ() + 10 * GEO.EPS_SMALL then
ptOffset = b3Curve2:getMax()
end
-- ptOffset si sposta appena sopra per garantire l'intersezione
ptOffset = ptOffset + Vector3d( 0, 0, 100 * GEO.EPS_SMALL)
local ptOffsetGlob = Point3d( ptOffset)
ptOffsetGlob:toGlob( frAuxId)
EgtErase( { idCurve1, idCurve2} )
-- intersezione piano a ptOffset con la trimesh: si ottiene la curva originale non trimmata
local nFirstId, nPnt, nCrv, nSrf = EgtPlaneSurfTmInters( ptOffsetGlob, frAuxId:getVersZ(), Proc.Id, nAddGrpId, GDB_RT.GLOB)
if nPnt == 0 and nCrv == 1 and nSrf == 0 then
EgtCloseCurveCompo( nFirstId)
local vtMove = -frAuxId:getVersZ() * ptOffset:getZ()
EgtMove( nFirstId, vtMove, GDB_RT.GLOB)
EgtErase( AuxId)
EgtChangeId( nFirstId, AuxId)
else
if nFirstId then
for nId = nFirstId, nFirstId + nPnt + nCrv + nSrf - 1 do
EgtErase( nId)
end
end
end
end
end
if bOpenBtm then
-- creo superficie chiusa
local nFlat = EgtSurfTmByFlatContour( EgtGetParent( AuxId), AuxId, 0.05)
@@ -391,7 +481,8 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
local AddId = EgtSurfTmPlaneInBBox( nAddGrpId, ptCutC, vtCutN, b3Solid, GDB_RT.GLOB)
local b3Cut = EgtGetBBoxGlob( AddId or GDB_ID.NULL, GDB_BB.STANDARD)
local CutProc = { Id = AddId, Grp = Proc.Grp - 2, Prc = 10, Box = b3Cut, Fct = 1, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bFromBottom = ( b3Solid:getDimX() < BD.LEN_SHORT_PART and vtExtr:getZ() > 0.25)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dCurrOvmH, bFromBottom)
if not bOk then return bOk, sErr end
@@ -408,10 +499,71 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- determino larghezza della mortasa
if dL < dW then dL, dW = dW, dL end
-- si prende il minimo tra larghezza mortasa e il raggio minimo impostato da parametro
dMaxDiam = min( dW, dMaxDiam)
-- abilitazione lavorazione da sotto
local bPockUp = ( BD.DOWN_HEAD and vtExtr:getZ() > -0.259)
local bPockDown = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.174)
local bPockAngTrasm = ( BD.ANG_TRASM and vtExtr:getZ() < -0.1)
-- recupero i dati della curva e del profilo
local dDepth = dMorH
local bDownHead = ( BD.DOWN_HEAD and vtExtr:getZ() < 0.1)
local bToolInv = ( not bDownHead and vtExtr:getZ() < -0.1 and Proc.Box:getDimZ() > b3Solid:getDimZ() - 5)
local dExtra = 2
-- verifico se servono gli smussi. Se lavorazione principale di svuotatura significa che è solo da un lato
-- generalmente sono lavorazioni non molto lunghe, quindi non si gestistono gli step
-- verifico i parametri Q per profondità smusso e per eseguirlo in esclusiva
local nChamfer, dDepthCham, sChamfer = VerifyChamfer( Proc, AuxId, nRawId, true)
-- se devo inserire il chamfer
if nChamfer > 0 and Proc.Grp ~= 0 and dDepth > dDepthCham then
-- inserisco la lavorazione
local sNameCh = 'Cham_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchId = EgtAddMachining( sNameCh, sChamfer)
if not nMchId then
local sErr = 'Error adding machining ' .. sNameCh .. '-' .. sChamfer
EgtOutLog( sErr)
return false, sErr
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
if not bToolInv then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
EgtSetMachiningParam( MCH_MP.INVERT, true)
else
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
EgtSetMachiningParam( MCH_MP.INVERT, true)
end
-- assegno affondamento e offset radiale
EgtSetMachiningParam( MCH_MP.DEPTH, dDepthCham + dExtra - dMorH)
EgtSetMachiningParam( MCH_MP.OFFSR, dExtra)
-- posizione braccio porta testa
local nSCC = MCH_SCC.NONE
if not BD.C_SIMM then
if Proc.Head then
nSCC = MCH_SCC.ADIR_XP
elseif Proc.Tail then
nSCC = MCH_SCC.ADIR_XM
elseif AreSameOrOppositeVectorApprox( vtExtr, Z_AX()) then
nSCC = MCH_SCC.ADIR_YP
elseif vtExtr:getY() > -0.01 then
nSCC = MCH_SCC.ADIR_YP
else
nSCC = MCH_SCC.ADIR_YM
end
end
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
return false, sErr
end
end
-- recupero la lavorazione
local sPockType = 'Mortise'
local sMchExt = ''
@@ -420,18 +572,25 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
elseif bPockAngTrasm then
sMchExt = '_AT'
end
local bExcludeH2 = false
if Proc.Double and Proc.Double > 0 then
bPockUp = false
bPockDown = false
bExcludeH2 = true
sMchExt = ''
end
local sPocketing
if Proc.Prc ~= 53 then
sPocketing = VerifyMortiseOrPocket( Proc, dW, dMorH, nil, sPockType..sMchExt, bPockDown)
sPocketing = ProcessMortise.VerifyMortiseOrPocket( Proc, dMaxDiam, dMorH, nil, sPockType..sMchExt, bPockDown, bExcludeH2)
if not sPocketing and bPockUp then
sPocketing = VerifyMortiseOrPocket( Proc, dW, dMorH, nil, sPockType..sMchExt)
sPocketing = ProcessMortise.VerifyMortiseOrPocket( Proc, dMaxDiam, dMorH, nil, sPockType..sMchExt, _, bExcludeH2)
end
end
if not sPocketing then
sPockType = 'Pocket'
sPocketing = VerifyMortiseOrPocket( Proc, dW, dMorH, nil, sPockType..sMchExt, bPockDown)
sPocketing = ProcessMortise.VerifyMortiseOrPocket( Proc, dMaxDiam, dMorH, nil, sPockType..sMchExt, bPockDown, bExcludeH2)
if not sPocketing and bPockUp then
sPocketing = VerifyMortiseOrPocket( Proc, dW, dMorH, nil, sPockType..sMchExt)
sPocketing = ProcessMortise.VerifyMortiseOrPocket( Proc, dMaxDiam, dMorH, nil, sPockType..sMchExt, _, bExcludeH2)
end
end
if not sPocketing then
@@ -452,6 +611,7 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
bCW = ( dSpeed >= 0)
end
end
-- inserisco la lavorazione di svuotatura
local sName = 'Mort_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchFId = EgtAddMachining( sName, sPocketing)
@@ -460,10 +620,22 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtOutLog( sErr)
return false, sErr
end
-- verifico se invertire versore estrusione geometria
-- verifico se invertire direzione utensile
if bRevertSide then
EgtModifyCurveExtrusion( AuxId, -vtExtr, GDB_ID.ROOT)
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
end
-- se ho anche solo un lato aperto, forzo SPIRAL-IN
local vOpen = EgtGetInfo( AuxId, 'OPEN', 'vi')
if vOpen and #vOpen > 0 then
EgtSetMachiningParam( MCH_MP.SUBTYPE, MCH_POCK_SUB.SPIRALIN)
end
-- se diametro utensile esattamente uguale a larghezza tasca, e tasca tonda, si setta un offset radiale negativo
if Proc.Fct > 6 and abs( dMillDiam - dW) < 100 * GEO.EPS_SMALL then
EgtSetMachiningParam( MCH_MP.OFFSR, - 50 * GEO.EPS_SMALL)
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- sistemo la direzione di lavoro
@@ -472,11 +644,14 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
local nSCC = MCH_SCC.NONE
if bPockAngTrasm then
nSCC = MCH_SCC.ADIR_NEAR
elseif not BD.C_SIMM then
if abs( vtN:getX()) < GEO.EPS_SMALL and abs( vtN:getY()) < GEO.EPS_SMALL then
elseif not BD.C_SIMM and not BD.TURN then
if AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
nSCC = MCH_SCC.ADIR_YM
elseif abs( vtN:getX()) < GEO.EPS_SMALL then
nSCC = MCH_SCC.ADIR_XP
elseif abs( vtN:getX()) < 0.1 then
local bNearTail = ( Proc.Box:getMax():getX() < b3Solid:getCenter():getX() and
Proc.Box:getMax():getX() - b3Solid:getMin():getX() < 1000)
local bVeryShortPart = ( BD.LEN_VERY_SHORT_PART and b3Solid:getDimX() < BD.LEN_VERY_SHORT_PART)
nSCC = EgtIf( BL.IsPartFinalPhase( EgtGetCurrPhase()) or ( bNearTail and not bVeryShortPart), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
elseif vtN:getY() < GEO.EPS_SMALL then
nSCC = EgtIf( bRevertSide, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
else
@@ -503,13 +678,31 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
dMorH = dMaxDepth
EgtOutLog( sWarn .. ' (process ' .. tostring( Proc.Id) .. ')')
else
if bOpenBtm and not bForceOneSide then -- se mortasa passante setto metà profondità
-- se passante e lavorabile da due lati
if bOpenBtm and not bForceOneSide then
-- imposto metà profondità
nDepthMin = -dMorH
EgtSetMachiningParam( MCH_MP.DEPTH, nDepthMin)
-- se altrimenti passante ma lavorabile solo da un lato
elseif bOpenBtm and bForceOneSide then
if bRevertSide then
EgtSetMachiningParam( MCH_MP.DEPTH, min( dMorH + BD.CUT_EXTRA, dMaxDepth))
else
EgtSetMachiningParam( MCH_MP.DEPTH, min( BD.CUT_EXTRA, dMaxDepth - dMorH))
end
end
end
-- imposto elevazione
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dMorH, 1) .. ';')
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMorH, 1))
-- se lavorazione in doppio
if Proc.Double and Proc.Double > 0 then
sUserNotes = EgtSetValInNotes( sUserNotes, 'DOUBLE', Proc.Double)
if Proc.Double ~= Proc.PrevDouble then
sUserNotes = EgtSetValInNotes( sUserNotes, 'StartZmax', 2)
end
end
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
@@ -528,7 +721,7 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
return false, sErr
end
-- faccio la copia e la metto nel layer dedicato alle geometrie aggiunte
local AuxId_oppo = EgtCopyGlob( AuxId, BL.GetAddGroup(nPartId))
local AuxId_oppo = EgtCopyGlob( AuxId, BL.GetAddGroup(nPartId))
-- inverto la direzione estrusione di questa
EgtModifyCurveExtrusion( AuxId_oppo, - vtExtr, GDB_ID.ROOT)
-- aggiungo geometria
@@ -537,11 +730,14 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bCW, true, false))
-- imposto posizione braccio porta testa
local nSCC = MCH_SCC.NONE
if not BD.C_SIMM then
if abs( vtN:getX()) < GEO.EPS_SMALL and abs( vtN:getY()) < GEO.EPS_SMALL then
if not BD.C_SIMM and not BD.TURN then
if AreSameOrOppositeVectorApprox( vtN, Z_AX()) then
nSCC = MCH_SCC.ADIR_YM
elseif abs( vtN:getX()) < GEO.EPS_SMALL then
nSCC = MCH_SCC.ADIR_XP
elseif abs( vtN:getX()) < 0.1 then
local bNearTail = ( Proc.Box:getMax():getX() < b3Solid:getCenter():getX() and
Proc.Box:getMax():getX() - b3Solid:getMin():getX() < 1000)
local bVeryShortPart = ( BD.LEN_VERY_SHORT_PART and b3Solid:getDimX() < BD.LEN_VERY_SHORT_PART)
nSCC = EgtIf( BL.IsPartFinalPhase( EgtGetCurrPhase()) or ( bNearTail and not bVeryShortPart), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
elseif vtN:getY() < GEO.EPS_SMALL then
nSCC = MCH_SCC.ADIR_YP
else
@@ -558,7 +754,9 @@ function ProcessMortise.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- setto profondità
EgtSetMachiningParam( MCH_MP.DEPTH, -nDepthMin+BD.CUT_EXTRA)
-- imposto elevazione
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( (-nDepthMin+BD.CUT_EXTRA), 1) .. ';')
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( (-nDepthMin+BD.CUT_EXTRA), 1))
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
+103
View File
@@ -0,0 +1,103 @@
-- ProcessSplit.lua by Egaltech s.r.l. 2025/06/20
-- Gestione tastatura
-- Tabella per definizione modulo
local ProcessProbing = {}
-- Include
require( 'EgtBase')
local BL = require( 'BeamLib')
-- Dati
local ML = require( 'MachiningLib')
---------------------------------------------------------------------
local function GetProbingMachining( Machinings, sHead)
local sProbeMachining, sHeadTool
-- TODO questa associazione "testa utensile"-"testa tastatore" dovrebbe essere spostata nella macchina.
-- Non è detto che se testa utensile inizia con "H2" allora bisogna prendere lavorazione con "_H2"
-- se la testa utilizzata dalla lavorazione inizia con H2, dovrebbe essere la seconda testa
if EgtStartsWith( sHead, 'H2') then
sHeadTool = '_H2'
else
sHeadTool = '_H1'
end
for i = 1, #Machinings do
if EgtEndsWith( Machinings[i].Name, sHeadTool) then
sProbeMachining = Machinings[i]
return sProbeMachining
end
end
sProbeMachining = Machinings[1]
return sProbeMachining
end
---------------------------------------------------------------------
local function MoveProbePointToRawFaces( ptProbe, vtProbe, nPartId)
local b3BoxPart = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
-- si porta linea di tastatura su grezzo
if AreSameVectorApprox( vtProbe, Z_AX()) then
ptProbe[3] = b3BoxPart:getMax():getZ()
elseif AreSameVectorApprox( vtProbe, -Z_AX()) then
ptProbe[3] = b3BoxPart:getMin():getZ()
elseif AreSameVectorApprox( vtProbe, Y_AX()) then
ptProbe[2] = b3BoxPart:getMax():getY()
elseif AreSameVectorApprox( vtProbe, -Y_AX()) then
ptProbe[2] = b3BoxPart:getMin():getY()
end
return ptProbe
end
---------------------------------------------------------------------
-- Applicazione della lavorazione
function ProcessProbing.Make( Proc, nPartId, Info)
local bOk, sErr
-- per eseguire tastatura servono tutti i dati, altriemnti impossibile
if Info.vtProbe and Info.ptProbe and Info.sType then
Info.ptProbe = MoveProbePointToRawFaces( Info.ptProbe, Info.vtProbe, nPartId)
-- recupero gruppo per geometria addizionale
local nAddGrpId = BL.GetAddGroup( nPartId)
local nIdLine = EgtLinePVL( nAddGrpId, Info.ptProbe, Info.vtProbe, 10, GDB_RT.GLOB) -- TODO lunghezza da portare fuori come parametro
local Machinings = GetMachinings( MCH_MY.PROBING, Info.sType)
-- se c'è almeno una lavorazione, allora devo fare tastatura
if Machinings and #Machinings > 0 then
local sProbing = GetProbingMachining( Machinings, Info.sHead)
-- se c'è la linea e la lavorazione, applico
if sProbing and nIdLine then
local sName = 'DtMtProbe_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchFId = EgtAddMachining( sName, sProbing.Name)
-- si inverte la direzione della linea, deve essere entrante, oppostaa vettore estrusione
EgtInvertCurve( nIdLine)
-- aggiungo geometria
EgtSetMachiningGeometry( {{ nIdLine, -1}})
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchFId, false)
return false, sErr
else
bOk = true
end
else
bOk = false
sErr = 'Error on probing'
end
-- altrimenti tastatura non richiesta, esco
else
return true
end
else
bOk = false
sErr = 'Error on probing'
end
return bOk, sErr
end
---------------------------------------------------------------------
return ProcessProbing
+91 -12
View File
@@ -9,6 +9,7 @@
-- 2022/05/24 Aggiunta fresatura da sotto su macchine con testa da sotto.
-- 2022/05/28 Aggiunto calcolo svuotatura da modulo di libreria.
-- 2022/11/03 Correzione per riconoscimento testa da sotto su fresatura.
-- 2023/11/30 Calcolo elevazione velocizzato e centralizzato tramite la funzione GetFaceElevation.
-- Tabella per definizione modulo
local ProcessProfCamb = {}
@@ -205,6 +206,36 @@ local function VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDephtCham, sOnly
return nChamfer, dDepth, sMilling, sMilling2
end
---------------------------------------------------------------------
function VerifyOtherMillCanFinish( dDepthProfile, nSide)
local dToolMaxDepthFinish
-- abilitazione lavorazione da sotto
local sMillType = 'Prof_end'
local sMillingFinish, _, _, _ = ML.FindMilling( sMillType, nil, nil, nil, nil, true, nil, nil, nil)
if not sMillingFinish then
return false
end
-- Recupero i dati dell'utensile
if EgtMdbSetCurrMachining( sMillingFinish) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid)) then
dToolMaxDepthFinish = EgtTdbGetCurrToolMaxDepth()
end
else
return false
end
local bDouble = ( dDepthProfile + BD.CUT_EXTRA > dToolMaxDepthFinish)
-- se lavorazione in doppio richiesta, si verifica se richiesta testa sotto
if bDouble and nSide == 0 then
return false -- TODO macchine con BD.DOWN_HEAD potrebbero lavorare in doppio in questo caso!
end
if not bDouble or ( dDepthProfile + BD.MILL_OVERLAP < dToolMaxDepthFinish * 2) then
return true, sMillingFinish, bDouble
end
return false
end
---------------------------------------------------------------------
-- Applicazione della lavorazione
function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
@@ -243,7 +274,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
if vtN:getZ() > 0.1 then
nSide = 1
elseif vtN:getZ() < -0.1 then
nSide = -1
nSide = -1
end
-- abilitazione lavorazione da sotto
local bMillDown = ( BD.DOWN_HEAD and nSide == -1)
@@ -285,7 +316,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- aggiungo piano di sgrossatura e lo lavoro
local ptStart, vtNP = GetSawCutData( AuxId, vtNF)
local AddId = EgtSurfTmPlaneInBBox( nAddGrpId, ptStart, vtNP, b3Solid, GDB_RT.GLOB)
if AddId and BL.GetFaceElevation( AddId, 0, nPartId) > 20.0 then
if AddId and BL.GetFaceElevation( AddId, 0, b3Solid) > 20.0 then
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
-- se macchina PF o ONE e profilo sopra davanti e pezzo alto applico svuotatura
@@ -306,7 +337,8 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- altrimenti applico taglio di lama
else
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dCurrOvmH)
if not bOk then
return false, sErr
@@ -466,16 +498,21 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
end
end
-- se configurata fresa di finitura
local bUseOtherMillOnFinish, sFinishMilling, bDoubleFinishMill = VerifyOtherMillCanFinish( dProfDepth, nSide)
-- se il chamfer non è esclusivo continuo con le altre lavorazioni
if nChamfer < 2 then
-- verifico se necessario lavorare in doppio
local bDouble = ( dProfDepth + BD.CUT_EXTRA > dToolMaxDepth)
local bDouble = ( dProfDepth + BD.CUT_EXTRA - 100 * GEO.EPS_SMALL > dToolMaxDepth)
local dDepth = min( dToolMaxDepth, dProfDepth / 2 + BD.MILL_OVERLAP)
-- se lavorazione da due parti, aggiungo la seconda
local sMillingDown
if bDouble then
if nSide == 0 then
if BD.DOWN_HEAD then
if BD.DOWN_HEAD then
-- recupero la lavorazione
sMillingDown = ML.FindMilling( 'Prof_H2', nil, nil, nil, nil, false, true)
if not sMillingDown then
@@ -535,10 +572,6 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtSetMachiningParam( MCH_MP.OFFSR, ( dOriOffset + dOffsetPar))
bFinish = true
end
-- se parametro sovramateriale è maggiore di 0 lo aggiungo al sovramateriale precedente
if dOffsetPar > 0 then
EgtSetMachiningParam( MCH_MP.OFFSR, ( dOriOffset + dOffsetPar))
end
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
@@ -565,7 +598,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
nMchId = nMch2Id
end
-- se abilitata, aggiungo lavorazione di finitura
if bFinish then
if bFinish and not bUseOtherMillOnFinish then
-- inserisco la lavorazione
local sNewName = 'ProfB_Fin_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId))
@@ -637,7 +670,13 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
end
-- posizione braccio porta testa
EgtSetMachiningParam( MCH_MP.SCC, EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM))
local nSCC = MCH_SCC.ADIR_NONE
if BD.TURN == 2 then
nSCC = MCH_SCC.ADIR_ZP
else
nSCC = EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
end
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- variabili per gestione direzione percorso e per gestione lavorazione di finitura opzionale
local ptSP, ptEp
local bFinish
@@ -674,7 +713,7 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
nMchId = nMch2Id
end
-- se abilitata, aggiungo lavorazione di finitura
if bFinish then
if bFinish and not bUseOtherMillOnFinish then
-- inserisco la lavorazione
local sNewName = 'Prof_Fin_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId))
@@ -730,6 +769,46 @@ function ProcessProfCamb.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
return false, sErr
end
end
-- se finitura con fresa piccola
if bFinish and bUseOtherMillOnFinish then
local sDepthFinishMill = EgtIf( bDoubleFinishMill, ( dProfDepth+ BD.MILL_OVERLAP ) / 2, dProfDepth + BD.CUT_EXTRA)
local sMachName = 'Fin_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
nMchId = EgtAddMachining( sMachName, sFinishMilling)
if not nMchId then
local sErr = 'Error adding machining ' .. sMachName .. '-' .. sFinishMilling
EgtOutLog( sErr)
return false, sErr
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- imposto l'affondamento
EgtSetMachiningParam( MCH_MP.DEPTH, sDepthFinishMill)
-- posizione braccio porta testa
EgtSetMachiningParam( MCH_MP.SCC, EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM))
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
return false, sErr
end
if bDoubleFinishMill then
local sNewName = 'FinB_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMch2Id = EgtCopyMachining( sNewName, EgtGetName( nMchId))
-- ottengo l'inversione e setto il contrario
local bInvertMode = EgtGetMachiningParam( MCH_MP.INVERT)
EgtSetMachiningParam( MCH_MP.INVERT, not bInvertMode)
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
return false, sErr
end
end
end
end
-- aggiorno ingombro testa o coda per presa
if nSide ~= 1 then -- se feature di fianco o da sotto
+68 -41
View File
@@ -1,10 +1,13 @@
-- ProcessProfConcave.lua by Egaltech s.r.l. 2022/05/28
-- ProcessProfConcave.lua by Egaltech s.r.l. 2023/07/31
-- Gestione calcolo profilo concavo per Travi
-- 2021/05/03 Aggiunta gestione smusso da sopra e sotto per macchina con testa da sotto.
-- 2021/06/28 Per macchine con testa sotto, smussi di lato con questa testa se non c'è lav.ne da sopra.
-- 2022/02/02 Aggiunta funzione OnlyChamfer.
-- 2022/05/24 Aggiunta fresatura da sotto su macchine con testa da sotto.
-- 2022/05/28 Aggiunto calcolo svuotatura da modulo di libreria.
-- 2023/05/25 Sistemazione SCC per TURN.
-- 2023/07/31 Correzione e semplificazione di ModifySideInvertLead per invert.
-- 2023/11/30 Calcolo elevazione velocizzato e centralizzato tramite la funzione GetFaceElevation.
-- Tabella per definizione modulo
local ProcessProfConcave = {}
@@ -88,7 +91,7 @@ end
---------------------------------------------------------------------
local function ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst,
bFirstTrim, bLastTrim, bFlagInvert, dOffsetPar)
bFirstTrim, bLastTrim, dOffsetPar)
-- confronto il punto iniziale e finale della lavorazione con il box della feature
-- e se è vicino alla parte esterna della trave inverto la lavorazione
@@ -96,6 +99,9 @@ local function ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst,
local ptEp = EgtGetMachiningEndPoint()
local nMachMode = EgtGetMachiningParam( MCH_MP.STEPTYPE)
if nMachMode == 1 and ptSP and ptEp then
-- recupero flag inversione direzione di lavorazione
local bInvertMode = EgtGetMachiningParam( MCH_MP.INVERT)
-- verifico se da aggiustare
if abs( EgtIf( bHead, Proc.Box:getMax():getX(), Proc.Box:getMin():getX()) - ptSP:getX()) <
abs( EgtIf( bHead, Proc.Box:getMax():getX(), Proc.Box:getMin():getX()) - ptEp:getX()) then
-- ottengo il lato lavoro e lo inverto
@@ -103,9 +109,14 @@ local function ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst,
if nSideWork > 0 then
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( nSideWork == MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT))
end
-- ottengo l'inversione e setto il contrario
local bInvertMode = EgtGetMachiningParam( MCH_MP.INVERT)
EgtSetMachiningParam( MCH_MP.INVERT, not bInvertMode)
-- imposto il contrario dell'inversione trovata
bInvertMode = not bInvertMode
EgtSetMachiningParam( MCH_MP.INVERT, bInvertMode)
end
-- se lavorazione invertita rispetto a geometria, scambio dati di inizio e fine
if bInvertMode then
dLenIni, dLenLst = dLenLst, dLenIni
bFirstTrim, bLastTrim = bLastTrim, bFirstTrim
end
-- modifico attacco e uscita
if dLenIni and dLenLst then
@@ -119,9 +130,6 @@ local function ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst,
if bLastTrim and dLenLst < dToolDiam / 2 + ( 20 * GEO.EPS_SMALL) then
dEndAddLen = dToolDiam / 2 - dLenLst + dOffsetPar + 1
end
if bFlagInvert then
dStartAddLen, dEndAddLen = dEndAddLen, dStartAddLen
end
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dStartAddLen)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEndAddLen)
end
@@ -195,6 +203,25 @@ local function VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDephtCham, sOnly
return nChamfer, dDepth, sMilling, sMilling2
end
---------------------------------------------------------------------
function GetSccForTurn( vtN, sType)
local nSCC
if abs( vtN:getZ()) > abs( vtN:getY()) then
if sType == 'V' then
nSCC = EgtIf( vtN:getZ() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_ZM)
else
nSCC = EgtIf( vtN:getZ() > 0, MCH_SCC.ADIR_ZP, MCH_SCC.ADIR_ZM)
end
else
if sType == 'V' then
nSCC = EgtIf( vtN:getY() > 0, MCH_SCC.ADIR_ZM, MCH_SCC.ADIR_ZP)
else
nSCC = EgtIf( vtN:getY() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
end
end
return nSCC
end
---------------------------------------------------------------------
-- Applicazione della lavorazione
function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
@@ -227,8 +254,6 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- acquisisco informazioni sulle facce estreme
local _, _, dLenIni = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFirstFacet, GDB_ID.ROOT)
local _, _, dLenLst = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nLastFacet, GDB_ID.ROOT)
-- flag percorso invertito
local bFlagInvert = false
-- verifico se in testa o coda
local bHead = ( vtN:getX() > 0)
EgtOutLog( 'vtN=' .. tostring( vtN), 3)
@@ -265,7 +290,7 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- aggiungo piano di sgrossatura e lo lavoro
local ptStart, vtNP = GetSawCutData( AuxId, vtN)
local AddId = EgtSurfTmPlaneInBBox( nAddGrpId, ptStart, vtNP, b3Solid, GDB_RT.GLOB)
if AddId and BL.GetFaceElevation( AddId, 0, nPartId) > 20.0 then
if AddId and BL.GetFaceElevation( AddId, 0, b3Solid) > 20.0 then
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
-- se macchina PF o ONE e profilo sopra davanti e pezzo alto applico svuotatura
@@ -286,7 +311,8 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- altrimenti applico taglio di lama
else
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dCurrOvmH)
if not bOk then
return false, sErr
@@ -324,7 +350,6 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
( not bHead and vtExtr:getY() > 0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
-- altrimenti lavorazione dal davanti o dal dietro
else
@@ -333,14 +358,12 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
if vtExtr:getZ() < 0 then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
-- se lavorazione a destra da dietro o sinistra di fronte, inverto
if ( bHead and vtN:getY() > 0.1) or
( not bHead and vtN:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
end
-- assegno affondamento e offset radiale
@@ -358,7 +381,7 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
else
-- applico controllo del punto entrata lavorazione e se non è distante dall'esterno
-- della feature inverto il punto di inizio della lavorazione
ModifySideInvertLead( Proc, bHead, dToolDiam + ( 2 * dExtra), dLenIni, dLenLst, bFirstTrim, bLastTrim, bFlagInvert, dExtra)
ModifySideInvertLead( Proc, bHead, dToolDiam + ( 2 * dExtra), dLenIni, dLenLst, bFirstTrim, bLastTrim, dExtra)
end
-- se lavorazione da due parti, aggiungo la seconda
if bDoubleCham then
@@ -373,8 +396,6 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- resetto il flag inversione percorso
bFlagInvert = false
-- se lavorazione da sopra o da sotto
if nSide ~= 0 then
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
@@ -382,7 +403,6 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
( not bHead and vtExtr:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
else
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
@@ -390,7 +410,6 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
( not bHead and vtN:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
end
-- assegno affondamento e offset radiale
@@ -408,7 +427,7 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
else
-- applico controllo del punto entrata lavorazione e se non è distante dall'esterno
-- della feature inverto il punto di inizio della lavorazione
ModifySideInvertLead( Proc, bHead, dToolDiam + ( 2 * dExtra), dLenIni, dLenLst, bFirstTrim, bLastTrim, bFlagInvert, dExtra)
ModifySideInvertLead( Proc, bHead, dToolDiam + ( 2 * dExtra), dLenIni, dLenLst, bFirstTrim, bLastTrim, dExtra)
end
end
end
@@ -434,7 +453,7 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
end
-- verifico se necessario lavorare in doppio
local bDouble = ( dProfDepth + BD.CUT_EXTRA > dToolMaxDepth)
local bDouble = ( dProfDepth + BD.CUT_EXTRA - 100 * GEO.EPS_SMALL > dToolMaxDepth)
local dDepth = min( dToolMaxDepth, dProfDepth / 2 + BD.MILL_OVERLAP)
-- se lavorazione da due parti, aggiungo la seconda
local sMillingDown
@@ -467,14 +486,11 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- resetto il flag inversione percorso
bFlagInvert = false
-- se lavorazione da sopra e da sotto
if ( nSide == 0) then
if vtExtr:getZ() > 0.1 then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = true
end
-- altrimenti lavorazione davanti e dietro
else
@@ -483,14 +499,13 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
( not bHead and vtExtr:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = true
end
end
-- imposto l'affondamento
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
-- posizione braccio porta testa
local nSCC = EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
if BD.TURN then nSCC = MCH_SCC.ADIR_ZP end
if BD.TURN then nSCC = GetSccForTurn( vtN) end
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- variabili per gestione direzione percorso e per gestione lavorazione di finitura opzionale
local bFinish
@@ -514,7 +529,7 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- applico controllo del punto entrata lavorazione e se non è distante dall'esterno
-- della feature inverto il punto di inizio della lavorazione e modifico i parametri dell'attacco
-- e uscita
ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst, bFirstTrim, bLastTrim, bFlagInvert, dOffsetPar)
ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst, bFirstTrim, bLastTrim, dOffsetPar)
end
-- se abilitata, aggiungo lavorazione di finitura
if bFinish then
@@ -548,8 +563,6 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- resetto il flag inversione percorso
bFlagInvert = false
-- se lavorazione da sopra o da sotto
if nSide ~= 0 then
if not bDouble and nSide == -1 then
@@ -558,7 +571,6 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
( not bHead and vtExtr:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
else
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
@@ -566,7 +578,6 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
( not bHead and vtExtr:getY() > 0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
end
-- altrimenti lavorazione dal davanti o dal dietro
@@ -575,14 +586,12 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
if vtExtr:getZ() < 0 then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
-- se lavorazione a destra da dietro o sinistra di fronte, inverto
if ( bHead and vtN:getY() > 0.1) or
( not bHead and vtN:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
end
-- se in doppio, imposto l'affondamento
@@ -591,7 +600,7 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- posizione braccio porta testa
local nSCC = EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
if BD.TURN then nSCC = MCH_SCC.ADIR_ZP end
if BD.TURN then nSCC = GetSccForTurn( vtN) end
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- variabili per gestione direzione percorso e per gestione lavorazione di finitura opzionale
local bFinish
@@ -611,7 +620,7 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- applico controllo del punto entrata lavorazione e se non è distante dall'esterno
-- della feature inverto il punto di inizio della lavorazione e modifico i parametri dell'attacco
-- e uscita
ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst, bFirstTrim, bLastTrim, bFlagInvert, dOffsetPar)
ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst, bFirstTrim, bLastTrim, dOffsetPar)
end
-- se abilitata, aggiungo lavorazione di finitura
if bFinish then
@@ -656,14 +665,27 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_BACK)
else
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.ORTUP_TOP)
EgtSetMachiningParam( MCH_MP.WORKSIDE, 1)
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( (dToolMaxDepth/2), 1))
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( (dToolMaxDepth/2), 1))
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
end
EgtSetMachiningParam( MCH_MP.INVERT, false)
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH')
EgtSetMachiningParam( MCH_MP.STEP, 0)
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
if BD.TURN then EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_ZP) end
if BD.TURN then
local nSCC = GetSccForTurn( vtN, 'V')
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- modifico attacco e uscita per forzare risalita
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dToolDiam / 2)
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.TANGENT)
EgtSetMachiningParam( MCH_MP.LITANG, 20)
EgtSetMachiningParam( MCH_MP.LIPERP, 20)
EgtSetMachiningParam( MCH_MP.LIELEV, 20)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dToolDiam / 2)
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LO.AS_LI)
end
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
@@ -696,8 +718,13 @@ function ProcessProfConcave.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH')
EgtSetMachiningParam( MCH_MP.STEP, 0)
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dWidth, 1))
if BD.TURN then EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_ZP) end
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dWidth, 1))
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
if BD.TURN then
local nSCC = GetSccForTurn( vtN)
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
end
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
+68 -41
View File
@@ -1,10 +1,13 @@
-- ProcessProfConvex.lua by Egaltech s.r.l. 2022/05/28
-- ProcessProfConvex.lua by Egaltech s.r.l. 2023/07/31
-- Gestione calcolo profilo convesso per Travi
-- 2021/05/03 Aggiunta gestione smusso da sopra e sotto per macchina con testa da sotto.
-- 2021/06/28 Per macchine con testa sotto, smussi di lato con questa testa se non c'è lav.ne da sopra.
-- 2022/02/02 Aggiunta funzione OnlyChamfer.
-- 2022/05/24 Aggiunta fresatura da sotto su macchine con testa da sotto.
-- 2022/05/28 Aggiunto calcolo svuotatura da modulo di libreria.
-- 2023/05/25 Sistemazione SCC per TURN.
-- 2023/07/31 Correzione e semplificazione di ModifySideInvertLead per invert.
-- 2023/11/30 Calcolo elevazione velocizzato e centralizzato tramite la funzione GetFaceElevation.
-- Tabella per definizione modulo
local ProcessProfConvex = {}
@@ -88,7 +91,7 @@ end
---------------------------------------------------------------------
local function ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst,
bFirstTrim, bLastTrim, bFlagInvert, dOffsetPar)
bFirstTrim, bLastTrim, dOffsetPar)
-- confronto il punto iniziale e finale della lavorazione con il box della feature
-- e se è vicino alla parte esterna della trave inverto la lavorazione
@@ -96,6 +99,9 @@ local function ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst,
local ptEp = EgtGetMachiningEndPoint()
local nMachMode = EgtGetMachiningParam( MCH_MP.STEPTYPE)
if nMachMode == 1 and ptSP and ptEp then
-- recupero flag inversione direzione di lavorazione
local bInvertMode = EgtGetMachiningParam( MCH_MP.INVERT)
-- verifico se da aggiustare
if abs( EgtIf( bHead, Proc.Box:getMax():getX(), Proc.Box:getMin():getX()) - ptSP:getX()) <
abs( EgtIf( bHead, Proc.Box:getMax():getX(), Proc.Box:getMin():getX()) - ptEp:getX()) then
-- ottengo il lato lavoro e lo inverto
@@ -103,9 +109,14 @@ local function ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst,
if nSideWork > 0 then
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( nSideWork == MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT))
end
-- ottengo l'inversione e setto il contrario
local bInvertMode = EgtGetMachiningParam( MCH_MP.INVERT)
EgtSetMachiningParam( MCH_MP.INVERT, not bInvertMode)
-- imposto il contrario dell'inversione trovata
bInvertMode = not bInvertMode
EgtSetMachiningParam( MCH_MP.INVERT, bInvertMode)
end
-- se lavorazione invertita rispetto a geometria, scambio dati di inizio e fine
if bInvertMode then
dLenIni, dLenLst = dLenLst, dLenIni
bFirstTrim, bLastTrim = bLastTrim, bFirstTrim
end
-- modifico attacco e uscita
if dLenIni and dLenLst then
@@ -119,9 +130,6 @@ local function ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst,
if bLastTrim and dLenLst < dToolDiam / 2 + ( 20 * GEO.EPS_SMALL) then
dEndAddLen = dToolDiam / 2 - dLenLst + dOffsetPar + 1
end
if bFlagInvert then
dStartAddLen, dEndAddLen = dEndAddLen, dStartAddLen
end
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dStartAddLen)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEndAddLen)
end
@@ -195,6 +203,25 @@ local function VerifyCham( Proc, AuxId, nRawId, bMakeVertCham, sDephtCham, sOnly
return nChamfer, dDepth, sMilling, sMilling2
end
---------------------------------------------------------------------
function GetSccForTurn( vtN, sType)
local nSCC
if abs( vtN:getZ()) > abs( vtN:getY()) then
if sType == 'V' then
nSCC = EgtIf( vtN:getZ() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_ZM)
else
nSCC = EgtIf( vtN:getZ() > 0, MCH_SCC.ADIR_ZP, MCH_SCC.ADIR_ZM)
end
else
if sType == 'V' then
nSCC = EgtIf( vtN:getY() > 0, MCH_SCC.ADIR_ZM, MCH_SCC.ADIR_ZP)
else
nSCC = EgtIf( vtN:getY() > 0, MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
end
end
return nSCC
end
---------------------------------------------------------------------
-- Applicazione della lavorazione
function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
@@ -227,8 +254,6 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- acquisisco informazioni sulle facce estreme
local _, _, dLenIni = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFirstFacet, GDB_ID.ROOT)
local _, _, dLenLst = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nLastFacet, GDB_ID.ROOT)
-- flag percorso invertito
local bFlagInvert = false
-- verifico se in testa o coda
local bHead = ( vtN:getX() > 0)
EgtOutLog( 'vtN=' .. tostring( vtN), 3)
@@ -265,7 +290,7 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- aggiungo piano di sgrossatura e lo lavoro
local ptStart, vtNP = GetSawCutData( AuxId, vtN)
local AddId = EgtSurfTmPlaneInBBox( nAddGrpId, ptStart, vtNP, b3Solid, GDB_RT.GLOB)
if AddId and BL.GetFaceElevation( AddId, 0, nPartId) > 20.0 then
if AddId and BL.GetFaceElevation( AddId, 0, b3Solid) > 20.0 then
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
-- se macchina PF o ONE e profilo sopra davanti e pezzo alto applico svuotatura
@@ -286,7 +311,8 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- altrimenti applico taglio di lama
else
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dCurrOvmH)
if not bOk then
return false, sErr
@@ -324,7 +350,6 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
( not bHead and vtExtr:getY() > 0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
-- altrimenti lavorazione dal davanti o dal dietro
else
@@ -333,14 +358,12 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
if vtExtr:getZ() < 0 then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
-- se lavorazione a destra da dietro o sinistra di fronte, inverto
if ( bHead and vtN:getY() > 0.1) or
( not bHead and vtN:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
end
-- assegno affondamento e offset radiale
@@ -358,7 +381,7 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
else
-- applico controllo del punto entrata lavorazione e se non è distante dall'esterno
-- della feature inverto il punto di inizio della lavorazione
ModifySideInvertLead( Proc, bHead, dToolDiam + ( 2 * dExtra), dLenIni, dLenLst, bFirstTrim, bLastTrim, bFlagInvert, dExtra)
ModifySideInvertLead( Proc, bHead, dToolDiam + ( 2 * dExtra), dLenIni, dLenLst, bFirstTrim, bLastTrim, dExtra)
end
-- se lavorazione da due parti, aggiungo la seconda
if bDoubleCham then
@@ -373,8 +396,6 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- resetto il flag inversione percorso
bFlagInvert = false
-- se lavorazione da sopra o da sotto
if nSide ~= 0 then
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
@@ -382,7 +403,6 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
( not bHead and vtExtr:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
else
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
@@ -390,7 +410,6 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
( not bHead and vtN:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
end
-- assegno affondamento e offset radiale
@@ -408,7 +427,7 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
else
-- applico controllo del punto entrata lavorazione e se non è distante dall'esterno
-- della feature inverto il punto di inizio della lavorazione
ModifySideInvertLead( Proc, bHead, dToolDiam + ( 2 * dExtra), dLenIni, dLenLst, bFirstTrim, bLastTrim, bFlagInvert, dExtra)
ModifySideInvertLead( Proc, bHead, dToolDiam + ( 2 * dExtra), dLenIni, dLenLst, bFirstTrim, bLastTrim, dExtra)
end
end
end
@@ -434,7 +453,7 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
end
-- verifico se necessario lavorare in doppio
local bDouble = ( dProfDepth + BD.CUT_EXTRA > dToolMaxDepth)
local bDouble = ( dProfDepth + BD.CUT_EXTRA - 100 * GEO.EPS_SMALL > dToolMaxDepth)
local dDepth = min( dToolMaxDepth, dProfDepth / 2 + BD.MILL_OVERLAP)
-- se lavorazione da due parti, aggiungo la seconda
local sMillingDown
@@ -467,14 +486,11 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- resetto il flag inversione percorso
bFlagInvert = false
-- se lavorazione da sopra e da sotto
if ( nSide == 0) then
if vtExtr:getZ() > 0.1 then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = true
end
-- altrimenti lavorazione davanti e dietro
else
@@ -483,14 +499,13 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
( not bHead and vtExtr:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = true
end
end
-- imposto l'affondamento
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
-- posizione braccio porta testa
local nSCC = EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
if BD.TURN then nSCC = MCH_SCC.ADIR_ZP end
if BD.TURN then nSCC = GetSccForTurn( vtN) end
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- variabili per gestione direzione percorso e per gestione lavorazione di finitura opzionale
local bFinish
@@ -514,7 +529,7 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- applico controllo del punto entrata lavorazione e se non è distante dall'esterno
-- della feature inverto il punto di inizio della lavorazione e modifico i parametri dell'attacco
-- e uscita
ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst, bFirstTrim, bLastTrim, bFlagInvert, dOffsetPar)
ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst, bFirstTrim, bLastTrim, dOffsetPar)
end
-- se abilitata, aggiungo lavorazione di finitura
if bFinish then
@@ -548,8 +563,6 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- resetto il flag inversione percorso
bFlagInvert = false
-- se lavorazione da sopra o da sotto
if nSide ~= 0 then
if not bDouble and nSide == -1 then
@@ -558,7 +571,6 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
( not bHead and vtExtr:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
else
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
@@ -566,7 +578,6 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
( not bHead and vtExtr:getY() > 0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
end
-- altrimenti lavorazione dal davanti o dal dietro
@@ -575,14 +586,12 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
if vtExtr:getZ() < 0 then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
-- se lavorazione a destra da dietro o sinistra di fronte, inverto
if ( bHead and vtN:getY() > 0.1) or
( not bHead and vtN:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
end
-- se in doppio, imposto l'affondamento
@@ -591,7 +600,7 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- posizione braccio porta testa
local nSCC = EgtIf( bHead, MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
if BD.TURN then nSCC = MCH_SCC.ADIR_ZP end
if BD.TURN then nSCC = GetSccForTurn( vtN) end
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- variabili per gestione direzione percorso e per gestione lavorazione di finitura opzionale
local bFinish
@@ -611,7 +620,7 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- applico controllo del punto entrata lavorazione e se non è distante dall'esterno
-- della feature inverto il punto di inizio della lavorazione e modifico i parametri dell'attacco
-- e uscita
ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst, bFirstTrim, bLastTrim, bFlagInvert, dOffsetPar)
ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst, bFirstTrim, bLastTrim, dOffsetPar)
end
-- se abilitata, aggiungo lavorazione di finitura
if bFinish then
@@ -656,14 +665,27 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.PARAL_BACK)
else
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.ORTUP_TOP)
EgtSetMachiningParam( MCH_MP.WORKSIDE, 1)
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( (dToolMaxDepth/2), 1))
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( (dToolMaxDepth/2), 1))
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
end
EgtSetMachiningParam( MCH_MP.INVERT, false)
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH')
EgtSetMachiningParam( MCH_MP.STEP, 0)
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
if BD.TURN then EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_ZP) end
if BD.TURN then
local nSCC = GetSccForTurn( vtN, 'V')
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- modifico attacco e uscita per forzare risalita
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dToolDiam / 2)
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.TANGENT)
EgtSetMachiningParam( MCH_MP.LITANG, 20)
EgtSetMachiningParam( MCH_MP.LIPERP, 20)
EgtSetMachiningParam( MCH_MP.LIELEV, 20)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dToolDiam / 2)
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, MCH_MILL_LO.AS_LI)
end
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
@@ -696,8 +718,13 @@ function ProcessProfConvex.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH')
EgtSetMachiningParam( MCH_MP.STEP, 0)
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dWidth, 1))
if BD.TURN then EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_ZP) end
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dWidth, 1))
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
if BD.TURN then
local nSCC = GetSccForTurn( vtN)
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
end
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
+9 -7
View File
@@ -5,6 +5,7 @@
-- 2022/02/02 Aggiunta funzione OnlyChamfer.
-- 2022/05/24 Aggiunta fresatura da sotto su macchine con testa da sotto.
-- 2022/05/28 Aggiunto calcolo svuotatura da modulo di libreria.
-- 2023/11/30 Calcolo elevazione velocizzato e centralizzato tramite la funzione GetFaceElevation.
-- Tabella per definizione modulo
local ProcessProfFront = {}
@@ -236,7 +237,7 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- aggiungo piano di sgrossatura e lo lavoro
local ptStart, vtNP = GetSawCutData( AuxId, vtN)
local AddId = EgtSurfTmPlaneInBBox( nAddGrpId, ptStart, vtNP, b3Solid, GDB_RT.GLOB)
if AddId and BL.GetFaceElevation( AddId, 0, nPartId) > 20.0 then
if AddId and BL.GetFaceElevation( AddId, 0, b3Solid) > 20.0 then
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
-- se macchina PF o ONE e profilo sopra davanti e pezzo alto applico svuotatura
@@ -257,7 +258,8 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- altrimenti applico taglio di lama
else
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dCurrOvmH)
if not bOk then
return false, sErr
@@ -465,8 +467,7 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
return false, sErr
else
-- applico controllo del punto entrata lavorazione e se non è distante dall'esterno
-- della feature inverto il punto di inizio della lavorazione e modifico i parametri dell'attacco
-- e uscita
-- della feature inverto il punto di inizio della lavorazione
ModifySideInvertLead( Proc, bHead, dToolDiam)
end
-- se abilitata, aggiungo lavorazione di finitura
@@ -554,8 +555,7 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
return false, sErr
else
-- applico controllo del punto entrata lavorazione e se non è distante dall'esterno
-- della feature inverto il punto di inizio della lavorazione e modifico i parametri dell'attacco
-- e uscita
-- della feature inverto il punto di inizio della lavorazione
ModifySideInvertLead( Proc, bHead, dToolDiam)
end
-- se abilitata, aggiungo lavorazione di finitura
@@ -602,7 +602,9 @@ function ProcessProfFront.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH')
EgtSetMachiningParam( MCH_MP.STEP, 0)
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dWidth, 1))
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dWidth, 1))
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- imposto tipo uso faccia
local nFaceUse = MCH_MILL_FU.PARAL_DOWN
if nSide == -1 then
+28 -33
View File
@@ -1,4 +1,4 @@
-- ProcessProfHead.lua by Egaltech s.r.l. 2022/05/28
-- ProcessProfHead.lua by Egaltech s.r.l. 2023/07/31
-- Gestione calcolo profilo di testa per Travi
-- 2021/05/03 Aggiunta gestione smusso da sopra e sotto per macchina con testa sotto.
-- 2021/06/28 Per macchine con testa sotto, smussi di lato con questa testa se non c'è lav.ne da sopra.
@@ -6,6 +6,8 @@
-- 2022/02/02 Aggiunta funzione OnlyChamfer.
-- 2022/05/24 Aggiunta fresatura da sotto su macchine con testa da sotto.
-- 2022/05/28 Aggiunto calcolo svuotatura da modulo di libreria.
-- 2023/07/31 Correzione e semplificazione di ModifySideInvertLead per invert.
-- 2023/11/30 Calcolo elevazione velocizzato e centralizzato tramite la funzione GetFaceElevation.
-- Tabella per definizione modulo
local ProcessProfHead = {}
@@ -81,7 +83,7 @@ end
---------------------------------------------------------------------
local function ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst,
bFirstTrim, bLastTrim, bFlagInvert, dOffsetPar)
bFirstTrim, bLastTrim, dOffsetPar)
-- confronto il punto iniziale e finale della lavorazione con il box della feature
-- e se è vicino alla parte esterna della trave inverto la lavorazione
@@ -89,6 +91,9 @@ local function ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst,
local ptEp = EgtGetMachiningEndPoint()
local nMachMode = EgtGetMachiningParam( MCH_MP.STEPTYPE)
if nMachMode == 1 and ptSP and ptEp then
-- recupero flag inversione direzione di lavorazione
local bInvertMode = EgtGetMachiningParam( MCH_MP.INVERT)
-- verifico se da aggiustare
if abs( EgtIf( bHead, Proc.Box:getMax():getX(), Proc.Box:getMin():getX()) - ptSP:getX()) <
abs( EgtIf( bHead, Proc.Box:getMax():getX(), Proc.Box:getMin():getX()) - ptEp:getX()) then
-- ottengo il lato lavoro e lo inverto
@@ -96,9 +101,14 @@ local function ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst,
if nSideWork > 0 then
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( nSideWork == MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT, MCH_MILL_WS.LEFT))
end
-- ottengo l'inversione e setto il contrario
local bInvertMode = EgtGetMachiningParam( MCH_MP.INVERT)
EgtSetMachiningParam( MCH_MP.INVERT, not bInvertMode)
-- imposto il contrario dell'inversione trovata
bInvertMode = not bInvertMode
EgtSetMachiningParam( MCH_MP.INVERT, bInvertMode)
end
-- se lavorazione invertita rispetto a geometria, scambio dati di inizio e fine
if bInvertMode then
dLenIni, dLenLst = dLenLst, dLenIni
bFirstTrim, bLastTrim = bLastTrim, bFirstTrim
end
-- modifico attacco e uscita
if dLenIni and dLenLst then
@@ -112,9 +122,6 @@ local function ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni, dLenLst,
if bLastTrim and dLenLst < dToolDiam / 2 + ( 20 * GEO.EPS_SMALL) then
dEndAddLen = dToolDiam / 2 - dLenLst + dOffsetPar + 1
end
if bFlagInvert then
dStartAddLen, dEndAddLen = dEndAddLen, dStartAddLen
end
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dStartAddLen)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEndAddLen)
end
@@ -224,8 +231,6 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- acquisisco informazioni sulle facce estreme
local _, _, dLenIni = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nFirstFacet, GDB_ID.ROOT)
local _, _, dLenLst = EgtSurfTmFacetMinAreaRectangle( Proc.Id, nLastFacet, GDB_ID.ROOT)
-- flag percorso invertito
local bFlagInvert = false
-- verifico se in testa o coda
local bHead = ( vtN:getX() > 0)
EgtOutLog( 'vtN=' .. tostring( vtN), 3)
@@ -267,7 +272,7 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- aggiungo piano di sgrossatura e lo lavoro
local ptStart, vtNP = GetSawCutData( AuxId, vtN)
local AddId = EgtSurfTmPlaneInBBox( nAddGrpId, ptStart, vtNP, b3Solid, GDB_RT.GLOB)
if AddId and BL.GetFaceElevation( AddId, 0, nPartId) > 20.0 then
if AddId and BL.GetFaceElevation( AddId, 0, b3Solid) > 20.0 then
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
-- se macchina PF o ONE e profilo sopra davanti e pezzo alto applico svuotatura
@@ -288,7 +293,8 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- altrimenti applico taglio di lama
else
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dCurrOvmH)
if not bOk then
return false, sErr
@@ -326,7 +332,6 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
( not bHead and vtExtr:getY() > 0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
-- altrimenti lavorazione dal davanti o dal dietro
else
@@ -335,14 +340,12 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
if vtExtr:getZ() < 0 then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
-- se lavorazione a destra da dietro o sinistra di fronte, inverto
if ( bHead and vtN:getY() > 0.1) or
( not bHead and vtN:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
end
-- assegno affondamento e offset radiale
@@ -361,7 +364,7 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- applico controllo del punto entrata lavorazione e se non è distante dall'esterno
-- della feature inverto il punto di inizio della lavorazione
ModifySideInvertLead( Proc, bHead, dToolDiam + ( 2 * dExtra), dLenIni,
dLenLst, ( #vAngs > 0 and vAngs[1] == 0), ( #vAngs > 0 and vAngs[#vAngs] == (Proc.Fct-2)), bFlagInvert, dExtra)
dLenLst, ( #vAngs > 0 and vAngs[1] == 0), ( #vAngs > 0 and vAngs[#vAngs] == (Proc.Fct-2)), dExtra)
end
-- se lavorazione da due parti, aggiungo la seconda
if bDoubleCham then
@@ -376,8 +379,6 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- resetto il flag inversione percorso
bFlagInvert = false
-- se lavorazione da sopra o da sotto
if nSide ~= 0 then
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
@@ -385,7 +386,6 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
( not bHead and vtExtr:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
-- altrimenti lavorazione dal davanti o dal dietro
else
@@ -394,7 +394,6 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
( not bHead and vtN:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
end
-- assegno affondamento e offset radiale
@@ -413,7 +412,7 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- applico controllo del punto entrata lavorazione e se non è distante dall'esterno
-- della feature inverto il punto di inizio della lavorazione
ModifySideInvertLead( Proc, bHead, dToolDiam + ( 2 * dExtra), dLenIni,
dLenLst, ( #vAngs > 0 and vAngs[1] == 0), ( #vAngs > 0 and vAngs[#vAngs] == (Proc.Fct-2)), bFlagInvert, dExtra)
dLenLst, ( #vAngs > 0 and vAngs[1] == 0), ( #vAngs > 0 and vAngs[#vAngs] == (Proc.Fct-2)), dExtra)
end
end
end
@@ -473,8 +472,6 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- resetto il flag inversione percorso
bFlagInvert = false
-- se lavorazione da sopra e da sotto
if ( nSide == 0) then
if vtExtr:getZ() > 0.1 then
@@ -517,7 +514,7 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- della feature inverto il punto di inizio della lavorazione e modifico i parametri dell'attacco
-- e uscita
ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni,
dLenLst, ( #vAngs > 0 and vAngs[1] == 0), ( #vAngs > 0 and vAngs[#vAngs] == (Proc.Fct-2)), bFlagInvert, dOffsetPar)
dLenLst, ( #vAngs > 0 and vAngs[1] == 0), ( #vAngs > 0 and vAngs[#vAngs] == (Proc.Fct-2)), dOffsetPar)
end
-- se abilitata, aggiungo lavorazione di finitura
if bFinish then
@@ -551,8 +548,6 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- resetto il flag inversione percorso
bFlagInvert = false
-- se lavorazione da sopra o da sotto
if nSide ~= 0 then
if not bDouble and nSide == -1 then
@@ -561,7 +556,6 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
( not bHead and vtExtr:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
else
-- se lavorazione a destra di fronte o sinistra da dietro, inverto
@@ -569,7 +563,6 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
( not bHead and vtExtr:getY() > 0.1) then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
end
-- altrimenti lavorazione dal davanti o dal dietro
@@ -578,14 +571,12 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
if vtExtr:getZ() < 0 then
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
-- se lavorazione a destra da dietro o sinistra di fronte, inverto
if ( bHead and vtN:getY() > 0.1) or
( not bHead and vtN:getY() < -0.1) then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
EgtSetMachiningParam( MCH_MP.INVERT, true)
bFlagInvert = not bFlagInvert
end
end
-- se in doppio, imposto l'affondamento
@@ -613,7 +604,7 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
-- della feature inverto il punto di inizio della lavorazione e modifico i parametri dell'attacco
-- e uscita
ModifySideInvertLead( Proc, bHead, dToolDiam, dLenIni,
dLenLst, ( #vAngs > 0 and vAngs[1] == 0), ( #vAngs > 0 and vAngs[#vAngs] == (Proc.Fct-2)), bFlagInvert, dOffsetPar)
dLenLst, ( #vAngs > 0 and vAngs[1] == 0), ( #vAngs > 0 and vAngs[#vAngs] == (Proc.Fct-2)), dOffsetPar)
end
-- se abilitata, aggiungo lavorazione di finitura
if bFinish then
@@ -666,7 +657,9 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH')
EgtSetMachiningParam( MCH_MP.STEP, 0)
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dElev, 1))
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dElev, 1))
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- imposto posizione braccio
local nSCC = MCH_SCC.ADIR_YM
if nSide == 0 then
@@ -706,7 +699,9 @@ function ProcessProfHead.Make( Proc, nPhase, nRawId, nPartId, dCurrOvmH)
EgtSetMachiningParam( MCH_MP.DEPTH_STR, 'TH')
EgtSetMachiningParam( MCH_MP.STEP, 0)
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dElev, 1))
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dElev, 1))
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- imposto posizione braccio
local nSCC = MCH_SCC.ADIR_YM
if nSide == 0 then
+39 -15
View File
@@ -1,4 +1,4 @@
-- ProcessRidgeLap.lua by Egaltech s.r.l. 2021/09/10
-- ProcessRidgeLap.lua by Egaltech s.r.l. 2023/08/10
-- Gestione calcolo mezzolegno di testa per Travi
-- Tabella per definizione modulo
@@ -10,6 +10,7 @@ local BL = require( 'BeamLib')
local Fbs = require( 'FacesBySaw')
local Cut = require( 'ProcessCut')
local DC = require( 'DiceCut')
local LapJoint = require( 'ProcessLapJoint')
EgtOutLog( ' ProcessRidgeLap started', 1)
@@ -26,8 +27,8 @@ end
---------------------------------------------------------------------
-- Classificazione della feature
function ProcessRidgeLap.Classify( Proc, b3Raw)
-- se PF con testa da sotto, ammessa qualunque orientazione
if BD.C_SIMM and BD.DOWN_HEAD then
-- se PF con testa da sotto oppure TURN, ammessa qualunque orientazione
if ( BD.C_SIMM and BD.DOWN_HEAD) or BD.TURN then
return true, false
end
-- Se più corta del limite si può fare anche da sotto
@@ -48,6 +49,8 @@ end
---------------------------------------------------------------------
-- Applicazione della lavorazione
function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
local nForceUseBladeOnNotContinueFace = EgtGetInfo( Proc.Id, 'Q04', 'i') or 0
local bUseMill = ( EgtGetInfo( Proc.Id, 'Q05', 'i') or 0) == 1
-- recupero l'ingombro del grezzo di appartenenza
local b3Raw = EgtGetRawPartBBox( nRawId)
-- ingombro del pezzo
@@ -132,9 +135,20 @@ function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- applico taglio di lama
local b3Cut = EgtGetBBoxGlob( AddId or GDB_ID.NULL, GDB_BB.STANDARD)
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Cut, Fct = 1, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead, false)
if not bOk then return bOk, sErr end
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
if BL.IsCutNeeded( CutProc, b3Raw, dOvmHead) then
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead, false)
if not bOk then return bOk, sErr end
elseif bUseMill then
Proc.bForceMill = true
return LapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
elseif nForceUseBladeOnNotContinueFace > 0 then
EgtSurfTmRemoveFacet( Proc.Id, vFaceOrd[1] - 1)
Proc.Fct = Proc.Fct - 1
Proc.Face = BL.GetFacetsInfo( Proc, b3Raw)
return LapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
end
end
-- recupero gruppo per geometria addizionale
@@ -159,18 +173,18 @@ function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
-- calcolo riferimenti per facce inclinate
local vtRef = Vector3d( vtN[vFaceOrd[3]])
local vtRef2 = EgtIf( bHead, X_AX(), -X_AX())
local vtRef2 = Vector3d( vtN[vFaceOrd[2]])
-- eseguo
for i = 1, #vCuts do
local nOrthoOpposite
local vtOrtho
if i % 2 == 1 then
nOrthoOpposite = BL.GetNearestOrthoOpposite( vtRef)
vtOrtho = vtRef
else
nOrthoOpposite = BL.GetNearestOrthoOpposite( vtRef2)
vtOrtho = vtRef2
end
-- lavoro la faccia
for j = 1, #vCuts[i] do
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, nOrthoOpposite, dVzLimDwnUp, 0, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrtho, dVzLimDwnUp, 0, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
if not bOk then
return bOk, sErr
end
@@ -195,20 +209,30 @@ function ProcessRidgeLap.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- aggiornamento ingombro di testa o coda
if Proc.Head then
local dHCI = 0
if abs( vtN[vFaceOrd[3]]:getZ()) > 0.1 then
if vtN[vFaceOrd[3]]:getZ() > 0.1 then
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
if b3Fac1 then dHCI = b3Raw:getMax():getX() - dOvmHead - b3Fac1:getMin():getX() end
else
dHCI = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
-- se feature inclinata, si va oltre ingombro del box. Si considera metà dell'ingombro della faccia inclinata
if vtN[vFaceOrd[2]] and vtN[vFaceOrd[2]]:getZ() > 0 then
dHCI = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX() - ( vtN[vFaceOrd[2]]:getZ() * b3Raw:getDimZ())
else
dHCI = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
end
end
BL.UpdateHCING( nRawId, dHCI)
elseif Proc.Tail then
local dTCI = 0
if abs( vtN[vFaceOrd[3]]:getZ()) > 0.1 then
if vtN[vFaceOrd[3]]:getZ() > 0.1 then
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
if b3Fac1 then dTCI = b3Fac1:getMax():getX() - b3Solid:getMin():getX() end
else
dTCI = Proc.Box:getMax():getX() - b3Solid:getMin():getX()
-- se feature inclinata, si va oltre ingombro del box. Si considera metà dell'ingombro della faccia inclinata
if vtN[vFaceOrd[2]] and vtN[vFaceOrd[2]]:getZ() > 0 then
dTCI = Proc.Box:getMax():getX() - b3Solid:getMin():getX() - ( vtN[vFaceOrd[2]]:getZ() * b3Raw:getDimZ())
else
dTCI = Proc.Box:getMax():getX() - b3Solid:getMin():getX()
end
end
BL.UpdateTCING( nRawId, dTCI)
end
+40 -16
View File
@@ -1,4 +1,4 @@
-- ProcessRoundArch.lua by Egaltech s.r.l. 2021/01/29
-- ProcessRoundArch.lua by Egaltech s.r.l. 2023/12/07
-- Gestione calcolo archi per Travi
-- Tabella per definizione modulo
@@ -93,6 +93,8 @@ function ProcessRoundArch.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
EgtOutLog( sErr)
return false, sErr
end
-- normale alla superficie nel mezzo
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, Proc.Fct // 2, GDB_RT.GLOB)
-- recupero e verifico l'entità curva
local AuxId = EgtGetInfo( Proc.Id, 'AUXID', 'i')
if AuxId then AuxId = AuxId + Proc.Id end
@@ -116,10 +118,13 @@ function ProcessRoundArch.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
-- recupero i dati dell'utensile
local dMaxDepth = 0
local bCW = true
if EgtMdbSetCurrMachining( sMilling) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
local dSpeed = EgtMdbGetCurrMachiningParam( MCH_MP.SPEED) or 0
bCW = ( dSpeed >= 0)
end
end
-- ne verifico la lunghezza per eventuale spezzatura e lavorazione in doppio
@@ -178,6 +183,10 @@ function ProcessRoundArch.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
end
end
-- se lavorazione in doppio senza codolo, aggiungo sovrapposizione
if nDouble == 2 and dDimStrip < 10 * GEO.EPS_SMALL then
dDepth = dDepth + BD.MILL_OVERLAP / 2
end
-- se utensile orizzontale verso Y+, non in doppio e codolo da lasciare, devo invertire per lavorare sempre da Y-
if vtExtr:getY() > 0.707 and nDouble == 1 and bStripOnSide then
bToolInv = true
@@ -186,7 +195,7 @@ function ProcessRoundArch.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
for i = 1, nStep do
for j = 1, nDouble do
-- inserisco la lavorazione
local sName = 'Free_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local sName = 'Arch_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMchId = EgtAddMachining( sName, sMilling)
if not nMchId then
local sErr = 'Error adding machining ' .. sName .. '-' .. sMilling
@@ -210,25 +219,40 @@ function ProcessRoundArch.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
end
-- se seconda passata, inverto direzione di lavoro
if j == 2 then
EgtSetMachiningParam( MCH_MP.INVERT, true)
if ( j == 1 and not bToolInv) or ( j == 2 and bToolInv) then
EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bCW, true, false))
else
EgtSetMachiningParam( MCH_MP.INVERT, EgtIf( bCW, false, true))
end
-- assegno affondamento
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
-- assegno lato di lavoro
if bToolInv then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
else
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
end
-- assegno lato di lavoro (per avere lavorazione climb)
EgtSetMachiningParam( MCH_MP.WORKSIDE, EgtIf( bCW, MCH_MILL_WS.LEFT, MCH_MILL_WS.RIGHT))
-- posizione braccio porta testa
if Proc.Head then
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_XP)
elseif Proc.Tail then
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_XM)
elseif AreSameOrOppositeVectorApprox( vtExtr, Z_AX()) then
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YP)
local nSCC = MCH_SCC.NONE
if not BD.C_SIMM and not BD.TURN then
nSCC = MCH_SCC.ADIR_XP
if Proc.Head then
nSCC = MCH_SCC.ADIR_XP
elseif Proc.Tail then
nSCC = MCH_SCC.ADIR_XM
elseif AreSameOrOppositeVectorApprox( vtExtr, Z_AX()) then
nSCC = MCH_SCC.ADIR_YP
end
elseif BD.TURN == 2 then
nSCC = MCH_SCC.ADIR_ZP
elseif BD.TURN then
if vtN:getZ() > 0.707 then
nSCC = MCH_SCC.ADIR_ZP
elseif vtN:getZ() < -0.707 then
nSCC = MCH_SCC.ADIR_ZM
elseif vtN:getY() > 0.707 then
nSCC = MCH_SCC.ADIR_YP
elseif vtN:getY() < -0.707 then
nSCC = MCH_SCC.ADIR_YM
end
end
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
+13 -4
View File
@@ -1,6 +1,8 @@
-- ProcessSawCut.lua by Egaltech s.r.l. 2022/03/07
-- ProcessSawCut.lua by Egaltech s.r.l. 2022/12/19
-- Gestione calcolo taglio di lama per Travi
-- 2022/06/10 Aggiunto il parametro dOvmTail per gestire sovramateriali in coda diversi da OVM_MID (sezioni alte e larghe)
-- 2022/06/10 Aggiunto il parametro dOvmTail per gestire sovramateriali in coda diversi da OVM_MID (sezioni alte e larghe).
-- 2022/12/19 Aggiunta gestione testa da sotto.
-- 2024/01/18 Implementata GetBlockedAxis che gestisce gli assi bloccati per tutti i tipi di utensile.
-- Tabella per definizione modulo
local ProcessSawCut = {}
@@ -80,8 +82,12 @@ function ProcessSawCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmTail)
end
-- recupero flag per inizio e fine interni
local bInside = (( EgtGetInfo( Proc.Id, 'Q01', 'i') or 0) ~= 0)
-- abilitazione lavorazione da sotto
local bDownHead = ( BD.DOWN_HEAD and vtDir:getZ() < -0.341)
local bTopHead = ( BD.DOWN_HEAD and ( vtDir:getZ() > -0.342 or not bDownHead))
-- recupero la lavorazione
local sCutting = ML.FindCutting( 'HeadSide')
local sCutting
sCutting, bDownHead = ML.FindCutting( 'HeadSide', bTopHead, bDownHead)
if not sCutting then
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' cutting not found in library'
EgtOutLog( sErr)
@@ -101,7 +107,7 @@ function ProcessSawCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmTail)
end
-- determino se lavorazione da davanti o da dietro e se da sotto
local bFront = ( vtDir ^ vtN):getX() > 0
local bDownUp = ( vtN:getZ() < -0.259)
local bDownUp = ( not bDownHead and vtN:getZ() < -0.259)
local bFillAreaPiece
-- se non da sotto
if not bDownUp then
@@ -224,6 +230,9 @@ function ProcessSawCut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmTail)
EgtSetMachiningParam( MCH_MP.SCC, nSCC)
-- imposto uso della faccia
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
-- imposto angolo 3° asse rot
local vtOut = EgtIf( vtN:getX() > 0, X_AX(), -X_AX())
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetBlockedAxis( sCutting, 'perpendicular', b3Raw, vtN, vtOut))
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
+93 -12
View File
@@ -3,6 +3,8 @@
-- 2021/06/28 Aggiunto extra-taglio alle lamate orizzontali.
-- 2022/06/10 Aggiunto il parametro dOvmTail per gestire sovramateriali in coda diversi da OVM_MID (sezioni alte e larghe)
-- 2022/07/12 Aggiunta gestione PF1250 e TURN.
-- 2023/02/14 Gestite le rotazioni di 90 deg nell'aggiornamento del grezzo.
-- 2024/09/03 In ApplyDiceCut, se possibile, i tagli paralleli sono fatti con un unico passaggio di fianco.
-- Tabella per definizione modulo
local ProcessScarfJoint = {}
@@ -100,7 +102,7 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
EgtSetOperationMode( nMch1Id, false)
return false, sErr
end
-- Inserisco la lavorazione del lato opposto
@@ -123,7 +125,7 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
EgtSetOperationMode( nMch2Id, false)
return false, sErr
end
return true
@@ -133,7 +135,9 @@ end
local function ApplyDiceCut( vFaceOrd, nGoodFace1, nGoodFace4, nAddGrpId, b3Solid, ptC, vtN, Proc, vtRef, bHead, sCutting, dSawDiam, b3Raw, dNewDiceDim)
local bOk = true
local bOk2 = true
local sErr = ''
local sErr2 = ''
local vCuts = {}
if nGoodFace1 and nGoodFace4 and nGoodFace1 > 0 and nGoodFace4 > 0 then
@@ -184,9 +188,74 @@ local function ApplyDiceCut( vFaceOrd, nGoodFace1, nGoodFace4, nAddGrpId, b3Soli
-- extra taglio
local dExtraCut = EgtIf( i % 2 == 1, 0, BD.CUT_EXTRA)
-- lavoro la faccia
for j = 1, #vCuts[i] do
bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dExtraCut, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
if not bOk then return bOk, sErr end
local dMaxDepth = 0
if EgtMdbSetCurrMachining( sCutting) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
end
end
-- se non ho intersezione con la faccia tappo posso fare il taglio sul fianco
if not nGoodFace1 or nGoodFace1 == 0 then
-- controllo per eseguire solo un taglio ottimizzato
local bExecJustOneCut = false
local dDiceFaceDim = GEO.INFINITO
if ( i % 2) == 0 then
for cont = 1, #vCuts[i] do
local _, dDiceFaceH, dDiceFaceV = BL.GetFaceHvRefDim( vCuts[i][cont], 0)
-- se feature verso Z, si ammette anche lavorazione in doppio
if AreSameVectorApprox( vtRef, Z_AX()) then
if dMaxDepth * 2 > dDiceFaceH + BD.CUT_EXTRA then
bExecJustOneCut = true
dDiceFaceDim = dDiceFaceH
break
end
elseif AreSameVectorApprox( vtRef, Y_AX()) or AreSameVectorApprox( vtRef, -Y_AX()) then
if dMaxDepth > dDiceFaceV + BD.CUT_EXTRA then
bExecJustOneCut = true
dDiceFaceDim = dDiceFaceV
break
end
end
end
end
-- se c'è intersezione non ci deve essere ExtraCut
else
dExtraCut = 0
end
-- se si può fare, faccio unico taglio parallelo
if bExecJustOneCut then
local bDoubleCut = false
local dCutExtra = BD.CUT_EXTRA
if dMaxDepth < dDiceFaceDim then
bDoubleCut = true
end
local nSurfToCut = EgtSurfTmBySewing( nAddGrpId, vCuts[i], false)
local nFaceUseCut1, nFaceUseCut2
-- se feature rivolta verso alto setto direzione taglio davanti e dietro
if AreSameVectorApprox( vtRef, Z_AX()) then
nFaceUseCut1, nFaceUseCut2 = MCH_MILL_FU.ORTHO_BACK, MCH_MILL_FU.ORTHO_FRONT
-- altrimenti taglio da sopra
else
nFaceUseCut2 = MCH_MILL_FU.ORTHO_DOWN
end
if Proc.Tail and AreSameVectorApprox( vtRef, Z_AX()) then
nFaceUseCut1, nFaceUseCut2 = nFaceUseCut2, nFaceUseCut1
end
if bDoubleCut then
bOk, sErr = Fbs.MakeOne( nSurfToCut, 0, sCutting, dSawDiam, nFaceUseCut1, nil, dCutExtra, BD.CUT_SIC, 0, 0, 0, '', b3Raw, true)
if not bOk then return false, sErr end
end
bOk2, sErr2 = Fbs.MakeOne( nSurfToCut, 0, sCutting, dSawDiam, nFaceUseCut2, nil, dCutExtra, BD.CUT_SIC, 0, 0, 0, '', b3Raw)
if not bOk2 then return false, sErr2 end
else
for j = 1, #vCuts[i] do
bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, dExtraCut, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
if not bOk then return bOk, sErr end
end
end
end
-- lavoro la faccia interna in ogni caso
@@ -200,7 +269,7 @@ local function ApplyDiceCut( vFaceOrd, nGoodFace1, nGoodFace4, nAddGrpId, b3Soli
if vFaceOrd[3] ~= 0 then
-- inserisco la lavorazione
local vtOrthoO = Vector3d( vtRef)
local bOk, sErr = Fbs.MakeOne( Proc.Id, vFaceOrd[3] - 1, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, 0, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
bOk, sErr = Fbs.MakeOne( Proc.Id, vFaceOrd[3] - 1, sCutting, dSawDiam, vtOrthoO, dVzLimDwnUp, 0, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
if not bOk then return bOk, sErr end
end
end
@@ -380,7 +449,7 @@ function ProcessScarfJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmTa
if not nGoodFace1 or nGoodFace1 == 0 then
-- inserisco la lavorazione
local vtRef2 = EgtIf( abs(vtRef:getZ()) < GEO.EPS_SMALL, Z_AX(), EgtIf( bHead, Y_AX(), -Y_AX()))
bOkd, sErrD = Fbs.MakeOne( nFace4, nGoodFace4 - 1, sCutting, dSawDiam, vtRef2, nil, 0, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
bOkd, sErrD = Fbs.MakeOne( nFace4, nGoodFace4 - 1, sCutting, dSawDiam, vtRef2, nil, BD.CUT_EXTRA, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
if not bOkd then return bOkd, sErrD end
-- lavoro la faccia opposta (definita dal parametro P11)
if vFaceOrd[3] ~= 0 then
@@ -459,10 +528,20 @@ function ProcessScarfJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmTa
else
dDiamMax = EgtIf( abs( frMor:getVersX():getY()) < abs( frMor:getVersY():getY()), dL, dW)
end
-- determino la distanza tra le due facce inclinate
-- determino la distanza tra le due facce inclinate per determinare elevazione
local dDistFaces
if vFaceOrd[4] ~= 0 then
dDistFaces = abs((ptC[vFaceOrd[2]]-ptC[vFaceOrd[4]])*vtN[vFaceOrd[2]])
local nElevationFace1 = 0
-- controllo estensione faccia 1
if vFaceOrd[1] ~= 0 then
frMor, dL, dW = EgtSurfTmFacetMinAreaRectangle( Proc.Id, vFaceOrd[1]-1, GDB_ID.ROOT)
if abs(vtRef:getY()) > 0.866 then
nElevationFace1 = EgtIf( abs( frMor:getVersX():getZ()) < abs( frMor:getVersY():getY()), dL, dW)
else
nElevationFace1 = EgtIf( abs( frMor:getVersX():getY()) < abs( frMor:getVersY():getY()), dL, dW)
end
end
dDistFaces = max( abs((ptC[vFaceOrd[2]]-ptC[vFaceOrd[4]])*vtN[vFaceOrd[2]]), nElevationFace1)
end
-- recupero la lavorazione. considerando l dimensione del lato e l'affondamento
local sPocketing
@@ -499,7 +578,9 @@ function ProcessScarfJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmTa
EgtSetMachiningGeometry( {{ Proc.Id, vFaceOrd[2]-1}})
-- imposto elevazione
if dDistFaces then
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dDistFaces, 1) .. ';')
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dDistFaces, 1))
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
end
-- eseguo
if not ML.ApplyMachining( true, false) then
@@ -512,7 +593,7 @@ function ProcessScarfJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmTa
-- aggiornamento ingombro di testa o coda
if Proc.Head then
local dHCI = 0
if abs( vtRef:getZ()) > 0.1 then
if abs( vtRef:getZ()) > 0.1 and not BD.ROT90 then
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
if b3Fac1 then dHCI = b3Raw:getMax():getX() - dOvmHead - b3Fac1:getMin():getX() end
dHCI = 0.75 * dHCI
@@ -522,7 +603,7 @@ function ProcessScarfJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmTa
BL.UpdateHCING( nRawId, dHCI)
elseif Proc.Tail then
local dTCI = 0
if abs( vtRef:getZ()) > 0.1 then
if abs( vtRef:getZ()) > 0.1 and not BD.ROT90 then
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
if b3Fac1 then dTCI = b3Fac1:getMax():getX() - b3Solid:getMin():getX() end
dTCI = 0.75 * dTCI
+7 -5
View File
@@ -3,6 +3,8 @@
-- 2022/06/10 Aggiunto il parametro dOvmTail per gestire sovramateriali in coda diversi da OVM_MID (sezioni alte e larghe)
-- 2022/08/09 Ora se la feature ha meno di due facce viene richiamata la normale Cut.
-- 2022/11/09 Aggiunta gestione parametro Q04 per forzare utilizzo fresa di lato e lavorare come FreeContour.
-- 2023/02/14 Gestite le rotazioni di 90 deg nell'aggiornamento del grezzo.
-- 2024/08/05 Se assimilabile ad un taglio (1 faccia) si considerare area non pinzabile testa/coda
-- Tabella per definizione modulo
local ProcessSimpleScarf = {}
@@ -100,7 +102,7 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
EgtSetOperationMode( nMch1Id, false)
return false, sErr
end
-- Inserisco la lavorazione del lato opposto
@@ -123,7 +125,7 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
EgtSetOperationMode( nMch2Id, false)
return false, sErr
end
return true
@@ -147,7 +149,7 @@ function ProcessSimpleScarf.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmT
-- se ci sono meno di due facce si riduce a una normale Cut
local nFacetCnt = EgtSurfTmFacetCount( Proc.Id)
if nFacetCnt < 2 then
local bOk, sErr = Cut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, nil, nil, nil, nil, nil, dOvmTail)
local bOk, sErr = Cut.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, nil, nil, nil, nil, nil, dOvmTail, true)
return bOk, sErr
end
-- dati delle facce
@@ -317,7 +319,7 @@ function ProcessSimpleScarf.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmT
-- aggiornamento ingombro di testa o coda
if Proc.Head then
local dHCI = 0
if abs( vtRef:getZ()) > 0.1 then
if abs( vtRef:getZ()) > 0.1 and not BD.ROT90 then
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
if b3Fac1 then dHCI = b3Raw:getMax():getX() - dOvmHead - b3Fac1:getMin():getX() end
else
@@ -326,7 +328,7 @@ function ProcessSimpleScarf.Make( Proc, nPhase, nRawId, nPartId, dOvmHead, dOvmT
BL.UpdateHCING( nRawId, dHCI)
elseif Proc.Tail then
local dTCI = 0
if abs( vtRef:getZ()) > 0.1 then
if abs( vtRef:getZ()) > 0.1 and not BD.ROT90 then
local b3Fac1 = EgtSurfTmGetFacetBBoxGlob( Proc.Id, vFaceOrd[1] - 1, GDB_BB.STANDARD)
if b3Fac1 then dTCI = b3Fac1:getMax():getX() - b3Solid:getMin():getX() end
else
+607 -169
View File
@@ -1,4 +1,4 @@
-- ProcessSplit.lua by Egaltech s.r.l. 2022/11/30
-- ProcessSplit.lua by Egaltech s.r.l. 2023/05/09
-- Gestione calcolo tagli di separazione per Travi
-- 2022/05/31 Aggiunta gestione sezioni alte e larghe con taglio con sega a catena seguito da rifinitura con lama (aggiunta funzione MakeSplitByChainSaw); gestione eventuale creazione nuova fase dall'interno della Make.
-- 2022/06/10 Per sezioni alte e larghe aggiunta gestione finitura in base a sovramateriale e a parametro Q05 dell' eventuale lavorazione sostituita.
@@ -8,6 +8,18 @@
-- 2022/11/10 Corrette finiture lama per BigSection con trave alta
-- 2022/11/16 Correzioni per travi larghe
-- 2022/11/30 Correzione per tagli su grandi sezioni (dopo taglio con sega a catena senza finitura aggiungeva uno split con lama).
-- 2023/04/04 Modifiche per travi con sezioni molto grandi e materiale inferiore allo spessore lama.
-- 2023/04/20 Per travi alte aggiunti tagli orizzontali per ridurre le dimensioni degli scarti.
-- 2023/05/09 Aggiunta richiesta risalita preliminare a Zmax per tagli da sopra su macchine PF e ONE.
-- 2023/06/13 Corrette note Precut e Cut per tagli aggiuntivi orizzontali.
-- 2023/08/02 Corretto calcolo allungamenti/accorciamenti pezzi alti per contemplare anche taglio singolo.
-- 2023/10/17 Corretto calcolo allungamenti/accorciamenti per evitare lunghezze del percorso negative.
-- 2024/01/18 Gestita lama con aggregato con asse bloccato per massimizzare capacità di taglio verticale, se da sotto
-- Implementato split per pezzi molto alti con mix sega a catena + lama
-- Implementata GetBlockedAxis che gestisce gli assi bloccati per tutti i tipi di utensile.
-- 2024/01/22 Nei tagli verticali aggiuntivi si usa ora BD.MAX_LEN_DICE come dimensione (era BD.MAX_DIM_DICE).
-- 2024/01/23 Nello split con sega a catena ora si cerca di preferenza una lavorazione di tipo 'SawingForSplitting'. Se non trovata si cerca il tipo 'Sawing' come in precedenza.
-- In split con sega a catena aggiunta estensione start/end del percorso se utensile lungo, per evitare collisioni con il pezzo durante rotazione.
-- Tabella per definizione modulo
local ProcessSplit = {}
@@ -18,6 +30,7 @@ local BL = require( 'BeamLib')
local Fbs = require( 'FacesBySaw')
local Cut = require( 'ProcessCut')
local Pocket = require( 'FaceByPocket')
local Topology = require( 'FeatureTopology')
EgtOutLog( ' ProcessSplit started', 1)
@@ -25,6 +38,10 @@ EgtOutLog( ' ProcessSplit started', 1)
local BD = require( 'BeamData')
local ML = require( 'MachiningLib')
if BD.PRECUT_TAIL == nil then
BD.PRECUT_TAIL = true
end
---------------------------------------------------------------------
-- Riconoscimento della feature
function ProcessSplit.Identify( Proc)
@@ -50,7 +67,7 @@ end
---------------------------------------------------------------------
-- lavorazione smussi
local function MakeChamfer( nOriId, Proc, nPhase, nRawId, nPartId, dOvmHead)
local function MakeChamfer( nOriId, Proc, nPhase, nRawId, nPartId, dOvmTail)
-- verifico che lo smusso sia richiesto
local dDepth = EgtGetInfo( nOriId, 'Q06', 'd') or 0
if dDepth < 0.1 then return true end
@@ -121,7 +138,7 @@ local function MakeChamfer( nOriId, Proc, nPhase, nRawId, nPartId, dOvmHead)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
EgtSetOperationMode( nMch1Id, false)
return false, sErr
end
-- Inserisco la lavorazione del lato opposto
@@ -144,17 +161,118 @@ local function MakeChamfer( nOriId, Proc, nPhase, nRawId, nPartId, dOvmHead)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
EgtSetOperationMode( nMch1Id, false)
return false, sErr
end
return true, nil
end
---------------------------------------------------------------------
-- smussi in coda
local function MakeTailChamfer( idProc, nPartId, dDepthTailChamfer)
-- recupero gruppo per geometria aggiuntiva
local AddGrpId = BL.GetAddGroup( nPartId)
if not AddGrpId then
local sErr = 'Error on process StartFace impossible to find AddGroup'
EgtOutLog( sErr)
return false, sErr
end
-- recupero la lavorazione
local sMilling = ML.FindMilling( 'Mark')
if not sMilling then
local sErr = 'Error : milling not found in library'
EgtOutLog( sErr)
return false, sErr
end
local nLoopId, nLoopCnt = EgtExtractSurfTmFacetLoops( idProc, 0, AddGrpId)
if not nLoopId or nLoopCnt > 1 then
local sErr = 'Error MakeHeadChamfer : too many loops'
EgtOutLog( sErr)
return false, sErr
end
-- setto direzione estrusione corretta
EgtModifyCurveExtrusion( nLoopId, -X_AX())
EgtSetGridFrame( Frame3d( 0,0,0, GDB_FR.LEFT))
local dQ09Value = EgtGetInfo( idProc, 'Q09', 'd')
if not dQ09Value then
dQ09Value = 0.1
end
local bChamferedEdge = dQ09Value > 0
dQ09Value = EgtIf( bChamferedEdge, max( dQ09Value, 0.1), min( dQ09Value, -0.1))
local nIdFirstEntity, nEntityCnt = EgtExplodeCurveCompo( nLoopId)
local p3MidPoint = EgtMP( nIdFirstEntity, GDB_ID.GRID)
for i = 0, nEntityCnt - 1 do
if EgtCurveLength( nIdFirstEntity + i) - 10 < abs( dQ09Value) * 2 then
local sErr = 'Error MakeTailChamfer : Q09 too high'
EgtOutLog( sErr)
return false, sErr
end
end
-- creo raccordo o fillet
for i = 0, nEntityCnt - 1 do
local idFirst = nIdFirstEntity + i
local idSecond = EgtIf( i == nEntityCnt - 1, nIdFirstEntity, idFirst + 1)
local ptEndPointFirst = EgtEP( idFirst, GDB_ID.GRID) - ( abs( dQ09Value) * EgtEV( idFirst, GDB_ID.GRID))
local ptStartPointSecond = EgtSP( idSecond, GDB_ID.GRID) + ( abs( dQ09Value) * EgtEV( idSecond, GDB_ID.GRID))
if bChamferedEdge then
EgtCurveChamfer( AddGrpId, idFirst, ptEndPointFirst, idSecond, ptStartPointSecond, abs( dQ09Value), true, GDB_RT.GRID)
else
EgtCurveFillet( AddGrpId, idFirst, ptEndPointFirst, idSecond, ptStartPointSecond, abs( dQ09Value), true, GDB_RT.GRID)
end
end
EgtSelectPathObjs( nIdFirstEntity, true)
local idGeom, idGeomCnt = EgtCurveCompoByChain( AddGrpId, GDB_ID.SEL, {0,0,0}, true)
if not idGeom or idGeomCnt > 1 then
local sErr = 'Error MakeTailChamfer : too many loops'
EgtOutLog( sErr)
return false, sErr
end
EgtChangeClosedCurveStartPoint( idGeom, p3MidPoint, GDB_RT.GRID)
-- reimposto la griglia
EgtSetGridFrame()
-- Inserisco la lavorazione del lato standard
local dExtra = 2
local sName1 = 'TailCham_' .. ( EgtGetName( idProc) or tostring( idProc))
local nMch1Id = EgtAddMachining( sName1, sMilling)
if not nMch1Id then
local sErr = 'Error adding machining ' .. sName1 .. '-' .. sMilling
EgtOutLog( sErr)
return false, sErr
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ idGeom, -1}})
-- assegno affondamento e offset radiale
EgtSetMachiningParam( MCH_MP.DEPTH, dDepthTailChamfer + dExtra)
EgtSetMachiningParam( MCH_MP.OFFSR, dExtra)
-- assegno lato di lavoro
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMch1Id, false)
return false, sErr
end
return true, nil
end
---------------------------------------------------------------------
-- lavorazione con sega a catena per sezioni alte e larghe
local function MakeSplitByChainSaw( nSurfId, nFaceUse, dDepth, sNotes, dOffs)
local function MakeCutByChainSaw( nSurfId, sSawing, nFaceUse, dDepth, sNotes, dRadialOffset, bExtendStartEnd, bInvert)
-- Recupero i dati dell'utensile
local sSawing = ML.FindSawing( 'Sawing')
local dMaxMat = 0
local dSawCornerRad = 0
local dSawThick = 0
@@ -188,18 +306,34 @@ local function MakeSplitByChainSaw( nSurfId, nFaceUse, dDepth, sNotes, dOffs)
-- imposto uso del lato faccia
EgtSetMachiningParam( MCH_MP.FACEUSE, nFaceUse)
-- imposto angolo 3° asse rot
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetChainSawBlockedAxis( 1))
local _, vtN = EgtSurfTmFacetCenter( nSurfId, 0, GDB_ID.ROOT)
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetBlockedAxis( sSawing, 'perpendicular'))
local vtN = EgtSurfTmFacetNormVersor( nSurfId, 0, GDB_ID.ROOT)
local vtOrtho = BL.GetVersRef( nFaceUse)
EgtSetMachiningParam( MCH_MP.INITANGS, BL.GetChainSawInitAngs( vtN, vtOrtho, 1))
-- se il taglio è un precut, sto 10mm più all'interno per essere sicuro di tagliare effettivamente qualcosa
if BD.PRECUT_TAIL and sNotes and sNotes:find( 'Precut;') then
dRadialOffset = dRadialOffset - 10
end
-- imposto offset radiale per mantenere il materiale in coda per la finitura
EgtSetMachiningParam( MCH_MP.OFFSR, dOffs)
-- imposto allungamento percorso iniziale e finale a zero
EgtSetMachiningParam( MCH_MP.STARTADDLEN, 0)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, 0)
EgtSetMachiningParam( MCH_MP.OFFSR, dRadialOffset)
-- imposto eventuale allungamento percorso iniziale
local dStartAddLen = 0
local dEndAddLen = 0
if bExtendStartEnd then
dStartAddLen = 100
dEndAddLen = 100
end
EgtSetMachiningParam( MCH_MP.STARTADDLEN, dStartAddLen)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dEndAddLen)
-- faccio in modo che l'attacco della lama sia dal lato opposto rispetto al corpo macchina
EgtSetMachiningParam( MCH_MP.TOOLINVERT, true)
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
if bInvert and bInvert == true then
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
EgtSetMachiningParam( MCH_MP.INVERT, true)
else
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.LEFT)
EgtSetMachiningParam( MCH_MP.INVERT, false)
end
if dMaxMat >= dDepth then
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
-- se massimo affondamento utensile inferiore fessura, setto affondamento ed emetto warning
@@ -218,7 +352,7 @@ local function MakeSplitByChainSaw( nSurfId, nFaceUse, dDepth, sNotes, dOffs)
return false, sErr
end
-- impostazione alternativa angolo 3° asse rot
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetChainSawBlockedAxis( 2))
EgtSetMachiningParam( MCH_MP.BLOCKEDAXIS, BL.GetBlockedAxis( sSawing, 'parallel'))
EgtSetMachiningParam( MCH_MP.INITANGS, BL.GetChainSawInitAngs( vtN, vtOrtho, 2))
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
@@ -235,22 +369,325 @@ local function MakeSplitByChainSaw( nSurfId, nFaceUse, dDepth, sNotes, dOffs)
return true, sName, nMchFId
end
---------------------------------------------------------------------
-- split per sezioni grandi con sega a catena o mix catena + lama
function ProcessSplit.MakeBigSectionSplitting( Proc, b3Raw, dOffset, SawingData, Cutting2Data)
local sNotes = ''
if SawingData.bSplit ~= nil then
sNotes = 'Precut;'
end
local bigSectionSplitType
-- se pezzo non troppo alto, taglio singolo da sopra
if b3Raw:getDimZ() + BD.CUT_EXTRA_MIN < SawingData.dChainSawMaxMat + 10 * GEO.EPS_SMALL then
bigSectionSplitType = "single horizontal"
-- se pezzo non troppo largo, taglio singolo da davanti
elseif b3Raw:getDimY() + BD.CUT_EXTRA_MIN < min( SawingData.dChainSawMaxMat, SawingData.dChainSawLen - BD.C_SIMM_ENC) + 10 * GEO.EPS_SMALL then
bigSectionSplitType = "single vertical"
-- se pezzo non troppo largo, tagli dai due fianchi (dietro e davanti)
elseif 0.5 * b3Raw:getDimY() + BD.CUT_EXTRA_MIN < min( SawingData.dChainSawMaxMat, SawingData.dChainSawLen - BD.C_SIMM_ENC) + 10 * GEO.EPS_SMALL then
bigSectionSplitType = "double vertical"
-- altrimenti taglio con sega a catena da sopra e con lama da sotto
elseif BD.DOWN_HEAD and ( b3Raw:getDimZ() + BD.CUT_EXTRA_MIN < Cutting2Data.dMaxDepth + SawingData.dChainSawMaxMat + 10 * GEO.EPS_SMALL) then
bigSectionSplitType = "double horizontal"
end
-- in base alle scelte precedenti, applico le lavorazioni
if bigSectionSplitType == "single horizontal" then
local dCutDepth = b3Raw:getDimZ() + BD.CUT_EXTRA_MIN
local sNotesSplit = EgtIf( SawingData.bSplit, 'Split;', sNotes)
-- verifico se sega a catena lunga e devo quindi estendere ingresso e uscita perchè è probabile che non riesca a ruotare sopra al pezzo
local bExtendStartEnd
local dMinLengthLongChainSaw = 630
if SawingData.dChainSawLen > dMinLengthLongChainSaw - 10 * GEO.EPS_SMALL then
bExtendStartEnd = true
end
local bOk, sErr = MakeCutByChainSaw( Proc.Id, SawingData.sSawing, MCH_MILL_FU.PARAL_TOP, dCutDepth, sNotesSplit, dOffset, bExtendStartEnd, SawingData.bInvert)
if not bOk then return bOk, sErr end
elseif bigSectionSplitType == "single vertical" then
local dCutDepth = b3Raw:getDimY() + BD.CUT_EXTRA_MIN
local sNotesSplit = EgtIf( SawingData.bSplit, 'Split;', sNotes)
local bOk, sErr = MakeCutByChainSaw( Proc.Id, SawingData.sSawing, MCH_MILL_FU.PARAL_FRONT, dCutDepth, sNotesSplit, dOffset, nil, SawingData.bInvert)
if not bOk then return bOk, sErr end
elseif bigSectionSplitType == "double vertical" then
local dCutDepth = 0.5 * b3Raw:getDimY() + BD.CUT_EXTRA_MIN
local sNotesSplit = EgtIf( SawingData.bSplit, 'Presplit;', sNotes)
local bOk, sErr = MakeCutByChainSaw( Proc.Id, SawingData.sSawing, MCH_MILL_FU.PARAL_BACK, dCutDepth, sNotesSplit, dOffset, nil, SawingData.bInvert)
if not bOk then return bOk, sErr end
sNotesSplit = EgtIf( SawingData.bSplit, 'Split;', sNotes)
bOk, sErr = MakeCutByChainSaw( Proc.Id, SawingData.sSawing, MCH_MILL_FU.PARAL_FRONT, dCutDepth, sNotesSplit, dOffset, nil, SawingData.bInvert)
if not bOk then return bOk, sErr end
elseif bigSectionSplitType == "double horizontal" then
-- sega a catena da sopra
local dChainSawCutDepth = b3Raw:getDimZ() + BD.CUT_EXTRA_MIN - Cutting2Data.dMaxDepth
local sNotesSplit = EgtIf( SawingData.bSplit, 'Presplit;', sNotes)
local bOk, sErr = MakeCutByChainSaw( Proc.Id, SawingData.sSawing, MCH_MILL_FU.PARAL_TOP, dChainSawCutDepth, sNotesSplit, dOffset, nil, SawingData.bInvert)
if not bOk then return bOk, sErr end
-- lama da sotto
local dCutExtra = -dChainSawCutDepth + BD.CUT_EXTRA_MIN
local dVzLimDwnUp
if BD.TURN then dVzLimDwnUp = -2 end
local sNotes = EgtIf( SawingData.bSplit, 'Split;', sNotes)
local bMaximizeVerticalDepth = true
bOk, sErr = Fbs.MakeOne( Proc.Id, 0, Cutting2Data.sCutting, Cutting2Data.dSawDiam, MCH_MILL_FU.ORTHO_TOP, dVzLimDwnUp, dCutExtra, BD.CUT_SIC, dOffset, 0, 0, sNotes, b3Raw, nil, bMaximizeVerticalDepth)
if not bOk then return false, sErr end
-- se è comunque troppo grande per essere separato, esco
else
local sErr = 'Error : section too big for splitting'
EgtOutLog( sErr)
return false, sErr, -1
end
return true
end
---------------------------------------------------------------------
-- tagli verticali aggiuntivi
local function AddVerticalPreCuts( Proc, sCutting, dCutXOffset, b3Raw, sNotes, dOffsetBetweenCuts)
local nVerticalCuts = ceil( Proc.Face[1].WidthTrimmed / ( BD.MAX_LEN_DICE)) - 1
local dVerticalSliceHeight = Proc.Face[1].WidthTrimmed / ( nVerticalCuts + 1)
-- recupero il diametro dell'utensile
local dSawDiam = 400
if EgtMdbSetCurrMachining( sCutting) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dSawDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam
end
end
local bOk, sErr
-- tagli verticali
for j = nVerticalCuts, 1, -1 do
local nFaceUse = MCH_MILL_FU.PARAL_FRONT
local dVerticalCutOffset = dVerticalSliceHeight * -j
local sLeadInOutType = 'PerpendicularOutraw'
bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nFaceUse, nil, -0.1 -dCutXOffset, BD.CUT_SIC, dVerticalCutOffset, 0, 0, sNotes, b3Raw, nil, nil, nil, sLeadInOutType, nil, dOffsetBetweenCuts)
if not bOk then return bOk, sErr end
end
return bOk, sErr
end
---------------------------------------------------------------------
-- tagli standard
local function MakeStandardCuts( Proc, b3Raw, nCuts, dOffsetBetweenCuts, TailCutType, Cutting1Data, Cutting2Data, dStartOffset, dLenEndRaw)
if not TailCutType.sType then
TailCutType.sType = ''
end
local PrecutType = { bBigSectionCut = TailCutType.bBigSectionCut, bHorizCut = TailCutType.bHorizCut, bDoubleHorizCut = TailCutType.bDoubleHorizCut, bDoubleCut = TailCutType.bDoubleCut, bSplit = TailCutType.bSplit, sType = 'Precut', bNeedVerticalAddedCuts = false, bNeedHorizontalAddedCuts = false}
if not TailCutType.bDoubleHorizCut then
-- flag di lavorazione faccia
local nOrthoOpposite = EgtIf( TailCutType.bHorizCut, MCH_MILL_FU.ORTHO_DOWN, MCH_MILL_FU.ORTHO_BACK)
-- calcolo extra taglio ed accorciamento
local dCutExtra = 0
local dAccStart = 0
local dAccEnd = 0
if TailCutType.bBigSectionCut and BD.C_SIMM and b3Raw:getDimZ() > BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL then
-- qui arrivano sezioni molto grandi su macchine tipo PF con materiale da asportare inferiore allo spessore lama
local dSawRad = Cutting1Data.dSawDiam / 2
dCutExtra = - ( b3Raw:getDimY() - dSawRad)
dAccEnd = dSawRad
elseif b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL or b3Raw:getDimY() < 2 * BD.MAX_DIM_HTCUT_HBEAM + 10 * GEO.EPS_SMALL then
dCutExtra = EgtIf( TailCutType.bDoubleCut, - 0.5 * b3Raw:getDimY() + BD.CUT_EXTRA_MIN, BD.CUT_EXTRA)
else
dCutExtra = - ( b3Raw:getDimY() - Cutting1Data.dMaxDepth)
local dSawRad = Cutting1Data.dSawDiam / 2
-- distanza in Y tra il centro della lama e l'intersezione tra la lama stessa e la massima Z della trave, + extra
-- se taglio doppio l'intersezione sarà in mezzeria, se taglio singolo sarà all'estremo opposto della trave
local dKL = dSawRad - Cutting1Data.dMaxDepth + EgtIf( TailCutType.bDoubleCut, b3Raw:getDimY() / 2 + BD.CUT_EXTRA_MIN, b3Raw:getDimY() + BD.CUT_EXTRA)
-- lunghezza minima del percorso di lavorazione, in caso accorciamento porti a lunghezza negativa
local dMinSawingLength = 5
if BD.C_SIMM then
dAccEnd = sqrt( max( dSawRad * dSawRad - dKL * dKL, 0))
-- non posso comunque accorciare più della dimensione della geometria, quindi in caso allungo entrata
if dAccEnd > b3Raw:getDimZ() - 100 * GEO.EPS_SMALL then
dAccStart = b3Raw:getDimZ() - dAccEnd - dMinSawingLength
end
else
dAccStart = sqrt( max( dSawRad * dSawRad - dKL * dKL, 0))
-- non posso comunque accorciare più della dimensione della geometria, quindi in caso allungo uscita
if dAccStart > b3Raw:getDimZ() - 100 * GEO.EPS_SMALL then
dAccEnd = b3Raw:getDimZ() - dAccStart - dMinSawingLength
end
end
end
-- per travi alte faccio faccio dei tagli orizzontali aggiuntivi
if TailCutType.bNeedHorizontalAddedCuts then
-- taglio a zero (con lama) per evitare problemi con grezzo più lungo del previsto. Se BigSection il pretaglio è già stato fatto.
if not TailCutType.bBigSectionCut and BD.PRECUT_TAIL then
dStartOffset = dLenEndRaw
local bOkPrecut, sErrPrecut = MakeStandardCuts( Proc, b3Raw, 1, 0, PrecutType, Cutting1Data, Cutting2Data, dStartOffset)
if not bOkPrecut then
return false, sErrPrecut
end
end
local nHorizontalCuts = ceil ( Proc.Face[1].HeightTrimmed / BD.MAX_DIM_DICE) - 1
local dHorizontalSliceHeight = Proc.Face[1].HeightTrimmed / ( nHorizontalCuts + 1)
for i = nCuts, 1, -1 do
local dCutXOffset = ( i - 1) * dOffsetBetweenCuts
-- tagli orizzontali
for j = nHorizontalCuts, 1, -1 do
local nFaceUse = MCH_MILL_FU.PARAL_DOWN
local dHorizontalCutOffset = dHorizontalSliceHeight * -j
local sLeadInOutType = 'PerpendicularOutraw'
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0 , Cutting1Data.sCutting, Cutting1Data.dSawDiam, nFaceUse, nil, -0.1 - dCutXOffset, BD.CUT_SIC, dHorizontalCutOffset, 0, 0, 'Precut;', b3Raw, nil, nil, nil, sLeadInOutType, nil, dOffsetBetweenCuts)
if not bOk then return false, sErr end
end
-- se necessario taglio verticale doppio, eseguo l'opposto
if TailCutType.bDoubleCut then
-- gli accorciamenti vanno invertiti per il taglio opposto
local dAccStartDoubleCut, dAccEndDoubleCut = dAccEnd, dAccStart
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, Cutting1Data.sCutting, Cutting1Data.dSawDiam, MCH_MILL_FU.ORTHO_FRONT, nil, dCutExtra, BD.CUT_SIC, dCutXOffset, dAccStartDoubleCut, dAccEndDoubleCut, 'Precut;', b3Raw, true)
if not bOk then return false, sErr end
end
-- taglio verticale
local sInfo = 'Precut'
if i == 1 and TailCutType.sType ~= 'Precut' then
sInfo = 'Cut'
end
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, Cutting1Data.sCutting, Cutting1Data.dSawDiam, nOrthoOpposite, nil, dCutExtra, BD.CUT_SIC, dCutXOffset, dAccStart, dAccEnd, sInfo, b3Raw, true)
if not bOk then return false, sErr end
end
return true, sWarn
end
-- taglio a zero (con lama) per evitare problemi con grezzo più lungo del previsto. Se BigSection il pretaglio è già stato fatto.
if not TailCutType.bBigSectionCut and BD.PRECUT_TAIL and TailCutType.bNeedVerticalAddedCuts then
dStartOffset = dLenEndRaw
local bOkPrecut, sErrPrecut = MakeStandardCuts( Proc, b3Raw, 1, 0, PrecutType, Cutting1Data, Cutting2Data, dStartOffset)
if not bOkPrecut then
return false, sErrPrecut
end
end
-- se necessari tagli in doppio, eseguo gli opposti
if TailCutType.bDoubleCut then
-- gli accorciamenti vanno invertiti per il taglio opposto
local dAccStartDoubleCut, dAccEndDoubleCut = dAccEnd, dAccStart
for i = nCuts, 1, -1 do
local dCutOffset = ( i - 1) * dOffsetBetweenCuts
if i == 1 and TailCutType.sType =='Precut' then
dCutOffset = dStartOffset
end
local sNotes = EgtIf( TailCutType.bSplit, 'Presplit;', 'Precut;')
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, Cutting1Data.sCutting, Cutting1Data.dSawDiam, MCH_MILL_FU.ORTHO_FRONT, nil, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStartDoubleCut, dAccEndDoubleCut, sNotes, b3Raw, true)
if not bOk then return false, sErr end
end
end
-- eseguo i tagli necessari
for i = nCuts, 1, -1 do
local dCutOffset = ( i - 1) * dOffsetBetweenCuts
-- se trave larga effettuo tagli verticali aggiuntivi
if TailCutType.bNeedVerticalAddedCuts then
local sSpecNotes = EgtIf( TailCutType.bSplit, 'Presplit;', 'Precut;')
local bOk, sErr = AddVerticalPreCuts( Proc, Cutting1Data.sCutting, dCutOffset, b3Raw, sSpecNotes, dOffsetBetweenCuts)
if not bOk then return bOk, sErr end
end
if i == 1 and TailCutType.sType =='Precut' then
dCutOffset = dStartOffset
end
local sNotes
if TailCutType.bSplit then
sNotes = EgtIf( i == 1, 'Split;', 'Presplit;')
else
sNotes = EgtIf( i == 1 and TailCutType.sType ~= 'Precut', 'Cut;', 'Precut;')
end
-- se primo taglio da sopra e PF o ONE richiedo risalita preliminare a Zmax
if i == nCuts and TailCutType.bHorizCut and BD.C_SIMM and not BD.DOWN_HEAD then
sNotes = EgtSetValInNotes( sNotes, 'StartZmax', 2)
end
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, Cutting1Data.sCutting, Cutting1Data.dSawDiam, nOrthoOpposite, nil, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStart, dAccEnd, sNotes, b3Raw, true)
if not bOk then return false, sErr end
end
-- altrimenti necessari tagli da sopra e sotto con testa opportuna
else
-- verifico esistenza della lavorazione con lama da sotto
if not Cutting2Data.sCutting then
local sErr = 'Error : cutting H2 not found in library'
EgtOutLog( sErr)
return false, sErr
end
-- verifico che le due lame riescano a lavorare la sezione
local dDimZ = b3Raw:getDimZ()
local dExtra = Cutting1Data.dMaxVertDepth + Cutting2Data.dMaxDepth - dDimZ
if ( dExtra - 2 * BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL < 0) and not TailCutType.bBigSectionCut then
local sErr = 'Error : section too big for tail cut'
EgtOutLog( sErr)
return false, sErr
end
-- calcolo extra taglio ed accorciamento
local dCutExtra = -Cutting2Data.dMaxDepth + dExtra / 2 + BD.CUT_EXTRA_MIN
local dCutExtra2 = -Cutting1Data.dMaxVertDepth + dExtra / 2 + BD.CUT_EXTRA_MIN
local dAccStart = 0
-- limiti da sotto
local dVzLimDwnUp
if BD.TURN then dVzLimDwnUp = -2 end
-- taglio a zero (con lama) per evitare problemi con grezzo più lungo del previsto. Se BigSection il pretaglio è già stato fatto.
if not TailCutType.bBigSectionCut and BD.PRECUT_TAIL and TailCutType.bNeedVerticalAddedCuts then
dStartOffset = dLenEndRaw
local bOkPrecut, sErrPrecut = MakeStandardCuts( Proc, b3Raw, 1, 0, PrecutType, Cutting1Data, Cutting2Data, dStartOffset)
if not bOkPrecut then
return false, sErrPrecut
end
end
-- eseguo i tagli da sotto necessari
for i = nCuts, 1, -1 do
local dCutOffset = ( i - 1) * dOffsetBetweenCuts
if i == 1 and TailCutType.sType =='Precut' then
dCutOffset = dStartOffset
end
local sNotes = EgtIf( TailCutType.bSplit, 'Presplit;', 'Precut;')
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, Cutting2Data.sCutting, Cutting2Data.dSawDiam, MCH_MILL_FU.ORTHO_TOP, dVzLimDwnUp, dCutExtra2, BD.CUT_SIC, dCutOffset, dAccStart, 0, sNotes, b3Raw, nil, true)
if not bOk then return false, sErr end
end
-- eseguo i tagli da sopra necessari
for i = nCuts, 1, -1 do
local dCutOffset = ( i - 1) * dOffsetBetweenCuts
if i == 1 and TailCutType.sType =='Precut' then
dCutOffset = dStartOffset
end
-- se trave larga effettuo tagli verticali aggiuntivi
if TailCutType.bNeedVerticalAddedCuts then
local sSpecNotes = EgtIf( TailCutType.bSplit, 'Presplit;', 'Precut;')
local bOk, sErr = AddVerticalPreCuts( Proc, Cutting1Data.sCutting, dCutOffset, b3Raw, sSpecNotes, dOffsetBetweenCuts)
if not bOk then return bOk, sErr end
end
local sNotes
if TailCutType.bSplit then
sNotes = EgtIf( i == 1, 'Split;', 'Presplit;')
else
sNotes = EgtIf( i == 1 and TailCutType.sType ~= 'Precut', 'Cut;', 'Precut;')
end
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, Cutting1Data.sCutting, Cutting1Data.dSawDiam, MCH_MILL_FU.ORTHO_DOWN, dVzLimDwnUp, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStart, 0, sNotes, b3Raw)
if not bOk then return false, sErr end
end
end
return true
end
---------------------------------------------------------------------
-- Applicazione della lavorazione
function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrStd, bPreMove, vtMove, dOvmTail)
-- impostazione default a variabili aggiunte
if not BD.OVM_CHAIN_HBEAM then BD.OVM_CHAIN_HBEAM = 8 end
if not BD.C_SIMM_ENC then BD.C_SIMM_ENC = 180 end
if not BD.C_SIMM_ENC then BD.C_SIMM_ENC = EgtIf( BD.C_SIMM, 180, 90) end
-- ingombro del grezzo
local b3Raw = EgtGetRawPartBBox( nRawId)
-- inserimento smussi
local nOriId = EgtGetInfo( Proc.Id, 'ORI', 'i')
if nOriId then
local bOkc, sErrC = MakeChamfer( nOriId, Proc, nPhase, nRawId, nPartId, dOvmHead)
local bOkc, sErrC = MakeChamfer( nOriId, Proc, nPhase, nRawId, nPartId, dOvmTail)
if not bOkc then return bOkc, sErrC end
end
-- recupero la lavorazione
local sCutting = ML.FindCutting( 'TailSide')
-- TODO questa parte andrà cambiata quando si gestiranno i volumi liberi in cui girare da mlse
local dMinWidthForBigBlade = 300
local dMaxHeightForBigBlade = 300
local sCutting
if b3Raw:getDimY() > dMinWidthForBigBlade and b3Raw:getDimZ() < dMaxHeightForBigBlade then
sCutting = ML.FindCutting( 'TailSide', nil, nil, nil, 'Longest')
else
sCutting = ML.FindCutting( 'TailSide')
end
if not sCutting then
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' cutting not found in library'
EgtOutLog( sErr)
@@ -258,114 +695,112 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
end
-- recupero i dati dell'utensile
local dSawDiam = 400
local dMaxDepth = 50
local dSawMaxDepth = 50
local dSawThick = 2
if EgtMdbSetCurrMachining( sCutting) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dSawDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
dSawMaxDepth = EgtTdbGetCurrToolMaxDepth() or dSawMaxDepth
dSawThick = EgtTdbGetCurrToolParam(MCH_TP.THICK) or dSawThick
end
end
local dMaxVertDepth = dMaxDepth - ( BD.DECR_VERT_CUT or 0)
local dMaxVertDepth = dSawMaxDepth - ( BD.DECR_VERT_CUT or 0)
-- recupero la eventuale lavorazione con lama da sotto
local sCutting2 = ML.FindCutting( 'TailSide_H2', false, true)
-- recupero i dati della eventuale seconda lama
local dSawDiam2 = 0
local dMaxDepth2 = 0
local dSawMaxDepth2 = 0
local dSawThick2 = 0
if sCutting2 and EgtMdbSetCurrMachining( sCutting2) then
local sTuuid2 = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid2) or '') then
dSawDiam2 = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam2
dMaxDepth2 = EgtTdbGetCurrToolMaxDepth() or dMaxDepth2
dSawMaxDepth2 = EgtTdbGetCurrToolMaxDepth() or dSawMaxDepth2
dSawThick2 = EgtTdbGetCurrToolParam(MCH_TP.THICK) or dSawThick2
end
end
-- recupero dati utensile della sega a catena più lunga a disposizione
local sSawing = ML.FindSawing( 'SawingForSplitting', nil, nil, 'Longest')
if not sSawing then
sSawing = ML.FindSawing( 'Sawing', nil, nil, 'Longest')
end
local dChainSawMaxMat = 0
local dChainSawLen = 0
if EgtMdbSetCurrMachining( sSawing or '') then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dChainSawMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dChainSawMaxMat
dChainSawLen = EgtTdbGetCurrToolParam( MCH_TP.LEN) or dChainSawLen
end
end
-- caratteristiche taglio
local dDimYRef = EgtIf( b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dMaxDepth, abs( BD.MAX_DIM_HTCUT_HBEAM))
local dDimYRef = EgtIf( b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL, dSawMaxDepth, abs( BD.MAX_DIM_HTCUT_HBEAM))
local bBigSectionCut = ( b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL) and
( b3Raw:getDimZ() > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dMaxDepth2) - 2 * BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
( b3Raw:getDimZ() > EgtIf( BD.TURN, 2 * dMaxVertDepth, dMaxVertDepth + dSawMaxDepth2) - 2 * BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
local bHorizCut = ( ( b3Raw:getDimY() > b3Raw:getDimZ() + 10 * GEO.EPS_SMALL or BD.TURN) and ( b3Raw:getDimZ() < dMaxVertDepth - BD.CUT_EXTRA))
local bDoubleHorizCut = ( ( BD.DOWN_HEAD or BD.TURN) and not bHorizCut and b3Raw:getDimY() > 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
local bDoubleCut = ( not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL)
local bDoubleCut = ( not bHorizCut and not bDoubleHorizCut and b3Raw:getDimY() > dDimYRef - BD.CUT_EXTRA + 10 * GEO.EPS_SMALL) and
( b3Raw:getDimY() < 2 * dDimYRef - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL)
-- dati geometrici del taglio
local ptC, vtN = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
-- flag di lavorazione faccia
local nOrthoOpposite = EgtIf( bHorizCut, MCH_MILL_FU.ORTHO_DOWN, MCH_MILL_FU.ORTHO_BACK)
-- separazione solo se esiste grezzo successivo con pezzi o scaricabile
local nNextRawId = EgtGetNextRawPart( nRawId)
local bSplit = ( nNextRawId and ( EgtGetPartInRawPartCount( nNextRawId) > 0 or EgtGetRawPartBBox( nNextRawId):getDimX() >= BD.MinRaw))
-- determino se più tagli con offset
local dLenEndRaw = dOvmTail
local nCuts = 1
local dOffsL = 0
if not bSplit then
-- cerco grezzo successivo che sia nella fase
if nNextRawId and EgtVerifyRawPartPhase( nNextRawId, nPhase) then
local b3NextRaw = EgtGetRawPartBBox( nNextRawId)
local dLenEndRaw = ptC:getX() - b3NextRaw:getMin():getX()
nCuts = ceil( dLenEndRaw / BD.MAX_LEN_SCRAP)
dLenEndRaw = ptC:getX() - b3NextRaw:getMin():getX()
nCuts = ceil( dLenEndRaw / ( EgtIf( bBigSectionCut, BD.MAX_DIM_DICE - 0.1, BD.MAX_LEN_SCRAP + 0.5)))
dOffsL = dLenEndRaw / nCuts
-- aggiorno ingombro del grezzo corrente con quello del successivo
b3Raw:Add( b3NextRaw)
else
dLenEndRaw = min( dOvmTail, abs( ptC:getX() - b3Raw:getMin():getX()))
end
end
-- determino la necessità di tagli aggiuntivi
local dMinTailScrapForAdditionalCuts = 10.123
local bNeedVerticalAddedCuts = not bSplit and ( Proc.Face[1].WidthTrimmed > BD.MAX_LEN_DICE) and ( dLenEndRaw > dMinTailScrapForAdditionalCuts - 10 * GEO.EPS_SMALL)
local bNeedHorizontalAddedCuts = not bSplit and not bBigSectionCut and
( Proc.Face[1].HeightTrimmed > ( BD.MIN_HEIGHT_ADDED_CUTS or BD.MAX_LEN_DICE) + 100 * GEO.EPS_SMALL) and
( dLenEndRaw > dMinTailScrapForAdditionalCuts - 10 * GEO.EPS_SMALL) and
dOffsL < BD.MAX_DIM_DICE
-- dati lavorazioni sopra e sotto
local Cutting1Data = { sCutting = sCutting, dSawDiam = dSawDiam, dMaxDepth = dSawMaxDepth, dSawThick = dSawThick, dMaxVertDepth = dMaxVertDepth}
local Cutting2Data = { sCutting = sCutting2, dSawDiam = dSawDiam2, dMaxDepth = dSawMaxDepth2, dSawThick = dSawThick2}
local SawingData = { sSawing = sSawing, dChainSawMaxMat = dChainSawMaxMat, dChainSawLen = dChainSawLen, bSplit = bSplit or false}
-- dati sul taglio di coda da effettuare
local TailCutType = { bBigSectionCut = bBigSectionCut, bHorizCut = bHorizCut, bDoubleHorizCut = bDoubleHorizCut, bDoubleCut = bDoubleCut, bSplit = bSplit, bNeedVerticalAddedCuts = bNeedVerticalAddedCuts, bNeedHorizontalAddedCuts = bNeedHorizontalAddedCuts}
-- se taglio per pezzi alti e larghi
local nNewPhase = 0
if bBigSectionCut then
local bFinishingNeeded = false
if bSplit then
-- recupero lunghezza massima di lavoro della sega a catena
local sSawing = ML.FindSawing( 'Sawing')
local dMaxMat = 0
local dTlen = 0
if EgtMdbSetCurrMachining( sSawing or '') then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT) or dMaxMat
dTLen = EgtTdbGetCurrToolParam( MCH_TP.LEN) or dTLen
end
end
-- assegno offset in lunghezza
local dOffs = 0
-- assegno offset in lunghezza
local dTailOffset = 0
if dOvmTail > BD.OVM_CHAIN_HBEAM then
dOffs = dOvmTail - BD.OVM_CHAIN_HBEAM
dTailOffset = dOvmTail - BD.OVM_CHAIN_HBEAM
bFinishingNeeded = true
end
-- se pezzo non troppo alto, taglio singolo da sopra
if b3Raw:getDimZ() < dMaxMat - BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL then
local cutDepth = b3Raw:getDimZ() + BD.CUT_EXTRA_MIN
sNotesSplit = 'Split;'
bOk, sErr = MakeSplitByChainSaw( Proc.Id, MCH_MILL_FU.PARAL_TOP, cutDepth, sNotesSplit, dOffs)
if not bOk then return bOk, sErr, nNewPhase end
-- se pezzo non troppo largo, taglio singolo da davanti
elseif b3Raw:getDimY() + BD.CUT_EXTRA_MIN < min( dMaxMat, dTLen - BD.C_SIMM_ENC) + 10 * GEO.EPS_SMALL then
local cutDepth = b3Raw:getDimY() + BD.CUT_EXTRA_MIN
sNotesSplit = 'Split;'
bOk, sErr = MakeSplitByChainSaw( Proc.Id, MCH_MILL_FU.PARAL_FRONT, cutDepth, sNotesSplit, dOffs)
if not bOk then return bOk, sErr, nNewPhase end
-- altrimenti tagli dai due fianchi (dietro e davanti)
else
local cutDepth = 0.5 * b3Raw:getDimY() + BD.CUT_EXTRA_MIN
-- se la sega a catena non può completare lo split esco
if cutDepth >= min( dMaxMat, dTLen - BD.C_SIMM_ENC) + 10 * GEO.EPS_SMALL then
sErr = 'Error : section too big for splitting'
EgtOutLog( sErr)
return false, sErr, -1
end
local sNotesSplit = 'Presplit;'
local bOk, sErr = MakeSplitByChainSaw( Proc.Id, MCH_MILL_FU.PARAL_BACK, cutDepth, sNotesSplit, dOffs)
if not bOk then return bOk, sErr, nNewPhase end
sNotesSplit = 'Split;'
bOk, sErr = MakeSplitByChainSaw( Proc.Id, MCH_MILL_FU.PARAL_FRONT, cutDepth, sNotesSplit, dOffs)
if not bOk then return bOk, sErr, nNewPhase end
-- split per grande sezione
local bOk, sErr, nNewPhase2 = ProcessSplit.MakeBigSectionSplitting( Proc, b3Raw, dTailOffset, SawingData, Cutting2Data)
if nNewPhase2 then
nNewPhase = nNewPhase2
end
if not bOk then
return bOk, sErr, nNewPhase
end
-- se necessaria finitura, creo nuova fase
if bFinishingNeeded then
BL.AddPhaseWithRawParts( nRawId, BD.OriXR, BD.PosXR, BD.RAW_OFFSET)
nNewPhase = EgtGetCurrPhase()
nDispId = EgtGetPhaseDisposition( nNewPhase)
local nDispId = EgtGetPhaseDisposition( nNewPhase)
if sDownOrSideOrStd == 'down' then
EgtRotateRawPart( nRawId, X_AX(), 180)
EgtSetInfo( nDispId, 'TYPE', 'MID2')
@@ -396,21 +831,63 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
sNotesFinal = 'Cut;'
end
local nQ05 = EgtGetInfo( nOriId or GDB_ID.NULL, 'Q05', 'i') or 0
-- determinazione materiale da asportare
local dSawThickCheck = dSawThick
if dSawThick2 > 0 and bDoubleHorizCut then
dSawThickCheck = max( min( dSawThick, dSawThick2), dOvmTail)
end
local dMaxElev = 0
if vtN:getX() > 0 then
dMaxElev = b3Raw:getMax():getX() - Proc.Box:getMin():getX()
else
dMaxElev = Proc.Box:getMax():getX() - b3Raw:getMin():getX()
end
-- taglio a zero (con sega a catena o mix catena + lama) per evitare problemi con grezzo più lungo del previsto
if BD.PRECUT_TAIL and not bSplit then
local dTailOffset = dLenEndRaw
local bOkPrecut, sErrPrecut = ProcessSplit.MakeBigSectionSplitting( Proc, b3Raw, dTailOffset, SawingData, Cutting2Data)
if not bOkPrecut then
return false, sErrPrecut
end
end
-- se finitura con lama
if nQ05 == 1 or nQ05 == 0 or not bSplit then
local dSawThickCheck = dSawThick
if dSawThick2 > 0 and bDoubleHorizCut then
dSawThickCheck = min( dSawThick, dSawThick2)
end
local dMaxElev = 0
if vtN:getX() > 0 then
dMaxElev = b3Raw:getMax():getX() - Proc.Box:getMin():getX()
else
dMaxElev = Proc.Box:getMax():getX() - b3Raw:getMin():getX()
end
if nQ05 < 2 or ( not bSplit and dMaxElev > dSawThickCheck) then
-- controllo se è necessario un taglio con dicing o si deve proseguire ai casi standard
if bSplit or dMaxElev > dSawThickCheck then
local bOk, sErr = Cut.Make( Proc, nNewPhase, nRawId, nPartId, dLenEndRaw, nil, false, true, b3Raw, sNotes, dCurrOvmT)
local bOk, sErr
if bNeedVerticalAddedCuts then
-- ad ogni offset di taglio dovrò fare prima i tagli verticali e poi i cubetti
for i = nCuts, 1, -1 do
local nAddGrpId = BL.GetAddGroup( Proc.PartId)
-- faccia di taglio all'offset corrente
local AddId = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
local AddProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg, PartId = Proc.PartId}
Topology.Classify( AddProc, b3Raw)
local dCutOffset = ( i - 1) * dOffsL
local vtMoveSurf = Vector3d( -dCutOffset, 0, 0)
EgtMove( AddId, vtMoveSurf, GDB_RT.GLOB)
-- eventuale faccia di taglio all'offset precedente, per limitare il dicing e evitare di tagliare i cubetti nel vuoto
local nLimitingSurf
if nCuts > 1 then
nLimitingSurf = EgtCopyGlob( Proc.Id, nAddGrpId) or GDB_ID.NULL
local dLastCutOffset = i * dOffsL
local vtMoveLimitingSurf = Vector3d( -dLastCutOffset + 10 * GEO.EPS_SMALL, 0, 0)
EgtMove( nLimitingSurf, vtMoveLimitingSurf, GDB_RT.GLOB)
local vtNLimitingSurf = EgtSurfTmFacetNormVersor( nLimitingSurf, 0, GDB_ID.ROOT)
if AreOppositeVectorApprox( X_AX(), vtNLimitingSurf) then EgtInvertSurf( nLimitingSurf) end
end
-- tagli verticali
bOk, sErr = AddVerticalPreCuts( AddProc, sCutting, 0, b3Raw, sNotes, dOffsL)
if not bOk then return bOk, sErr end
-- tagli a cubetti con eventuale superficie limitante
local sLeadInOutType = 'PerpendicularOutraw'
bOk, sErr = Cut.Make( AddProc, nNewPhase, nRawId, nPartId, dMaxElev, nil, false, true, b3Raw, sNotes, dCurrOvmT, nil, nLimitingSurf, sLeadInOutType)
end
-- tagli aggiuntivi non necessari
else
local sLeadInOutType = 'PerpendicularOutraw'
bOk, sErr = Cut.Make( Proc, nNewPhase, nRawId, nPartId, dMaxElev, nil, false, true, b3Raw, sNotes, dCurrOvmT, nil, nil, sLeadInOutType)
end
if sNotesFinal then
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotesFinal)
end
@@ -424,15 +901,20 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
EgtOutLog( sErr)
return false, sErr
end
local sPocketing = ML.FindPocketing( 'OpenPocket', nil, 0)
local sPocketing, dTDiam = ML.FindPocketing( 'OpenPocket', nil, 0)
if not sPocketing then
local sErr = 'Error : pocketing not found in library'
EgtOutLog( sErr)
return false, sErr
end
local bOk, sErr = Pocket.Make( Proc, Proc.Id, 0, sPocketing, nPartId, b3Solid)
local dOpenMinSafe
if BD.C_SIMM and b3Raw:getDimZ() > 600 then
dOpenMinSafe = 230 - dTDiam / 2
end
local bOk, sErr = Pocket.Make( Proc, Proc.Id, 0, sPocketing, nPartId, b3Solid, dOpenMinSafe)
if sNotesFinal then
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotesFinal)
local sNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) .. sNotesFinal
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
end
return bOk, sErr, nNewPhase
end
@@ -440,92 +922,48 @@ function ProcessSplit.Make( Proc, nPhase, nRawId, nPartId, nOrd, sDownOrSideOrSt
return true, nil, nNewPhase
end
end
-- se tagli standard
if not bDoubleHorizCut then
-- calcolo extra taglio ed accorciamento
local dCutExtra = 0
local dAccStart = 0
local dAccEnd = 0
if b3Raw:getDimZ() < BD.MIN_DIM_HBEAM + 10 * GEO.EPS_SMALL or b3Raw:getDimY() < 2 * BD.MAX_DIM_HTCUT_HBEAM + 10 * GEO.EPS_SMALL then
dCutExtra = EgtIf( bDoubleCut, - 0.5 * b3Raw:getDimY() + BD.CUT_EXTRA_MIN, BD.CUT_EXTRA)
local bOk, sErr = MakeStandardCuts( Proc, b3Raw, nCuts, dOffsL, TailCutType, Cutting1Data, Cutting2Data, nil, dLenEndRaw)
-- se smussi in coda da aggiungere
local dDepthTailChamfer = EgtGetInfo( nOriId or Proc.Id, 'Q08', 'd') or 0
if dDepthTailChamfer > 100 * GEO.EPS_SMALL then
-- creo subito nuova fase qui, a meno che non sia stata già creata
if nNewPhase == 0 then
BL.AddPhaseWithRawParts( nRawId, BD.OriXR, BD.PosXR, BD.RAW_OFFSET)
nNewPhase = EgtGetCurrPhase()
local nDispId = EgtGetPhaseDisposition( nNewPhase)
if sDownOrSideOrStd == 'down' then
EgtRotateRawPart( nRawId, X_AX(), 180)
EgtSetInfo( nDispId, 'TYPE', 'MID2')
EgtSetInfo( nDispId, 'ROT', -2)
elseif sDownOrSideOrStd == 'side' then
if bPreMove then EgtMoveRawPart( nRawId, vtMove) end
EgtRotateRawPart( nRawId, X_AX(), EgtIf( BD.RIGHT_LOAD, -90, 90))
if not bPreMove then EgtMoveRawPart( nRawId, vtMove) end
EgtSetInfo( nDispId, 'TYPE', 'MID2')
EgtSetInfo( nDispId, 'ROT', -1)
else
EgtSetInfo( nDispId, 'TYPE', 'END')
end
EgtSetInfo( nDispId, 'ORD', nOrd)
-- se grezzo successivo senza pezzi e finale, va tolto
local nNextRawId = EgtGetNextRawPart( nRawId)
if nNextRawId and EgtGetPartInRawPartCount( nNextRawId) == 0 and EgtGetRawPartBBox( nNextRawId):getDimX() < BD.MinRaw then
EgtRemoveRawPartFromCurrPhase( nNextRawId)
end
end
-- alla fine del taglio si aggiungono gli smussi in testa
local _, sErrHeadChamfer = MakeTailChamfer( nOriId or Proc.Id, nPartId, dDepthTailChamfer)
if sErr then
sErr = sErr..'\n'..sErrHeadChamfer
else
dCutExtra = - ( b3Raw:getDimY() - dMaxDepth)
local dSawRad = dSawDiam / 2
local dKL = dSawRad - dMaxDepth + b3Raw:getDimY() / 2 + BD.CUT_EXTRA_MIN
if BD.C_SIMM then
dAccEnd = sqrt( dSawRad * dSawRad - dKL * dKL)
else
dAccStart = sqrt( dSawRad * dSawRad - dKL * dKL)
end
end
-- se necessari tagli in doppio, eseguo gli opposti
if bDoubleCut then
-- gli accorciamenti vanno invertiti per il taglio opposto
local dAccStartDoubleCut, dAccEndDoubleCut = dAccEnd, dAccStart
for i = nCuts, 1, -1 do
local dCutOffset = ( i - 1) * dOffsL
local sNotes = EgtIf( bSplit, 'Presplit;', 'Precut;')
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, MCH_MILL_FU.ORTHO_FRONT, nil, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStartDoubleCut, dAccEndDoubleCut, sNotes, b3Raw, true)
if not bOk then return false, sErr end
end
end
-- eseguo i tagli necessari
for i = nCuts, 1, -1 do
local dCutOffset = ( i - 1) * dOffsL
local sNotes
if bSplit then
sNotes = EgtIf( i == 1, 'Split;', 'Presplit;')
else
sNotes = EgtIf( i == 1, 'Cut;', 'Precut;')
end
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, nOrthoOpposite, nil, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStart, dAccEnd, sNotes, b3Raw)
if not bOk then return false, sErr end
end
-- altrimenti necessari tagli da sopra e sotto con testa opportuna
else
-- verifico esistenza della lavorazione con lama da sotto
if not sCutting2 then
local sErr = 'Error : cutting H2 not found in library'
EgtOutLog( sErr)
return false, sErr
end
-- verifico che le due lame riescano a lavorare la sezione
local dDimZ = b3Raw:getDimZ()
local dExtra = dMaxVertDepth + dMaxDepth2 - dDimZ
if ( dExtra - 2 * BD.CUT_EXTRA_MIN + 10 * GEO.EPS_SMALL < 0) and not bBigSectionCut then
local sErr = 'Error : section too big for tail cut'
EgtOutLog( sErr)
return false, sErr
end
-- calcolo extra taglio ed accorciamento
local dCutExtra = -dMaxDepth2 + dExtra / 2 + BD.CUT_EXTRA_MIN
local dCutExtra2 = -dMaxVertDepth + dExtra / 2 + BD.CUT_EXTRA_MIN
local dAccStart = 0
-- limiti da sotto
local dVzLimDwnUp
if BD.TURN then dVzLimDwnUp = -2 end
-- eseguo i tagli da sotto necessari
for i = nCuts, 1, -1 do
local dCutOffset = ( i - 1) * dOffsL
local sNotes = EgtIf( bSplit, 'Presplit;', 'Precut;')
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting2, dSawDiam2, MCH_MILL_FU.ORTHO_TOP, dVzLimDwnUp, dCutExtra2, BD.CUT_SIC, dCutOffset, dAccStart, 0, sNotes, b3Raw)
if not bOk then return false, sErr end
end
-- eseguo i tagli da sopra necessari
for i = nCuts, 1, -1 do
local dCutOffset = ( i - 1) * dOffsL
local sNotes
if bSplit then
sNotes = EgtIf( i == 1, 'Split;', 'Presplit;')
else
sNotes = EgtIf( i == 1, 'Cut;', 'Precut;')
end
local bOk, sErr = Fbs.MakeOne( Proc.Id, 0, sCutting, dSawDiam, MCH_MILL_FU.ORTHO_DOWN, dVzLimDwnUp, dCutExtra, BD.CUT_SIC, dCutOffset, dAccStart, 0, sNotes, b3Raw)
if not bOk then return false, sErr end
sErr = sErrHeadChamfer
end
end
return true, nil, nNewPhase
end
return bOk, sErr, nNewPhase
end
---------------------------------------------------------------------
return ProcessSplit
+177 -47
View File
@@ -1,6 +1,7 @@
-- ProcessStepJoint.lua by Egaltech s.r.l. 2022/11/03
-- Gestione calcolo giunto a gradino per Travi
-- 2022/11/03 Correzione per riconoscimento testa da sotto su fresatura.
-- 2023/02/14 Gestite le rotazioni di 90 deg nell'aggiornamento del grezzo.
-- Tabella per definizione modulo
local ProcessStepJoint = {}
@@ -110,7 +111,7 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
EgtSetOperationMode( nMch1Id, false)
return false, sErr
end
-- Inserisco la lavorazione del lato opposto
@@ -133,12 +134,118 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
EgtSetOperationMode( nMch2Id, false)
return false, sErr
end
return true
end
---------------------------------------------------------------------
local function MakePocket( Proc, nPartId, ptPs, vtN, nFaceRef, nDiffWidth, sMchFind, nUseRoughTool, tBHx)
-- calcolo il elevazione dal punto medio
local dElev
local dLenIn, dLedOut = BL.GetPointDirDepth( nPartId, ptPs, vtN[nFaceRef])
if dLenIn > 0 then
dElev = dLenIn
elseif dLedOut then
dElev = dLedOut
end
local dCollSic = 2 * BD.COLL_SIC
local sTuuidMstr
-- calcolo il diametro utensile
local dDiamTool
if nUseRoughTool == 1 then
-- se feature passante prendo utensile più grande possibile
if ( Proc.AffectedFaces.Top and Proc.AffectedFaces.Bottom) or ( Proc.AffectedFaces.Front and Proc.AffectedFaces.Back) then
dDiamTool = nil
else
dDiamTool = max( 80, min( tBHx[nFaceRef][1], tBHx[nFaceRef][2]))
end
else
-- se non uso truciolatore prendo il valore dalle dimensioni minime delle facce
dDiamTool = min( tBHx[nFaceRef][1], tBHx[nFaceRef][2])
end
-- abilitazione lavorazione da sotto (testa da sotto e direzione normale sotto -30deg)
local bTopHead = ( BD.DOWN_HEAD and vtN[nFaceRef]:getZ() > -0.1)
local bDownHead = ( BD.DOWN_HEAD and vtN[nFaceRef]:getZ() < 0.1)
-- recupero la lavorazione
local sPocketing, _, _, bDownHead = ML.FindPocketing( sMchFind.. EgtIf( bDownHead, '_H2', ''), dDiamTool, dElev + dCollSic, nil, bTopHead, bDownHead)
if not sPocketing then
local sErr = 'Error : pocketing not found in library'
EgtOutLog( sErr)
return false, sErr
end
-- recupero il diametro dell'utensile
if EgtMdbSetCurrMachining( sPocketing) then
sTuuidMstr = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuidMstr) or '') then
dDiamTool = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dDiamTool
end
end
-- inserisco la lavorazione di svuotatura
local sName = 'Pock_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. 'F' .. tostring( nFaceRef - 1)
local nMchFId = EgtAddMachining( sName, sPocketing)
if not nMchFId then
local sErr = 'Error adding machining ' .. sName .. '-' .. sPocketing
EgtOutLog( sErr)
return false, sErr
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ Proc.Id, (nFaceRef-1)}})
-- imposto uso faccia
EgtSetMachiningParam( MCH_MP.FACEUSE, MCH_MILL_FU.ORTHO_CONT)
-- imposto posizione braccio porta testa
if vtN[nFaceRef]:getY() < GEO.EPS_SMALL then
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YM)
else
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YP)
end
-- La tasca ha sempre almeno un lato aperto, imposto opportuno attacco
EgtSetMachiningParam( MCH_MP.SUBTYPE, MCH_POCK_SUB.SPIRALIN)
-- imposto elevazione
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dElev, 1))
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
if not ML.ApplyMachining( true, false) then
-- provo ad allargare leggermente la tasca
EgtSetMachiningParam( MCH_MP.OFFSR, -0.1)
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchFId, false)
return false, sErr
end
end
return true, '', sTuuidMstr
end
---------------------------------------------------------------------
local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, ptC, vtN, nBigInd, nSmaInd, ptPs, tBHx, b3Raw, nDiffWidth, nUseRoughTool, dAng)
local sMchFind = 'Pocket'
-- se feature é larga come trave imposto openpocket
if nDiffWidth == 0 then
sMchFind = 'OpenPocket'
-- altrimenti se non è passante disabilito il truciolatore
else
nUseRoughTool = 0
end
-- applico la svuotatura
local bOk, sErr, sTuuidMstr = MakePocket( Proc, nPartId, ptPs, vtN, nBigInd, nDiffWidth, sMchFind, nUseRoughTool, tBHx)
if not bOk then
return bOk, sErr
end
-- se angolo tra le facce maggiore di 90, inserisco la contornatura o svuotatura del lato più corto
if dAng > -90 then
-- applico la svuotatura
local bOk, sErr = MakePocket( Proc, nPartId, ptPs, vtN, nSmaInd, nDiffWidth, sMchFind, nUseRoughTool, tBHx)
if not bOk then
return bOk, sErr
end
end
return true
end
---------------------------------------------------------------------
-- Applicazione della lavorazione al caso due facce
local function MakeTwoFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
@@ -155,6 +262,7 @@ local function MakeTwoFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
return false, sErr
end
-- dati delle facce
local tBHx = {}
local ptC = {}
local vtN = {}
ptC[1], vtN[1] = EgtSurfTmFacetCenter( Proc.Id, 0, GDB_ID.ROOT)
@@ -182,11 +290,13 @@ local function MakeTwoFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
-- recupero i dati dell'utensile
local dSawDiam = 400
local dSawThick = 2
local dMaxDepth = 0
if EgtMdbSetCurrMachining( sCutting) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dSawDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dSawDiam
dSawThick = EgtTdbGetCurrToolParam( MCH_TP.THICK) or dSawThick
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
end
end
@@ -211,7 +321,8 @@ local function MakeTwoFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
-- applico lavorazione
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead)
if not bOk then return bOk, sErr end
end
@@ -222,7 +333,8 @@ local function MakeTwoFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
-- applico lavorazione
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead)
if not bOk then return bOk, sErr end
end
@@ -236,47 +348,58 @@ local function MakeTwoFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
vtRef[2] = vtN[2] ^ vtTg
if vtRef[2] * vtN[1] < 0 then vtRef[2] = - vtRef[2] end
-- determino quale faccia è più grande
local _, dB1, dH1 = EgtSurfTmFacetMinAreaRectangle( Proc.Id, 0)
local _, dB2, dH2 = EgtSurfTmFacetMinAreaRectangle( Proc.Id, 1)
local rfFac1, dB1, dH1 = EgtSurfTmFacetMinAreaRectangle( Proc.Id, 0)
local rfFac2, dB2, dH2 = EgtSurfTmFacetMinAreaRectangle( Proc.Id, 1)
local nBigInd = EgtIf( dB1 * dH1 >= dB2 * dH2, 1, 2)
local nSmaInd = 3 - nBigInd
-- calcolo extra taglio
local dCutExtra = dExtraUp
if dAng < -90.5 and dAng > -179.5 then
dCutExtra = - dSawThick / tan( 180 + dAng) + dExtraUp
end
-- verifico se necessari tagli supplementari
local vCuts = DC.GetDice( nAddGrpId, b3Solid, ptC[nBigInd], vtN[nBigInd], false, ptC[nSmaInd], vtN[nSmaInd])
--DC.PrintOrderCut( vCuts)
if #vCuts > 0 then
-- sistemo posizione nel DB e nome
for i = 1, #vCuts do
for j = 1, #vCuts[i] do
EgtSetName( vCuts[i][j], 'AddCut_' .. tostring( Proc.Id))
EgtSetInfo( vCuts[i][j], 'TASKID', Proc.TaskId)
end
end
-- eseguo
for i = 1, #vCuts do
-- assegno il modo di tagliare
local vtOrthO = EgtIf( ( i % 2) == 1, vtRef[nSmaInd], vtRef[nBigInd])
-- lavoro la faccia
for j = 1, #vCuts[i] do
local dLocCutExtra = EgtIf( j == #vCuts[i], dCutExtra - dExtraUp, dCutExtra)
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthO, nil, dLocCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
if not bOk then
return bOk, sErr
end
end
end
-- altrimenti, tagli diretti delle facce
else
local bOk, sErr = Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, EgtIf( bHead, 'HeadSide', 'TailSide'))
tBHx[1] = {dH1, dV1, rfFac1}
tBHx[2] = {dH2, dV2, rfFac2}
local nUseRoughTool = EgtGetInfo( Proc.Id, 'Q02', 'i')
if nUseRoughTool == 1 and dAng < -0.1 and dAng > -90 then
local bOk, sErr = MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, ptC, vtN, nBigInd, nSmaInd, ptPs, tBHx, b3Raw, 0, nUseRoughTool, dAng)
if not bOk then
return bOk, sErr
end
else
-- calcolo extra taglio
local dCutExtra = dExtraUp
if dAng < -90.5 and dAng > -179.5 then
dCutExtra = - dSawThick / tan( 180 + dAng) + dExtraUp
end
-- verifico se necessari tagli supplementari
local vCuts = DC.GetDice( nAddGrpId, b3Solid, ptC[nBigInd], vtN[nBigInd], false, ptC[nSmaInd], vtN[nSmaInd])
--DC.PrintOrderCut( vCuts)
if #vCuts > 0 then
-- sistemo posizione nel DB e nome
for i = 1, #vCuts do
for j = 1, #vCuts[i] do
EgtSetName( vCuts[i][j], 'AddCut_' .. tostring( Proc.Id))
EgtSetInfo( vCuts[i][j], 'TASKID', Proc.TaskId)
end
end
-- eseguo
for i = 1, #vCuts do
-- assegno il modo di tagliare
local vtOrthO = EgtIf( ( i % 2) == 1, vtRef[nSmaInd], vtRef[nBigInd])
-- lavoro la faccia
for j = 1, #vCuts[i] do
local dLocCutExtra = EgtIf( j == #vCuts[i], dCutExtra - dExtraUp, dCutExtra)
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, vtOrthO, nil, dLocCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
if not bOk then
return bOk, sErr
end
end
end
-- altrimenti, tagli diretti delle facce
else
local bOk, sErr = Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, EgtIf( bHead, 'HeadSide', 'TailSide'))
if not bOk then
return bOk, sErr
end
end
end
end
-- eventuale segnalazione ingombro di testa o coda
if Proc.Head then
local dOffs = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
@@ -319,10 +442,12 @@ local function MakeThreeFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
if bAdj12 then
if dAng12 < 0 then
EgtSurfTmSwapFacets( Proc.Id, 0, 2)
Proc.Face = BL.GetFacetsInfo( Proc, b3Raw)
end
elseif bAdj20 then
if dAng20 < 0 then
EgtSurfTmSwapFacets( Proc.Id, 1, 2)
Proc.Face = BL.GetFacetsInfo( Proc, b3Raw)
end
end
-- dati delle facce
@@ -389,7 +514,8 @@ local function MakeThreeFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
-- applico lavorazione
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead)
if not bOk then return bOk, sErr end
end
@@ -433,18 +559,22 @@ local function MakeThreeFaces( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- Eventuale segnalazione ingombro di testa o coda
if Proc.Head then
local dOffs = b3Raw:getMax():getX() - dOvmHead - Proc.Box:getMin():getX()
if vtNm:getZ() > 0.5 then
dOffs = 0.5 * dOffs
elseif abs( vtNm:getZ()) > 0.35 then
dOffs = 0.75 * dOffs
if not BD.ROT90 then
if vtNm:getZ() > 0.5 then
dOffs = 0.5 * dOffs
elseif abs( vtNm:getZ()) > 0.35 then
dOffs = 0.75 * dOffs
end
end
BL.UpdateHCING( nRawId, dOffs)
elseif Proc.Tail then
local dOffs = Proc.Box:getMax():getX() - b3Solid:getMin():getX()
if vtNm:getZ() > 0.5 then
dOffs = 0.5 * dOffs
elseif abs( vtNm:getZ()) > 0.35 then
dOffs = 0.75 * dOffs
if not BD.ROT90 then
if vtNm:getZ() > 0.5 then
dOffs = 0.5 * dOffs
elseif abs( vtNm:getZ()) > 0.35 then
dOffs = 0.75 * dOffs
end
end
BL.UpdateTCING( nRawId, dOffs)
end
+54 -52
View File
@@ -1,6 +1,7 @@
-- ProcessStepJointNotch.lua by Egaltech s.r.l. 2022/11/03
-- Gestione calcolo tacca a gradino per Travi
-- 2022/11/03 Correzione per riconoscimento testa da sotto su fresatura.
-- 2024/06/28 In MakeFourFaces aggiunta copia del parametro PartId sulla nuova Proc
-- Tabella per definizione modulo
local ProcessStepJointNotch = {}
@@ -11,6 +12,8 @@ local BL = require( 'BeamLib')
local Fbs = require( 'FacesBySaw')
local DC = require( 'DiceCut')
local Cut = require( 'ProcessCut')
local Topology = require( 'FeatureTopology')
local LapJoint = require( 'ProcessLapJoint')
EgtOutLog( ' ProcessStepJointNotch started', 1)
@@ -24,13 +27,30 @@ function ProcessStepJointNotch.Identify( Proc)
return ( ( Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 80)
end
---------------------------------------------------------------------
-- Verifica se feature di testa
function ProcessStepJointNotch.IsHeadFeature( Proc, b3Raw, dCurrOvmH)
return false
end
---------------------------------------------------------------------
-- Verifica se feature di coda
function ProcessStepJointNotch.IsTailFeature( Proc, b3Raw)
-- recupero box del pezzo
local nPartId = EgtGetParent( EgtGetParent( Proc.Id) or GDB_ID.NULL)
local b3Solid = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
-- verifico se è in coda
local dEndDist = Proc.Box:getMin():getX() - b3Solid:getMin():getX()
return ( dEndDist < BD.MAX_DIST_HTFEA)
end
---------------------------------------------------------------------
-- Classificazione della feature
function ProcessStepJointNotch.Classify( Proc)
-- numero delle facce
local nFacetCnt = EgtSurfTmFacetCount( Proc.Id)
-- gestisco solo 2 o 4 facce
if nFacetCnt ~= 2 and nFacetCnt ~= 4 and nFacetCnt ~= 6 and nFacetCnt ~= 8 then
if nFacetCnt ~= 2 and nFacetCnt ~= 3 and nFacetCnt ~= 4 and nFacetCnt ~= 6 and nFacetCnt ~= 8 then
return false, false
end
-- verifico le normali delle facce
@@ -89,47 +109,10 @@ local function MachineByBlade( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Solid,
EgtOutLog( sErr)
return false, sErr
end
-- verifico se necessari tagli supplementari
local vCuts = DC.GetDice( nAddGrpId, b3Solid, ptC[nBigInd], vtN[nBigInd], false, ptC[nSmaInd], vtN[nSmaInd])
--DC.PrintOrderCut( vCuts)
if #vCuts > 0 then
-- sistemo posizione nel DB e nome
for i = 1, #vCuts do
for j = 1, #vCuts[i] do
EgtSetName( vCuts[i][j], 'AddCut_' .. tostring( Proc.Id))
EgtSetInfo( vCuts[i][j], 'TASKID', Proc.TaskId)
end
end
-- eseguo
for i = 1, #vCuts do
-- determino il modo di tagliare
local k, l = nBigInd, nSmaInd
if ( i % 2) == 1 then
k, l = l, k
end
local nOrthoOpposite
if bOnY then
local bFront = ( ptC[k]:getY() < ptPs:getY())
nOrthoOpposite = EgtIf( bFront, MCH_MILL_FU.ORTHO_BACK, MCH_MILL_FU.ORTHO_FRONT)
else
local bOver = ( vtN[nBigInd]:getZ() > -0.1)
nOrthoOpposite = EgtIf( bOver, MCH_MILL_FU.ORTHO_DOWN, MCH_MILL_FU.ORTHO_TOP)
end
-- lavoro la faccia
for j = 1, #vCuts[i] do
local dLocCutExtra = EgtIf( j == #vCuts[i], dCutExtra - dExtraUp, dCutExtra)
local bOk, sErr = Fbs.MakeOne( vCuts[i][j], 0, sCutting, dSawDiam, nOrthoOpposite, EgtIf( bDownHead, -2, nil), dLocCutExtra, BD.CUT_SIC, 0, 0, 0, nil, b3Raw)
if not bOk then
return bOk, sErr
end
end
end
-- altrimenti, tagli diretti delle facce
else
local bOk, sErr = Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, 'HeadSide' .. EgtIf( bDownHead, '_H2', ''), nil, bDownHead)
if not bOk then
return bOk, sErr
end
-- tagli delle facce
local bOk, sErr = Fbs.MakeTwo( Proc, nPhase, nRawId, nPartId, dOvmHead, 'HeadSide' .. EgtIf( bDownHead, '_H2', ''), nil, bDownHead)
if not bOk then
return bOk, sErr
end
return true
end
@@ -150,7 +133,12 @@ local function MakePocket( Proc, nPartId, ptPs, vtN, nFaceRef, nDiffWidth, sMchF
-- calcolo il diametro utensile
local dDiamTool
if nUseRoughTool == 1 then
dDiamTool = max( 80, min( tBHx[nFaceRef][1], tBHx[nFaceRef][2]))
-- se feature passante prendo utensile più grande possibile
if ( Proc.AffectedFaces.Top and Proc.AffectedFaces.Bottom) or ( Proc.AffectedFaces.Front and Proc.AffectedFaces.Back) then
dDiamTool = nil
else
dDiamTool = max( 80, min( tBHx[nFaceRef][1], tBHx[nFaceRef][2]))
end
else
-- se non uso truciolatore prendo il valore dalle dimensioni minime delle facce
dDiamTool = min( tBHx[nFaceRef][1], tBHx[nFaceRef][2])
@@ -193,8 +181,9 @@ local function MakePocket( Proc, nPartId, ptPs, vtN, nFaceRef, nDiffWidth, sMchF
-- La tasca ha sempre almeno un lato aperto, imposto opportuno attacco
EgtSetMachiningParam( MCH_MP.SUBTYPE, MCH_POCK_SUB.SPIRALIN)
-- imposto elevazione
local sNotes = 'MaxElev=' .. EgtNumToString( dElev, 1) .. ';'
EgtSetMachiningParam( MCH_MP.USERNOTES, sNotes)
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dElev, 1))
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
if not ML.ApplyMachining( true, false) then
-- provo ad allargare leggermente la tasca
EgtSetMachiningParam( MCH_MP.OFFSR, -0.1)
@@ -301,8 +290,8 @@ local function MachineByMill( Proc, nPhase, nRawId, nPartId, b3Solid, ptC, vtN,
-- setto a 0 eventuali offset
EgtSetMachiningParam( MCH_MP.OFFSR, 0)
-- applico gli allungamenti o accorciamenti considerando che la lavorazione è invertita
EgtSetMachiningParam( MCH_MP.STARTADDLEN, EgtIf( bOpenStart, dTDiam / 2, - dTDiam / 2))
EgtSetMachiningParam( MCH_MP.ENDADDLEN, EgtIf( bOpenEnd, dTDiam / 2, - dTDiam / 2))
EgtSetMachiningParam( MCH_MP.STARTADDLEN, EgtIf( bOpenStart, dTDiam / 2 + 10, - dTDiam / 2))
EgtSetMachiningParam( MCH_MP.ENDADDLEN, EgtIf( bOpenEnd, dTDiam / 2 + 10, - dTDiam / 2))
-- attacchi e uscite lineari con parte tg nulla
EgtSetMachiningParam( MCH_MP.LEADINTYPE, MCH_MILL_LI.LINEAR)
EgtSetMachiningParam( MCH_MP.LITANG, 0)
@@ -403,7 +392,9 @@ local function MakeFourFaces( Proc, nPhase, nRawId, nPartId, dOvmHead, nDiffWidt
EgtSurfTmSwapFacets( AddId, 1, 3)
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
-- applico lavorazione
local NewProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg}
local NewProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg, PartId = Proc.PartId}
local b3Raw = EgtGetRawPartBBox( nRawId)
Topology.Classify( NewProc, b3Raw)
local bOk, sErr = MakeTwoFaces( NewProc, nPhase, nRawId, nPartId, dOvmHead, nDiffWidth)
if not bOk then return bOk, sErr end
end
@@ -498,7 +489,7 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
end
-- se diretta verso Z
elseif abs( vtExtr:getZ()) > 0.99 then
elseif abs( vtExtr:getZ()) > 0.99 and not ( BD.DOWN_HEAD or nTypePos == 0) then
-- se diretta verso Z+
if vtExtr:getZ() > 0 then
-- se sborda verso Z+ abilito solo la lavorazione della parte normale
@@ -523,7 +514,7 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
local dExtra = 2
-- recupero la lavorazione
local sMillType = 'Mark'
local bDownHead = ( BD.DOWN_HEAD and abs( vtExtr:getZ()) < 0.1)
local bDownHead = BD.DOWN_HEAD and vtExtr:getZ() < GEO.EPS_SMALL
local sMilling, bH2
sMilling, _, _, bH2 = ML.FindMilling( sMillType, nil, nil, nil, nil, true, bDownHead)
if not sMilling then
@@ -551,11 +542,19 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
EgtSetOperationMode( nMch1Id, false)
return false, sErr
end
end
if bExeOpposite then
bDownHead = BD.DOWN_HEAD and vtExtr:getZ() > - GEO.EPS_SMALL
sMilling, _, _, bH2 = ML.FindMilling( sMillType, nil, nil, nil, nil, true, bDownHead)
if not sMilling then
local sErr = 'Error : milling not found in library'
EgtOutLog( sErr)
return false, sErr
end
bDownHead = ( bDownHead and bH2)
-- Inserisco la lavorazione del lato opposto
local sName2 = 'SJN_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMch2Id = EgtAddMachining( sName2, sMilling)
@@ -576,7 +575,7 @@ local function MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchId, false)
EgtSetOperationMode( nMch2Id, false)
return false, sErr
end
end
@@ -586,6 +585,9 @@ end
---------------------------------------------------------------------
-- Applicazione della lavorazione
function ProcessStepJointNotch.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
if Proc.Fct == 3 then
return LapJoint.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
-- esecuzione eventuale smusso
-- ottengo anche il flag che indica che la feature è larga come la trave
local bOkc, sErrC, nDiffWidth = MakeChamfer( Proc, nPhase, nRawId, nPartId, dOvmHead)
+84 -16
View File
@@ -1,4 +1,4 @@
-- ProcessTenon.lua by Egaltech s.r.l. 2022/12/12
-- ProcessTenon.lua by Egaltech s.r.l. 2023/09/26
-- Gestione calcolo tenone per Travi
-- 2021/10/04 Corretto calcolo HCING per pezzi piccoli.
-- 2022/02/15 Aggiornata VerifyOrientation per macchine con testa da sotto.
@@ -7,6 +7,10 @@
-- 2022/09/20 Migliorato il calcolo delle passate laterali; ora considera la reale distanza tra contorno del tenone e estremi della faccia
-- 2022/11/03 Corretto uso di bH2 (da sotto solo se anche bMillDown vero).
-- 2022/12/12 Su macchine con rulli pressori e pinze separate si riduce di meno l'ingombro con tenoni inclinati.
-- 2022/12/20 Aggiunta gestione smusso. Migliorata scelta tra sopra e sotto per il punto di inizio. In VerifyOrientation aggiunta trave medio alta.
-- 2023/01/20 Modificata scelta lato di attacco per pezzo piccolo su macchine con pinza speciale (pinza 5).
-- 2023/03/27 Migliorate condizioni scelta pretaglio con lama o fresa; gestione unificata con ProcessDtTenon. Migliorato calcolo altezza tenone.
-- 2023/09/26 Per macchina TURN si assegna SCC per privilegiare accesso dal lato corto della trave.
-- Tabella per definizione modulo
local ProcessTenon = {}
@@ -32,8 +36,8 @@ local function VerifyOrientation( Proc, vtN, b3Raw)
end
-- se trave molto bassa
if b3Raw:getDimZ() <= 120 then
-- se tenone praticamente in asse, accetto fino a -45 deg
if abs( vtN:getY()) < 0.04 then
-- se non testa PF e tenone praticamente in asse, accetto fino a -45 deg
if not BD.C_SIMM and abs( vtN:getY()) < 0.04 then
return ( vtN:getZ() >= -0.7072)
-- altrimenti accetto fino a -30deg
else
@@ -57,6 +61,15 @@ local function VerifyOrientation( Proc, vtN, b3Raw)
else
return ( vtN:getZ() >= -0.174)
end
-- se trave medio alta
elseif b3Raw:getDimZ() <= 400 then
-- se tenone praticamente in asse, accetto fino a -15 deg
if abs( vtN:getY()) < 0.04 then
return ( vtN:getZ() >= -0.259)
-- altrimenti, accetto fino a -5 deg
else
return ( vtN:getZ() >= -0.088)
end
-- altrimenti
else
-- accetto fino a -5deg
@@ -117,8 +130,8 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
-- determino altezza del tenone
local frTen = Frame3d( ptBC, vtExtr)
local b3Ten = EgtGetBBoxRef( Proc.Id, GDB_BB.STANDARD, frTen)
local dTenH = b3Ten:getDimZ()
local b3Ten = EgtGetBBoxRef( Proc.Id, GDB_BB.STANDARD, frTen)
local dTenH = b3Ten:getMax():getZ()
-- assegno centro e normale della faccia top
local vtN = vtExtr
local ptC = ptBC + vtN * dTenH
@@ -169,11 +182,10 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
if AddId then
EgtSetName( AddId, 'AddCut_' .. tostring( Proc.Id))
EgtSetInfo( AddId, 'TASKID', Proc.TaskId)
-- se pezzo piccolo, in coda, con piano inclinato verso il basso e macchina con testa da sotto applico svuotatura
if bShortPart and vtExtr:getX() < 0 and vtExtr:getZ() < -0.09 and BD.DOWN_HEAD then
-- solo per macchine tipo PF e simili: se pezzo piccolo, in coda, piano inclinato attorno a Z e inclinato verso il basso applico svuotatura
if b3Solid:getDimX() < BD.LEN_SHORT_PART and vtExtr:getX() < 0 and abs( vtExtr:getY()) > 0.173 and vtExtr:getZ() < -0.1 and BD.C_SIMM then
-- recupero la lavorazione
local sPockType = EgtIf( bMillDown, 'OpenPocket_H2', 'OpenPocket')
local sPocketing = ML.FindPocketing( sPockType, nil, nil, nil, not bMillDown, bMillDown)
local sPocketing = ML.FindPocketing( 'OpenPocket', nil, nil, nil, not bMillDown, bMillDown)
if not sPocketing then
local sErr = 'Error : pocketing '..sPockType..' not found in library'
EgtOutLog( sErr)
@@ -188,7 +200,8 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
else
local b3Cut = EgtGetBBoxGlob( AddId or GDB_ID.NULL, GDB_BB.STANDARD)
local CutProc = { Id = AddId, Grp = Proc.Grp, Prc = Proc.Prc, Box = b3Cut, Fct = 1, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bFromBottom = ( bShortPart and vtExtr:getZ() > 0.25)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead, bFromBottom)
if not bOk then
@@ -197,6 +210,45 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
end
end
end
-- se vero tenone e richiesto, eseguo lo smusso
if Proc.Prc ~= 52 and EgtGetInfo( Proc.Id, 'P05', 'i') == 1 then
-- profondità smusso
local dDepth = EgtGetInfo( Proc.Id, 'Q01', 'd') or 0
if dDepth > 0.1 then
local dExtra = 2
-- recupero la lavorazione
local sMilling = ML.FindMilling( 'Mark', nil, nil, nil, nil, bMillUp, bMillDown)
if not sMilling then
local sErr = 'Error : milling (Mark) not found in library'
EgtOutLog( sErr)
return false, sErr
end
-- Inserisco la lavorazione
local sName1 = 'TenC_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id))
local nMch1Id = EgtAddMachining( sName1, sMilling)
if not nMch1Id then
local sErr = 'Error adding machining ' .. sName1 .. '-' .. sMilling
EgtOutLog( sErr)
return false, sErr
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- assegno affondamento e offset radiale
EgtSetMachiningParam( MCH_MP.DEPTH, -dTenH + dDepth + dExtra)
EgtSetMachiningParam( MCH_MP.OFFSR, dExtra)
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dDepth + dExtra, 1))
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- assegno lato di lavoro
EgtSetMachiningParam( MCH_MP.WORKSIDE, MCH_MILL_WS.RIGHT)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMch1Id, false)
return false, sErr
end
end
end
-- recupero la lavorazione
local sMillType = 'Tenon'
local sMilling, _, _, bH2 = ML.FindMilling( sMillType, dTenH, nil, nil, nil, bMillUp, bMillDown)
@@ -224,10 +276,17 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- massimo numero di passate e coefficiente di sovrapposizione ta passate
local MAX_PASS = 6
local OVERLAP_COEFF = 0.7
-- porto inizio curva il più possibile sul bordo in alto o in basso
-- porto inizio curva il più possibile sul bordo in alto, in basso o di lato a seconda delle necessità
local dMaxDist = OVERLAP_COEFF * dMillDiam * MAX_PASS
local nNearSide = 3
local bMyShortPart = ( bShortPart and vtN:getX() < 0 and abs( vtN:getX()) < 0.999 and abs( vtN:getY()) < 0.259)
BL.PutStartNearestToEdge( AuxId, b3Solid, dMaxDist, EgtIf( bH2 and bMillDown, not bMyShortPart, bMyShortPart))
if bH2 and bMillDown then
nNearSide = EgtIf( bMyShortPart and vtN:getZ() < -0.018, 3, -3)
else
nNearSide = EgtIf( bMyShortPart and vtN:getZ() > 0.018, -3, 3)
end
if bMyShortPart and BD.CLAMP5 then nNearSide = -2 end
BL.PutStartNearestToEdge( AuxId, b3Solid, dMaxDist, nNearSide)
-- se elevazione superiore a massimo affondamento della fresa, riduco opportunamente
local sWarn
local dDepth = 0
@@ -252,7 +311,10 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- aggiungo geometria
EgtSetMachiningGeometry( {{ AuxId, -1}})
-- sistemo i parametri
EgtSetMachiningParam( MCH_MP.USERNOTES, 'MaxElev=' .. EgtNumToString( dTenH - 100 * GEO.EPS_SMALL, 1) .. ';')
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dTenH - 100 * GEO.EPS_SMALL, 1))
if i < nPass then sUserNotes = EgtSetValInNotes( sUserNotes, 'OutRaw', 3) end
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
EgtSetMachiningParam( MCH_MP.DEPTH, dDepth)
local dOffset = ( i - 1) * dStep
EgtSetMachiningParam( MCH_MP.OFFSR, dOffset)
@@ -262,13 +324,19 @@ function ProcessTenon.Make( Proc, nPhase, nRawId, nPartId, dOvmHead)
-- se contorno aperto, cambio parametri di attacco/uscita
if not bClosed then
EgtSetMachiningParam( MCH_MP.LITANG, 0.7 * dMillDiam)
EgtSetMachiningParam( MCH_MP.LIPERP, 0)
EgtSetMachiningParam( MCH_MP.LIPERP, 20)
EgtSetMachiningParam( MCH_MP.LOTANG, 0.7 * dMillDiam)
EgtSetMachiningParam( MCH_MP.LOPERP, 0)
EgtSetMachiningParam( MCH_MP.LOPERP, 20)
end
-- imposto posizione braccio porta testa
local nSCC = MCH_SCC.NONE
if not BD.C_SIMM and not BD.TURN then
if BD.TURN then
if b3Solid:getDimY() >= b3Solid:getDimZ() then
nSCC = MCH_SCC.ADIR_ZP
else
nSCC = MCH_SCC.ADIR_YM
end
elseif not BD.C_SIMM then
nSCC = MCH_SCC.ADIR_YM
if abs( vtExtr:getY()) > 0.088 then
nSCC = EgtIf( vtExtr:getX() < GEO.EPS_SMALL, MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
+11 -8
View File
@@ -1,6 +1,7 @@
-- ProcessTyroleanDovetail.lua by Egaltech s.r.l. 2022/03/21
-- Gestione calcolo giunzione tirolese
-- 2022/06/10 Aggiunto il parametro dOvmTail per gestire sovramateriali in coda diversi da OVM_MID (sezioni alte e larghe)
-- 2023/09/26 Modificata chiamata a GetFaceWithMostAdj.
-- Tabella per definizione modulo
local ProcessTyroleanDovetail = {}
@@ -231,7 +232,8 @@ local function MakeMachByBlade( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw,
-- se va fatto, inserisco la lavorazione
if bCut then
local CutProc = { Id = AuxId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead)
-- se taglio applicato setto la nota al gruppo Mach per non doverla lavorare una seconda volta
if bOk then
@@ -329,7 +331,8 @@ local function MakeMachByBlade( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw,
-- se va fatto, inserisco la lavorazione
if bCut then
local CutProc = { Id = AuxId, Grp = Proc.Grp, Prc = Proc.Prc, Box = Proc.Box, Fct = Proc.Fct, Flg = Proc.Flg,
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId}
Head = Proc.Head, Tail = Proc.Tail, CutId = Proc.CutId, TaskId = Proc.TaskId, PartId = Proc.PartId}
CutProc.AffectedFaces = BL.GetProcessAffectedFaces( CutProc)
local bOk, sErr = Cut.Make( CutProc, nPhase, nRawId, nPartId, dOvmHead)
-- se taglio applicato setto la nota al gruppo Mach per non doverla lavorare una seconda volta
if bOk then
@@ -448,12 +451,12 @@ local function MakeMillCut( Proc, i, j, k, sMilling, nFacInd, TabNAD, rfFac, dOf
EgtSetMachiningParam( MCH_MP.STARTADDLEN, ( dToolDiam * 0.75))
EgtSetMachiningParam( MCH_MP.ENDADDLEN, ( dToolDiam * 0.75))
-- Note utente con dichiarazione nessuna generazione sfridi per Vmill solo in ultima passata in Z locale
local sUserNotes
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
if i < nStep then
sUserNotes = 'MaxElev=' .. EgtNumToString( dStep, 1) .. ';'
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dStep, 1))
else
sUserNotes = 'VMRS=0;'
sUserNotes = sUserNotes .. 'MaxElev=' .. EgtNumToString( dStep, 1) .. ';'
sUserNotes = EgtSetValInNotes( sUserNotes, 'VMRS', 0)
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dStep, 1))
end
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- eseguo
@@ -510,10 +513,10 @@ local function MakeMachByMill( Proc, nPhase, nRawId, nPartId, dOvmHead, b3Raw, b
dStepmach = dMaxMat * 0.5
end
-- recupero la faccia con il maggior numero di adiacenze e l'elevazione relativa
local nFacInd, dFacElev = BL.GetFaceWithMostAdj( Proc.Id, nPartId, false, sin(dSideAngle))
local nFacInd, dFacElev = BL.GetFaceWithMostAdj( Proc, nPartId, false, sin(dSideAngle))
if not nFacInd or nFacInd < 0 then
-- provo eliminando i sottosquadra
nFacInd, dFacElev = BL.GetFaceWithMostAdj( Proc.Id, nPartId, false, -2)
nFacInd, dFacElev = BL.GetFaceWithMostAdj( Proc, nPartId, false, -2)
if not nFacInd or nFacInd < 0 then
local sErr = 'Error on process ' .. tostring( Proc.Id) .. ' MakeMachByMill could not find reference face'
EgtOutLog( sErr)
+172
View File
@@ -0,0 +1,172 @@
-- ProcessVariant.lua by Egaltech s.r.l. 2023/11/08
-- Gestione calcolo Feature Custom (Variant) per Travi
-- 2023/11/08 Creazione modulo.
-- 2023/11/30 Calcolo elevazione velocizzato e centralizzato tramite la funzione GetFaceElevation.
-- Tabella per definizione modulo
local ProcessVariant = {}
-- Include
require( 'EgtBase')
local BL = require( 'BeamLib')
EgtOutLog( ' ProcessVariant started', 1)
-- Dati
local BD = require( 'BeamData')
local ML = require( 'MachiningLib')
---------------------------------------------------------------------
-- Riconoscimento della feature
function ProcessVariant.Identify( Proc)
return (( Proc.Grp == 0 or Proc.Grp == 1 or Proc.Grp == 2 or Proc.Grp == 3 or Proc.Grp == 4) and Proc.Prc == 900)
end
---------------------------------------------------------------------
-- Classificazione della feature: decide se la feature è in una posizione lavorabile
local function ClassifyPocket( Proc, b3Raw)
-- recupero gli indici delle facce da lavorare
local vFace = EgtGetInfo( Proc.Id, 'Faces', 'vi')
if not vFace or #vFace == 0 then
local sErr = 'Error : missing Faces for Pocketing'
EgtOutLog( sErr)
return false
end
-- recupero le normali di tutte le facce e verifico siano uguali
local vtN
for i = 1, #vFace do
local vtNf = EgtSurfTmFacetNormVersor( Proc.Id, vFace[i], GDB_ID.ROOT)
if not vtN then
vtN = vtNf
else
if not AreSameVectorApprox( vtN, vtNf) then
local sErr = 'Error : Faces for Pocketing with different orientation'
EgtOutLog( sErr)
return false
end
end
end
local bDown = ( vtN:getZ() < - 0.5)
-- se da sotto e presente rinvio angolare verifico se c'è opportuna lavorazione
if bDown and BD.ANG_TRASM then
local dMaxDiam = EgtGetInfo( Proc.Id, 'MaxDiam', 'd')
if ML.FindPocketing( 'Pocket_AT', dMaxDiam) then
bDown = false
end
end
return true, bDown, false
end
---------------------------------------------------------------------
function ProcessVariant.Classify( Proc, b3Raw)
-- recupero il codice identificativo e il tipo di lavorazione
local sCode = EgtGetInfo( Proc.Id, 'DES')
local sType = EgtGetInfo( Proc.Id, 'Type')
-- gestione in base al tipo
if sType == 'Pocket' then
return ClassifyPocket( Proc, b3Raw)
else
return false
end
end
---------------------------------------------------------------------
-- Applicazione della lavorazione
local function MakePocket( Proc, nRawId, b3Raw, nPartId)
local b3Solid = EgtGetBBoxGlob( EgtGetFirstNameInGroup( nPartId, 'Box') or GDB_ID.NULL, GDB_BB.STANDARD)
-- recupero gli indici delle facce da lavorare
local vFace = EgtGetInfo( Proc.Id, 'Faces', 'vi')
if not vFace or #vFace == 0 then
local sErr = 'Error : missing Faces for Pocketing'
EgtOutLog( sErr)
return false
end
-- recupero i dati delle facce (le normali sono identiche)
local dTotDepth = 0
local vDepth = {}
for i = 1, #vFace do
vDepth[i] = BL.GetFaceElevation( Proc, vFace[1], b3Solid)
dTotDepth = max( dTotDepth, vDepth[i])
end
local vtN = EgtSurfTmFacetNormVersor( Proc.Id, vFace[1], GDB_ID.ROOT)
-- recupero eventuale massimo diametro impostato
local dMaxDiam = EgtGetInfo( Proc.Id, 'MaxDiam', 'd')
-- abilitazione lavorazione da sotto
local bMillUp = ( BD.DOWN_HEAD and vtN:getZ() > -0.259)
local bMillDown = ( BD.DOWN_HEAD and vtN:getZ() < 0.174)
local bMillAngTrasm = ( BD.ANG_TRASM and vtN:getZ() < -0.5)
-- recupero la lavorazione
local sPockType = EgtIf( not bMillAngTrasm, 'Pocket', 'Pocket_AT')
local sPocketing = ML.FindPocketing( sPockType, dMaxDiam, dTotDepth)
if not sPocketing then
sPocketing = ML.FindPocketing( sPockType, dMaxDiam, dTotDepth / 2)
if not sPocketing then
local sErr = 'Error : pocketing not found in library'
EgtOutLog( sErr)
return false, sErr
end
end
-- recupero i dati dell'utensile
local dMillDiam = 20
local dMaxDepth = 0
if EgtMdbSetCurrMachining( sPocketing) then
local sTuuid = EgtMdbGetCurrMachiningParam( MCH_MP.TUUID)
if EgtTdbSetCurrTool( EgtTdbGetToolFromUUID( sTuuid) or '') then
dMillDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM) or dMillDiam
dMaxDepth = EgtTdbGetCurrToolMaxDepth() or dMaxDepth
end
end
-- se elevazione superiore a massimo affondamento della fresa, segnalo
local sWarn
if dTotDepth > dMaxDepth + 10 * GEO.EPS_SMALL then
sWarn = 'Warning : elevation bigger than max tool depth'
EgtOutLog( sWarn)
end
-- lavoro ogni faccia
for i = 1, #vFace do
-- inserisco la lavorazione di svuotatura
local sName = 'Pock_' .. ( EgtGetName( Proc.Id) or tostring( Proc.Id)) .. '_' .. tostring( i)
local nMchFId = EgtAddMachining( sName, sPocketing)
if not nMchFId then
local sErr = 'Error adding machining ' .. sName .. '-' .. sPocketing
EgtOutLog( sErr)
return false, sErr
end
-- aggiungo geometria
EgtSetMachiningGeometry( {{ Proc.Id, vFace[i]}})
-- imposto posizione braccio porta testa
if vtN:getY() <= 0 then
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YM)
else
EgtSetMachiningParam( MCH_MP.SCC, MCH_SCC.ADIR_YP)
end
EgtSetMachiningParam( MCH_MP.DEPTH, min( 0, dMaxDepth - vDepth[i]))
-- imposto elevazione
local sUserNotes = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
sUserNotes = EgtSetValInNotes( sUserNotes, 'MaxElev', EgtNumToString( dMaxDepth, 1))
EgtSetMachiningParam( MCH_MP.USERNOTES, sUserNotes)
-- eseguo
if not ML.ApplyMachining( true, false) then
local _, sErr = EgtGetLastMachMgrError()
EgtSetOperationMode( nMchFId, false)
return false, sErr
end
end
return true, sWarn
end
---------------------------------------------------------------------
function ProcessVariant.Make( Proc, nRawId, b3Raw, nPartId)
-- recupero il codice identificativo e il tipo di lavorazione
local sCode = EgtGetInfo( Proc.Id, 'DES')
local sType = EgtGetInfo( Proc.Id, 'Type')
-- gestione in base al tipo
if sType == 'Pocket' then
return MakePocket( Proc, nRawId, b3Raw, nPartId)
else
return false, 'Variant Type non recognized for machining'
end
end
---------------------------------------------------------------------
return ProcessVariant
+254 -131
View File
@@ -1,7 +1,8 @@
-- BeamNestProcess.lua by Egaltech s.r.l. 2021/06/14
-- BeamNestProcess.lua by Egaltech s.r.l. 2023/01/15
-- Gestione nesting automatico travi
-- 2022/10/05 Piccole modifiche per far funzionare correttamente i compilati
-- 2022/10/06 Corretto bug che moltiplicava i pezzi se erano presenti più grezzi della stessa sezione
-- 2022/10/05 Piccole modifiche per far funzionare correttamente i compilati.
-- 2022/10/06 Corretto bug che moltiplicava i pezzi se erano presenti più grezzi della stessa sezione.
-- 2023/01/15 Piccole correzioni.
-- Intestazioni
require( 'EgtBase')
@@ -14,9 +15,12 @@ EgtEnableDebug( false)
--NEST.MACHINE = 'Essetre-90480019_MW'
--NEST.FLAG = 3
local sLog = ' +++ BeamNestProcess : ' .. NEST.FILE .. ', ' .. NEST.MACHINE .. ', ' .. LEN["1"]
local sLog = ' +++ BeamNestProcess : ' .. NEST.FILE .. ', ' .. NEST.MACHINE .. ', ' .. LEN[1]
EgtOutLog( sLog)
-- flag per abilitare statistiche in log
local bLogStat = false
-- Cancello file di log specifico
local sLogFile = EgtChangePathExtension( NEST.FILE, '.txt')
EgtEraseFile( sLogFile)
@@ -87,9 +91,9 @@ local function ExecMaximumFilling( Raw, Parts)
EgtMaxFillerAddPart( i, Parts[i].Len, Parts[i].DispLen or Parts[i].Len, Parts[i].Cnt or 1)
end
-- Eseguo l'ottimizzazione
EgtStartCounter()
--EgtStartCounter()
EgtMaxFillerCompute( Raw.LenToFill, Raw.StartGap, Raw.MidGap, Raw.EndGap, Raw.SortType)
local dTime = EgtStopCounter()
--local dTime = EgtStopCounter()
-- Recupero i risultati
local nFilledParts, nDiffParts, dTotFillRatio = EgtMaxFillerGetResults()
local OneRes = {}
@@ -97,7 +101,8 @@ local function ExecMaximumFilling( Raw, Parts)
local nPartId, nCount = EgtMaxFillerGetOneResult( i)
table.insert( OneRes, { Id=nPartId, Count=nCount})
end
return { FilledParts=nFilledParts, DiffParts=nDiffParts, FillRatio=dTotFillRatio, Time=dTime, Data=OneRes}
--return { FilledParts=nFilledParts, DiffParts=nDiffParts, FillRatio=dTotFillRatio, Time=dTime, Data=OneRes}
return { FilledParts=nFilledParts, DiffParts=nDiffParts, FillRatio=dTotFillRatio, Data=OneRes}
end
-- Funzione per trovare nome MachGroup
@@ -155,34 +160,36 @@ local nErrCnt = 0
local nWarnCnt = 0
-- Grezzi
-- lista dei grezzi
local Raws = {}
-- creo tabella dei grezzi
for nIndex, nLen in pairs( LEN) do
table.insert(Raws, {LenToFill = nLen, StartGap = NEST.STARTOFFSET, MidGap = NEST.OFFSET, EndGap = 0, SortType = -1})
Raws[tonumber(nIndex)] = {LenToFill = nLen, StartGap = NEST.STARTOFFSET, MidGap = NEST.OFFSET, EndGap = 0, SortType = -1}
end
for nIndex, nQty in pairs( QTY) do
Raws[tonumber(nIndex)].Count = nQty
end
--local nTotRaws = Raws.Count
-- Pezzi
local Parts = {}
-- cerco il grezzo con la lunghezza maggiore, epurata dello start gap
local maxRawLenToFillNoStartGap = 0
for RawIndex = 1, #Raws do
maxRawLenToFillNoStartGap = max( maxRawLenToFillNoStartGap, Raws[RawIndex].LenToFill - Raws[RawIndex].StartGap)
if Raws[RawIndex].Count > 0 then
maxRawLenToFillNoStartGap = max( maxRawLenToFillNoStartGap, Raws[RawIndex].LenToFill - Raws[RawIndex].StartGap)
end
end
-- Pezzi
local Parts = {}
-- ciclo su pezzi per aggiungerli al nesting
local dTotLen = 0
for nPartId, nCount in pairs( PART) do
-- recupero lunghezza pezzo
local Len = EgtGetInfo( nPartId, "L", 'd')
local DispLen = EgtIf( Len <= 1000, 2000, 0) --EgtIf( Len <= 2000, max( 2000, 6000 - Len), 0)
-- aggiungo il pezzo solo se ci sta nel grezzo più lungo a disposizione
if Len < maxRawLenToFillNoStartGap then
table.insert( Parts, {Id = nPartId, Len = Len, DispLen = DispLen, Cnt = nCount})
for nCntIndex = 1 , nCount do
table.insert( Parts, {Id = nPartId, Len = Len, DispLen = DispLen, Cnt = 1})
dTotLen = dTotLen + Len
end
end
end
@@ -201,131 +208,247 @@ local MediumRawQty = ceil( RawQtySum / #NeededRawsForType)
if MediumRawQty > 1 then
MediumRawQty = MediumRawQty - 1
end
-- recupero pezzi piu' corti di mille
local ShortList = {}
local LongList = {}
for PartIndex = 1, #Parts do
if Parts[PartIndex].Len <= 1000 then
table.insert( ShortList, Parts[PartIndex])
else
table.insert( LongList, Parts[PartIndex])
-- lista dei risultati
local ResultList = {}
local BestResult = nil
local BestResultIndex = nil
-- riordino lista pezzi per lunghezza
table.sort( Parts, function( B1, B2) return B1.Len < B2.Len end)
local function NestSolutionByIndex( Index)
-- creo copia lista raw
local TempRaws = {}
for TempRawIndex = 1, #Raws do
table.insert(TempRaws, {LenToFill = Raws[TempRawIndex].LenToFill, StartGap = Raws[TempRawIndex].StartGap, MidGap = Raws[TempRawIndex].MidGap, EndGap = Raws[TempRawIndex].EndGap, SortType = Raws[TempRawIndex].SortType, Count = Raws[TempRawIndex].Count})
end
end
-- numero di pezzi piccoli per barra
local ShortCount = 0
for ShortIndex = 1, #ShortList do
ShortCount = ShortCount + ShortList[ShortIndex].Cnt
end
local ShortForRaw = floor( ShortCount / MediumRawQty)
local ExtraShortForRaw = 0
if MediumRawQty > 0 then
ExtraShortForRaw = fmod( ShortCount, MediumRawQty)
end
-- creo lista pezzi corti singoli
local SingleShortList = {}
for ShortIndex = 1, #ShortList do
for ShortCount = 1, ShortList[ShortIndex].Cnt do
table.insert( SingleShortList, {Id = ShortList[ShortIndex].Id, Len = ShortList[ShortIndex].Len, DispLen = ShortList[ShortIndex].DispLen, Cnt = 1})
-- recupero pezzi corti
local ShortList = {}
local LongList = {}
for PartIndex = 1, #Parts do
if PartIndex <= Index then
table.insert( ShortList, Parts[PartIndex])
else
table.insert( LongList, Parts[PartIndex])
end
Parts[PartIndex].Cnt = 1
end
end
-- li divido per le barre previste
local RawsShortList = {}
local RawIndex = 0
local ShortRawIndex = 0
for ShortIndex = 1, #SingleShortList do
if ShortRawIndex > 0 then
table.insert( RawsShortList[RawIndex], SingleShortList[ShortIndex])
ShortRawIndex = ShortRawIndex - 1
else
table.insert( RawsShortList, {SingleShortList[ShortIndex]})
RawIndex = RawIndex + 1
ShortRawIndex = ShortForRaw + EgtIf( RawIndex <= ExtraShortForRaw, 1, 0) - 1
-- numero di pezzi piccoli per barra
local ShortCount = Index
local ShortForRaw = floor( ShortCount / MediumRawQty)
local ExtraShortForRaw = 0
if MediumRawQty > 0 then
ExtraShortForRaw = fmod( ShortCount, MediumRawQty)
end
-- creo lista pezzi corti singoli
local SingleShortList = {}
for ShortIndex = 1, #ShortList do
for ShortCount = 1, ShortList[ShortIndex].Cnt do
table.insert( SingleShortList, {Id = ShortList[ShortIndex].Id, Len = ShortList[ShortIndex].Len, DispLen = ShortList[ShortIndex].DispLen, Cnt = 1})
end
end
-- li divido per le barre previste
local RawsShortList = {}
local RawIndex = 0
local ShortRawIndex = 0
for ShortIndex = 1, #SingleShortList do
if ShortRawIndex > 0 then
table.insert( RawsShortList[RawIndex], SingleShortList[ShortIndex])
ShortRawIndex = ShortRawIndex - 1
else
table.insert( RawsShortList, {SingleShortList[ShortIndex]})
RawIndex = RawIndex + 1
ShortRawIndex = ShortForRaw + EgtIf( RawIndex <= ExtraShortForRaw, 1, 0) - 1
end
end
-- Ciclo fino ad esaurimento pezzi o barre
local dTotPartInRawLen = 0
local nRawTot = 0
local dRawTotLen = 0
local dTime = 0
local nCycle = 1
local CurrResult = {}
while TotRawCount( TempRaws) > 0 and PartsToFill( Parts) > 0 do
-- creo lista con pezzi lunghi e pezzi corti di questo Cycle
local PartsToNest = {}
for PartIndex = 1, #LongList do
table.insert( PartsToNest, LongList[PartIndex])
end
for CycleIndex = 1, #RawsShortList do
if CycleIndex <= nCycle then
for PartIndex = 1, #RawsShortList[CycleIndex] do
table.insert( PartsToNest, RawsShortList[CycleIndex][PartIndex])
end
end
end
-- se non ci sono pezzi da nestare, esco
if PartsToFill( PartsToNest) <= 0 then
break
end
-- Eseguo ottimizzazione per ogni lunghezza di barra
local Results = {}
for RawIndex = 1, #TempRaws do
if TempRaws[RawIndex].Count > 0 then
Results[RawIndex] = ExecMaximumFilling( TempRaws[RawIndex], PartsToNest)
else
Results[RawIndex] = { FillRatio = 0.001, LenToFill = 1000, DiffParts = 0}
end
end
-- verifico quale e' quella con meno scarto
local nMinWasteRawIndex = GDB_ID.NULL
local dMinWaste = 100000
for ResultIndex = 1, #Results do
if Results[ResultIndex] then
local dWaste = (1 - Results[ResultIndex].FillRatio) * TempRaws[ResultIndex].LenToFill
if Results[ResultIndex].DiffParts > 0 and dWaste < dMinWaste then
dMinWaste = dWaste
nMinWasteRawIndex = ResultIndex
end
end
end
-- verifico se ci sono pezzi
if nMinWasteRawIndex > 0 and Results[nMinWasteRawIndex] and Results[nMinWasteRawIndex].DiffParts > 0 then
-- riporto barra e pezzi nel risultato corrente
local CurrBar = { BarLen = TempRaws[nMinWasteRawIndex].LenToFill, Parts = {}}
local CurrX = TempRaws[nMinWasteRawIndex].StartGap
local nInfoIndex = 1
for i = 1, Results[nMinWasteRawIndex].DiffParts do
local PartIndex = Results[nMinWasteRawIndex].Data[i].Id
local PartId = PartsToNest[PartIndex].Id
local dLen = PartsToNest[PartIndex].Len
for j = 1, Results[nMinWasteRawIndex].Data[i].Count do
-- creo pezzo copia
CurrPart = { Index = nInfoIndex, PartId = PartId, PosX = CurrX}
table.insert( CurrBar.Parts, CurrPart)
CurrX = CurrX + dLen + TempRaws[nMinWasteRawIndex].MidGap
nInfoIndex = nInfoIndex + 1
end
end
table.insert( CurrResult, CurrBar)
dTotPartInRawLen = dTotPartInRawLen + ( Results[nMinWasteRawIndex].FillRatio * TempRaws[nMinWasteRawIndex].LenToFill)
nRawTot = nRawTot + 1
dRawTotLen = dRawTotLen + TempRaws[nMinWasteRawIndex].LenToFill
-- Aggiorno per prossima iterazione
TempRaws[nMinWasteRawIndex].Count = TempRaws[nMinWasteRawIndex].Count - 1
for i = 1, Results[nMinWasteRawIndex].DiffParts do
local PartId = Results[nMinWasteRawIndex].Data[i].Id
PartsToNest[PartId].Cnt = PartsToNest[PartId].Cnt - Results[nMinWasteRawIndex].Data[i].Count
end
else
-- se non sono riuscito ad inserire alcun pezzo esco dal ciclo perche' non ci sono pezzi inseribili
break
end
nCycle = nCycle + 1
end
-- riporto risultato in lista
ResultList[Index] = dTotPartInRawLen
if not BestResult or not BestResultIndex or
( dTotPartInRawLen > ResultList[BestResultIndex] + 0.02 or ( abs( dTotPartInRawLen - ResultList[BestResultIndex]) < 0.02 and dRawTotLen < BestResult.RawTotLen - 0.02)) then
BestResult = CurrResult
BestResult.RawTotLen = dRawTotLen
BestResultIndex = Index
end
end
-- Ciclo fino ad esaurimento pezzi o barre
local nRawTot = 0
local dTime = 0
local nCycle = 1
while TotRawCount( Raws) > 0 and PartsToFill( Parts) > 0 do
local CycleCount = 0
local MinTime = 10 + pow( 3, ceil( log10( #Parts)) - 1)
if bLogStat then EgtOutLog('MinTime: ' .. MinTime ) end
local MaxTime = 30 + pow( 7, ceil( log10( #Parts)) - 1)
if bLogStat then EgtOutLog('MaxTime: ' .. MaxTime ) end
local TargetRatio = 0.98
local dTargetRatioLen = TargetRatio * dTotLen
if bLogStat then EgtOutLog('TargetRatioLen: ' .. dTargetRatioLen ) end
local CurrTime = 0
local function NestSolutionFromSP( StartingPoint, OscillationStep)
-- ciclo sulle possibilita' da un punto di origine con uno step fisso
local CurrResultIndex = StartingPoint
NestSolutionByIndex( StartingPoint)
if OscillationStep == 0 then return end
local CycleIndex = 1
local nOutOfBoundary = 0
while nOutOfBoundary ~= 3 do
CurrTime = EgtStopCounter() / 1000
if bLogStat then EgtOutLog('CurrTime: ' .. CurrTime ) end
if bLogStat then EgtOutLog('BestRatio: ' .. dTotLen / BestResult.RawTotLen ) end
-- se e' passato il tempo massimo, o e' passato il tempo minimo, ha inserito tutti i pezzi e la percentuale di utilizzo del materiale e' maggiore della soglia
if CurrTime > MaxTime or ( CurrTime > MinTime and ResultList[BestResultIndex] > dTotLen - 0.1 and ( dTotLen / BestResult.RawTotLen ) >= TargetRatio) then
if bLogStat then EgtOutLog('Brake') end
break
end
local bCurrOutOfBoundary = false
if CurrResultIndex < 0 then
bCurrOutOfBoundary = true
if nOutOfBoundary == 2 then
nOutOfBoundary = 3
else
nOutOfBoundary = 1
end
end
if CurrResultIndex > #Parts then
bCurrOutOfBoundary = true
if nOutOfBoundary == 1 then
nOutOfBoundary = 3
else
nOutOfBoundary = 2
end
end
if not bCurrOutOfBoundary and not ResultList[CurrResultIndex] then
NestSolutionByIndex( CurrResultIndex)
if bLogStat then EgtOutLog('CurrResultIndex: ' .. CurrResultIndex ) end
if bLogStat then EgtOutLog('Result: ' .. ResultList[CurrResultIndex]) end
CycleCount = CycleCount + 1
end
CurrResultIndex = StartingPoint + EgtIf( CycleIndex % 2 == 0, (CycleIndex / 2) * OscillationStep, -( ( CycleIndex + 1) / 2) * OscillationStep )
CycleIndex = CycleIndex + 1
end
end
-- creo lista pezzi con pezzi lunghi e pezzi corti di questo Cycle
local PartsToNest = {}
for PartIndex = 1, #LongList do
table.insert( PartsToNest, LongList[PartIndex])
-- lancio calcolo
EgtStartCounter()
local StartingResult = floor( #Parts * 0.3)
if bLogStat then EgtOutLog('StartingResult: ' .. StartingResult ) end
--local Step = floor( #Parts / 10) * floor( log10( #Parts))
local nDividendo = pow( 10, floor( log10( #Parts)) - 1)
nDividendo = EgtIf( nDividendo ~= 1, nDividendo, 10)
local Step = floor( #Parts / nDividendo) * floor( log10( #Parts))
if bLogStat then EgtOutLog('Step: ' .. Step ) end
NestSolutionFromSP( StartingResult, Step)
if Step > 1 then
NestSolutionFromSP( StartingResult, 1)
end
-- creo gruppi di lavorazione per risultato
for MachGroupIndex = 1, #BestResult do
local CurrMachGroup = BestResult[ MachGroupIndex]
-- creo gruppo di lavorazione
local MachGroupName = NewMachGroupName()
nMachGroup = EgtAddMachGroup( MachGroupName)
EgtSetInfo( nMachGroup, "BARLEN", CurrMachGroup.BarLen)
EgtSetInfo( nMachGroup, "MATERIAL", NEST.MATERIAL)
EgtSetInfo( nMachGroup, "AUTONEST", 1)
-- scrivo dati per variabili P di comunicazione con la macchina in gruppo di lavorazione
EgtSetInfo( nMachGroup, "PRODID", NEST.PRODID)
EgtSetInfo( nMachGroup, "PATTID", nMachGroup)
-- Disegno i pezzi
for i = 1, #CurrMachGroup.Parts do
local CurrPart = CurrMachGroup.Parts[ i]
-- creo pezzo copia
local nPartDuploId = EgtDuploNew( CurrPart.PartId)
EgtSetInfo( nMachGroup, "PART" .. CurrPart.Index, nPartDuploId .. "," .. CurrPart.PosX)
end
for CycleIndex = 1, #RawsShortList do
if CycleIndex <= nCycle then
for PartIndex = 1, #RawsShortList[CycleIndex] do
table.insert( PartsToNest, RawsShortList[CycleIndex][PartIndex])
end
end
end
-- se non ci sono pezzi da nestare, esco
if PartsToFill( PartsToNest) <= 0 then
break
end
-- Eseguo ottimizzazione per ogni lunghezza di barra
local Results = {}
for RawIndex = 1, #Raws do
if Raws[RawIndex].Count > 0 then
Results[RawIndex] = ExecMaximumFilling( Raws[RawIndex], PartsToNest)
else
Results[RawIndex] = { FillRatio = 0.001, LenToFill = 1000}
end
end
-- verifico quale e' quella con meno scarto
local nMinWasteRawIndex = GDB_ID.NULL
local dMinWaste = 100000
for ResultIndex = 1, #Results do
if Results[ResultIndex] then
local dWaste = (1 - Results[ResultIndex].FillRatio) * Raws[ResultIndex].LenToFill
if dWaste < dMinWaste then
dMinWaste = dWaste
nMinWasteRawIndex = ResultIndex
end
end
end
-- verifico se ci sono pezzi
if nMinWasteRawIndex > 0 and Results[nMinWasteRawIndex] and Results[nMinWasteRawIndex].DiffParts > 0 then
-- creo gruppo di lavorazione
local MachGroupName = NewMachGroupName()
nMachGroup = EgtAddMachGroup( MachGroupName)
EgtSetInfo( nMachGroup, "BARLEN", Raws[nMinWasteRawIndex].LenToFill)
EgtSetInfo( nMachGroup, "MATERIAL", NEST.MATERIAL)
EgtSetInfo( nMachGroup, "AUTONEST", 1)
-- scrivo dati per variabili P di comunicazione con la macchina in gruppo di lavorazione
EgtSetInfo( nMachGroup, "PRODID", NEST.PRODID)
EgtSetInfo( nMachGroup, "PATTID", nMachGroup)
-- Disegno i pezzi
local CurrX = Raws[nMinWasteRawIndex].StartGap
local nInfoIndex = 1
for i = 1, Results[nMinWasteRawIndex].DiffParts do
local PartIndex = Results[nMinWasteRawIndex].Data[i].Id
local PartId = PartsToNest[PartIndex].Id
local dLen = PartsToNest[PartIndex].Len
for j = 1, Results[nMinWasteRawIndex].Data[i].Count do
-- creo pezzo copia
local nPartDuploId = EgtDuploNew( PartId)
EgtSetInfo( nMachGroup, "PART" .. nInfoIndex, nPartDuploId .. "," .. CurrX)
CurrX = CurrX + dLen + Raws[nMinWasteRawIndex].MidGap
nInfoIndex = nInfoIndex + 1
end
end
nRawTot = nRawTot + 1
-- Aggiorno per prossima iterazione
Raws[nMinWasteRawIndex].Count = Raws[nMinWasteRawIndex].Count - 1
for i = 1, Results[nMinWasteRawIndex].DiffParts do
local PartId = Results[nMinWasteRawIndex].Data[i].Id
PartsToNest[PartId].Cnt = PartsToNest[PartId].Cnt - Results[nMinWasteRawIndex].Data[i].Count
end
end
nCycle = nCycle + 1
end
-- creo grezzi per ogni gruppo di lavorazione
local nRawCnt = 0
local nRawTot = ResultList[BestResultIndex]
_G.BEAM = {}
BEAM.FILE = NEST.FILE
BEAM.MACHINE = NEST.MACHINE
+36 -17
View File
@@ -62,7 +62,7 @@ local function MyProcessInputData()
end
end
if not bFound then
table.insert( vBeam, { Id = nPartId, Name = ( EgtGetName( nPartId) or ( 'Id=' .. tonumber( nPartId)))})
table.insert( vBeam, { Ind = #vBeam + 1, Id = nPartId, Name = ( EgtGetName( nPartId) or ( 'Id=' .. tonumber( nPartId)))})
end
end
nId = EgtGetNextSelectedObj()
@@ -115,17 +115,6 @@ local function MyProcessInputData()
end
EgtDeselectAll()
-- Le ordino in senso di lunghezza crescente
table.sort( vBeam, function( B1, B2) return B1.Box:getDimX() < B2.Box:getDimX() end)
do
local sOut = ''
for i = 1, #vBeam do
sOut = sOut .. vBeam[i].Name .. ', '
end
sOut = sOut:sub( 1, -3)
EgtOutLog( 'Travi ordinate : ' .. sOut, 1)
end
return true
end
@@ -146,12 +135,14 @@ local function MyProcessBeams()
local dAddLen = BD.OVM_HEAD + ( #vBeam - 1) * BD.OVM_MID
EgtOutLog( 'Ltot : '..EgtNumToString( dTotLen, 1) .. ' Lagg : '..EgtNumToString( dAddLen, 1)..' MinUnloadRaw : '.. EgtNumToString( BD.MinRaw + BD.OVM_MID, 1), 1)
-- Richiedo lunghezza del grezzo e sovramateriale di testa
-- Richiedo lunghezza del grezzo, sovramateriale di testa, forzatura verticale e ordinamento automatico secondo la lunghezza
local vsVal = EgtDialogBox( 'Lavora Travi' .. ' (Ltot='..EgtNumToString( dTotLen + dAddLen + 0.5, 0)..
', Lmax='..EgtNumToString( BD.MAX_RAW, 0)..',MinUlr='..EgtNumToString( BD.MinRaw + BD.OVM_MID, 0)..')',
{'Lunghezza grezzo', EgtNumToString( BD.STD_RAW, 0)},
{'Sovramateriale di testa', EgtNumToString( BD.OVM_HEAD, 0)},
{'Forza sezione verticale', ' CB:true,*false'})
{'Offset intermedio', EgtNumToString( BD.OVM_MID, 0)},
{'Forza sezione verticale', ' CB:true,*false'},
{'Ordina per lunghezza', ' CB:true,*false'})
if not vsVal then
EgtDraw()
return
@@ -174,9 +165,17 @@ local function MyProcessBeams()
EgtDraw()
return false
end
local dOvmMid = EgtEvalNumExpr( vsVal[3])
if not dOvmMid then
local sOut = 'Offset intermedio : ' .. vsVal[3]
EgtOutLog( sOut)
EgtOutBox( sOut, 'Lavora Travi', 'WARNING')
EgtDraw()
return false
end
-- Sistemo sezione barra con travi
local bVert = ( vsVal[3] == 'true')
local bVert = ( vsVal[4] == 'true')
if bVert then
if dRawW > dRawH then dRawW, dRawH = dRawH, dRawW end
end
@@ -215,8 +214,28 @@ local function MyProcessBeams()
return false
end
-- Se richiesto, ordino le travi in senso di lunghezza crescente
local bOrd = ( vsVal[5] == 'true')
if bOrd then
table.sort( vBeam, function( B1, B2)
if abs( B1.Box:getDimX() - B2.Box:getDimX()) < 1 then
return B1.Ind < B2.Ind
else
return B1.Box:getDimX() < B2.Box:getDimX()
end
end)
end
do
local sOut = ''
for i = 1, #vBeam do
sOut = sOut .. vBeam[i].Name .. ', '
end
sOut = sOut:sub( 1, -3)
EgtOutLog( 'Travi ordinate : ' .. sOut, 1)
end
-- Sistemo le travi nel grezzo
local bOk, sErr = BE.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, vBeam)
local bOk, sErr = BE.ProcessBeams( dRawW, dRawH, dRawL, dOvmHead, dOvmMid, vBeam)
if not bOk then
EgtOutLog( sErr)
EgtOutBox( sErr, 'Lavora Travi', 'ERROR')
+509
View File
@@ -0,0 +1,509 @@
==== Beam Update Log ====
Versione 3.1d2 (10/04/2026)
- Added : in StepJoint aggiunto Q02=1 per forzare fresa
- Added : in DtMortise aggiunto Q01=1 per disabilitare antischeggia
- Fixed : in LapJoint correzione a antischeggia con fresa in caso di feature spezzata
Versione 3.1d1 (08/04/2026)
- Added : le forature vengono accorciate con massima elevazione anche in presenza di tagli di testa
- Modif : nelle slot con lama verticali si lavora sempre in concordanza
- Fixed : in DtMortise correzione a lavorazione antischeggia
- Fixed : in LapJoint, se lavorazione vuota, si disattiva sempre; in Q02 si lavora sempre prima il lato sotto.
Versione 3.1c2 (18/03/2026)
- Added : in LapJoint (solo L030) aggiunto Q02 per fare solo contorno per forme a "C" e tunnel; Q17 spessore di eventuale codolo
- Modif : per LapJoint e simili il Q06 per antischeggia ora contempla il valore 3 per scegliere la strategia in automatico (lama o fresa)
- Modif : in LapJoint migliorie nella lavorazione delle tasche aperte
- Modif : in LongDoubleCut e LapJoint lunghe migliorata scelta fresa in caso di tasca che guarda verso il basso
- Fixed : in forature in doppio con svuotatura corretto ultimo step
- Fixed : in split correzione in caso di materiale di coda molto sottile e testa sotto
- Fixed : in LongDoubleCut e LapJoint lunghe eliminata passate finale dopo taglio di coda se non è presente un grezzo successivo
Versione 3.1c1 (04/03/2026)
- Fixed : correzione in ordinamento (fori vs tagli)
- Fixed : in drilling rimosso preforo duplicato
Versione 3.1b1 (26/02/2026)
- Added : in LapJoint lunghe gestito Q14 per lavorare discorde
- Added : in forature ora sono possibili le DrillPocket in doppio (ultimo step fatto dalla testa principale)
- Added : in FreeContour (contornatura) aggiunta Q10 per forzare massima elevazione
- Modif : in LongDoubleCut e LapJoint lunghe migliorata la scelta della faccia da lavorare e altre migliorie
- Modif : in LapJoint migliorie alle svuotature
- Modif : in LapJoint lunghe, negli spezzoni successivi al primo, le svuotature considerano l'area svuotata precedente
- Fixed : in forature in doppio si garantisce l'ultimo step per evitare collisioni delle punte o finecorsa
- Fixed : in mortasa a coda di rondine tagliata corretti ingresso uscita in caso di svuotatura
- Fixed : in tagli di testa e coda corretti smussi con P08 e P09
Versione 2.7l3 (23/12/2025)
- Modif : nei fori che attraversano un taglio si decide la precedenza in base all'angolo tra foro e taglio stesso
- Fixed : corretto precut in caso di sega a catena
Versione 2.7l2 (16/12/2025)
- Added : in LapJoint pulizia spigoli con fresa a V su tasche non passanti
Versione 2.7l1 (10/12/2025)
- Added : in LapJoint aggiunta gestione fresatura con aggregato flottante (Q specifica)
- Modif : in LapJoint modfifiche alla lavorazione spigoli su faccia frontale o posteriore
- Modif : in LapJoint lunghe, la spezzatura ora considera se è presente del grezzo dietro
Versione 2.7k1 (25/11/2025)
- Added : in tagli di testa e coda aggiunti smussi con possibilità di raccordare o smussare spigoli
- Added : in Lapjoint aggiunto Q14 per settare lavorazione discorde se longitudinale su faccia sotto
- Modif : migliorati i tagli
- Modif : migliorata lavorazione mortasa a coda di rondine
- Fixed : in Lapjoint alcune svuotature forzate a spirale
Versione 2.7j2 (30/10/2025)
- Fixed : in DoubleCut gestito il caso in cui si ha una terza faccia piccola da non lavorare
Versione 2.7j1 (28/10/2025)
- Modif : migliorato ordinamento feature
- Modif : in mortasa si considera ora il raggio minimo impostato da parametro P
- Modif : migliorie in tenone a coda di rondine
- Fixed : in mortasa corretto percorso errato in caso di diametro utensile uguale a larghezza tasca
- Fixed : in profilo cambered (103) gestito correttamente inverti in lavorazione
Versione 2.7i2 (30/09/2025)
- Modif : migliorie a mortasa e tenone a coda di rondine
- Modif : migliorie a LongDoubleCut
- Modif : migliorie ai tagli
Versione 2.7i1 (03/09/2025)
- Added : in Tenone a coda di rondine aggiunto passaggio di finitura in caso di P14 > 0
- Modif : in LapJoint migliorata la scelta lama in caso di due facce e altre piccole correzioni
Versione 2.7h3 (26/08/2025)
- Added : in LapJoint, se possibile, si ricalcola l'elevazione in caso di feature troncanti testa/coda
- Modif : eventuali feature troncanti testa/coda sono fatte sempre subito dopo i rispettivi tagli di testa/coda
Versione 2.7h2 (19/08/2025)
- Modif : migliorata ottimizzazione teste
- Modif : migliorate forature in doppio
- Modif : in LapJoint migliorate lavorazioni lama + sega a catena
- Modif : in LapJoint migliorata spezzatura per feature lunghe rispetto al pezzo
- Modif : in LapJoint tipo BirdsMouth migliorata lavorazione faccia inclinata
- Modif : in StepJointNotch, se 3 facce si riconduce a LapJoint
Versione 2.7h1 (05/08/2025)
- Fixed : in Mortise migliorata la lavorazione in caso di feature trimmata
- Modif : in LapJoint, riduzione massimo materiale lama per lavorazioni antischeggia di lama con direzione verticale
- Modif : in LapJoint migliorie alla lavorazione tipo BlockHaus
- Modif : nei profili si usa il tipo lavorazione Prof_end per la finitura
Versione 2.7g5 (14/07/2025)
- Fixed : in tagli di testa e coda corretti attacchi
Versione 2.7g4 (11/07/2025)
- Fixed : in LapJoint 2 facce correzione nella scelta lama da sotto
Versione 2.7g3 (11/07/2025)
- Fixed : in RidgeLap corretta scelta del lato da lavorare
Versione 2.7g2 (10/07/2025)
- Fixed : in LapJoint correzione per caso in cui la sega a catena lavorava la tasca in modo errato
Versione 2.7g1 (08/07/2025)
- Added : in LapJoint, aggiunti smussi anche se lavorazione con truciolatore
- Added : per profilo caudato aggiunta finitura con fresa piccola
- Added : gestione tastatura
- Modif : nei tagli di testa e coda, compresi quelli di spezzatura, la lama evita di arretrare se non necessario
- Modif : in LongDoubleCut migliorie varie
- Modif : in RidgeLap migliorie varie
- Modif : nelle forature che attraversano un taglio ora si considera la profondità già lavorata
- Fixed : in LongDoubleCut corretta lavorazione aggiunta erroneamente dopo separazione
Versione 2.7f3 (19/06/2025)
- Modif : in StepJointNotch corretta distanza attacco in/out
Versione 2.7f2 (18/06/2025)
- Modif : in LongDoubleCut aggiunto messaggio feature non completa se utensile non arriva sul fondo
- Modif : in StepJointNotch, se si forza truciolatore, si prende utensile più grande
- Fixed : in LapJoint, piccola correzione calcolo sovrapposizione trimesh per svuotatura
- Fixed : in LapJoint, per sovrapposizione in spezzatura, corretto caso tipo Tunnel
Versione 2.7f1 (03/06/2025)
- Modif : in tenone coda di rondine modificato angolo limite tenone per lavorazione in sottosquadro
- Modif : migliorie per lavorazioni su aggregato
Versione 2.7e2 (23/05/2025)
- Modif : in tagli di lama migliorie alla scelta del lato da lavorare
- Modif : in mortasa coda di rondine migliorati i percorsi
- Modif : in tenone coda di rondine migliorate le lavorazioni da sotto
- Fixed : in Scarf Joint correzione alla scelta faccia da lavorare
Versione 2.7e1 (05/05/2025)
- Modif : in LapJoint se tunnel verticale lavorato solo da sopra e l'utensile non arriva, si restituisce warning
- Fixed : in taglio di separazione si riduce percorso di taglio solo se il pezzo è effettivamente alto
- Fixed : in foratura corretto caso in cui non si sceglieva l'utensile più lungo disponibile
- Fixed : In BatchProcess (Ts7) corretta generazione in caso di progetto senza ricalcolo
Versione 2.7d3 (22/04/2025)
- Fixed : in LapJoint corretta gestione errata Q04
Versione 2.7d2 (17/04/2025)
- Added : in scanalatura aggiunta Q03 per forzare fresa
- Modif : in slot con lama + sega a catena abilitata lavorazione da sotto per macchine con testa sopra
- Modif : nei tagli modifche in caso di tagli di coda anticipati
- Modif : in lavorazioni tipo tacca ma 3 facce migliorata la scelta faccia
Versione 2.7d1 (04/04/2025)
- Fixed : in PreDrill piccola correzione
- Fixed : nei tagli varie correzioni
- Fixed : in HeadCut e Split corretto calcolo lunghezza extra di taglio
Versione 2.7c2 (24/03/2025)
- Fixed : in BatchProcess (Ts7) riabilitata modifica barra erroneamente rimossa
Versione 2.7c1 (17/03/2025)
- Modif : in HeadCut e Split, per decidere se fare doppio taglio verticale, si controlla anche il massimo possibile e non solo il minimo
- Modif : in LapJoint migliorato controllo per decidere se feature di coda
- Modif : nei tagli, se taglio rivolto verso il basso e non possibile tagliare di fianco, si fa in fase ribaltata
- Fixed : in BatchProcess (Ts7) corretta restituzione stato feature erroneamente segnalata verde
- Fixed : corretta restituzione stato feature lavorata in doppio
Versione 2.7b3 (03/03/2025)
- Modif : in forature passanti orizzontali fatte da un solo lato, si inverte il lato di lavoro in base all'utensile scelto
- Modif : in LapJoint in lavorazione tipo BH permessa U passante non parallela agli assi principali; attacchi migliorati
- Modif : in LapJoint le feature di coda con pezzo lungo vengono spostate sempre dopo separazione
- Fixed : in macchine tipo Turn piccoli miglioramenti ai tagli di lama
Versione 2.7b2 (05/02/2025)
- Modif : si consentono DrillPocket in doppio solo se foro non passante
Versione 2.7b1 (04/02/2025)
- Modif : in tagli di testa e coda l'utilizzo delle lame grandi (es: 1000 su 15003TMAX) è limitato ai pezzi più bassi di 300 mm e più larghi di 300 mm
Versione 2.7a2 (23/01/2025)
- Added : in RidgeLap aggiunta Q05 per usare la fresa tipo LapJoint
- Fixed : in BatchProcess (Ts7) piccola correzione
- Fixed : in ScarfJoint, in caso di taglio dal lato, aggiunta estensione oltre il bordo
Versione 2.7a1 (21/01/2025)
- Added : in FreeContour aggiunta Q09 per inversione ultima lavorazione
- Modif : in Cut, si taglia dal basso solo se il pezzo piccolo è già staccato dalla barra
- Modif : in BatchProcess (Ts7) aggiunta scrittura id progetto e produzione in Btm
Versione 2.6l2 (07/01/2025)
- Added : in LapJoint abiitata SideMillAsBlade anche da sotto e varie migliorie
- Modif : in LapJoint L030 aggiunto Q03=4 per lavorare con fresa evitando tasche aperte testa/coda
- Modif : in LapJoint modifiche per gestione fresa a disco su aggregato
- Modif : in fresature con lama o simili aggiunta la possibilità di invertire il senso di percorrenza calcolato in automatico
- Modif : migliorie all'ordinamento
- Fixed : in LapJoint la Q per forzare lavorazione di lato funziona solo se la feature è aperta davnti o dietro
Versione 2.6l1 (11/12/2024)
- Added : aggiunta gestione slot e tagli di lama con lame molto grandi
- Modif : in lama + motosega aggiunta gestione slot aperte con lato obliquo
- Modif : modificata retrazione per tenoni aperti
Versione 2.6k2 (28/11/2024)
- Modif : nei tagli migliorati i casi in cui si inverte l'SCC per facilitare la caduta del legno
- Modif : nei tagli migliorato controllo rimozione del primo cubetto molto piccolo
- Modif : nei tagli migliorati i casi con bilinea
- Fixed : in lapjoint corretto un caso in cui si sbagliava a calcolare la dimensione della tasca
Versione 2.6k1 (15/11/2024)
- Modif : in macchine tipo Fast lunghezza minima feature per considerare taglio lungo portata a 400 mm
- Modif : in tacche si applica svuotatura anche nel caso di elevazione non raggiunta
- Modif : in forature in doppio, se necessario, si aumenta lo step per evitare collisione tra le punte durante lavorazione
- Fixed : in L010 correzione in utilizzo Q07 (forzatura frese)
- Fixed : in coda di rondine corretto bug che causava un blocco anomalo del programma
Versione 2.6j4 (06/11/2024)
- Fixed : corretto caso in cui i fori passanti fatti con due teste finiviano nella rotazione sbagliata, provocando un errore di chariot collision
Versione 2.6j3 (18/10/2024)
- Modif : nei tagli orizzontali si inverte SCC per evitare problemi di cubetti incastrati
- Modif : modifiche in ordinamento fori che intersecano tenoni
- Fixed : corretto caso con fori sul tenone spostati in coda nella fase errata
Versione 2.6j2 (17/10/2024)
- Fixed : in forature con precedenza corretto caso in cui il foro veniva ripetuto in rotazioni diverse
Versione 2.6j1 (10/10/2024)
- Modif : se la macchina è tipo BlockHaus, i LapJoint vengono fatti prima del taglio di separazione
- Modif : se tenone di coda è attraversato da foro allora anche il foro sarà di coda
- Modif : migliorato ordinamento per tenoni con foro secante
- Modif : in FreeContour migliorato pinzaggio
- Modif : in LapJoint miglioramenti vari alla lavorazione delle facce oblique
- Modif : In RidgeLap l'ingombro testa coda considera inclinazione feature per pinzaggio
- Added : in FreeContour aggiunta Q08 per forzare come pinzabile l'area della feature e Q07 per ignorare possibili problemi di lettura laser
- Added : in tagli aggiunta Q07 per forzare uso fresa
Versione 2.6i3 (08/10/2024)
- Modif : In RidgeLap, ingombro testa coda considera inclinazione feature per pinzaggio.
Versione 2.6i2 (13/09/2024)
- Modif : in FacesBySaw si invertono gli accorciamenti solo se l'inversione del percorso non è forzata dall'esterno; adeguati HeadCut e Split
- Modif : in nesting correzione in lettura array per cambio dll di lettura
- Modif : in BatchProcess e New, in caso sia richiesta generazione senza check, verifico prima che il file log specifico non contenga errori: se sì, forzo il check
- Modif : in FacesBySaw per settare il FaceUse si usa il versore nelle UserNotes
- Modif : in HeadCut, Split modifiche ai tagli aggiuntivi orizzontali e verticali; disattivati attacchi tangenziali per tagli aggiuntivi verticali in PF1250
- Fixed : in ProcessDrill In GetData corretta gestione modifica diametro foro
Versione 2.6i1 (09/09/2024)
- Added : refactoring e modifiche a HeadCut e Split per introduzione pretagli a zero sul grezzo, per evitare problemi con pezzi non lunghi quanto ci si aspetta
- Added : in Mark, gestita la lavorazione del testo
- Modif : gestione dipendenza foro-tasca in caso di fase con pezzo ribaltato
- Modif : in Headcut e Split aggiunta gestione parametro MIN_HEIGHT_ADDED_CUTS da BeamData per scegliere l'altezza minima per cui devono essere aggiunti i tagli orizzontali supplementari
- Modif : se Lapjoint attraversata da L055, la lapjoint viene fatta prima
- Modif : in ScarfJoint, in dicing, tagli paralleli fatti con unico passaggio di fianco per evitare che il cubetto rimanga appoggiato al motore
- Fixed : corretto caso di groove lunga passante a 3 facce che non veniva lavorata
- Fixed : in FacesBySaw -> MakeOne corretta gestione lato di lavoro quando il percorso è orizzontale
Versione 2.6h2 (26/08/2024)
- Added : in BatchProcess e New si verifica l'abilitazione alla generazione con EgtVerifyKeyOption
- Modif : in FacesBySaw introdotti attacchi tangenziali solo da un lato, limitati a facce con Z negative
- Modif : in LapJoint -> tunnel lo smusso funziona anche se è forzata la sega a catena
- Modif : in LapJoint -> svuotatura, se l'utente ha definito un'elevazione custom si lavora sempre la faccia standard
- Modif : in FacesBySaw -> MakeOne aggiunta la possibilità di passare una direzione di lavoro alternativa per poter rispettare contemporaneamente la direzione di lavoro concorde e la direzione di taglio.
Versione 2.6h1 (20/08/2024)
- Modif : in SimpleScarf, se assimilabile a un taglio, si considera area non pinzabile
- Modif : in LapJoint gestito smusso nel caso Groove-Blind-RightAngles-Parallel-4
- Modif : varie modifiche ai tagli di lama per evitare chiusura rulli pneumatici e finecorsa
- Modif : in BatchProcessNew, se presente flag apposito in EgtCam5, si evita la generazione
Versione 2.6g4 (19/07/2024)
- Modif : in BatchProcess e BatchProcessNew si forza ricalcolo ogni volta che si è in situazione di CHECK o CHECK + GENERATE
Versione 2.6g3 (07/07/2024)
- Added : aggiunta possibilità di funzione GetNzLimDownUp specifica per ogni macchina
- Modif : anche nel taglio a cubetti si chiama GetNzLimDownUp di macchina, se presente, per decidere limite orientamento lama verso il basso
- Modif : in BeamExec inserito controllo massimo numero di facce per lanciare GetFacetsInfo
- Fixed : in LapJoint corretto typo in nome variabile che provocava mancata impostazione asse bloccato
Versione 2.6g2 (04/07/2024)
- Modif : le lavorazioni BlockHaus, se vicine alla coda, vengono spostate dopo il taglio di separazione
Versione 2.6g1 (01/07/2024)
- Modif : in LongDoubleCut gestita correttamente SCC per lama
- Modif : in MachiningLib miglioramenti a scelta testa ottimizzata
- Modif : in ProcessDtTenon correzione in scelta testa
- Modif : In LapJoint -> VerifySideMillAsSaw modificato criterio ricerca utensile in base a normale della faccia
- Fixed : in MakeAntiSplintBySaw se non si trova adiacenza tra le facce si restituisce errore
- Fixed : In StepJointNotch, MakeFourFaces corretta copia feature con PartId mancante
Versione 2.6f2 (17/06/2024)
- Modif : correzione a tagli a cubetti (ripristinata versione pre 2.6f1)
Versione 2.6f1 (06/06/2024)
- Added : Q04 (tipo longcut) abilitato anche in RidgeLap (T30), se riconducibile a 2 facce
- Modif : migliorie al taglio a cubetti
- Modif : in LapJoint -> MakePocket abilitata Q per forzare massima elevazione
- Fixed : correzione a SCC per lama da sotto con aggregato
- Fixed : correzioni a ottimizzazione teste per macchine con teste sopra/sotto
Versione 2.6e5 (27/05/2024)
- Modif : in LapJoint corretto typo in lavorazione lamello che impediva il funzionamento corretto.
Versione 2.6e4 (20/05/2024)
- Modif : in SawPlusChain le lavorazioni di sega a catena aggiuntive (side) si fermano in mezzeria se tasca passante
- Modif : in SawPlusChain il tunnel con sega a catena viene fatto da un solo lato se possibile
Versione 2.6e3 (14/05/2024)
- Modif : in SawPlusChain aggiunta gestione lavorazioni aggiuntive lati aperti e tunnel
- Fixed : in Cut -> MakeFromTop ricalcolo direzione di lavorazione su facce a cubetti.
Versione 2.6e2 (10/05/2024)
- Modif : in FeatureTopology aggiunta proprietà IsTrough = true anche a Cut
- Modif : LongCut : se non trova fresa per pulizia, da messaggio di warning anziché di errore
- Fixed : LongCut : allungamento percorso ingresso per evitare collisioni durante approccio pezzo quando si setta OutRaw.
Versione 2.6e1 (03/05/2024)
- Modif : in LapJoint Groove verso il basso lavorata di preferenza dal lato
- Modif : in LapJoint -> SideMillAsSaw gestito anche rabbet passante
- Fixed : in BeamExec box della feature aggiornato dopo rotazione
- Fixed : in BeamExec GetProcessAffectedFaces e GetFacetsInfo rilanciati dopo rotazione
- Fixed : In LapJoint -> MakeMoreLongFaces corretto calcolo divisione in parti per evitare problemi di ceil con interi perfetti
Versione 2.6d2 (11/04/2024)
- Added : in LapJoint aggiunta strategia per fare tasche con lama + sega a catena, attivata da Q11
Versione 2.6d1 (08/04/2024)
- Fixed : in Long2Cut corretto nome passato alla BL.GetBlockedAxis
- Fixed : in MakeTwo rimossa gestione calcolo differente su ultima passata in caso di macchina FAST
- Fixed : in LapJoint -> ForceSideMill escluso caso 4 facce senza possibilità di ingresso lungo Y.
Versione 2.6c4 (18/03/2024)
- Fixed : correzioni a gestione prefori.
Versione 2.6c3 (15/03/2024)
- Added : Aggiunta gestione prefori
- Fixed : in LapJoint correzione a calcolo ingombro per feature basse e lunghe dalla testa.
Versione 2.6c2 (12/03/2024)
- Added : in Mortase Aggiunta possibilità di inserire lavorazione di smusso
- Added : in FreeContour aggiunto smusso se lav. di svuotatura
- Added : in BeamExec creata funzione calcolo dipendenze tra feature
- Added : In BeamExec -> CollectFeatures si scrive ora Width e Height della faccia sia trimmate con il grezzo che intere
- Added : implementate le lavorazioni in doppio per fori specchiati non passanti e DrillPocket
- Modif : in LapJoint migliorata ricerca pocket (VerifyPocket)
- Modif : implementato attacco esterno se tasca 4 facce sulla coda ma nessun pezzo successivo
- Modif : rimossi simboli di debug da compile
- Fixed : In FreeContour corretto caso di smusso non passante
Versione 2.6c1 (29/02/2024)
- Modif : in FacesBySaw e LapJoint migliorato calcolo area non pinzabile in testa HCING e coda TCING
- Modif : vari miglioramenti all'ordinamento delle lavorazioni
- Modif : in Mortise forzata SPIRAL_IN se c'è almeno un lato aperto
- Modif : in tenone a coda di rondine aumentato a 8 il numero massimo di passate (era 6)
- Modif : in lapjoint a due facce migliorata la scelta della lama da sotto
- Fixed : in LapJoint corretto bug che impediva l'esecuzione della lavorazion con antischeggia attivo
Versione 2.6b1 (14/02/2024)
- Fixed : corretto bug in Split in cui si chiamava la EgtSurfTmFacetNormVersor senza riferimento
- Fixed : in L20 corretta gestione 2 facce
- Modif : modifiche per limiti pinzaggio con pinze con fronte verticale (ONE, PF) anzichè inclinato (FAST) quindi parametro BD.VICE_MINH grande
- Modif : nei tagli con sega a catena ora si considera l'ingombro della testa per il calcolo della massima profondità
- Modif : in LapJoint ora i rabbet lungo X che guardano in basso sono sempre fatti con fresatura di lato per evitare di ruotare.
Versione 2.6a1 (24/01/2024)
- Added : in HeadCut e Split aggiunti tagli verticali addizionali per travi di larghezza elevata
- Added : in Split gestita separazione con sega a catena + lama
- Added : in MachiningLib è ora possibile riordinare le lavorazioni in base a lunghezza e dimensione utensile
- Added : modifiche per poter impostare offset intermedio anche se lanciato da EgtCam5
- Modif : nelle lavorazioni si gestiscono ora seghe a catena multiple
- Modif : in split con sega a catena ora si cerca di preferenza una lavorazione di tipo 'SawingForSplitting'. Se non trovata si cerca il tipo 'Sawing' come in precedenza
- Modif : in split con sega a catena aggiunta estensione start/end del percorso se utensile lungo, per evitare collisioni con il pezzo durante rotazione
- Modif : implementata funzione GetBlockedAxis per gestire l'asse bloccato per sega a catena e lama
- Modif : in DiceCut corretto calcolo cubetti con superficie limitante parallela e opposta a quella di base
Versione 2.5l3 (08/01/2023)
- Modif : modifiche per centrare i pezzi in Y sulla tavola (da flag BeamData.CENTER_BEAM)
- Modif : resi più veloci i calcoli di FeatureTopology
- Modif : migliorato calcolo attacco/uscite lame in FacesBySaw.
Versione 2.5l2 (20/12/2023)
- Modif : in Cut e DoubleCut modifica in scelta ribaltamento trave quando si è in condizioni downUp
- Modif : migliorato e esteso il funzionamento di SideMillAsSaw
- Modif : in LapJoint con più facce, nelle OpenPocket, ammesso utensile con diametro fino a 3 volte la dimensione della tasca (era 2)
- Modif : in RoundArch aggiunta gestione senso di rotazione fresa per lavorare sempre in concordanza
- Fixed : correzione a GetFaceWithMostAdj per calcoli con facce che fanno ombra
Versione 2.5l1 (01/12/2023)
- Added : in LongDoubleCut aggiunta Q05 per utilizzo lama anche in feature cieche conme per LongCut
- Modif : Migliorato e velocizzato il calcolo elevazione (EgtSurfTmFacetElevationInBBox)
- Fixed : in MakeTwo di FacesBySaw raffinamento calcolo vtRef per casi dubbi.
Versione 2.5k3 (28/11/2023)
- Added : in Long2Cut gestite lavorazioni lama con Q05 come in LongCut.
Versione 2.5k2 (06/11/2023)
- Added : in LapJoint, per L020, gestita lavorazione speciale gradino scala con fresatura + lama, attivata con Q09
- Fixed : in ProcessSplit si imposta l'ingombro asse C correttamente anche per teste con asse rotante C con un solo braccio.
Versione 2.5k1 (02/11/2023)
- Modif : in LapJoint gestito caso groove due facce >90° con fresa, se forzato da parametro Q
- Modif : in LongCut e LongDoubleCut migliorata spezzatura taglio passante con due spezzoni
- Modif : nei tagli di lama migliorata gestione con percorso bilinea
- Modif : in LapJoint 2 facce longitudinali si usa taglio di lama solo se si taglia completamente, altrimenti fresa.
Versione 2.5j1 (23/10/2023)
- Added : in Process (lancio da EgtCAM5 quindi uso praticamente solo interno) aggiunta possibilità di tenere ordine pezzi in barra come da selezione
- Modif : in Topology aggiunti casi al check solo direzione principale
- Modif : nella ricerca lavorazione da usare controllo di utensile attivo sostituito con controllo utensile presente nel setup corrente
- Fixed : piccola correzione a Classify di FeatureTopology per casi senza geometria
- Fixed : in HeadCut e Split corretto calcolo allungamenti/accorciamenti per evitare lunghezze del percorso negative
- Fixed : in Lapjoint -> MakePocket aggiunto messaggio in caso si rovini il pezzo successivo.
Versione 2.5i2 (27/09/2023)
- Added : aggiunto riconoscimento sottosquadro da facce non adiacenti
- Modif : in lavorazione tenoni per Turn si assegna SCC per privilegiare accesso dal lato corto della trave.
- Fixed : in LapJoint corretto caso tunnel lungo non lavorato correttamente
- Fixed : in foratura quando errore in applicazione lavorazione si inverte e riprova solo se singola su foro aperto
Versione 2.5i1 (12/09/2023)
- Modif : in Cut abbassato a 590 mm il limite per convertire in LongCut [Ticket #1448]
- Fixed : in LapJoint gestito correttamente il ritorno nil di GetUShapeWidth [Ticket #1354].
Versione 2.5h2 (11/08/2023)
- Modif : in LapJoint e Mortise modificata posizione braccio per FAST quando vicino alla coda della trave
- Fixed : corrette forature con aggregato quando lato aperto
- Fixed : in RidgeLap corretto ingombro lavorazione in testa e coda quando rivolta verso il basso.
Versione 2.5h1 (07/08/2023)
- Fixed : tagli doppi di lato non effettuati se macchina tipo PF e pezzo alto [Ticket #1400]
- Fixed : in split e headcut corretto calcolo allungamenti/accorciamenti pezzi alti per contemplare anche taglio singolo [Ticket #1227]
- Fixed : in lapjoint piccola correzione al calcolo della distanza di sicurezza in base al gambo dell'utensile [Ticket #1227]
- Fixed : in Lapjoint corretto incremento della profondità pari al raggio utensile per tunnel con sega a catena [Ticket #1212]
Versione 2.5g3 (01/08/2023)
- Added : aggiunta gestione tasche chiuse ad orientamento verticale con rinvio angolare [Ticket #1333]
- Modif : in LongCut ammesso uso lama da sotto fino a Norm +3deg in verticale
- Fixed : in Cut correzione calcolo offset per taglio doppio di lato [Ticket #1400].
Versione 2.5g2 (31/07/2023)
- Added : in FreeContour, solo se pocket, aggiunta Q06 per specificare un eventuale offset radiale del contorno [Ticket #1334]
- Added : aggiunta gestione forature verticali con rinvio angolare [Ticket #1332]
- Fixed : corretta gestione antischeggia con lama su LapJoint [Ticket #1351]
- Fixed : in ProfConvex, ProfConcave e ProfHead corretto e semplificato ModifySideInvertLead per invert [Ticket #1330]
- Fixed : corretto il funzionamento delle mortase in doppio [Ticket #1404].
Versione 2.5g1 (05/07/2023)
- Modif : in DiceCut modificata scelta tagli ortogonali quando liberi (esteso caso di verticali ammessi)
- Modif : in LapJoint estesi casi riconoscimento in coda basato su lunghezza
- Fixed : nelle mortase passanti escluso il riconoscimento lati aperti che portava a lavorazioni errate [Ticket #1342]
- Fixed : in LapJoint impedito l'uso del truciolatore se la tasca è chiusa [Ticket #1361]
- Fixed : migliorato controllo fattibilità taglio di fianco con cubetti.
Versione 2.5f4 (21/06/2023)
- Added : aggiunti tagli speciali per evitare il rischio che il cubetto rimanga appoggiato al motore [Ticket #1004, #1214]
- Fixed : corretto attacco speciale in FreeContour [Ticket #1250]
Versione 2.5f3 (16/06/2023)
- Fixed : correzione scelta di approccio lama in casi speciali
- Fixed : correzione a tagli aggiuntivi orizzontali negli split.
Versione 2.5f2 (12/06/2023)
- Fixed : in LapJoint corretto il recupero dati utensile che, in alcune funzioni, puntava all'utensile errato
- Fixed : In BeamLib -> ChangeOrOpenStart corretta ricerca segmento più lungo.
Versione 2.5f1 (08/05/2023)
- Modif : in Process (esecuzione manuale da Cam5) ordinamento travi di lunghezza praticamente uguale dipende da ordine di selezione
- Modif : in LapJoint limiti su svuotature tasche a L 4 facce come per L 3 facce
- Modif : in LapJoint su svuotature aggiunto recupero UserNotes da libreria per MaxOptSize.
- Fixed : in LongDoubleCut corretta scelta SCC (orientamento braccio testa) per macchine TURN nel caso di concavi
Versione 2.5e5 (26/05/2023)
- Modif : riconoscimento fori da sotto anche dalla faccia di ingresso
- Modif : in foratura se TURN aggiunta possibilità di forare da sotto.
- Fixed : correzioni a Profili Concavo e Convesso per TURN
- Fixed : correzione a foratura per ignorare fori annegati nel pezzo
Versione 2.5e4 (23/05/2023)
- Modif : in LongCut migliorato calcolo e verifica affondamento per lavorazione con lama con codolo in mezzo
- Fixed : correzione SCC lama per macchina Turn [Ticket #1258]
Versione 2.5e3 (11/05/2023)
- Modif : in taglio di separazione aggiunta richiesta risalita preliminare a Zmax quando da sopra su macchine PF e ONE
- Fixed : in lavorazioni in doppio correzione riconoscimento per possibile lavorazione in doppio di tasche che si toccano sul fondo
- Fixed : in lavorazioni in doppio con lavorazione precedente differente forzata risalita a Zmax per vitare problemi di riposizionamento [Ticket #1062]
Versione 2.5e2 (04/05/2023)
- Modif : Piccola modifica a SCC per LongCut derivanti da Cut
Versione 2.5e1 (03/05/2023)
- Modif : in TS3v7 tolleranza su quote sezione portata a 0.1 mm
- Fixed : Corretto SCC in caso di asse utensile allineato con Z [Ticket #1232]
Versione 2.5d2 (20/04/2023)
- Added : nei tagli di testa e coda, nel caso di travi alte, aggiunti tagli orizzontali per diminuire la dimensione degli sfridi [Ticket #1175, #1185]
- Modif : unificata gestione lato testa per tagli longitudinali [Ticket #1167].
Versione 2.5d1 (06/04/23)
- Added : in svuotatura aggiunta possibilità di impostare una distanza di sicurezza minima su attacco da lato aperto
- Modif : in split per travi con sezioni molto grandi e materiale inferiore allo spessore lama, miglioramenti volti ad evitare collisioni prevedibili
- Modif : in taglio con lama piccola miglioria nella scelta della direzione di approccio per pezzi corti
- Fixed : in LapJoint correzione al calcolo della distanza di collisione nel caso in cui il gambo sia più piccolo dell'utensile [Ticket #1150]
- Fixed : corretto ordinamento per fori di coda da lasciare in coda
- Fixed : correzione per gestire la lama principale sulla testa secondaria quando questa non è una testa da sotto [Ticket #1161]
- Fixed : modifiche a Split per travi con sezioni molto grandi e materiale inferiore allo spessore lama.
Versione 2.5c8 (30/03/23)
- Modif : nei tenoni (standard e coda di rondine) migliorate e unificate condizioni scelta pretaglio con lama o fresa [Ticket #1131]
- Modif : le mortase a coda di rondine sono ora anticipate a prima dei tagli longitudinali indipendentemente dalla sovrapposizione in Y
- Modif : modificato l'ingombro dei tagli inclinati per macchine con trascinatori tipo PF
- Fixed : nelle mortase a coda di rondine corretto calcolo larghezza della mortasa per derivare numero e step passate [Ticket #1126, #1143]
- Fixed : nei tenoni a coda di rondine corretto calcolo distanza lato da lavorare quando la faccia di base è divisa in più parti.
+6
View File
@@ -0,0 +1,6 @@
-- Version.lua by Egaltech s.r.l. 2026/02/09
-- Gestione della versione di Beam
NAME = 'Beam'
VERSION = '3.1d2'
MIN_EXE = '3.1b1'