Copia locale Iniziale
@@ -0,0 +1,847 @@
|
||||
; PIndex = Type, PName, Min, Max, Default, Description
|
||||
; QIndex = Type, QName, Min, Max, Default, Description
|
||||
; Type : d=double, l=length, s=string
|
||||
|
||||
[Processings]
|
||||
0=10,12,13,16,17,20,25,30,32,33,34,36,37,38,39,40,50,51,52,53,55,56,60,61,80,90,100,101,102,103,104,106,107,120,136,138,250,251,252
|
||||
1=10,11,30,35,50,55,70,71,80,136,138
|
||||
|
||||
;Cut
|
||||
[1.10]
|
||||
GRP=1,2
|
||||
PRC=10
|
||||
NAME=60951
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,0,50000,0,61002
|
||||
P3=d,P03,0,50000,0,61003
|
||||
P4=d,P06,0.1,179.9,90,61004
|
||||
P5=d,P07,0.1,179.9,90,61005
|
||||
QB1=d,Q04,0,1,0,0=Automatico 1=Non staccare scarto di taglio
|
||||
QB2=d,Q05,0,1,0,0=Automatico 1=Lama + Truciolatore
|
||||
QB3=l,Q06,0,40,0,61451, Profondità smusso
|
||||
|
||||
;Longitudinal Cut
|
||||
[0.10]
|
||||
GRP=0,3,4
|
||||
PRC=10
|
||||
NAME=60952
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,20,61002
|
||||
P3=d,P04,0,7,0,61008
|
||||
P4=d,P07,-90,90,45,61009
|
||||
P5=d,P11,0,50000,0,61010
|
||||
P6=d,P12,0,99999,0,61011
|
||||
P7=d,P13,1,179,90,61012
|
||||
P8=d,P14,1,179,90,61013
|
||||
QB1=d,Q05,0,4,0,61500, 0=Automatico 1=Lama lungo faccia 2=Lama su fianchi e sotto 3=Lama su facce non passanti 4=Lama su fianchi e sotto su facce non passanti
|
||||
QB2=d,Q07,0,1,0,61501, 0=Automatico 1=Lavorazione con fresa orizzontale se sopra o sotto (disabilita lama)
|
||||
|
||||
;Double Cut
|
||||
[1.11]
|
||||
GRP=1,2
|
||||
PRC=11
|
||||
NAME=60953
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,50,61015
|
||||
P3=d,P06,1,179,45,61016
|
||||
P4=d,P07,1,179,90,61017
|
||||
P5=d,P08,1,179,90,61018
|
||||
P6=d,P09,1,179,90,61019
|
||||
QB1=l,Q06,0,40,0,61451, Profondità smusso
|
||||
|
||||
;Ridge or Valley Cut
|
||||
[0.12]
|
||||
GRP=0
|
||||
PRC=12
|
||||
NAME=60954
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,0,50000,50,61015
|
||||
P3=d,P04,0,7,0,61008
|
||||
P4=d,P07,-89,89,45,61023
|
||||
P5=d,P09,-89,89,45,61024
|
||||
P6=d,P11,-99999,99999,0,61025
|
||||
P7=d,P12,0,99999,0,61011
|
||||
P8=d,P13,1,179,90,61027
|
||||
P9=d,P14,1,179,90,61028
|
||||
P10=d,P15,1,179,90,61029
|
||||
P11=d,P16,1,179,90,61030
|
||||
QB1=d,Q01,0,1,0,61497, 0=Automatico 1=Lama
|
||||
QB2=d,Q03,0,1,0,61502, 0=Automatico 1=Usa truciolatore se sotto
|
||||
QW1=d,Q02,0,2,0,61504, 0=Automatico; 1=Esegui con lato fresa tipo lama; 2=Esegui con lato fresa tipo lama ma limita uso su facce sopra
|
||||
|
||||
;Saw Cut
|
||||
[0.13]
|
||||
GRP=0,3,4
|
||||
PRC=13
|
||||
NAME=60955
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,0,61015
|
||||
P3=d,P03,-50000,50000,0,61033
|
||||
P4=d,P06,-180,180,90,61004
|
||||
P5=d,P07,1,179,90,61009
|
||||
P6=d,P08,-89,89,0,61036
|
||||
P7=d,P11,0,50000,50,61037
|
||||
P8=d,P12,1,99999,50,61038
|
||||
QB1=d,Q01,0,1,0,61503, 0=Attacco e uscita centrati 1=Attacco e uscita interni
|
||||
QB2=d,Q02,0,1,0,61505, 0=Automatico; 1=Lavora come Taglio Longitudinale
|
||||
|
||||
;Slot
|
||||
[0.16]
|
||||
GRP=3,4
|
||||
PRC=16
|
||||
NAME=60956
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,0,61002
|
||||
P3=d,P03,0,50000,0,61041
|
||||
P4=d,P04,0,63,0,61042
|
||||
P5=d,P06,-90,90,0,61043
|
||||
P6=d,P07,1,179,90,61009
|
||||
P7=d,P08,1,179,90,61045
|
||||
P8=d,P09,1,179,90,61046
|
||||
P9=d,P10,1,179,0,61047
|
||||
P10=d,P11,1,50000,100,61048
|
||||
P11=d,P12,1,99999,200,61049
|
||||
P12=d,P13,1,50000,10,61050
|
||||
P13=d,P14,-50000,50000,0,61051
|
||||
P14=d,P15,-50000,50000,0,61052
|
||||
QB1=d,Q01,0,1,0,61497, 0=Automatico; 1=Lama
|
||||
QB2=l,Q04,0,40,0,61451, Profondità smusso
|
||||
QB3=d,Q05,0,1,0,61457, 1=Solo smusso
|
||||
QB4=d,Q10,0,500,0,61496, Massima elevazione (0=Automatico, altrimenti manuale)
|
||||
QW1=d,Q03,0,2,0,61504, 0=Automatico; 1=Esegui con lato fresa tipo lama; 2=Esegui con lato fresa tipo lama ma limita uso su facce sopra
|
||||
|
||||
;Front Slot
|
||||
[0.17]
|
||||
GRP=3,4
|
||||
PRC=17
|
||||
NAME=60957
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,0,61015
|
||||
P3=d,P03,0,50000,0,61055
|
||||
P4=d,P04,0,63,0,61056
|
||||
P5=d,P06,1,179,90,61004
|
||||
P6=d,P07,1,179,90,61009
|
||||
P7=d,P08,0,360,90,61059
|
||||
P8=d,P11,0,50000,20,61060
|
||||
P9=d,P12,0,50000,40,61061
|
||||
P10=d,P13,0,50000,40,61062
|
||||
|
||||
;Birds Mouth
|
||||
[0.20]
|
||||
GRP=3,4
|
||||
PRC=20
|
||||
NAME=60958
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,0,61002
|
||||
P3=d,P04,-1,12,-1,61065
|
||||
P4=d,P05,0,1,0,61066
|
||||
P5=d,P06,1,179,90,61067
|
||||
P6=d,P07,0,180,45,61068
|
||||
P7=d,P08,0,180,135,61069
|
||||
P8=d,P09,0,179,0,61070
|
||||
P9=d,P10,0,179,0,61071
|
||||
P10=d,P11,0,50000,20,61072
|
||||
P11=d,P12,0,50000,20,61073
|
||||
P12=d,P13,0,50000,0,61074
|
||||
P13=d,P14,0,50000,0,61075
|
||||
P14=d,P15,0,50000,0,61076
|
||||
QB1=l,Q01,0,30,0,61451, Profondità smusso
|
||||
QB2=d,Q02,0,1,0,61506, 0=Automatico 1=Lavorazione con fresa
|
||||
QB3=d,Q03,0,1,0,61485, 0=Automatico; 1=Truciolatore
|
||||
|
||||
;Hip or Valley Rafter Notch
|
||||
[0.25]
|
||||
GRP=3,4
|
||||
PRC=25
|
||||
NAME=60959
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,0,61002
|
||||
P3=d,P05,0,1,0,61079
|
||||
P4=d,P06,1,179,45,61080
|
||||
P5=d,P07,1,179,45,61081
|
||||
P6=d,P08,0,180,30,61082
|
||||
P7=d,P11,0,50000,20,61083
|
||||
P8=d,P14,0,50000,0,61084
|
||||
P9=d,P15,0,50000,0,61085
|
||||
|
||||
;Ridge Lap
|
||||
[1.30]
|
||||
GRP=1,2
|
||||
PRC=30
|
||||
NAME=60960
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,0,1,0,61087
|
||||
P3=d,P06,1,179,90,61088
|
||||
P4=d,P11,1,50000,50,61089
|
||||
P5=d,P12,1,50000,100,61090
|
||||
P6=d,P13,0,1000,0,61091
|
||||
QB1=l,Q01,0,30,0,61451, Profondità smusso
|
||||
|
||||
;Lap Joint
|
||||
[0.30]
|
||||
GRP=3,4
|
||||
PRC=30
|
||||
NAME=60961
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,0,61002
|
||||
P3=d,P03,0,50000,0,61094
|
||||
P4=d,P04,0,63,0,61095
|
||||
P5=d,P06,1,179,90,61096
|
||||
P6=d,P07,1,179,90,61009
|
||||
P7=d,P08,-89,89,0,61098
|
||||
P8=d,P09,0,179,0,61099
|
||||
P9=d,P10,0,179,0,61100
|
||||
P10=d,P11,-50000,50000,50,61101
|
||||
P11=d,P12,1,99999,100,61102
|
||||
P12=d,P13,0,89,0,61103
|
||||
P13=d,P14,0,50000,0,61104
|
||||
QB1=d,Q01,0,2,0,61460, 0=Automatico; 1=Esegui perimetro con fresa diametro minore; 2=Pulitura solo su angoli
|
||||
QB2=d,Q02,0,1,0,61470, 0=Automatico; 1=Solo contorno
|
||||
QB3=d,Q03,0,1,0,61455, 0=Automatico; 1=Lavorazione con fresa di lato
|
||||
QB4=d,Q04,0,4,0,61499, 0=Automatico; 1=Lama lungo faccia 2=Lama su fianchi e sotto 3=Lama su facce non passanti 4=Lama su fianchi e sotto su facce non passanti
|
||||
QB5=d,Q06,0,2,0,61467, Antischeggia: 0=No; 1=Con lama; 2=Con fresa
|
||||
QB6=l,Q07,0,30,0,61451, Profondità smusso
|
||||
QB7=d,Q10,0,500,0,61496, Massima elevazione (0=Automatico, altrimenti manuale)
|
||||
QW1=d,Q05,0,3,0,61469, Pulisci spigoli: 0=No; 1=Con fresa conica dopo rimozione manuale sfridi; 2=Con fresa conica piccola;3=Con gola di scarico
|
||||
QW2=d,Q08,0,2,0,61504, 0=Automatico; 1=Esegui con lato fresa tipo lama; 2=Esegui con lato fresa tipo lama ma limita uso su facce sopra
|
||||
|
||||
;Notch/Rabbet
|
||||
[0.32]
|
||||
GRP=3,4
|
||||
PRC=32
|
||||
NAME=60962
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,0,61002
|
||||
P3=d,P04,0,63,0,61107
|
||||
P4=d,P11,0,50000,20,61108
|
||||
P5=d,P12,0,99999,20,61109
|
||||
P6=d,P13,1,50000,200,61110
|
||||
QB1=d,Q01,0,1,0,61455, 0=Automatico 1=Lavorazione con fresa di lato
|
||||
QB2=d,Q02,0,2,0,61460, 0=Automatico; 1=Esegui perimetro con fresa diametro minore; 2=Pulitura solo su angoli
|
||||
QB3=d,Q06,0,2,0,61467, Antischeggia : 0=No; 1=Con lama; 2=Con fresa
|
||||
QB4=d,Q10,0,500,0,61496, Massima elevazione (0=Automatico, altrimenti manuale)
|
||||
QW1=d,Q03,0,2,0,61504, 0=Automatico; 1=Esegui con lato fresa tipo lama; 2=Esegui con lato fresa tipo lama ma limita uso su facce sopra
|
||||
QW2=d,Q05,0,3,0,61469, Pulisci spigoli: 0=No; 1=Con fresa conica dopo rimozione manuale sfridi; 2=Con fresa conica piccola;3=Con gola di scarico
|
||||
|
||||
;Block House Half Lap, Stairs Riser Dado
|
||||
[0.33]
|
||||
GRP=3,4
|
||||
PRC=33
|
||||
NAME=60963
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P06,1,179,90,61004
|
||||
P3=d,P11,0,50,20,61113
|
||||
P4=d,P12,0,50,20,61114
|
||||
P5=d,P13,1,50000,50,61115
|
||||
QB1=d,Q06,0,2,0,61467, Antischeggia : 0=No; 1=Con lama; 2=Con fresa
|
||||
|
||||
;Seathing Cut
|
||||
[0.34]
|
||||
GRP=3,4
|
||||
PRC=34
|
||||
NAME=60964
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P11,0,99999,1,61117
|
||||
P3=d,P12,1,99999,500,61118
|
||||
QB1=d,Q01,0,2,0,61460, 0=Automatico; 1=Esegui perimetro con fresa diametro minore; 2=Pulitura solo su angoli
|
||||
QB2=d,Q06,0,2,0,61467, Antischeggia : 0=No; 1=Con lama; 2=Con fresa
|
||||
QB3=d,Q10,0,500,0,61496, Massima elevazione (0=Automatico, altrimenti manuale)
|
||||
|
||||
;French Ridge Lap
|
||||
[1.35]
|
||||
GRP=1,2
|
||||
PRC=35
|
||||
NAME=60965
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,0,1,0,61120
|
||||
P3=d,P06,1,179,90,61121
|
||||
P4=d,P13,0,1000,0,61122
|
||||
|
||||
;Chamfer
|
||||
[0.36]
|
||||
GRP=3,4
|
||||
PRC=36
|
||||
NAME=60966
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P04,0,15,1,61124
|
||||
P3=d,P11,1,50,10,61125
|
||||
P4=d,P12,0,99999,500,61126
|
||||
P5=d,P15,0,2,0,61127
|
||||
QB1=d,Q01,0,6,0,61489, Numero divisioni ondulazioni dello smusso sulla lunghezza
|
||||
|
||||
;Block House Half Lap
|
||||
[0.37]
|
||||
GRP=4
|
||||
PRC=37
|
||||
NAME=60967
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P03,0,50000,0,61129
|
||||
P3=d,P04,0,2,0,61130
|
||||
P4=d,P05,0,1,0,61131
|
||||
P5=d,P08,0,50000,10,61132
|
||||
P6=d,P09,0,50000,100,61133
|
||||
P7=d,P10,0,50000,10,61134
|
||||
P8=d,P11,0,50000,100,61135
|
||||
P9=d,P12,0,50000,10,61136
|
||||
P10=d,P13,0,50000,100,61137
|
||||
P11=d,P14,0,50000,10,61138
|
||||
P12=d,P15,0,50000,100,61139
|
||||
P13=d,P16,0,50000,50,61140
|
||||
P14=d,P17,0,50000,50,61141
|
||||
P15=d,P18,0,50000,50,61142
|
||||
P16=d,P19,0,15,0,61143
|
||||
QB1=d,Q06,0,2,0,61467, Antischeggia: 0=No; 1=Con lama; 2=Con fresa
|
||||
|
||||
;Block House Front
|
||||
[0.38]
|
||||
GRP=3,4
|
||||
PRC=38
|
||||
NAME=60968
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P04,0,1,0,61145
|
||||
P3=d,P06,1,179,90,61146
|
||||
P4=d,P11,-50000,50000,15,61147
|
||||
P5=d,P12,-50000,50000,10,61148
|
||||
P6=d,P13,-50000,50000,25,61149
|
||||
P7=d,P15,0,50000,100,61150
|
||||
|
||||
;Pocket
|
||||
[0.39]
|
||||
GRP=4
|
||||
PRC=39
|
||||
NAME=60969
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,0,61002
|
||||
P3=d,P04,0,63,0,61153
|
||||
P4=d,P06,-179,179,0,61154
|
||||
P5=d,P07,-179,179,0,61155
|
||||
P6=d,P08,-179,179,0,61156
|
||||
P7=d,P10,1,179,90,61157
|
||||
P8=d,P11,-50000,50000,20,61158
|
||||
P9=d,P12,1,50000,20,61159
|
||||
P10=d,P13,0,50000,100,61160
|
||||
QB1=d,Q01,0,2,0,61460, 0=Automatico; 1=Esegui perimetro con fresa diametro minore; 2=Pulitura solo su angoli
|
||||
QB2=d,Q02,0,1,0,61506, 0=Automatico 1=Lavorazione con fresa
|
||||
QB3=d,Q06,0,2,0,61467, Antischeggia : 0=No; 1=Con lama; 2=Con fresa
|
||||
QW1=d,Q03,0,2,0,61504, 0=Automatico; 1=Esegui con lato fresa tipo lama; 2=Esegui con lato fresa tipo lama ma limita uso su facce sopra
|
||||
QW2=d,Q05,0,3,0,61469, Pulisci spigoli: 0=No; 1=Con fresa conica dopo rimozione manuale sfridi; 2=Con fresa conica piccola;3=Con gola di scarico
|
||||
|
||||
;Drilling
|
||||
[0.40]
|
||||
GRP=3,4
|
||||
PRC=40
|
||||
NAME=60970
|
||||
P1=d,P01,-99999,99999,50,61001
|
||||
P2=d,P02,-50000,50000,50,61002
|
||||
P3=d,P03,-99999,99999,0,61163
|
||||
P4=d,P06,0,360,90,61164
|
||||
P5=d,P07,1,179,90,61165
|
||||
P6=d,P11,0,50000,50,61166
|
||||
P7=d,P12,0,50000,20,61167
|
||||
QB1=d,Q01,0,1,0,61470, 0=Automatico; 1=Solo contorno ; 2=Svuota
|
||||
QB2=d,Q02,0,1,0,61471, 0=Automatico; 1=Fora da un solo lato
|
||||
QW1=d,Q01,0,1,0,61470, 0=Automatico; 1=Solo contorno ; 2=Svuota
|
||||
|
||||
;Tenon
|
||||
[1.50]
|
||||
GRP=1,2
|
||||
PRC=50
|
||||
NAME=60971
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,50,61002
|
||||
P3=d,P04,0,4,0,61170
|
||||
P4=d,P05,0,1,0,61171
|
||||
P5=d,P06,1,179,90,61004
|
||||
P6=d,P07,1,179,90,61005
|
||||
P7=d,P08,1,179,90,61174
|
||||
P8=d,P10,0,500,0,61175
|
||||
P9=d,P11,1,1000,40,61176
|
||||
P10=d,P12,1,1000,40,61177
|
||||
P11=d,P14,-50000,50000,0,61178
|
||||
P12=d,P15,-50000,50000,0,61179
|
||||
QB1=l,Q01,0,30,0,61451, Profondità smusso
|
||||
QB2=l,Q02,0,30,0,61475, Riduzione profondità tenone
|
||||
QB3=l,Q03,0,30,0,61476, Riduzione larghezza tenone
|
||||
QB4=l,Q04,0,30,0,61477, Riduzione altezza tenone
|
||||
|
||||
;Mortise
|
||||
[0.50]
|
||||
GRP=3,4
|
||||
PRC=50
|
||||
NAME=60972
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,50,61002
|
||||
P3=d,P03,0,50000,0,61182
|
||||
P4=d,P04,0,4,0,61183
|
||||
P5=d,P06,-180,180,90,61184
|
||||
P6=d,P07,1,179,90,61185
|
||||
P7=d,P08,1,179,90,61186
|
||||
P8=d,P10,0,500,0,61187
|
||||
P9=d,P11,0,1000,40,61188
|
||||
P10=d,P12,0,1000,40,61189
|
||||
P11=d,P13,1,50000,200,61190
|
||||
P12=d,P14,-50000,50000,0,61191
|
||||
P13=d,P15,-50000,50000,0,61192
|
||||
P14=d,P16,1,179,90,61193
|
||||
|
||||
;Mortise Front
|
||||
[0.51]
|
||||
GRP=3,4
|
||||
PRC=51
|
||||
NAME=60973
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,50,61002
|
||||
P3=d,P04,0,4,90,61196
|
||||
P4=d,P06,1,179,90,61004
|
||||
P5=d,P07,1,179,90,61005
|
||||
P6=d,P08,1,179,90,61199
|
||||
P7=d,P10,0,500,0,61200
|
||||
P8=d,P11,1,1000,40,61201
|
||||
P9=d,P12,1,1000,40,61202
|
||||
P10=d,P14,-50000,50000,0,61203
|
||||
P11=d,P15,-50000,50000,0,61204
|
||||
|
||||
;House
|
||||
[0.52]
|
||||
GRP=3,4
|
||||
PRC=52
|
||||
NAME=60974
|
||||
P1=d,P01,-99999,99999,0,61168
|
||||
P2=d,P02,-50000,50000,50,61169
|
||||
P3=d,P04,0,4,90,61170
|
||||
P4=d,P06,1,179,90,61172
|
||||
P5=d,P07,1,179,90,61173
|
||||
P6=d,P08,1,179,90,61174
|
||||
P7=d,P09,0,99999,0,61205
|
||||
P8=d,P10,0,500,0,61175
|
||||
P9=d,P11,1,1000,40,61176
|
||||
P10=d,P12,1,1000,40,61177
|
||||
P11=d,P14,-50000,50000,0,61178
|
||||
P12=d,P15,-50000,50000,0,61179
|
||||
|
||||
;House Mortise
|
||||
[0.53]
|
||||
GRP=3,4
|
||||
PRC=53
|
||||
NAME=60975
|
||||
P1=d,P01,-99999,99999,0,61180
|
||||
P2=d,P02,-50000,50000,50,61181
|
||||
P3=d,P03,0,50000,0,61182
|
||||
P4=d,P04,0,4,90,61183
|
||||
P5=d,P06,-180,180,90,61184
|
||||
P6=d,P07,1,179,90,61185
|
||||
P7=d,P08,1,179,90,61186
|
||||
P8=d,P09,0,99999,0,61206
|
||||
P9=d,P10,0,500,0,61187
|
||||
P10=d,P11,0,1000,40,61188
|
||||
P11=d,P12,0,1000,40,61189
|
||||
P12=d,P13,1,50000,200,61190
|
||||
P13=d,P14,-50000,50000,0,61191
|
||||
P14=d,P15,-50000,50000,0,61192
|
||||
P15=d,P16,1,179,90,61193
|
||||
|
||||
;Dovetail Tenon
|
||||
[1.55]
|
||||
GRP=1,2
|
||||
PRC=55
|
||||
NAME=60976
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,50,61002
|
||||
P3=d,P04,0,1,0,61209
|
||||
P4=d,P06,1,179,90,61210
|
||||
P5=d,P07,1,179,90,61005
|
||||
P6=d,P08,1,179,90,61212
|
||||
P7=d,P09,0,1000,0,61213
|
||||
p8=d,P10,0,30,0,61214
|
||||
P9=d,P11,1,1000,28,61215
|
||||
P10=d,P12,-1000,1000,45,61216
|
||||
P11=d,P14,-50000,50000,0,61217
|
||||
P12=d,P15,-50000,50000,0,61218
|
||||
QB1=l,Q03,0,30,0,61475, Riduzione profondità tenone
|
||||
QB2=l,Q04,0,30,0,61479, Ridurre/Allargare sagoma tenone
|
||||
QB3=l,Q05,0,30,0,61480, Ridurre/Allargare altezza tenone
|
||||
|
||||
;Dovetail Mortise
|
||||
[0.55]
|
||||
GRP=3,4
|
||||
PRC=55
|
||||
NAME=60977
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,50,61002
|
||||
P3=d,P03,0,50000,0,61221
|
||||
P4=d,P04,0,1,0,61222
|
||||
P5=d,P05,0,1,0,61223
|
||||
P6=d,P06,-180,180,0,61224
|
||||
P7=d,P07,1,179,90,61225
|
||||
P8=d,P09,0,1000,0,61226
|
||||
P9=d,P10,0,30,0,61227
|
||||
P10=d,P11,1,1000,28,61228
|
||||
P11=d,P12,-1000,1000,45,61229
|
||||
p12=d,P13,1,50000,200,61230
|
||||
p13=d,P14,-50000,50000,0,61231
|
||||
p14=d,P15,-50000,50000,0,61232
|
||||
|
||||
;Dovetail Mortise Front
|
||||
[0.56]
|
||||
GRP=3,4
|
||||
PRC=56
|
||||
NAME=60978
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,50,61002
|
||||
P3=d,P03,0,50000,0,61235
|
||||
P4=d,P04,0,1,0,61236
|
||||
P5=d,P05,0,1,0,61237
|
||||
P6=d,P06,1,179,90,61004
|
||||
P7=d,P07,1,179,90,61005
|
||||
P8=d,P08,1,179,90,61240
|
||||
P9=d,P09,0,1000,0,61241
|
||||
P10=d,P10,0,30,0,61242
|
||||
P11=d,P11,1,1000,28,61243
|
||||
P12=d,P12,0,1000,45,61244
|
||||
P13=d,P14,-50000,50000,0,61245
|
||||
P14=d,P15,-50000,50000,0,61246
|
||||
|
||||
;Marking/Labeling
|
||||
[0.60]
|
||||
GRP=3,4
|
||||
PRC=60
|
||||
NAME=60979
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,0,61002
|
||||
P3=d,P04,0,19521,0,61249
|
||||
P4=d,P06,1,180,90,61250
|
||||
P5=d,P07,0,179,90,61251
|
||||
P6=d,P11,0,50000,100,61252
|
||||
P7=d,P12,0,50000,0,61253
|
||||
P8=d,P13,0,50000,200,61254
|
||||
P9=s,P15,,,,61255
|
||||
|
||||
;Text
|
||||
[0.61]
|
||||
GRP=4
|
||||
PRC=61
|
||||
NAME=60980
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,0,61002
|
||||
P3=d,P06,-180,180,0,61258
|
||||
P4=d,P09,0,2,0,61259
|
||||
P5=d,P10,0,2,0,61260
|
||||
P6=d,P11,0,2,0,61261
|
||||
P7=d,P12,0,1,0,61262
|
||||
P8=d,P13,0,50000,200,61263
|
||||
P9=s,P15,,,,61255
|
||||
|
||||
;Simple Scarf
|
||||
[1.70]
|
||||
GRP=1,2
|
||||
PRC=70
|
||||
NAME=60981
|
||||
P1=d,P01,-50000,50000,0,61001
|
||||
P2=d,P11,0,50000,20,61266
|
||||
P3=d,P12,0,50000,20,61267
|
||||
P4=d,P13,1,50000,200,61268
|
||||
P5=d,P14,0,1000,0,61269
|
||||
P6=d,P15,0,1000,0,61270
|
||||
QB1=l,Q01,0,30,0,61451, Profondità smusso
|
||||
|
||||
;Scarf Joint
|
||||
[1.71]
|
||||
GRP=1,2
|
||||
PRC=71
|
||||
NAME=60982
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P07,0,90,0,61272
|
||||
P3=d,P09,-,1,1,1,61273
|
||||
P4=d,P10,0,50000,0,61274
|
||||
P5=d,P11,1,50000,20,61275
|
||||
P6=d,P12,0,50000,0,61276
|
||||
P7=d,P13,1,50000,200,61277
|
||||
P8=d,P14,0,1000,0,61278
|
||||
P9=d,P15,0,1000,0,61279
|
||||
QB1=l,Q01,0,30,0,61451, Profondità smusso
|
||||
QB2=l,Q04,0,30,0,61484, Aumenta dimensioni P10
|
||||
|
||||
;Step Joint
|
||||
[1.80]
|
||||
GRP=1,2
|
||||
PRC=80
|
||||
NAME=60983
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P04,0,1,0,61281
|
||||
P3=d,P07,1,179,45,61282
|
||||
P4=d,P11,0,1000,20,61283
|
||||
P5=d,P12,0,1000,20,61284
|
||||
P6=d,P14,0,1000,0,61285
|
||||
P7=d,P15,0,1000,0,61286
|
||||
QB1=l,Q01,0,30,0,61451, Profondità smusso
|
||||
QB2=d,Q02,0,1,0,61485, 0=Automatico; 1=Truciolatore
|
||||
QB3=l,Q03,0,20,0,61486, Riduzione lunghezza P14
|
||||
QB4=l,Q04,0,20,0,61487, Riduzione larghezza P15
|
||||
|
||||
;Step Joint Notch
|
||||
[0.80]
|
||||
GRP=3,4
|
||||
PRC=80
|
||||
NAME=60984
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,0,61002
|
||||
P3=d,P04,0,1,0,61289
|
||||
P4=d,P07,1,179,45,61290
|
||||
P5=d,P10,0,50000,50,61291
|
||||
P6=d,P11,0,1000,20,61292
|
||||
P7=d,P12,0,1000,20,61293
|
||||
P8=d,P13,1,50000,200,61294
|
||||
P9=d,P14,0,1000,0,61295
|
||||
P10=d,P15,0,1000,0,61296
|
||||
|
||||
;Planing
|
||||
[0.90]
|
||||
GRP=3,4
|
||||
PRC=90
|
||||
NAME=60985
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P04,1,15,15,61298
|
||||
P3=d,P11,0,50,1,61299
|
||||
P4=d,P12,-99999,99999,500,61300
|
||||
|
||||
;Profile Front
|
||||
[0.100]
|
||||
GRP=3,4
|
||||
PRC=100
|
||||
NAME=60986
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P03,-1000,1000,0,61002
|
||||
P3=d,P06,0,180,90,61303
|
||||
P4=d,P07,0,180,90,61304
|
||||
P5=d,P08,-180,180,0,61305
|
||||
P6=d,P11,-1000,1000,250,61306
|
||||
P7=d,P12,-1000,1000,250,61307
|
||||
QB1=l,Q01,0,10,0,61451, Profondità smusso
|
||||
QB2=l,Q02,0,20,0,61488, Sovramateriale finitura
|
||||
QB3=d,Q03,0,1,0,Solo smusso (1=si, 0=no)
|
||||
|
||||
;Profile Head concave
|
||||
[0.101]
|
||||
GRP=3,4
|
||||
PRC=101
|
||||
NAME=60987
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P11,0,1000,120,61309
|
||||
P3=d,P12,-1000,1000,20,61310
|
||||
P4=d,P13,0,1000,20,61311
|
||||
P5=d,P14,-1000,1000,20,61312
|
||||
P6=d,P15,0,1000,20,61313
|
||||
QB1=l,Q01,0,10,0,61451, Profondità smusso
|
||||
QB2=l,Q02,0,20,0,61488, Sovramateriale finitura
|
||||
QB3=d,Q03,0,1,0,61490, 1=Disabilita fresatura gradini
|
||||
QB4=d,Q04,0,1,0,Solo smusso (1=si, 0=no)
|
||||
|
||||
;Profile Head convex
|
||||
[0.102]
|
||||
GRP=3,4
|
||||
PRC=102
|
||||
NAME=60988
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P11,0,1000,120,61315
|
||||
P3=d,P12,-1000,1000,20,61316
|
||||
P4=d,P13,0,1000,20,61317
|
||||
P5=d,P14,-1000,1000,20,61318
|
||||
P6=d,P15,0,1000,20,61319
|
||||
QB1=d,Q01,0,1,0,61457, 1=Solo smusso
|
||||
QB2=l,Q02,0,30,0,61451, Profondità smusso
|
||||
QB3=l,Q04,0,20,0,61488, Sovramateriale finitura
|
||||
QB4=d,Q05,0,1,0,61490, 1=Disabilita fresatura gradini
|
||||
|
||||
;Profile Head cambered
|
||||
[0.103]
|
||||
GRP=3,4
|
||||
PRC=103
|
||||
NAME=60989
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P10,0,50000,500,61321
|
||||
P3=d,P11,-1000,1000,40,61322
|
||||
P4=d,P12,-1000,1000,60,61323
|
||||
P5=d,P13,-1000,1000,10,61324
|
||||
P6=d,P14,-1000,1000,40,61325
|
||||
P7=d,P15,0,1,1,61326
|
||||
QB1=d,Q01,0,1,0,61491, 1=Attiva smusso superiore
|
||||
QB2=d,Q02,0,1,0,61492, 1=Smusso superiore con lama
|
||||
QB3=l,Q03,0,30,0,61451, Profondità smusso
|
||||
QB4=l,Q04,0,20,0,61488, Sovramateriale finitura
|
||||
QB5=d,Q05,0,1,0,61457, 1=Solo smusso
|
||||
|
||||
;Round Arch
|
||||
[0.104]
|
||||
GRP=4
|
||||
PRC=107
|
||||
NAME=60990
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P11,-1000,1000,30,61328
|
||||
P3=d,P12,0,30000,500,61329
|
||||
QB1=l,Q01,0,20,0,61488, Sovramateriale finitura
|
||||
QB2=l,Q02,0,50,8,61493, Spessore legno per supporto lavorazione
|
||||
QB3=l,Q03,0,30,0,61451, Profondità smusso
|
||||
|
||||
;Profile Head
|
||||
[0.106]
|
||||
GRP=3,4
|
||||
PRC=106
|
||||
NAME=60991
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P04,0,3,0,61331
|
||||
P3=d,P09,0,1000,20,61332
|
||||
P4=d,P10,0,1000,20,61333
|
||||
P5=d,P11,0,1000,10,61334
|
||||
P6=d,P12,0,1000,50,61335
|
||||
P7=d,P13,0,1000,50,61336
|
||||
P8=d,P14,0,1000,15,61337
|
||||
P9=d,P15,0,1000,20,61338
|
||||
P10=d,P16,0,1000,20,61339
|
||||
P11=d,P17,0,1000,10,61340
|
||||
P12=d,P18,0,1000,50,61341
|
||||
P13=d,P19,0,1000,50,61342
|
||||
P14=d,P20,0,1000,15,61343
|
||||
P15=d,P21,0,1000,20,61344
|
||||
P16=d,P22,0,1000,30,61345
|
||||
QB1=l,Q01,0,30,0,61451, Profondità smusso
|
||||
QB2=d,Q02,0,1,0,61457, 1=Solo smusso
|
||||
QB3=d,Q03,0,1,0,61490, 1=Disabilita fresatura gradini
|
||||
QB4=l,Q04,0,20,0,61488, Sovramateriale finitura
|
||||
|
||||
;Sphere
|
||||
[0.107]
|
||||
GRP=3,4
|
||||
PRC=107
|
||||
NAME=60992
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-99999,99999,50,61002
|
||||
P3=d,P03,-99999,99999,50,61348
|
||||
P4=d,P11,-99999,99999,50,61349
|
||||
P5=d,P12,0,99999,0,61350
|
||||
P6=d,P13,0,99999,P11,61351
|
||||
|
||||
;Triangle Cut
|
||||
[0.120]
|
||||
GRP=4
|
||||
PRC=120
|
||||
NAME=60993
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,-50000,50000,0,61002
|
||||
P3=d,P03,-50000,50000,0,61354
|
||||
P4=d,P10,-50000,50000,1,61355
|
||||
P5=d,P11,-50000,50000,0,61356
|
||||
P6=d,P12,-50000,50000,1,61357
|
||||
P7=d,P13,-50000,50000,-1,61358
|
||||
P8=d,P14,-50000,50000,0,61359
|
||||
P9=d,P15,-50000,50000,1,61360
|
||||
|
||||
;Tyrolean Dovetail
|
||||
[1.136]
|
||||
GRP=1,2
|
||||
PRC=136
|
||||
NAME=60994
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,0,50000,30,61362
|
||||
P3=d,P03,-50000,50000,50,61363
|
||||
P4=d,P04,0,1,0,61364
|
||||
P5=d,P05,-1,50000,0,61365
|
||||
P6=d,P06,1,179,90,61366
|
||||
P7=d,P07,0,50000,0,61367
|
||||
P8=d,P08,0,50000,0,61368
|
||||
P9=d,P09,0,45,15,61369
|
||||
P10=d,P11,0,50000,25,61370
|
||||
P11=d,P12,0,50000,0,61371
|
||||
P12=d,P13,0,50000,0,61372
|
||||
P13=d,P14,0,1,0,61373
|
||||
P14=d,P15,0,50000,50,61374
|
||||
P15=d,P16,0,2,0,61375
|
||||
|
||||
;Tyrolean Dovetail
|
||||
[0.136]
|
||||
GRP=3,4
|
||||
PRC=136
|
||||
NAME=60994
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,0,50000,30,61362
|
||||
P3=d,P03,-50000,50000,50,61363
|
||||
P4=d,P04,0,1,0,61364
|
||||
P5=d,P05,-1,50000,0,61365
|
||||
P6=d,P06,1,179,90,61366
|
||||
P7=d,P07,0,50000,0,61367
|
||||
P8=d,P08,0,50000,0,61368
|
||||
P9=d,P09,0,45,15,61369
|
||||
P10=d,P11,0,50000,25,61370
|
||||
P11=d,P12,0,50000,0,61371
|
||||
P12=d,P13,0,50000,0,61372
|
||||
P13=d,P14,0,1,0,61373
|
||||
P14=d,P15,0,50000,50,61374
|
||||
P15=d,P16,0,2,0,61375
|
||||
|
||||
;Dovetail
|
||||
[1.138]
|
||||
GRP=1,2
|
||||
PRC=138
|
||||
NAME=60995
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,0,50000,30,61377
|
||||
P3=d,P03,-50000,50000,50,61378
|
||||
P4=d,P04,0,1,0,61379
|
||||
P5=d,P05,-1,50000,0,61380
|
||||
P6=d,P09,0,45,15,61381
|
||||
P7=d,P11,0,50000,40,61382
|
||||
P8=d,P12,0,50000,20,61383
|
||||
P9=d,P14,0,1,0,61384
|
||||
P10=d,P15,0,50000,50,61385
|
||||
P11=d,P16,0,2,0,61386
|
||||
|
||||
;Dovetail
|
||||
[0.138]
|
||||
GRP=3,4
|
||||
PRC=138
|
||||
NAME=60995
|
||||
P1=d,P01,-99999,99999,0,61001
|
||||
P2=d,P02,0,50000,30,61377
|
||||
P3=d,P03,-50000,50000,50,61378
|
||||
P4=d,P04,0,1,0,61379
|
||||
P5=d,P05,-1,50000,0,61380
|
||||
P6=d,P09,0,45,15,61381
|
||||
P7=d,P11,0,50000,40,61382
|
||||
P8=d,P12,0,50000,20,61383
|
||||
P9=d,P14,0,1,0,61384
|
||||
P10=d,P15,0,50000,50,61385
|
||||
P11=d,P16,0,2,0,61386
|
||||
|
||||
;Free Contour
|
||||
[0.250]
|
||||
GRP=0,3,4
|
||||
PRC=250
|
||||
NAME=60996
|
||||
P1=d,P05,0,50000,0,61387
|
||||
P2=d,P07,0,1,0,61388
|
||||
P3=d,P13,0,200,0,61389
|
||||
P4=d,P14,0,10000,0,61390
|
||||
P5=d,P15,0,1000,0,61391
|
||||
QB1=l,Q01,0,50,0,61493, Spessore legno per supporto lavorazione
|
||||
QB2=l,Q02,0,30,0,61451, Profondità smusso
|
||||
QB3=l,Q03,0,20,0,61488, Sovramateriale finitura
|
||||
QW1=d,Q05,0,3,0,61469, Pulisci spigoli: 0=No; 1=Con fresa conica dopo rimozione manuale sfridi; 2=Con fresa conica piccola;3=Con gola di scarico
|
||||
|
||||
;Outline
|
||||
[0.251]
|
||||
GRP=4
|
||||
PRC=251
|
||||
NAME=60997
|
||||
P1=d,P13,0,200,0,61389
|
||||
P2=d,P14,0,10000,0,61390
|
||||
P3=d,P15,0,1000,0,61391
|
||||
QW1=d,Q05,0,3,0,61469, Pulisci spigoli: 0=No; 1=Con fresa conica dopo rimozione manuale sfridi; 2=Con fresa conica piccola;3=Con gola di scarico
|
||||
|
||||
;Aperture
|
||||
[0.252]
|
||||
GRP=4
|
||||
PRC=252
|
||||
NAME=60998
|
||||
P1=d,P13,0,200,0,61389
|
||||
P2=d,P14,0,10000,0,61390
|
||||
P3=d,P15,0,1000,0,61391
|
||||
QW1=d,Q05,0,3,0,61469, Pulisci spigoli: 0=No; 1=Con fresa conica dopo rimozione manuale sfridi; 2=Con fresa conica piccola;3=Con gola di scarico
|
||||
@@ -0,0 +1,255 @@
|
||||
; DisplayIndex = Name, CanUserReorder, CanUserResize, CanUserSort, IsReadOnly, Width, DataGridLengthUnitType, Visible, CanUserEditVisible
|
||||
|
||||
[DG_FeatureList]
|
||||
0=colDO,1,1,1,0,30.4,1,1,1,0
|
||||
1=colCALC,0,1,0,0,32.8,1,1,1,0
|
||||
2=colDESC,1,1,1,1,1,4,1,1,0
|
||||
|
||||
[DG_OpenProjectFileDialog_PROJ]
|
||||
0=colPROJID,1,1,1,1,34,1,1,1,0
|
||||
1=colBTLNAME,1,1,1,1,170,1,1,1,0
|
||||
2=colLISTNAME,1,1,1,1,79,1,1,1,0
|
||||
3=colEXPDATE,1,1,1,1,56,1,1,1,0
|
||||
4=colCRTDATE,1,1,1,1,113.8,1,1,1,0
|
||||
5=colMACHINE,1,1,1,1,20,1,1,1,0
|
||||
|
||||
[DG_OpenProjectFileDialog_PROD]
|
||||
0=colPRODID,1,1,1,1,54.4,1,1,1,0
|
||||
1=colBTLNAME,1,1,1,1,154.850564,1,1,1,0
|
||||
2=colCRTDATE,1,1,1,1,144.698873,1,1,1,0
|
||||
3=colMACHINE,1,1,1,1,1,4,1,1,0
|
||||
|
||||
[DG_RawPartList_BEAM]
|
||||
0=colNAME,1,1,1,1,28.8,1,1,1,0
|
||||
1=colCALC,1,1,0,0,22.05,1,1,1,0
|
||||
2=colSTARTCUT,1,1,1,0,95.993333,1,1,1,0
|
||||
3=colW,1,1,1,0,40.4,1,1,1,0
|
||||
4=colH,1,1,1,1,36.4,1,1,1,0
|
||||
5=colL,1,1,1,0,60,1,1,1,0
|
||||
6=colMATERIAL,1,1,1,1,102.643333,1,1,1,0
|
||||
7=colUSAGE,1,1,1,1,92.913333,1,1,1,0
|
||||
8=colWASTE,1,1,1,1,1,4,1,1,0
|
||||
|
||||
[DG_RawPartList_WALL]
|
||||
0=colNAME,1,1,1,1,33.68,1,1,1,0
|
||||
1=colCALC,1,1,0,0,22.05,1,1,1,0
|
||||
2=colW,1,1,1,0,52.2,1,1,1,0
|
||||
3=colH,1,1,1,1,52.2,1,1,1,0
|
||||
4=colL,1,1,1,0,49,1,1,1,0
|
||||
5=colMATERIAL,1,1,1,1,105.6,1,1,1,0
|
||||
6=colUSAGE,1,1,1,1,197.8,1,1,1,0
|
||||
7=colWASTE,1,1,1,1,1,4,1,1,0
|
||||
|
||||
[DG_PartInRawPartList_BEAM]
|
||||
0=colPDN,0,0,0,1,33.68,1,1,1,0
|
||||
1=colCALC,0,0,0,0,22.05,1,1,1,0
|
||||
2=colNAM,0,0,0,1,65,1,1,1,0
|
||||
3=colW,0,0,0,1,52.2,1,1,1,0
|
||||
4=colH,0,0,0,1,52.2,1,1,1,0
|
||||
5=colL,0,0,0,1,49,1,1,1,0
|
||||
6=colOFFSET,0,0,0,0,361,1,0,0
|
||||
7=colMATERIAL,0,0,0,1,20,1,1,1,0
|
||||
8=colGROUP,0,1,0,1,122.6,1,1,0,0
|
||||
9=colSTOREY,0,1,0,1,1,4,1,0,0
|
||||
|
||||
[DG_PartInRawPartList_WALL]
|
||||
0=colPDN,0,0,0,1,33.68,1,1,1,0
|
||||
1=colCALC,0,0,0,0,22.05,1,1,1,0
|
||||
2=colNAM,0,0,0,1,65,1,1,1,0
|
||||
3=colW,0,0,0,1,52.2,1,1,1,0
|
||||
4=colH,0,0,0,1,52.2,1,1,1,0
|
||||
5=colL,0,0,0,1,49,1,1,1,0
|
||||
6=colROT,0,0,0,0,105.6,1,1,0,0
|
||||
7=colFLIP,0,0,0,0,197.8,1,1,0,0
|
||||
8=colPOSX,0,0,0,0,43.216477,1,1,0,0
|
||||
9=colPOSY,0,0,0,0,43.216477,1,1,0,0
|
||||
10=colMATERIAL,0,0,0,1,20,1,1,1,0
|
||||
11=colGROUP,0,0,0,1,131.6,1,1,0,0
|
||||
12=colSTOREY,0,0,0,1,1,4,1,0,0
|
||||
|
||||
[DG_PartList]
|
||||
0=colPDN,0,0,1,1,35.28,1,1,0,1
|
||||
1=colCALC,0,1,0,1,41.68,1,1,0,0
|
||||
2=colDO,0,0,0,0,24.08,1,1,0,0
|
||||
3=colW,0,1,0,1,39.88,1,1,0,0
|
||||
4=colH,0,1,0,1,34.48,1,1,0,0
|
||||
5=colL,0,1,0,1,45.08,1,1,0,0
|
||||
6=colNAM,0,1,0,1,72.68,1,1,0,0
|
||||
7=colMATERIAL,0,1,0,1,61.68,1,1,0,0
|
||||
8=colCNT,0,1,0,1,35.88,1,1,0,0
|
||||
9=colADDED,0,1,0,0,26.68,1,1,0,0
|
||||
10=colINPROD,0,1,0,1,28.48,1,1,0,0
|
||||
11=colDONE,0,1,0,1,30,1,1,0,0
|
||||
12=colGROUP,0,0,0,1,126.6,1,1,0,0
|
||||
13=colSTOREY,0,1,0,1,66.455633,1,1,0,0
|
||||
|
||||
[DG_FeatureInPartInRawPartList]
|
||||
0=colDO,0,0,0,0,30.4,1,1,0,0
|
||||
1=colCALC,0,0,0,0,28.8,1,1,0,0
|
||||
2=colDESC,0,0,0,1,1,4,1,0,0
|
||||
|
||||
[DG_Statistics]
|
||||
0=colPDN,0,0,0,1,35.28,1,1,0
|
||||
1=colW,0,0,0,1,41.68,1,1,0
|
||||
2=colH,0,0,0,1,44.08,1,1,0
|
||||
3=colL,0,0,0,1,48.08,1,1,0
|
||||
4=colDESC,0,0,0,1,285.28,1,1,0
|
||||
5=colMATERIAL,0,0,0,1,63.68,1,1,0
|
||||
6=colCNT,0,0,0,1,54.88,1,1,0
|
||||
7=colADDED,0,0,0,0,55.68,1,1,0
|
||||
8=colINPROD,0,0,0,1,84.48,1,1,0
|
||||
9=colDONE,0,0,0,1,56,1,1,0
|
||||
10=colUNITVOLUME,0,0,0,1,108,1,1,0
|
||||
11=colTOTVOLUME,0,0,0,1,114.08,1,1,0
|
||||
12=colUNITTIME,0,0,0,1,98.08,1,1,0
|
||||
13=colTOTTIME,0,0,0,1,57.6,4,1,0
|
||||
|
||||
[DG_OptimizerStatistics]
|
||||
0=colNAME,0,0,0,1,39.28,1,1,0
|
||||
1=colW,0,0,0,1,69.68,1,1,0
|
||||
2=colH,0,0,0,1,70.48,1,1,0
|
||||
3=colL,0,0,0,1,64.08,1,1,0
|
||||
4=colMATERIAL,0,0,0,1,248.48,1,1,0
|
||||
5=colUSAGE,0,0,0,1,268.48,1,1,0
|
||||
6=colWASTE,0,0,0,1,248.72,1,1,0
|
||||
7=colUNITTIME,0,0,0,1,98.08,4,1,0
|
||||
|
||||
[DG_RawPartStatistics]
|
||||
0=colW,0,0,0,1,69.68,1,1,0
|
||||
1=colH,0,0,0,1,70.48,1,1,0
|
||||
2=colL,0,0,0,1,64.08,1,1,0
|
||||
3=colMATERIAL,0,0,0,1,248.48,4,1,0
|
||||
4=colQTY,0,0,0,1,98.08,1,1,0
|
||||
|
||||
[DG_BeamMachinings]
|
||||
0=colON,0,0,0,0,29.6,1,1,0,0
|
||||
1=colNAME,0,0,0,0,211.2,1,1,0,0
|
||||
2=colTYPE,0,0,0,0,1,4,1,0,0
|
||||
|
||||
[DG_RawPartList_SUPERVISOR]
|
||||
0=colNAME,0,0,0,1,33.8,1,1,0,0
|
||||
1=colPRODUCE,0,0,0,0,28,1,1,0,0
|
||||
2=colCALC,0,0,0,0,26.4,1,1,0,0
|
||||
3=colPRODUCTION,0,0,0,0,24.8,1,1,0,0
|
||||
4=colSTARTCUT,0,0,0,1,66.4,1,1,0,0
|
||||
5=colW,0,0,0,1,52.2,1,1,0,0
|
||||
6=colH,0,0,0,1,47.52,1,1,0,0
|
||||
7=colL,0,0,0,1,43.52,1,1,0,0
|
||||
8=colMATERIAL,0,0,0,1,69.72,1,1,0,0
|
||||
9=colUSAGE,0,0,0,1,68.32,1,1,0,0
|
||||
10=colWASTE,0,0,0,1,1,4,1,0,0
|
||||
|
||||
[DG_PartInRawPartList_SUPERVISOR]
|
||||
0=colREDO,0,0,0,0,28.8,1,0,0
|
||||
1=colPDN,0,0,0,1,24.32,1,1,0,0
|
||||
2=colCALC,0,0,0,0,22.05,1,1,0,0
|
||||
3=colPRODUCTION,0,0,0,0,22.05,1,1,0,0
|
||||
4=colNAM,0,0,1,1,47.52,1,1,0,0
|
||||
5=colW,0,0,0,1,41.12,1,1,0,0
|
||||
6=colH,0,0,0,1,38.72,1,1,0,0
|
||||
7=colL,0,0,0,1,40.32,1,1,0,0
|
||||
8=colOFFSET,0,0,0,1,361,1,0,0
|
||||
9=colROT,0,0,0,1,105.6,1,1,0,0
|
||||
10=colFLIP,0,0,0,1,197.8,1,1,0,0
|
||||
11=colPOSX,0,0,0,1,43.216477,1,1,0,0
|
||||
12=colPOSY,0,0,0,1,43.216477,1,1,0,0
|
||||
13=colMATERIAL,0,0,1,1,20,1,1,0,0
|
||||
14=colGROUP,0,1,0,1,65.6,1,1,0,0
|
||||
15=colSTOREY,0,1,0,1,471.6,1,1,0,0
|
||||
|
||||
;[DG_PartInRawPartList_SUPERVISOR]
|
||||
;0=colPDN,0,0,0,1,33.68,1,1,0
|
||||
;1=colCALC,0,0,0,0,22.05,1,1,0
|
||||
;2=colNAM,0,0,1,1,65,1,1,0
|
||||
;3=colW,0,0,0,1,52.2,1,1,0
|
||||
;4=colH,0,0,0,1,52.2,1,1,0
|
||||
;5=colL,0,0,0,1,49,1,1,0
|
||||
;6=colROTATED,0,0,0,1,49,1,1,0
|
||||
;7=colINVERTED,0,0,0,1,49,1,1,0
|
||||
;8=colPOSX,0,0,0,1,49,1,1,0
|
||||
;9=colOFFSET,0,0,0,1,361,1,1,0
|
||||
;10=colMATERIAL,0,0,1,1,43.216477,4,1,0
|
||||
|
||||
[DG_FeatureInPartInRawPartList_SUPERVISOR]
|
||||
0=colREDO,0,0,0,0,28.8,1,1,0,0
|
||||
1=colCALC,0,0,0,0,28.8,1,1,0,0
|
||||
2=colDESC,0,0,0,1,0.606414,4,1,0
|
||||
|
||||
[DG_ParameterList_P]
|
||||
0=colNAME,0,0,0,1,48,1,1,0,0
|
||||
1=colDESC,0,0,0,1,607.2,1,1,0,0
|
||||
2=colVALUE,0,0,0,0,70.6,1,1,0,0
|
||||
3=colMIN,0,0,0,1,69.8,1,1,0,0
|
||||
4=colMAX,0,0,0,1,1,4,1,0,0
|
||||
|
||||
[DG_ParameterList_Q]
|
||||
0=colCUSTOM,0,0,0,0,52,1,1,0,0
|
||||
1=colNAME,0,0,0,1,46.4,1,1,0,0
|
||||
2=colDESC,0,0,0,1,572,1,1,0,0
|
||||
3=colVALUE,0,0,0,0,61.8,1,1,0,0
|
||||
4=colMIN,0,0,0,1,63.4,1,1,0,0
|
||||
5=colMAX,0,0,0,1,1,4,1,0,0
|
||||
|
||||
[DG_DuploParameterList_Q]
|
||||
0=colNAME,0,0,0,1,100,1,1,0,0
|
||||
1=colDESC,0,0,0,1,200,1,1,0,0
|
||||
2=colVALUE,0,0,0,0,100,1,1,0,0
|
||||
3=colMIN,0,0,0,1,100,1,1,0,0
|
||||
4=colMAX,0,0,0,1,20,1,1,0,0
|
||||
|
||||
[DG_SParamList_BEAM]
|
||||
0=colACTIVE,0,0,0,0,20,1,1,0,0
|
||||
1=colSECTXMAT,0,0,0,0,124.32,1,1,0,0
|
||||
2=colL,0,0,0,0,41.12,1,1,0,0
|
||||
3=colQTY,0,0,0,0,1,4,1,0,0
|
||||
|
||||
[DG_SParamList_WALL]
|
||||
0=colACTIVE,0,0,0,0,20,1,1,0,0
|
||||
1=colSECTXMAT,0,0,1,0,124.32,1,1,0,1
|
||||
2=colW,0,0,1,0,40.32,1,1,0,0
|
||||
3=colL,0,0,1,0,40.32,1,1,0,0
|
||||
4=colQTY,0,0,1,0,1,4,1,0,0
|
||||
|
||||
[DG_SectXMatList_BEAM]
|
||||
0=colSECTXMAT,1,1,1,0,149.12,1,1,0
|
||||
1=colALIAS,0,1,1,0,67.52,1,1,0
|
||||
2=colL,0,1,1,0,67.52,1,1,0
|
||||
3=colMATERIAL,0,1,1,0,134.72,1,1,0
|
||||
4=colQTY,0,1,1,0,70.32,4,1,0
|
||||
|
||||
[DG_SectXMatList_WALL]
|
||||
0=colSECTXMAT,1,1,1,0,128.896,1,1,0
|
||||
1=colALIAS,0,1,0,0,61.92,1,1,0
|
||||
2=colW,0,1,1,0,67.84,1,1,0
|
||||
3=colL,0,1,1,0,65.92,1,1,0
|
||||
4=colMATERIAL,0,1,0,0,102.72,1,1,0
|
||||
5=colQTY,0,1,1,0,90.32,4,1,0
|
||||
|
||||
[DG_VariablesList]
|
||||
0=colNAME,0,0,0,0,146.52,1,1,0
|
||||
1=colVARPATH,0,0,0,0,278.4,1,1,0
|
||||
2=colTYPE,0,0,0,0,30,4,1,0
|
||||
|
||||
[DG_MDICommands]
|
||||
0=colCOMMAND,0,0,0,0,146.52,1,1,0
|
||||
1=colDESCRIPTION,0,0,0,0,278.4,4,1,0
|
||||
|
||||
[DG_UpdateBTLPartList]
|
||||
0=colPDN,1,1,0,0,60.45,1,1,1,0
|
||||
1=colNAM,1,1,0,0,249.25,1,1,1,0
|
||||
2=colINSERT,1,1,0,1,81.87,1,1,1,0
|
||||
|
||||
;[DG_ParameterList]
|
||||
;0=colCUSTOM,0,0,0,0,29.6,1,1,0
|
||||
;1=colNAME,0,0,0,1,211.2,1,1,0
|
||||
;2=colDESC,0,0,0,1,0.606414,4,1,0
|
||||
;3=colVALUE,0,0,0,0,52.2,1,1,0
|
||||
;4=colMIN,0,0,0,1,52.2,1,1,0
|
||||
;5=colMAX,0,0,0,1,49,4,1,0
|
||||
|
||||
;[DG_QParamList]
|
||||
;0=colNAME,0,0,0,1,33.68,1,1,0
|
||||
;1=colDESC,0,0,0,0,22.05,1,1,0
|
||||
;2=colDEFAULT,0,0,0,0,52.2,1,1,0
|
||||
;3=colMIN,0,0,0,1,52.2,1,1,0
|
||||
;4=colMAX,0,0,0,1,49,4,1,0
|
||||
@@ -0,0 +1,43 @@
|
||||
; Index, DimensionType (0 = COLUMN, 1 = ROW), GridLength, GridUnitType (1 = Pixel, 2 = Star)
|
||||
|
||||
[Project_View]
|
||||
0=0,0,513.655633,2
|
||||
1=2,0,1465.744367,2
|
||||
2=1,1,702.223627,2
|
||||
3=3,1,310.816373,2
|
||||
|
||||
[Project_Optimizer]
|
||||
0=0,0,388.767822,2
|
||||
1=2,0,1450.232178,2
|
||||
2=1,1,447.275899,2
|
||||
3=3,1,493.764101,2
|
||||
|
||||
[LeftPanel_View]
|
||||
0=1,1,323.337225,2
|
||||
1=3,1,304.822775,2
|
||||
|
||||
[LeftPanel_Optimizer]
|
||||
0=1,1,371.895729,2
|
||||
1=3,1,256.264271,2
|
||||
|
||||
[TopPanel_Optimizer]
|
||||
0=0,0,761.9,2
|
||||
1=2,0,325.966667,2
|
||||
2=0,1,267.710343,2
|
||||
3=2,1,227.053758,2
|
||||
4=0,1,354.635738,2
|
||||
5=2,1,94.635738,2
|
||||
|
||||
[LeftPanel_Supervisor]
|
||||
0=1,1,168,2
|
||||
1=3,1,200.24,2
|
||||
|
||||
[Project_Supervisor]
|
||||
0=0,0,627.390489,2
|
||||
1=2,0,517.609511,2
|
||||
|
||||
;[Project_View]
|
||||
;0=0,0,339,1
|
||||
;1=2,0,1,2
|
||||
;2=1,1,342.52,2
|
||||
;3=3,1,341.52,2
|
||||
@@ -0,0 +1,112 @@
|
||||
; Commento per evitare BOM con UTF-8
|
||||
[General]
|
||||
Debug=5
|
||||
Licence=Key-000335-EgtBeamWall-Carlo Baronchelli_OK.lic
|
||||
UserLevel=1
|
||||
MaxInstances=1
|
||||
Instances=0
|
||||
MaxCamInstances=4
|
||||
CommandLog=1
|
||||
Messages=Italiano
|
||||
WinPlace=1,-1791,220,1986,1152
|
||||
LastImpDir=E:\EGALWARE\ProgramData\BeamWall
|
||||
Support=support@egaltech.com
|
||||
LastProj=C:\ProgramData\Egaltech\EgtBeamWall\Projs\0001\0001.nge
|
||||
Warehouse=2
|
||||
UserName=Utente Windows
|
||||
ViewOptimInstances=1
|
||||
|
||||
[Languages]
|
||||
Count=2
|
||||
Language1=Italiano,EgalTechIta.txt
|
||||
Language2=English,EgalTechEng.txt
|
||||
Language3=Francais,EgalTechFra.txt
|
||||
Language4=Deutsch,EgalTechDeu.txt
|
||||
Language5=Espagnol,EgalTechEsp.txt
|
||||
Language6=Portugues,EgalTechPor.txt
|
||||
|
||||
[Lua]
|
||||
LibsDir=C:\ProgramData\EgalTech\EgtBeamWall\LuaLibs
|
||||
BaseLib=EgtBase
|
||||
|
||||
[GeomDB]
|
||||
DefaultFont=ModernPropS.Nfe
|
||||
NfeFontDir=C:\ProgramData\EgalTech\EgtBeamWall\Fonts
|
||||
DefaultColor=128,0,0
|
||||
SaveType=2 ; 0=testo, 1=binario, 2=testo compresso
|
||||
SurfTmToler=0.05
|
||||
|
||||
[OpenGL]
|
||||
DoubleBuffer=1
|
||||
ColorBits=32
|
||||
DepthBits=24
|
||||
Driver=3 ; 1=software, 2=OldWay, 3=NewWay
|
||||
|
||||
[Scene]
|
||||
BackTop=176,208,210
|
||||
BackBottom=145,177,196
|
||||
ShowGFrame=1
|
||||
Mark=255,255,0
|
||||
SelSurf=255,64,64
|
||||
ShowMode=2
|
||||
CurveDir=0
|
||||
ShowTriaAdv=1
|
||||
ShowZmap=9 ; +1=surf, +2=lines, +4=normals, +8=più colori
|
||||
TextureMaxLinPixels=2048
|
||||
ZoomWin=0,255,255,255,30
|
||||
DistLine=255,0,0
|
||||
MmUnits=1
|
||||
LineWidth=1
|
||||
ShowBuilding=0
|
||||
|
||||
[Grid]
|
||||
DrawShowGrid=1
|
||||
MachiningShowGrid=0
|
||||
ShowFrame=1
|
||||
SnapStep=15
|
||||
SnapStepInch=25.4
|
||||
MinLineSStep=1
|
||||
MajLineSStep=10
|
||||
ExtSStep=100
|
||||
MinLnColor=153,153,153
|
||||
MajLnColor=153,153,153
|
||||
|
||||
[Import]
|
||||
BtlFlag=8 ; +1=FlatPos +2=VertPos +4=SpecialTrim +8=TS3Pos +16=Sort +32=UserAttr +64=OutlineFlatPos
|
||||
WallBtlFlag=64
|
||||
|
||||
[Beam]
|
||||
CalcPath=C:\Program Files (x86)\Egaltech\EgtCAM5\EgtCAM5R32.exe
|
||||
BaseDir=C:\ProgramData\Egaltech\EgtCAM5\Beam
|
||||
BweExec=BatchProcessNew.lua
|
||||
|
||||
[Wall]
|
||||
CalcPath=C:\Program Files (x86)\Egaltech\EgtCAM5\EgtCAM5R32.exe
|
||||
;BaseDir=C:\ProgramData\Egaltech\EgtCAM5\Wall
|
||||
BaseDir=C:\ProgramData\Egaltech\Progetto Restyling Wall\Wall
|
||||
BweExec=BatchProcessNew.lua
|
||||
|
||||
[Nest]
|
||||
NestExec=NestProcess.lua
|
||||
FlipRot=NestFlipAndRotate.lua
|
||||
NestDir=C:\ProgramData\Egaltech\EgtCAM5\Wall
|
||||
LDIntersOther=0
|
||||
MinScore=0
|
||||
|
||||
[Mach]
|
||||
MachinesDir=C:\EgtData\Machines
|
||||
ToolMakersDir=C:\ProgramData\Egaltech\EgtCAM5\ToolMakers
|
||||
CurrMach=Essetre-90480027
|
||||
SupervisorMach=
|
||||
|
||||
[DimensionStyle]
|
||||
TextHeight=30
|
||||
[MruProjFiles]
|
||||
File1=C:\ProgramData\Egaltech\EgtBeamWall\Projs\0001\0001.nge
|
||||
File2=
|
||||
File3=
|
||||
File4=
|
||||
File5=
|
||||
File6=
|
||||
File7=
|
||||
File8=
|
||||
@@ -0,0 +1,13 @@
|
||||
; Commento per evitare BOM con UTF-8
|
||||
[Licence]
|
||||
Customer=Key-000335-EgtBeamWall-Carlo Baronchelli
|
||||
LockId=EGTECH-000335-oOoCcE
|
||||
Product=5327
|
||||
Ver=2404
|
||||
Lev=1
|
||||
ExpDays=19388
|
||||
Opt1=175
|
||||
Opt2=27
|
||||
OptExpDays=19388
|
||||
Key=+lTlApqOYxxY9skEbspi7pcOGOMzlIvMXW/WIb34Y3XJpjnK
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
; Commento per evitare BOM con UTF-8
|
||||
[Licence]
|
||||
Customer=Key-000335-EgtBeamWall-Carlo Baronchelli
|
||||
LockId=EGTECH-000335-oOoCcE
|
||||
Product=5327
|
||||
Ver=2401
|
||||
Lev=1
|
||||
ExpDays=19388
|
||||
Opt1=687
|
||||
Opt2=11
|
||||
OptExpDays=19388
|
||||
Key=tTLnO5c9Ky4IitnioXwE8LVP7nsnpyj5AFMeyG3chcCJOqpZ
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
; Commento per evitare BOM con UTF-8
|
||||
[Data]
|
||||
DataRoot=C:\ProgramData\Egaltech\EgtCAM5
|
||||
@@ -0,0 +1,313 @@
|
||||
-- EgtBBox3d.lua by EgalTech s.r.l. 2021/12/26
|
||||
|
||||
-- Tavola per definizione modulo (serve ma non usata)
|
||||
local EgtBBox3d = {}
|
||||
|
||||
EgtOutLog( 'EgtBBox3d started', 1)
|
||||
|
||||
-- Include
|
||||
require( 'EgtPoint3d')
|
||||
--EnableDebug( false)
|
||||
|
||||
|
||||
-- Definizione classe BBox3d
|
||||
BBox3d = {{},{}}
|
||||
BBox3d.__index = BBox3d
|
||||
|
||||
-- funzione di utilita' per identificazione tipo
|
||||
function isBBox3d( a)
|
||||
return ( getmetatable( a) == BBox3d)
|
||||
end
|
||||
|
||||
local function New( a, b)
|
||||
local b3d = setmetatable( {{GEO.INFINITO,GEO.INFINITO,GEO.INFINITO},{-GEO.INFINITO,-GEO.INFINITO,-GEO.INFINITO}}, BBox3d)
|
||||
if not a then
|
||||
b3d[1] = Point3d( GEO.INFINITO, GEO.INFINITO, GEO.INFINITO)
|
||||
b3d[2] = Point3d( -GEO.INFINITO, -GEO.INFINITO, -GEO.INFINITO)
|
||||
elseif isBBox3d( a) then
|
||||
b3d[1] = Point3d( a[1])
|
||||
b3d[2] = Point3d( a[2])
|
||||
elseif isBBox3d( a) and isBBox3d( b) then
|
||||
b3d[1] = Point3d( a[1])
|
||||
b3d[2] = Point3d( a[2])
|
||||
BBox3d.AddPoint( b3d, b[1])
|
||||
BBox3d.AddPoint( b3d, b[2])
|
||||
elseif type(a) == 'table' and #a >= 2 and
|
||||
type(a[1]) == 'table' and #a[1] >= 3 and
|
||||
type(a[2]) == 'table' and #a[2] >= 3 then
|
||||
b3d[1] = Point3d( GEO.INFINITO, GEO.INFINITO, GEO.INFINITO)
|
||||
b3d[2] = Point3d( -GEO.INFINITO, -GEO.INFINITO, -GEO.INFINITO)
|
||||
if a[1][1] < ( a[2][1] + GEO.EPS_SMALL) and
|
||||
a[1][2] < ( a[2][2] + GEO.EPS_SMALL) and
|
||||
a[1][3] < ( a[2][3] + GEO.EPS_SMALL) then
|
||||
BBox3d.AddPoint( b3d, a[1])
|
||||
BBox3d.AddPoint( b3d, a[2])
|
||||
end
|
||||
elseif isPoint3d( a) and isPoint3d( b) then
|
||||
b3d[1] = Point3d(GEO.INFINITO,GEO.INFINITO,GEO.INFINITO)
|
||||
b3d[2] = Point3d(-GEO.INFINITO,-GEO.INFINITO,-GEO.INFINITO)
|
||||
BBox3d.AddPoint( b3d, a)
|
||||
BBox3d.AddPoint( b3d, b)
|
||||
elseif isPoint3d( a) then
|
||||
b3d[1] = Point3d(GEO.INFINITO,GEO.INFINITO,GEO.INFINITO)
|
||||
b3d[2] = Point3d(-GEO.INFINITO,-GEO.INFINITO,-GEO.INFINITO)
|
||||
BBox3d.AddPoint( b3d, a)
|
||||
else
|
||||
error( 'A parameter is wrong', 2)
|
||||
end
|
||||
return b3d
|
||||
end
|
||||
|
||||
setmetatable( BBox3d, { __call = function( _, ...) return New( ...) end })
|
||||
|
||||
-- verifico se vuoto
|
||||
function BBox3d:isEmpty()
|
||||
-- il minimo non è minore del massimo
|
||||
return not ( self[1][1] < ( self[2][1] + GEO.EPS_SMALL) and
|
||||
self[1][2] < ( self[2][2] + GEO.EPS_SMALL) and
|
||||
self[1][3] < ( self[2][3] + GEO.EPS_SMALL) )
|
||||
end
|
||||
|
||||
-- somma di due box (+)
|
||||
function BBox3d.__add( a, b)
|
||||
if isBBox3d( a) and isBBox3d( b) then
|
||||
return New( a, b)
|
||||
else
|
||||
error( 'A parameter is not a BBox3d', 2)
|
||||
end
|
||||
end
|
||||
|
||||
-- aggiungo box o punto
|
||||
function BBox3d:Add( a)
|
||||
if isBBox3d( a) then
|
||||
if not a:isEmpty() then
|
||||
self:AddPoint( a[1])
|
||||
self:AddPoint( a[2])
|
||||
end
|
||||
else
|
||||
self:AddPoint( a)
|
||||
end
|
||||
end
|
||||
|
||||
-- aggiungo un punto (solo per uso interno)
|
||||
function BBox3d:AddPoint( ptP)
|
||||
if ptP[1] < self[1][1] then
|
||||
self[1][1] = ptP[1]
|
||||
end
|
||||
if ptP[2] < self[1][2] then
|
||||
self[1][2] = ptP[2]
|
||||
end
|
||||
if ptP[3] < self[1][3] then
|
||||
self[1][3] = ptP[3]
|
||||
end
|
||||
if ptP[1] > self[2][1] then
|
||||
self[2][1] = ptP[1]
|
||||
end
|
||||
if ptP[2] > self[2][2] then
|
||||
self[2][2] = ptP[2]
|
||||
end
|
||||
if ptP[3] > self[2][3] then
|
||||
self[2][3] = ptP[3]
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
-- espansione isotropa
|
||||
function BBox3d:expand( dDelta)
|
||||
if not isBBox3d( self) then
|
||||
return false
|
||||
end
|
||||
if BBox3d.isEmpty(self) then
|
||||
return true
|
||||
end
|
||||
self[1][1] = self[1][1] - dDelta
|
||||
self[1][2] = self[1][2] - dDelta
|
||||
self[1][3] = self[1][3] - dDelta
|
||||
self[2][1] = self[2][1] + dDelta
|
||||
self[2][2] = self[2][2] + dDelta
|
||||
self[2][3] = self[2][3] + dDelta
|
||||
end
|
||||
|
||||
-- traslazione
|
||||
function BBox3d:move( m)
|
||||
if not isBBox3d( self) then
|
||||
return false
|
||||
end
|
||||
if BBox3d.isEmpty(self) then
|
||||
return true
|
||||
end
|
||||
if isVector3d( m) or ( type( m) == 'table' and #m >= 3) then
|
||||
self[1][1] = self[1][1] + m[1]
|
||||
self[1][2] = self[1][2] + m[2]
|
||||
self[1][3] = self[1][3] + m[3]
|
||||
self[2][1] = self[2][1] + m[1]
|
||||
self[2][2] = self[2][2] + m[2]
|
||||
self[2][3] = self[2][3] + m[3]
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function BBox3d:rotate( ptAx, vtAx, dAngDeg)
|
||||
if not isBBox3d( self) or not isPoint3d( ptAx) or not isVector3d( vtAx) or type( dAngDeg) ~= 'number' then
|
||||
return false
|
||||
end
|
||||
if BBox3d.isEmpty(self) then
|
||||
return true
|
||||
end
|
||||
local bOk, b3New = EgtBBoxRotate( self, ptAx, vtAx, dAngDeg)
|
||||
if bOk then
|
||||
self[1] = Point3d( b3New[1])
|
||||
self[2] = Point3d( b3New[2])
|
||||
end
|
||||
return bOk
|
||||
end
|
||||
|
||||
-- trasformazione di riferimento verso globale
|
||||
function BBox3d:toGlob( fTool)
|
||||
if not isBBox3d( self) or not isFrame3d( fTool) then
|
||||
return false
|
||||
end
|
||||
if BBox3d.isEmpty(self) then
|
||||
return true
|
||||
end
|
||||
local bOk, b3New = EgtBBoxToGlob( self, fTool)
|
||||
if bOk then
|
||||
self[1] = Point3d( b3New[1])
|
||||
self[2] = Point3d( b3New[2])
|
||||
end
|
||||
return bOk
|
||||
end
|
||||
|
||||
-- trasformazione di riferimento verso locale
|
||||
function BBox3d:toLoc( fTool)
|
||||
if not isBBox3d( self) or not isFrame3d( fTool) then
|
||||
return false
|
||||
end
|
||||
if BBox3d.isEmpty(self) then
|
||||
return true
|
||||
end
|
||||
local bOk, b3New = EgtBBoxToLoc( self, fTool)
|
||||
if bOk then
|
||||
self[1] = Point3d( b3New[1])
|
||||
self[2] = Point3d( b3New[2])
|
||||
end
|
||||
return bOk
|
||||
end
|
||||
|
||||
-- trasformazione di riferimento da locale a locale
|
||||
function BBox3d:locToLoc( fOri, fDest)
|
||||
if not isBBox3d( self) or not isFrame3d( fOri) or not isFrame3d( fDest) then
|
||||
return false
|
||||
end
|
||||
if BBox3d.isEmpty(self) then
|
||||
return true
|
||||
end
|
||||
local bOk, b3New = EgtBBoxLocToLoc( self, fOri, fDest)
|
||||
if bOk then
|
||||
self[1] = Point3d( b3New[1])
|
||||
self[2] = Point3d( b3New[2])
|
||||
end
|
||||
return bOk
|
||||
end
|
||||
|
||||
-- restituzione componenti
|
||||
function BBox3d:getMin()
|
||||
if BBox3d.isEmpty(self) then
|
||||
return nil
|
||||
end
|
||||
return Point3d( self[1])
|
||||
end
|
||||
|
||||
function BBox3d:getMax()
|
||||
if BBox3d.isEmpty(self) then
|
||||
return nil
|
||||
end
|
||||
return Point3d( self[2])
|
||||
end
|
||||
|
||||
function BBox3d:getDimX()
|
||||
if BBox3d.isEmpty(self) then
|
||||
return nil
|
||||
end
|
||||
return ( self[2][1] - self[1][1])
|
||||
end
|
||||
|
||||
function BBox3d:getDimY()
|
||||
if BBox3d.isEmpty(self) then
|
||||
return nil
|
||||
end
|
||||
return ( self[2][2] - self[1][2])
|
||||
end
|
||||
|
||||
function BBox3d:getDimZ()
|
||||
if BBox3d.isEmpty(self) then
|
||||
return nil
|
||||
end
|
||||
return ( self[2][3] - self[1][3])
|
||||
end
|
||||
|
||||
function BBox3d:getCenter()
|
||||
if BBox3d.isEmpty(self) then
|
||||
return nil
|
||||
end
|
||||
return 0.5 * ( Point3d( self[1]) + Point3d( self[2]))
|
||||
end
|
||||
|
||||
function BBox3d:getRadius()
|
||||
if BBox3d.isEmpty(self) then
|
||||
return nil
|
||||
end
|
||||
return 0.5 * dist( Point3d( self[1]), Point3d( self[2]))
|
||||
end
|
||||
|
||||
-- conversione in stringa (tostring)
|
||||
function BBox3d:__tostring()
|
||||
if BBox3d.isEmpty(self) then
|
||||
return '(empty)'
|
||||
end
|
||||
return '('.. tostring(self[1])..','..tostring(self[2])..')'
|
||||
end
|
||||
|
||||
-- verifica che il box includa il punto in XY
|
||||
function EnclosesPointXY( b3Box, ptP)
|
||||
if b3Box[2][1] < ptP[1] - GEO.EPS_SMALL or b3Box[1][1] > ptP[1] + GEO.EPS_SMALL then
|
||||
return false
|
||||
end
|
||||
if b3Box[2][2] < ptP[2] - GEO.EPS_SMALL or b3Box[1][2] > ptP[2] + GEO.EPS_SMALL then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
-- verifica che il primo box includa il secondo in XY
|
||||
function EnclosesXY( b3First, b3Second)
|
||||
if not isBBox3d( b3First) or not isBBox3d( b3Second) then
|
||||
return false
|
||||
end
|
||||
if BBox3d.isEmpty( b3First) or BBox3d.isEmpty( b3Second) then
|
||||
return false
|
||||
end
|
||||
return EnclosesPointXY( b3First, b3Second:getMin()) and EnclosesPointXY( b3First, b3Second:getMax())
|
||||
end
|
||||
|
||||
-- verifica di interferenza tra due box in XY
|
||||
function OverlapsXY( b3First, b3Second)
|
||||
if not isBBox3d( b3First) or not isBBox3d( b3Second) then
|
||||
return false
|
||||
end
|
||||
if BBox3d.isEmpty( b3First) or BBox3d.isEmpty( b3Second) then
|
||||
return false
|
||||
end
|
||||
if b3First[2][1] < b3Second[1][1] - GEO.EPS_SMALL or b3First[1][1] > b3Second[2][1] + GEO.EPS_SMALL then
|
||||
return false
|
||||
end
|
||||
if b3First[2][2] < b3Second[1][2] - GEO.EPS_SMALL or b3First[1][2] > b3Second[2][2] + GEO.EPS_SMALL then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
return EgtBBox3d
|
||||
@@ -0,0 +1,647 @@
|
||||
-- EgtLib.lua libreria di base EgalTech per Lua 2022/04/12
|
||||
-- 2019/12/04 EgtTestBreak interruzione se valore 1.
|
||||
-- 2020/06/04 Aggiunta funzione EgtCurveIsACircle.
|
||||
-- 2020/06/16 Aggiunta funzione EgtSurfTmGetFacetBBoxRef.
|
||||
-- 2021/11/27 Aggiunta funzione EgtClamp.
|
||||
-- 2022/04/12 Aggiunta funzione EgtGetValInNotes.
|
||||
|
||||
-- Tavola per definizione modulo (serve ma non usata)
|
||||
local EgtBase = {}
|
||||
|
||||
EgtOutLog( 'EgtBase started', 1)
|
||||
|
||||
-- Funzioni del package matematico rese globali e con angoli in gradi
|
||||
abs = math.abs
|
||||
fmod = math.fmod
|
||||
floor = math.floor
|
||||
ceil = math.ceil
|
||||
min = math.min
|
||||
max = math.max
|
||||
huge = math.huge
|
||||
modf = math.modf
|
||||
sqrt = math.sqrt
|
||||
pow = function( x, y) return x ^ y end
|
||||
exp = math.exp
|
||||
log = math.log
|
||||
log10 = function( x) return math.log( x, 10) end
|
||||
ldexp = function( x, exp) return x * 2.0 ^ exp end
|
||||
deg = math.deg
|
||||
rad = math.rad
|
||||
pi = math.pi
|
||||
sin = function( x) return math.sin( math.rad( x)) end
|
||||
cos = function( x) return math.cos( math.rad( x)) end
|
||||
tan = function( x) return math.tan( math.rad( x)) end
|
||||
asin = function( x) return math.deg( math.asin( x)) end
|
||||
acos = function( x) return math.deg( math.acos( x)) end
|
||||
atan = function( y, x) return math.deg( math.atan( y, x)) end
|
||||
atan2 = function( y, x) return math.deg( math.atan( y, x)) end
|
||||
random = math.random
|
||||
randomseed = math.randomseed
|
||||
tointeger = math.tointeger
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
function EgtIf( bCond, Val1, Val2)
|
||||
if bCond then
|
||||
return Val1
|
||||
else
|
||||
return Val2
|
||||
end
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
function EgtClamp( Val, Min, Max)
|
||||
if Min > Max then
|
||||
Min, Max = Max, Min
|
||||
end
|
||||
if Val < Min then
|
||||
return Min
|
||||
elseif Val > Max then
|
||||
return Max
|
||||
else
|
||||
return Val
|
||||
end
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
-- Funzione per protezione variabili e funzioni globali
|
||||
function EgtProtectGlobal()
|
||||
local newgt = {}
|
||||
setmetatable( newgt, {__index = _G,
|
||||
__newindex = function( t, k, v)
|
||||
local k3 = string.sub( k, 1, 3)
|
||||
if k3 == 'Egt' or k3 == 'Emt' or
|
||||
k3 == 'GEO' or k3 == 'GDB' or k3 == 'SCE' or k3 == 'MCH' then
|
||||
error( "attempting to change global "..tostring( k)..' to '..tostring( v), 2)
|
||||
else
|
||||
rawset( t, k, v)
|
||||
end
|
||||
end
|
||||
})
|
||||
return newgt
|
||||
end
|
||||
|
||||
-- Funzione per lancio, se richiesta, predisposizione debug
|
||||
function EgtEnableDebug( bOn)
|
||||
if not bOn then
|
||||
EgtOutLog( 'Release Mode', 1)
|
||||
return true
|
||||
elseif EgtIs64bit() then
|
||||
-- non funziona a 64 bit
|
||||
EgtOutLog( 'Skipped Debug Activation (64bit)')
|
||||
return false
|
||||
else
|
||||
-- carico il modulo opportuno
|
||||
EgtOutLog( 'Debug Mode (32bit)', 1)
|
||||
return require( 'mobdebug').start()
|
||||
end
|
||||
end
|
||||
|
||||
-- Funzione per reset librerie
|
||||
function EgtResetLibs()
|
||||
package.loaded.EgtTest = nil
|
||||
package.loaded.EgtBase = nil
|
||||
package.loaded.EgtConst = nil
|
||||
package.loaded.EgtVector3d = nil
|
||||
package.loaded.EgtPoint3d = nil
|
||||
package.loaded.EgtFrame3d = nil
|
||||
package.loaded.EgtBBox3d = nil
|
||||
package.loaded.EgtColor3d = nil
|
||||
package.loaded.Dimension = nil
|
||||
package.loaded.EgtLinearDimension = nil
|
||||
package.loaded.EmtGenerator = nil
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
-- Funzione per OutLog di tutte le variabili globali
|
||||
function EgtOutLogAllGlobVars()
|
||||
local a = {}
|
||||
for k,v in pairs( _G) do
|
||||
a[#a+1] = k .. " => ".. tostring( v)
|
||||
end
|
||||
table.sort( a)
|
||||
EgtOutLog( 'Global Variables (#' .. #a .. ') :')
|
||||
for _,v in ipairs( a) do
|
||||
EgtOutLog( v)
|
||||
end
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
-- Funzione per avere direttorio del file che lancia la funzione
|
||||
function EgtGetSourceDir( nUp)
|
||||
local nSou = 2
|
||||
if nUp then nSou = nSou + nUp end
|
||||
local info = debug.getinfo( nSou, 'S')
|
||||
local dir = info.source:match("^@?(.-)([^\\/]-%.?([^%.\\/]*))$")
|
||||
return dir
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
-- Funzione per avere direttorio e file che lancia la funzione
|
||||
function EgtGetSourcePath( nUp)
|
||||
local nSou = 2
|
||||
if nUp then nSou = nSou + nUp end
|
||||
local info = debug.getinfo( nSou, 'S')
|
||||
local dir = string.gsub( info.source, '@', '')
|
||||
return dir
|
||||
end
|
||||
|
||||
-- Funzione per accodare path di ricerca librerie lua
|
||||
function EgtAddToPackagePath( path)
|
||||
if not package.path:find( path, 1, true) then
|
||||
if package.path:sub( -1) == ';' then
|
||||
package.path = package.path .. path .. ';'
|
||||
else
|
||||
package.path = package.path .. ';' .. path .. ';'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Funzione per rimuovere direttori macchine da path di ricerca librerie lua
|
||||
function EgtRemoveBaseMachineDirFromPackagePath()
|
||||
local vLibDir = EgtSplitString( _G.package.path, ';')
|
||||
if not vLibDir or #vLibDir == 0 then return end
|
||||
local sBaseMachDir = EgtSplitPath( EgtGetCurrMachineDir() or '')
|
||||
if not sBaseMachDir or #sBaseMachDir == 0 then return end
|
||||
package.path = ''
|
||||
for i = 1, #vLibDir do
|
||||
if #vLibDir[i] > 0 and not vLibDir[i]:find( sBaseMachDir, 1, true) then
|
||||
package.path = package.path .. vLibDir[i] .. ';'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Funzione per dividere Path in Direttorio, NomeFile e Estensione
|
||||
function EgtSplitPath( sPath)
|
||||
local sDir, sFile = string.match(sPath, "(.-)([^\\/]*)$")
|
||||
local sName, sExt
|
||||
if sFile and string.find(sFile,'%.') then
|
||||
sName, sExt = string.match(sFile,'(.*)([%.].-)$')
|
||||
else
|
||||
sName = sFile
|
||||
sExt = ''
|
||||
end
|
||||
return sDir, sName, sExt
|
||||
end
|
||||
|
||||
-- Funzione per cambiare estensione di una Path
|
||||
function EgtChangePathExtension( sPath, sExt)
|
||||
local sFileDir, sFileName, sFileExt = EgtSplitPath( sPath)
|
||||
if string.sub( sExt, 1, 1) == '.' then
|
||||
return sFileDir .. sFileName .. sExt
|
||||
else
|
||||
return sFileDir .. sFileName .. '.' .. sExt
|
||||
end
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
-- Funzioni di trim di stringhe di caratteri
|
||||
function EgtTrimRight( sStr)
|
||||
if not sStr then return nil end
|
||||
return sStr:match( "(.-)%s*$")
|
||||
end
|
||||
function EgtTrimLeft( sStr)
|
||||
if not sStr then return nil end
|
||||
return sStr:match( "^%s*(.*)")
|
||||
end
|
||||
function EgtTrim( sStr)
|
||||
if not sStr then return nil end
|
||||
return sStr:match( "^%s*(.-)%s*$")
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
-- Funzione per aggiungere/togliere coppie chiave/valore da una stringa di note
|
||||
function EgtAdjustNotes( sNotes, sKey, Val)
|
||||
local sNewNotes = ''
|
||||
local vItem = EgtSplitString( sNotes, ';') or {}
|
||||
for i = 1, #vItem do
|
||||
local sItem = EgtTrim( vItem[i])
|
||||
if sItem and #sItem > 0 and not sItem:find( sKey, 1, true) then
|
||||
sNewNotes = sNewNotes .. sItem .. ';'
|
||||
end
|
||||
end
|
||||
if Val and Val ~= '' then
|
||||
sNewNotes = sNewNotes .. EgtSetVal( sKey, Val)
|
||||
end
|
||||
return sNewNotes
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
-- Funzione per recuperare un valore data la chiave da una stringa di note
|
||||
function EgtGetValInNotes( sNotes, sKey, sType)
|
||||
local vItem = EgtSplitString( sNotes, ';') or {}
|
||||
for i = 1, #vItem do
|
||||
local sItem = EgtTrim( vItem[i])
|
||||
if sItem and #sItem > 0 and sItem:find( sKey..'=', 1, true) then
|
||||
return EgtGetVal( sItem, sKey, sType)
|
||||
end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
-- Funzione per creare tabella da primo indice per numero indici consecutivi
|
||||
function EgtTableFill( nStart, nCount)
|
||||
if not nStart or nCount <= 0 then return nil end
|
||||
local T = {}
|
||||
for i = 0,nCount-1 do
|
||||
table.insert( T, nStart+i)
|
||||
end
|
||||
return T
|
||||
end
|
||||
|
||||
-- Funzione per aggiungere a tabella da primo indice per numero indici consecutivi
|
||||
function EgtTableAdd( T, nStart, nCount)
|
||||
if not nStart or nCount <= 0 then return T end
|
||||
for i = 0,nCount-1 do
|
||||
table.insert( T, nStart+i)
|
||||
end
|
||||
return T
|
||||
end
|
||||
|
||||
-- Funzione per unire due tabelle
|
||||
function EgtJoinTables( Ta, Tb)
|
||||
for k, v in ipairs( Tb) do
|
||||
table.insert( Ta, v)
|
||||
end
|
||||
return Ta
|
||||
end
|
||||
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
-- Funzione per aggiornare interfaccia e consentire interruzione esecuzione
|
||||
function EgtTestBreak( nProc, nPause)
|
||||
local nRet = EgtProcessEvents( nProc, nPause)
|
||||
if nRet == 1 then
|
||||
error( "User aborted", 2)
|
||||
end
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
-- Richiamo librerie componenti
|
||||
require( 'EgtConst')
|
||||
require( 'EgtVector3d')
|
||||
require( 'EgtPoint3d')
|
||||
require( 'EgtFrame3d')
|
||||
require( 'EgtBBox3d')
|
||||
require( 'EgtColor3d')
|
||||
|
||||
|
||||
-- Ridefinizione funzioni per ritornare Vector3d
|
||||
local o_EgtGetGridVersZ = EgtGetGridVersZ
|
||||
EgtGetGridVersZ = function(...)
|
||||
local vtV = o_EgtGetGridVersZ(...)
|
||||
if vtV then return Vector3d( vtV) end
|
||||
end
|
||||
local o_EgtSV = EgtSV
|
||||
EgtSV = function(...)
|
||||
local vtV = o_EgtSV(...)
|
||||
if vtV then return Vector3d( vtV) end
|
||||
end
|
||||
local o_EgtEV = EgtEV
|
||||
EgtEV = function(...)
|
||||
local vtV = o_EgtEV(...)
|
||||
if vtV then return Vector3d( vtV) end
|
||||
end
|
||||
local o_EgtMV = EgtMV
|
||||
EgtMV = function(...)
|
||||
local vtV = o_EgtMV(...)
|
||||
if vtV then return Vector3d( vtV) end
|
||||
end
|
||||
local o_EgtUV = EgtUV
|
||||
EgtUV = function(...)
|
||||
local vtV = o_EgtUV(...)
|
||||
if vtV then return Vector3d( vtV) end
|
||||
end
|
||||
local o_EgtET = EgtET
|
||||
EgtET = function(...)
|
||||
local vtV = o_EgtET(...)
|
||||
if vtV then return Vector3d( vtV) end
|
||||
end
|
||||
local o_EgtCurveExtrusion = EgtCurveExtrusion
|
||||
EgtCurveExtrusion = function(...)
|
||||
local vtV = o_EgtCurveExtrusion(...)
|
||||
if vtV then return Vector3d( vtV) end
|
||||
end
|
||||
local o_EgtArcNormVersor = EgtArcNormVersor
|
||||
EgtArcNormVersor = function(...)
|
||||
local vtV = o_EgtArcNormVersor(...)
|
||||
if vtV then return Vector3d( vtV) end
|
||||
end
|
||||
local o_EgtSurfFrNormVersor = EgtSurfFrNormVersor
|
||||
EgtSurfFrNormVersor = function(...)
|
||||
local vtV = o_EgtSurfFrNormVersor(...)
|
||||
if vtV then return Vector3d( vtV) end
|
||||
end
|
||||
local o_EgtSurfTmFacetNormVersor = EgtSurfTmFacetNormVersor
|
||||
EgtSurfTmFacetNormVersor = function(...)
|
||||
local vtV = o_EgtSurfTmFacetNormVersor(...)
|
||||
if vtV then return Vector3d( vtV) end
|
||||
end
|
||||
local o_EgtTextNormVersor = EgtTextNormVersor
|
||||
EgtTextNormVersor = function(...)
|
||||
local vtV = o_EgtTextNormVersor(...)
|
||||
if vtV then return Vector3d( vtV) end
|
||||
end
|
||||
local o_EgtGetCalcToolDirFromAngles = EgtGetCalcToolDirFromAngles
|
||||
EgtGetCalcToolDirFromAngles = function(...)
|
||||
local vtV = o_EgtGetCalcToolDirFromAngles(...)
|
||||
if vtV then return Vector3d( vtV) end
|
||||
end
|
||||
local o_EgtGetCalcAuxDirFromAngles = EgtGetCalcAuxDirFromAngles
|
||||
EgtGetCalcAuxDirFromAngles = function(...)
|
||||
local vtV = o_EgtGetCalcAuxDirFromAngles(...)
|
||||
if vtV then return Vector3d( vtV) end
|
||||
end
|
||||
|
||||
-- Ridefinizione funzioni per ritornare Vector3d e altri parametri
|
||||
local o_EgtCurveIsFlat = EgtCurveIsFlat
|
||||
EgtCurveIsFlat = function(...)
|
||||
local bFlat, vtN, dDist = o_EgtCurveIsFlat(...)
|
||||
if vtN then return bFlat, Vector3d( vtN), dDist end
|
||||
end
|
||||
local o_EgtCurveArea = EgtCurveArea
|
||||
EgtCurveArea = function(...)
|
||||
local vtN, dDist, dArea = o_EgtCurveArea(...)
|
||||
if vtN then return Vector3d( vtN), dDist, dArea end
|
||||
end
|
||||
|
||||
-- Ridefinizione funzioni per ritornare Point3d
|
||||
local o_EgtSP = EgtSP
|
||||
EgtSP = function(...)
|
||||
local ptP = o_EgtSP(...)
|
||||
if ptP then return Point3d( ptP) end
|
||||
end
|
||||
local o_EgtEP = EgtEP
|
||||
EgtEP = function(...)
|
||||
local ptP = o_EgtEP(...)
|
||||
if ptP then return Point3d( ptP) end
|
||||
end
|
||||
local o_EgtMP = EgtMP
|
||||
EgtMP = function(...)
|
||||
local ptP = o_EgtMP(...)
|
||||
if ptP then return Point3d( ptP) end
|
||||
end
|
||||
local o_EgtCP = EgtCP
|
||||
EgtCP = function(...)
|
||||
local ptP = o_EgtCP(...)
|
||||
if ptP then return Point3d( ptP) end
|
||||
end
|
||||
local o_EgtGP = EgtGP
|
||||
EgtGP = function(...)
|
||||
local ptP = o_EgtGP(...)
|
||||
if ptP then return Point3d( ptP) end
|
||||
end
|
||||
local o_EgtUP = EgtUP
|
||||
EgtUP = function(...)
|
||||
local ptP = o_EgtUP(...)
|
||||
if ptP then return Point3d( ptP) end
|
||||
end
|
||||
local o_EgtNP = EgtNP
|
||||
EgtNP = function(...)
|
||||
local ptP = o_EgtNP(...)
|
||||
if ptP then return Point3d( ptP) end
|
||||
end
|
||||
local o_EgtIP = EgtIP
|
||||
EgtIP = function(...)
|
||||
local ptP = o_EgtIP(...)
|
||||
if ptP then return Point3d( ptP) end
|
||||
end
|
||||
local o_EgtCurveCompoCenter = EgtCurveCompoCenter
|
||||
EgtCurveCompoCenter = function(...)
|
||||
local ptP = o_EgtCurveCompoCenter(...)
|
||||
if ptP then return Point3d( ptP) end
|
||||
end
|
||||
local o_EgtGetTableRef = EgtGetTableRef
|
||||
EgtGetTableRef = function(...)
|
||||
local ptP = o_EgtGetTableRef(...)
|
||||
if ptP then return Point3d( ptP) end
|
||||
end
|
||||
local o_EgtGetCalcTipFromPositions = EgtGetCalcTipFromPositions
|
||||
EgtGetCalcTipFromPositions = function(...)
|
||||
local ptP = o_EgtGetCalcTipFromPositions(...)
|
||||
if ptP then return Point3d( ptP) end
|
||||
end
|
||||
local o_EgtGetRawPartCenter = EgtGetRawPartCenter
|
||||
EgtGetRawPartCenter = function(...)
|
||||
local ptP = o_EgtGetRawPartCenter(...)
|
||||
if ptP then return Point3d( ptP) end
|
||||
end
|
||||
local o_EgtGetMachiningStartPoint = EgtGetMachiningStartPoint
|
||||
EgtGetMachiningStartPoint = function(...)
|
||||
local ptP = o_EgtGetMachiningStartPoint(...)
|
||||
if ptP then return Point3d( ptP) end
|
||||
end
|
||||
local o_EgtGetMachiningEndPoint = EgtGetMachiningEndPoint
|
||||
EgtGetMachiningEndPoint = function(...)
|
||||
local ptP = o_EgtGetMachiningEndPoint(...)
|
||||
if ptP then return Point3d( ptP) end
|
||||
end
|
||||
|
||||
-- Ridefinizione funzioni per ritornare Point3d e altri parametri
|
||||
local o_EgtSurfTmFacetsContact = EgtSurfTmFacetsContact
|
||||
EgtSurfTmFacetsContact = function(...)
|
||||
local bAdj, ptP1, ptP2, dAng = o_EgtSurfTmFacetsContact(...)
|
||||
if bAdj and ptP1 and ptP2 and dAng then
|
||||
return bAdj, Point3d( ptP1), Point3d( ptP2), dAng
|
||||
else
|
||||
return bAdj
|
||||
end
|
||||
end
|
||||
local o_EgtSurfTmFacetOppositeSide = EgtSurfTmFacetOppositeSide
|
||||
EgtSurfTmFacetOppositeSide = function(...)
|
||||
local ptP1, ptPm, ptP2, vtV1, vtV2, dL, dW = o_EgtSurfTmFacetOppositeSide(...)
|
||||
if ptP1 and ptPm and ptP2 and vtV1 and vtV2 then
|
||||
return Point3d( ptP1), Point3d( ptPm), Point3d( ptP2), Vector3d( vtV1), Vector3d( vtV2), dL, dW
|
||||
end
|
||||
end
|
||||
local o_EgtPointCurveDist = EgtPointCurveDist
|
||||
EgtPointCurveDist = function(...)
|
||||
local dDist, ptNear, dU = o_EgtPointCurveDist(...)
|
||||
if dDist then return dDist, Point3d( ptNear), dU end
|
||||
end
|
||||
local o_EgtGetLastSelInfo = EgtGetLastSelInfo
|
||||
EgtGetLastSelInfo = function(...)
|
||||
local nId, nSub, ptSel = o_EgtGetLastSelInfo(...)
|
||||
if nId then return nId, nSub, Point3d( ptSel) end
|
||||
end
|
||||
local o_EgtGetPrevSelInfo = EgtGetPrevSelInfo
|
||||
EgtGetPrevSelInfo = function(...)
|
||||
local nId, nSub, ptSel = o_EgtGetPrevSelInfo(...)
|
||||
if nId then return nId, nSub, Point3d( ptSel) end
|
||||
end
|
||||
local o_EgtSurfBezierGetPoint = EgtSurfBezierGetPoint
|
||||
EgtSurfBezierGetPoint = function(...)
|
||||
local ptP = o_EgtSurfBezierGetPoint(...)
|
||||
if ptP then
|
||||
return Point3d( ptP)
|
||||
end
|
||||
end
|
||||
local o_EgtSurfBezierGetPointD1 = EgtSurfBezierGetPointD1
|
||||
EgtSurfBezierGetPointD1 = function(...)
|
||||
local ptP, vtDerU, vtDerV = o_EgtSurfBezierGetPointD1(...)
|
||||
if ptP and vtDerU and vtDerV then
|
||||
return Point3d( ptP), Vector3d( vtDerU), Vector3d( vtDerV)
|
||||
end
|
||||
end
|
||||
local o_EgtSurfBezierGetPointNrmD1 = EgtSurfBezierGetPointNrmD1
|
||||
EgtSurfBezierGetPointNrmD1 = function(...)
|
||||
local ptP, vtN, vtDerU, vtDerV = o_EgtSurfBezierGetPointNrmD1(...)
|
||||
if ptP and vtDerU and vtDerV then
|
||||
return Point3d( ptP), Vector3d( vtN), Vector3d( vtDerU), Vector3d( vtDerV)
|
||||
end
|
||||
end
|
||||
|
||||
-- Ridefinizione funzioni per ritornare Point3d e Vector3d
|
||||
local o_EgtSurfTmFacetNearestEndPoint = EgtSurfTmFacetNearestEndPoint
|
||||
EgtSurfTmFacetNearestEndPoint = function(...)
|
||||
local ptP, vtN = o_EgtSurfTmFacetNearestEndPoint(...)
|
||||
if ptP and vtN then return Point3d( ptP), Vector3d( vtN) end
|
||||
end
|
||||
local o_EgtSurfTmFacetNearestMidPoint = EgtSurfTmFacetNearestMidPoint
|
||||
EgtSurfTmFacetNearestMidPoint = function(...)
|
||||
local ptP, vtN = o_EgtSurfTmFacetNearestMidPoint(...)
|
||||
if ptP and vtN then return Point3d( ptP), Vector3d( vtN) end
|
||||
end
|
||||
local o_EgtSurfTmFacetCenter = EgtSurfTmFacetCenter
|
||||
EgtSurfTmFacetCenter = function(...)
|
||||
local ptP, vtN = o_EgtSurfTmFacetCenter(...)
|
||||
if ptP and vtN then return Point3d( ptP), Vector3d( vtN) end
|
||||
end
|
||||
local o_EgtCurveIsACircle = EgtCurveIsACircle
|
||||
EgtCurveIsACircle = function(...)
|
||||
local bCirc, ptC, vtN, dRad, bCCW = o_EgtCurveIsACircle(...)
|
||||
if bCirc then return bCirc, Point3d( ptC), Vector3d( vtN), dRad, bCCW end
|
||||
end
|
||||
|
||||
-- Ridefinizione funzioni per ritornare Frame3d
|
||||
local o_EgtGetGridFrame = EgtGetGridFrame
|
||||
EgtGetGridFrame = function()
|
||||
local frRef = o_EgtGetGridFrame()
|
||||
if frRef then return Frame3d( frRef) end
|
||||
end
|
||||
local o_EgtGetGlobFrame = EgtGetGlobFrame
|
||||
EgtGetGlobFrame = function(...)
|
||||
local frRef = o_EgtGetGlobFrame(...)
|
||||
if frRef then return Frame3d( frRef) end
|
||||
end
|
||||
local o_EgtGetGroupGlobFrame = EgtGetGroupGlobFrame
|
||||
EgtGetGroupGlobFrame = function(...)
|
||||
local frRef = o_EgtGetGroupGlobFrame(...)
|
||||
if frRef then return Frame3d( frRef) end
|
||||
end
|
||||
local o_EgtFR = EgtFR
|
||||
EgtFR = function(...)
|
||||
local frRef = o_EgtFR(...)
|
||||
if frRef then return Frame3d( frRef) end
|
||||
end
|
||||
local o_EgtGetTextureFrame = EgtGetTextureFrame
|
||||
EgtGetTextureFrame = function(...)
|
||||
local frRef = o_EgtGetTextureFrame(...)
|
||||
if frRef then return Frame3d( frRef) end
|
||||
end
|
||||
|
||||
-- Ridefinizione funzioni per ritornare Frame3d e altri parametri
|
||||
local o_EgtCurveMinAreaRectangleXY = EgtCurveMinAreaRectangleXY
|
||||
EgtCurveMinAreaRectangleXY = function(...)
|
||||
local frRect, dDimX, dDimY = o_EgtCurveMinAreaRectangleXY(...)
|
||||
if frRect then return Frame3d( frRect), dDimX, dDimY end
|
||||
end
|
||||
local o_EgtSurfTmFacetMinAreaRectangle = EgtSurfTmFacetMinAreaRectangle
|
||||
EgtSurfTmFacetMinAreaRectangle = function(...)
|
||||
local frRect, dDimX, dDimY = o_EgtSurfTmFacetMinAreaRectangle(...)
|
||||
if frRect then return Frame3d( frRect), dDimX, dDimY end
|
||||
end
|
||||
|
||||
-- Ridefinizione funzioni per ritornare BBox3d
|
||||
local o_EgtGetBBox = EgtGetBBox
|
||||
EgtGetBBox = function(...)
|
||||
local b3Box = o_EgtGetBBox(...)
|
||||
if b3Box then return BBox3d( b3Box) end
|
||||
end
|
||||
local o_EgtGetBBoxGlob = EgtGetBBoxGlob
|
||||
EgtGetBBoxGlob = function(...)
|
||||
local b3Box = o_EgtGetBBoxGlob(...)
|
||||
if b3Box then return BBox3d( b3Box) end
|
||||
end
|
||||
local o_EgtGetBBoxRef = EgtGetBBoxRef
|
||||
EgtGetBBoxRef = function(...)
|
||||
local b3Box = o_EgtGetBBoxRef(...)
|
||||
if b3Box then return BBox3d( b3Box) end
|
||||
end
|
||||
local o_EgtGetTableArea = EgtGetTableArea
|
||||
EgtGetTableArea = function(...)
|
||||
local b3Box = o_EgtGetTableArea(...)
|
||||
if b3Box then return BBox3d( b3Box) end
|
||||
end
|
||||
local o_EgtGetRawPartBBox = EgtGetRawPartBBox
|
||||
EgtGetRawPartBBox = function(...)
|
||||
local b3Box = o_EgtGetRawPartBBox(...)
|
||||
if b3Box then return BBox3d( b3Box) end
|
||||
end
|
||||
local o_EgtSurfTmGetFacetBBox = EgtSurfTmGetFacetBBox
|
||||
EgtSurfTmGetFacetBBox = function(...)
|
||||
local b3Box = o_EgtSurfTmGetFacetBBox(...)
|
||||
if b3Box then return BBox3d( b3Box) end
|
||||
end
|
||||
local o_EgtSurfTmGetFacetBBoxGlob = EgtSurfTmGetFacetBBoxGlob
|
||||
EgtSurfTmGetFacetBBoxGlob = function(...)
|
||||
local b3Box = o_EgtSurfTmGetFacetBBoxGlob(...)
|
||||
if b3Box then return BBox3d( b3Box) end
|
||||
end
|
||||
local o_EgtSurfTmGetFacetBBoxRef = EgtSurfTmGetFacetBBoxRef
|
||||
EgtSurfTmGetFacetBBoxRef = function(...)
|
||||
local b3Box = o_EgtSurfTmGetFacetBBoxRef(...)
|
||||
if b3Box then return BBox3d( b3Box) end
|
||||
end
|
||||
local o_EgtVolZmapGetPartBBox = EgtVolZmapGetPartBBox
|
||||
EgtVolZmapGetPartBBox = function(...)
|
||||
local b3Box = o_EgtVolZmapGetPartBBox(...)
|
||||
if b3Box then return BBox3d( b3Box) end
|
||||
end
|
||||
local o_EgtVolZmapGetPartBBoxGlob = EgtVolZmapGetPartBBoxGlob
|
||||
EgtVolZmapGetPartBBoxGlob = function(...)
|
||||
local b3Box = o_EgtVolZmapGetPartBBoxGlob(...)
|
||||
if b3Box then return BBox3d( b3Box) end
|
||||
end
|
||||
|
||||
-- Ridefinizione funzioni per ritornare Color3d
|
||||
local o_EgtStdColor = EgtStdColor
|
||||
EgtStdColor = function(...)
|
||||
local c3Col = o_EgtStdColor(...)
|
||||
if c3Col then return Color3d( c3Col) end
|
||||
end
|
||||
local o_EgtGetColor = EgtGetColor
|
||||
EgtGetColor = function(...)
|
||||
local c3Col = o_EgtGetColor(...)
|
||||
if c3Col then return Color3d( c3Col) end
|
||||
end
|
||||
local o_EgtGetCalcColor = EgtGetCalcColor
|
||||
EgtGetCalcColor = function(...)
|
||||
local c3Col = o_EgtGetCalcColor(...)
|
||||
if c3Col then return Color3d( c3Col) end
|
||||
end
|
||||
local o_EgtGetBackground = EgtGetBackground
|
||||
EgtGetBackground = function(...)
|
||||
local c3Top, c3Bot = o_EgtGetBackground(...)
|
||||
if c3Top and c3Bot then return Color3d( c3Top), Color3d( c3Bot) end
|
||||
end
|
||||
|
||||
-- Ridefinizione funzioni per tornare diversi tipi di oggetti
|
||||
local o_EgtGetInfo = EgtGetInfo
|
||||
EgtGetInfo = function( Id, Key, sType)
|
||||
local Val = o_EgtGetInfo( Id, Key, sType)
|
||||
if sType == 'v' or sType == 'V' then
|
||||
if Val then return Vector3d( Val) end
|
||||
elseif sType == 'p' or sType == 'P' then
|
||||
if Val then return Point3d( Val) end
|
||||
elseif sType == 'x' or sType == 'X' then
|
||||
if Val then return BBox3d( Val) end
|
||||
elseif sType == 'f' or sType == 'F' then
|
||||
if Val then return Frame3d( Val) end
|
||||
else
|
||||
return Val
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
return EgtBase
|
||||
@@ -0,0 +1,170 @@
|
||||
-- EgtColor3d.lua by EgalTech s.r.l. 2019/03/31
|
||||
|
||||
-- Tavola per definizione modulo (serve ma non usata)
|
||||
local EgtColor3d = {}
|
||||
|
||||
EgtOutLog( 'EgtColor3d started', 1)
|
||||
|
||||
-- Include
|
||||
require( 'EgtConst')
|
||||
--EnableDebug( false)
|
||||
|
||||
|
||||
-- Definizione classe Color3d
|
||||
Color3d = {}
|
||||
Color3d.__index = Color3d
|
||||
|
||||
-- funzione di utilita' per identificazione tipo
|
||||
function isColor3d( a)
|
||||
return ( getmetatable( a) == Color3d)
|
||||
end
|
||||
|
||||
local function New( r, g, b, a)
|
||||
local col = setmetatable( {0,0,0,0}, Color3d)
|
||||
local function Clip( val, min, max)
|
||||
if val < min then
|
||||
return min
|
||||
elseif val > max then
|
||||
return max
|
||||
else
|
||||
return val
|
||||
end
|
||||
end
|
||||
if not r then
|
||||
return nil
|
||||
elseif isColor3d( r) then
|
||||
col[1] = r[1]
|
||||
col[2] = r[2]
|
||||
col[3] = r[3]
|
||||
if type( g) == 'number' then
|
||||
col[4] = Clip( g, 0, 100)
|
||||
else
|
||||
col[4] = r[4]
|
||||
end
|
||||
elseif type( r) == 'table' and #r >= 3 then
|
||||
col[1] = Clip( r[1], 0, 255)
|
||||
col[2] = Clip( r[2], 0, 255)
|
||||
col[3] = Clip( r[3], 0, 255)
|
||||
if #r >= 4 then
|
||||
col[4] = Clip( r[4], 0, 100)
|
||||
else
|
||||
col[4] = 100
|
||||
end
|
||||
elseif type( r) == 'number' and type( g) == 'number' and type( b) == 'number' then
|
||||
col[1] = Clip( r, 0, 255)
|
||||
col[2] = Clip( g, 0, 255)
|
||||
col[3] = Clip( b, 0, 255)
|
||||
if type( a) == 'number' then
|
||||
col[4] = Clip( a, 0, 100)
|
||||
else
|
||||
col[4] = 100
|
||||
end
|
||||
elseif type( r) == 'string' then
|
||||
local stdCol = EgtStdColor( r)
|
||||
col[1] = stdCol[1]
|
||||
col[2] = stdCol[2]
|
||||
col[3] = stdCol[3]
|
||||
col[4] = stdCol[4]
|
||||
else
|
||||
error( 'A parameter is wrong', 2)
|
||||
end
|
||||
return col
|
||||
end
|
||||
|
||||
setmetatable( Color3d, { __call = function( _, ...) return New(...) end })
|
||||
|
||||
-- restituzione componenti
|
||||
function Color3d:getRed()
|
||||
return self[1]
|
||||
end
|
||||
|
||||
function Color3d:getGreen()
|
||||
return self[2]
|
||||
end
|
||||
|
||||
function Color3d:getBlue()
|
||||
return self[3]
|
||||
end
|
||||
|
||||
function Color3d:getAlpha()
|
||||
return self[4]
|
||||
end
|
||||
|
||||
-- conversione in stringa (tostring)
|
||||
function Color3d:__tostring()
|
||||
return '('.. self[1]..','..self[2]..','..self[3]..','..self[4] ..')'
|
||||
end
|
||||
|
||||
-- funzione di confronto
|
||||
function AreSameColor( a, b, Tol)
|
||||
if isColor3d( a) and isColor3d( b) then
|
||||
if not Tol then
|
||||
Tol = 0
|
||||
end
|
||||
return math.abs( a[1] - b[1]) < Tol + 0.1 and
|
||||
math.abs( a[2] - b[2]) < Tol + 0.1 and
|
||||
math.abs( a[3] - b[3]) < Tol + 0.1 and
|
||||
math.abs( a[4] - b[4]) < Tol + 0.1
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
-- Colori notevoli
|
||||
function WHITE()
|
||||
return Color3d( 'WHITE')
|
||||
end
|
||||
function LGRAY()
|
||||
return Color3d( 'LGRAY')
|
||||
end
|
||||
function GRAY()
|
||||
return Color3d( 'GRAY')
|
||||
end
|
||||
function BLACK()
|
||||
return Color3d( 'BLACK')
|
||||
end
|
||||
function RED()
|
||||
return Color3d( 'RED')
|
||||
end
|
||||
function MAROON()
|
||||
return Color3d( 'MAROON')
|
||||
end
|
||||
function YELLOW()
|
||||
return Color3d( 'YELLOW')
|
||||
end
|
||||
function OLIVE()
|
||||
return Color3d( 'OLIVE')
|
||||
end
|
||||
function LIME()
|
||||
return Color3d( 'LIME')
|
||||
end
|
||||
function GREEN()
|
||||
return Color3d( 'GREEN')
|
||||
end
|
||||
function AQUA()
|
||||
return Color3d( 'AQUA')
|
||||
end
|
||||
function TEAL()
|
||||
return Color3d( 'TEAL')
|
||||
end
|
||||
function BLUE()
|
||||
return Color3d( 'BLUE')
|
||||
end
|
||||
function NAVY()
|
||||
return Color3d( 'NAVY')
|
||||
end
|
||||
function FUCHSIA()
|
||||
return Color3d( 'FUCHSIA')
|
||||
end
|
||||
function PURPLE()
|
||||
return Color3d( 'PURPLE')
|
||||
end
|
||||
function ORANGE()
|
||||
return Color3d( 'ORANGE')
|
||||
end
|
||||
function BROWN()
|
||||
return Color3d( 'BROWN')
|
||||
end
|
||||
|
||||
|
||||
return EgtColor3d
|
||||
@@ -0,0 +1,975 @@
|
||||
-- EgtConst.lua libreria di costanti EgalTech per Lua 2022/02/04
|
||||
-- 2018/02/22 Sistemata package.cpath per lua 5.3 con "/bin/clibs53/?.dll;"
|
||||
-- 2019/07/24 Portato GEO.EPS_ZERO a 1e-8 come nel programma.
|
||||
-- 2020/01/15 Aggiunta costante GDB_TY.EXT_DIMENSION.
|
||||
-- 2020/02/06 Aggiunte costanti GDB_CRC.
|
||||
-- 2020/02/14 Aggiunta costante MCH_GP.MAXDEPTHSAFE.
|
||||
-- 2020/02/21 Aggiunta costante MCH_TY.MILL_POLISHING.
|
||||
-- 2020/03/26 Aggiunta costante GDB_TY.SRF_BEZ.
|
||||
-- 2020/06/05 Aggiunte costanti MCH_MP.TABMIN e MCH_MP.TABMAX.
|
||||
-- 2020/10/12 Aggiunte costanti EEX_FL.
|
||||
-- 2021/02/14 Aggiunte costanti NST_CORNER.
|
||||
-- 2021/05/21 Aggiunta costante MCH_SIM_COB.CONE (tronco di cono).
|
||||
-- 2021/07/28 Aggiunte costanti MCH_MP.SIDEANGFEED e MCH_MP.STEPLAST.
|
||||
-- 2021/09/24 Aggiunte costanti MCH_MILL_LI.TG_PERP e MCH_MILL_LO.PERP_TG.
|
||||
-- 2022/02/04 Aggiunte costanti MCH_MP.EPICYCLESRAD e MCH_MP.EPICYCLESDIST.
|
||||
|
||||
-- Tavola per definizione modulo (serve ma non usata)
|
||||
local EgtConst = {}
|
||||
|
||||
EgtOutLog( 'EgtConst started', 1)
|
||||
|
||||
-- Per eventuale debug
|
||||
local ZBS = "c:/ZeroBraneStudio"
|
||||
if not package.path:find(ZBS,1,true) then
|
||||
package.path = ZBS .. "/lualibs/?/?.lua;" .. ZBS .. "/lualibs/?.lua;" .. package.path
|
||||
package.cpath = ZBS .. "/bin/?.dll;" .. ZBS .. "/bin/clibs53/?.dll;" .. package.cpath
|
||||
end
|
||||
|
||||
-- Funzione per rendere non modificabili le costanti
|
||||
local protect = function(tbl)
|
||||
return setmetatable({}, {
|
||||
__index = tbl,
|
||||
__newindex = function(t, key, value)
|
||||
error("attempting to change constant " ..
|
||||
tbl[1]..tostring(key) .. " to " .. tostring(value), 2)
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
-- Costanti geometriche
|
||||
GEO = {
|
||||
'GEO.',
|
||||
EPS_SMALL = 1.0e-3,
|
||||
EPS_ZERO = 1.0e-8,
|
||||
INFINITO = 1.0e10,
|
||||
EPS_ANG_SMALL = 1.0e-3,
|
||||
ONE_MM = 1.0,
|
||||
ONE_INCH = 25.4
|
||||
}
|
||||
GEO = protect( GEO)
|
||||
-- Costanti per tipo di file Nge
|
||||
GDB_NT = {
|
||||
'GDB_NT.',
|
||||
TXT = 0,
|
||||
BIN = 1,
|
||||
CMPTXT = 2
|
||||
}
|
||||
GDB_NT = protect( GDB_NT)
|
||||
-- Costanti per identificativi speciali di GDB
|
||||
GDB_ID = {
|
||||
'GDB_ID.',
|
||||
ROOT = 0, -- radice
|
||||
NULL = -1, -- non valido
|
||||
SEL = -2, -- selezione
|
||||
GRID = -3, -- griglia
|
||||
CP = -4, -- current part
|
||||
CL = -5 -- current layer
|
||||
}
|
||||
GDB_ID = protect( GDB_ID)
|
||||
-- Costanti per posizione di inserimento in GDB in copia/trasferisci
|
||||
GDB_IN = {
|
||||
'GDB_IN.',
|
||||
FIRST_SON = 0,
|
||||
LAST_SON = 1,
|
||||
BEFORE = 2,
|
||||
AFTER = 3
|
||||
}
|
||||
GDB_IN = protect( GDB_IN)
|
||||
-- Costanti per riferimento in cui sono espressi i dati della funzione
|
||||
GDB_RT = {
|
||||
'GDB_RT.',
|
||||
GLOB = 0, -- globale
|
||||
GRID = -3, -- griglia
|
||||
LOC = -6 -- locale
|
||||
}
|
||||
GDB_RT = protect( GDB_RT)
|
||||
-- Costanti per tipo di punto
|
||||
GDB_PT = {
|
||||
'GDB_PT.',
|
||||
STD = 0,
|
||||
TG = 1,
|
||||
PERP = 2,
|
||||
MIND = 3
|
||||
}
|
||||
GDB_PT = protect( GDB_PT)
|
||||
-- Costanti per famiglie di oggetti
|
||||
GDB_FY = {
|
||||
'GDB_FY.',
|
||||
NONE = 0,
|
||||
GEO_ZERODIM = 128,
|
||||
GEO_CURVE = 256,
|
||||
GEO_SURF = 512,
|
||||
GEO_VOLUME = 1024,
|
||||
GEO_EXTRA = 2048
|
||||
}
|
||||
GDB_FY = protect( GDB_FY)
|
||||
-- Costanti per tipo di oggetti
|
||||
GDB_TY = {
|
||||
'GDB_TY.',
|
||||
NONE = 0,
|
||||
GROUP = 2,
|
||||
GEO_VECTOR = 128,
|
||||
GEO_POINT = 129,
|
||||
GEO_FRAME = 130,
|
||||
CRV_LINE = 256,
|
||||
CRV_ARC = 257,
|
||||
CRV_BEZ = 258,
|
||||
CRV_COMPO = 259,
|
||||
SRF_MESH = 512,
|
||||
SRF_FRGN = 513,
|
||||
SRF_BEZ = 514,
|
||||
VOL_ZMAP = 1024,
|
||||
EXT_TEXT = 2048,
|
||||
EXT_DIMENSION = 2049
|
||||
}
|
||||
GDB_TY = protect( GDB_TY)
|
||||
-- Costanti per livello oggetti
|
||||
GDB_LV = {
|
||||
'GDB_LV.',
|
||||
USER = 1,
|
||||
SYSTEM = 2,
|
||||
TEMP = 3
|
||||
}
|
||||
GDB_LV = protect( GDB_LV)
|
||||
-- Costanti per modo oggetti
|
||||
GDB_MD = {
|
||||
'GDB_MD.',
|
||||
STD = 1,
|
||||
LOCKED = 2,
|
||||
HIDDEN = 3
|
||||
}
|
||||
GDB_MD = protect( GDB_MD)
|
||||
-- Costanti per stato oggetti
|
||||
GDB_ST = {
|
||||
'GDB_ST.',
|
||||
OFF = 0,
|
||||
ON = 1,
|
||||
SEL = 2
|
||||
}
|
||||
GDB_ST = protect( GDB_ST)
|
||||
-- Costanti per flag calcolo BBox3d
|
||||
GDB_BB = {
|
||||
'GDB_BB.',
|
||||
STANDARD = 0,
|
||||
ONLY_VISIBLE = 1,
|
||||
EXACT = 2,
|
||||
IGNORE_TEXT = 4,
|
||||
IGNORE_DIM = 8
|
||||
}
|
||||
GDB_BB = protect( GDB_BB)
|
||||
-- Costanti per info di sistema
|
||||
GDB_SI = {
|
||||
'GDB_SI.',
|
||||
SOURCE = "!SOU",
|
||||
BASE = "!BAS",
|
||||
LIST = "!LST",
|
||||
COPY = "!COP",
|
||||
MGRPONLY = "!MGO"
|
||||
}
|
||||
GDB_SI = protect( GDB_SI)
|
||||
-- Costanti per tipologia di riferimento
|
||||
GDB_FR = {
|
||||
'GDB_FR.',
|
||||
TOP = 1,
|
||||
BOTTOM = 2,
|
||||
FRONT = 3,
|
||||
BACK = 4,
|
||||
LEFT = 5,
|
||||
RIGHT = 6
|
||||
}
|
||||
GDB_FR = protect( GDB_FR)
|
||||
-- Costanti per posizione inserimento testo rispetto al punto di riferimento
|
||||
GDB_TI = {
|
||||
'GDB_TI.',
|
||||
TL = 1,
|
||||
TC = 2,
|
||||
TR = 3,
|
||||
ML = 4,
|
||||
MC = 5,
|
||||
MR = 6,
|
||||
BL = 7,
|
||||
BC = 8,
|
||||
BR = 9
|
||||
}
|
||||
GDB_TI = protect( GDB_TI)
|
||||
-- Costanti per interpolazione punti
|
||||
GDB_PI = {
|
||||
'GDB_PI.',
|
||||
ARCS = 0,
|
||||
ARCS_CORNER = 1,
|
||||
CUBICS = 2
|
||||
}
|
||||
GDB_PI = protect( GDB_PI)
|
||||
-- Costanti per approssimazione curve
|
||||
GDB_CA = {
|
||||
'GDB_CA.',
|
||||
LINES = 0,
|
||||
SPECIAL_LINES = 10,
|
||||
LEFT_LINES = 1,
|
||||
LEFT_CONVEX_LINES = 11,
|
||||
RIGHT_LINES = 2,
|
||||
RIGHT_CONVEX_LINES = 12,
|
||||
ARCS = 3
|
||||
}
|
||||
GDB_CA = protect( GDB_CA)
|
||||
-- Costanti per tipo offset di curve
|
||||
GDB_OT = {
|
||||
'GDB_OT.',
|
||||
FILLET = 0,
|
||||
CHAMFER = 1,
|
||||
EXTEND = 2
|
||||
}
|
||||
GDB_OT = protect( GDB_OT)
|
||||
-- Costanti per classificazione reciproca di regioni
|
||||
GDB_RC = {
|
||||
'GDB_RC.',
|
||||
NULL = 0,
|
||||
IN1 = 1,
|
||||
IN2 = 2,
|
||||
SAME = 3,
|
||||
OUT = 4,
|
||||
INTERS = 5
|
||||
}
|
||||
GDB_RC = protect( GDB_RC)
|
||||
-- Costanti per classificazione curva rispetto a regione
|
||||
GDB_CRC = {
|
||||
'GDB_CRC.',
|
||||
NULL = 0,
|
||||
IN = 1,
|
||||
OUT = 2,
|
||||
ON = 3,
|
||||
INTERS = 4
|
||||
}
|
||||
GDB_CRC = protect( GDB_CRC)
|
||||
-- Costanti tipo punto intersezione Linea SurfTriMesh
|
||||
GDB_SLT = {
|
||||
'GDB_SLT.',
|
||||
NULL = 0,
|
||||
IN = 1,
|
||||
OUT = 2,
|
||||
TG_INI = 3,
|
||||
TG_FIN = 4,
|
||||
TOUCH = 5
|
||||
}
|
||||
GDB_SLT = protect( GDB_SLT)
|
||||
-- Costanti tipo costruzione superficie rigata
|
||||
GDB_RUL = {
|
||||
'GDB_RUL.',
|
||||
ISOPAR = 'IP',
|
||||
MINDIST = 'MD'
|
||||
}
|
||||
GDB_RUL = protect( GDB_RUL)
|
||||
-- Costanti scena per tipo visualizzazione
|
||||
SCE_SM = {
|
||||
'SCE_SM.',
|
||||
WF = 0,
|
||||
HL = 1,
|
||||
SH = 2
|
||||
}
|
||||
SCE_SM = protect( SCE_SM)
|
||||
-- Costanti scena per tipo zoom
|
||||
SCE_ZM = {
|
||||
'SCE_ZM.',
|
||||
ALL = 1,
|
||||
IN = 2,
|
||||
OUT = 3
|
||||
}
|
||||
SCE_ZM = protect( SCE_ZM)
|
||||
-- Costanti scena per tipo vista
|
||||
SCE_VD = {
|
||||
'SCE_VD.',
|
||||
NONE = 0,
|
||||
TOP = 1,
|
||||
FRONT = 2,
|
||||
RIGHT = 3,
|
||||
BACK = 4,
|
||||
LEFT = 5,
|
||||
BOTTOM = 6,
|
||||
ISO_SW = 7,
|
||||
ISO_SE = 8,
|
||||
ISO_NE = 9,
|
||||
ISO_NW = 10,
|
||||
GRID = 11
|
||||
}
|
||||
SCE_VD = protect( SCE_VD)
|
||||
-- Flag per import CNC
|
||||
EIC_FL = {
|
||||
'EIC_FL.',
|
||||
NONE = 0,
|
||||
CHAIN = 1,
|
||||
SKIP_ZEROMACH = 2,
|
||||
SKIP_RAPID = 4
|
||||
}
|
||||
EIC_FL = protect( EIC_FL)
|
||||
-- Flag per import BTL
|
||||
EIB_FL = {
|
||||
'EIB_FL.',
|
||||
NONE = 0,
|
||||
FLAT_POS = 1,
|
||||
VERT_POS = 2,
|
||||
SPECIAL_TRIM = 4,
|
||||
TS3_POS = 8,
|
||||
SORT = 16,
|
||||
USEUATTR = 32
|
||||
}
|
||||
EIB_FL = protect( EIB_FL)
|
||||
-- Flag per export
|
||||
EEX_FL = {
|
||||
'EEX_FL.',
|
||||
NONE = 0,
|
||||
COMP_LAYER = 1,
|
||||
COL_BY_LAYER = 2,
|
||||
ADV_NAMES = 4
|
||||
}
|
||||
EEX_FL = protect( EEX_FL)
|
||||
-- Costanti shortest path per tipo di percorso di ottimizzazione
|
||||
SHP_TY = {
|
||||
'SHP_TY.',
|
||||
NONE = 0,
|
||||
CLOSED = 1,
|
||||
OPEN = 2,
|
||||
ZIGZAG_X = 3,
|
||||
ZIGZAG_Y = 4,
|
||||
ONEWAY_XP = 5,
|
||||
ONEWAY_XM = 6,
|
||||
ONEWAY_YP = 7,
|
||||
ONEWAY_YM = 8
|
||||
}
|
||||
SHP_TY = protect( SHP_TY)
|
||||
-- Costanti shortest path per tipo estremo di percorso aperto
|
||||
SHP_OB = {
|
||||
'SHP_OB.',
|
||||
NONE = 0,
|
||||
NEAR_PNT = 1,
|
||||
XMIN = 2,
|
||||
XMAX = 3,
|
||||
YMIN = 4,
|
||||
YMAX = 5
|
||||
}
|
||||
SHP_OB = protect( SHP_OB)
|
||||
-- Costanti nesting per interferenza lavorazione
|
||||
NST_FMI = {
|
||||
'NST_FMI.',
|
||||
NONE = 0,
|
||||
LI = 1,
|
||||
RM = 2,
|
||||
LO = 4
|
||||
}
|
||||
NST_FMI = protect( NST_FMI)
|
||||
-- Costanti nesting automatico per corner di partenza
|
||||
NST_CORNER = {
|
||||
'NST_CORNER.',
|
||||
BL = 0,
|
||||
TL = 1,
|
||||
BR = 2,
|
||||
TR = 3
|
||||
}
|
||||
NST_CORNER = protect( NST_CORNER)
|
||||
-- Costanti lavorazioni per tipo di tavola della macchina
|
||||
MCH_TT = {
|
||||
'MCH_TT.',
|
||||
FLAT = 1
|
||||
}
|
||||
MCH_TT = protect( MCH_TT)
|
||||
-- Costanti lavorazioni per tipo assi della macchina
|
||||
MCH_AT = {
|
||||
'MCH_AT.',
|
||||
LINEAR = 1,
|
||||
ROTARY = 2
|
||||
}
|
||||
MCH_AT = protect( MCH_AT)
|
||||
-- Costanti lavorazioni per tipo teste della macchina (standard o multipla)
|
||||
MCH_HT = {
|
||||
'MCH_HT.',
|
||||
STD = 1,
|
||||
MULTI = 2,
|
||||
SPECIAL = 3
|
||||
}
|
||||
MCH_HT = protect( MCH_HT)
|
||||
-- Costanti lavorazioni per criterio scelta soluzione (Solution Choice Criterion)
|
||||
-- STD e OPPOSITE si possono usare solo nelle operazioni (non nelle teste)
|
||||
MCH_SCC = {
|
||||
'MCH_SCC.',
|
||||
NONE = 0,
|
||||
STD = 1,
|
||||
OPPOSITE = 2,
|
||||
ADIR_XP = 11,
|
||||
ADIR_XM = 12,
|
||||
ADIR_YP = 13,
|
||||
ADIR_YM = 14,
|
||||
ADIR_ZP = 15,
|
||||
ADIR_ZM = 16,
|
||||
ADIR_NEAR = 21,
|
||||
ADIR_FAR = 22
|
||||
}
|
||||
MCH_SCC = protect( MCH_SCC)
|
||||
-- Costanti lavorazioni per posizionamento grezzo su corner
|
||||
MCH_CR = {
|
||||
'MCH_CR.',
|
||||
TL = 1,
|
||||
TR = 2,
|
||||
BL = 3,
|
||||
BR = 4
|
||||
}
|
||||
MCH_CR = protect( MCH_CR)
|
||||
-- Costanti lavorazioni per posizionamento grezzo su centro
|
||||
MCH_CE = {
|
||||
'MCH_CE.',
|
||||
TC = 1,
|
||||
ML = 2,
|
||||
MR = 3,
|
||||
BC = 4,
|
||||
MC = 5
|
||||
}
|
||||
MCH_CE = protect( MCH_CE)
|
||||
-- Costanti lavorazioni per famiglia utensile
|
||||
MCH_TF = {
|
||||
'MCH_TF.',
|
||||
DRILLBIT = 256,
|
||||
SAWBLADE = 512,
|
||||
MILL = 1024,
|
||||
MORTISE = 2048,
|
||||
CHISEL = 4096,
|
||||
WATERJET = 8192,
|
||||
COMPO = 16384
|
||||
}
|
||||
MCH_TF = protect( MCH_TF)
|
||||
-- Costanti lavorazioni per tipologia utensile
|
||||
MCH_TY = {
|
||||
'MCH_TY.',
|
||||
NONE = 0,
|
||||
DRILL_STD = 256,
|
||||
DRILL_LONG = 257,
|
||||
SAW_STD = 512,
|
||||
SAW_FLAT = 513,
|
||||
MILL_STD = 1024,
|
||||
MILL_NOTIP = 1025,
|
||||
MILL_POLISHING = 1026,
|
||||
MORTISE_STD = 2048,
|
||||
CHISEL_STD = 4096,
|
||||
WATERJET = 8192,
|
||||
COMPO = 16384
|
||||
}
|
||||
MCH_TY = protect( MCH_TY)
|
||||
-- Costanti lavorazioni per tipo parametri di utensili
|
||||
MCH_TP = {
|
||||
'MCH_TP.',
|
||||
ACTIVE = 4096,
|
||||
CORR = 8192,
|
||||
EXIT = 8193,
|
||||
TYPE = 8194,
|
||||
COOLANT = 8195,
|
||||
CORNRAD = 16384,
|
||||
DIAM = 16385,
|
||||
TOTDIAM = 16386,
|
||||
FEED = 16387,
|
||||
ENDFEED = 16388,
|
||||
STARTFEED = 16389,
|
||||
TIPFEED = 16390,
|
||||
LEN = 16391,
|
||||
TOTLEN = 16392,
|
||||
MAXMAT = 16393,
|
||||
LONOFFSET = 16394,
|
||||
RADOFFSET = 16395,
|
||||
SPEED = 16396,
|
||||
SIDEANG = 16397,
|
||||
MAXSPEED = 16398,
|
||||
THICK = 16399,
|
||||
MAXABSORPTION = 16400,
|
||||
MINFEED = 16401,
|
||||
DRAW = 32768,
|
||||
HEAD = 32769,
|
||||
NAME = 32770,
|
||||
SYSNOTES = 32771,
|
||||
USERNOTES = 32772,
|
||||
TCPOS = 32773,
|
||||
UUID = 32774
|
||||
}
|
||||
MCH_TP = protect( MCH_TP)
|
||||
-- Costanti lavorazioni per tipologia operazione
|
||||
MCH_OY = {
|
||||
'MCH_OY.',
|
||||
NONE = 0,
|
||||
DISP = 256,
|
||||
DRILLING = 512,
|
||||
SAWING = 1024,
|
||||
MILLING = 2048,
|
||||
POCKETING = 4096,
|
||||
MORTISING = 8192,
|
||||
SAWROUGHING = 16384,
|
||||
SAWFINISHING = 32768,
|
||||
GENMACHINING = 65536,
|
||||
CHISELING = 131072,
|
||||
SURFROUGHING = 262144,
|
||||
SURFFINISHING = 524288,
|
||||
WATERJETTING = 1048576
|
||||
}
|
||||
MCH_OY = protect( MCH_OY)
|
||||
-- Costanti lavorazioni per tipologia lavorazione
|
||||
MCH_MY = {
|
||||
'MCH_MY.',
|
||||
NONE = MCH_OY.NONE,
|
||||
DRILLING = MCH_OY.DRILLING,
|
||||
SAWING = MCH_OY.SAWING,
|
||||
MILLING = MCH_OY.MILLING,
|
||||
POCKETING = MCH_OY.POCKETING,
|
||||
MORTISING = MCH_OY.MORTISING,
|
||||
SAWROUGHING = MCH_OY.SAWROUGHING,
|
||||
SAWFINISHING = MCH_OY.SAWFINISHING,
|
||||
GENMACHINING = MCH_OY.GENMACHINING,
|
||||
CHISELING = MCH_OY.CHISELING,
|
||||
SURFROUGHING = MCH_OY.SURFROUGHING,
|
||||
SURFFINISHING = MCH_OY.SURFFINISHING,
|
||||
WATERJETTING = MCH_OY.WATERJETTING
|
||||
}
|
||||
MCH_MY = protect( MCH_MY)
|
||||
-- Costanti lavorazioni per parametri generali delle lavorazioni
|
||||
MCH_GP = {
|
||||
'MCH_GP.',
|
||||
SPLITARCS = 8192,
|
||||
SAFEZ = 16384,
|
||||
EXTRALONCUTREG = 16385,
|
||||
EXTRARONDRIREG = 16386,
|
||||
HOLEDIAMTOLER = 16387,
|
||||
EXTSAWARCMINRAD = 16388,
|
||||
INTSAWARCMAXSIDEANG = 16389,
|
||||
SAFEAGGRBOTTZ = 16390,
|
||||
MAXDEPTHSAFE = 16391
|
||||
}
|
||||
MCH_GP = protect( MCH_GP)
|
||||
-- Costanti spezzatura archi
|
||||
MCH_SPLAR ={
|
||||
'MCH_SPLAR.',
|
||||
NEVER = 0,
|
||||
GEN_PLANE = 1,
|
||||
NO_XY_PLANE = 2,
|
||||
ALWAYS = 3
|
||||
}
|
||||
MCH_SPLAR = protect( MCH_SPLAR)
|
||||
-- Costanti lavorazioni per tipo parametri di lavorazione
|
||||
MCH_MP = {
|
||||
'MCH_MP.',
|
||||
INVERT = 4096,
|
||||
LEAVETAB = 4097,
|
||||
TOOLINVERT = 4098,
|
||||
PROBING = 4099,
|
||||
LIHOLE = 4100,
|
||||
OSCENABLE = 4101,
|
||||
TYPE = 8192,
|
||||
WORKSIDE = 8193,
|
||||
HEADSIDE = 8194,
|
||||
LEADINTYPE = 8195,
|
||||
EXTLINKTYPE = 8196,
|
||||
LEADOUTTYPE = 8197,
|
||||
CURVEUSE = 8198,
|
||||
STEPTYPE = 8199,
|
||||
SUBTYPE = 8200,
|
||||
LEADLINKTYPE = 8201,
|
||||
SCC = 8202,
|
||||
FACEUSE = 8203,
|
||||
EXTCORNERTYPE = 8204,
|
||||
INTCORNERTYPE = 8205,
|
||||
CORNERSLOWPERC = 8206,
|
||||
LPTURNS = 8207,
|
||||
HPTURNS = 8208,
|
||||
TABMIN = 8209,
|
||||
TABMAX = 8210,
|
||||
SPEED = 16384,
|
||||
TOOLSPEED = 16384, -- per compatibilità
|
||||
FEED = 16385,
|
||||
STARTFEED = 16386,
|
||||
ENDFEED = 16387,
|
||||
TIPFEED = 16388,
|
||||
OFFSR = 16389,
|
||||
OFFSL = 16390,
|
||||
DEPTH = 16391,
|
||||
SIDEANGLE = 16392,
|
||||
APPROX = 16393,
|
||||
STARTPOS = 16394,
|
||||
STARTSLOWLEN = 16395,
|
||||
ENDSLOWLEN = 16396,
|
||||
THROUADDLEN = 16397,
|
||||
STEP = 16398,
|
||||
RETURNPOS = 16399,
|
||||
OVERLAP = 16400,
|
||||
TABLEN = 16401,
|
||||
TABDIST = 16402,
|
||||
TABHEIGHT = 16403,
|
||||
TABANGLE = 16404,
|
||||
LITANG = 16405,
|
||||
LIPERP = 16406,
|
||||
LIELEV = 16407,
|
||||
LICOMPLEN = 16408,
|
||||
LOTANG = 16409,
|
||||
LOPERP = 16410,
|
||||
LOELEV = 16411,
|
||||
LOCOMPLEN = 16412,
|
||||
STARTADDLEN = 16413,
|
||||
ENDADDLEN = 16414,
|
||||
OFFSET = 16415,
|
||||
STEPEXTARC = 16416,
|
||||
STEPINTARC = 16417,
|
||||
SIDESTEP = 16418,
|
||||
VERTFEED = 16419,
|
||||
STEPSIDEANG = 16420,
|
||||
OVERL = 16421,
|
||||
STEPBACK = 16422,
|
||||
STEPSIDEANGBACK = 16423,
|
||||
BACKFEED = 16424,
|
||||
LIHOLERAD = 16425,
|
||||
FORWARDANGLE = 16426,
|
||||
PROBINGMINDIST =16427,
|
||||
PROBINGMAXDIST =16428,
|
||||
CORNERSLOWLEN = 16429,
|
||||
THICKREF = 16430,
|
||||
OSCHEIGHT = 16431,
|
||||
OSCRAMPLEN = 16432,
|
||||
OSCFLATLEN = 16433,
|
||||
SIDEANGFEED = 16434,
|
||||
STEPLAST = 16435,
|
||||
EPICYCLESRAD = 16436,
|
||||
EPICYCLESDIST = 16437,
|
||||
NAME = 32768,
|
||||
TOOL = 32769,
|
||||
DEPTH_STR = 32770,
|
||||
TUUID = 32771,
|
||||
UUID = 32772,
|
||||
SYSNOTES = 32773,
|
||||
USERNOTES = 32774,
|
||||
OVERLAP_STR = 32775,
|
||||
OFFSET_STR = 32776,
|
||||
INITANGS= 32777,
|
||||
BLOCKEDAXIS= 32778
|
||||
}
|
||||
MCH_MP = protect( MCH_MP)
|
||||
-- Costanti foratura per sottotipo lavorazione
|
||||
MCH_DRI_SUB = {
|
||||
'MCH_DRI_SUB.',
|
||||
STD = 0,
|
||||
ALONG_CURVE = 1
|
||||
}
|
||||
MCH_DRI_SUB = protect( MCH_DRI_SUB)
|
||||
-- Costanti lavorazioni lama per lato di lavoro
|
||||
MCH_SAW_WS = {
|
||||
'MCH_SAW_WS.',
|
||||
CENTER = 0,
|
||||
LEFT = 1,
|
||||
RIGHT = 2
|
||||
}
|
||||
MCH_SAW_WS = protect( MCH_SAW_WS)
|
||||
-- Costanti lavorazioni lama per lato testa
|
||||
MCH_SAW_HS = {
|
||||
'MCH_SAW_HS.',
|
||||
LEFT = 1,
|
||||
RIGHT = 2
|
||||
}
|
||||
MCH_SAW_HS = protect( MCH_SAW_HS)
|
||||
-- Costanti lavorazioni lama per tipo di step
|
||||
MCH_SAW_ST = {
|
||||
'MCH_SAW_ST.',
|
||||
ZIGZAG = 0,
|
||||
ONEWAY = 1,
|
||||
TOANDFROM = 2
|
||||
}
|
||||
MCH_SAW_ST = protect( MCH_SAW_ST)
|
||||
-- Costanti lavorazioni lama per tipo di attacco
|
||||
MCH_SAW_LI = {
|
||||
'MCH_SAW_LI.',
|
||||
CENT = 0,
|
||||
STRICT = 1,
|
||||
OUT = 2,
|
||||
EXT_CENT = 3,
|
||||
EXT_OUT = 4
|
||||
}
|
||||
MCH_SAW_LI = protect( MCH_SAW_LI)
|
||||
-- Costanti lavorazioni lama per link esterno
|
||||
MCH_SAW_EL = {
|
||||
'MCH_SAW_EL.',
|
||||
CENT = 0,
|
||||
EXT_PREV = 1,
|
||||
EXT_NEXT = 2,
|
||||
EXT_BOTH = 3
|
||||
}
|
||||
MCH_SAW_EL = protect( MCH_SAW_EL)
|
||||
-- Costanti lavorazioni lama per tipo di uscita ( EXT conservato per compatibilità)
|
||||
MCH_SAW_LO = {
|
||||
'MCH_SAW_LO.',
|
||||
CENT = 0,
|
||||
STRICT = 1,
|
||||
EXT = 2,
|
||||
EXT_CENT = 2,
|
||||
OUT = 3,
|
||||
EXT_OUT = 4
|
||||
}
|
||||
MCH_SAW_LO = protect( MCH_SAW_LO)
|
||||
-- Costanti lavorazioni lama per gestione curve
|
||||
MCH_SAW_CRV = {
|
||||
'MCH_SAW_CRV.',
|
||||
SKIP = 0,
|
||||
APPROX = 1,
|
||||
CONVEX = 2,
|
||||
KEEP = 3
|
||||
}
|
||||
MCH_SAW_CRV = protect( MCH_SAW_CRV)
|
||||
-- Costanti lavorazioni fresa per lato di lavoro
|
||||
MCH_MILL_WS = {
|
||||
'MCH_MILL_WS.',
|
||||
CENTER = 0,
|
||||
LEFT = 1,
|
||||
RIGHT = 2
|
||||
}
|
||||
MCH_MILL_WS = protect( MCH_MILL_WS)
|
||||
-- Costanti lavorazioni fresa per tipo di step
|
||||
MCH_MILL_ST = {
|
||||
'MCH_MILL_ST.',
|
||||
ZIGZAG = 0,
|
||||
ONEWAY = 1,
|
||||
SPIRAL = 2
|
||||
}
|
||||
MCH_MILL_ST = protect( MCH_MILL_ST)
|
||||
-- Costanti lavorazioni fresa per tipo di attacco
|
||||
MCH_MILL_LI = {
|
||||
'MCH_MILL_LI.',
|
||||
NONE = 0,
|
||||
LINEAR = 1,
|
||||
TANGENT = 2,
|
||||
GLIDE = 3,
|
||||
ZIGZAG = 4,
|
||||
HELIX = 5,
|
||||
TG_PERP = 6
|
||||
}
|
||||
MCH_MILL_LI = protect( MCH_MILL_LI)
|
||||
-- Costanti lavorazioni fresa per tipo di uscita
|
||||
MCH_MILL_LO = {
|
||||
'MCH_MILL_LO.',
|
||||
NONE = 0,
|
||||
LINEAR = 1,
|
||||
TANGENT = 2,
|
||||
GLIDE = 3,
|
||||
AS_LI = 4,
|
||||
PERP_TG = 5
|
||||
}
|
||||
MCH_MILL_LO = protect( MCH_MILL_LO)
|
||||
-- Costanti lavorazioni fresa per tipo lavorazione faccia
|
||||
MCH_MILL_FU = {
|
||||
'MCH_MILL_FU.',
|
||||
NONE = 0,
|
||||
PARAL_DOWN = 1,
|
||||
PARAL_TOP = 2,
|
||||
PARAL_FRONT = 3,
|
||||
PARAL_BACK = 4,
|
||||
PARAL_LEFT = 5,
|
||||
PARAL_RIGHT = 6,
|
||||
ORTHO_DOWN = 33,
|
||||
ORTHO_TOP = 34,
|
||||
ORTHO_FRONT = 35,
|
||||
ORTHO_BACK = 36,
|
||||
ORTHO_LEFT = 37,
|
||||
ORTHO_RIGHT = 38,
|
||||
ORTHO_CONT = 39,
|
||||
ORTUP_DOWN = 65,
|
||||
ORTUP_TOP = 66,
|
||||
ORTUP_FRONT = 67,
|
||||
ORTUP_BACK = 68,
|
||||
ORTUP_LEFT = 69,
|
||||
ORTUP_RIGHT = 70,
|
||||
ORTUP_CONT = 71
|
||||
}
|
||||
MCH_MILL_FU = protect( MCH_MILL_FU)
|
||||
-- Costanti lavorazioni svuotatura per sottotipo
|
||||
MCH_POCK_SUB = {
|
||||
'MCH_POCK_SUB.',
|
||||
ZIGZAG = 0,
|
||||
ONEWAY = 1,
|
||||
SPIRALIN = 2,
|
||||
SPIRALOUT = 3
|
||||
}
|
||||
MCH_POCK_SUB = protect( MCH_POCK_SUB)
|
||||
-- Costanti lavorazioni svuotatura per tipo di attacco
|
||||
MCH_POCK_LI = {
|
||||
'MCH_POCK_LI.',
|
||||
NONE = 0,
|
||||
GLIDE = 1,
|
||||
ZIGZAG = 2,
|
||||
HELIX = 3
|
||||
}
|
||||
MCH_POCK_LI = protect( MCH_POCK_LI)
|
||||
-- Costanti lavorazioni svuotatura per tipo di uscita
|
||||
MCH_POCK_LO = {
|
||||
'MCH_POCK_LO.',
|
||||
NONE = 0,
|
||||
GLIDE = 1
|
||||
}
|
||||
MCH_POCK_LO = protect( MCH_POCK_LO)
|
||||
-- Costanti lavorazioni sgrossatura con lama per lato testa
|
||||
MCH_SAWROU_HS = {
|
||||
'MCH_SAWROU_HS.',
|
||||
LEFT = 1,
|
||||
RIGHT = 2
|
||||
}
|
||||
MCH_SAWROU_HS = protect( MCH_SAWROU_HS)
|
||||
-- Costanti lavorazioni sgrossatura con lama per tipo di step
|
||||
MCH_SAWROU_ST = {
|
||||
'MCH_SAWROU_ST.',
|
||||
ZIGZAG = 0,
|
||||
ONEWAY = 1
|
||||
}
|
||||
MCH_SAWROU_ST = protect( MCH_SAWROU_ST)
|
||||
-- Costanti lavorazioni sgrossatura con lama per tipo di attacco
|
||||
MCH_SAWROU_LL = {
|
||||
'MCH_SAWROU_LL.',
|
||||
CENT = 0,
|
||||
OUT = 1
|
||||
}
|
||||
MCH_SAWROU_LL = protect( MCH_SAWROU_LL)
|
||||
-- Costanti lavorazioni finitura con lama per lato testa
|
||||
MCH_SAWFIN_HS = {
|
||||
'MCH_SAWFIN_HS.',
|
||||
LEFT = 1,
|
||||
RIGHT = 2
|
||||
}
|
||||
MCH_SAWFIN_HS = protect( MCH_SAWFIN_HS)
|
||||
-- Costanti lavorazioni finitura con lama per tipo di step
|
||||
MCH_SAWFIN_ST = {
|
||||
'MCH_SAWFIN_ST.',
|
||||
ZIGZAG = 0,
|
||||
ONEWAY = 1
|
||||
}
|
||||
MCH_SAWFIN_ST = protect( MCH_SAWFIN_ST)
|
||||
-- Costanti lavorazioni finitura con lama per tipo di attacco
|
||||
MCH_SAWFIN_LL = {
|
||||
'MCH_SAWFIN_LL.',
|
||||
CENT = 0,
|
||||
OUT = 1
|
||||
}
|
||||
MCH_SAWFIN_LL = protect( MCH_SAWFIN_LL)
|
||||
-- Costanti lavorazioni scalpellatura per lato di lavoro
|
||||
MCH_CHISEL_WS = {
|
||||
'MCH_CHISEL_WS.',
|
||||
LEFT = 1,
|
||||
RIGHT = 2
|
||||
}
|
||||
MCH_CHISEL_WS = protect( MCH_CHISEL_WS)
|
||||
-- Costanti lavorazioni mortasatura per lato di lavoro
|
||||
MCH_MORTISE_WS = {
|
||||
'MCH_MORTISE_WS.',
|
||||
LEFT = 1,
|
||||
RIGHT = 2
|
||||
}
|
||||
MCH_MORTISE_WS = protect( MCH_MORTISE_WS)
|
||||
-- Costanti lavorazioni mortasatura per tipo di step
|
||||
MCH_MORTISE_ST = {
|
||||
'MCH_MORTISE_ST.',
|
||||
ZIGZAG = 0,
|
||||
ONEWAY = 1
|
||||
}
|
||||
MCH_MORTISE_ST = protect( MCH_MORTISE_ST)
|
||||
-- Costanti lavorazioni fresa per tipo lavorazione faccia
|
||||
MCH_MORTISE_FU = {
|
||||
'MCH_MORTISE_FU.',
|
||||
NONE = 0,
|
||||
PARAL_DOWN = 1,
|
||||
PARAL_TOP = 2,
|
||||
PARAL_FRONT = 3,
|
||||
PARAL_BACK = 4,
|
||||
PARAL_LEFT = 5,
|
||||
PARAL_RIGHT = 6
|
||||
}
|
||||
MCH_MORTISE_FU = protect( MCH_MORTISE_FU)
|
||||
-- Costanti lavorazioni getto d'acqua per lato di lavoro
|
||||
MCH_WJET_WS = {
|
||||
'MCH_WJET_WS.',
|
||||
CENTER = 0,
|
||||
LEFT = 1,
|
||||
RIGHT = 2
|
||||
}
|
||||
MCH_WJET_WS = protect( MCH_WJET_WS)
|
||||
-- Costanti lavorazioni getto d'acqua per comportamento su angolo esterno
|
||||
MCH_WJET_EC = {
|
||||
'MCH_WJET_EC.',
|
||||
NONE = 0,
|
||||
SLOW = 1,
|
||||
LOOP = 2
|
||||
}
|
||||
MCH_WJET_EC = protect( MCH_WJET_EC)
|
||||
-- Costanti lavorazioni getto d'acqua per comportamento su angolo interno
|
||||
MCH_WJET_IC = {
|
||||
'MCH_WJET_IC.',
|
||||
NONE = 0,
|
||||
SLOW = 1,
|
||||
}
|
||||
MCH_WJET_IC = protect( MCH_WJET_IC)
|
||||
-- Costanti lavorazioni getto d'acqua per tipo di attacco
|
||||
MCH_WJET_LI = {
|
||||
'MCH_WJET_LI.',
|
||||
NONE = 0,
|
||||
LINEAR = 1,
|
||||
TANGENT = 2
|
||||
}
|
||||
MCH_WJET_LI = protect( MCH_WJET_LI)
|
||||
-- Costanti lavorazioni getto d'acqua per tipo di uscita
|
||||
MCH_WJET_LO = {
|
||||
'MCH_WJET_LO.',
|
||||
NONE = 0,
|
||||
LINEAR = 1,
|
||||
TANGENT = 2,
|
||||
AS_LI = 4
|
||||
}
|
||||
MCH_WJET_LO = protect( MCH_WJET_LO)
|
||||
-- Costanti lavorazioni per stato simulazione
|
||||
MCH_SIM = {
|
||||
'MCH_SIM.',
|
||||
OK = 0,
|
||||
END_STEP = 1,
|
||||
END = 2,
|
||||
STOP = 3,
|
||||
OUTSTROKE = 4,
|
||||
DIR_ERR = 5,
|
||||
COLLISION = 6,
|
||||
ERR = 7
|
||||
}
|
||||
MCH_SIM = protect( MCH_SIM)
|
||||
-- Costanti lavorazioni per stato utente di simulazione
|
||||
MCH_UISIM = {
|
||||
'MCH_UISIM.',
|
||||
NULL = 0,
|
||||
STOP = 1,
|
||||
PLAY = 2,
|
||||
STEP = 3,
|
||||
PAUSE = 4
|
||||
}
|
||||
MCH_UISIM = protect( MCH_UISIM)
|
||||
-- Costanti errore simulatore in cieco
|
||||
MCH_SHE = {
|
||||
'MCH_SHE.',
|
||||
NONE = 0,
|
||||
INIT = 1,
|
||||
OUTSTROKE = 2,
|
||||
DIR_ERR = 3,
|
||||
COLLISION = 4,
|
||||
SPECIAL = 5,
|
||||
GENERAL = 6
|
||||
}
|
||||
MCH_SHE = protect( MCH_SHE)
|
||||
-- Costanti per tipi oggetti per collisioni in simulatore
|
||||
MCH_SIM_COB = {
|
||||
'MCH_SIM_COB.',
|
||||
NONE = 0,
|
||||
BOX = 1,
|
||||
CYL = 2,
|
||||
SPHE = 3,
|
||||
CONE = 4
|
||||
}
|
||||
MCH_SIM_COB = protect( MCH_SIM_COB)
|
||||
--Costanti : stato visualizzazione macchina
|
||||
MCH_LOOK = {
|
||||
'MCH_LOOK.',
|
||||
TAB = 0,
|
||||
TAB_TOOL = 1,
|
||||
TAB_HEAD = 2,
|
||||
ALL = 3
|
||||
}
|
||||
MCH_LOOK = protect( MCH_LOOK)
|
||||
|
||||
return EgtConst
|
||||
@@ -0,0 +1,494 @@
|
||||
-- EgtDimension.lua by EgalTech s.r.l. 2019/032/31
|
||||
-- Creazione di una quota
|
||||
|
||||
-- Tavola per definizione modulo (serve ma non usata)
|
||||
local EgtDimension = {}
|
||||
|
||||
EgtOutLog( 'EgtDimension started', 1)
|
||||
|
||||
-- Intestazioni
|
||||
require( 'EgtBase')
|
||||
|
||||
-- Frecce agli estremi della linea di quotatura
|
||||
function Arrows(nParentId, ptP1, ptP2, dLenArr, iFrame, cColor, bRadius)
|
||||
|
||||
local Ang = atan2( (ptP2:getY() - ptP1:getY()), (ptP2:getX() - ptP1:getX()))
|
||||
local iLine1
|
||||
local iLine2
|
||||
if not bRadius then
|
||||
iLine1 = EgtLinePDL(nParentId, ptP1, Ang + 30, dLenArr, iFrame)
|
||||
iLine2 = EgtLinePDL(nParentId, ptP1, Ang - 30, dLenArr, iFrame)
|
||||
end
|
||||
local iLine3 = EgtLinePDL(nParentId, ptP2, Ang + 150, dLenArr, iFrame)
|
||||
local iLine4 = EgtLinePDL(nParentId, ptP2, Ang - 150, dLenArr, iFrame)
|
||||
|
||||
if cColor then
|
||||
if not bRadius then
|
||||
EgtSetColor( iLine1, cColor)
|
||||
EgtSetColor( iLine2, cColor)
|
||||
end
|
||||
EgtSetColor( iLine3, cColor)
|
||||
EgtSetColor( iLine4, cColor)
|
||||
end
|
||||
end
|
||||
|
||||
-- Quota verticale (bSide: false sx, true dx)
|
||||
function CreateLinearDimensionOnY( nParentId, ptP1, ptP2, sText, iTextSize, dDistance, dLenArr, dDistText, bSide, sVar, iFrame, cColor)
|
||||
|
||||
if not iFrame then
|
||||
iFrame = GDB_RT.LOC
|
||||
end
|
||||
|
||||
local ptSx -- punto a sinistra
|
||||
local ptDx -- punto a destra
|
||||
|
||||
if ptP1:getX() < ptP2:getX() - GEO.EPS_SMALL then
|
||||
ptSx = Point3d(ptP1)
|
||||
ptDx = Point3d(ptP2)
|
||||
else
|
||||
ptSx = Point3d(ptP2)
|
||||
ptDx = Point3d(ptP1)
|
||||
end
|
||||
|
||||
if not bSide then -- Quotatura a sinistra
|
||||
|
||||
if abs(ptSx:getY() - ptDx:getY()) < GEO.EPS_SMALL then -- Caso di quota nulla
|
||||
|
||||
local Uvx = Vector3d(-1, 0, 0)
|
||||
local iLine = EgtLinePVL(nParentId, ptDx, Uvx, dDistance + ptDx:getX() - ptSx:getX(), iFrame)
|
||||
local pText = Point3d(ptSx:getX() - dDistance - dDistText, ptSx:getY(),0)
|
||||
local TextId = EgtTextAdv(nParentId, pText, 0, sText,"", 400,"S", iTextSize, 1, 0, GDB_TI.MR,iFrame)
|
||||
EgtSetInfo( TextId, 'Var', sVar)
|
||||
|
||||
if cColor then
|
||||
EgtSetColor( iLine, cColor)
|
||||
EgtSetColor( TextId, cColor)
|
||||
end
|
||||
else -- Caso di quota non nulla
|
||||
|
||||
local ptSx1 = Point3d(ptSx:getX() - dDistance, ptSx:getY(), 0)
|
||||
local ptDx1 = Point3d(ptSx:getX() - dDistance, ptDx:getY(), 0)
|
||||
|
||||
local iLine1 = EgtLine(nParentId, ptSx, ptSx1, iFrame)
|
||||
local iLine2 = EgtLine(nParentId, ptDx, ptDx1, iFrame)
|
||||
|
||||
local ptSx2 = Point3d(ptSx:getX() - (dDistance - 0.5 * dLenArr), ptSx:getY(), 0)
|
||||
local ptDx2 = Point3d(ptSx:getX() - (dDistance - 0.5 * dLenArr), ptDx:getY(), 0)
|
||||
|
||||
local iLine3 = EgtLine(nParentId, ptSx2, ptDx2, iFrame)
|
||||
Arrows(nParentId, ptSx2, ptDx2, dLenArr, iFrame, cColor)
|
||||
|
||||
local pText = Point3d(ptSx1:getX() - dDistText, (ptSx1:getY() + ptDx1:getY())/2,0)
|
||||
local TextId = EgtTextAdv(nParentId, pText, 0, sText,"", 400,"S", iTextSize, 1, 0, GDB_TI.MR)
|
||||
EgtSetInfo( TextId, 'Var', sVar)
|
||||
|
||||
if cColor then
|
||||
EgtSetColor( iLine1, cColor)
|
||||
EgtSetColor( iLine2, cColor)
|
||||
EgtSetColor( iLine3, cColor)
|
||||
EgtSetColor( TextId, cColor)
|
||||
end
|
||||
end
|
||||
else -- Quotatura a destra
|
||||
|
||||
if abs(ptSx:getY() - ptDx:getY()) < GEO.EPS_SMALL then -- Caso di quota nulla
|
||||
|
||||
local Uvx = Vector3d(1, 0, 0)
|
||||
local iLine = EgtLinePVL(nParentId, ptSx, Uvx, dDistance + ptDx:getX() - ptSx:getX(), iFrame)
|
||||
local pText = Point3d(ptDx:getX() + dDistance + dDistText, ptSx:getY(),0)
|
||||
local TextId = EgtTextAdv(nParentId, pText, 0, sText,"", 400,"S", iTextSize, 1, 0, GDB_TI.ML,iFrame)
|
||||
EgtSetInfo( TextId, 'Var', sVar)
|
||||
|
||||
if cColor then
|
||||
EgtSetColor( iLine, cColor)
|
||||
EgtSetColor( TextId, cColor)
|
||||
end
|
||||
else -- Caso di quota non nulla
|
||||
|
||||
local ptSx1 = Point3d(ptDx:getX() + dDistance, ptSx:getY(), 0)
|
||||
local ptDx1 = Point3d(ptDx:getX() + dDistance, ptDx:getY(), 0)
|
||||
|
||||
local iLine1 = EgtLine(nParentId, ptSx, ptSx1, iFrame)
|
||||
local iLine2 = EgtLine(nParentId, ptDx, ptDx1, iFrame)
|
||||
|
||||
local ptSx2 = Point3d(ptDx:getX() + (dDistance - 0.5 * dLenArr), ptSx:getY(), 0)
|
||||
local ptDx2 = Point3d(ptDx:getX() + (dDistance - 0.5 * dLenArr), ptDx:getY(), 0)
|
||||
|
||||
local iLine3 = EgtLine(nParentId, ptSx2, ptDx2, iFrame)
|
||||
Arrows(nParentId, ptSx2, ptDx2, dLenArr, iFrame, cColor)
|
||||
|
||||
local pText = Point3d(ptDx1:getX() + dDistText, (ptSx1:getY() + ptDx1:getY())/2,0)
|
||||
local TextId = EgtTextAdv(nParentId, pText, 0, sText,"", 400,"S", iTextSize, 1, 0, GDB_TI.ML,iFrame)
|
||||
EgtSetInfo( TextId, 'Var', sVar)
|
||||
|
||||
if cColor then
|
||||
EgtSetColor( iLine1, cColor)
|
||||
EgtSetColor( iLine2, cColor)
|
||||
EgtSetColor( iLine3, cColor)
|
||||
EgtSetColor( TextId, cColor)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Quota orizzontale (bSide: false down, true up)
|
||||
function CreateLinearDimensionOnX( nParentId, ptP1, ptP2, sText, iTextSize, dDistance, dLenArr, dDistText, bSide, sVar, iFrame, cColor, bRadius, bShiftLeft)
|
||||
|
||||
if not iFrame then
|
||||
iFrame = GDB_RT.LOC
|
||||
end
|
||||
|
||||
local ptDw -- punto in basso
|
||||
local ptUp -- punto in alto
|
||||
|
||||
if ptP1:getY() < ptP2:getY() - GEO.EPS_SMALL then
|
||||
ptDw = Point3d( ptP1)
|
||||
ptUp = Point3d( ptP2)
|
||||
else
|
||||
ptDw = Point3d( ptP2)
|
||||
ptUp = Point3d( ptP1)
|
||||
end
|
||||
|
||||
-- Quotatura in basso
|
||||
if not bSide then
|
||||
|
||||
-- Caso di quota nulla
|
||||
if abs(ptDw:getX() - ptUp:getX()) < GEO.EPS_SMALL then
|
||||
|
||||
local UvY = Vector3d(0, -1, 0)
|
||||
local iLine = EgtLinePVL(nParentId, ptUp, UvY, ptUp:getY() - ptDw:getY() + dDistance, iFrame)
|
||||
local pText = Point3d(ptDw:getX(), ptDw:getY() - dDistance - dDistText,0)
|
||||
local TextId = EgtTextAdv(nParentId, pText, 0, sText,"", 400,"S", iTextSize, 1, 0, GDB_TI.TC,iFrame)
|
||||
EgtSetInfo( TextId, 'Var', sVar)
|
||||
if bShiftLeft then
|
||||
EgtMove( TextId, Vector3d(-dLenArr/2, dLenArr + abs(ptDw:getX() - ptUp:getX()) + 20, 0))
|
||||
end
|
||||
if cColor then
|
||||
EgtSetColor( iLine, cColor)
|
||||
EgtSetColor( TextId, cColor)
|
||||
end
|
||||
|
||||
-- Caso di quota non nulla
|
||||
else
|
||||
local ptDw1
|
||||
local ptUp1
|
||||
local ptDw2
|
||||
local ptUp2
|
||||
local iLine1
|
||||
local iLine2
|
||||
|
||||
if not bRadius then
|
||||
ptDw1 = Point3d(ptDw:getX(), ptDw:getY() - dDistance, 0)
|
||||
ptUp1 = Point3d(ptUp:getX(), ptDw:getY() - dDistance, 0)
|
||||
|
||||
iLine1 = EgtLine(nParentId, ptDw, ptDw1, iFrame)
|
||||
iLine2 = EgtLine(nParentId, ptUp, ptUp1, iFrame)
|
||||
|
||||
ptDw2 = Point3d(ptDw:getX(), ptDw:getY() - (dDistance - 0.5 * dLenArr), 0)
|
||||
ptUp2 = Point3d(ptUp:getX(), ptDw:getY() - (dDistance - 0.5 * dLenArr), 0)
|
||||
else
|
||||
ptDw1 = Point3d(ptDw:getX(), ptDw:getY(), 0)
|
||||
ptUp1 = Point3d(ptUp:getX(), ptDw:getY(), 0)
|
||||
ptDw2 = Point3d(ptDw:getX(), ptDw:getY(), 0)
|
||||
ptUp2 = Point3d(ptUp:getX(), ptDw:getY(), 0)
|
||||
end
|
||||
|
||||
local iLine3 = EgtLine(nParentId, ptDw2, ptUp2, iFrame)
|
||||
Arrows(nParentId, ptDw2, ptUp2, dLenArr, iFrame, cColor, bRadius)
|
||||
|
||||
local pText = Point3d((ptDw1:getX() + ptUp1:getX())/2, ptDw1:getY() - dDistText,0)
|
||||
local TextId = EgtTextAdv(nParentId, pText, 0, sText,"", 400,"S", iTextSize, 1, 0, GDB_TI.TC,iFrame)
|
||||
EgtSetInfo( TextId, 'Var', sVar)
|
||||
if bShiftLeft then
|
||||
EgtMove( TextId, Vector3d(-dLenArr/2, dLenArr + abs(ptDw:getX() - ptUp:getX()) + 20, 0))
|
||||
end
|
||||
|
||||
if cColor then
|
||||
if not bRadius then
|
||||
EgtSetColor( iLine1, cColor)
|
||||
EgtSetColor( iLine2, cColor)
|
||||
end
|
||||
EgtSetColor( iLine3, cColor)
|
||||
EgtSetColor( TextId, cColor)
|
||||
end
|
||||
end
|
||||
|
||||
-- Quotatura in alto
|
||||
else
|
||||
|
||||
-- Caso di quota nulla
|
||||
if abs( ptDw:getX() - ptUp:getX()) < GEO.EPS_SMALL then
|
||||
|
||||
local UvY = Vector3d(0, 1, 0)
|
||||
local iLine = EgtLinePVL(nParentId, ptDw, UvY, ptUp:getY() - ptDw:getY() + dDistance, iFrame)
|
||||
local pText = Point3d(ptUp:getX(), ptUp:getY() + dDistance + dDistText,0)
|
||||
local TextId = EgtTextAdv(nParentId, pText, 0, sText,"", 400,"S", iTextSize, 1, 0, GDB_TI.BC,iFrame)
|
||||
EgtSetInfo( TextId, 'Var', sVar)
|
||||
if bShiftLeft then
|
||||
EgtMove( TextId, Vector3d(-dLenArr/2, dLenArr + abs(ptDw:getX() - ptUp:getX()) + 20, 0))
|
||||
end
|
||||
if cColor then
|
||||
EgtSetColor( iLine, cColor)
|
||||
EgtSetColor( TextId, cColor)
|
||||
end
|
||||
|
||||
-- Caso di quota non nulla
|
||||
else
|
||||
local ptDw1
|
||||
local ptUp1
|
||||
local ptDw2
|
||||
local ptUp2
|
||||
local iLine1
|
||||
local iLine2
|
||||
|
||||
if not bRadius then
|
||||
|
||||
ptDw1 = Point3d( ptDw:getX(), ptUp:getY() + dDistance, 0)
|
||||
ptUp1 = Point3d( ptUp:getX(), ptUp:getY() + dDistance, 0)
|
||||
|
||||
iLine1 = EgtLine( nParentId, ptDw, ptDw1, iFrame)
|
||||
iLine2 = EgtLine( nParentId, ptUp, ptUp1, iFrame)
|
||||
|
||||
ptDw2 = Point3d( ptDw:getX(), ptUp:getY() + (dDistance - 0.5 * dLenArr), 0)
|
||||
ptUp2 = Point3d( ptUp:getX(), ptUp:getY() + (dDistance - 0.5 * dLenArr), 0)
|
||||
else
|
||||
|
||||
ptDw1 = Point3d( ptDw:getX(), ptUp:getY(), 0)
|
||||
ptUp1 = Point3d( ptUp:getX(), ptUp:getY(), 0)
|
||||
ptDw2 = Point3d( ptDw:getX(), ptUp:getY(), 0)
|
||||
ptUp2 = Point3d( ptUp:getX(), ptUp:getY(), 0)
|
||||
end
|
||||
|
||||
local iLine3 = EgtLine( nParentId, ptDw2, ptUp2, iFrame)
|
||||
Arrows( nParentId, ptDw2, ptUp2, dLenArr, iFrame, cColor, bRadius)
|
||||
|
||||
local pText = Point3d( ( ptDw1:getX() + ptUp1:getX()) / 2, ptUp1:getY() + dDistText, 0)
|
||||
local TextId = EgtTextAdv( nParentId, pText, 0, sText,"", 400,"S", iTextSize, 1, 0, GDB_TI.BC,iFrame)
|
||||
if bShiftLeft then
|
||||
EgtMove( TextId, Vector3d( -dLenArr/2, dLenArr + abs( ptDw:getX() - ptUp:getX()) + 20, 0))
|
||||
end
|
||||
EgtSetInfo( TextId, 'Var', sVar)
|
||||
|
||||
if cColor then
|
||||
if not bRadius then
|
||||
EgtSetColor( iLine1, cColor)
|
||||
EgtSetColor( iLine2, cColor)
|
||||
end
|
||||
EgtSetColor( iLine3, cColor)
|
||||
EgtSetColor( TextId, cColor)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Quota allineata (bSide: false sx, true dx)
|
||||
function CreateLinearDimensionAligned( nParentId, ptP1, ptP2, sText, dTextSize, dDistance, dLenArr, dDistText, bSide, sVar, iFrame, cColor)
|
||||
|
||||
if not iFrame then
|
||||
iFrame = GDB_RT.LOC
|
||||
end
|
||||
|
||||
-- Se punti coincidenti, esco
|
||||
if AreSamePointApprox(ptP1,ptP2) then
|
||||
return false
|
||||
end
|
||||
|
||||
-- Se quotatura orizzontale, uso questa
|
||||
if abs(ptP1:getY() - ptP2:getY()) < GEO.EPS_SMALL then
|
||||
-- adatto il lato
|
||||
if ptP2:getX() > ptP1:getX() then
|
||||
bSide = not bSide
|
||||
end
|
||||
CreateLinearDimensionOnX(nParentId, ptP1, ptP2, sText, dTextSize, dDistance, dLenArr, dDistText, bSide, sVar, iFrame, cColor)
|
||||
return true
|
||||
end
|
||||
|
||||
local Vv = ptP2 - ptP1
|
||||
Vv:normalize()
|
||||
|
||||
local AngText = atan2( Vv:getY(), Vv:getX())
|
||||
local bAngModif = false
|
||||
if AngText > 90 then
|
||||
AngText = AngText - 180
|
||||
bAngModif = true
|
||||
elseif AngText < - 90 then
|
||||
AngText = AngText + 180
|
||||
bAngModif = true
|
||||
end
|
||||
|
||||
if bSide then
|
||||
Vv:rotate(Z_AX(),-90)
|
||||
if bAngModif then
|
||||
PointType = GDB_TI.BC
|
||||
else
|
||||
PointType = GDB_TI.TC
|
||||
end
|
||||
else
|
||||
Vv:rotate(Z_AX(),90)
|
||||
if bAngModif then
|
||||
PointType = GDB_TI.TC
|
||||
else
|
||||
PointType = GDB_TI.BC
|
||||
end
|
||||
end
|
||||
|
||||
local iLine1 = EgtLinePVL(nParentId,ptP1, Vv, dDistance, iFrame)
|
||||
local iLine2 = EgtLinePVL(nParentId,ptP2, Vv, dDistance, iFrame)
|
||||
|
||||
local ptP1M = ptP1 + (dDistance - 0.5 * dLenArr) * Vv
|
||||
local ptP2M = ptP2 + (dDistance - 0.5 * dLenArr) * Vv
|
||||
|
||||
local iLine3 = EgtLine(nParentId, ptP1M, ptP2M, iFrame)
|
||||
Arrows(nParentId, ptP1M, ptP2M, dLenArr, iFrame, cColor)
|
||||
|
||||
local ptText = 0.5 * ( ptP1 + ptP2) + ( dDistance + dDistText) * Vv
|
||||
local TextId = EgtTextAdv(nParentId, ptText, AngText , sText,"", 400,"S", dTextSize, 1, 0, PointType,iFrame)
|
||||
EgtSetInfo( TextId, 'Var', sVar)
|
||||
|
||||
if cColor then
|
||||
EgtSetColor( iLine1, cColor)
|
||||
EgtSetColor( iLine2, cColor)
|
||||
EgtSetColor( iLine3, cColor)
|
||||
EgtSetColor( TextId, cColor)
|
||||
end
|
||||
end
|
||||
|
||||
-- Quota radiale (bSide: false sx, true dx)
|
||||
function CreateRadialDimension( nParentId, ptC, ptP1, sText, dTextSize, dDistance, dLenArr, dDistText, bSide, sVar, iFrame, cColor)
|
||||
|
||||
if not iFrame then
|
||||
iFrame = GDB_RT.LOC
|
||||
end
|
||||
|
||||
-- Se punti coincidenti, esco
|
||||
if AreSamePointApprox(ptC,ptP1) then
|
||||
return false
|
||||
end
|
||||
|
||||
-- Se quotatura orizzontale, uso questa
|
||||
if abs( ptC:getY() - ptP1:getY()) < GEO.EPS_SMALL then
|
||||
-- adatto il lato
|
||||
if ptP1:getX() > ptC:getX() then
|
||||
bSide = not bSide
|
||||
end
|
||||
CreateLinearDimensionOnX( nParentId, ptC, ptP1, sText, dTextSize, dDistance, dLenArr, dDistText, bSide, sVar, iFrame, cColor, true)
|
||||
return true
|
||||
end
|
||||
|
||||
local Vv = ptP1 - ptC
|
||||
Vv:normalize()
|
||||
|
||||
local AngText = atan2( Vv:getY(), Vv:getX())
|
||||
local bAngModif = false
|
||||
if AngText > 90 then
|
||||
AngText = AngText - 180
|
||||
bAngModif = true
|
||||
elseif AngText < - 90 then
|
||||
AngText = AngText + 180
|
||||
bAngModif = true
|
||||
end
|
||||
|
||||
local ptText
|
||||
if bSide == nil then
|
||||
AngText = 0
|
||||
Vv = - Vv
|
||||
ptText = ptC + ( dDistText + 0.5 * dTextSize) * Vv
|
||||
PointType = GDB_TI.MC
|
||||
elseif bSide then
|
||||
Vv:rotate( Z_AX(), -90)
|
||||
ptText = 0.5 * ( ptC + ptP1) + ( dDistText) * Vv
|
||||
PointType = EgtIf( bAngModif, GDB_TI.BC, GDB_TI.TC)
|
||||
|
||||
else
|
||||
Vv:rotate( Z_AX(), 90)
|
||||
ptText = 0.5 * ( ptC + ptP1) + ( dDistText) * Vv
|
||||
PointType = EgtIf( bAngModif, GDB_TI.TC, GDB_TI.BC)
|
||||
end
|
||||
|
||||
local iLine3 = EgtLine( nParentId, ptC, ptP1, iFrame)
|
||||
Arrows( nParentId, ptC, ptP1, dLenArr, iFrame, cColor, true)
|
||||
|
||||
local TextId = EgtTextAdv( nParentId, ptText, AngText , sText,"", 400,"S", dTextSize, 1, 0, PointType, iFrame)
|
||||
EgtSetInfo( TextId, 'Var', sVar)
|
||||
|
||||
if cColor then
|
||||
EgtSetColor( iLine3, cColor)
|
||||
EgtSetColor( TextId, cColor)
|
||||
end
|
||||
end
|
||||
|
||||
-- Quota angolare (bSide: false = text external, true dx = text internal)
|
||||
function CreateAngleDimension( nParentId, ptC, dDir, sText, dTextSize, dAngVal, dAmpArc, dDistance, dLenArr, dDistText, bSide, sVar, iFrame, cColor)
|
||||
|
||||
if not iFrame then
|
||||
iFrame = GDB_RT.LOC
|
||||
end
|
||||
|
||||
-- Se distanza quota nulla, esco
|
||||
if abs(dAmpArc) < GEO.EPS_SMALL or abs(dAngVal) < GEO.EPS_SMALL then
|
||||
return false
|
||||
end
|
||||
|
||||
-- disegno linee da quotare
|
||||
local iLine1 = EgtLinePDL(nParentId, ptC, dDir, dAmpArc, iFrame)
|
||||
local iLine2 = EgtLinePDL(nParentId, ptC, dDir+dAngVal, dAmpArc, iFrame)
|
||||
-- prendo i punti finali delle due linee
|
||||
local ptP1 = EgtEP(iLine1)
|
||||
local ptP2 = EgtEP(iLine2)
|
||||
-- allungo di nuovo le linee della distanza extra
|
||||
EgtTrimExtendCurveByLen( iLine1, dDistance,ptP1)
|
||||
EgtTrimExtendCurveByLen( iLine2, dDistance,ptP2)
|
||||
-- arco
|
||||
local iArc1 = EgtArcCPA( nParentId, ptC, ptP1, dAngVal, 0, iFrame)
|
||||
local pPt3 = EgtMP(iArc1)
|
||||
|
||||
-- frecce
|
||||
local iLine3
|
||||
local ptP4
|
||||
local nNeg = -1
|
||||
if dAngVal > 0 then
|
||||
nNeg = 1
|
||||
end
|
||||
-- faccio linee che parte da punto di freccia perpendicolare a linea di quota
|
||||
iLine3 = EgtLinePDL(nParentId, ptP1, dDir+(90*nNeg), dAmpArc, iFrame)
|
||||
ptP4 = EgtEP(iLine3)
|
||||
EgtErase(iLine3)
|
||||
-- prima freccia sulla prima linea
|
||||
Arrows( nParentId, ptP4, ptP1, dLenArr, iFrame, cColor, true)
|
||||
|
||||
iLine3 = EgtLinePDL(nParentId, ptP2, dDir+dAngVal-(90*nNeg), dAmpArc, iFrame)
|
||||
ptP4 = EgtEP(iLine3)
|
||||
EgtErase(iLine3)
|
||||
-- seconda freccia sulla seconda linea
|
||||
Arrows( nParentId, ptP4, ptP2, dLenArr, iFrame, cColor, true)
|
||||
|
||||
local Vv = ptP1 - ptC
|
||||
Vv:normalize()
|
||||
|
||||
local AngText = 0
|
||||
local bAngModif = false
|
||||
|
||||
local ptText
|
||||
if bSide == nil then
|
||||
ptText = pPt3 + ( dDistText + 0.5 * dTextSize) * Vv
|
||||
PointType = GDB_TI.MC
|
||||
elseif bSide then
|
||||
ptText = pPt3 + ( dDistText + 0.5 * dTextSize) * Vv
|
||||
PointType = GDB_TI.MC
|
||||
else
|
||||
ptText = pPt3 - ( dDistText + 0.5 * dTextSize) * Vv
|
||||
PointType = GDB_TI.MC
|
||||
end
|
||||
|
||||
local TextId = EgtTextAdv( nParentId, ptText, AngText , sText,"", 400,"S", dTextSize, 1, 0, PointType, iFrame)
|
||||
EgtSetInfo( TextId, 'Var', sVar)
|
||||
|
||||
if cColor then
|
||||
EgtSetColor( iLine1, cColor)
|
||||
EgtSetColor( iLine2, cColor)
|
||||
EgtSetColor( iArc1, cColor)
|
||||
EgtSetColor( TextId, cColor)
|
||||
end
|
||||
end
|
||||
|
||||
return EgtDimension
|
||||
@@ -0,0 +1,263 @@
|
||||
-- EgtFrame3d.lua by EgalTech s.r.l. 2020/09/29
|
||||
|
||||
-- Tavola per definizione modulo (serve ma non usata)
|
||||
local EgtFrame3d = {}
|
||||
|
||||
EgtOutLog( 'EgtFrame3d started', 1)
|
||||
|
||||
-- Include
|
||||
require( 'EgtPoint3d')
|
||||
--EnableDebug( false)
|
||||
|
||||
|
||||
-- Definizione classe Frame3d
|
||||
Frame3d = {{},{},{},{}}
|
||||
Frame3d.__index = Frame3d
|
||||
|
||||
-- funzione di utilita' per identificazione tipo
|
||||
function isFrame3d( a)
|
||||
return ( getmetatable( a) == Frame3d)
|
||||
end
|
||||
|
||||
local function New( a, b, c, d)
|
||||
local f3d = setmetatable( {{0,0,0},{1,0,0},{0,1,0},{0,0,1}}, Frame3d)
|
||||
local function SetVersors( type)
|
||||
if type == GDB_FR.FRONT then
|
||||
f3d[2] = X_AX() ; f3d[3] = Z_AX() ; f3d[4] = -Y_AX()
|
||||
elseif type == GDB_FR.RIGHT then
|
||||
f3d[2] = Y_AX() ; f3d[3] = Z_AX() ; f3d[4] = X_AX()
|
||||
elseif type == GDB_FR.BACK then
|
||||
f3d[2] = -X_AX() ; f3d[3] = Z_AX() ; f3d[4] = Y_AX()
|
||||
elseif type == GDB_FR.LEFT then
|
||||
f3d[2] = -Y_AX() ; f3d[3] = Z_AX() ; f3d[4] = -X_AX()
|
||||
elseif type == GDB_FR.BOTTOM then
|
||||
f3d[2] = X_AX() ; f3d[3] = -Y_AX() ; f3d[4] = -Z_AX()
|
||||
else -- GDB_FR.TOP
|
||||
f3d[2] = X_AX() ; f3d[3] = Y_AX() ; f3d[4] = Z_AX()
|
||||
end
|
||||
end
|
||||
if not a then
|
||||
f3d[1] = Point3d( 0, 0, 0)
|
||||
SetVersors( GDB_FR.TOP)
|
||||
elseif isFrame3d( a) then
|
||||
f3d[1] = a[1]
|
||||
f3d[2] = a[2]
|
||||
f3d[3] = a[3]
|
||||
f3d[4] = a[4]
|
||||
elseif type(a) == 'table' and #a >= 4 and
|
||||
type(a[1]) == 'table' and #a[1] >= 3 and
|
||||
type(a[2]) == 'table' and #a[2] >= 3 and
|
||||
type(a[3]) == 'table' and #a[3] >= 3 and
|
||||
type(a[4]) == 'table' and #a[4] >= 3 then
|
||||
f3d[1] = Point3d( a[1])
|
||||
f3d[2] = Vector3d( a[2])
|
||||
f3d[3] = Vector3d( a[3])
|
||||
f3d[4] = Vector3d( a[4])
|
||||
f3d[2]:normalize()
|
||||
f3d[3]:normalize()
|
||||
f3d[4]:normalize()
|
||||
if not Frame3d.isValid( f3d) then
|
||||
error( 'Error in FrameIsValid', 2)
|
||||
end
|
||||
elseif isPoint3d( a) and isVector3d( b) and isVector3d( c) and isVector3d( d) then
|
||||
f3d[1] = a
|
||||
f3d[2] = b
|
||||
f3d[3] = c
|
||||
f3d[4] = d
|
||||
f3d[2]:normalize()
|
||||
f3d[3]:normalize()
|
||||
f3d[4]:normalize()
|
||||
if not Frame3d.isValid( f3d) then
|
||||
error( 'Error in FrameIsValid', 2)
|
||||
end
|
||||
elseif isPoint3d( a) and isVector3d( b) then
|
||||
local bOk, Ocs = EgtFrameOCS( a, b)
|
||||
if bOk then
|
||||
f3d[1] = Point3d( Ocs[1])
|
||||
f3d[2] = Vector3d( Ocs[2])
|
||||
f3d[3] = Vector3d( Ocs[3])
|
||||
f3d[4] = Vector3d( Ocs[4])
|
||||
else
|
||||
error( 'Error in EgtFrameOCS', 2)
|
||||
end
|
||||
elseif isPoint3d( a) and isPoint3d( b) and isPoint3d( c) then
|
||||
local bOk, f3P = EgtFrameFrom3Points( a, b, c)
|
||||
if bOk then
|
||||
f3d[1] = Point3d( f3P[1])
|
||||
f3d[2] = Vector3d( f3P[2])
|
||||
f3d[3] = Vector3d( f3P[3])
|
||||
f3d[4] = Vector3d( f3P[4])
|
||||
else
|
||||
error( 'Error in EgtFrameFrom3Points', 2)
|
||||
end
|
||||
elseif isPoint3d( a) then
|
||||
f3d[1] = a
|
||||
SetVersors( b)
|
||||
elseif type(a) == 'number' and type( b) == 'number' and type( c) == 'number' then
|
||||
f3d[1] = Point3d( a, b, c)
|
||||
SetVersors( d)
|
||||
else
|
||||
error( 'A parameter is wrong', 2)
|
||||
end
|
||||
return f3d
|
||||
end
|
||||
|
||||
setmetatable( Frame3d, { __call = function( _, ...) return New( ...) end })
|
||||
|
||||
-- verifica validità
|
||||
function Frame3d:isValid()
|
||||
-- verifico che i versori siano normalizzati
|
||||
if not self[2]:isNormalized() or
|
||||
not self[3]:isNormalized() or
|
||||
not self[4]:isNormalized() then
|
||||
return false
|
||||
end
|
||||
-- verifico che i versori siano mutuamente ortogonali
|
||||
if math.abs( self[2][1] * self[3][1] + self[2][2] * self[3][2] + self[2][3] * self[3][3]) > GEO.EPS_ZERO or
|
||||
math.abs( self[3][1] * self[4][1] + self[3][2] * self[4][2] + self[3][3] * self[4][3]) > GEO.EPS_ZERO or
|
||||
math.abs( self[4][1] * self[2][1] + self[4][2] * self[2][2] + self[4][3] * self[2][3]) > GEO.EPS_ZERO then
|
||||
return false
|
||||
end
|
||||
-- verifico il senso destrorso della terna
|
||||
if Vector3d.TripleProd( self[2], self[3], self[4]) < GEO.EPS_ZERO then
|
||||
return false
|
||||
end
|
||||
-- tutto bene
|
||||
return true
|
||||
end
|
||||
|
||||
-- traslazione
|
||||
function Frame3d:move( m)
|
||||
if not isFrame3d( self) then
|
||||
return false
|
||||
end
|
||||
if isVector3d( m) then
|
||||
self[1] = self[1] + m
|
||||
return true
|
||||
elseif type( m) == 'table' and #m >= 3 then
|
||||
self[1] = self[1] + Vector3d( m)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
-- rotazione
|
||||
function Frame3d:rotate( ptAx, vtAx, dAngDeg)
|
||||
if not isFrame3d( self) or not isPoint3d( ptAx) or not isVector3d( vtAx) or type( dAngDeg) ~= 'number' then
|
||||
return false
|
||||
end
|
||||
local bOk, fRot = EgtFrameRotate( self, ptAx, vtAx, dAngDeg)
|
||||
if bOk then
|
||||
self[1] = Point3d( fRot[1])
|
||||
self[2] = Vector3d( fRot[2])
|
||||
self[3] = Vector3d( fRot[3])
|
||||
self[4] = Vector3d( fRot[4])
|
||||
end
|
||||
return bOk
|
||||
end
|
||||
|
||||
-- inversione (trasformazione inversa)
|
||||
function Frame3d:invert()
|
||||
if not isFrame3d( self) then
|
||||
return false
|
||||
end
|
||||
local bOk, frInv = EgtFrameToLoc( Frame3d(), self)
|
||||
if bOk then
|
||||
self[1] = Point3d( frInv[1])
|
||||
self[2] = Vector3d( frInv[2])
|
||||
self[3] = Vector3d( frInv[3])
|
||||
self[4] = Vector3d( frInv[4])
|
||||
end
|
||||
return bOk
|
||||
end
|
||||
|
||||
-- trasformazione di riferimento verso globale
|
||||
function Frame3d:toGlob( fTool)
|
||||
if not isFrame3d( self) or not isFrame3d( fTool) then
|
||||
return false
|
||||
end
|
||||
local bOk, fNew = EgtFrameToGlob( self, fTool)
|
||||
if bOk then
|
||||
self[1] = Point3d( fNew[1])
|
||||
self[2] = Vector3d( fNew[2])
|
||||
self[3] = Vector3d( fNew[3])
|
||||
self[4] = Vector3d( fNew[4])
|
||||
end
|
||||
return bOk
|
||||
end
|
||||
|
||||
-- trasformazione di riferimento verso locale
|
||||
function Frame3d:toLoc( fTool)
|
||||
if not isFrame3d( self) or not isFrame3d( fTool) then
|
||||
return false
|
||||
end
|
||||
local bOk, fNew = EgtFrameToLoc( self, fTool)
|
||||
if bOk then
|
||||
self[1] = Point3d( fNew[1])
|
||||
self[2] = Vector3d( fNew[2])
|
||||
self[3] = Vector3d( fNew[3])
|
||||
self[4] = Vector3d( fNew[4])
|
||||
end
|
||||
return bOk
|
||||
end
|
||||
|
||||
-- trasformazione di riferimento da locale a locale
|
||||
function Frame3d:locToLoc( fOri, fDest)
|
||||
if not isFrame3d( self) or not isFrame3d( fOri) or not isFrame3d( fDest) then
|
||||
return false
|
||||
end
|
||||
local bOk, fNew = EgtFrameLocToLoc( self, fOri, fDest)
|
||||
if bOk then
|
||||
self[1] = Point3d( fNew[1])
|
||||
self[2] = Vector3d( fNew[2])
|
||||
self[3] = Vector3d( fNew[3])
|
||||
self[4] = Vector3d( fNew[4])
|
||||
end
|
||||
return bOk
|
||||
end
|
||||
|
||||
-- restituzione componenti
|
||||
function Frame3d:getOrigin()
|
||||
return self[1]
|
||||
end
|
||||
|
||||
function Frame3d:getVersX()
|
||||
return self[2]
|
||||
end
|
||||
|
||||
function Frame3d:getVersY()
|
||||
return self[3]
|
||||
end
|
||||
|
||||
function Frame3d:getVersZ()
|
||||
return self[4]
|
||||
end
|
||||
|
||||
-- conversione in stringa (tostring)
|
||||
function Frame3d:__tostring()
|
||||
return '('.. tostring(self[1])..','..tostring(self[2])..','..tostring(self[3])..','..tostring(self[4]) ..')'
|
||||
end
|
||||
|
||||
-- Angoli di rotazione di Eulero da Frame
|
||||
function GetRotCAC1FromFrame( frRef)
|
||||
if not isFrame3d( frRef) then
|
||||
return nil
|
||||
end
|
||||
return EgtFrameGetRotCAC1( frRef)
|
||||
end
|
||||
|
||||
-- Angoli di rotazione attorno ad assi XYZ fissi da Frame
|
||||
function GetFixedAxesRotABCFromFrame( frRef)
|
||||
if not isFrame3d( frRef) then
|
||||
return nil
|
||||
end
|
||||
return EgtFrameGetFixedAxesRotABC( frRef)
|
||||
end
|
||||
|
||||
-- Riferimenti notevoli
|
||||
function GLOB_FRM()
|
||||
return Frame3d()
|
||||
end
|
||||
|
||||
return EgtFrame3d
|
||||
@@ -0,0 +1,15 @@
|
||||
-- EgtLinearDimension.lua by EgalTech s.r.l. 2018/12/22
|
||||
-- Creazione di una quota
|
||||
-- 2018/12/22 DS Rinominato in EgtDimension, tenuto per compatibilità.
|
||||
|
||||
|
||||
|
||||
-- Tavola per definizione modulo (serve ma non usata)
|
||||
local EgtLinearDimension = {}
|
||||
|
||||
require( 'EgtDimension')
|
||||
|
||||
CreateLinearDimensionRadial = CreateRadialDimension
|
||||
CreateAngleDimensionRadial = CreateAngleDimension
|
||||
|
||||
return EgtLinearDimension
|
||||
@@ -0,0 +1,279 @@
|
||||
-- EgtPoint3d.lua by EgalTech s.r.l. 2019/03/31
|
||||
|
||||
-- Tavola per definizione modulo (serve ma non usata)
|
||||
local EgtPoint3d = {}
|
||||
|
||||
EgtOutLog( 'EgtPoint3d started', 1)
|
||||
|
||||
-- Include
|
||||
require( 'EgtVector3d')
|
||||
--EnableDebug( false)
|
||||
|
||||
|
||||
-- Definizione classe Point3d
|
||||
Point3d = {}
|
||||
Point3d.__index = Point3d
|
||||
|
||||
-- funzione di utilita' per identificazione tipo
|
||||
function isPoint3d( a)
|
||||
return ( getmetatable( a) == Point3d)
|
||||
end
|
||||
|
||||
local function New( x, y, z)
|
||||
local p3d = setmetatable( {0,0,0}, Point3d)
|
||||
if not x then
|
||||
return nil
|
||||
elseif isPoint3d( x) then
|
||||
p3d[1] = x[1]
|
||||
p3d[2] = x[2]
|
||||
p3d[3] = x[3]
|
||||
elseif type(x) == 'table' and #x >= 3 then
|
||||
p3d[1] = x[1]
|
||||
p3d[2] = x[2]
|
||||
p3d[3] = x[3]
|
||||
elseif type( x) == 'number' and type( y) == 'number' and type( z) == 'number' then
|
||||
p3d[1] = x
|
||||
p3d[2] = y
|
||||
p3d[3] = z
|
||||
else
|
||||
error( 'A parameter is wrong', 2)
|
||||
end
|
||||
return p3d
|
||||
end
|
||||
|
||||
setmetatable( Point3d, { __call = function( _, ...) return New(...) end })
|
||||
|
||||
-- opposto di un punto (unary -)
|
||||
function Point3d:__unm()
|
||||
return New( - self[1], - self[2], - self[3])
|
||||
end
|
||||
|
||||
-- somma di due punti o un punto e un vettore (+)
|
||||
function Point3d.__add( a, b)
|
||||
if ( isPoint3d( a) and ( isPoint3d( b) or isVector3d( b))) or
|
||||
( isPoint3d( b) and ( isPoint3d( a) or isVector3d( a))) then
|
||||
return New( a[1] + b[1], a[2] + b[2], a[3] + b[3])
|
||||
else
|
||||
error( 'A parameter is wrong', 2)
|
||||
end
|
||||
end
|
||||
|
||||
-- sottrazione di due punti o un punto e un vettore, restituisce un vettore o un punto (-)
|
||||
function Point3d.__sub( a, b)
|
||||
if isPoint3d( a) and isPoint3d( b) then
|
||||
return Vector3d( a[1] - b[1], a[2] - b[2], a[3] - b[3])
|
||||
elseif ( isPoint3d( a) and isVector3d( b)) or ( isVector3d( a) and isPoint3d( b)) then
|
||||
return New( a[1] - b[1], a[2] - b[2], a[3] - b[3])
|
||||
else
|
||||
error( 'A parameter is wrong', 2)
|
||||
end
|
||||
end
|
||||
|
||||
-- moltiplicazione di un punto per un numero, di un numero per un punto (*)
|
||||
function Point3d.__mul( a, b)
|
||||
if type( a) == 'number' and isPoint3d( b) then
|
||||
return New( a * b[1], a * b[2], a * b[3])
|
||||
elseif isPoint3d( a) and type( b) == 'number' then
|
||||
return New( a[1] * b, a[2] * b, a[3] * b)
|
||||
else
|
||||
error( 'A parameter is wrong', 2)
|
||||
end
|
||||
end
|
||||
|
||||
-- divisione di un punto per un numero (/)
|
||||
function Point3d.__div( a, b)
|
||||
if isPoint3d( a) and type( b) == 'number' then
|
||||
return New( a[1] / b, a[2] / b, a[3] / b)
|
||||
else
|
||||
error( 'A parameter is wrong', 2)
|
||||
end
|
||||
end
|
||||
|
||||
-- traslazione
|
||||
function Point3d:move( m)
|
||||
if not isPoint3d( self) then
|
||||
return false
|
||||
end
|
||||
if isVector3d( m) or ( type( m) == 'table' and #m >= 3) then
|
||||
self[1] = self[1] + m[1]
|
||||
self[2] = self[2] + m[2]
|
||||
self[3] = self[3] + m[3]
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
-- rotazione
|
||||
function Point3d:rotate( ptAx, vtAx, dAngDeg)
|
||||
if not isPoint3d( self) or not isPoint3d( ptAx) or not isVector3d( vtAx) or not type( dAngDeg) == 'number' then
|
||||
return false
|
||||
end
|
||||
local bOk, pRot = EgtPointRotate( self, ptAx, vtAx, dAngDeg)
|
||||
if bOk then
|
||||
self[1] = pRot[1]
|
||||
self[2] = pRot[2]
|
||||
self[3] = pRot[3]
|
||||
end
|
||||
return bOk
|
||||
end
|
||||
|
||||
-- mirror
|
||||
function Point3d:mirror( ptOn, vtN)
|
||||
if not isPoint3d( self) or not isPoint3d( ptOn) or not isVector3d( vtN) then
|
||||
return false
|
||||
end
|
||||
local bOk, pMir = EgtPointMirror( self, ptOn, vtN)
|
||||
if bOk then
|
||||
self[1] = pMir[1]
|
||||
self[2] = pMir[2]
|
||||
self[3] = pMir[3]
|
||||
end
|
||||
return bOk
|
||||
end
|
||||
|
||||
-- trasformazione di riferimento verso globale
|
||||
function Point3d:toGlob( fTool)
|
||||
if not isPoint3d( self) or not isFrame3d( fTool) then
|
||||
return false
|
||||
end
|
||||
local bOk, pNew = EgtPointToGlob( self, fTool)
|
||||
if bOk then
|
||||
self[1] = pNew[1]
|
||||
self[2] = pNew[2]
|
||||
self[3] = pNew[3]
|
||||
end
|
||||
return bOk
|
||||
end
|
||||
|
||||
-- trasformazione di riferimento verso locale
|
||||
function Point3d:toLoc( fTool)
|
||||
if not isPoint3d( self) or not isFrame3d( fTool) then
|
||||
return false
|
||||
end
|
||||
local bOk, pNew = EgtPointToLoc( self, fTool)
|
||||
if bOk then
|
||||
self[1] = pNew[1]
|
||||
self[2] = pNew[2]
|
||||
self[3] = pNew[3]
|
||||
end
|
||||
return bOk
|
||||
end
|
||||
|
||||
-- trasformazione di riferimento da locale a locale
|
||||
function Point3d:locToLoc( fOri, fDest)
|
||||
if not isPoint3d( self) or not isFrame3d( fOri) or not isFrame3d( fDest) then
|
||||
return false
|
||||
end
|
||||
local bOk, pNew = EgtPointLocToLoc( self, fOri, fDest)
|
||||
if bOk then
|
||||
self[1] = pNew[1]
|
||||
self[2] = pNew[2]
|
||||
self[3] = pNew[3]
|
||||
end
|
||||
return bOk
|
||||
end
|
||||
|
||||
-- restituzione componenti
|
||||
function Point3d:getX()
|
||||
return self[1]
|
||||
end
|
||||
|
||||
function Point3d:getY()
|
||||
return self[2]
|
||||
end
|
||||
|
||||
function Point3d:getZ()
|
||||
return self[3]
|
||||
end
|
||||
|
||||
-- conversione in stringa (tostring)
|
||||
function Point3d:__tostring()
|
||||
return "(" .. EgtNumToString( self[1], 4) .. ", "
|
||||
.. EgtNumToString( self[2], 4) .. ", "
|
||||
.. EgtNumToString( self[3], 4) .. ")"
|
||||
end
|
||||
|
||||
|
||||
-- calcolo quadrato della distanza tra due punti
|
||||
function sqdist( a, b)
|
||||
if isPoint3d( a) and isPoint3d( b) then
|
||||
return ( ( a[1] - b[1]) * ( a[1] - b[1]) +
|
||||
( a[2] - b[2]) * ( a[2] - b[2]) +
|
||||
( a[3] - b[3]) * ( a[3] - b[3]))
|
||||
else
|
||||
error( 'A parameter is not a Point3d', 2)
|
||||
end
|
||||
end
|
||||
|
||||
-- calcolo distanza tra due punti
|
||||
function dist( a, b)
|
||||
if isPoint3d( a) and isPoint3d( b) then
|
||||
return math.sqrt( ( a[1] - b[1]) * ( a[1] - b[1]) +
|
||||
( a[2] - b[2]) * ( a[2] - b[2]) +
|
||||
( a[3] - b[3]) * ( a[3] - b[3]))
|
||||
else
|
||||
error( 'A parameter is not a Point3d', 2)
|
||||
end
|
||||
end
|
||||
|
||||
-- funzioni di confronto
|
||||
function AreSamePointApprox( a, b)
|
||||
if isPoint3d( a) and isPoint3d( b) then
|
||||
return ( a - b):isSmall()
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function AreSamePointExact( a, b)
|
||||
if isPoint3d( a) and isPoint3d( b) then
|
||||
return ( a - b):isZero()
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function AreSamePointEpsilon( a, b, eps)
|
||||
if isPoint3d( a) and isPoint3d( b) then
|
||||
return sqdist( a, b) < eps * eps
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
-- Creazione di punti da stringhe di tre numeri
|
||||
function PointFromString( sVal)
|
||||
if not sVal then
|
||||
return nil
|
||||
end
|
||||
local vsVal = EgtSplitString( sVal)
|
||||
if not vsVal then
|
||||
return nil
|
||||
end
|
||||
if #vsVal < 3 then
|
||||
return nil
|
||||
end
|
||||
return Point3d( tonumber( vsVal[1]), tonumber( vsVal[2]), tonumber( vsVal[3]))
|
||||
end
|
||||
|
||||
-- Creazione di punti da info di entità GeomDB
|
||||
function PointFromInfo( nId, sKey)
|
||||
PointFromString( EgtGetInfo( nId, sKey))
|
||||
end
|
||||
|
||||
-- Punti notevoli
|
||||
function ORIG()
|
||||
return Point3d(0,0,0)
|
||||
end
|
||||
|
||||
-- Punto con num aggiunto
|
||||
function Point4d( P1, P2, P3, P4)
|
||||
if isPoint3d( P1) and ( not P2 or type( P2) == 'number') then
|
||||
return { P1[1], P1[2], P1[3], P2 or 0}
|
||||
elseif type( P1) == 'number' and type( P2) == 'number' and type( P3) == 'number' and ( not P4 or type( P4) == 'number') then
|
||||
return { P1, P2, P3, P4 or 0}
|
||||
end
|
||||
end
|
||||
|
||||
return EgtPoint3d
|
||||
@@ -0,0 +1,424 @@
|
||||
-- EgtVector3d.lua by EgalTech s.r.l. 2022/01/11
|
||||
|
||||
-- Tavola per definizione modulo (serve ma non usata)
|
||||
local EgtVector3d = {}
|
||||
|
||||
EgtOutLog( 'EgtVector3d started', 1)
|
||||
|
||||
-- Include
|
||||
require( 'EgtConst')
|
||||
--EnableDebug( false)
|
||||
|
||||
|
||||
-- Definizione classe Vector3d
|
||||
Vector3d = {}
|
||||
Vector3d.__index = Vector3d
|
||||
|
||||
-- funzione di utilita' per identificazione tipo
|
||||
function isVector3d( a)
|
||||
return ( getmetatable( a) == Vector3d)
|
||||
end
|
||||
|
||||
local function New( x, y, z)
|
||||
local v3d = setmetatable( {0,0,0}, Vector3d)
|
||||
if not x then
|
||||
return nil
|
||||
elseif isVector3d( x) then
|
||||
v3d[1] = x[1]
|
||||
v3d[2] = x[2]
|
||||
v3d[3] = x[3]
|
||||
elseif type(x) == 'table' and #x >= 3 then
|
||||
v3d[1] = x[1]
|
||||
v3d[2] = x[2]
|
||||
v3d[3] = x[3]
|
||||
elseif type( x) == 'number' and type( y) == 'number' and type( z) == 'number' then
|
||||
v3d[1] = x
|
||||
v3d[2] = y
|
||||
v3d[3] = z
|
||||
else
|
||||
error( 'A parameter is wrong', 2)
|
||||
end
|
||||
return v3d
|
||||
end
|
||||
|
||||
setmetatable( Vector3d, { __call = function( _, ...) return New(...) end })
|
||||
|
||||
-- opposto di un vettore (unary -)
|
||||
function Vector3d:__unm()
|
||||
return New( - self[1], - self[2], - self[3])
|
||||
end
|
||||
|
||||
-- somma di due vettori (+)
|
||||
function Vector3d.__add( a, b)
|
||||
if isVector3d( a) and isVector3d( b) then
|
||||
return New( a[1] + b[1], a[2] + b[2], a[3] + b[3])
|
||||
else
|
||||
error( 'A parameter is not a Vector3d', 2)
|
||||
end
|
||||
end
|
||||
|
||||
-- sottrazione di due vettori (-)
|
||||
function Vector3d.__sub( a, b)
|
||||
if isVector3d( a) and isVector3d( b) then
|
||||
return New( a[1] - b[1], a[2] - b[2], a[3] - b[3])
|
||||
else
|
||||
error( 'A parameter is not a Vector3d', 2)
|
||||
end
|
||||
end
|
||||
|
||||
-- moltiplicazione di un vettore per uno scalare, di uno scalare per un vettore o prodotto scalare (*)
|
||||
function Vector3d.__mul( a, b)
|
||||
if type( a) == 'number' then
|
||||
return New( a * b[1], a * b[2], a * b[3])
|
||||
elseif type( b) == 'number' then
|
||||
return New( a[1] * b, a[2] * b, a[3] * b)
|
||||
elseif isVector3d( a) and isVector3d( b) then
|
||||
return ( a[1] * b[1] + a[2] * b[2] + a[3] * b[3])
|
||||
else
|
||||
error( 'A parameter is wrong', 2)
|
||||
end
|
||||
end
|
||||
|
||||
-- prodotto vettoriale (^)
|
||||
function Vector3d.__pow( a, b)
|
||||
if isVector3d( a) and isVector3d( b) then
|
||||
return New( a[2] * b[3] - a[3] * b[2],
|
||||
a[3] * b[1] - a[1] * b[3],
|
||||
a[1] * b[2] - a[2] * b[1])
|
||||
else
|
||||
error( 'A parameter is not a Vector3d', 2)
|
||||
end
|
||||
end
|
||||
|
||||
-- divisione di un vettore per un numero (/)
|
||||
function Vector3d.__div( a, b)
|
||||
if isVector3d( a) and type( b) == 'number' then
|
||||
return New( a[1] / b, a[2] / b, a[3] / b)
|
||||
else
|
||||
error( 'A parameter is wrong', 2)
|
||||
end
|
||||
end
|
||||
|
||||
-- triplo prodotto (a ^ b) * c
|
||||
function Vector3d.TripleProd( a, b, c)
|
||||
if isVector3d( a) and isVector3d( b) and isVector3d( c) then
|
||||
return ( a[1] * ( b[2] * c[3] - b[3] * c[2]) +
|
||||
a[2] * ( b[3] * c[1] - b[1] * c[3]) +
|
||||
a[3] * ( b[1] * c[2] - b[2] * c[1]))
|
||||
else
|
||||
error( 'A parameter is wrong', 2)
|
||||
end
|
||||
end
|
||||
|
||||
-- verifica di vettore quasi nullo
|
||||
function Vector3d:isSmall()
|
||||
return (( self[1] * self[1] + self[2] * self[2] + self[3] * self[3]) < GEO.EPS_SMALL * GEO.EPS_SMALL)
|
||||
end
|
||||
|
||||
-- verifica di vettore nullo
|
||||
function Vector3d:isZero()
|
||||
return (( self[1] * self[1] + self[2] * self[2] + self[3] * self[3]) < GEO.EPS_ZERO * GEO.EPS_ZERO)
|
||||
end
|
||||
|
||||
-- verifica di vettore normalizzato
|
||||
function Vector3d:isNormalized()
|
||||
return ( math.abs( 1.0 - ( self[1] * self[1] + self[2] * self[2] + self[3] * self[3])) < 2.0 * GEO.EPS_ZERO)
|
||||
end
|
||||
|
||||
-- calcolo quadrato della lunghezza
|
||||
function Vector3d:sqlen()
|
||||
return ( self[1] * self[1] + self[2] * self[2] + self[3] * self[3])
|
||||
end
|
||||
|
||||
-- calcolo lunghezza
|
||||
function Vector3d:len()
|
||||
return math.sqrt( self[1] * self[1] + self[2] * self[2] + self[3] * self[3])
|
||||
end
|
||||
|
||||
-- normalizzazione
|
||||
function Vector3d:normalize()
|
||||
local sqlen = self[1] * self[1] + self[2] * self[2] + self[3] * self[3]
|
||||
-- verifico se già normalizzato
|
||||
if math.abs( 1.0 - sqlen) < 2.0 * GEO.EPS_ZERO then
|
||||
return true
|
||||
end
|
||||
-- verifico se normalizzabile
|
||||
if sqlen < GEO.EPS_SMALL * GEO.EPS_SMALL then
|
||||
return false
|
||||
end
|
||||
-- eseguo la normalizzazione
|
||||
local len = math.sqrt( sqlen)
|
||||
local denom = 1 / len
|
||||
self[1] = self[1] * denom
|
||||
self[2] = self[2] * denom
|
||||
self[3] = self[3] * denom
|
||||
return true
|
||||
end
|
||||
|
||||
-- rotazione
|
||||
function Vector3d:rotate( vtAx, dAngDeg)
|
||||
if not isVector3d( self) or not isVector3d( vtAx) or not type( dAngDeg) == 'number' then
|
||||
return false
|
||||
end
|
||||
local bOk, vRot = EgtVectorRotate( self, vtAx, dAngDeg)
|
||||
if bOk then
|
||||
self[1] = vRot[1]
|
||||
self[2] = vRot[2]
|
||||
self[3] = vRot[3]
|
||||
end
|
||||
return bOk
|
||||
end
|
||||
|
||||
-- mirror
|
||||
function Vector3d:mirror( vtOn)
|
||||
if not isVector3d( self) or not isVector3d( vtOn) then
|
||||
return false
|
||||
end
|
||||
local bOk, vMir = EgtVectorMirror( self, vtOn)
|
||||
if bOk then
|
||||
self[1] = vMir[1]
|
||||
self[2] = vMir[2]
|
||||
self[3] = vMir[3]
|
||||
end
|
||||
return bOk
|
||||
end
|
||||
|
||||
-- trasformazione di riferimento verso globale
|
||||
function Vector3d:toGlob( fTool)
|
||||
if not isVector3d( self) or not isFrame3d( fTool) then
|
||||
return false
|
||||
end
|
||||
local bOk, vNew = EgtVectorToGlob( self, fTool)
|
||||
if bOk then
|
||||
self[1] = vNew[1]
|
||||
self[2] = vNew[2]
|
||||
self[3] = vNew[3]
|
||||
end
|
||||
return bOk
|
||||
end
|
||||
|
||||
-- trasformazione di riferimento verso locale
|
||||
function Vector3d:toLoc( fTool)
|
||||
if not isVector3d( self) or not isFrame3d( fTool) then
|
||||
return false
|
||||
end
|
||||
local bOk, vNew = EgtVectorToLoc( self, fTool)
|
||||
if bOk then
|
||||
self[1] = vNew[1]
|
||||
self[2] = vNew[2]
|
||||
self[3] = vNew[3]
|
||||
end
|
||||
return bOk
|
||||
end
|
||||
|
||||
-- trasformazione di riferimento da locale a locale
|
||||
function Vector3d:locToLoc( fOri, fDest)
|
||||
if not isVector3d( self) or not isFrame3d( fOri) or not isFrame3d( fDest) then
|
||||
return false
|
||||
end
|
||||
local bOk, vNew = EgtVectorLocToLoc( self, fOri, fDest)
|
||||
if bOk then
|
||||
self[1] = vNew[1]
|
||||
self[2] = vNew[2]
|
||||
self[3] = vNew[3]
|
||||
end
|
||||
return bOk
|
||||
end
|
||||
|
||||
-- restituzione componenti
|
||||
function Vector3d:getX()
|
||||
return self[1]
|
||||
end
|
||||
|
||||
function Vector3d:getY()
|
||||
return self[2]
|
||||
end
|
||||
|
||||
function Vector3d:getZ()
|
||||
return self[3]
|
||||
end
|
||||
|
||||
-- assegnazione componenti
|
||||
function Vector3d:setX( dX)
|
||||
self[1] = dX
|
||||
end
|
||||
|
||||
function Vector3d:setY( dY)
|
||||
self[2] = dY
|
||||
end
|
||||
|
||||
function Vector3d:setZ( dZ)
|
||||
self[3] = dZ
|
||||
end
|
||||
|
||||
-- conversione in stringa (tostring)
|
||||
function Vector3d:__tostring()
|
||||
return "(" .. EgtNumToString( self[1], 6) .. ", "
|
||||
.. EgtNumToString( self[2], 6) .. ", "
|
||||
.. EgtNumToString( self[3], 6) .. ")"
|
||||
end
|
||||
|
||||
-- Alcune funzioni di confronto
|
||||
function AreSameVectorApprox( a, b)
|
||||
if isVector3d( a) and isVector3d( b) then
|
||||
return ( a - b):isSmall()
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function AreSameVectorExact( a, b)
|
||||
if isVector3d( a) and isVector3d( b) then
|
||||
return ( a - b):isZero()
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function AreOppositeVectorApprox( a, b)
|
||||
if isVector3d( a) and isVector3d( b) then
|
||||
return ( a + b):isSmall()
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function AreOppositeVectorExact( a, b)
|
||||
if isVector3d( a) and isVector3d( b) then
|
||||
return ( a + b):isZero()
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function AreSameOrOppositeVectorApprox( a, b)
|
||||
if isVector3d( a) and isVector3d( b) then
|
||||
return ( a - b):isSmall() or ( a + b):isSmall()
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
function AreSameOrOppositeVectorExact( a, b)
|
||||
if isVector3d( a) and isVector3d( b) then
|
||||
return ( a - b):isZero() or ( a + b):isZero()
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
-- Creazione di vettori da coordinate sferiche e polari
|
||||
function VectorFromSpherical( dLen, dAngVertDeg, dAngOrizzDeg)
|
||||
local dAngVertRad = math.rad( dAngVertDeg)
|
||||
local dAngOrizzRad = math.rad( dAngOrizzDeg)
|
||||
local dSinAngVert = math.sin( dAngVertRad) ;
|
||||
return Vector3d( dLen * dSinAngVert * math.cos( dAngOrizzRad),
|
||||
dLen * dSinAngVert * math.sin( dAngOrizzRad),
|
||||
dLen * math.cos( dAngVertRad)) ;
|
||||
end
|
||||
|
||||
function VectorFromPolar( dLen, dAngDeg)
|
||||
local dAngRad = math.rad( dAngDeg)
|
||||
return Vector3d( dLen * math.cos( dAngRad),
|
||||
dLen * math.sin( dAngRad),
|
||||
0)
|
||||
end
|
||||
|
||||
-- Creazione di vettore perpendicolare a dato e massimamente verso l'alto
|
||||
function VectorFromUprightOrtho( vtV)
|
||||
local vtAx = Vector3d( vtV)
|
||||
if not vtAx then return nil end
|
||||
-- se vettore nullo, imposto asse Z+
|
||||
if vtAx:isZero() then
|
||||
return Z_AX()
|
||||
end
|
||||
-- se vettore coincidente con asse Z, imposto asse X+
|
||||
if AreSameOrOppositeVectorExact( vtAx, Z_AX()) then
|
||||
return X_AX()
|
||||
end
|
||||
-- caso generico
|
||||
vtAx:setZ( 0)
|
||||
vtAx:normalize()
|
||||
vtAx:rotate( Z_AX(), 90)
|
||||
return ( vtV ^ vtAx)
|
||||
end
|
||||
|
||||
-- Creazione di vettore da altro vettore con rotazione
|
||||
function VectorFromRotated( vtV, vtAx, dAngDeg)
|
||||
local vtRot = Vector3d( vtV)
|
||||
if not vtRot then return nil end
|
||||
vtRot:rotate( vtAx, dAngDeg)
|
||||
return vtRot
|
||||
end
|
||||
|
||||
-- Creazione di vettore da stringa di tre numeri
|
||||
function VectorFromString( sVal)
|
||||
if not sVal then
|
||||
return nil
|
||||
end
|
||||
local vsVal = EgtSplitString( sVal)
|
||||
if not vsVal then
|
||||
return nil
|
||||
end
|
||||
if #vsVal < 3 then
|
||||
return nil
|
||||
end
|
||||
return Vector3d( tonumber( vsVal[1]), tonumber( vsVal[2]), tonumber( vsVal[3]))
|
||||
end
|
||||
|
||||
-- Creazione di vettore da info di entità GeomDB
|
||||
function VectorFromInfo( nId, sKey)
|
||||
return VectorFromString( EgtGetInfo( nId, sKey))
|
||||
end
|
||||
|
||||
-- Coordinate sferiche da vettore
|
||||
function SphericalFromVector( vtV)
|
||||
if not isVector3d( vtV) then
|
||||
return nil
|
||||
end
|
||||
local dLen = vtV:len()
|
||||
-- vettore nullo
|
||||
if math.abs( dLen) < GEO.EPS_ZERO then
|
||||
return 0, 0, 0
|
||||
end
|
||||
-- vettore diretto come Z o -Z
|
||||
if math.abs( vtV[1]) < GEO.EPS_ZERO and math.abs( vtV[2]) < GEO.EPS_ZERO then
|
||||
if vtV[3] > 0 then
|
||||
return dLen, 0, 0
|
||||
else
|
||||
return dLen, 180, 0
|
||||
end
|
||||
end
|
||||
-- vettore nel piano XY
|
||||
if math.abs( vtV[3]) < GEO.EPS_ZERO then
|
||||
local dAngOri = math.deg( math.atan( vtV[2], vtV[1]))
|
||||
if dAngOri < 0 then
|
||||
dAngOri = dAngOri + 360
|
||||
end
|
||||
return dLen, 90, dAngOri
|
||||
end
|
||||
-- caso generale
|
||||
local dAngVert = math.deg( math.acos( vtV[3] / dLen))
|
||||
local dAngOri = math.deg( math.atan( vtV[2], vtV[1]))
|
||||
if dAngOri < 0 then
|
||||
dAngOri = dAngOri + 360
|
||||
end
|
||||
return dLen, dAngVert, dAngOri
|
||||
end
|
||||
|
||||
-- Vettori notevoli
|
||||
function V_NULL()
|
||||
return Vector3d(0,0,0)
|
||||
end
|
||||
function X_AX()
|
||||
return Vector3d(1,0,0)
|
||||
end
|
||||
function Y_AX()
|
||||
return Vector3d(0,1,0)
|
||||
end
|
||||
function Z_AX()
|
||||
return Vector3d(0,0,1)
|
||||
end
|
||||
|
||||
|
||||
return EgtVector3d
|
||||
@@ -0,0 +1,987 @@
|
||||
-- EmtGenerator.lua by EgalTech s.r.l. 2021/12/28
|
||||
-- 2018/02/22 DS Funzioni bit32 sostituite con operatori sui bit.
|
||||
-- 2018/08/16 DS Corretta ricorsione di SimulMoveAxis.
|
||||
-- 2018/10/09 DS Controllo nDec anche in EmtLenToString.
|
||||
-- 2019/03/19 DS Modificate SimulMoveAxis e SimulMoveAxes.
|
||||
-- 2019/05/19 DS Aggiunta funzione SetToolForVmill.
|
||||
-- 2019/08/06 DS Aggiunte funzioni AddToCollisionCheck, AddToolToCollisionCheck e DumpCollisionCheck.
|
||||
-- 2020/02/04 DS Modifiche a SetToolForVmill per gestire frese con gambo piccolo.
|
||||
-- 2020/02/05 DS Aggiunto parametro sCollGrp a AddToCollisionCheck e riportato nei dati successivi come Grp.
|
||||
-- 2020/03/23 DS Aggiunta funzione per impostare il numero di decimali nell'emissione coordinate assi.
|
||||
-- 2020/10/06 DS In AddToolToCollisionCheck ora si usano diametro e lunghezza totali, prima quelli di lavoro.
|
||||
-- 2020/10/31 DS Corretta AddToCollisionCheck per riferimenti da calcolarsi in globale.
|
||||
-- 2020/12/07 DS In SetToolForVmill aggiunta gestione WaterJet.
|
||||
-- 2020/12/22 DS In AddToCollisionCheck per cilindri ora raggio precede altezza.
|
||||
-- 2021/01/03 DS Aggiunta funzione AddToolToCollisionObj. In MoveAxis e MoveAxes aggiunta gestione delle collisioni.
|
||||
-- 2021/01/19 DS In AddToolToCollisionCheck aggiunta gestione per mortasatrici/seghe a catena.
|
||||
-- 2021/02/10 DS In SimulMoveAx* migliorata gestione segnalazione collisioni.
|
||||
-- 2021/04/14 DS A AddToolToCollisionObj e AddToolToCollisionCheck aggiunto parametro opzionale bUseDiam.
|
||||
-- 2021/05/24 DS Corretta AddToolToCollisionCheck perchè recuperava sempre l'utensile dell'uscita 1 della testa e uscita indicate.
|
||||
-- Parametro bUseDiam eliminato perchè superato dalle modifiche.
|
||||
-- 2021/06/25 DS In AddToolToCollisionCheck corretta gestione lame ora con lunghezza e spessore.
|
||||
-- 2021/07/12 DS Migliorie a movimento asse/i per simulazione.
|
||||
-- 2021/12/28 DS Anche a Centro e Punto Medio di Arco si sottrae EMT.ADDORI se definito.
|
||||
|
||||
-- Tavola per definizione modulo (serve ma non usata)
|
||||
local EmtGenerator = {}
|
||||
|
||||
EgtOutLog( 'EmtGenerator started', 1)
|
||||
|
||||
-- Include
|
||||
require( 'EgtBase')
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- *** Output ***
|
||||
---------------------------------------------------------------------
|
||||
function EmtOutput( sOut, nId)
|
||||
if EMT.NUM then
|
||||
if not nId or nId == 1 then
|
||||
EMT.LINENBR = EMT.LINENBR + EMT.LINEINC
|
||||
if EMT.LINEMAX and EMT.LINENBR > EMT.LINEMAX then EMT.LINENBR = EMT.LINEINC end
|
||||
EmtWrite( EMT.Nt .. EMT.LINENBR .. ' ' .. ( sOut or ''))
|
||||
else
|
||||
if not EMT.LINENBRS then EMT.LINENBRS = {} end
|
||||
if not EMT.LINENBRS[nId] then EMT.LINENBRS[nId] = 0 end
|
||||
EMT.LINENBRS[nId] = EMT.LINENBRS[nId] + EMT.LINEINC
|
||||
if EMT.LINEMAX and EMT.LINENBRS[nId] > EMT.LINEMAX then EMT.LINENBRS[nId] = EMT.LINEINC end
|
||||
OutFile( nId, EMT.Nt .. EMT.LINENBRS[nId] .. ' ' .. ( sOut or ''))
|
||||
end
|
||||
else
|
||||
if not nId or nId == 1 then
|
||||
EmtWrite( sOut or '')
|
||||
else
|
||||
OutFile( nId, sOut or '')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------
|
||||
-- *** Other Files ***
|
||||
-----------------------------------------------------------------
|
||||
|
||||
local s_OutFh = {}
|
||||
|
||||
-----------------------------------------------------------------
|
||||
function OpenOutFile( nId, sFile)
|
||||
s_OutFh[nId] = io.open( sFile, 'w')
|
||||
return s_OutFh[nId]
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------
|
||||
function OutFile( nId, sOut)
|
||||
if s_OutFh[nId] then
|
||||
s_OutFh[nId]:write( sOut .. '\n')
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------
|
||||
function CloseOutFile( nId)
|
||||
if s_OutFh[nId] then
|
||||
s_OutFh[nId]:close()
|
||||
s_OutFh[nId] = nil
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------
|
||||
-- *** Utilities ***
|
||||
---------------------------------------------------------------------
|
||||
function EmtUpdatePrev()
|
||||
EMT.L1p = EMT.L1
|
||||
EMT.L2p = EMT.L2
|
||||
EMT.L3p = EMT.L3
|
||||
EMT.R1p = EMT.R1
|
||||
EMT.R2p = EMT.R2
|
||||
EMT.R3p = EMT.R3
|
||||
EMT.R4p = EMT.R4
|
||||
EMT.L1op = EMT.L1o
|
||||
EMT.L2op = EMT.L2o
|
||||
EMT.L3op = EMT.L3o
|
||||
if EMT.MOVE ~= 0 then
|
||||
if EMT.F then
|
||||
EMT.Fp = EMT.F
|
||||
end
|
||||
else
|
||||
EMT.Fp = nil
|
||||
end
|
||||
end
|
||||
|
||||
function EmtResetPrevLinear()
|
||||
EMT.L1p = nil
|
||||
EMT.L2p = nil
|
||||
EMT.L3p = nil
|
||||
EMT.L1op = nil
|
||||
EMT.L2op = nil
|
||||
EMT.L3op = nil
|
||||
end
|
||||
|
||||
function EmtResetPrev()
|
||||
EMT.L1p = nil
|
||||
EMT.L2p = nil
|
||||
EMT.L3p = nil
|
||||
EMT.R1p = nil
|
||||
EMT.R2p = nil
|
||||
EMT.R3p = nil
|
||||
EMT.R4p = nil
|
||||
EMT.L1op = nil
|
||||
EMT.L2op = nil
|
||||
EMT.L3op = nil
|
||||
EMT.Fp = nil
|
||||
end
|
||||
|
||||
function EmtSetAdditionalOrig( dAddX, dAddY, dAddZ)
|
||||
EMT.ADDORI = Point3d( dAddX, dAddY, dAddZ)
|
||||
end
|
||||
|
||||
function EmtAdjustLinearAxes()
|
||||
-- salvo i valori rispetto a Zero macchina
|
||||
EMT.L1o = EMT.L1
|
||||
EMT.L2o = EMT.L2
|
||||
EMT.L3o = EMT.L3
|
||||
-- se emetto rispetto all'origine 1 della tavola
|
||||
if EMT.USETO1 then
|
||||
-- sottraggo agli assi lineari l'origine 1 della tavola
|
||||
if EMT.L1 then
|
||||
EMT.L1 = EMT.L1 - EMT.TABORI1[1]
|
||||
if EMT.ADDORI then
|
||||
EMT.L1 = EMT.L1 - EMT.ADDORI[1]
|
||||
end
|
||||
end
|
||||
if EMT.L2 then
|
||||
EMT.L2 = EMT.L2 - EMT.TABORI1[2]
|
||||
if EMT.ADDORI then
|
||||
EMT.L2 = EMT.L2 - EMT.ADDORI[2]
|
||||
end
|
||||
end
|
||||
if EMT.L3 then
|
||||
EMT.L3 = EMT.L3 - EMT.TABORI1[3]
|
||||
if EMT.ADDORI then
|
||||
EMT.L3 = EMT.L3 - EMT.ADDORI[3]
|
||||
end
|
||||
end
|
||||
end
|
||||
-- se emetto rispetto a piano locale
|
||||
if EMT.IPLGL then
|
||||
local ptP = Point3d( EMT.L1, EMT.L2, EMT.L3)
|
||||
ptP:toLoc( EMT.IPLGLFR)
|
||||
EMT.L1 = ptP:getX()
|
||||
EMT.L2 = ptP:getY()
|
||||
EMT.L3 = ptP:getZ()
|
||||
end
|
||||
end
|
||||
|
||||
function EmtAdjustRotaryAxes()
|
||||
-- salvo i valori rispetto a Zero macchina
|
||||
EMT.R1o = EMT.R1
|
||||
EMT.R2o = EMT.R2
|
||||
EMT.R3o = EMT.R3
|
||||
EMT.R4o = EMT.R4
|
||||
end
|
||||
|
||||
function EmtAdjustCenterAxes()
|
||||
-- salvo i valori rispetto a Zero macchina
|
||||
EMT.C1o = EMT.C1
|
||||
EMT.C2o = EMT.C2
|
||||
EMT.C3o = EMT.C3
|
||||
-- se emetto rispetto all'origine 1 della tavola
|
||||
if EMT.USETO1 then
|
||||
-- sottraggo agli assi lineari l'origine 1 della tavola
|
||||
if EMT.C1 then
|
||||
EMT.C1 = EMT.C1 - EMT.TABORI1[1]
|
||||
if EMT.ADDORI then
|
||||
EMT.C1 = EMT.C1 - EMT.ADDORI[1]
|
||||
end
|
||||
end
|
||||
if EMT.C2 then
|
||||
EMT.C2 = EMT.C2 - EMT.TABORI1[2]
|
||||
if EMT.ADDORI then
|
||||
EMT.C2 = EMT.C2 - EMT.ADDORI[2]
|
||||
end
|
||||
end
|
||||
if EMT.C3 then
|
||||
EMT.C3 = EMT.C3 - EMT.TABORI1[3]
|
||||
if EMT.ADDORI then
|
||||
EMT.C3 = EMT.C3 - EMT.ADDORI[3]
|
||||
end
|
||||
end
|
||||
end
|
||||
-- se emetto rispetto a piano locale
|
||||
if EMT.IPLGL then
|
||||
local ptP = Point3d( EMT.C1, EMT.C2, EMT.C3)
|
||||
ptP:toLoc( EMT.IPLGLFR)
|
||||
EMT.C1 = ptP:getX()
|
||||
EMT.C2 = ptP:getY()
|
||||
EMT.C3 = ptP:getZ()
|
||||
end
|
||||
end
|
||||
|
||||
function EmtAdjustMidPointAxes()
|
||||
-- salvo i valori rispetto a Zero macchina
|
||||
EMT.M1o = EMT.M1
|
||||
EMT.M2o = EMT.M2
|
||||
EMT.M3o = EMT.M3
|
||||
-- se emetto rispetto all'origine 1 della tavola
|
||||
if EMT.USETO1 then
|
||||
-- sottraggo agli assi lineari l'origine 1 della tavola
|
||||
if EMT.M1 then
|
||||
EMT.M1 = EMT.M1 - EMT.TABORI1[1]
|
||||
if EMT.ADDORI then
|
||||
EMT.M1 = EMT.M1 - EMT.ADDORI[1]
|
||||
end
|
||||
end
|
||||
if EMT.M2 then
|
||||
EMT.M2 = EMT.M2 - EMT.TABORI1[2]
|
||||
if EMT.ADDORI then
|
||||
EMT.M2 = EMT.M2 - EMT.ADDORI[2]
|
||||
end
|
||||
end
|
||||
if EMT.M3 then
|
||||
EMT.M3 = EMT.M3 - EMT.TABORI1[3]
|
||||
if EMT.ADDORI then
|
||||
EMT.M3 = EMT.M3 - EMT.ADDORI[3]
|
||||
end
|
||||
end
|
||||
end
|
||||
-- se emetto rispetto a piano locale
|
||||
if EMT.IPLGL then
|
||||
local ptP = Point3d( EMT.M1, EMT.M2, EMT.M3)
|
||||
ptP:toLoc( EMT.IPLGLFR)
|
||||
EMT.M1 = ptP:getX()
|
||||
EMT.M2 = ptP:getY()
|
||||
EMT.M3 = ptP:getZ()
|
||||
end
|
||||
end
|
||||
|
||||
local function EmtToEmit( V, Vp)
|
||||
if not V then
|
||||
return false
|
||||
end
|
||||
if not EMT.MODAL or not Vp then
|
||||
return true
|
||||
end
|
||||
return ( abs( V - Vp) > 0.001)
|
||||
end
|
||||
|
||||
function EmtGetAxis( Ax, bRotLikeLin)
|
||||
local Axp = Ax .. 'p'
|
||||
local Axt = Ax .. 't'
|
||||
if EMT[Axt] and EmtToEmit( EMT[Ax], EMT[Axp]) then
|
||||
local nDec = EMT.DECNUM or 3
|
||||
if not EMT.INCHES or (( Ax == 'R1' or Ax == 'R2' or Ax == 'R3' or Ax == 'R4') and not bRotLikeLin) then
|
||||
return ' ' .. EMT[Axt] .. EgtNumToString( EMT[Ax], nDec), true
|
||||
else
|
||||
return ' ' .. EMT[Axt] .. EgtNumToString( EMT[Ax] / GEO.ONE_INCH, nDec + 1), true
|
||||
end
|
||||
end
|
||||
return '', false
|
||||
end
|
||||
|
||||
function EmtGetRapidAxis( Ax, bRotLikeLin)
|
||||
local MaskVal = {L1=1,L2=2,L3=4,R1=8,R2=16,R3=32,R4=64} -- per lua 5.2 {L1=0,L2=1,L3=2,R1=3,R2=4,R3=5,R4=6}
|
||||
if ( EMT.MASK & MaskVal[Ax]) ~= 0 then -- per lua 5.2 bit32.extract(EMT.MASK,MaskVal[Ax]) ~= 0
|
||||
return EmtGetAxis( Ax, bRotLikeLin)
|
||||
end
|
||||
-- mascherato, sistemo attuale come precedente
|
||||
local Axp = Ax .. 'p'
|
||||
local Axt = Ax .. 't'
|
||||
EMT[Ax] = EMT[Axp]
|
||||
return '', false
|
||||
end
|
||||
|
||||
function EmtGetHomeAxis( Ax, bRotLikeLin)
|
||||
local MaskVal = {L1=1,L2=2,L3=4,R1=8,R2=16,R3=32,R4=64} -- per lua 5.2 {L1=0,L2=1,L3=2,R1=3,R2=4,R3=5,R4=6}
|
||||
if ( EMT.MASK & MaskVal[Ax]) ~= 0 then -- per lua 5.2 bit32.extract(EMT.MASK,MaskVal[Ax]) ~= 0
|
||||
local Axo = Ax .. 'o'
|
||||
local Axt = Ax .. 't'
|
||||
if EMT[Axt] then
|
||||
local nDec = EMT.DECNUM or 3
|
||||
if not EMT.INCHES or (( Ax == 'R1' or Ax == 'R2' or Ax == 'R3' or Ax == 'R4') and not bRotLikeLin) then
|
||||
return ' ' .. EMT[Axt] .. EgtNumToString( EMT[Axo], nDec), true
|
||||
else
|
||||
return ' ' .. EMT[Axt] .. EgtNumToString( EMT[Axo] / GEO.ONE_INCH, nDec + 1), true
|
||||
end
|
||||
end
|
||||
end
|
||||
return '', false
|
||||
end
|
||||
|
||||
function EmtGetHomeAxisByName( Ax, dOffset, bRotLikeLin)
|
||||
local sToken = EgtGetAxisToken( Ax)
|
||||
local bLinear = EgtGetAxisType( Ax)
|
||||
local dVal = EgtGetAxisHomePos( Ax)
|
||||
if dOffset then
|
||||
dVal = dVal + dOffset
|
||||
end
|
||||
if sToken and bLinear ~= nil and dVal then
|
||||
local nDec = EMT.DECNUM or 3
|
||||
if not EMT.INCHES or ( not bLinear and not bRotLikeLin) then
|
||||
return ' ' .. sToken .. EgtNumToString( dVal, nDec), true
|
||||
else
|
||||
return ' ' .. sToken .. EgtNumToString( dVal / GEO.ONE_INCH, nDec + 1), true
|
||||
end
|
||||
else
|
||||
return '', false
|
||||
end
|
||||
end
|
||||
|
||||
function EmtGetFeed()
|
||||
if EmtToEmit( EMT.F, EMT.Fp) then
|
||||
if not EMT.INCHES then
|
||||
return ' ' .. EMT.Ft .. EgtNumToString( EMT.F, 0)
|
||||
else
|
||||
return ' ' .. EMT.Ft .. EgtNumToString( EMT.F / GEO.ONE_INCH, 1)
|
||||
end
|
||||
end
|
||||
return ''
|
||||
end
|
||||
|
||||
function EmtGetArcType( nMove, bInv)
|
||||
if nMove == 2 then
|
||||
if bInv then
|
||||
return 3
|
||||
else
|
||||
return 2
|
||||
end
|
||||
elseif nMove == 3 then
|
||||
if bInv then
|
||||
return 2
|
||||
else
|
||||
return 3
|
||||
end
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
function EmtGetAngO2( vtZ, vtX, dAngV, dAngO)
|
||||
-- vettore X di riferimento
|
||||
local vtRif = Vector3d( X_AX())
|
||||
-- lo ruoto prima attorno a Y poi attorno a Z
|
||||
vtRif:rotate( Y_AX(), dAngV)
|
||||
vtRif:rotate( Z_AX(), dAngO)
|
||||
-- prodotto scalare tra vettore riferimento ruotato e vettore vtX
|
||||
local dCos = vtRif * vtX
|
||||
-- prodotto scalare tra vettore prodotto vettoriale dei due e vettore vtZ
|
||||
local dSin = ( vtRif ^ vtX) * vtZ
|
||||
-- restituisco l'angolo di rotazione richiesto
|
||||
return atan2( dSin, dCos)
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
function EmtGetAngO3( vtZ, vtX, dAngV, dAngO)
|
||||
-- vettore X di riferimento
|
||||
local vtRif = Vector3d( X_AX())
|
||||
-- vettore asse di rotazione
|
||||
local vtAx = Vector3d( - sin( dAngO), cos( dAngO), 0)
|
||||
-- ruoto X di rif attorno a questo asse
|
||||
vtRif:rotate( vtAx, dAngV)
|
||||
-- prodotto scalare tra vettore riferimento ruotato e vettore vtX
|
||||
local dCos = vtRif * vtX
|
||||
-- prodotto scalare tra vettore prodotto vettoriale dei due e vettore vtZ
|
||||
local dSin = ( vtRif ^ vtX) * vtZ
|
||||
-- restituisco l'angolo di rotazione richiesto
|
||||
return atan2( dSin, dCos)
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
function EmtLenToString( Val, nDec)
|
||||
nDec = ( nDec or 3)
|
||||
if not EMT.INCHES then
|
||||
return EgtNumToString( Val, nDec)
|
||||
else
|
||||
return EgtNumToString( Val/GEO.ONE_INCH, nDec + 1)
|
||||
end
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
function EmtNum3ToString( Tav, nDec)
|
||||
nDec = ( nDec or 3)
|
||||
return EgtNumToString( Tav[1], nDec) .. ","..
|
||||
EgtNumToString( Tav[2], nDec) .. ","..
|
||||
EgtNumToString( Tav[3], nDec)
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
function EmtLen3ToString( Tav, nDec)
|
||||
nDec = ( nDec or 3)
|
||||
return EmtLenToString( Tav[1], nDec) .. ","..
|
||||
EmtLenToString( Tav[2], nDec) .. ","..
|
||||
EmtLenToString( Tav[3], nDec)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function EmtSecToHMS( dSec)
|
||||
local nH = floor( dSec / 3600)
|
||||
local nM = floor(( dSec - nH * 3600) / 60)
|
||||
local nS = floor( dSec - nH * 3600 - nM * 60)
|
||||
local sH = EgtIf( nH < 10, '0', '') .. tostring( nH)
|
||||
local sM = EgtIf( nM < 10, '0', '') .. tostring( nM)
|
||||
local sS = EgtIf( nS < 10, '0', '') .. tostring( nS)
|
||||
return sH .. ':' .. sM .. ':' .. sS
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function EmtLenToMF( dLen)
|
||||
local dOut
|
||||
if EMT.INCHES then
|
||||
dOut = dLen / 304.8
|
||||
else
|
||||
dOut = dLen / 1000
|
||||
end
|
||||
return EgtIf( dOut < 10, ' ', '') .. EgtNumToString( dOut, -1)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- *** Estimation functions ***
|
||||
---------------------------------------------------------------------
|
||||
local s_TleTitle
|
||||
local s_TleMach = {}
|
||||
local s_TleTool = {}
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function EmtTleStart( sTitle)
|
||||
-- inizializzazioni
|
||||
s_TleTitle = sTitle
|
||||
s_TleMach = {}
|
||||
s_TleTool = {}
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function EmtTleAddMachining( sName, sTime, sLen, sTool)
|
||||
table.insert( s_TleMach, { Name = sName, Time = sTime, Len = sLen, Tool = sTool})
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function EmtTleAddTotal( sTotTime, sTotLen)
|
||||
s_TleMach.Total = { Time = sTotTime, Len = sTotLen}
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function EmtTleAddTool( sName, sLen)
|
||||
table.insert( s_TleTool, { Name = sName, Len = sLen})
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function EmtTleEnd( sFormat)
|
||||
-- se richiesto formato HTML
|
||||
if sFormat:lower() == 'html' then
|
||||
-- intestazione
|
||||
EmtOutput( '<!DOCTYPE html>')
|
||||
EmtOutput( '<html>')
|
||||
EmtOutput( '<head>')
|
||||
EmtOutput( ' <meta http-equiv="X-UA-Compatible" content="IE=10; charset=utf-8"/>')
|
||||
EmtOutput( ' <title>' .. ( s_TleTitle or '') .. '</title>')
|
||||
EmtOutput( ' <style type = "text/css">\r\n' ..
|
||||
' caption {\r\n' ..
|
||||
' margin: 10px;\r\n' ..
|
||||
' font: 200% arial, sans-serif;\r\n' ..
|
||||
' }\r\n' ..
|
||||
' table, th, td {\r\n' ..
|
||||
' border: 1px solid black;\r\n' ..
|
||||
' border-collapse: collapse;\r\n' ..
|
||||
' }\r\n' ..
|
||||
' table {\r\n' ..
|
||||
' margin: 30px;\r\n' ..
|
||||
' background-color: #f2f2f2;\r\n' ..
|
||||
' }\r\n' ..
|
||||
' th, td {\r\n' ..
|
||||
' padding: 0.4rem;\r\n' ..
|
||||
' text-align: center;\r\n' ..
|
||||
' }\r\n' ..
|
||||
' tr.total {\r\n' ..
|
||||
' background-color: #e6e6e6;\r\n' ..
|
||||
' }\r\n' ..
|
||||
' </style>')
|
||||
EmtOutput( '</head>')
|
||||
EmtOutput( '<body>')
|
||||
-- tabella lavorazioni
|
||||
if s_TleMach and #s_TleMach > 0 then
|
||||
EmtOutput( ' <table>\r\n' ..
|
||||
' <caption>Machinings</caption>\r\n' ..
|
||||
' <tr>\r\n' ..
|
||||
' <th></th>\r\n' ..
|
||||
' <th>Time [h:m:s]</th>\r\n' ..
|
||||
' <th>Len ' .. EgtIf( EMT.INCHES, '[ft]', '[m]') .. '</th>\r\n' ..
|
||||
' <th>Tool</th>\r\n' ..
|
||||
' </tr>')
|
||||
for i = 1, #s_TleMach do
|
||||
EmtOutput( ' <tr>\r\n' ..
|
||||
' <td>' .. ( s_TleMach[i].Name or '') .. '</td>\r\n' ..
|
||||
' <td>' .. ( s_TleMach[i].Time or '') .. '</td>\r\n' ..
|
||||
' <td>' .. ( s_TleMach[i].Len or '') .. '</td>\r\n' ..
|
||||
' <td>' .. ( s_TleMach[i].Tool or '') .. '</td>\r\n' ..
|
||||
' </tr>')
|
||||
end
|
||||
EmtOutput( ' <tr class="total">\r\n' ..
|
||||
' <td>TOTAL</td>\r\n' ..
|
||||
' <td>' .. ( s_TleMach.Total.Time or '') .. '</td>\r\n' ..
|
||||
' <td>' .. ( s_TleMach.Total.Len or '') .. '</td>\r\n' ..
|
||||
' <td>' .. '</td>\r\n' ..
|
||||
' </tr>')
|
||||
EmtOutput( ' </table>')
|
||||
end
|
||||
-- tabella utensili
|
||||
if s_TleTool and #s_TleTool > 0 then
|
||||
EmtOutput( ' <table>\r\n' ..
|
||||
' <caption>Tools</caption>\r\n' ..
|
||||
' <tr>\r\n' ..
|
||||
' <th></th>\r\n' ..
|
||||
' <th>Len ' .. EgtIf( EMT.INCHES, '[ft]', '[m]') .. '</th>\r\n' ..
|
||||
' </tr>')
|
||||
for i = 1, #s_TleTool do
|
||||
EmtOutput( ' <tr>\r\n' ..
|
||||
' <td>' .. ( s_TleTool[i].Name or '') .. '</td>\r\n' ..
|
||||
' <td>' .. ( s_TleTool[i].Len or '') .. '</td>\r\n' ..
|
||||
' </tr>')
|
||||
end
|
||||
EmtOutput( ' </table>')
|
||||
end
|
||||
-- conclusione
|
||||
EmtOutput( '</body>')
|
||||
EmtOutput( '</html>')
|
||||
-- altrimenti formato testo
|
||||
else
|
||||
-- intestazione
|
||||
EmtOutput( ' ' .. ( s_TleTitle or '') .. '\r\n \r\n')
|
||||
-- tabella lavorazioni
|
||||
if s_TleMach and #s_TleMach > 0 then
|
||||
EmtOutput( ' Machinings')
|
||||
EmtOutput( ' ==========')
|
||||
EmtOutput( ' Time [h:m:s] Len ' .. EgtIf( EMT.INCHES, '[ft]', '[m]') .. ' Tool')
|
||||
for i = 1, #s_TleMach do
|
||||
local sName = ( s_TleMach[i].Name or '')
|
||||
sName = sName .. string.rep( ' ', 18 - #sName)
|
||||
EmtOutput( sName .. ( s_TleMach[i].Time or '') .. ' ' .. ( s_TleMach[i].Len or '') .. ' ' .. ( s_TleMach[i].Tool or ''))
|
||||
end
|
||||
end
|
||||
EmtOutput( '-------------------------------------------------------')
|
||||
EmtOutput( 'TOTAL ' .. ( s_TleMach.Total.Time or '') .. ' ' .. ( s_TleMach.Total.Len or ''))
|
||||
-- tabella utensili
|
||||
if s_TleTool and #s_TleTool > 0 then
|
||||
EmtOutput( '\r\n\r\n Tools')
|
||||
EmtOutput( ' =====')
|
||||
EmtOutput( ' Len ' .. EgtIf( EMT.INCHES, '[ft]', '[m]'))
|
||||
for i = 1, #s_TleTool do
|
||||
local sName = ( s_TleTool[i].Name or '')
|
||||
sName = sName .. string.rep( ' ', 19 - #sName)
|
||||
EmtOutput( sName .. ( s_TleTool[i].Len or ''))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
-- *** Simulation functions ***
|
||||
---------------------------------------------------------------------
|
||||
local function MyPrepareAxis( sName, dPos, dStep, nS)
|
||||
if not sName then return nil, nS end
|
||||
local dPrev = EgtGetAxisPos( sName)
|
||||
if not dPrev then return nil, nS end
|
||||
if abs( dStep) > GEO.EPS_SMALL then
|
||||
local nSa = abs( ceil( ( dPos - dPrev) / dStep))
|
||||
nS = max( nS, nSa)
|
||||
end
|
||||
return dPrev, nS
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function MySetAxisPos( sName, dPos)
|
||||
local bOk, dNewPos = EgtSetAxisPos( sName, dPos)
|
||||
return ( bOk and abs( dNewPos - dPos) < 10 * GEO.EPS_SMALL)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function SimulMoveAxis( sName, dPos, dStep)
|
||||
-- salvo step attuale
|
||||
EMT.SIMSTEP = EMT.SIMSTEP or 20
|
||||
local dSimStep = EMT.SIMSTEP
|
||||
-- preparazione asse
|
||||
local dPrev, nS = MyPrepareAxis( sName, dPos, dStep, 1)
|
||||
-- l'asse deve essere ben definito
|
||||
if not dPrev then return false end
|
||||
-- movimento
|
||||
if nS > 0 then
|
||||
for i = 1, nS do
|
||||
local dCoeff = i / nS
|
||||
local bOk = MySetAxisPos( sName, ( 1 - dCoeff) * dPrev + dCoeff * dPos)
|
||||
EgtDraw()
|
||||
local bCheckOk, nCdInd, nObjInd = EmtExecCollisionCheck()
|
||||
if not bCheckOk then
|
||||
local nPrevErr = EMT.ERR
|
||||
local bCollOk, nErr = EmtOnCollision( nCdInd, nObjInd)
|
||||
if not bCollOk and nErr == 11 then
|
||||
if EgtGetEnableUI() then
|
||||
EgtOutBox( 'Collisione!', 'AVVERTIMENTO', 'WARNING')
|
||||
EMT.SIMUISTAT = MCH_UISIM.PAUSE
|
||||
while EMT.SIMUISTAT == MCH_UISIM.PAUSE do
|
||||
-- Param1 = -11 notifica al simulatore pausa per collisione
|
||||
EgtProcessEvents( -11, 4)
|
||||
end
|
||||
end
|
||||
else
|
||||
EMT.ERR = nPrevErr
|
||||
end
|
||||
end
|
||||
if not bOk then
|
||||
return false
|
||||
end
|
||||
if EgtGetEnableUI() then
|
||||
EgtProcessEvents( 0, 4)
|
||||
while EMT.SIMUISTAT == MCH_UISIM.PAUSE do
|
||||
EgtProcessEvents( 0, 4)
|
||||
end
|
||||
if EMT.SIMUISTAT == MCH_UISIM.STOP then
|
||||
error( 'STOP')
|
||||
end
|
||||
-- se cambia lo step di simulazione richiesto in modo significativo ...
|
||||
if abs( EMT.SIMSTEP - dSimStep) > 5 then
|
||||
local dC = EMT.SIMSTEP / dSimStep
|
||||
return SimulMoveAxis( sName, dPos, dC * dStep)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
-- assegno valore finale esatto
|
||||
return MySetAxisPos( sName, dPos)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function SimulMoveAxes( sName, dPos, dStep, sName2, dPos2, dStep2, sName3, dPos3, dStep3, sName4, dPos4, dStep4, sName5, dPos5, dStep5)
|
||||
-- salvo step attuale
|
||||
EMT.SIMSTEP = EMT.SIMSTEP or 20
|
||||
local dSimStep = EMT.SIMSTEP
|
||||
-- preparazione dei diversi assi
|
||||
local dPrev, dPrev2, dPrev3, dPrev4, dPrev5
|
||||
local nS = 1
|
||||
dPrev, nS = MyPrepareAxis( sName, dPos, dStep, nS)
|
||||
dPrev2, nS = MyPrepareAxis( sName2, dPos2, dStep2, nS)
|
||||
dPrev3, nS = MyPrepareAxis( sName3, dPos3, dStep3, nS)
|
||||
dPrev4, nS = MyPrepareAxis( sName4, dPos4, dStep4, nS)
|
||||
dPrev5, nS = MyPrepareAxis( sName5, dPos5, dStep5, nS)
|
||||
-- il primo asse deve essere ben definito
|
||||
if not dPrev then return false end
|
||||
-- movimento
|
||||
if nS > 0 then
|
||||
for i = 1, nS do
|
||||
local dCoeff = i / nS
|
||||
local bOk = MySetAxisPos( sName, ( 1 - dCoeff) * dPrev + dCoeff * dPos)
|
||||
local bOk2 = not dPrev2 or MySetAxisPos( sName2, ( 1 - dCoeff) * dPrev2 + dCoeff * dPos2)
|
||||
local bOk3 = not dPrev3 or MySetAxisPos( sName3, ( 1 - dCoeff) * dPrev3 + dCoeff * dPos3)
|
||||
local bOk4 = not dPrev4 or MySetAxisPos( sName4, ( 1 - dCoeff) * dPrev4 + dCoeff * dPos4)
|
||||
local bOk5 = not dPrev5 or MySetAxisPos( sName5, ( 1 - dCoeff) * dPrev5 + dCoeff * dPos5)
|
||||
EgtDraw()
|
||||
local bCheckOk, nCdInd, nObjInd = EmtExecCollisionCheck()
|
||||
if not bCheckOk then
|
||||
local nPrevErr = EMT.ERR
|
||||
local bCollOk, nErr = EmtOnCollision( nCdInd, nObjInd)
|
||||
if not bCollOk and nErr == 11 then
|
||||
EMT.ERR = 11
|
||||
if EgtGetEnableUI() then
|
||||
EgtOutBox( 'Collisione!', 'AVVERTIMENTO', 'WARNING')
|
||||
EMT.SIMUISTAT = MCH_UISIM.PAUSE
|
||||
while EMT.SIMUISTAT == MCH_UISIM.PAUSE do
|
||||
-- Param1 = -11 notifica al simulatore pausa per collisione
|
||||
EgtProcessEvents( -11, 4)
|
||||
end
|
||||
end
|
||||
else
|
||||
EMT.ERR = nPrevErr
|
||||
end
|
||||
end
|
||||
if not ( bOk and bOk2 and bOk3 and bOk4 and bOk5) then
|
||||
return false, bOk, bOk2, bOk3, bOk4, bOk5
|
||||
end
|
||||
if EgtGetEnableUI() then
|
||||
EgtProcessEvents( 0, 4)
|
||||
while EMT.SIMUISTAT == MCH_UISIM.PAUSE do
|
||||
EgtProcessEvents( 0, 4)
|
||||
end
|
||||
if EMT.SIMUISTAT == MCH_UISIM.STOP then
|
||||
error( 'STOP')
|
||||
end
|
||||
-- se cambia lo step di simulazione richiesto in modo significativo ...
|
||||
if abs( EMT.SIMSTEP - dSimStep) > 5 then
|
||||
local dC = EMT.SIMSTEP / dSimStep
|
||||
return SimulMoveAxes( sName, dPos, dC * dStep,
|
||||
sName2, dPos2, dC * ( dStep2 or 0), sName3, dPos3, dC * ( dStep3 or 0),
|
||||
sName4, dPos4, dC * ( dStep4 or 0), sName5, dPos5, dC * ( dStep5 or 0))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
-- assegno valore finale esatto
|
||||
local bOk = MySetAxisPos( sName, dPos)
|
||||
local bOk2 = not dPrev2 or MySetAxisPos( sName2, dPos2)
|
||||
local bOk3 = not dPrev3 or MySetAxisPos( sName3, dPos3)
|
||||
local bOk4 = not dPrev4 or MySetAxisPos( sName4, dPos4)
|
||||
local bOk5 = not dPrev5 or MySetAxisPos( sName5, dPos5)
|
||||
return ( bOk and bOk2 and bOk3 and bOk4 and bOk5), bOk, bOk2, bOk3, bOk4, bOk5
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function SetToolForVmill( sTool, sHead, nExit, VMill)
|
||||
-- se Vmill non definito, esco
|
||||
if not VMill then return true end
|
||||
-- se utensile, testa o uscita non definiti, reset ed esco
|
||||
if not sTool or sTool == '' or not sHead or sHead == '' or not nExit then
|
||||
EgtVolZmapResetTool( VMill)
|
||||
return false
|
||||
end
|
||||
-- verifico che l'utensile sia corrente
|
||||
local sOldTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
|
||||
if sTool ~= sOldTool then
|
||||
if not EgtTdbSetCurrTool( sTool) then return false end
|
||||
end
|
||||
-- dichiaro utensile per Vmill
|
||||
local nType = EgtTdbGetCurrToolParam( MCH_TP.TYPE)
|
||||
local dLen = EgtTdbGetCurrToolParam( MCH_TP.LEN)
|
||||
local dDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
||||
local dThick = EgtTdbGetCurrToolParam( MCH_TP.THICK)
|
||||
local dCornR = EgtTdbGetCurrToolParam( MCH_TP.CORNRAD)
|
||||
local dSideAng = EgtTdbGetCurrToolParam( MCH_TP.SIDEANG)
|
||||
local dMaxMat = EgtTdbGetCurrToolParam( MCH_TP.MAXMAT)
|
||||
-- ricerca dell'outline e del diametro gambo
|
||||
local nExitId = EgtGetFirstNameInGroup( EgtGetHeadId( sHead) or GDB_ID.NULL, 'T' .. tostring( nExit))
|
||||
local nToolId = EgtGetFirstNameInGroup( nExitId or GDB_ID.NULL, sTool)
|
||||
local nOutlineId = EgtGetFirstNameInGroup( nToolId or GDB_ID.NULL, 'Outline')
|
||||
local dMaxStemDiam = EgtGetInfo( nToolId or GDB_ID.NULL, 'D_STEM', 'd') or dDiam
|
||||
-- imposto profilo utensile per Vmill
|
||||
if nOutlineId then
|
||||
EgtVolZmapSetGenTool( VMill, sTool, nOutlineId)
|
||||
elseif nType == MCH_TY.MORTISE_STD then
|
||||
EgtVolZmapSetMortiserTool( VMill, sTool, dLen, dDiam, dThick, dCornR)
|
||||
elseif nType == MCH_TY.SAW_STD or nType == MCH_TY.SAW_FLAT then
|
||||
EgtVolZmapSetSawTool( VMill, sTool, dLen, dDiam, dThick, 0, dCornR)
|
||||
elseif nType == MCH_TY.WATERJET then
|
||||
EgtVolZmapSetStdTool( VMill, sTool, dLen + 50, dDiam, dCornR, dMaxMat)
|
||||
elseif abs( dSideAng) < GEO.EPS_ANG_SMALL or abs( dThick) < GEO.EPS_ANG_SMALL then
|
||||
if dDiam <= dMaxStemDiam then
|
||||
EgtVolZmapSetStdTool( VMill, sTool, dLen, dDiam, dCornR, dMaxMat)
|
||||
else
|
||||
EgtVolZmapSetSawTool( VMill, sTool, dLen, dDiam, dMaxMat, 0, dCornR)
|
||||
end
|
||||
else
|
||||
local bExtra = ( dThick > 0)
|
||||
local dTipLen = abs( dThick)
|
||||
local dTotLen = EgtIf( bExtra, dLen + dTipLen, dLen)
|
||||
local dDelta
|
||||
if dSideAng > 0 then
|
||||
if dCornR < GEO.EPS_SMALL then
|
||||
dDelta = 2 * dTipLen * tan( dSideAng)
|
||||
else
|
||||
dDelta = 2 * ( dCornR * cos( dSideAng) + ( dTipLen - dCornR + dCornR * sin( dSideAng)) * tan( dSideAng))
|
||||
end
|
||||
else
|
||||
dDelta = 2 * tan( dSideAng) * dTipLen
|
||||
end
|
||||
local dStemDiam = EgtIf( bExtra, dDiam, dDiam + dDelta)
|
||||
local dTipDiam = EgtIf( bExtra, dDiam - dDelta, dDiam)
|
||||
EgtVolZmapSetAdvTool( VMill, sTool, dTotLen, dStemDiam, dTipLen, dTipDiam, dCornR, dMaxMat)
|
||||
end
|
||||
-- se l'utensile non era corrente, ripristino il precedente
|
||||
if sTool ~= sOldTool then
|
||||
EgtTdbSetCurrTool( sOldTool)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function AddGeomToCollisionCheck( CollGrpId, sClass, vColl)
|
||||
if not CollGrpId then return false end
|
||||
local sCollGrp = EgtGetName( CollGrpId) or ''
|
||||
-- ricerca dei box
|
||||
local BoxId = EgtGetFirstNameInGroup( CollGrpId, 'BOX')
|
||||
while BoxId do
|
||||
local FrameId = BoxId + ( EgtGetInfo( BoxId, 'Frame', 'i') or 0)
|
||||
if FrameId ~= BoxId and EgtGetType( FrameId) == GDB_TY.GEO_FRAME then
|
||||
local b3Box = EgtGetBBoxRef( BoxId, GDB_BB.STANDARD, EgtFR( FrameId, GDB_ID.ROOT))
|
||||
local vtDiag = b3Box:getMax() - b3Box:getMin()
|
||||
local vtM = b3Box:getMin() - ORIG()
|
||||
table.insert( vColl, { Cl=sClass, Grp=sCollGrp, Fr=FrameId, Ty=MCH_SIM_COB.BOX, Mv=vtM, P1=vtDiag:getX(), P2=vtDiag:getY(), P3=vtDiag:getZ()})
|
||||
BoxId = EgtGetNextName( BoxId, 'BOX')
|
||||
end
|
||||
end
|
||||
-- ricerca dei cilindri
|
||||
local CylId = EgtGetFirstNameInGroup( CollGrpId, 'CYL')
|
||||
while CylId do
|
||||
local FrameId = CylId + ( EgtGetInfo( CylId, 'Frame', 'i') or 0)
|
||||
if FrameId ~= CylId and EgtGetType( FrameId) == GDB_TY.GEO_FRAME then
|
||||
local b3Box = EgtGetBBoxRef( CylId, GDB_BB.STANDARD, EgtFR( FrameId, GDB_ID.ROOT))
|
||||
local dR = ( b3Box:getDimX() + b3Box:getDimY()) / 4
|
||||
local dH = b3Box:getDimZ()
|
||||
local vtM = Vector3d( 0, 0, b3Box:getMin():getZ())
|
||||
table.insert( vColl, { Cl=sClass, Grp=sCollGrp, Fr=FrameId, Ty=MCH_SIM_COB.CYL, Mv=vtM, P1=dR, P2=dH, P3=0})
|
||||
CylId = EgtGetNextName( CylId, 'CYL')
|
||||
end
|
||||
end
|
||||
-- ricerca delle sfere
|
||||
local SphId = EgtGetFirstNameInGroup( CollGrpId, 'SPH')
|
||||
while SphId do
|
||||
local FrameId = SphId + ( EgtGetInfo( SphId, 'Frame', 'i') or 0)
|
||||
if FrameId ~= SphId and EgtGetType( FrameId) == GDB_TY.GEO_FRAME then
|
||||
local b3Box = EgtGetBBoxRef( SphId, GDB_BB.STANDARD, EgtFR( FrameId, GDB_ID.ROOT))
|
||||
local dR = ( b3Box:getDimX() + b3Box:getDimY() + b3Box:getDimZ()) / 6
|
||||
local vtM = b3Box:getCenter() - ORIG()
|
||||
table.insert( vColl, { Cl=sClass, Grp=sCollGrp, Fr=FrameId, Ty=MCH_SIM_COB.SPHE, Mv=vtM, P1=dR, P2=0, P3=0})
|
||||
SphId = EgtGetNextName( SphId, 'SPH')
|
||||
end
|
||||
end
|
||||
-- ricerca dei tronchi di cono
|
||||
local ConId = EgtGetFirstNameInGroup( CollGrpId, 'CON')
|
||||
while ConId do
|
||||
local FrameId = ConId + ( EgtGetInfo( ConId, 'Frame', 'i') or 0)
|
||||
if FrameId ~= ConId and EgtGetType( FrameId) == GDB_TY.GEO_FRAME then
|
||||
local frRef = EgtFR( FrameId, GDB_ID.ROOT)
|
||||
local vtZ = frRef:getVersZ()
|
||||
local dRb, dRt, dOb, dOt
|
||||
-- ricerca delle facce bottom e top
|
||||
local nFacCnt = EgtSurfTmFacetCount( ConId)
|
||||
for i = 0, nFacCnt - 1 do
|
||||
local vtN = EgtSurfTmFacetNormVersor( ConId, i, GDB_ID.ROOT)
|
||||
if AreSameVectorApprox( vtN, vtZ) then
|
||||
local b3Box = EgtSurfTmGetFacetBBoxRef( ConId, i, GDB_BB.STANDARD, frRef)
|
||||
dRt = ( b3Box:getDimX() + b3Box:getDimY()) / 4
|
||||
dOt = b3Box:getCenter():getZ()
|
||||
elseif AreOppositeVectorApprox( vtN, vtZ) then
|
||||
local b3Box = EgtSurfTmGetFacetBBoxRef( ConId, i, GDB_BB.STANDARD, frRef)
|
||||
dRb = ( b3Box:getDimX() + b3Box:getDimY()) / 4
|
||||
dOb = b3Box:getCenter():getZ()
|
||||
end
|
||||
end
|
||||
if dRb and dRt and dOb and dOt then
|
||||
local vtM = Vector3d( 0, 0, dOb)
|
||||
local dH = dOt - dOb
|
||||
table.insert( vColl, { Cl=sClass, Grp=sCollGrp, Fr=FrameId, Ty=MCH_SIM_COB.CONE, Mv=vtM, P1=dRb, P2=dRt, P3=dH})
|
||||
end
|
||||
ConId = EgtGetNextName( ConId, 'CON')
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function AddToCollisionCheck( sName, sCollGrp, vColl)
|
||||
if not vColl then return false end
|
||||
-- ricerca del gruppo base
|
||||
local GroupId = EgtGetHeadId( sName)
|
||||
if not GroupId then GroupId = EgtGetAxisId( sName) end
|
||||
if not GroupId then GroupId = EgtGetTableId( sName) end
|
||||
if not GroupId then GroupId = EgtGetBaseId( sName) end
|
||||
if not GroupId then return false end
|
||||
-- ricerca del gruppo di collisione
|
||||
local CAxCollId = EgtGetFirstNameInGroup( GroupId, sCollGrp)
|
||||
if not CAxCollId then return false end
|
||||
-- recupero della geometria di collisione
|
||||
return AddGeomToCollisionCheck( CAxCollId, sName, vColl)
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function AddToolToCollisionCheck( sHeadName, nExit, vColl)
|
||||
if not vColl then return false end
|
||||
local sTool = EgtGetLoadedTool( sHeadName, nExit)
|
||||
if not EgtTdbSetCurrTool( sTool or '') then return false end
|
||||
local nType = EgtTdbGetCurrToolParam( MCH_TP.TYPE)
|
||||
local dTotRad = EgtTdbGetCurrToolParam( MCH_TP.TOTDIAM) / 2
|
||||
local dTotLen = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN)
|
||||
local HeadId = EgtGetHeadId( sHeadName)
|
||||
local FrameId = EgtGetFirstNameInGroup( HeadId, '_T'..tostring( nExit))
|
||||
if nType == MCH_TY.SAW_STD or nType == MCH_TY.SAW_FLAT then
|
||||
local vtM = Vector3d( 0, 0, -dTotLen)
|
||||
local dThick = EgtTdbGetCurrToolParam( MCH_TP.THICK)
|
||||
table.insert( vColl, { Cl='T_'..sHeadName, Grp=sTool, Fr=FrameId, Ty=MCH_SIM_COB.CYL, Mv=vtM, P1=dTotRad, P2=dThick, P3=0})
|
||||
elseif nType == MCH_TY.DRILL_STD or nType == MCH_TY.DRILL_LONG then
|
||||
local dLen = EgtTdbGetCurrToolParam( MCH_TP.LEN)
|
||||
local vtMc = Vector3d( 0, 0, -dLen)
|
||||
table.insert( vColl, { Cl='T_'..sHeadName, Grp=sTool, Fr=FrameId, Ty=MCH_SIM_COB.CYL, Mv=vtMc, P1=dTotRad, P2=dLen, P3=0})
|
||||
if dTotLen > dLen + 0.1 then
|
||||
local vtMt = Vector3d( 0, 0, -dTotLen)
|
||||
table.insert( vColl, { Cl='T_'..sHeadName, Grp=sTool, Fr=FrameId, Ty=MCH_SIM_COB.CONE, Mv=vtMt, P1=0, P2=dTotRad, P3=dTotLen-dLen})
|
||||
end
|
||||
elseif nType ~= MCH_TY.MORTISE_STD then
|
||||
local dSideAng = EgtTdbGetCurrToolParam( MCH_TP.SIDEANG)
|
||||
local dThick = EgtTdbGetCurrToolParam( MCH_TP.THICK)
|
||||
if abs( dSideAng) < GEO.EPS_ANG_SMALL or abs( dThick) < GEO.EPS_ANG_SMALL then
|
||||
local vtM = Vector3d( 0, 0, -dTotLen)
|
||||
table.insert( vColl, { Cl='T_'..sHeadName, Grp=sTool, Fr=FrameId, Ty=MCH_SIM_COB.CYL, Mv=vtM, P1=dTotRad, P2=dTotLen, P3=0})
|
||||
else
|
||||
local dLen = EgtTdbGetCurrToolParam( MCH_TP.LEN)
|
||||
local dDiam = EgtTdbGetCurrToolParam( MCH_TP.DIAM)
|
||||
local bExtra = ( dThick > 0)
|
||||
local dTipLen = abs( dThick)
|
||||
local dTotLen = EgtIf( bExtra, dLen + dTipLen, dLen)
|
||||
local dDelta = 2 * dTipLen * tan( dSideAng)
|
||||
local dStemRad = EgtIf( bExtra, dDiam, dDiam + dDelta) / 2
|
||||
local dTipRad = EgtIf( bExtra, dDiam - dDelta, dDiam) / 2
|
||||
local vtMs = Vector3d( 0, 0, -( dTotLen - dTipLen))
|
||||
table.insert( vColl, { Cl='T_'..sHeadName, Grp=sTool, Fr=FrameId, Ty=MCH_SIM_COB.CYL, Mv=vtMs, P1=dStemRad, P2=dTotLen-dTipLen, P3=0})
|
||||
local vtMt = Vector3d( 0, 0, -dTotLen)
|
||||
table.insert( vColl, { Cl='T_'..sHeadName, Grp=sTool, Fr=FrameId, Ty=MCH_SIM_COB.CONE, Mv=vtMt, P1=dTipRad, P2=dStemRad, P3=dTipLen})
|
||||
end
|
||||
else
|
||||
EgtErase( EgtGetFirstNameInGroup( HeadId, '_TT'..tostring( nExit)) or GDB_ID.NULL)
|
||||
local frRef = EgtFR( FrameId)
|
||||
local SpecFrId = EgtCopy( FrameId, FrameId, GDB_IN.AFTER)
|
||||
EgtSetName( SpecFrId, '_TT'..tostring( nExit))
|
||||
EgtRotate( SpecFrId, frRef:getOrigin(), frRef:getVersY(), 90)
|
||||
local dThick = EgtTdbGetCurrToolParam( MCH_TP.THICK)
|
||||
local vtMb = Vector3d( 0, -dTotRad, 0)
|
||||
table.insert( vColl, { Cl='T_'..sHeadName, Grp=sTool, Fr=SpecFrId, Ty=MCH_SIM_COB.BOX, Mv=vtMb, P1=dTotLen-dTotRad, P2=2*dTotRad, P3=dThick})
|
||||
local vtMc = Vector3d( dTotLen-dTotRad, 0, 0)
|
||||
table.insert( vColl, { Cl='T_'..sHeadName, Grp=sTool, Fr=SpecFrId, Ty=MCH_SIM_COB.CYL, Mv=vtMc, P1=dTotRad, P2=dThick, P3=0})
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function DumpCollisionCheck( vColl, sTitle, nDbgLev)
|
||||
if not vColl then return false end
|
||||
if EgtGetDebugLevel() < ( nDbgLev or 1) then return true end
|
||||
if sTitle then EgtOutLog( sTitle, nDbgLev or 1) end
|
||||
for i, Coll in ipairs( vColl) do
|
||||
local sOut = ' Class='..Coll.Cl..' Group='..Coll.Grp..' FrId='..tostring( Coll.Fr)..' Type='..tostring( Coll.Ty)..' Mv='..tostring( Coll.Mv)
|
||||
if Coll.Ty == MCH_SIM_COB.BOX then
|
||||
sOut = sOut .. ' L='..EgtNumToString( Coll.P1, 3)..' W='..EgtNumToString( Coll.P2, 3)..' H='..EgtNumToString( Coll.P3, 3)
|
||||
elseif Coll.Ty == MCH_SIM_COB.CYL then
|
||||
sOut = sOut .. ' R='..EgtNumToString( Coll.P1, 3)..' H='..EgtNumToString( Coll.P2, 3)
|
||||
elseif Coll.Ty == MCH_SIM_COB.SPHE then
|
||||
sOut = sOut .. ' R='..EgtNumToString( Coll.P1, 3)
|
||||
elseif Coll.Ty == MCH_SIM_COB.CONE then
|
||||
sOut = sOut .. ' Rb='..EgtNumToString( Coll.P1, 3)..' Rt='..EgtNumToString( Coll.P2, 3)..' H='..EgtNumToString( Coll.P3, 3)
|
||||
end
|
||||
EgtOutLog( sOut, nDbgLev or 1)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function AddToolToCollisionObj( sTool, sHeadName, nExit, nInd)
|
||||
local vToolColl = {}
|
||||
AddToolToCollisionCheck( sHeadName, nExit, vToolColl)
|
||||
if #vToolColl == 0 then return false end
|
||||
DumpCollisionCheck( vToolColl, 'Tool Collision Objects :', 4)
|
||||
-- aggiungo la geometria trovata
|
||||
for i = 1, #vToolColl do
|
||||
EmtAddCollisionObjEx( nInd, vToolColl[i].Fr, vToolColl[i].Ty, vToolColl[i].Mv, vToolColl[i].P1, vToolColl[i].P2, vToolColl[i].P3)
|
||||
end
|
||||
return true, vToolColl[1]
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function AddToolHolderToCollisionObj( sTool, sHeadName, nExit, nInd)
|
||||
-- recupero il gruppo dell'utensile
|
||||
local HeadId = EgtGetHeadId( sHeadName)
|
||||
local ExitId = EgtGetFirstNameInGroup( HeadId, 'T'..tostring( nExit))
|
||||
local ToolId = EgtGetFirstInGroup( ExitId)
|
||||
-- cerco la geometria di collisione in questo gruppo
|
||||
local vThColl = {}
|
||||
if not AddGeomToCollisionCheck( ToolId, 'TH_'..sHeadName, vThColl) then return false end
|
||||
DumpCollisionCheck( vThColl, 'ToolHolder Collision Objects :', 4)
|
||||
-- aggiungo la geometria trovata
|
||||
for i = 1, #vThColl do
|
||||
EmtAddCollisionObjEx( nInd, vThColl[i].Fr, vThColl[i].Ty, vThColl[i].Mv, vThColl[i].P1, vThColl[i].P2, vThColl[i].P3)
|
||||
end
|
||||
return true, #vThColl
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
return EmtGenerator
|
||||
@@ -0,0 +1,19 @@
|
||||
-- %MACRO_NAME%.lua by EgalTech s.r.l. %DATE_TIME%
|
||||
-- Macro
|
||||
|
||||
-- Variabili predefinite
|
||||
-- MACRO.W = beam width
|
||||
-- MACRO.H = beam height
|
||||
-- MACRO.L = beam length
|
||||
|
||||
-- Intestazioni
|
||||
require( 'EgtBase')
|
||||
_ENV = EgtProtectGlobal()
|
||||
EgtEnableDebug( false)
|
||||
|
||||
print( 'Macro %MACRO_NAME% started')
|
||||
|
||||
local vPar = {%vPar%}
|
||||
local sPar = %sPar%
|
||||
|
||||
MACRO.FEATUREID = EgtBeamAddProcess( %AddFeature%, vPar, sPar)
|
||||
@@ -0,0 +1 @@
|
||||
ImportBtl : C:\ProgramData\Egaltech\EgtBeamWall\Projs\0001\Casa Mosca.btl
|
||||
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=10; charset=utf-8"/>
|
||||
<title>EgtCAM5 - C:\ProgramData\Egaltech\EgtBeamWall\Projs\0001\2.bwe 2022/05/04 19:29:45</title>
|
||||
<style type = "text/css">
|
||||
caption {
|
||||
margin: 10px;
|
||||
font: 200% arial, sans-serif;
|
||||
}
|
||||
table, th, td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table {
|
||||
margin: 30px;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
th, td {
|
||||
padding: 0.4rem;
|
||||
text-align: center;
|
||||
}
|
||||
tr.total {
|
||||
background-color: #e6e6e6;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<caption>Machinings</caption>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Time [h:m:s]</th>
|
||||
<th>Len [m]</th>
|
||||
<th>Tool</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cut_2_1</td>
|
||||
<td>00:00:18</td>
|
||||
<td> 2.1</td>
|
||||
<td>Lama1200</td>
|
||||
</tr>
|
||||
<tr class="total">
|
||||
<td>TOTAL</td>
|
||||
<td>00:00:18</td>
|
||||
<td> 2.1</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<caption>Tools</caption>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Len [m]</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lama1200</td>
|
||||
<td> 2.1</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,11 @@
|
||||
ERR=0
|
||||
---
|
||||
ROT=0
|
||||
CUTID=369
|
||||
TASKID=1849
|
||||
ERR=0
|
||||
---
|
||||
ROT=0
|
||||
CUTID=0
|
||||
TASKID=0
|
||||
TIME=19
|
||||
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=10; charset=utf-8"/>
|
||||
<title>EgtCAM5 - C:\ProgramData\Egaltech\EgtBeamWall\Projs\0001\5.bwe 2022/05/19 11:53:22</title>
|
||||
<style type = "text/css">
|
||||
caption {
|
||||
margin: 10px;
|
||||
font: 200% arial, sans-serif;
|
||||
}
|
||||
table, th, td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table {
|
||||
margin: 30px;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
th, td {
|
||||
padding: 0.4rem;
|
||||
text-align: center;
|
||||
}
|
||||
tr.total {
|
||||
background-color: #e6e6e6;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<caption>Machinings</caption>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Time [h:m:s]</th>
|
||||
<th>Len [m]</th>
|
||||
<th>Tool</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cut_5_1</td>
|
||||
<td>00:00:17</td>
|
||||
<td> 1.9</td>
|
||||
<td>Lama1200</td>
|
||||
</tr>
|
||||
<tr class="total">
|
||||
<td>TOTAL</td>
|
||||
<td>00:00:17</td>
|
||||
<td> 1.9</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<caption>Tools</caption>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Len [m]</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lama1200</td>
|
||||
<td> 1.9</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,102 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=10; charset=utf-8"/>
|
||||
<title>EgtCAM5 - C:\ProgramData\Egaltech\EgtBeamWall\Projs\0001\7.bwe 2022/05/04 19:19:42</title>
|
||||
<style type = "text/css">
|
||||
caption {
|
||||
margin: 10px;
|
||||
font: 200% arial, sans-serif;
|
||||
}
|
||||
table, th, td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table {
|
||||
margin: 30px;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
th, td {
|
||||
padding: 0.4rem;
|
||||
text-align: center;
|
||||
}
|
||||
tr.total {
|
||||
background-color: #e6e6e6;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<caption>Machinings</caption>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Time [h:m:s]</th>
|
||||
<th>Len [m]</th>
|
||||
<th>Tool</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Free_7</td>
|
||||
<td>00:00:17</td>
|
||||
<td> 1.0</td>
|
||||
<td>Fresa25x130</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Drill_1</td>
|
||||
<td>00:00:06</td>
|
||||
<td> 0.5</td>
|
||||
<td>Fresa25x130</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Drill_2</td>
|
||||
<td>00:00:07</td>
|
||||
<td> 0.5</td>
|
||||
<td>Fresa25x130</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cut_7_4</td>
|
||||
<td>00:00:42</td>
|
||||
<td> 7.4</td>
|
||||
<td>Lama1200</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cut_7_5</td>
|
||||
<td>00:00:13</td>
|
||||
<td> 2.5</td>
|
||||
<td>Lama1200</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cut_7_6</td>
|
||||
<td>00:00:41</td>
|
||||
<td> 7.6</td>
|
||||
<td>Lama1200</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cut_7_1</td>
|
||||
<td>00:00:20</td>
|
||||
<td> 2.5</td>
|
||||
<td>Lama1200</td>
|
||||
</tr>
|
||||
<tr class="total">
|
||||
<td>TOTAL</td>
|
||||
<td>00:02:29</td>
|
||||
<td>21.9</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<caption>Tools</caption>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Len [m]</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fresa25x130</td>
|
||||
<td> 1.9</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lama1200</td>
|
||||
<td>20.0</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,21 @@
|
||||
ERR=0
|
||||
---
|
||||
ROT=0
|
||||
CUTID=562
|
||||
TASKID=572
|
||||
ERR=0
|
||||
---
|
||||
ROT=0
|
||||
CUTID=562
|
||||
TASKID=574
|
||||
ERR=0
|
||||
---
|
||||
ROT=0
|
||||
CUTID=562
|
||||
TASKID=576
|
||||
ERR=0
|
||||
---
|
||||
ROT=0
|
||||
CUTID=0
|
||||
TASKID=0
|
||||
TIME=150
|
||||
@@ -0,0 +1,19 @@
|
||||
-- %MACRO_NAME%.lua by EgalTech s.r.l. %DATE_TIME%
|
||||
-- Macro
|
||||
|
||||
-- Variabili predefinite
|
||||
-- MACRO.W = beam width
|
||||
-- MACRO.H = beam height
|
||||
-- MACRO.L = beam length
|
||||
|
||||
-- Intestazioni
|
||||
require( 'EgtBase')
|
||||
_ENV = EgtProtectGlobal()
|
||||
EgtEnableDebug( false)
|
||||
|
||||
print( 'Macro %MACRO_NAME% started')
|
||||
|
||||
local vPar = {%vPar%}
|
||||
local sPar = %sPar%
|
||||
|
||||
MACRO.FEATUREID = EgtBeamAddProcess( %AddFeature%, vPar, sPar)
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 64 KiB |