Compare commits

...

85 Commits

Author SHA1 Message Date
Emmanuele Sassi 429e82e349 Icarus 2.7h1:
- aggiunti parametri RibsStrandOverlap e MaxSlicesNumber
2025-09-08 19:26:05 +02:00
Dario Sassi c1a0d1267e Icarus 2.7g2 :
- ricompilazione con cambio versione.
2025-07-28 08:48:53 +02:00
Dario Sassi efbc378b9e Icarus 2.7g1 :
- modifiche per gestione traccia utensile in simulazione (va abilitata da Ini programma e da macchina).
2025-07-15 13:07:34 +02:00
Dario Sassi 60323f2929 Icarus 2.7f2 :
- ricompilazione con cambio versione.
2025-06-26 15:42:33 +02:00
Dario Sassi da1e7b8104 Icarus :
- completata gestione drop file.
2025-04-30 12:25:11 +02:00
Dario Sassi b8fdd83f88 Icarus 2.7d2 :
- ricompilazione con cambio versione.
2025-04-30 11:30:45 +02:00
Dario Sassi 5a3a36c02d Icarus 2.7a4 :
- modifica per nuova impostazione di SetAdvImpTolerance oltre a SetSurfTmTolerance.
2025-01-31 09:27:23 +01:00
Dario Sassi e65a5a7b4b Icarus 2.7a2 :
- cambio annuale di versione.
2025-01-23 14:54:39 +01:00
Dario Sassi 4e80a94013 Icarus 2.6k1 :
- alcuni parametri generali (PREFLOWDELAY, POSTFLOWDELAY e SCREWBACK) impostati come numeri e non lunghezze per evitare conversioni mm/inches.
2024-11-27 15:39:30 +01:00
Dario Sassi 98f9a3917c Icarus 2.6g7 :
- ricompilazione con cambio versione.
2024-07-31 17:08:14 +02:00
Dario Sassi a737a9313d Icarus 2.6g1 :
- inserito ingrandimento area della tavola per consentire di posizionare i pezzi anche parzialmente fuori nei casi ove possibile (aree ammesse secondo tipo di estrusione).
2024-07-03 20:00:20 +02:00
Dario Sassi 1f94bff09b Icarus 2.6f4 :
- ricompilazione con cambio versione.
2024-07-01 12:44:20 +02:00
Dario Sassi 849b5e6f45 Icarus 2.6e2 :
- ricompilazione con cambio versione.
2024-05-15 15:01:07 +02:00
Emmanuele Sassi 0a77a8e32f Merge branch 'main' of https://gitlab.steamware.net/egalware/icarus 2024-05-14 09:45:21 +02:00
Emmanuele Sassi 084a71bf54 - aggiunta gestione parametri Ribs LinkFillet e LeadFillet 2024-05-14 09:45:18 +02:00
Dario Sassi bdc26a0bf6 Icarus 2.6e1 :
- ricompilazione con cambio versione.
2024-05-10 16:06:13 +02:00
Emmanuele Sassi ca32de50f0 - aggiunto flag per uso sezione strand semplificata 2024-05-10 11:55:00 +02:00
Dario Sassi a0d7687214 Icarus :
- piccole modifiche per simulazione con Virtual Additive.
2024-04-29 12:48:18 +02:00
Emmanuele Sassi 412c3c4b5d - aggiunto flag per VirtualAdditive 2024-04-29 11:41:17 +02:00
Dario Sassi 90b1fa9221 Icarus :
- modifiche per sistemazione riferimenti oggetti inseriti.
2024-04-12 11:03:47 +02:00
Dario Sassi 11704fa33d Icarus 2.6d2 :
- migliorie nella segnalazione problemi con chiave di rete
- aggiunta gestione AdvFlag=0/1 della sezione [Import] nel file INI per Flag importatore formati avanzati
- eliminata gestione eventi OnImport... perchè ImportProject non usato, aggiunta gestione evento OnInsertingProject.
2024-04-12 08:56:04 +02:00
Dario Sassi 97442a5d65 Icarus 2.6b1 :
- ricompilazione con cambio versione.
2024-02-13 14:55:15 +01:00
Dario Sassi 4f1a9b8938 Icarus 2.6a1 :
- corretto controllo movimento pezzo (ora anche fuori da tavola purchè in area di stampa)
- aggiunta indicazione giorni mancanti alla fine del piano di manutenzione.
2024-01-26 16:14:34 +01:00
Emmanuele Sassi c96c3ef581 - aggiunta variabile temperatura essicatore 2024-01-10 12:37:14 +01:00
Dario Sassi fdf33ef796 Icarus :
- eliminata opzione CreateJson su Shift+Save perchè serviva solo per debug iniziale.
2024-01-09 18:28:03 +01:00
Dario Sassi a599fde07a Merge commit '1ebf4a3f54f1bcd305d8b3a0e8076b7d0b76653b' 2024-01-09 18:11:16 +01:00
Dario Sassi 7267b77522 Icarus :
- per export macchina (icrx) aggiunta abilitazione aggiuntiva da Ini ([General] ExportMachine=0/1 default 1).
2024-01-09 18:09:46 +01:00
Emmanuele Sassi 1ebf4a3f54 Merge branch 'main' of https://gitlab.steamware.net/egalware/icarus 2024-01-09 17:57:51 +01:00
Emmanuele Sassi 4b85c118cd - aggiunti parametri per merge delle rib con shell interna 2024-01-09 17:57:47 +01:00
Dario Sassi 53a79186c9 Merge commit '12081cec286176e5b9067a1fa81cf6eb1c57a0b6' 2024-01-09 17:46:53 +01:00
Dario Sassi 4d37978789 Icarus 2.5l1 :
- modifiche per gestione griglia come tavola / standard.
2024-01-09 17:31:08 +01:00
Emmanuele Sassi 12081cec28 - modifiche per export del 3dm per la macchina 2023-12-19 14:57:46 +01:00
Dario Sassi 109feeb6f7 Icarus :
- in import aggiunto ai tipi di file da visualizzare tutti quelli importati.
2023-11-13 16:56:23 +01:00
Dario Sassi da0bcbac69 Icarus 2.5k1 :
- tolta perdita fuoco da edit quando si passa sopra finestra grafica
- sostituito Ionic.zip con DotNetZip
- in feedback ora solo file con il nome del progetto oltre a macchina e log.
2023-11-13 16:25:46 +01:00
Emmanuele Sassi 27a54b0034 - modifiche per nuova esportazione 3mf 2023-10-24 11:03:04 +02:00
Emmanuele Sassi c1aee47e53 - aggiunto StrandH in json e corretto valore strandW 2023-10-13 15:40:38 +02:00
Dario Sassi 93b573f1f0 Icarus 2.5j1 :
- ricompilazione con cambio versione.
2023-10-02 16:15:23 +02:00
Dario Sassi e19c3bf83d Merge remote-tracking branch 'origin/feature/DifferentTypeWidth' 2023-10-02 16:00:09 +02:00
Dario Sassi 63fa6ba9b8 Icarus 2.5h2 :
- ricompilazione con cambio versione.
2023-10-02 10:26:00 +02:00
Emmanuele Sassi e59d50923b Merge branch 'main' into feature/ExportForMachine 2023-09-26 11:41:08 +02:00
Emmanuele Sassi e5fca60809 - aggiunti dati nel json
- evito creazione icrx se generazione andata male
2023-09-26 11:40:21 +02:00
Emmanuele Sassi 91582b4ab9 - aggiunti parametri larghezza strand per tutti i tipi di strand
- corretto errore di modifica alpha colore dopo creazione degli strand
- eliminata la colonna FMin
2023-09-25 16:20:45 +02:00
Emmanuele Sassi f7631e5201 - creazione del pacchetto di export per la macchina 2023-09-20 11:14:35 +02:00
Dario Sassi 4604ae3558 Icarus :
- migliorata gestione di progetto modificato.
2023-08-30 12:14:26 +02:00
Dario Sassi 624eb0566f Icarus 2.5h1 :
- modifiche per visualizzare meglio l'area di valido posizionamento dei pezzi.
2023-08-28 19:50:01 +02:00
Emmanuele Sassi f45efb2310 - creazione Json degli strati 2023-08-28 18:05:43 +02:00
Emmanuele Sassi c32bfd55d0 - aggiunta indicazione parametri beta
- aggiunto parametro SlicingHeight
- corretti alcuni testi parametri
2023-08-24 19:04:44 +02:00
Emmanuele Sassi db65ef9e15 - correzione errore di aggiornamento area di stampa su cambio tipo 2023-07-10 13:24:26 +02:00
Emmanuele Sassi d2a6a27200 Icarus 2.5g1 :
- ricompilazione con cambio versione
- aggiunta gestione parametri per link degli infill e strand count sui filled solids
2023-07-07 18:39:25 +02:00
Emmanuele Sassi 6bad0e177f Merge branch 'feature/InfillParams' 2023-06-16 19:18:11 +02:00
Emmanuele Sassi 667b8fde7c - introduzione parametri per infill
- modifica dei parametri auxSolid con gestione infill
- correzione creazione shellnumber e filled solid con esc su creazione percorso
2023-06-15 12:28:31 +02:00
Emmanuele Sassi 48d0063167 Merge remote-tracking branch 'ICARUS/main' into feature/InfillParams 2023-06-12 12:51:52 +02:00
DarioS 13d89a3857 Icarus 2.5f1 :
- modificate costanti per Infill
- aggiunta gestione chiave di rete
- eliminata gestione codici protezione per nesting
- aggiornato codice di protezione mensile.
2023-06-12 09:20:59 +02:00
DarioS df7bb978b8 Icarus 2.5e2 :
- ricompilazione con cambio versione.
2023-05-26 10:47:28 +02:00
DarioS 088be26abf Icarus 2.5e1 :
- ricompilazione con cambio versione
- miglioria indicazione unità di misura di tempo (min:s).
2023-05-03 11:54:59 +02:00
DarioS 2e81f09a85 Icarus :
- modifica per far funzionara la ProgressBar anche con il calcolo dei solidi.
2023-04-24 15:35:11 +02:00
DarioS 21692af684 Icarus 2.5d4 :
- al parametro ScrewBack viene assegnato valore di default 45 (per progetti vecchi o nuove lavorazioni di libreria).
2023-04-20 16:16:10 +02:00
DarioS 6c36f856e6 Icarus 2.5d3 :
- ricompilazione con cambio versione.
2023-04-18 19:36:16 +02:00
Emmanuele Sassi 33b90967c6 - disattivato pannello Instrument quando modifiche in corso
- gestita visibilita' contemporanea di InputPanele MessagePanel
2023-04-18 17:21:03 +02:00
Emmanuele Sassi 47ea4e3646 - correzioni creazione solidi
- migliorata dis/attivazione interfaccia durante creazione solidi
2023-04-18 09:01:20 +02:00
Emmanuele Sassi cc41ca8d82 - correzione disabilitazione parametri LeadOut in CurrMachining
- cambiata gestione della modalita' di modifica selezionata
- corezione impostazione pagina modifica dopo apertura progetto
- verifica che non ci siano operazioni di modifica in corso prima di far partire slice
- correzione errore su chiusura percorso disegnato
- disabilitata interfaccia quando comando in corso in modifica
2023-04-17 20:00:50 +02:00
DarioS 554b1a662e Icarus :
- correzione per caricamento file icrs con drag.
2023-04-11 15:24:16 +02:00
DarioS 10a0745449 Merge remote-tracking branch 'origin/FlowDocument' 2023-04-11 13:38:26 +02:00
Emmanuele Sassi f47b202499 - introdotta EgtTextBox2 su lavorazioni da Db e Curr 2023-04-11 13:36:19 +02:00
DarioS 1a0eb0cb31 Icarus :
- lettura MinMax ora da Ini macchina.
2023-04-11 13:27:10 +02:00
DarioS 33176f40fa Icarus 2.5d2 :
- ricompilazione con cambio versione.
2023-04-11 11:19:41 +02:00
Emmanuele Sassi bbb6d16483 Merge branch 'FlowDocument' 2023-04-11 09:40:29 +02:00
Emmanuele Sassi 317321d46c - eliminata funzione import inutile
- trasformate funzioni di gestione progetto da sub a function
2023-04-11 09:40:13 +02:00
Emmanuele Sassi 57baab72d5 Merge branch 'FlowDocument' 2023-04-08 12:30:03 +02:00
Emmanuele Sassi 13401bc486 - aggiunta area di estrusione
- aggiunto file di dati della macchina
- messaggi di errore su slice se pezzo fuori da area stampabile
2023-04-08 12:29:45 +02:00
Emmanuele Sassi 91d8e8aa1f Merge branch 'develop' 2023-04-07 15:54:38 +02:00
Emmanuele Sassi 65288427f3 Merge remote-tracking branch 'ICARUS/main' into develop 2023-04-07 15:54:10 +02:00
Emmanuele Sassi a234c6f6f1 - Aggiunta estensione icrs in apertura progetto 2023-04-07 15:53:58 +02:00
DarioS f1819fc61c Icarus 2.5d1 :
- ricompilazione con cambio versione e aggiornamento codici di protezione mensili.
2023-04-07 10:30:15 +02:00
Emmanuele Sassi e67c79992c - aggiornati bottoni Ok, Cancel su molte pagine
- cambiate icone Reference
- aggiunte icone in slice manager
- spostato Update in TFS vicino a Reset
2023-04-07 09:49:44 +02:00
Emmanuele Sassi 209cab548b - aggiunta finestra di caricamento import
- spostato processEvent in main che rimanda alle varie parti del programma
2023-04-03 18:05:01 +02:00
Emmanuele Sassi fa737c7c80 - riattivata visualizzazione macchina su simulazione
- aggiornata icona vista tool
- gestita visualizzazione strati dopo calcolo slice
- uniformata textbox assi macchina in simulazione
2023-04-03 13:33:44 +02:00
Emmanuele Sassi 4811a37fe7 - aggiunto nuovo splashscreen
- aggiunta opacita' finestra all'avvio
2023-04-03 08:53:59 +02:00
Emmanuele Sassi d43acd1678 - aggiunto messaggio input su griglia da oggetto
- migliorata gestione griglia da oggetto
2023-04-01 12:36:00 +02:00
Emmanuele Sassi 2850e07360 - correzione attivazione parametri di lavorazione 2023-03-30 09:03:44 +02:00
Emmanuele Sassi 9ae9a6df88 - aggiunta gestione dipendenze tra parametri di lavorazione
- aggiunti min e max per parametri di lavorazione
2023-03-30 08:58:45 +02:00
Emmanuele Sassi f5206ce8bf - aggiunta possibilita' di impostare min e max per parametri di lavorazione 2023-03-29 16:26:48 +02:00
Emmanuele Sassi f4dea984be - introdotta estensione progetti icrs 2023-03-29 15:15:00 +02:00
Emmanuele Sassi 8a7af066d9 - fermato timer splashscreen
- introdotta estensione progetti icrs
2023-03-29 15:14:34 +02:00
Emmanuele Sassi bbb52b6ade Merge branch 'NewWidow' into develop 2023-03-28 20:34:19 +02:00
98 changed files with 4295 additions and 1537 deletions
+12
View File
@@ -18,12 +18,24 @@ Public Class AboutBoxV
Dim sLeftDays As String = ""
Dim nLeftDays As Integer
If EgtGetKeyLeftDays(nLeftDays) AndAlso nLeftDays < 500 Then sLeftDays = " (" & nLeftDays.ToString() & ")"
Dim sAssStatus As String = " discontinued"
Dim nAssLeftDays As Integer
If EgtGetKeyAssLeftDays( nAssLeftDays) And nAssLeftDays >= 0 Then
If nAssLeftDays > 30 then
sAssStatus = "expires within " & nAssLeftDays.ToString() & " days"
Else If nAssLeftDays > 0 then
sAssStatus = "to be renewed within " & nAssLeftDays.ToString() & " days"
Else
sAssStatus = "to be renewed by today"
End If
End If
sInfo = If(EgtIsDebug(), "*** Debug Libraries ***" & Environment.NewLine, "")
sInfo &= "User " & Environment.MachineName & "\" & Environment.UserName &
" Inst" & Map.refMainWindowVM.MainWindowM.nInstance.ToString() &
" Ulv" & Map.refMainWindowVM.MainWindowM.nUserLevel.ToString() &
" Dbg" & Map.refMainWindowVM.MainWindowM.DebugLevel().ToString() & Environment.NewLine
sInfo &= sKey & " - " & sKlev & " - " & sOpts & sLeftDays & Environment.NewLine
sInfo &= "Maintenance plane " & sAssStatus & Environment.NewLine
sInfo &= "DataRoot " & Map.refMainWindowVM.MainWindowM.sDataRoot & Environment.NewLine
sInfo &= "MachinesRoot " & Map.refMainWindowVM.MainWindowM.sMachinesRoot & Environment.NewLine
Dim sOpSys As String = String.Empty
+39
View File
@@ -2,6 +2,8 @@
Public Const TABLE = "Table"
Public Const TABLE_OUTLINE = "TableOutline"
Public Const EXTRUSION_AREA = "ExtrusionArea"
Public Const EXTRUSION_RECT = "ExtrusionRect"
Public Const PART = "Part"
Public Const PRINT_SOLID = "PrintSolid"
Public Const LAY_MACH_START = "MachStart"
@@ -66,6 +68,7 @@
Public Const MAT_KW = "KW"
Public Const MAT_KZ = "KZ"
Public Const MAT_KN = "KN"
Public Const MAT_TDRYER = "TDRYER"
Public Const MAT_ORIG = "Orig"
' parametri Lavorazione
@@ -88,6 +91,7 @@
Public Const MAC_LINKTYPE = "LinkType"
Public Const MAC_LINKPARAM = "LinkParam"
Public Const MAC_LINKZUP = "LinkZup"
Public Const MAC_INNERSHELLWIDTH = "InnerStrandW"
Public Const MAC_OFFSETLEADPOINT = "OffsetLeadPoint"
Public Const MAC_LEADIN = "LeadIn"
Public Const MAC_LEADINTANGDIST = "LeadInTangDist"
@@ -104,10 +108,20 @@
Public Const MAC_G0FEED = "G0Feed"
Public Const MAC_G0FEEDZ = "G0FeedZ"
Public Const MAC_TOOLDIAM = "ToolDiam"
Public Const MAC_PREFLOWDELAY = "PreFlowDelay"
Public Const MAC_POSTFLOWDELAY = "PostFlowDelay"
Public Const MAC_SCREWBACK = "ScrewBack"
Public Const MAC_SLICINGHEIGHT = "SlicingHeight"
Public Const MAC_MAXSLICESNUMBER = "MaxSlicesNumber"
Public Const MAC_RIBSSTRANDWIDTH = "RibsStrandW"
Public Const MAC_RIBSTYPE = "RibsType"
Public Const MAC_RIBSOVERLAP = "RibsOverlap"
Public Const MAC_RIBSSTRANDOVERLAP = "RibsStrandOverlap"
Public Const MAC_RIBSSTRANDCOUNT = "RibsStrandCount"
Public Const MAC_RIBSLINK = "RibsLink"
Public Const MAC_RIBSLINKFILLET = "RibsLinkFillet"
Public Const MAC_RIBSMERGEWITHSHELL = "RibsMergeWithShell"
Public Const MAC_RIBSINVERTMERGEDSHELLMAINLINK = "InvertRibsMergedShellMainLink"
Public Const MAC_RIBSINVERTORDER = "RibsInvertOrder"
Public Const MAC_RIBSINVERTDIRECTION = "RibsInvertDirection"
Public Const MAC_RIBSINVERTSTRANDORDER = "RibsInvertStrandOrder"
@@ -118,20 +132,45 @@
Public Const MAC_RIBSLEADOUTCOASTING = "RibsLeadOutCoasting"
Public Const MAC_RIBSLEADOUTWIPE = "RibsLeadOutWipe"
Public Const MAC_RIBSLEADOUTWIPEDIR = "RibsLeadOutWipeDir"
Public Const MAC_RIBSLEADFILLET = "RibsLeadFillet"
Public Const MAC_RIBSLIMITUNBOUNDEDWITHSOLID = "LimitUnboundedRibsWithSolid"
Public Const MAC_SHELLNBRDIFFERENCE = "ShellNbrDifference"
Public Const MAC_SHELLNBRCOASTING = "ShellNbrCoasting"
Public Const MAC_SHELLNBRWIPE = "ShellNbrWipe"
Public Const MAC_SHELLNBRWIPEDIR = "ShellNbrWipeDir"
Public Const MAC_AUXSOLIDSSTRANDWIDTH = "AuxSolidsStrandW"
Public Const MAC_AUXSOLIDSOVERLAP = "AuxSolidsOverlap"
Public Const MAC_AUXSOLIDSINFILL = "AuxSolidsInfill"
Public Const MAC_AUXSOLIDSINFILLLINK = "AuxSolidsInfillLink"
Public Const MAC_AUXSOLIDSSTRANDCOUNT = "AuxSolidsStrandCount"
Public Const MAC_AUXSOLIDSSTRANDORDER = "AuxSolidsStrandOrder"
Public Const MAC_AUXSOLIDSLINKTYPE = "AuxSolidsLinkType"
Public Const MAC_AUXSOLIDSLINKPARAM = "AuxSolidsLinkParam"
Public Const MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE = "AuxSolidsStartPointOffsetOnSlice"
Public Const MAC_AUXSOLIDSOFFSETLEADPOINT = "AuxSolidsOffsetLeadPoint"
Public Const MAC_AUXSOLIDSDENSITY = "AuxSolidsDensity"
Public Const MAC_AUXSOLIDSGRIDOVERLAP = "AuxSolidsGridOverlap"
Public Const MAC_AUXSOLIDSDIRECTION = "AuxSolidsDirection"
Public Const MAC_AUXSOLIDSOFFSETX = "AuxSolidsOffsetX"
Public Const MAC_AUXSOLIDSOFFSETY = "AuxSolidsOffsetY"
Public Const MAC_AUXSOLIDSCOASTINGLEN = "AuxSolidsCoastingLen"
Public Const MAC_AUXSOLIDSWIPELEN = "AuxSolidsWipeLen"
Public Const MAC_AUXSOLIDSWIPEDIR = "AuxSolidsWipeDir"
Public Const MAC_INFILLSTRANDWIDTH = "InfillStrandW"
Public Const MAC_FLOORTYPE = "FloorType"
Public Const MAC_CEILCOUNT = "CeilCount"
Public Const MAC_CEILTYPE = "CeilType"
Public Const MAC_INFILLTYPE = "InfillType"
Public Const MAC_INFILLLINK = "InfillLink"
Public Const MAC_INFILLDENSITY = "InfillDensity"
Public Const MAC_INFILLOVERLAP = "InfillOverlap"
Public Const MAC_INFILLGRIDOVERLAP = "InfillGridOverlap"
Public Const MAC_INFILLDIRECTION = "InfillDirection"
Public Const MAC_INFILLOFFSETX = "InfillOffsetX"
Public Const MAC_INFILLOFFSETY = "InfillOffsetY"
Public Const MAC_INFILLCOASTING = "InfillCoasting"
Public Const MAC_INFILLWIPE = "InfillWipe"
Public Const MAC_INFILLWIPEDIR = "InfillWipeDir"
Public Const MAC_DYNAMICMODE = "DynamicMode"
Public Const MAC_PRINTORDER = "PrintOrder"
Public Const MAC_CONSTANT = "Constant"
+5
View File
@@ -21,6 +21,7 @@ Public Module ConstGen
' File con dati di licenza
Public Const LIC_FILE_NAME As String = "Icarus.lic"
Public Const S_LICENCE As String = "Licence"
Public Const K_LOCKID As String = "LockId"
Public Const K_KEY As String = "Key"
Public Const K_NESTKEY As String = "NestKey"
@@ -52,6 +53,7 @@ Public Module ConstGen
' Abilitazioni licenza
Friend Enum KEY_OPT As UInteger
BASE = 1 ' Prodotto Icarus
MACHINE_EXPORT = 2 ' opzione per esportare file icrx per macchina
End Enum
' File di log generale
@@ -76,4 +78,7 @@ Public Module ConstGen
' Nome file Lua con le funzioni di attrezzaggio
Public Const SETUP_LUA As String = "SetUp.lua"
' Chiave di Info in gruppo di lavoro per attivazione Virtual Milling
Public Const KEY_MCHGRP_VM As String = "Vm"
End Module
+8
View File
@@ -26,8 +26,10 @@ Public Module ConstIni
'Public Const K_MESSAGES As String = "Messages"
'Public Const K_WINPLACE As String = "WinPlace"
'Public Const K_LASTPROJ As String = "LastProj"
Public Const K_NETKEY As String = "NetKey"
Public Const K_LASTNGEDIR As String = "LastNgeDir"
Public Const K_LASTIMPDIR As String = "LastImpDir"
Public Const K_MACHINEEXPORT As String = "MachineExport"
'Public Const K_SUPPORT As String = "Support"
'Public Const S_LANGUAGES As String = "Languages"
@@ -101,11 +103,14 @@ Public Module ConstIni
Public Const K_DXFSCALE As String = "DxfScale"
Public Const K_STLSCALE As String = "StlScale"
Public Const K_CNCFLAG As String = "CncFlag"
Public Const K_ADVFLAG As String = "AdvFlag"
'Public Const S_SIMUL As String = "Simul"
'Public Const K_SLIDERX As String = "SliderX"
'Public Const K_SLIDERVAL As String = "SliderVal"
Public Const K_MACHVIEWMODE As String = "MachViewMode"
Public Const K_VIRTUALADDITIVE As String = "VirtualAdditive"
Public Const K_TRACEENABLE As String = "TraceEnable"
Public Const S_PRINTING3D As String = "3dPrinting"
Public Const K_3PRNBASEDIR As String = "BaseDir"
@@ -114,6 +119,9 @@ Public Module ConstIni
Public Const K_VIEWSLIDER As String = "ViewSlider"
Public Const K_IMPORTCURREXTENSION As String = "ImportCurrExtension"
Public Const S_SOLIDS As String = "Solids"
Public Const K_SIMPLIFIEDSECTION As String = "SimplifiedSection"
Public Const S_COLORS As String = "Colors"
Public Const K_CLR_PRINTPART As String = "PrintPart"
Public Const K_CLR_RIBS As String = "Ribs"
+35
View File
@@ -0,0 +1,35 @@
'----------------------------------------------------------------------------
' EgalTech 2015-2015
'----------------------------------------------------------------------------
' File : ConstIni.vb Data : 12.02.15 Versione : 1.6b3
' Contenuto : Modulo costanti sezione e chiavi per file Ini.
'
'
'
' Modifiche : 12.02.15 DS Creazione modulo.
'
'
'----------------------------------------------------------------------------
Public Module ConstMachDataIni
Public Const MACHDATA_INI_FILE_NAME As String = "Data.ini"
Public Const S_TABLE As String = "Table"
Public Const K_DIMX As String = "DimX"
Public Const K_DIMY As String = "DimY"
Public Const K_POSX As String = "PosX"
Public Const K_POSY As String = "PosY"
Public Const K_POSZ As String = "PosZ"
Public Const S_VERTICAL As String = "Vertical"
Public Const S_45DEGX As String = "45DegX"
Public Const S_45DEGY As String = "45DegY"
Public Const S_HORIZONTAL As String = "Horizontal"
Public Const K_MINX As String = "MinX"
Public Const K_MAXX As String = "MaxX"
Public Const K_MINY As String = "MinY"
Public Const K_MAXY As String = "MaxY"
End Module
+9 -25
View File
@@ -1,31 +1,6 @@
Public Module ConstMachIni
Public Const MACH_INI_FILE_NAME As String = "MachData.ini"
Public Const GETWALLDATA_FILE_NAME As String = "GetWallData.lua"
Public Const GETTS3DATA_FILE_NAME As String = "GetTs3Data.lua"
Public Const K_NCTYPE As String = "NCType"
Public Const K_CONNECTIONSTRING As String = "ConnectionString"
Public Const S_CHANNELS As String = "Channels"
Public Const S_PARTPROGRAM As String = "PartProgram"
Public Const S_EXTENSION As String = "Extension"
' Variables della macchina corrente
Public Const S_MAINVARIABLES As String = "MainVariables"
Public Const S_VARIABLES As String = "Variables"
Public Const S_INPUTVARIABLES As String = "InputVariables"
Public Const S_OUTPUTVARIABLES As String = "OutputVariables"
Public Const S_MDI As String = "MDI"
Public Const K_BEAM As String = "Beam"
Public Const K_WALL As String = "Wall"
Public Const K_SCRIPT As String = "Scripts"
Public Const K_SETUP As String = "Setup"
Public Const K_FLOW As String = "Flow"
Public Const TS3DATA_FILE As String = "Ts3Data.lua"
Public Const S_MACHINING As String = "Machining"
Public Const K_MACH_INITSCRIPT As String = "InitScript"
@@ -35,5 +10,14 @@
Public Const K_SLICINGTYPE As String = "SlicingType"
Public Const K_SPEED_MIN As String = "SpeedMin"
Public Const K_SPEED_MAX As String = "SpeedMax"
Public Const K_MAX_HEIGHT As String = "HMax"
Public Const S_MINMAX As String = "MinMax"
Public Const S_VMILL As String = "VMill"
Public Const K_VM_ENABLE As String = "Enable"
Public Const S_TOOLTRACE As String = "ToolTrace"
Public Const K_TT_ENABLE As String = "Enable"
End Module
@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Height="38"
Visibility="{Binding DoneBtn_Visibility}"
Visibility="{Binding Message_Visibility}"
HorizontalAlignment="Left"
Margin="45,0,0,0"
Padding="0"
+392 -82
View File
@@ -111,6 +111,7 @@ Public Class CurrMachining
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, False))
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, False))
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, False))
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.INFILL, nPartId, m_nIndex, False))
For Each Cathegory In m_CathegoryList
For Each MachiningParam In Cathegory.MachiningParamList
AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged
@@ -128,6 +129,7 @@ Public Class CurrMachining
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.RIBS, nPartId, m_nIndex, True))
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.SHELL_NUMBER, nPartId, m_nIndex, True))
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.AUX_SOLID, nPartId, m_nIndex, True))
m_CathegoryList.Add(New CurrMachiningCathegory(MachiningCathegory.Cathegories.INFILL, nPartId, m_nIndex, True))
For Each Cathegory In m_CathegoryList
For Each MachiningParam In Cathegory.MachiningParamList
AddHandler MachiningParam.PropertyChanged, AddressOf OnMachiningParamPropertyChanged
@@ -199,74 +201,143 @@ Public Class CurrMachiningCathegory
Select Case m_Type
Case Cathegories.GENERAL
m_sName = "General"
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.SLICINGTYPE, nPartId, nIndex, bForceFromDb),
New CurrCheckMachiningParam(MachiningParam.Params.SPIRALVASE, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.STRANDH, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.STRANDW, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.STRANDCOUNT, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.OFFSET, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.STRANDOVERLAP, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb),
New CurrComboMachiningParam(MachiningParam.Params.STRANDORDER, nPartId, nIndex, bForceFromDb),
New CurrComboMachiningParam(MachiningParam.Params.DIRECTION, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.G0FEED, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.G0FEEDZ, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.TOOLDIAM, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.FLOWRATE_PC, nPartId, nIndex, bForceFromDb),
New CurrComboMachiningParam(MachiningParam.Params.DYNAMIC_MODE, nPartId, nIndex, bForceFromDb),
New CurrOrderedMachiningParam(MachiningParam.Params.PRINT_ORDER, nPartId, nIndex, bForceFromDb)})
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.SLICINGTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.SPIRALVASE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.STRANDH, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.STRANDW, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.STRANDCOUNT, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.OFFSET, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.STRANDOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.STARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.STRANDORDER, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.DIRECTION, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.G0FEED, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.G0FEEDZ, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LINKZUP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.TOOLDIAM, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.FLOWRATE_PC, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.DYNAMIC_MODE, nPartId, nIndex, bForceFromDb, Me),
New CurrOrderedMachiningParam(MachiningParam.Params.PRINT_ORDER, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.PREFLOWDELAY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.POSTFLOWDELAY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.SCREWBACK, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.SLICINGHEIGHT, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.MAXSLICESNUMBER, nPartId, nIndex, bForceFromDb, Me)})
Case Cathegories.LINK
m_sName = "Shell"
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.LINKTYPE, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.LINKPARAM, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.LINKZUP, nPartId, nIndex, bForceFromDb),
New CurrComboMachiningParam(MachiningParam.Params.LEADIN, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.LEADINTANGDIST, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.LEADINORTHODIST, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.OFFSETLEADPOINT, nPartId, nIndex, bForceFromDb),
New CurrComboMachiningParam(MachiningParam.Params.LEADOUT, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTTANGDIST, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTORTHODIST, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGLEN, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGFEED_PC, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.WIPELEN, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.WIPEFEED_PC, nPartId, nIndex, bForceFromDb)})
'New CurrNumericMachiningParam(MachiningParam.Params.WIPEDIR, nPartId, nIndex, bForceFromDb)})
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.INNERSHELLWIDTH, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.OFFSETLEADPOINT, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.LINKTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LINKPARAM, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.LEADIN, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LEADINTANGDIST, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LEADINORTHODIST, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.LEADOUT, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTTANGDIST, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.LEADOUTORTHODIST, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGLEN, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.COASTINGFEED_PC, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.WIPELEN, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.WIPEFEED_PC, nPartId, nIndex, bForceFromDb, Me)})
'New CurrNumericMachiningParam(MachiningParam.Params.WIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
Case Cathegories.RIBS
m_sName = "Ribs"
m_MachiningParamList = New List(Of MachiningParam)({New CurrComboMachiningParam(MachiningParam.Params.RIBSTYPE, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nPartId, nIndex, bForceFromDb),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLINK, nPartId, nIndex, bForceFromDb),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTORDER, nPartId, nIndex, bForceFromDb),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nPartId, nIndex, bForceFromDb),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nPartId, nIndex, bForceFromDb),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADINLEN, nPartId, nIndex, bForceFromDb),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLEADOUTINVERT, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nPartId, nIndex, bForceFromDb),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nPartId, nIndex, bForceFromDb)})
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDWIDTH, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.RIBSTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLIMITUNBOUNDEDWITHSOLID, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLINK, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLINKFILLET, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSMERGEWITHSHELL, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTMERGEDSHELLMAINLINK, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTORDER, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADINLEN, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.RIBSLEADOUTINVERT, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.RIBSLEADFILLET, nPartId, nIndex, bForceFromDb, Me)})
Case Cathegories.SHELL_NUMBER
m_sName = "Reduce Shell Number"
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRCOASTING, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPE, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nPartId, nIndex, bForceFromDb)})
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRCOASTING, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
Case Cathegories.AUX_SOLID
m_sName = "Filled Solid"
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nPartId, nIndex, bForceFromDb),
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nPartId, nIndex, bForceFromDb),
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nPartId, nIndex, bForceFromDb),
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nPartId, nIndex, bForceFromDb),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nPartId, nIndex, bForceFromDb)})
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDWIDTH, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.AUXSOLIDSINFILLLINK, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDCOUNT, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETLEADPOINT, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSDENSITY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSGRIDOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSDIRECTION, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETX, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
Case Cathegories.INFILL
m_sName = "Infill"
m_MachiningParamList = New List(Of MachiningParam)({New CurrNumericMachiningParam(MachiningParam.Params.INFILLSTRANDWIDTH, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.FLOORCOUNT, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.FLOORTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.CEILCOUNT, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.CEILTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrComboMachiningParam(MachiningParam.Params.INFILLTYPE, nPartId, nIndex, bForceFromDb, Me),
New CurrCheckMachiningParam(MachiningParam.Params.INFILLLINK, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLDENSITY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLGRIDOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLDIRECTION, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLOFFSETX, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLOFFSETY, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLOVERLAP, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLCOASTING, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLWIPE, nPartId, nIndex, bForceFromDb, Me),
New CurrNumericMachiningParam(MachiningParam.Params.INFILLWIPEDIR, nPartId, nIndex, bForceFromDb, Me)})
End Select
' verifico dipendenze tra parametri
Select Case m_Type
Case Cathegories.LINK
For Each Param In {MachiningParam.Params.LINKTYPE, MachiningParam.Params.LEADIN, MachiningParam.Params.LEADOUT}
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
Case Cathegories.RIBS
For Each Param In {MachiningParam.Params.RIBSTYPE}
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
Case Cathegories.AUX_SOLID
For Each Param In {MachiningParam.Params.AUXSOLIDSINFILL}
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
For Each Param In {MachiningParam.Params.AUXSOLIDSSTRANDCOUNT}
Dim MachiningParam As NumericMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
Case Cathegories.INFILL
For Each Param In {MachiningParam.Params.FLOORCOUNT, MachiningParam.Params.CEILCOUNT}
Dim MachiningParam As NumericMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
For Each Param In {MachiningParam.Params.INFILLTYPE}
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
End Select
End Sub
@@ -292,13 +363,39 @@ Public Class CurrNumericMachiningParam
Return If(m_bIsLen, LenToString(m_dValue, 1), DoubleToString(m_dValue, 2))
End Get
Set(value As String)
Dim dTempValue As Double = 0
If m_bIsLen Then
StringToLen(value, m_dValue)
StringToLen(value, dTempValue)
Else
StringToDouble(value, m_dValue)
StringToDouble(value, dTempValue)
End If
If m_bIsActiveMinMax Then
If m_MinMaxType = MinMaxTypes.ABSOLUT Then
If dTempValue >= m_dMinValue AndAlso dTempValue <= m_dMaxValue Then
m_dValue = dTempValue
End If
ElseIf m_MinMaxType = MinMaxTypes.PERCENTAGE Then
Dim LinkedParam As MachiningParam = Nothing
' cerco il parametro a cui e' collegato
For Each CurrCathegory In Map.refMachiningDbVM.SelMachining.CathegoryList
LinkedParam = CurrCathegory.MachiningParamList.FirstOrDefault(Function(x) x.Type = m_MinMaxLinkedParam)
If Not IsNothing(LinkedParam) Then Exit For
Next
If Not IsNothing(LinkedParam) AndAlso TypeOf LinkedParam Is NumericMachiningParam Then
Dim NumericLinkedParam As NumericMachiningParam = DirectCast(LinkedParam, NumericMachiningParam)
If dTempValue >= NumericLinkedParam.dValue * m_dMinValue / 100 AndAlso dTempValue <= NumericLinkedParam.dValue * m_dMaxValue / 100 Then
m_dValue = dTempValue
End If
Else
m_dValue = dTempValue
End If
End If
Else
m_dValue = dTempValue
End If
NotifyPropertyChanged(NameOf(sValue))
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
ManageDependencyParam()
End Set
End Property
@@ -318,8 +415,8 @@ Public Class CurrNumericMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean)
MyBase.New(Type, nIndex)
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean, Cathegory As MachiningCathegory)
MyBase.New(Type, nIndex, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.STRANDH
@@ -346,6 +443,9 @@ Public Class CurrNumericMachiningParam
Case Params.LINKZUP
bReadFromPart = EgtGetInfo(nPartId, MAC_LINKZUP, m_dValue)
m_bIsLen = True
Case Params.INNERSHELLWIDTH
bReadFromPart = EgtGetInfo(nPartId, MAC_INNERSHELLWIDTH, m_dValue)
m_bIsLen = True
Case Params.OFFSETLEADPOINT
bReadFromPart = EgtGetInfo(nPartId, MAC_OFFSETLEADPOINT, m_dValue)
m_bIsLen = True
@@ -388,12 +488,36 @@ Public Class CurrNumericMachiningParam
Case Params.TOOLDIAM
bReadFromPart = EgtGetInfo(nPartId, MAC_TOOLDIAM, m_dValue)
m_bIsLen = True
Case Params.PREFLOWDELAY
bReadFromPart = EgtGetInfo(nPartId, MAC_PREFLOWDELAY, m_dValue)
m_bIsLen = False
Case Params.POSTFLOWDELAY
bReadFromPart = EgtGetInfo(nPartId, MAC_POSTFLOWDELAY, m_dValue)
m_bIsLen = False
Case Params.SCREWBACK
bReadFromPart = EgtGetInfo(nPartId, MAC_SCREWBACK, m_dValue)
m_bIsLen = False
Case Params.SLICINGHEIGHT
bReadFromPart = EgtGetInfo(nPartId, MAC_SLICINGHEIGHT, m_dValue)
m_bIsLen = True
Case Params.MAXSLICESNUMBER
bReadFromPart = EgtGetInfo(nPartId, MAC_MAXSLICESNUMBER, m_dValue)
m_bIsLen = False
Case Params.RIBSSTRANDWIDTH
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDWIDTH, m_dValue)
m_bIsLen = True
Case Params.RIBSOVERLAP
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_dValue)
m_bIsLen = False
Case Params.RIBSSTRANDOVERLAP
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDOVERLAP, m_dValue)
m_bIsLen = False
Case Params.RIBSSTRANDCOUNT
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSSTRANDCOUNT, m_dValue)
m_bIsLen = False
Case Params.RIBSLINKFILLET
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLINKFILLET, m_dValue)
m_bIsLen = True
Case Params.RIBSLEADINLEN
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADINLEN, m_dValue)
m_bIsLen = True
@@ -409,6 +533,9 @@ Public Class CurrNumericMachiningParam
Case Params.RIBSLEADOUTWIPEDIR
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, m_dValue)
m_bIsLen = False
Case Params.RIBSLEADFILLET
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADFILLET, m_dValue)
m_bIsLen = True
Case Params.SHELLNBRDIFFERENCE
bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRDIFFERENCE, m_dValue)
m_bIsLen = False
@@ -421,15 +548,39 @@ Public Class CurrNumericMachiningParam
Case Params.SHELLNBRWIPEDIR
bReadFromPart = EgtGetInfo(nPartId, MAC_SHELLNBRWIPEDIR, m_dValue)
m_bIsLen = False
Case Params.AUXSOLIDSSTRANDWIDTH
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDWIDTH, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSOVERLAP
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, m_dValue)
m_bIsLen = False
Case Params.AUXSOLIDSLINKPARAM
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSSTRANDCOUNT
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDCOUNT, m_dValue)
m_bIsLen = False
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSOFFSETLEADPOINT
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETLEADPOINT, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSDENSITY
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSDENSITY, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSGRIDOVERLAP
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSGRIDOVERLAP, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSDIRECTION
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSDIRECTION, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSOFFSETX
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETX, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSOFFSETY
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETY, m_dValue)
m_bIsLen = True
Case Params.AUXSOLIDSCOASTINGLEN
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, m_dValue)
m_bIsLen = True
@@ -442,27 +593,66 @@ Public Class CurrNumericMachiningParam
Case Params.FLOWRATE_PC
bReadFromPart = EgtGetInfo(nPartId, MAC_CONSTANT, m_dValue)
m_bIsLen = False
Case Params.CEILCOUNT
bReadFromPart = EgtGetInfo(nPartId, MAC_CEILCOUNT, m_dValue)
m_bIsLen = False
Case Params.INFILLSTRANDWIDTH
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLSTRANDWIDTH, m_dValue)
m_bIsLen = True
Case Params.INFILLDENSITY
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLDENSITY, m_dValue)
m_bIsLen = False
Case Params.INFILLOVERLAP
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLOVERLAP, m_dValue)
m_bIsLen = False
Case Params.INFILLGRIDOVERLAP
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLGRIDOVERLAP, m_dValue)
m_bIsLen = False
Case Params.INFILLDIRECTION
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLDIRECTION, m_dValue)
m_bIsLen = False
Case Params.INFILLOFFSETX
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLOFFSETX, m_dValue)
m_bIsLen = True
Case Params.INFILLOFFSETY
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLOFFSETY, m_dValue)
m_bIsLen = True
Case Params.INFILLCOASTING
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLCOASTING, m_dValue)
m_bIsLen = True
Case Params.INFILLWIPE
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLWIPE, m_dValue)
m_bIsLen = True
Case Params.INFILLWIPEDIR
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLWIPEDIR, m_dValue)
m_bIsLen = False
End Select
m_dOrigValue = m_dValue
If nIndex > 0 Then
Dim DbMachining As Machining = Map.refMachiningDbVM.MachiningList.FirstOrDefault(Function(x) x.nIndex = nIndex)
Select Case Type
Case Params.STRANDH, Params.STRANDW, Params.STRANDCOUNT, Params.OFFSET, Params.STRANDOVERLAP, Params.STARTPOINTOFFSETONSLICE,
Params.FLOORCOUNT, Params.G0FEED, Params.G0FEEDZ, Params.TOOLDIAM, Params.FLOWRATE_PC
Params.G0FEED, Params.G0FEEDZ, Params.LINKZUP, Params.TOOLDIAM, Params.FLOWRATE_PC, Params.PREFLOWDELAY, Params.POSTFLOWDELAY, Params.SCREWBACK, Params.SLICINGHEIGHT, Params.MAXSLICESNUMBER
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.LINKPARAM, Params.LINKZUP, Params.OFFSETLEADPOINT, Params.LEADINTANGDIST, Params.LEADINORTHODIST,
Case Params.LINKPARAM, Params.INNERSHELLWIDTH, Params.OFFSETLEADPOINT, Params.LEADINTANGDIST, Params.LEADINORTHODIST,
Params.LEADOUTTANGDIST, Params.LEADOUTORTHODIST, Params.COASTINGLEN, Params.COASTINGFEED_PC,
Params.WIPELEN, Params.WIPEFEED_PC ' Params.WIPEDIR
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.LINK).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.RIBSOVERLAP, Params.RIBSSTRANDCOUNT, Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION,
Case Params.RIBSSTRANDWIDTH, Params.RIBSOVERLAP, Params.RIBSSTRANDOVERLAP, Params.RIBSSTRANDCOUNT, Params.RIBSLINK, Params.RIBSLINKFILLET, Params.RIBSMERGEWITHSHELL, Params.RIBSINVERTMERGEDSHELLMAINLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION,
Params.RIBSLEADININVERT, Params.RIBSLEADINLEN, Params.RIBSLEADOUTINVERT, Params.RIBSLEADOUTLEN, Params.RIBSLEADOUTCOASTING,
Params.RIBSLEADOUTWIPE, Params.RIBSLEADOUTWIPEDIR
Params.RIBSLEADOUTWIPE, Params.RIBSLEADOUTWIPEDIR, Params.RIBSLEADFILLET
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.SHELLNBRDIFFERENCE, Params.SHELLNBRCOASTING, Params.SHELLNBRWIPE, Params.SHELLNBRWIPEDIR
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.SHELL_NUMBER).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.AUXSOLIDSOVERLAP, Params.AUXSOLIDSLINKPARAM, Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE,
Params.AUXSOLIDSCOASTINGLEN, Params.AUXSOLIDSWIPELEN, Params.AUXSOLIDSWIPEDIR
Case Params.AUXSOLIDSSTRANDWIDTH, Params.AUXSOLIDSOVERLAP, Params.AUXSOLIDSLINKPARAM, Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE,
Params.AUXSOLIDSOFFSETLEADPOINT, Params.AUXSOLIDSDENSITY, Params.AUXSOLIDSGRIDOVERLAP,
Params.AUXSOLIDSDIRECTION, Params.AUXSOLIDSOFFSETX, Params.AUXSOLIDSOFFSETY,
Params.AUXSOLIDSCOASTINGLEN, Params.AUXSOLIDSWIPELEN, Params.AUXSOLIDSWIPEDIR, Params.AUXSOLIDSSTRANDCOUNT
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.INFILLSTRANDWIDTH, Params.FLOORCOUNT, Params.CEILCOUNT, Params.INFILLDENSITY, Params.INFILLOVERLAP,
Params.INFILLGRIDOVERLAP, Params.INFILLDIRECTION, Params.INFILLOFFSETX,
Params.INFILLOFFSETY, Params.INFILLCOASTING, Params.INFILLWIPE, Params.INFILLWIPEDIR
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.INFILL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
End Select
If bForceFromDb OrElse Not bReadFromPart Then
m_dValue = m_DbParam.dOrigValue
@@ -501,6 +691,8 @@ Public Class CurrNumericMachiningParam
EgtSetInfo(nPartId, MAC_LINKPARAM, sWriteValue)
Case Params.LINKZUP
EgtSetInfo(nPartId, MAC_LINKZUP, sWriteValue)
Case Params.INNERSHELLWIDTH
EgtSetInfo(nPartId, MAC_INNERSHELLWIDTH, sWriteValue)
Case Params.OFFSETLEADPOINT
EgtSetInfo(nPartId, MAC_OFFSETLEADPOINT, sWriteValue)
Case Params.LEADINTANGDIST
@@ -529,10 +721,26 @@ Public Class CurrNumericMachiningParam
EgtSetInfo(nPartId, MAC_G0FEEDZ, sWriteValue)
Case Params.TOOLDIAM
EgtSetInfo(nPartId, MAC_TOOLDIAM, sWriteValue)
Case Params.PREFLOWDELAY
EgtSetInfo(nPartId, MAC_PREFLOWDELAY, sWriteValue)
Case Params.POSTFLOWDELAY
EgtSetInfo(nPartId, MAC_POSTFLOWDELAY, sWriteValue)
Case Params.SCREWBACK
EgtSetInfo(nPartId, MAC_SCREWBACK, sWriteValue)
Case Params.SLICINGHEIGHT
EgtSetInfo(nPartId, MAC_SLICINGHEIGHT, sWriteValue)
Case Params.MAXSLICESNUMBER
EgtSetInfo(nPartId, MAC_MAXSLICESNUMBER, sWriteValue)
Case Params.RIBSSTRANDWIDTH
EgtSetInfo(nPartId, MAC_RIBSSTRANDWIDTH, sWriteValue)
Case Params.RIBSOVERLAP
EgtSetInfo(nPartId, MAC_RIBSOVERLAP, sWriteValue)
Case Params.RIBSSTRANDOVERLAP
EgtSetInfo(nPartId, MAC_RIBSSTRANDOVERLAP, sWriteValue)
Case Params.RIBSSTRANDCOUNT
EgtSetInfo(nPartId, MAC_RIBSSTRANDCOUNT, sWriteValue)
Case Params.RIBSLINKFILLET
EgtSetInfo(nPartId, MAC_RIBSLINKFILLET, sWriteValue)
Case Params.RIBSLEADINLEN
EgtSetInfo(nPartId, MAC_RIBSLEADINLEN, sWriteValue)
Case Params.RIBSLEADOUTLEN
@@ -543,6 +751,8 @@ Public Class CurrNumericMachiningParam
EgtSetInfo(nPartId, MAC_RIBSLEADOUTWIPE, sWriteValue)
Case Params.RIBSLEADOUTWIPEDIR
EgtSetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, sWriteValue)
Case Params.RIBSLEADFILLET
EgtSetInfo(nPartId, MAC_RIBSLEADFILLET, sWriteValue)
Case Params.SHELLNBRDIFFERENCE
EgtSetInfo(nPartId, MAC_SHELLNBRDIFFERENCE, sWriteValue)
Case Params.SHELLNBRCOASTING
@@ -551,12 +761,28 @@ Public Class CurrNumericMachiningParam
EgtSetInfo(nPartId, MAC_SHELLNBRWIPE, sWriteValue)
Case Params.SHELLNBRWIPEDIR
EgtSetInfo(nPartId, MAC_SHELLNBRWIPEDIR, sWriteValue)
Case Params.AUXSOLIDSSTRANDWIDTH
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTRANDWIDTH, sWriteValue)
Case Params.AUXSOLIDSSTRANDCOUNT
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTRANDCOUNT, sWriteValue)
Case Params.AUXSOLIDSOVERLAP
EgtSetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, sWriteValue)
Case Params.AUXSOLIDSLINKPARAM
EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKPARAM, sWriteValue)
Case Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE
EgtSetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, sWriteValue)
Case Params.AUXSOLIDSOFFSETLEADPOINT
EgtSetInfo(nPartId, MAC_AUXSOLIDSOFFSETLEADPOINT, sWriteValue)
Case Params.AUXSOLIDSDENSITY
EgtSetInfo(nPartId, MAC_AUXSOLIDSDENSITY, sWriteValue)
Case Params.AUXSOLIDSGRIDOVERLAP
EgtSetInfo(nPartId, MAC_AUXSOLIDSGRIDOVERLAP, sWriteValue)
Case Params.AUXSOLIDSDIRECTION
EgtSetInfo(nPartId, MAC_AUXSOLIDSDIRECTION, sWriteValue)
Case Params.AUXSOLIDSOFFSETX
EgtSetInfo(nPartId, MAC_AUXSOLIDSOFFSETX, sWriteValue)
Case Params.AUXSOLIDSOFFSETY
EgtSetInfo(nPartId, MAC_AUXSOLIDSOFFSETY, sWriteValue)
Case Params.AUXSOLIDSCOASTINGLEN
EgtSetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue)
Case Params.AUXSOLIDSWIPELEN
@@ -565,6 +791,28 @@ Public Class CurrNumericMachiningParam
EgtSetInfo(nPartId, MAC_AUXSOLIDSWIPEDIR, sWriteValue)
Case Params.FLOWRATE_PC
EgtSetInfo(nPartId, MAC_CONSTANT, sWriteValue)
Case Params.INFILLSTRANDWIDTH
EgtSetInfo(nPartId, MAC_INFILLSTRANDWIDTH, sWriteValue)
Case Params.CEILCOUNT
EgtSetInfo(nPartId, MAC_CEILCOUNT, sWriteValue)
Case Params.INFILLDENSITY
EgtSetInfo(nPartId, MAC_INFILLDENSITY, sWriteValue)
Case Params.INFILLOVERLAP
EgtSetInfo(nPartId, MAC_INFILLOVERLAP, sWriteValue)
Case Params.INFILLGRIDOVERLAP
EgtSetInfo(nPartId, MAC_INFILLGRIDOVERLAP, sWriteValue)
Case Params.INFILLDIRECTION
EgtSetInfo(nPartId, MAC_INFILLDIRECTION, sWriteValue)
Case Params.INFILLOFFSETX
EgtSetInfo(nPartId, MAC_INFILLOFFSETX, sWriteValue)
Case Params.INFILLOFFSETY
EgtSetInfo(nPartId, MAC_INFILLOFFSETY, sWriteValue)
Case Params.INFILLCOASTING
EgtSetInfo(nPartId, MAC_INFILLCOASTING, sWriteValue)
Case Params.INFILLWIPE
EgtSetInfo(nPartId, MAC_INFILLWIPE, sWriteValue)
Case Params.INFILLWIPEDIR
EgtSetInfo(nPartId, MAC_INFILLWIPEDIR, sWriteValue)
End Select
End Sub
@@ -621,8 +869,8 @@ Public Class CurrStringMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nIndex As Integer)
MyBase.New(Type, nIndex)
Sub New(Type As Params, nIndex As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, nIndex, Cathegory)
m_sValue = sValue
m_sOrigValue = m_sValue
End Sub
@@ -677,6 +925,11 @@ Public Class CurrComboMachiningParam
m_SelValue = value
NotifyPropertyChanged(NameOf(SelValue))
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
ManageDependencyParam()
' se aggiorno SlicingType
If m_Type = Params.SLICINGTYPE Then
CurrentMachine.UpdateExtrusionArea()
End If
End Set
End Property
@@ -696,8 +949,8 @@ Public Class CurrComboMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean)
MyBase.New(Type, nIndex)
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean, Cathegory As MachiningCathegory)
MyBase.New(Type, nIndex, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.SLICINGTYPE
@@ -762,9 +1015,14 @@ Public Class CurrComboMachiningParam
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSTYPE, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
Case Params.AUXSOLIDSINFILL
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL.ZIGZAG, "ZigZag")})
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.LINES, "Lines"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.GRID, "Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG_GRID, "Zigzag Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB, "Honeycomb"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB_GRID, "Honeycomb Grid")})
Dim nSelValue As Integer = 0
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILL, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
@@ -787,6 +1045,28 @@ Public Class CurrComboMachiningParam
Dim nSelValue As Integer = 0
bReadFromPart = EgtGetInfo(nPartId, MAC_DYNAMICMODE, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
Case Params.FLOORTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag")})
Dim nSelValue As Integer = 0
bReadFromPart = EgtGetInfo(nPartId, MAC_FLOORTYPE, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
Case Params.CEILTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag")})
Dim nSelValue As Integer = 0
bReadFromPart = EgtGetInfo(nPartId, MAC_CEILTYPE, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
Case Params.INFILLTYPE
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.LINES, "Lines"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.GRID, "Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG_GRID, "Zigzag Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB, "Honeycomb"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB_GRID, "Honeycomb Grid")})
Dim nSelValue As Integer = 0
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLTYPE, nSelValue)
m_SelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = nSelValue)
End Select
m_OrigSelValue = m_SelValue
If nIndex > 0 Then
@@ -800,6 +1080,8 @@ Public Class CurrComboMachiningParam
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.AUXSOLIDSINFILL, Params.AUXSOLIDSSTRANDORDER, Params.AUXSOLIDSLINKTYPE
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.FLOORTYPE, Params.CEILTYPE, Params.INFILLTYPE
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.INFILL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
End Select
If bForceFromDb OrElse Not bReadFromPart Then
m_SelValue = m_DbParam.OrigSelValue
@@ -838,6 +1120,12 @@ Public Class CurrComboMachiningParam
EgtSetInfo(nPartId, MAC_AUXSOLIDSLINKTYPE, m_SelValue.Id)
Case Params.DYNAMIC_MODE
EgtSetInfo(nPartId, MAC_DYNAMICMODE, m_SelValue.Id)
Case Params.FLOORTYPE
EgtSetInfo(nPartId, MAC_FLOORTYPE, m_SelValue.Id)
Case Params.CEILTYPE
EgtSetInfo(nPartId, MAC_CEILTYPE, m_SelValue.Id)
Case Params.INFILLTYPE
EgtSetInfo(nPartId, MAC_INFILLTYPE, m_SelValue.Id)
End Select
End Sub
@@ -848,6 +1136,7 @@ Public Class CurrComboMachiningParam
Friend Overrides Sub ResetParam()
m_SelValue = m_OrigSelValue
NotifyPropertyChanged(NameOf(SelValue))
CurrentMachine.UpdateExtrusionArea()
End Sub
#Region "COMMANDS"
@@ -867,6 +1156,7 @@ Public Class CurrComboMachiningParam
m_SelValue = DbParam.OrigSelValue
NotifyPropertyChanged(NameOf(SelValue))
NotifyPropertyChanged(NameOf(bIsModifiedFromDb))
CurrentMachine.UpdateExtrusionArea()
End Sub
#End Region ' ResetParam
@@ -905,14 +1195,18 @@ Public Class CurrCheckMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean)
MyBase.New(Type, nIndex)
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean, Cathegory As MachiningCathegory)
MyBase.New(Type, nIndex, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.SPIRALVASE
bReadFromPart = EgtGetInfo(nPartId, MAC_SPIRALVASE, m_bValue)
Case Params.RIBSLINK
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLINK, m_bValue)
Case Params.RIBSMERGEWITHSHELL
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSMERGEWITHSHELL, m_bValue)
Case Params.RIBSINVERTMERGEDSHELLMAINLINK
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTMERGEDSHELLMAINLINK, m_bValue)
Case Params.RIBSINVERTORDER
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSINVERTORDER, m_bValue)
Case Params.RIBSINVERTDIRECTION
@@ -925,6 +1219,10 @@ Public Class CurrCheckMachiningParam
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLEADOUTINVERT, m_bValue)
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
bReadFromPart = EgtGetInfo(nPartId, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, m_bValue)
Case Params.AUXSOLIDSINFILLLINK
bReadFromPart = EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILLLINK, m_bValue)
Case Params.INFILLLINK
bReadFromPart = EgtGetInfo(nPartId, MAC_INFILLLINK, m_bValue)
End Select
m_bOrigValue = m_bValue
If nIndex > 0 Then
@@ -932,8 +1230,12 @@ Public Class CurrCheckMachiningParam
Select Case Type
Case Params.SPIRALVASE
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.GENERAL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.RIBSLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, Params.RIBSINVERTSTRANDORDER, Params.RIBSLEADININVERT, Params.RIBSLEADOUTINVERT, Params.RIBSLIMITUNBOUNDEDWITHSOLID
Case Params.RIBSLINK, Params.RIBSMERGEWITHSHELL, Params.RIBSINVERTMERGEDSHELLMAINLINK, Params.RIBSINVERTORDER, Params.RIBSINVERTDIRECTION, Params.RIBSINVERTSTRANDORDER, Params.RIBSLEADININVERT, Params.RIBSLEADOUTINVERT, Params.RIBSLIMITUNBOUNDEDWITHSOLID
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.RIBS).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.AUXSOLIDSINFILLLINK
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.AUX_SOLID).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
Case Params.INFILLLINK
m_DbParam = DbMachining.CathegoryList.FirstOrDefault(Function(y) y.Type = MachiningCathegory.Cathegories.INFILL).MachiningParamList.FirstOrDefault(Function(z) z.Type = m_Type)
End Select
If bForceFromDb OrElse Not bReadFromPart Then
m_bValue = m_DbParam.bOrigValue
@@ -948,6 +1250,10 @@ Public Class CurrCheckMachiningParam
EgtSetInfo(nPartId, MAC_SPIRALVASE, If(m_bValue, 1, 0))
Case Params.RIBSLINK
EgtSetInfo(nPartId, MAC_RIBSLINK, If(m_bValue, 1, 0))
Case Params.RIBSMERGEWITHSHELL
EgtSetInfo(nPartId, MAC_RIBSMERGEWITHSHELL, If(m_bValue, 1, 0))
Case Params.RIBSINVERTMERGEDSHELLMAINLINK
EgtSetInfo(nPartId, MAC_RIBSINVERTMERGEDSHELLMAINLINK, If(m_bValue, 1, 0))
Case Params.RIBSINVERTORDER
EgtSetInfo(nPartId, MAC_RIBSINVERTORDER, If(m_bValue, 1, 0))
Case Params.RIBSINVERTDIRECTION
@@ -960,6 +1266,10 @@ Public Class CurrCheckMachiningParam
EgtSetInfo(nPartId, MAC_RIBSLEADOUTINVERT, If(m_bValue, 1, 0))
Case Params.RIBSLIMITUNBOUNDEDWITHSOLID
EgtSetInfo(nPartId, MAC_RIBSLIMITUNBOUNDEDWITHSOLID, If(m_bValue, 1, 0))
Case Params.AUXSOLIDSINFILLLINK
EgtSetInfo(nPartId, MAC_AUXSOLIDSINFILLLINK, If(m_bValue, 1, 0))
Case Params.INFILLLINK
EgtSetInfo(nPartId, MAC_INFILLLINK, If(m_bValue, 1, 0))
End Select
End Sub
@@ -1016,8 +1326,8 @@ Public Class CurrOrderedMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean)
MyBase.New(Type, nIndex)
Sub New(Type As Params, nPartId As Integer, nIndex As Integer, bForceFromDb As Boolean, Cathegory As MachiningCathegory)
MyBase.New(Type, nIndex, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.PRINT_ORDER
@@ -1,6 +1,7 @@
<Grid x:Class="CurrMachiningPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:PrintApp="clr-namespace:Icarus"
Width="310"
VerticalAlignment="Center">
@@ -46,19 +47,27 @@
</ItemsControl.ItemsPanel>
<ItemsControl.Resources>
<DataTemplate DataType="{x:Type PrintApp:NumericMachiningParam}">
<Grid Margin="0,1,2.5,1">
<Grid Margin="0,1,2.5,1"
IsEnabled="{Binding bIsActive}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBox Grid.Column="1"
Text="{Binding sValue}"
Margin="2.5,0,2.5,0"
Style="{StaticResource ParameterList_TextBox}"/>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding sName, Mode=OneWay}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBlock Text=" (BETA)"
Margin="0,0,2.5,0"
Foreground="Red"
Visibility="{Binding IsBeta_Visibility}"
Style="{StaticResource ParameterList_TextBlock}"/>
</StackPanel>
<EgtWPFLib5:EgtTextBox2 Grid.Column="1"
Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
Margin="2.5,0,2.5,0"
Style="{StaticResource ParameterList_TextBox2}"/>
<Button Grid.Column="2"
Content="R"
Command="{Binding ResetParam_Command}"
@@ -70,15 +79,23 @@
</Grid>
</DataTemplate>
<DataTemplate DataType="{x:Type PrintApp:ComboMachiningParam}">
<Grid Margin="0,1,2.5,1">
<Grid Margin="0,1,2.5,1"
IsEnabled="{Binding bIsActive}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding sName, Mode=OneWay}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBlock Text=" (BETA)"
Margin="0,0,2.5,0"
Foreground="Red"
Visibility="{Binding IsBeta_Visibility}"
Style="{StaticResource ParameterList_TextBlock}"/>
</StackPanel>
<ComboBox Grid.Column="1"
ItemsSource="{Binding ValueList}"
SelectedItem="{Binding SelValue}"
@@ -97,15 +114,23 @@
</DataTemplate>
<DataTemplate DataType="{x:Type PrintApp:CheckMachiningParam}">
<Grid Height="22"
Margin="0,1,2.5,1">
Margin="0,1,2.5,1"
IsEnabled="{Binding bIsActive}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding sName, Mode=OneWay}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBlock Text=" (BETA)"
Margin="0,0,2.5,0"
Foreground="Red"
Visibility="{Binding IsBeta_Visibility}"
Style="{StaticResource ParameterList_TextBlock}"/>
</StackPanel>
<CheckBox Grid.Column="1"
IsChecked="{Binding bValue}"
HorizontalAlignment="Center"
@@ -21,8 +21,8 @@ Public Class DispositionPanelVM
Dim dNewXPos As Double = ptReference.x
StringToLen(value, dNewXPos)
Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
Dim dMin As Double = 0
Dim dMax As Double = CurrentMachine.b3Tab.DimX
Dim dMin As Double = Math.Min( 0, CurrentMachine.b3ExtrusionArea.Min.x)
Dim dMax As Double = Math.Max( CurrentMachine.b3Tab.DimX, CurrentMachine.b3ExtrusionArea.Max.x)
If b3Print.Max.x > ptReference.x Then
dMax -= b3Print.Max.x - ptReference.x
End If
@@ -60,8 +60,8 @@ Public Class DispositionPanelVM
Dim dNewYPos As Double = ptReference.y
StringToLen(value, dNewYPos)
Dim b3Print As BBox3d = GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
Dim dMin As Double = 0
Dim dMax As Double = CurrentMachine.b3Tab.DimY
Dim dMin As Double = Math.Min( 0, CurrentMachine.b3ExtrusionArea.Min.y)
Dim dMax As Double = Math.Max( CurrentMachine.b3Tab.DimY, CurrentMachine.b3ExtrusionArea.Max.y)
If b3Print.Max.y > ptReference.y Then
dMax -= b3Print.Max.y - ptReference.y
End If
+103 -136
View File
@@ -35,6 +35,10 @@ Public Class FilledSolidPanelVM
Return m_SelFilledSolid
End Get
Set(value As FilledSolidEntity)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse Map.refFilledSolidPanelVM.bCPlaneObj_IsActive Then
NotifyPropertyChanged(NameOf(SelFilledSolid))
Return
End If
m_SelFilledSolid = value
EgtDeselectAll()
If Not IsNothing(value) Then
@@ -213,7 +217,7 @@ Public Class FilledSolidPanelVM
Return m_bAdd_IsChecked
End Get
Set(value As Boolean)
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bAdd_IsChecked = value
If value Then
m_bEdit_IsChecked = False
@@ -235,7 +239,7 @@ Public Class FilledSolidPanelVM
Return m_bEdit_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelFilledSolid) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelFilledSolid) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bEdit_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -259,7 +263,7 @@ Public Class FilledSolidPanelVM
Return m_bGrid_IsChecked
End Get
Set(value As Boolean)
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bGrid_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -287,7 +291,7 @@ Public Class FilledSolidPanelVM
Return m_bMove_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelFilledSolid) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelFilledSolid) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bMove_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -311,7 +315,7 @@ Public Class FilledSolidPanelVM
Return m_bRotate_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelFilledSolid) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelFilledSolid) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bRotate_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -335,7 +339,7 @@ Public Class FilledSolidPanelVM
Return m_bMachParam_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelFilledSolid) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not IsNothing(Map.refTopPanelVM.SelMachining) AndAlso value Then
If Not IsNothing(m_SelFilledSolid) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive AndAlso Not IsNothing(Map.refTopPanelVM.SelMachining) AndAlso value Then
m_bMachParam_IsChecked = True
m_bAdd_IsChecked = False
m_bEdit_IsChecked = False
@@ -349,6 +353,8 @@ Public Class FilledSolidPanelVM
NotifyPropertyChanged(NameOf(bRotate_IsChecked))
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.AUXSOLIDPARAM)
NotifyPropertyChanged(NameOf(FilledSolidList_IsEnabled))
' disattivo interfaccia
ManageInterface(False)
Else
NotifyPropertyChanged(NameOf(m_bMachParam_IsChecked))
End If
@@ -358,6 +364,8 @@ Public Class FilledSolidPanelVM
m_bMachParam_IsChecked = False
NotifyPropertyChanged(NameOf(bMachParam_IsChecked))
NotifyPropertyChanged(NameOf(FilledSolidList_IsEnabled))
' riattivo interfaccia
ManageInterface(True)
End Sub
Public ReadOnly Property Compo_Visibility As Visibility
@@ -366,11 +374,17 @@ Public Class FilledSolidPanelVM
End Get
End Property
Private m_FilledSolidList_IsEnabled As Boolean = False
Public ReadOnly Property FilledSolidList_IsEnabled As Boolean
Get
Return Not m_bMachParam_IsChecked
Return If(m_FilledSolidList.Count > 0, m_FilledSolidList_IsEnabled, False)
End Get
End Property
Friend Sub SetFilledSolidListIsEnabled(bValue As Boolean)
m_FilledSolidList_IsEnabled = bValue
NotifyPropertyChanged(NameOf(FilledSolidList_IsEnabled))
End Sub
' riferimento griglia all'ingresso in questa pagina
Private m_OriginalGridFrame As New Frame3d
@@ -388,6 +402,8 @@ Public Class FilledSolidPanelVM
End Get
End Property
Private m_bEscOnLine2P As Boolean = False
#Region "Tooltip"
Public ReadOnly Property Import_ToolTip As String
@@ -517,7 +533,6 @@ Public Class FilledSolidPanelVM
Private m_cmdCPlaneObj As ICommand
Private m_cmdDragMove As ICommand
Private m_cmdDragRotate As ICommand
Private m_cmdMachParam As ICommand
#End Region ' FIELDS & PROPERTIES
@@ -572,12 +587,15 @@ Public Class FilledSolidPanelVM
SelFilledSolid = m_FilledSolidList(0)
NotifyPropertyChanged(NameOf(SelFilledSolid))
End If
' attivo lista filled solid
SetFilledSolidListIsEnabled(True)
Map.refSceneHostVM.MainScene.SetStatusNull()
End Sub
Friend Sub Dispose()
' ripristino frame originale
EgtSetGridFrame(m_OriginalGridFrame)
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
' se in modifica parametri
If m_bMachParam_IsChecked Then
' ripristino modalita' standard
@@ -607,8 +625,13 @@ Public Class FilledSolidPanelVM
EgtSelectObj(m_SelFilledSolid.nCurveId)
Case FilledSolidSelectionTypes.EXTRUSION
' creo layer per estrusione
Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION)
If nNewExtrusionLayerId = GDB_ID.NULL Then
nNewExtrusionLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
Else
EgtEmptyGroup(nNewExtrusionLayerId)
End If
EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
EgtSelectObj(m_SelFilledSolid.nCurveId)
Case FilledSolidSelectionTypes.BOTH
@@ -616,6 +639,8 @@ Public Class FilledSolidPanelVM
EgtSelectObj(m_SelFilledSolid.nExtrusionId)
End Select
EgtDraw()
' disattivo il resto dell'interfaccia
ManageInterface(False)
Return True
End Function
@@ -625,6 +650,7 @@ Public Class FilledSolidPanelVM
End Sub
Friend Sub OnExecCmdEnd(command As Controller.CMD)
m_bEscOnLine2P = False
Select Case command
Case Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE
' leggo altezza estrusione
@@ -664,6 +690,10 @@ Public Class FilledSolidPanelVM
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End Select
' se non ho creato percorso riabilito interfaccia
If Not m_bIsCreatingPath Then
ManageInterface(True)
End If
If command <> Controller.CMD.LINE2P AndAlso command <> Controller.CMD.EXTRUDE Then Return
' se finita creazione estrusione
If m_bIsCreatingExtrusion Then
@@ -706,6 +736,7 @@ Public Class FilledSolidPanelVM
If NewGeomType = GDB_TY.CRV_COMPO Then
If Not EgtCurveIsClosed(nNewEntityId) Then
EgtCloseCurveCompo(nNewEntityId)
m_bEscOnLine2P = True
End If
EgtSetName(nNewEntityId, RIB_CURVE)
' resetto colore entita'
@@ -718,9 +749,15 @@ Public Class FilledSolidPanelVM
' lo seleziono
SelFilledSolid = NewEntity
NotifyPropertyChanged(NameOf(SelFilledSolid))
' creo layer per estrusione
Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
' verifico se esiste gia' layer estrusione e lo svuoto
Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION)
If nNewExtrusionLayerId <> GDB_ID.NULL Then
EgtEmptyGroup(nNewExtrusionLayerId)
Else
' altrimenti lo creo
nNewExtrusionLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
End If
EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
' seleziono percorso da estrudere
EgtDeselectAll()
@@ -752,6 +789,13 @@ Public Class FilledSolidPanelVM
' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull()
End If
' se esc su creazione percorso, lo annullo, altrimenti riabilito interfaccia
If m_bEscOnLine2P Then
m_bEscOnLine2P = False
Else
If m_bIsCreatingExtrusion Then m_bIsCreatingExtrusion = False
ManageInterface(True)
End If
End If
End Sub
@@ -787,6 +831,18 @@ Public Class FilledSolidPanelVM
Return nFilledSolidIndex + 1
End Function
Friend Sub ManageInterface(bValue As Boolean)
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
Map.refProjManagerVM.SetProjCmdIsEnabled(bValue)
Map.refTopPanelVM.SetTopPanelIsEnabled(bValue)
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerIndexIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(bValue)
Map.refSliceManagerVM.SetButtonsIsEnabled(bValue)
Map.refInstrumentPanelVM.SetInstrumentPanelIsEnabled(bValue)
SetFilledSolidListIsEnabled(bValue)
End Sub
#End Region ' METHODS
#Region "COMMANDS"
@@ -809,8 +865,10 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Import(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.InsertFilledSolid()
ManageInterface(True)
End Sub
#End Region ' Import
@@ -833,7 +891,8 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Line2P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Dim nNewShellNumberLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWRIB)
If nNewShellNumberLayerId = GDB_ID.NULL Then nNewShellNumberLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewShellNumberLayerId, LAY_NEWRIB)
@@ -858,7 +917,7 @@ Public Class FilledSolidPanelVM
End Property
Public Sub Delete()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If IsNothing(SelFilledSolid) Then Return
Dim bOk As Boolean = False
Select Case m_SelFilledSolid.Type
@@ -882,6 +941,7 @@ Public Class FilledSolidPanelVM
End If
NotifyPropertyChanged(NameOf(SelFilledSolid))
End If
SetFilledSolidListIsEnabled(True)
End Sub
#End Region ' Delete
@@ -904,7 +964,7 @@ Public Class FilledSolidPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub ModifyCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(FilledSolidSelectionTypes.CURVE)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MODIFYCURVE)
End Sub
@@ -929,7 +989,7 @@ Public Class FilledSolidPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub AddPointCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(FilledSolidSelectionTypes.CURVE)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOARC)
@@ -958,7 +1018,7 @@ Public Class FilledSolidPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub RemovePointCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(FilledSolidSelectionTypes.CURVE)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOLINE)
@@ -987,7 +1047,7 @@ Public Class FilledSolidPanelVM
''' Execute the Extrude. This method is invoked by the ExtrudeCommand.
''' </summary>
Public Sub Extrude(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(FilledSolidSelectionTypes.EXTRUSION)
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
m_bIsCreatingExtrusion = True
@@ -1015,7 +1075,8 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub CPlaneTop(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1040,7 +1101,8 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneFront. This method is invoked by the CPlaneFrontCommand.
''' </summary>
Public Sub CPlaneFront(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1065,7 +1127,8 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneRight. This method is invoked by the CPlaneRightCommand.
''' </summary>
Public Sub CPlaneRight(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1090,7 +1153,8 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneBack. This method is invoked by the CPlaneBackCommand.
''' </summary>
Public Sub CPlaneBack(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1115,7 +1179,8 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneLeft. This method is invoked by the CPlaneLeftCommand.
''' </summary>
Public Sub CPlaneLeft(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1140,7 +1205,8 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneBottom. This method is invoked by the CPlaneBottomCommand.
''' </summary>
Public Sub CPlaneBottom(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1165,7 +1231,9 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneElevation. This method is invoked by the CPlaneElevationCommand.
''' </summary>
Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub
@@ -1189,88 +1257,14 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneOrigin. This method is invoked by the CPlaneOriginCommand.
''' </summary>
Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub
#End Region ' CPlaneOrigin
#Region "CPlaneRotate"
''' <summary>
''' Returns a command that do CPlaneRotate.
''' </summary>
Public ReadOnly Property CPlaneRotate_Command As ICommand
Get
If m_cmdCPlaneRotate Is Nothing Then
m_cmdCPlaneRotate = New Command(AddressOf CPlaneRotate)
End If
Return m_cmdCPlaneRotate
End Get
End Property
''' <summary>
''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand.
''' </summary>
Public Sub CPlaneRotate(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE)
Else
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE3D)
End If
End Sub
#End Region ' CPlaneRotate
#Region "CPlane3P"
''' <summary>
''' Returns a command that do CPlane3P.
''' </summary>
Public ReadOnly Property CPlane3P_Command As ICommand
Get
If m_cmdCPlane3P Is Nothing Then
m_cmdCPlane3P = New Command(AddressOf CPlane3P)
End If
Return m_cmdCPlane3P
End Get
End Property
''' <summary>
''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand.
''' </summary>
Public Sub CPlane3P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_3P)
End Sub
#End Region ' CPlane3P
#Region "CPlanePerpObj"
''' <summary>
''' Returns a command that do CPlanePerpObj.
''' </summary>
Public ReadOnly Property CPlanePerpObj_Command As ICommand
Get
If m_cmdCPlanePerpObj Is Nothing Then
m_cmdCPlanePerpObj = New Command(AddressOf CPlanePerpObj)
End If
Return m_cmdCPlanePerpObj
End Get
End Property
''' <summary>
''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand.
''' </summary>
Public Sub CPlanePerpObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE)
End Sub
#End Region ' CPlanePerpObj
#Region "CPlaneObj"
Private m_bCPlaneObj_IsActive As Boolean = False
@@ -1305,7 +1299,8 @@ Public Class FilledSolidPanelVM
''' Execute the CPlaneObj. This method is invoked by the CPlaneObjCommand.
''' </summary>
Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
@@ -1315,7 +1310,7 @@ Public Class FilledSolidPanelVM
End While
EgtDeselectAll()
m_bCPlaneObj_IsActive = True
' Map.refControllerInputPanelVM.PrepareInputBox("Grid from Selection", "Select the face of the object where to place the grid", "", False, False)
Map.refControllerInputPanelVM.ShowMessage("Grid from Selection", "Select the face of the object where to place the grid")
End Sub
#End Region ' CPlaneObj
@@ -1332,7 +1327,7 @@ Public Class FilledSolidPanelVM
End Property
Public Sub DragMove()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(FilledSolidSelectionTypes.BOTH)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MOVE)
End Sub
@@ -1351,41 +1346,13 @@ Public Class FilledSolidPanelVM
End Property
Public Sub DragRotate()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(FilledSolidSelectionTypes.BOTH)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.ROTATE)
End Sub
#End Region ' DragRotate
#Region "MachParam"
Public ReadOnly Property MachParam_Command As ICommand
Get
If m_cmdMachParam Is Nothing Then
m_cmdMachParam = New Command(AddressOf MachParam)
End If
Return m_cmdMachParam
End Get
End Property
Public Sub MachParam()
If IsNothing(Map.refTopPanelVM.SelMachining) Then Return
m_bAdd_IsChecked = False
m_bEdit_IsChecked = False
m_bGrid_IsChecked = False
m_bMove_IsChecked = False
m_bRotate_IsChecked = False
NotifyPropertyChanged(NameOf(bAdd_IsChecked))
NotifyPropertyChanged(NameOf(bEdit_IsChecked))
NotifyPropertyChanged(NameOf(bGrid_IsChecked))
NotifyPropertyChanged(NameOf(bMove_IsChecked))
NotifyPropertyChanged(NameOf(bRotate_IsChecked))
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.AUXSOLIDPARAM)
End Sub
#End Region ' MachParam
#End Region ' COMMANDS
End Class
@@ -33,7 +33,8 @@
</ItemsControl.ItemsPanel>
<ItemsControl.Resources>
<DataTemplate DataType="{x:Type PrintApp:NumericMachiningParam}">
<Grid Margin="0,1,2.5,1">
<Grid Margin="0,1,2.5,1"
IsEnabled="{Binding bIsActive}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
@@ -57,7 +58,8 @@
</Grid>
</DataTemplate>
<DataTemplate DataType="{x:Type PrintApp:ComboMachiningParam}">
<Grid Margin="0,1,2.5,1">
<Grid Margin="0,1,2.5,1"
IsEnabled="{Binding bIsActive}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
@@ -82,18 +84,51 @@
Style="{StaticResource ToolBar_SmallButton}"/>
</Grid>
</DataTemplate>
<DataTemplate DataType="{x:Type PrintApp:CheckMachiningParam}">
<Grid Margin="0,1,2.5,1"
IsEnabled="{Binding bIsActive}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<CheckBox Grid.Column="1"
IsChecked="{Binding bValue}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="2.5,0,0,0"/>
<Button Grid.Column="2"
Content="R"
Command="{Binding ResetParam_Command}"
IsEnabled="{Binding bIsModifiedFromPart}"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Center"
Margin="2.5,0,0,0"
Style="{StaticResource ToolBar_SmallButton}"/>
</Grid>
</DataTemplate>
</ItemsControl.Resources>
</ItemsControl>
</ScrollViewer>
<UniformGrid Grid.Row="1"
Rows="1"
Margin="0,2.5,0,0">
<Button Content="Ok"
Command="{Binding Ok_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Content="Cancel"
Command="{Binding Cancel_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Command="{Binding Ok_Command}"
IsDefault="True"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Ok.png"
Style="{StaticResource Button_Image}"/>
</Button>
<Button Command="{Binding Cancel_Command}"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Cancel.png"
Style="{StaticResource Button_Image}"/>
</Button>
</UniformGrid>
</Grid>
</Border>
@@ -42,17 +42,34 @@ Public Class FilledSolidParamPanelVM
m_Type = Cathegories.AUX_SOLID
m_sName = "Filled Solid"
m_MachiningParamList = New List(Of MachiningParam)({New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nFilledSolidId, nPartId),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nFilledSolidId, nPartId),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nFilledSolidId, nPartId),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nFilledSolidId, nPartId),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nFilledSolidId, nPartId),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nFilledSolidId, nPartId),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nFilledSolidId, nPartId),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nFilledSolidId, nPartId),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nFilledSolidId, nPartId)})
m_MachiningParamList = New List(Of MachiningParam)({New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDWIDTH, nFilledSolidId, nPartId, Me),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSINFILL, nFilledSolidId, nPartId, Me),
New FilledSolidCheckMachiningParam(MachiningParam.Params.AUXSOLIDSINFILLLINK, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDCOUNT, nFilledSolidId, nPartId, Me),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSSTRANDORDER, nFilledSolidId, nPartId, Me),
New FilledSolidComboMachiningParam(MachiningParam.Params.AUXSOLIDSLINKTYPE, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSLINKPARAM, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSSTARTPOINTOFFSETONSLICE, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETLEADPOINT, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSDENSITY, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSGRIDOVERLAP, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSDIRECTION, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETX, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOFFSETY, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSOVERLAP, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSCOASTINGLEN, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPELEN, nFilledSolidId, nPartId, Me),
New FilledSolidNumericMachiningParam(MachiningParam.Params.AUXSOLIDSWIPEDIR, nFilledSolidId, nPartId, Me)})
NotifyPropertyChanged(NameOf(MachiningParamList))
NotifyPropertyChanged(NameOf(sName))
' verifico dipendenze tra parametri
Select Case m_Type
Case Cathegories.AUX_SOLID
For Each Param In {MachiningParam.Params.AUXSOLIDSINFILL}
Dim MachiningParam As ComboMachiningParam = MachiningParamList.FirstOrDefault(Function(z) z.Type = Param)
MachiningParam.ManageDependencyParam()
Next
End Select
End Sub
Friend Sub SaveCurrParams()
@@ -178,10 +195,18 @@ Public Class FilledSolidNumericMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nFilledSolidId As Integer, nPartId As Integer)
MyBase.New(Type)
Sub New(Type As Params, nFilledSolidId As Integer, nPartId As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.AUXSOLIDSSTRANDWIDTH
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDWIDTH, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDWIDTH, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSSTRANDCOUNT
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDCOUNT, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSSTRANDCOUNT, m_dPartValue)
m_bIsLen = False
Case Params.AUXSOLIDSOVERLAP
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSOVERLAP, m_dPartValue)
@@ -194,6 +219,30 @@ Public Class FilledSolidNumericMachiningParam
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSOFFSETLEADPOINT
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETLEADPOINT, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETLEADPOINT, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSDENSITY
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSDENSITY, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSDENSITY, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSGRIDOVERLAP
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSGRIDOVERLAP, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSGRIDOVERLAP, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSDIRECTION
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSDIRECTION, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSDIRECTION, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSOFFSETX
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETX, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETX, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSOFFSETY
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETY, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSOFFSETY, m_dPartValue)
m_bIsLen = True
Case Params.AUXSOLIDSCOASTINGLEN
bReadFromPart = EgtGetInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN, m_dValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSCOASTINGLEN, m_dPartValue)
@@ -222,6 +271,18 @@ Public Class FilledSolidNumericMachiningParam
sWriteValue = DoubleToString(m_dValue, 2)
End If
Select Case Type
Case Params.AUXSOLIDSSTRANDWIDTH
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDWIDTH, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDWIDTH)
End If
Case Params.AUXSOLIDSSTRANDCOUNT
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDCOUNT, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSSTRANDCOUNT)
End If
Case Params.AUXSOLIDSOVERLAP
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOVERLAP, sWriteValue)
@@ -240,6 +301,42 @@ Public Class FilledSolidNumericMachiningParam
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSSTARTPOINTOFFSETONSLICE)
End If
Case Params.AUXSOLIDSOFFSETLEADPOINT
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETLEADPOINT, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETLEADPOINT)
End If
Case Params.AUXSOLIDSDENSITY
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSDENSITY, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSDENSITY)
End If
Case Params.AUXSOLIDSGRIDOVERLAP
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSGRIDOVERLAP, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSGRIDOVERLAP)
End If
Case Params.AUXSOLIDSDIRECTION
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSDIRECTION, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSDIRECTION)
End If
Case Params.AUXSOLIDSOFFSETX
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETX, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETX)
End If
Case Params.AUXSOLIDSOFFSETY
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETY, sWriteValue)
Else
EgtRemoveInfo(nFilledSolidId, MAC_AUXSOLIDSOFFSETY)
End If
Case Params.AUXSOLIDSCOASTINGLEN
If bIsModifiedFromPart Then
EgtSetInfo(nFilledSolidId, MAC_AUXSOLIDSCOASTINGLEN, sWriteValue)
@@ -305,6 +402,7 @@ Public Class FilledSolidComboMachiningParam
m_SelValue = value
NotifyPropertyChanged(NameOf(SelValue))
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
ManageDependencyParam()
End Set
End Property
@@ -324,15 +422,20 @@ Public Class FilledSolidComboMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nRibId As Integer, nPartId As Integer)
MyBase.New(Type)
Sub New(Type As Params, nRibId As Integer, nPartId As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
Dim bReadFromRib As Boolean = False
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.AUXSOLIDSINFILL
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL.ZIGZAG, "ZigZag")})
m_ValueList = New List(Of IdNameStruct)({New IdNameStruct(Machining.MPAR_INFILL_TYPE.NONE, "None"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.OFFSET, "Offset"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG, "ZigZag"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.LINES, "Lines"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.GRID, "Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.ZIGZAG_GRID, "Zigzag Grid"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB, "Honeycomb"),
New IdNameStruct(Machining.MPAR_INFILL_TYPE.HONEYCOMB_GRID, "Honeycomb Grid")})
Dim nSelValue As Integer = 1
bReadFromRib = EgtGetInfo(nRibId, MAC_AUXSOLIDSINFILL, nSelValue)
If bReadFromRib Then
@@ -370,7 +473,7 @@ Public Class FilledSolidComboMachiningParam
Else
Select Case Type
Case Params.AUXSOLIDSINFILL
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_INFILL.NONE)
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_INFILL_TYPE.NONE)
m_SelValue = m_OrigSelValue
Case Params.AUXSOLIDSSTRANDORDER
m_OrigSelValue = m_ValueList.FirstOrDefault(Function(x) x.Id = Machining.MPAR_STRANDORDERS.OUTTOIN)
@@ -438,4 +541,95 @@ Public Class FilledSolidComboMachiningParam
#End Region ' COMMANDS
End Class
Public Class FilledSolidCheckMachiningParam
Inherits CheckMachiningParam
Public Overrides Property bValue As Boolean
Get
Return m_bValue
End Get
Set(value As Boolean)
m_bValue = value
NotifyPropertyChanged(NameOf(bValue))
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
End Set
End Property
Protected m_bPartValue As Boolean
Public ReadOnly Property bPartValue As Boolean
Get
Return m_bPartValue
End Get
End Property
Public ReadOnly Property bIsModifiedFromPart As Boolean
Get
Return m_bValue <> m_bPartValue
End Get
End Property
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nAuxSolidId As Integer, nPartId As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.AUXSOLIDSINFILLLINK
bReadFromPart = EgtGetInfo(nAuxSolidId, MAC_AUXSOLIDSINFILLLINK, m_bValue)
EgtGetInfo(nPartId, MAC_AUXSOLIDSINFILLLINK, m_bPartValue)
End Select
m_bOrigValue = m_bValue
If Not bReadFromPart Then
m_bValue = m_bPartValue
m_bOrigValue = m_bPartValue
End If
End Sub
Friend Sub WriteParamInRib(nAuxSolidId As Integer)
Select Case Type
Case Params.AUXSOLIDSINFILLLINK
If bIsModifiedFromPart Then
EgtSetInfo(nAuxSolidId, MAC_AUXSOLIDSINFILLLINK, If(m_bValue, 1, 0))
Else
EgtRemoveInfo(nAuxSolidId, MAC_AUXSOLIDSINFILLLINK)
End If
End Select
End Sub
Friend Overrides Sub SaveParam()
m_bOrigValue = m_bValue
End Sub
Friend Overrides Sub ResetParam()
m_bValue = m_bOrigValue
NotifyPropertyChanged(NameOf(bValue))
End Sub
#Region "COMMANDS"
#Region "ResetParam"
Public ReadOnly Property ResetParam_Command As ICommand
Get
If m_cmdResetParam Is Nothing Then
m_cmdResetParam = New Command(AddressOf ResetParamCmd)
End If
Return m_cmdResetParam
End Get
End Property
Public Sub ResetParamCmd()
m_bValue = m_bPartValue
NotifyPropertyChanged(NameOf(bValue))
NotifyPropertyChanged(NameOf(bIsModifiedFromPart))
End Sub
#End Region ' ResetParam
#End Region ' COMMANDS
End Class
+62 -5
View File
@@ -76,19 +76,19 @@
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="DotNetZip">
<HintPath>..\..\..\EgtProg\Icarus\DotNetZip.dll</HintPath>
</Reference>
<Reference Include="EgtUILib, Version=2.4.7.1, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
</Reference>
<Reference Include="EgtWPFLib48">
<HintPath>..\..\..\EgtProg\DllD64\EgtWPFLib48.dll</HintPath>
</Reference>
<Reference Include="EgtWPFLib5, Version=2.4.5.1, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath>
</Reference>
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
<HintPath>..\packages\Ionic.Zip.1.9.1.8\lib\Ionic.Zip.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="PresentationFramework.Aero2" />
<Reference Include="System.Core" />
@@ -127,6 +127,7 @@
<Compile Include="Constants\ConstDataGridColumnsIni.vb" />
<Compile Include="Constants\ConstDims.vb" />
<Compile Include="Constants\ConstGen.vb" />
<Compile Include="Constants\ConstMachDataIni.vb" />
<Compile Include="Constants\ConstIni.vb" />
<Compile Include="Constants\ConstMachComm.vb" />
<Compile Include="Constants\ConstMachIni.vb" />
@@ -164,6 +165,10 @@
<DependentUpon>ImportExportMachiningPanelV.xaml</DependentUpon>
</Compile>
<Compile Include="ImportExportMachiningPanel\ImportExportMachiningPanelVM.vb" />
<Compile Include="ImportLoadingWnd\ImportLoadingWndV.xaml.vb">
<DependentUpon>ImportLoadingWndV.xaml</DependentUpon>
</Compile>
<Compile Include="ImportLoadingWnd\ImportLoadingWndVM.vb" />
<Compile Include="InstrumentPanel\InstrumentPanelV.xaml.vb">
<DependentUpon>InstrumentPanelV.xaml</DependentUpon>
</Compile>
@@ -204,6 +209,9 @@
<DependentUpon>MaterialDbV.xaml</DependentUpon>
</Compile>
<Compile Include="MaterialDb\MaterialDbVM.vb" />
<Compile Include="TSFEditor\ColumnHeader.xaml.vb">
<DependentUpon>ColumnHeader.xaml</DependentUpon>
</Compile>
<Compile Include="UpdateMachine\UpdateMachineV.xaml.vb">
<DependentUpon>UpdateMachineV.xaml</DependentUpon>
</Compile>
@@ -315,6 +323,7 @@
<Compile Include="Utility\DisableModifiedMgr.vb" />
<Compile Include="Utility\EgwCrypto.vb" />
<Compile Include="Utility\GeomEntityColors.vb" />
<Compile Include="Utility\JsonUtility.vb" />
<Compile Include="Utility\LuaExec.vb" />
<Compile Include="Utility\Map.vb" />
<Compile Include="Utility\MyMachine.vb" />
@@ -369,6 +378,10 @@
<SubType>Designer</SubType>
<Generator>XamlIntelliSenseFileGenerator</Generator>
</Page>
<Page Include="ImportLoadingWnd\ImportLoadingWndV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="InstrumentPanel\InstrumentPanelV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -421,6 +434,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="TSFEditor\ColumnHeader.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UpdateMachine\UpdateMachineV.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -802,6 +819,46 @@
<ItemGroup>
<Resource Include="Resources\SliceManager\StopCalculation.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\SplashScreen\BlueSplashscreen.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\SliceManager\Dimensions.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\TFSEditor\Reduce.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\ReferencePanel\BC.png" />
<Resource Include="Resources\ReferencePanel\BL.png" />
<Resource Include="Resources\ReferencePanel\BR.png" />
<Resource Include="Resources\ReferencePanel\MC.png" />
<Resource Include="Resources\ReferencePanel\ML.png" />
<Resource Include="Resources\ReferencePanel\MR.png" />
<Resource Include="Resources\ReferencePanel\TC.png" />
<Resource Include="Resources\ReferencePanel\TL.png" />
<Resource Include="Resources\ReferencePanel\TR.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\ReferencePanel\White_BC.png" />
<Resource Include="Resources\ReferencePanel\White_BL.png" />
<Resource Include="Resources\ReferencePanel\White_BR.png" />
<Resource Include="Resources\ReferencePanel\White_MC.png" />
<Resource Include="Resources\ReferencePanel\White_ML.png" />
<Resource Include="Resources\ReferencePanel\White_MR.png" />
<Resource Include="Resources\ReferencePanel\White_TC.png" />
<Resource Include="Resources\ReferencePanel\White_TL.png" />
<Resource Include="Resources\ReferencePanel\White_TR.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\SliceManager\Mass.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\SliceManager\Time.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\RibParamPanel\CopyFrom.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\Icarus\IcarusR32.exe
@@ -0,0 +1,38 @@
<EgtWPFLib5:EgtMainWindow x:Class="ImportLoadingWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="New Project"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
Style="{StaticResource Dialog_Window}">
<Grid Margin="2.5,2.5,2.5,2.5">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Loading_Msg}"
Margin="20,20,20,2.5"
Style="{StaticResource DialogWindow_TextBlock}"/>
<Grid Grid.Row="1"
Margin="2.5,2.5,2.5,2.5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<ProgressBar Value="{Binding Loading_Value}"
Width="200"
Margin="0,0,2.5,20"
Style="{StaticResource Icarus_ProgressBar}"/>
<!--<Button Grid.Column="1"
Grid.RowSpan="2"
Command="{Binding Stop_Command}"
Margin="2.5,0,0,0"
Style="{StaticResource TopPanel_Button}">
<Image Source="\Resources\SliceManager\StopCalculation.png"
Style="{StaticResource Button_Image}"/>
</Button>-->
</Grid>
</Grid>
</EgtWPFLib5:EgtMainWindow>
@@ -0,0 +1,14 @@
Public Class ImportLoadingWndV
Private WithEvents m_ImportLoadingWndVM As ImportLoadingWndVM
Sub New(Owner As Window, ImportLoadingWndVM As ImportLoadingWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = ImportLoadingWndVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_ImportLoadingWndVM = ImportLoadingWndVM
End Sub
End Class
@@ -0,0 +1,91 @@
Imports System.Collections.ObjectModel
Imports EgtUILib.EgtInterface
Imports EgtWPFLib5
Public Class ImportLoadingWndVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
' Funzioni di callback per output in interfaccia da LUA
Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents)
Private m_bStopLoading As Boolean = False
Private m_Loading_Value As Double
Public Property Loading_Value As Double
Get
Return m_Loading_Value
End Get
Set(value As Double)
m_Loading_Value = value
End Set
End Property
' Definizione comandi
Private m_cmdStop As ICommand
#End Region ' FIELDS & PROPERTIES
#Region "MESSAGES"
Public ReadOnly Property Loading_Msg As String
Get
Return "Importing file..."
End Get
End Property
#End Region ' MESSAGES
#Region "CONSTRUCTORS"
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefImportLoadingWndVM(Me)
End Sub
#End Region ' CONSTRUCTORS
#Region "METHODS"
Friend Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
m_Loading_Value = nProg
NotifyPropertyChanged(NameOf(Loading_Value))
' Costringo ad aggiornare
UpdateUI()
' Eventuale attesa
Threading.Thread.Sleep(nPause)
' Ritorno eventuale stop
If m_bStopLoading Then
m_bStopLoading = False
Return 1
Else
Return 0
End If
Return 0
End Function
#End Region ' METHODS
#Region "COMMANDS"
#Region "Stop"
Public ReadOnly Property Stop_Command As ICommand
Get
If m_cmdStop Is Nothing Then
m_cmdStop = New Command(AddressOf StopLoading)
End If
Return m_cmdStop
End Get
End Property
Public Sub StopLoading()
m_bStopLoading = True
End Sub
#End Region ' Stop
#End Region ' COMMANDS
End Class
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:Icarus"
IsEnabled="{Binding InstrumentPanel_IsEnabled}"
Orientation="Horizontal">
<local:CheckedImageToggleButton ToolTip="{Binding GetDist_ToolTip}"
@@ -7,7 +7,7 @@
Width="40"
Style="{StaticResource SelViewSlider_ComboBox}">
<ComboBoxItem>
<Image Source="\Resources\SimulationPanel\HeadMode.png"
<Image Source="\Resources\SimulationPanel\ToolMode.png"
Style="{StaticResource ComboBox.Image}"/>
</ComboBoxItem>
<ComboBoxItem>
+8 -13
View File
@@ -4,32 +4,27 @@ Imports EgtWPFLib5
Public Class MachineViewPanelVM
Inherits VMBase
Private m_nSelMachView As MCH_LOOK
Public Property ghSelMachView As Integer
Get
Return m_nSelMachView - 1
Return If(Not IsNothing(Map.refSimulationPanelVM) AndAlso Not IsNothing(Map.refSimulationPanelVM.MySimul), Map.refSimulationPanelVM.MySimul.GetMachLook() - 1, Nothing)
End Get
Set(value As Integer)
m_nSelMachView = value + 1
If Not IsNothing(Map.refSimulationPanelVM) Then
Dim MySimul As SimulationVM = Map.refSimulationPanelVM.MySimul
MySimul.SetMachLook(m_nSelMachView)
If Not IsNothing(Map.refSimulationPanelVM) AndAlso Not IsNothing(Map.refSimulationPanelVM.MySimul) Then
Map.refSimulationPanelVM.MySimul.SetMachLook(value + 1)
' aggiorno lo stato della macchina e la sua visualizzazione
EgtSetMachineLook(MySimul.GetMachLook())
WriteMainPrivateProfileString(S_SIMUL, K_MACHVIEWMODE, m_nSelMachView)
EgtSetMachineLook(Map.refSimulationPanelVM.MySimul.GetMachLook())
WriteMainPrivateProfileString(S_SIMUL, K_MACHVIEWMODE, value + 1)
End If
EgtDraw()
End Set
End Property
Friend Sub SetSelViewSlider(value As MCH_LOOK)
m_nSelMachView = value
Friend Sub RefreshSelViewSlider()
NotifyPropertyChanged(NameOf(ghSelMachView))
End Sub
Sub New()
' leggo vista macchina da ini e la imposto
Dim DefaultMachViewMode As Integer = GetMainPrivateProfileInt(S_SIMUL, K_MACHVIEWMODE, 3)
SetSelViewSlider(DefaultMachViewMode)
' Creo riferimento a questa classe in OmagOFFICEMap
Map.SetRefMachineViewPanelVM(Me)
End Sub
End Class
File diff suppressed because it is too large Load Diff
+40 -16
View File
@@ -134,29 +134,45 @@
</ItemsControl.ItemsPanel>
<ItemsControl.Resources>
<DataTemplate DataType="{x:Type PrintApp:NumericMachiningParam}">
<Grid Margin="0,1,2.5,1">
<Grid Margin="0,1,2.5,1"
IsEnabled="{Binding bIsActive}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBox Grid.Column="1"
Text="{Binding sValue}"
Margin="2.5,0,0,0"
Style="{StaticResource ParameterList_TextBox}"/>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding sName, Mode=OneWay}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBlock Text=" (BETA)"
Margin="0,0,2.5,0"
Foreground="Red"
Visibility="{Binding IsBeta_Visibility}"
Style="{StaticResource ParameterList_TextBlock}"/>
</StackPanel>
<EgtWPFLib5:EgtTextBox2 Grid.Column="1"
Text="{Binding sValue, UpdateSourceTrigger=Explicit}"
Margin="2.5,0,0,0"
Style="{StaticResource ParameterList_TextBox2}"/>
</Grid>
</DataTemplate>
<DataTemplate DataType="{x:Type PrintApp:ComboMachiningParam}">
<Grid Margin="0,1,2.5,1">
<Grid Margin="0,1,2.5,1"
IsEnabled="{Binding bIsActive}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding sName, Mode=OneWay}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBlock Text=" (BETA)"
Margin="0,0,2.5,0"
Foreground="Red"
Visibility="{Binding IsBeta_Visibility}"
Style="{StaticResource ParameterList_TextBlock}"/>
</StackPanel>
<ComboBox Grid.Column="1"
ItemsSource="{Binding ValueList}"
SelectedItem="{Binding SelValue}"
@@ -167,14 +183,22 @@
</DataTemplate>
<DataTemplate DataType="{x:Type PrintApp:CheckMachiningParam}">
<Grid Height="22"
Margin="0,1,2.5,1">
Margin="0,1,2.5,1"
IsEnabled="{Binding bIsActive}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding sName}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding sName, Mode=OneWay}"
Margin="0,0,2.5,0"
Style="{StaticResource ParameterList_TextBlock}"/>
<TextBlock Text=" (BETA)"
Margin="0,0,2.5,0"
Foreground="Red"
Visibility="{Binding IsBeta_Visibility}"
Style="{StaticResource ParameterList_TextBlock}"/>
</StackPanel>
<CheckBox Grid.Column="1"
IsChecked="{Binding bValue}"
HorizontalAlignment="Center"
+10 -14
View File
@@ -75,13 +75,6 @@ Public Class MainWindowM
End Get
End Property
Private m_bAutoNestOption As Boolean = False
Friend ReadOnly Property AutoNestOption As Boolean
Get
Return m_bAutoNestOption
End Get
End Property
Friend ReadOnly Property sVersion As String
Get
Return My.Application.Info.Version.Major.ToString() & "." &
@@ -189,14 +182,17 @@ Public Class MainWindowM
Dim sKey As String = String.Empty
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
EgtSetKey(sKey)
Dim sNestKey As String = ""
EgtUILib.GetPrivateProfileString(S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
'EgtSetNestKey(sNestKey)
' Verifico abilitazione nesting automatico
m_bAutoNestOption = Not String.IsNullOrWhiteSpace(sNestKey)
' Impostazioni per chiave di rete
Dim bNetKey As Boolean = ( GetMainPrivateProfileInt( S_GENERAL, K_NETKEY, 0) = 1)
EgtSetNetHwKey( bNetKey)
Dim sLockId As String = ""
EgtUILib.GetPrivateProfileString( S_LICENCE, K_LOCKID, "", sLockId, sLicFile)
If Not String.IsNullOrEmpty( sLockId) Then
EgtSetLockId( sLockId)
End If
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(5583, 2502, 1, m_nKeyLevel) And
EgtGetKeyOptions(5583, 2502, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(5583, 2709, 1, m_nKeyLevel) And
EgtGetKeyOptions(5583, 2709, 1, m_nKeyOptions)
' Inizializzazione generale di EgtInterface
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
m_sLogFile = m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
+2
View File
@@ -61,6 +61,8 @@ Class MainWindowV
Me.Activate()
' Recupero l'array di stringhe con i nomi del file
Dim sFiles() As String = DirectCast(e.Data.GetData(DataFormats.FileDrop), String())
' Apro il primo
Map.refSecondaryWindowVM.OpenStdFile(sFiles(0))
End If
End Sub
+18 -2
View File
@@ -15,6 +15,9 @@ Public Class MainWindowVM
End Get
End Property
' Funzioni di callback per output in interfaccia da LUA
Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents)
' Variabile che indica che il programma è stato avviato correttamente (sia la mappa che l'ambiente Egt)
Private m_bInitStatus As Boolean
Friend ReadOnly Property bInitStatus As Boolean
@@ -74,6 +77,8 @@ Public Class MainWindowVM
m_MainWindowM = New MainWindowM
' inizializzo machine panel
m_MachinePanelVM = New MachinePanelVM
' Installo funzione gestione eventi per lua
EgtSetProcessEvents(m_ProcEventsCallback)
End Sub
#End Region ' CONSTRUCTOR
@@ -111,7 +116,7 @@ Public Class MainWindowVM
End If
' annullo trasparenza attivata durante edit rib
If Not IsNothing(Map.refRibPanelVM.SelRib) Then
EgtSetAlpha(Map.refRibPanelVM.SelRib.nExtrusionId, 100)
'EgtSetAlpha(Map.refRibPanelVM.SelRib.nExtrusionId, 100)
End If
ElseIf Map.refTopPanelVM.SelModifyMode.ModifyMode = ModifyModes.SHELLNUMBER Then
' cancello eventuali layer di modifica
@@ -127,7 +132,7 @@ Public Class MainWindowVM
End If
' annullo trasparenza attivata durante edit rib
If Not IsNothing(Map.refShellNumberPanelVM.SelShellNumber) Then
EgtSetAlpha(Map.refShellNumberPanelVM.SelShellNumber.nExtrusionId, 100)
'EgtSetAlpha(Map.refShellNumberPanelVM.SelShellNumber.nExtrusionId, 100)
End If
End If
End If
@@ -142,6 +147,17 @@ Public Class MainWindowVM
End If
End Sub
Private Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
If Map.refSliceManagerVM.bCalculating OrElse Map.refSliceManagerVM.bCalcSolid Then
Map.refSliceManagerVM.ProcessEvents(nProg, nPause)
End If
If Not IsNothing(Map.refImportLoadingWndVM) Then
Map.refImportLoadingWndVM.ProcessEvents(nProg, nPause)
End If
Map.refMyStatusBarVM.ProcessEvents(nProg, nPause)
Return 0
End Function
Friend Sub CloseApplication()
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
Return
+13 -6
View File
@@ -145,13 +145,20 @@
Rows="1"
IsEnabled="{Binding IsEnabled}"
Margin="0,2.5,0,0">
<Button Content="Ok"
Command="{Binding Ok_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Content="Cancel"
Command="{Binding Cancel_Command}"
<Button Command="{Binding Ok_Command}"
IsDefault="True"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Ok.png"
Style="{StaticResource Button_Image}"/>
</Button>
<Button Command="{Binding Cancel_Command}"
Visibility="{Binding IsImport_Visibility}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Cancel.png"
Style="{StaticResource Button_Image}"/>
</Button>
</UniformGrid>
</Grid>
</Border>
@@ -471,14 +471,6 @@ Public Class ManagePartPanelVM
Map.refSliceManagerVM.UpdateDimensions()
Next
End If
'EgtAddMachGroup("3dPrint")
'EgtSetTable("Tab")
'Dim nRawId As Integer = EgtAddRawPart(b3PrintSolid.Min, b3PrintSolid.DimX, b3PrintSolid.DimY, b3PrintSolid.DimZ, New Color3d(128, 128, 128, 30))
'EgtAddPartToRawPart(nPartId, b3PrintSolid.Min, nRawId)
'EgtMoveToCornerRawPart(nRawId, New Point3d(dPosX, dPosY, 0), MCH_CR.BL)
'EgtResetCurrMachGroup()
' seleziono ultimo pezzo aggiunto
Map.refTopPanelVM.SelLastPart()
+11
View File
@@ -285,6 +285,8 @@ Public Class MaterialIndex
sParamKey = MAT_KZ
Case MaterialParam.Params.KN
sParamKey = MAT_KN
Case MaterialParam.Params.TDRYER
sParamKey = MAT_TDRYER
End Select
Return ReadMaterialParamDouble(m_nIndex, sParamKey, dDefault)
End Function
@@ -346,6 +348,7 @@ Public Class MaterialCathegory
m_MaterialParamList = New List(Of MaterialParam)({New NumericMaterialParam(MaterialParam.Params.K_EXTRUSION, nIndex),
New NumericMaterialParam(MaterialParam.Params.K_LAY_TIME, nIndex),
New NumericMaterialParam(MaterialParam.Params.DENSITY, nIndex),
New NumericMaterialParam(MaterialParam.Params.TDRYER, nIndex),
New StringMaterialParam(MaterialParam.Params.ORIG, nIndex)})
m_Cathegory_Visibility = Visibility.Visible
Case Cathegories.TEMPERATURES
@@ -419,6 +422,7 @@ Public MustInherit Class MaterialParam
KZ = 20
KN = 21
ORIG = 22
TDRYER = 23
End Enum
Private m_Type As Params
@@ -478,6 +482,8 @@ Public MustInherit Class MaterialParam
m_sName = "KZ"
Case Params.KN
m_sName = "KN"
Case Params.TDRYER
m_sName = "Dryer Temperature"
Case Params.ORIG
m_sName = "Original"
End Select
@@ -583,6 +589,9 @@ Public Class NumericMaterialParam
Case Params.KN
m_dValue = ReadMaterialParamDouble(nIndex, MAT_KN, 0)
m_bIsLen = False
Case Params.TDRYER
m_dValue = ReadMaterialParamDouble(nIndex, MAT_TDRYER, 0)
m_bIsLen = False
End Select
m_dOrigValue = m_dValue
End Sub
@@ -633,6 +642,8 @@ Public Class NumericMaterialParam
WriteMaterialParam(nIndex, MAT_KZ, sWriteValue, sFilePath)
Case Params.KN
WriteMaterialParam(nIndex, MAT_KN, sWriteValue, sFilePath)
Case Params.TDRYER
WriteMaterialParam(nIndex, MAT_TDRYER, sWriteValue, sFilePath)
End Select
End Sub
+3 -3
View File
@@ -30,7 +30,7 @@ Imports System.Windows
#End If
<Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("Icarus")>
<Assembly: AssemblyCopyright("Copyright © 2022-2023 by Egalware s.r.l.")>
<Assembly: AssemblyCopyright("Copyright © 2022-2025 by Egalware s.r.l.")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(false)>
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.5.3.1")>
<Assembly: AssemblyFileVersion("2.5.3.1")>
<Assembly: AssemblyVersion("2.7.9.1")>
<Assembly: AssemblyFileVersion("2.7.9.1")>
+19
View File
@@ -15,6 +15,8 @@ Friend Module OptionModule
Friend m_bThickLine As Boolean
' Flag per visualizzazione smussata delle superfici
Friend m_bSmoothTriMesh As Boolean
' Flag per visualizzazione semplificate sezione strand
Friend m_bUseSimplifiedSection As Boolean
' Colore di default in disegno
Friend m_DefMaterialColor As Color3d
@@ -43,6 +45,14 @@ Friend Module OptionModule
Friend m_sFont As String
Friend m_dTextHeight As Double
' Parametri per la griglia
Friend m_bGridVisibility As Boolean
Friend m_dSnapStepMm As Double
Friend m_dSnapStepInch As Double
Friend m_nMinLineSStep As Integer
Friend m_nMajLineSStep As Integer
Friend m_nExtSStep As Integer
' Variabili che indicano per ogni tipo di lavorazione quale geometria è selezionabile
'Friend m_SelGeomSawing As SceneSelModeOpt
'Friend m_SelGeomDrilling As SceneSelModeOpt
@@ -99,6 +109,8 @@ Friend Module OptionModule
m_bThickLine = GetMainPrivateProfileInt(S_SCENE, K_LINEWIDTH, 1) <> 1
' Inizializzo flag visualizzazione smussata delle superfici
m_bSmoothTriMesh = GetMainPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0
' Inizializzo flag visualizzazione sezione strand semplificata
m_bUseSimplifiedSection = GetMainPrivateProfileInt(S_SOLIDS, K_SIMPLIFIEDSECTION, 0) <> 0
' Inizio colore di default in disegno
Dim DefColor As New Color3d(0, 0, 0)
GetMainPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
@@ -108,6 +120,13 @@ Friend Module OptionModule
' Inizializzo variabili per import
m_dDxfScaleFactor = GetMainPrivateProfileDouble(S_IMPORT, K_DXFSCALE, 1)
m_dStlScaleFactor = GetMainPrivateProfileDouble(S_IMPORT, K_STLSCALE, 1)
' Inizializzo parametri griglia
m_bGridVisibility = (GetMainPrivateProfileInt(S_GRID, K_SHOWGRID, 1) <> 0)
m_dSnapStepMm = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEP, 10)
m_dSnapStepInch = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEPINCH, 12.7)
m_nMinLineSStep = GetMainPrivateProfileInt(S_GRID, K_MINLINESSTEP, 1)
m_nMajLineSStep = GetMainPrivateProfileInt(S_GRID, K_MAJLINESSTEP, 10)
m_nExtSStep = GetMainPrivateProfileInt(S_GRID, K_EXTSSTEP, 100)
End Sub
End Module
+5
View File
@@ -61,6 +61,7 @@
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding ThickLineMsg}" VerticalAlignment="Center"
Grid.Row="0" Margin="0,5,0,5"/>
@@ -70,6 +71,10 @@
Grid.Row="1" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding SmoothTriMesh}"
Grid.Column="1" Grid.Row="1" Margin="22,5,0,5" VerticalAlignment="Center"/>
<TextBlock Text="{Binding UseSimplifiedSectionMsg}" VerticalAlignment="Center"
Grid.Row="2" Margin="0,5,0,5"/>
<CheckBox IsChecked="{Binding UseSimplifiedSection}"
Grid.Column="1" Grid.Row="2" Margin="22,5,0,5" VerticalAlignment="Center"/>
</Grid>
<!--<UniformGrid Columns="2"
Margin="0,0,0,5">
+50 -69
View File
@@ -147,6 +147,7 @@ Public Class OptionWindowVM
If StringToLen(value, dVal) AndAlso dVal > 0 Then
OptionModule.m_dGeometryTolerance = dVal
Map.refSceneHostVM.MainController.SetSurfTmTolerance(OptionModule.m_dGeometryTolerance)
Map.refSceneHostVM.MainController.SetAdvImpTolerance(OptionModule.m_dGeometryTolerance)
WriteMainPrivateProfileString(S_GEOMDB, K_SURFTMTOLER, DoubleToString(OptionModule.m_dGeometryTolerance, 5))
End If
End Set
@@ -214,6 +215,16 @@ Public Class OptionWindowVM
End Set
End Property
Public Property UseSimplifiedSection As Boolean
Get
Return OptionModule.m_bUseSimplifiedSection
End Get
Set(value As Boolean)
OptionModule.m_bUseSimplifiedSection = value
WriteMainPrivateProfileString(S_SOLIDS, K_SIMPLIFIEDSECTION, If(value, "1", "0"))
End Set
End Property
'Public Property SelectedTextFont As String
' Get
' Return m_FontList(m_FontList.IndexOf(OptionModule.m_sFontText))
@@ -563,17 +574,23 @@ Public Class OptionWindowVM
End Property
Public ReadOnly Property ThickLineMsg As String
Get
Return EgtMsg( 6536) ' Linee spesse
Return EgtMsg(6536) ' Linee spesse
End Get
End Property
Public ReadOnly Property SmoothTriMeshMsg As String
Get
Return EgtMsg( 6518) ' Superfici smussate
Return EgtMsg(6518) ' Superfici smussate
End Get
End Property
Public ReadOnly Property UseSimplifiedSectionMsg As String
Get
Return "Use simplified strand section"
End Get
End Property
Public ReadOnly Property UpdateLicenceMsg As String
Get
Return EgtMsg( 6553) ' Aggiorna licenza
Return EgtMsg(6553) ' Aggiorna licenza
End Get
End Property
@@ -953,31 +970,31 @@ Public Class OptionWindowVM
Dim sMachDir As String = Path.Combine(Map.refMainWindowVM.MainWindowM.sMachinesRoot, sMachName)
' Preparo direttorio temporaneo
Dim sTempDir As String = Path.Combine(Map.refMainWindowVM.MainWindowM.sMachinesRoot, "Temp")
If My.Computer.FileSystem.DirectoryExists( sTempDir) Then
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
If My.Computer.FileSystem.DirectoryExists(sTempDir) Then
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CreateDirectory( sTempDir)
My.Computer.FileSystem.CreateDirectory(sTempDir)
' Unzip nel direttorio temporaneo
Using zip As New Ionic.Zip.ZipFile(sMachZip)
zip.ExtractAll( sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
zip.ExtractAll(sTempDir, Ionic.Zip.ExtractExistingFileAction.DoNotOverwrite)
End Using
' Se non è una macchina segnalo il problema ed esco
If Not My.Computer.FileSystem.FileExists( Path.Combine( sTempDir, sMachName, sMachName & ".ini")) Or
Not My.Computer.FileSystem.FileExists( Path.Combine( sTempDir, sMachName, sMachName & ".mlde")) Then
If Not My.Computer.FileSystem.FileExists(Path.Combine(sTempDir, sMachName, sMachName & ".ini")) Or
Not My.Computer.FileSystem.FileExists(Path.Combine(sTempDir, sMachName, sMachName & ".mlde")) Then
' Il file {0} non contiene una macchina - Avviso
Dim sOut As String = String.Format(EgtMsg(6529), sMachZip)
MessageBox.Show(sOut, EgtMsg(MSG_MESSAGEBOX + 2), MessageBoxButton.OK, MessageBoxImage.Warning)
' Rimuovo il direttorio temporaneo ed esco
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
Return
End If
' Imposto data e ora correnti al file mlde della macchina
Try
File.SetLastWriteTime( Path.Combine( sTempDir, sMachName, sMachName & ".mlde"), System.DateTime.Now)
File.SetLastWriteTime(Path.Combine(sTempDir, sMachName, sMachName & ".mlde"), System.DateTime.Now)
Catch ex As Exception
End Try
' Verifico esistenza di una macchina con lo stesso nome
Dim bOldExists As Boolean = My.Computer.FileSystem.DirectoryExists( sMachDir)
Dim bOldExists As Boolean = My.Computer.FileSystem.DirectoryExists(sMachDir)
Dim bUpdate As Boolean = True
If bOldExists Then
Dim MachBox As New UpdateMachineV(Application.Current.MainWindow, New UpdateMachineVM(sMachName))
@@ -994,31 +1011,31 @@ Public Class OptionWindowVM
End Select
' Faccio una copia di backup della macchina corrente
Dim sBackupDir As String = sMachDir & ".old"
If My.Computer.FileSystem.DirectoryExists( sBackupDir) Then
My.Computer.FileSystem.DeleteDirectory( sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
If My.Computer.FileSystem.DirectoryExists(sBackupDir) Then
My.Computer.FileSystem.DeleteDirectory(sBackupDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
Try
My.Computer.FileSystem.MoveDirectory( sMachDir, sBackupDir, True)
My.Computer.FileSystem.MoveDirectory(sMachDir, sBackupDir, True)
Catch ex As Exception
' Ripristino lo stato originale ed esco
My.Computer.FileSystem.MoveDirectory( sBackupDir, sMachDir, True)
My.Computer.FileSystem.MoveDirectory(sBackupDir, sMachDir, True)
' L'aggiornamento della macchina "{0}" non è riuscito.
Dim sKo As String = String.Format(EgtMsg(6535), sMachName)
EgtOutLog( sKo)
EgtOutLog(sKo)
MessageBox.Show(sKo, EgtMsg(MSG_MESSAGEBOX + 1), MessageBoxButton.OK)
Return
End Try
End If
' Installo la macchina
My.Computer.FileSystem.MoveDirectory( Path.Combine( sTempDir, sMachName), sMachDir, True)
My.Computer.FileSystem.MoveDirectory(Path.Combine(sTempDir, sMachName), sMachDir, True)
' Se è un aggiornamento, recupero utensili, lavorazioni, attrezzaggi e dati per travi
If bOldExists And bUpdate Then
Dim sBackupDir As String = sMachDir & ".old"
If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Tools") Then
If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Tools") Then
My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Tools", FileIO.DeleteDirectoryOption.DeleteAllContents)
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\Tools") Then
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\Tools") Then
My.Computer.FileSystem.DeleteDirectory(sMachDir & "\Tools", FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Tools", sMachDir & "\Tools", True)
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\Tools", sMachDir & "\Tools", True)
End If
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\Machinings") Then
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\Machinings") Then
@@ -1038,57 +1055,19 @@ Public Class OptionWindowVM
End If
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\SetUp", sMachDir & "\SetUp", True)
End If
'If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Beam") Then
' ' Flag per sovrascrivere vecchio file BeamData.lua con nuovo
' Dim bBeamDataExists As Boolean = False
' Const sBeamData As String = "\BeamData.lua"
' ' Flag per sovrascrivere vecchio file MachiningTypes.ini
' Dim bMchgTypesExists As Boolean = False
' Const sMchgTypes As String = "\MachiningTypes.ini"
' If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Beam") Then
' If My.Computer.FileSystem.FileExists( sMachDir & "\Beam" & sBeamData) Then
' bBeamDataExists = True
' My.Computer.FileSystem.MoveFile( sMachDir & "\Beam" & sBeamData, sMachDir & sBeamData, True)
' End If
' If My.Computer.FileSystem.FileExists( sMachDir & "\Beam" & sMchgTypes) Then
' bMchgTypesExists = True
' My.Computer.FileSystem.MoveFile( sMachDir & "\Beam" & sMchgTypes, sMachDir & sMchgTypes, True)
' End If
' My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Beam", FileIO.DeleteDirectoryOption.DeleteAllContents)
' End If
' My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Beam", sMachDir & "\Beam", True)
' If bBeamDataExists Then My.Computer.FileSystem.MoveFile( sMachDir & sBeamData, sMachDir & "\Beam" & sBeamData, True)
' If bMchgTypesExists Then My.Computer.FileSystem.MoveFile( sMachDir & sMchgTypes, sMachDir & "\Beam" & sMchgTypes, True)
'End If
'If My.Computer.FileSystem.DirectoryExists( sBackupDir & "\Wall") Then
' ' Flag per sovrascrittura vecchio file WallData.lua con nuovo
' Dim bWallDataExists As Boolean = False
' Const sWallData As String = "\WallData.lua"
' ' Flag per sovrascrivere vecchio file MachiningTypes.ini
' Dim bMchgTypesExists As Boolean = False
' Const sMchgTypes As String = "\MachiningTypes.ini"
' If My.Computer.FileSystem.DirectoryExists( sMachDir & "\Wall") Then
' If My.Computer.FileSystem.FileExists( sMachDir & "\Wall" & sWallData) Then
' bWallDataExists = True
' My.Computer.FileSystem.MoveFile( sMachDir & "\Wall" & sWallData, sMachDir & sWallData, True)
' End If
' If My.Computer.FileSystem.FileExists( sMachDir & "\Wall" & sMchgTypes) Then
' bMchgTypesExists = True
' My.Computer.FileSystem.MoveFile( sMachDir & "\Wall" & sMchgTypes, sMachDir & sMchgTypes, True)
' End If
' My.Computer.FileSystem.DeleteDirectory( sMachDir & "\Wall", FileIO.DeleteDirectoryOption.DeleteAllContents)
' End If
' My.Computer.FileSystem.CopyDirectory( sBackupDir & "\Wall", sMachDir & "\Wall", True)
' If bWallDataExists Then My.Computer.FileSystem.MoveFile( sMachDir & sWallData, sMachDir & "\Wall" & sWallData, True)
' If bMchgTypesExists Then My.Computer.FileSystem.MoveFile( sMachDir & sMchgTypes, sMachDir & "\Wall" & sMchgTypes, True)
'End If
If My.Computer.FileSystem.DirectoryExists(sBackupDir & "\CustomData") Then
If My.Computer.FileSystem.DirectoryExists(sMachDir & "\CustomData") Then
My.Computer.FileSystem.DeleteDirectory(sMachDir & "\CustomData", FileIO.DeleteDirectoryOption.DeleteAllContents)
End If
My.Computer.FileSystem.CopyDirectory(sBackupDir & "\CustomData", sMachDir & "\CustomData", True)
End If
End If
'La macchina "{0}" è stata aggiornata con successo.
Dim sOk As String = String.Format(EgtMsg(6530), sMachName)
EgtOutLog( sOk)
EgtOutLog(sOk)
MessageBox.Show(sOk, EgtMsg(MSG_MESSAGEBOX + 3), MessageBoxButton.OK)
' Rimuovo il direttorio temporaneo
My.Computer.FileSystem.DeleteDirectory( sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
My.Computer.FileSystem.DeleteDirectory(sTempDir, FileIO.DeleteDirectoryOption.DeleteAllContents)
' Aggiorno la lista delle macchina
MyMachine.InsertMachine(sMachDir, Map.refMachinePanelVM.MachineList)
End Sub
@@ -1131,10 +1110,12 @@ Public Class OptionWindowVM
End If
Try
Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
zip.AlternateEncoding = Text.Encoding.UTF8
' aggiungo i file della Macchina
Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sCurrMachineName
If Directory.Exists(sMachineDir) Then
zip.AddSelectedFiles( "name != *\.git\*.* and name != *.git*", sMachineDir, sCurrMachineName, True)
zip.AddSelectedFiles("name != *\.git\*.* and name != *.git*", sMachineDir, sCurrMachineName, True)
End If
' salvo lo zip
zip.Save()
+11 -25
View File
@@ -2,6 +2,7 @@
Imports System.IO
Imports EgtWPFLib5
Imports EgtUILib
Imports Newtonsoft.Json
Public Class ProjManagerVM
Inherits VMBase
@@ -193,23 +194,11 @@ Public Class ProjManagerVM
''' Execute the Open. This method is invoked by the OpenCommand.
''' </summary>
Friend Sub Open()
OpenProject(Nothing)
OpenProject("")
End Sub
Friend Function OpenProject(sFilePath As String) As Boolean
If String.IsNullOrEmpty(sFilePath) Then
' Recupero cartella dell'ultimo progetto aperto
Dim sDir As String = Map.refSceneHostVM.MainController.GetCurrFile()
If String.IsNullOrWhiteSpace(sDir) Then
GetMainPrivateProfileString(S_MRUFILES, K_FILE & 1, "", sDir)
End If
If Not String.IsNullOrWhiteSpace(sDir) Then
sDir = Path.GetDirectoryName(sDir)
End If
Return Map.refSceneHostVM.MainController.OpenProject(sDir)
Else
Return Map.refSceneHostVM.MainController.OpenProject(sFilePath, False)
End If
Return Map.refSceneHostVM.OpenProject(sFilePath)
End Function
#End Region ' OpenCommand
@@ -397,7 +386,7 @@ Public Class ProjManagerVM
Map.refSceneHostVM.SaveProject()
End If
EgtGetCurrFilePath(sCurrProject)
' se modificato, chiedo se si vuole salvare
' se modificato, chiedo se si vuole salvare
Else
If EgtGetModified() Then
If MessageBox.Show(EgtMsg(MSG_TOPCOMMANDBAR + 11), "", MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then
@@ -405,14 +394,6 @@ Public Class ProjManagerVM
End If
End If
End If
' Verifico se il progetto corrente è una porta
Dim nPartId As Integer = EgtGetFirstPart()
If nPartId = GDB_ID.NULL Then
nPartId = EgtGetFirstPartInRawPart(EgtGetFirstRawPart())
End If
Dim sPartName As String = String.Empty
EgtGetName(nPartId, sPartName)
Dim bPrjIsDoor As Boolean = (String.Compare(sPartName, "DOOR") = 0)
' Recupero macchine dei gruppi di lavoro del progetto
Dim Machines As New List(Of String)
Dim nMchGrpId As Integer = EgtGetFirstMachGroup()
@@ -429,9 +410,12 @@ Public Class ProjManagerVM
If Not String.IsNullOrWhiteSpace(sCurrProject) Then
Dim sCurrProjectDir As String = Path.GetDirectoryName(sCurrProject)
If Not String.IsNullOrWhiteSpace(sCurrProjectDir) Then
Dim sCurrProjName As String = Path.GetFileNameWithoutExtension(sCurrProject).ToUpper()
Dim TempFiles() As String = Directory.GetFiles(sCurrProjectDir)
For FileIndex = 0 To TempFiles.Count - 1
If Path.GetFileNameWithoutExtension(TempFiles(FileIndex)).Contains(Path.GetFileNameWithoutExtension(sCurrProject)) AndAlso TempFiles(FileIndex) <> sCurrProject Then
If TempFiles(FileIndex) = sCurrProject Then Continue For
Dim sCurrFileName As String = Path.GetFileNameWithoutExtension( TempFiles(FileIndex)).ToUpper()
If String.Compare(sCurrFileName, sCurrProjName) = 0 Then
OtherFiles.Add(TempFiles(FileIndex))
End If
Next
@@ -444,11 +428,13 @@ Public Class ProjManagerVM
End If
Try
Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
zip.AlternateEncoding = Text.Encoding.UTF8
' aggiungo file macchine
For Each sMachineName As String In Machines
Dim sMachineDir As String = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & sMachineName
If Directory.Exists(sMachineDir) Then
zip.AddItem(sMachineDir, sMachineName)
zip.AddSelectedFiles( "name != *\.git\*.* and name != *.git*", sMachineDir, sMachineName, True)
End If
Next
' aggiungo progetto corrente
+20 -3
View File
@@ -2,7 +2,9 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:PrintApp="clr-namespace:Icarus">
<DockPanel.Resources>
<PrintApp:VisibilityToRowConverter x:Key="VisibilityToRowConverter"/>
</DockPanel.Resources>
<Grid DockPanel.Dock="Top">
<PrintApp:TopPanelV Grid.Column="1"
DataContext="{StaticResource TopPanelVM }"/>
@@ -27,12 +29,27 @@
DataContext="{StaticResource SliderManagerVM}"
HorizontalAlignment="Stretch"/>
<!--StatusBar -->
<PrintApp:ControllerInputPanelV Grid.Row="1"
<Grid Grid.RowSpan="2"
Grid.ColumnSpan="2">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="67"/>
</Grid.RowDefinitions>
<PrintApp:MessagePanelV Grid.Row="{Binding DataContext.Message_Visibility, ElementName=ControllerInputPanelV, Converter={StaticResource VisibilityToRowConverter}}"
Grid.ColumnSpan="2"
DataContext="{StaticResource StatusBarVM}"/>
<PrintApp:ControllerInputPanelV x:Name="ControllerInputPanelV" Grid.Row="2"
Grid.ColumnSpan="2"
DataContext="{StaticResource ControllerInputPanelVM}"/>
</Grid>
<!--<PrintApp:ControllerInputPanelV Grid.Row="1"
Grid.ColumnSpan="2"
DataContext="{StaticResource ControllerInputPanelVM}"/>
<PrintApp:MessagePanelV Grid.Row="1"
Grid.ColumnSpan="2"
DataContext="{StaticResource StatusBarVM}"/>
DataContext="{StaticResource StatusBarVM}"/>-->
<PrintApp:ShowPanelV Grid.Column="2"
Grid.Row="1"
DataContext="{StaticResource ShowPanelVM}"/>
+13
View File
@@ -3,6 +3,7 @@ Imports EgtWPFLib5
Imports EgtUILib
Imports System.Collections.ObjectModel
Imports System.IO
Imports System.Globalization
Public Class ProjectVM
Inherits VMBase
@@ -28,3 +29,15 @@ Public Class ProjectVM
End Class
Public Class VisibilityToRowConverter
Implements IValueConverter
Public Function Convert(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.Convert
If IsNothing(value) Then Return 2
Return If(value = Visibility.Visible, 1, 2)
End Function
Public Function ConvertBack(ByVal value As Object, ByVal targetType As Type, ByVal parameter As Object, ByVal culture As CultureInfo) As Object Implements IValueConverter.ConvertBack
Throw New System.NotImplementedException()
End Function
End Class
+29 -7
View File
@@ -1,6 +1,7 @@
<UserControl x:Class="ReferencePanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:PrintApp="clr-namespace:Icarus">
<Border Padding="2.5"
Style="{StaticResource LeftPanel_PopupButton_Border}">
<Grid>
@@ -33,12 +34,33 @@
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<RadioButton Content="{Binding sText}"
IsChecked="{Binding IsSelected,RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}"
FontSize="40"
GroupName="ReferenceRadio"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource OptionPanel_NestingToggleButton}"/>
<PrintApp:CheckedImageRadioButton IsChecked="{Binding IsSelected,RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}"
ImageSource="{Binding sText}"
CheckedImageSource="{Binding sSelText}"
FontSize="40"
GroupName="ReferenceRadio"
Margin="2.5,2.5,2.5,2.5">
<!--<RadioButton.Resources>
<DataTemplate x:Key="Normal">
<Image Source="{Binding sText}"
Style="{StaticResource Button_Image}"/>
</DataTemplate>
<DataTemplate x:Key="Selected">
<Image Source="{Binding sSelText}"
Style="{StaticResource Button_Image}"/>
</DataTemplate>
</RadioButton.Resources>
<RadioButton.Style>
<Style TargetType="{x:Type RadioButton}" BasedOn="{StaticResource OptionPanel_NestingToggleButton}">
<Setter Property="ContentTemplate" Value="{StaticResource Normal}"/>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="ContentTemplate" Value="{StaticResource Selected}"/>
</Trigger>
</Style.Triggers>
</Style>
</RadioButton.Style>-->
</PrintApp:CheckedImageRadioButton>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
+37 -10
View File
@@ -190,25 +190,52 @@ Public Class ReferenceBtn
Get
Select Case Type
Case References.TL
Return ""
Return "/Resources/ReferencePanel/TL.png" '"┌"
Case References.TR
Return ""
Return "/Resources/ReferencePanel/TR.png" '"┐"
Case References.BL
Return ""
Return "/Resources/ReferencePanel/BL.png" '"└"
Case References.BR
Return ""
Return "/Resources/ReferencePanel/BR.png" '"┘"
Case References.TC
Return ""
Return "/Resources/ReferencePanel/TC.png" '"┬"
Case References.ML
Return ""
Return "/Resources/ReferencePanel/ML.png" '"├"
Case References.MR
Return ""
Return "/Resources/ReferencePanel/MR.png" '"┤"
Case References.BC
Return ""
Return "/Resources/ReferencePanel/BC.png" '"┴"
Case References.MC
Return ""
Return "/Resources/ReferencePanel/MC.png" '"┼"
Case Else
Return "X"
Return "" '"X"
End Select
End Get
End Property
Public ReadOnly Property sSelText As String
Get
Select Case Type
Case References.TL
Return "/Resources/ReferencePanel/White_TL.png" '"┌"
Case References.TR
Return "/Resources/ReferencePanel/White_TR.png" '"┐"
Case References.BL
Return "/Resources/ReferencePanel/White_BL.png" '"└"
Case References.BR
Return "/Resources/ReferencePanel/White_BR.png" '"┘"
Case References.TC
Return "/Resources/ReferencePanel/White_TC.png" '"┬"
Case References.ML
Return "/Resources/ReferencePanel/White_ML.png" '"├"
Case References.MR
Return "/Resources/ReferencePanel/White_MR.png" '"┤"
Case References.BC
Return "/Resources/ReferencePanel/White_BC.png" '"┴"
Case References.MC
Return "/Resources/ReferencePanel/White_MC.png" '"┼"
Case Else
Return "" '"X"
End Select
End Get
End Property
Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 407 B

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

+109 -140
View File
@@ -42,6 +42,10 @@ Public Class RibPanelVM
Return m_SelRib
End Get
Set(value As RibEntity)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse Map.refRibPanelVM.bCPlaneObj_IsActive Then
NotifyPropertyChanged(NameOf(SelRib))
Return
End If
m_SelRib = value
EgtDeselectAll()
If Not IsNothing(value) Then
@@ -238,7 +242,7 @@ Public Class RibPanelVM
Return m_bAdd_IsChecked
End Get
Set(value As Boolean)
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bAdd_IsChecked = value
If value Then
m_bEdit_IsChecked = False
@@ -260,7 +264,7 @@ Public Class RibPanelVM
Return m_bEdit_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelRib) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelRib) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bEdit_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -284,7 +288,7 @@ Public Class RibPanelVM
Return m_bGrid_IsChecked
End Get
Set(value As Boolean)
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bGrid_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -312,7 +316,7 @@ Public Class RibPanelVM
Return m_bMove_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelRib) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelRib) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bMove_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -336,7 +340,7 @@ Public Class RibPanelVM
Return m_bRotate_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelRib) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelRib) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bRotate_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -360,7 +364,7 @@ Public Class RibPanelVM
Return m_bMachParam_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelRib) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not IsNothing(Map.refTopPanelVM.SelMachining) AndAlso value Then
If Not IsNothing(m_SelRib) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive AndAlso Not IsNothing(Map.refTopPanelVM.SelMachining) AndAlso value Then
m_bMachParam_IsChecked = True
m_bAdd_IsChecked = False
m_bEdit_IsChecked = False
@@ -374,6 +378,8 @@ Public Class RibPanelVM
NotifyPropertyChanged(NameOf(bRotate_IsChecked))
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.RIBPARAM)
NotifyPropertyChanged(NameOf(RibList_IsEnabled))
' disattivo interfaccia
ManageInterface(False)
Else
NotifyPropertyChanged(NameOf(m_bMachParam_IsChecked))
End If
@@ -383,6 +389,8 @@ Public Class RibPanelVM
m_bMachParam_IsChecked = False
NotifyPropertyChanged(NameOf(bMachParam_IsChecked))
NotifyPropertyChanged(NameOf(RibList_IsEnabled))
' riattivo interfaccia
ManageInterface(True)
End Sub
Public ReadOnly Property Compo_Visibility As Visibility
@@ -391,11 +399,17 @@ Public Class RibPanelVM
End Get
End Property
Private m_RibList_IsEnabled As Boolean = False
Public ReadOnly Property RibList_IsEnabled As Boolean
Get
Return Not m_bMachParam_IsChecked
Return If(m_RibList.Count > 0, m_RibList_IsEnabled, False)
End Get
End Property
Friend Sub SetRibListIsEnabled(bValue As Boolean)
m_RibList_IsEnabled = bValue
NotifyPropertyChanged(NameOf(RibList_IsEnabled))
End Sub
' riferimento griglia all'ingresso in questa pagina
Private m_OriginalGridFrame As New Frame3d
@@ -413,6 +427,8 @@ Public Class RibPanelVM
End Get
End Property
Private m_bEscOnLine2P As Boolean = False
#Region "Tooltip"
Public ReadOnly Property Import_ToolTip As String
@@ -542,7 +558,6 @@ Public Class RibPanelVM
Private m_cmdCPlaneObj As ICommand
Private m_cmdDragMove As ICommand
Private m_cmdDragRotate As ICommand
Private m_cmdMachParam As ICommand
#End Region ' FIELDS & PROPERTIES
@@ -597,12 +612,15 @@ Public Class RibPanelVM
SelRib = m_RibList(0)
NotifyPropertyChanged(NameOf(SelRib))
End If
' abilito lista ribs
SetRibListIsEnabled(True)
Map.refSceneHostVM.MainScene.SetStatusNull()
End Sub
Friend Sub Dispose()
' ripristino frame originale
EgtSetGridFrame(m_OriginalGridFrame)
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
' se in modifica parametri
If m_bMachParam_IsChecked Then
' ripristino modalita' standard
@@ -624,7 +642,7 @@ Public Class RibPanelVM
' attivo modifiche su scena
Map.refSceneHostVM.MainScene.ResetStatus()
' rendo traspanete estrusione
EgtSetAlpha(m_SelRib.nExtrusionId, 50)
'EgtSetAlpha(m_SelRib.nExtrusionId, 50)
' seleziono percorso corrente
EgtDeselectAll()
Select Case RibSelectionType
@@ -632,8 +650,13 @@ Public Class RibPanelVM
EgtSelectObj(m_SelRib.nCurveId)
Case RibSelectionTypes.EXTRUSION
' creo layer per estrusione
Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION)
If nNewExtrusionLayerId = GDB_ID.NULL Then
nNewExtrusionLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
Else
EgtEmptyGroup(nNewExtrusionLayerId)
End If
EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
EgtSelectObj(m_SelRib.nCurveId)
Case RibSelectionTypes.BOTH
@@ -641,6 +664,8 @@ Public Class RibPanelVM
EgtSelectObj(m_SelRib.nExtrusionId)
End Select
EgtDraw()
' disattivo il resto dell'interfaccia
ManageInterface(False)
Return True
End Function
@@ -650,6 +675,7 @@ Public Class RibPanelVM
End Sub
Friend Sub OnExecCmdEnd(command As Controller.CMD)
m_bEscOnLine2P = False
Select Case command
Case Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE
' leggo altezza estrusione
@@ -667,12 +693,12 @@ Public Class RibPanelVM
' seleziono nuova estrusione
EgtSelectObj(m_SelRib.nExtrusionId)
' ripristino trasparenza estrusione
EgtSetAlpha(m_SelRib.nExtrusionId, 100)
'EgtSetAlpha(m_SelRib.nExtrusionId, 100)
EgtDraw()
' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull()
Case Controller.CMD.MOVE, Controller.CMD.ROTATE
EgtSetAlpha(Map.refRibPanelVM.SelRib.nExtrusionId, 100)
' EgtSetAlpha(Map.refRibPanelVM.SelRib.nExtrusionId, 100)
' seleziono nuova estrusione
EgtSelectObj(m_SelRib.nExtrusionId)
EgtDraw()
@@ -689,6 +715,10 @@ Public Class RibPanelVM
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End Select
' se non ho creato percorso riabilito interfaccia
If Not m_bIsCreatingPath Then
ManageInterface(True)
End If
If command <> Controller.CMD.LINE2P AndAlso command <> Controller.CMD.EXTRUDE Then Return
' se finita creazione estrusione
If m_bIsCreatingExtrusion Then
@@ -740,18 +770,25 @@ Public Class RibPanelVM
' lo seleziono
SelRib = NewEntity
NotifyPropertyChanged(NameOf(SelRib))
' creo layer per estrusione
Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
' verifico se esiste gia' layer estrusione e lo svuoto
Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION)
If nNewExtrusionLayerId <> GDB_ID.NULL Then
EgtEmptyGroup(nNewExtrusionLayerId)
Else
' altrimenti lo creo
nNewExtrusionLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
End If
EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
' seleziono percorso da estrudere
EgtDeselectAll()
EgtSelectObj(nNewEntityId)
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
m_bIsCreatingExtrusion = True
If Not EgtCurveIsClosed(nNewEntityId) Then
m_bEscOnLine2P = True
End If
Else
' cancello layer
'EgtErase(nNewRibLayerId)
EgtErase(nNewExtrusionLayerId)
End If
End If
@@ -774,6 +811,13 @@ Public Class RibPanelVM
' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull()
End If
' se esc su creazione percorso, lo annullo, altrimenti riabilito interfaccia
If m_bEscOnLine2P Then
m_bEscOnLine2P = False
Else
If m_bIsCreatingExtrusion Then m_bIsCreatingExtrusion = False
ManageInterface(True)
End If
End If
End Sub
@@ -809,6 +853,18 @@ Public Class RibPanelVM
Return nRibIndex + 1
End Function
Friend Sub ManageInterface(bValue As Boolean)
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
Map.refProjManagerVM.SetProjCmdIsEnabled(bValue)
Map.refTopPanelVM.SetTopPanelIsEnabled(bValue)
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerIndexIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(bValue)
Map.refSliceManagerVM.SetButtonsIsEnabled(bValue)
Map.refInstrumentPanelVM.SetInstrumentPanelIsEnabled(bValue)
SetRibListIsEnabled(bValue)
End Sub
#End Region ' METHODS
#Region "COMMANDS"
@@ -831,8 +887,10 @@ Public Class RibPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Import(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.InsertRib()
ManageInterface(True)
End Sub
#End Region ' Import
@@ -855,7 +913,8 @@ Public Class RibPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Line2P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Dim nNewRibLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWRIB)
If nNewRibLayerId = GDB_ID.NULL Then nNewRibLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewRibLayerId, LAY_NEWRIB)
@@ -880,7 +939,7 @@ Public Class RibPanelVM
End Property
Public Sub Delete()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If IsNothing(SelRib) Then Return
Dim bOk As Boolean = False
Select Case m_SelRib.Type
@@ -900,10 +959,11 @@ Public Class RibPanelVM
Else
SelRib = Nothing
m_bEdit_IsChecked = False
NotifyPropertyChanged(NameOf( bEdit_IsChecked))
NotifyPropertyChanged(NameOf(bEdit_IsChecked))
End If
NotifyPropertyChanged(NameOf(SelRib))
End If
SetRibListIsEnabled(True)
End Sub
#End Region ' Delete
@@ -926,7 +986,7 @@ Public Class RibPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub ModifyCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(RibSelectionTypes.CURVE)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MODIFYCURVE)
End Sub
@@ -951,7 +1011,7 @@ Public Class RibPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub AddPointCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(RibSelectionTypes.CURVE)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOARC)
@@ -980,7 +1040,7 @@ Public Class RibPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub RemovePointCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(RibSelectionTypes.CURVE)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOLINE)
@@ -1009,7 +1069,7 @@ Public Class RibPanelVM
''' Execute the Extrude. This method is invoked by the ExtrudeCommand.
''' </summary>
Public Sub Extrude(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(RibSelectionTypes.EXTRUSION)
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
m_bIsCreatingExtrusion = True
@@ -1036,7 +1096,8 @@ Public Class RibPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub CPlaneTop(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1061,7 +1122,8 @@ Public Class RibPanelVM
''' Execute the CPlaneFront. This method is invoked by the CPlaneFrontCommand.
''' </summary>
Public Sub CPlaneFront(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1086,7 +1148,8 @@ Public Class RibPanelVM
''' Execute the CPlaneRight. This method is invoked by the CPlaneRightCommand.
''' </summary>
Public Sub CPlaneRight(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1111,7 +1174,8 @@ Public Class RibPanelVM
''' Execute the CPlaneBack. This method is invoked by the CPlaneBackCommand.
''' </summary>
Public Sub CPlaneBack(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1136,7 +1200,8 @@ Public Class RibPanelVM
''' Execute the CPlaneLeft. This method is invoked by the CPlaneLeftCommand.
''' </summary>
Public Sub CPlaneLeft(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1161,7 +1226,8 @@ Public Class RibPanelVM
''' Execute the CPlaneBottom. This method is invoked by the CPlaneBottomCommand.
''' </summary>
Public Sub CPlaneBottom(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1186,7 +1252,9 @@ Public Class RibPanelVM
''' Execute the CPlaneElevation. This method is invoked by the CPlaneElevationCommand.
''' </summary>
Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub
@@ -1210,88 +1278,14 @@ Public Class RibPanelVM
''' Execute the CPlaneOrigin. This method is invoked by the CPlaneOriginCommand.
''' </summary>
Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub
#End Region ' CPlaneOrigin
#Region "CPlaneRotate"
''' <summary>
''' Returns a command that do CPlaneRotate.
''' </summary>
Public ReadOnly Property CPlaneRotate_Command As ICommand
Get
If m_cmdCPlaneRotate Is Nothing Then
m_cmdCPlaneRotate = New Command(AddressOf CPlaneRotate)
End If
Return m_cmdCPlaneRotate
End Get
End Property
''' <summary>
''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand.
''' </summary>
Public Sub CPlaneRotate(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE)
Else
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE3D)
End If
End Sub
#End Region ' CPlaneRotate
#Region "CPlane3P"
''' <summary>
''' Returns a command that do CPlane3P.
''' </summary>
Public ReadOnly Property CPlane3P_Command As ICommand
Get
If m_cmdCPlane3P Is Nothing Then
m_cmdCPlane3P = New Command(AddressOf CPlane3P)
End If
Return m_cmdCPlane3P
End Get
End Property
''' <summary>
''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand.
''' </summary>
Public Sub CPlane3P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_3P)
End Sub
#End Region ' CPlane3P
#Region "CPlanePerpObj"
''' <summary>
''' Returns a command that do CPlanePerpObj.
''' </summary>
Public ReadOnly Property CPlanePerpObj_Command As ICommand
Get
If m_cmdCPlanePerpObj Is Nothing Then
m_cmdCPlanePerpObj = New Command(AddressOf CPlanePerpObj)
End If
Return m_cmdCPlanePerpObj
End Get
End Property
''' <summary>
''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand.
''' </summary>
Public Sub CPlanePerpObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE)
End Sub
#End Region ' CPlanePerpObj
#Region "CPlaneObj"
Private m_bCPlaneObj_IsActive As Boolean = False
@@ -1326,7 +1320,8 @@ Public Class RibPanelVM
''' Execute the CPlaneObj. This method is invoked by the CPlaneObjCommand.
''' </summary>
Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
@@ -1336,7 +1331,7 @@ Public Class RibPanelVM
End While
EgtDeselectAll()
m_bCPlaneObj_IsActive = True
' Map.refControllerInputPanelVM.PrepareInputBox("Grid from Selection", "Select the face of the object where to place the grid", "", False, False)
Map.refControllerInputPanelVM.ShowMessage("Grid from Selection", "Select the face of the object where to place the grid")
End Sub
#End Region ' CPlaneObj
@@ -1353,6 +1348,7 @@ Public Class RibPanelVM
End Property
Public Sub DragMove()
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(RibSelectionTypes.BOTH)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MOVE)
End Sub
@@ -1371,40 +1367,13 @@ Public Class RibPanelVM
End Property
Public Sub DragRotate()
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(RibSelectionTypes.BOTH)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.ROTATE)
End Sub
#End Region ' DragRotate
#Region "MachParam"
Public ReadOnly Property MachParam_Command As ICommand
Get
If m_cmdMachParam Is Nothing Then
m_cmdMachParam = New Command(AddressOf MachParam)
End If
Return m_cmdMachParam
End Get
End Property
Public Sub MachParam()
If IsNothing(Map.refTopPanelVM.SelMachining) Then Return
m_bAdd_IsChecked = False
m_bEdit_IsChecked = False
m_bGrid_IsChecked = False
m_bMove_IsChecked = False
m_bRotate_IsChecked = False
NotifyPropertyChanged(NameOf(bAdd_IsChecked))
NotifyPropertyChanged(NameOf(bEdit_IsChecked))
NotifyPropertyChanged(NameOf(bGrid_IsChecked))
NotifyPropertyChanged(NameOf(bMove_IsChecked))
NotifyPropertyChanged(NameOf(bRotate_IsChecked))
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.RIBPARAM)
End Sub
#End Region ' MachParam
#End Region ' COMMANDS
End Class
+28 -8
View File
@@ -55,10 +55,14 @@ Public Class CopyFromWndVM
Return
End If
' copio i parametri nella rib corrente
Dim ParamList As New List(Of MachiningParam.Params)({MachiningParam.Params.RIBSTYPE,
Dim ParamList As New List(Of MachiningParam.Params)({MachiningParam.Params.RIBSSTRANDWIDTH,
MachiningParam.Params.RIBSTYPE,
MachiningParam.Params.RIBSOVERLAP,
MachiningParam.Params.RIBSSTRANDOVERLAP,
MachiningParam.Params.RIBSSTRANDCOUNT,
MachiningParam.Params.RIBSLINK,
MachiningParam.Params.RIBSLINKFILLET,
MachiningParam.Params.RIBSMERGEWITHSHELL,
MachiningParam.Params.RIBSINVERTDIRECTION,
MachiningParam.Params.RIBSINVERTSTRANDORDER,
MachiningParam.Params.RIBSLEADININVERT,
@@ -67,12 +71,13 @@ Public Class CopyFromWndVM
MachiningParam.Params.RIBSLEADOUTLEN,
MachiningParam.Params.RIBSLEADOUTCOASTING,
MachiningParam.Params.RIBSLEADOUTWIPE,
MachiningParam.Params.RIBSLEADOUTWIPEDIR})
MachiningParam.Params.RIBSLEADOUTWIPEDIR,
MachiningParam.Params.RIBSLEADFILLET})
For Each Param In ParamList
Select Case Map.refRibPanelVM.SelRib.Type
'Case RibEntity.RibTypes.FROMDRAW
' CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nCurveId)
' CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nExtrusionId)
Case RibEntity.RibTypes.FROMDRAW
CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nCurveId)
CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nExtrusionId)
Case RibEntity.RibTypes.FROMIMPORT
CopyParam(Param, m_SelRib.nExtrusionId, Map.refRibPanelVM.SelRib.nExtrusionId)
End Select
@@ -98,17 +103,26 @@ Public Class CopyFromWndVM
Else
RibTypeParam.SelValue = RibTypeParam.PartSelValue
End If
Case MachiningParam.Params.RIBSOVERLAP, MachiningParam.Params.RIBSSTRANDCOUNT, MachiningParam.Params.RIBSLEADINLEN, MachiningParam.Params.RIBSLEADOUTLEN,
MachiningParam.Params.RIBSLEADOUTCOASTING, MachiningParam.Params.RIBSLEADOUTWIPE, MachiningParam.Params.RIBSLEADOUTWIPEDIR
Case MachiningParam.Params.RIBSSTRANDWIDTH, MachiningParam.Params.RIBSOVERLAP, MachiningParam.Params.RIBSSTRANDOVERLAP, MachiningParam.Params.RIBSSTRANDCOUNT, MachiningParam.Params.RIBSLINKFILLET, MachiningParam.Params.RIBSLEADINLEN, MachiningParam.Params.RIBSLEADOUTLEN,
MachiningParam.Params.RIBSLEADOUTCOASTING, MachiningParam.Params.RIBSLEADOUTWIPE, MachiningParam.Params.RIBSLEADOUTWIPEDIR, MachiningParam.Params.RIBSLEADFILLET
Dim RibTypeParam As RibNumericMachiningParam = Nothing
Dim dRibParam As Double = 0
Select Case Type
Case MachiningParam.Params.RIBSSTRANDWIDTH
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSSTRANDWIDTH)
bRead = EgtGetInfo(nFromId, MAC_RIBSSTRANDWIDTH, dRibParam)
Case MachiningParam.Params.RIBSOVERLAP
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSOVERLAP)
bRead = EgtGetInfo(nFromId, MAC_RIBSOVERLAP, dRibParam)
Case MachiningParam.Params.RIBSSTRANDOVERLAP
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSSTRANDOVERLAP)
bRead = EgtGetInfo(nFromId, MAC_RIBSSTRANDOVERLAP, dRibParam)
Case MachiningParam.Params.RIBSSTRANDCOUNT
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSSTRANDCOUNT)
bRead = EgtGetInfo(nFromId, MAC_RIBSSTRANDCOUNT, dRibParam)
Case MachiningParam.Params.RIBSLINKFILLET
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLINKFILLET)
bRead = EgtGetInfo(nFromId, MAC_RIBSLINKFILLET, dRibParam)
Case MachiningParam.Params.RIBSLEADINLEN
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLEADINLEN)
bRead = EgtGetInfo(nFromId, MAC_RIBSLEADINLEN, dRibParam)
@@ -124,19 +138,25 @@ Public Class CopyFromWndVM
Case MachiningParam.Params.RIBSLEADOUTWIPEDIR
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLEADOUTWIPEDIR)
bRead = EgtGetInfo(nFromId, MAC_RIBSLEADOUTWIPEDIR, dRibParam)
Case MachiningParam.Params.RIBSLEADFILLET
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLEADFILLET)
bRead = EgtGetInfo(nFromId, MAC_RIBSLEADFILLET, dRibParam)
End Select
If Not IsNothing(RibTypeParam) AndAlso bRead Then
RibTypeParam.SetValue(dRibParam)
Else
RibTypeParam.SetValue(RibTypeParam.dPartValue)
End If
Case MachiningParam.Params.RIBSLINK, MachiningParam.Params.RIBSINVERTDIRECTION, MachiningParam.Params.RIBSINVERTSTRANDORDER, MachiningParam.Params.RIBSLEADININVERT, MachiningParam.Params.RIBSLEADOUTINVERT
Case MachiningParam.Params.RIBSLINK, MachiningParam.Params.RIBSMERGEWITHSHELL, MachiningParam.Params.RIBSINVERTDIRECTION, MachiningParam.Params.RIBSINVERTSTRANDORDER, MachiningParam.Params.RIBSLEADININVERT, MachiningParam.Params.RIBSLEADOUTINVERT
Dim RibTypeParam As RibCheckMachiningParam = Nothing
Dim bRibParam As Boolean = False
Select Case Type
Case MachiningParam.Params.RIBSLINK
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSLINK)
bRead = EgtGetInfo(nFromId, MAC_RIBSLINK, bRibParam)
Case MachiningParam.Params.RIBSMERGEWITHSHELL
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSMERGEWITHSHELL)
bRead = EgtGetInfo(nFromId, MAC_RIBSMERGEWITHSHELL, bRibParam)
Case MachiningParam.Params.RIBSINVERTDIRECTION
RibTypeParam = Map.refRibParamPanelVM.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.RIBSINVERTDIRECTION)
bRead = EgtGetInfo(nFromId, MAC_RIBSINVERTDIRECTION, bRibParam)
+19 -9
View File
@@ -114,15 +114,25 @@
<UniformGrid Grid.Row="1"
Rows="1"
Margin="0,2.5,0,0">
<Button Content="Ok"
Command="{Binding Ok_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Content="Cancel"
Command="{Binding Cancel_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Content="Copy From"
Command="{Binding CopyFrom_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}"/>
<Button Command="{Binding Ok_Command}"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Ok.png"
Style="{StaticResource Button_Image}"/>
</Button>
<Button Command="{Binding Cancel_Command}"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Cancel.png"
Style="{StaticResource Button_Image}"/>
</Button>
<Button Command="{Binding CopyFrom_Command}"
ToolTip="Copy From"
Margin="0,0,2.5,0"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\RibParamPanel\CopyFrom.png"
Style="{StaticResource Button_Image}"/>
</Button>
</UniformGrid>
</Grid>
</Border>
+76 -20
View File
@@ -42,19 +42,24 @@ Public Class RibParamPanelVM
m_Type = Cathegories.RIBS
m_sName = "Ribs"
m_MachiningParamList = New List(Of MachiningParam)({New RibComboMachiningParam(MachiningParam.Params.RIBSTYPE, nRibId, nPartId),
New RibNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nRibId, nPartId),
New RibNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nRibId, nPartId),
New RibCheckMachiningParam(MachiningParam.Params.RIBSLINK, nRibId, nPartId),
New RibCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nRibId, nPartId),
New RibCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nRibId, nPartId),
New RibCheckMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nRibId, nPartId),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADINLEN, nRibId, nPartId),
New RibCheckMachiningParam(MachiningParam.Params.RIBSLEADOUTINVERT, nRibId, nPartId),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nRibId, nPartId),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nRibId, nPartId),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nRibId, nPartId),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nRibId, nPartId)})
m_MachiningParamList = New List(Of MachiningParam)({New RibNumericMachiningParam(MachiningParam.Params.RIBSSTRANDWIDTH, nRibId, nPartId, Me),
New RibComboMachiningParam(MachiningParam.Params.RIBSTYPE, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSOVERLAP, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSSTRANDOVERLAP, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSSTRANDCOUNT, nRibId, nPartId, Me),
New RibCheckMachiningParam(MachiningParam.Params.RIBSLINK, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLINKFILLET, nRibId, nPartId, Me),
New RibCheckMachiningParam(MachiningParam.Params.RIBSMERGEWITHSHELL, nRibId, nPartId, Me),
New RibCheckMachiningParam(MachiningParam.Params.RIBSINVERTDIRECTION, nRibId, nPartId, Me),
New RibCheckMachiningParam(MachiningParam.Params.RIBSINVERTSTRANDORDER, nRibId, nPartId, Me),
New RibCheckMachiningParam(MachiningParam.Params.RIBSLEADININVERT, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADINLEN, nRibId, nPartId, Me),
New RibCheckMachiningParam(MachiningParam.Params.RIBSLEADOUTINVERT, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTLEN, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTCOASTING, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPE, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADOUTWIPEDIR, nRibId, nPartId, Me),
New RibNumericMachiningParam(MachiningParam.Params.RIBSLEADFILLET, nRibId, nPartId, Me)})
NotifyPropertyChanged(NameOf(MachiningParamList))
NotifyPropertyChanged(NameOf(sName))
End Sub
@@ -135,6 +140,8 @@ Public Class RibParamPanelVM
Map.refSliceManagerVM.UpdateDimensions()
End If
End If
' riattivo lista ribs
Map.refRibPanelVM.SetRibListIsEnabled(False)
' ripristino modalita' standard
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.NULL)
Map.refRibPanelVM.ResetMachParamIsChecked()
@@ -224,18 +231,30 @@ Public Class RibNumericMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nRibId As Integer, nPartId As Integer)
MyBase.New(Type)
Sub New(Type As Params, nRibId As Integer, nPartId As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.RIBSSTRANDWIDTH
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSSTRANDWIDTH, m_dValue)
EgtGetInfo(nPartId, MAC_RIBSSTRANDWIDTH, m_dPartValue)
m_bIsLen = True
Case Params.RIBSOVERLAP
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSOVERLAP, m_dValue)
EgtGetInfo(nPartId, MAC_RIBSOVERLAP, m_dPartValue)
m_bIsLen = True
m_bIsLen = False
Case Params.RIBSSTRANDOVERLAP
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSSTRANDOVERLAP, m_dValue)
EgtGetInfo(nPartId, MAC_RIBSSTRANDOVERLAP, m_dPartValue)
m_bIsLen = False
Case Params.RIBSSTRANDCOUNT
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSSTRANDCOUNT, m_dValue)
EgtGetInfo(nPartId, MAC_RIBSSTRANDCOUNT, m_dPartValue)
m_bIsLen = True
Case Params.RIBSLINKFILLET
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLINKFILLET, m_dValue)
EgtGetInfo(nPartId, MAC_RIBSLINKFILLET, m_dPartValue)
m_bIsLen = True
Case Params.RIBSINVERTDIRECTION
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSINVERTDIRECTION, m_dValue)
EgtGetInfo(nPartId, MAC_RIBSINVERTDIRECTION, m_dPartValue)
@@ -272,6 +291,10 @@ Public Class RibNumericMachiningParam
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLEADOUTWIPEDIR, m_dValue)
EgtGetInfo(nPartId, MAC_RIBSLEADOUTWIPEDIR, m_dPartValue)
m_bIsLen = True
Case Params.RIBSLEADFILLET
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLEADFILLET, m_dValue)
EgtGetInfo(nPartId, MAC_RIBSLEADFILLET, m_dPartValue)
m_bIsLen = True
End Select
m_dOrigValue = m_dValue
If Not bReadFromPart Then
@@ -288,18 +311,36 @@ Public Class RibNumericMachiningParam
sWriteValue = DoubleToString(m_dValue, 2)
End If
Select Case Type
Case Params.RIBSSTRANDWIDTH
If bIsModifiedFromPart Then
EgtSetInfo(nRibId, MAC_RIBSSTRANDWIDTH, sWriteValue)
Else
EgtRemoveInfo(nRibId, MAC_RIBSSTRANDWIDTH)
End If
Case Params.RIBSOVERLAP
If bIsModifiedFromPart Then
EgtSetInfo(nRibId, MAC_RIBSOVERLAP, sWriteValue)
Else
EgtRemoveInfo(nRibId, MAC_RIBSOVERLAP)
End If
Case Params.RIBSSTRANDOVERLAP
If bIsModifiedFromPart Then
EgtSetInfo(nRibId, MAC_RIBSSTRANDOVERLAP, sWriteValue)
Else
EgtRemoveInfo(nRibId, MAC_RIBSSTRANDOVERLAP)
End If
Case Params.RIBSSTRANDCOUNT
If bIsModifiedFromPart Then
EgtSetInfo(nRibId, MAC_RIBSSTRANDCOUNT, sWriteValue)
Else
EgtRemoveInfo(nRibId, MAC_RIBSSTRANDCOUNT)
End If
Case Params.RIBSLINKFILLET
If bIsModifiedFromPart Then
EgtSetInfo(nRibId, MAC_RIBSLINKFILLET, sWriteValue)
Else
EgtRemoveInfo(nRibId, MAC_RIBSLINKFILLET)
End If
Case Params.RIBSINVERTDIRECTION
If bIsModifiedFromPart Then
EgtSetInfo(nRibId, MAC_RIBSINVERTDIRECTION, sWriteValue)
@@ -354,6 +395,12 @@ Public Class RibNumericMachiningParam
Else
EgtRemoveInfo(nRibId, MAC_RIBSLEADOUTWIPEDIR)
End If
Case Params.RIBSLEADFILLET
If bIsModifiedFromPart Then
EgtSetInfo(nRibId, MAC_RIBSLEADFILLET, sWriteValue)
Else
EgtRemoveInfo(nRibId, MAC_RIBSLEADFILLET)
End If
End Select
End Sub
@@ -420,8 +467,8 @@ Public Class RibComboMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nRibId As Integer, nPartId As Integer)
MyBase.New(Type)
Sub New(Type As Params, nRibId As Integer, nPartId As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
Dim bReadFromRib As Boolean = False
Dim bReadFromPart As Boolean = False
Select Case Type
@@ -525,13 +572,16 @@ Public Class RibCheckMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nRibId As Integer, nPartId As Integer)
MyBase.New(Type)
Sub New(Type As Params, nRibId As Integer, nPartId As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.RIBSLINK
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSLINK, m_bValue)
EgtGetInfo(nPartId, MAC_RIBSLINK, m_bPartValue)
Case Params.RIBSMERGEWITHSHELL
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSMERGEWITHSHELL, m_bValue)
EgtGetInfo(nPartId, MAC_RIBSMERGEWITHSHELL, m_bPartValue)
Case Params.RIBSINVERTDIRECTION
bReadFromPart = EgtGetInfo(nRibId, MAC_RIBSINVERTDIRECTION, m_bValue)
EgtGetInfo(nPartId, MAC_RIBSINVERTDIRECTION, m_bPartValue)
@@ -560,6 +610,12 @@ Public Class RibCheckMachiningParam
Else
EgtRemoveInfo(nRibId, MAC_RIBSLINK)
End If
Case Params.RIBSMERGEWITHSHELL
If bIsModifiedFromPart Then
EgtSetInfo(nRibId, MAC_RIBSMERGEWITHSHELL, If(m_bValue, 1, 0))
Else
EgtRemoveInfo(nRibId, MAC_RIBSMERGEWITHSHELL)
End If
Case Params.RIBSINVERTDIRECTION
If bIsModifiedFromPart Then
EgtSetInfo(nRibId, MAC_RIBSINVERTDIRECTION, If(m_bValue, 1, 0))
+239 -162
View File
@@ -49,9 +49,8 @@ Public Class MySceneHostVM
AddHandler MainController.OnOpenProject, AddressOf OnOpenProject
AddHandler MainController.OnSavingProject, AddressOf OnSavingProject
AddHandler MainController.OnSavedProject, AddressOf OnSavedProject
AddHandler MainController.OnInsertingProject, AddressOf OnInsertingProject
AddHandler MainController.OnInsertedProject, AddressOf OnInsertedProject
AddHandler MainController.OnImportingProject, AddressOf OnImportingProject
AddHandler MainController.OnImportedProject, AddressOf OnImportedProject
AddHandler MainController.PrepareInputBox, AddressOf PrepareInputBox
AddHandler MainController.SetInputBoxText, AddressOf SetInputBoxText
AddHandler MainController.SetInputBoxCheck, AddressOf SetInputBoxCheck
@@ -71,6 +70,8 @@ Public Class MySceneHostVM
' Se tutto bene
If MainScene.Init() And Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.BASE) Then
PostInitializeScene()
' Non imposto automaticamente il focus sulla scena muovendo il mouse sopra di essa (necessario click)
MainScene.SetFocusOnMove( True, 0.3, 0.3, 0.1, 0.2)
' Imposto stato gestione mouse diretto della scena a nessuno
MainScene.SetStatusNull()
EgtSetCurrentContext(MainScene.GetCtx())
@@ -81,17 +82,32 @@ Public Class MySceneHostVM
' Problemi
' Se manca la chiave
If Map.refMainWindowVM.MainWindowM.nKeyLevel = -1 Or Map.refMainWindowVM.MainWindowM.nKeyLevel = -2 Then
EgtOutLog("Missing Dongle")
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3)
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
If Not EgtGetNetHwKey() Then
EgtOutLog("Missing Dongle")
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
Dim sText As String = EgtMsg(10102) & vbCrLf & EgtMsg(10103)
Dim sTitle As String = EgtMsg(10101)
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
Else
EgtOutLog("NetDongle is full")
' Box di avviso slot chiave di rete occupato : "Chiave di Rete completamente occupata. \n Uscire dal programma su un altro PC." "Errore"
Dim sText As String = EgtMsg(10110) & vbCrLf & EgtMsg(10111)
Dim sTitle As String = EgtMsg(10101)
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
End If
' Se altrimenti manca il collegamento con la chiave di rete
ElseIf Map.refMainWindowVM.MainWindowM.nKeyLevel = -9 Then
EgtOutLog("Missing Link with Net Dongle")
' Box di avviso chiave mancante : "Collegamento con la Chiave di rete non riuscito. \n Verificare la connessione." "Errore"
Dim sText As String = EgtMsg(10108) & vbCrLf & EgtMsg(10109)
Dim sTitle As String = EgtMsg(10101)
MessageBox.Show(sText, sTitle, MessageBoxButton.OK, MessageBoxImage.Error)
' Altrimenti manca la licenza
' Altrimenti manca la licenza
Else
EgtOutLog("Problems with Licence")
' Box di avviso licenza con problemi : "Programma senza licenza. \n Caricala e riavvia il programma." "Errore"
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 5) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 6)
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
Dim sText As String = EgtMsg(10105) & vbCrLf & EgtMsg(10106)
Dim sTitle As String = EgtMsg(10101)
If MessageBox.Show(sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
' Apro dialogo per richiesta file licenza
Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With {
@@ -186,33 +202,24 @@ Public Class MySceneHostVM
Private Sub PostInitializeScene()
' Impostazioni Controller
MainController.SetScene(MainScene)
MainController.SetSurfTmTolerance(0.05)
MainController.SetSurfTmTolerance(OptionModule.m_dGeometryTolerance)
MainController.SetAdvImpTolerance(OptionModule.m_dGeometryTolerance)
MainController.SetUseCustomColors(True, S_SCENE, K_CUSTOMCOLORS)
' imposto unità di misura per interfaccia utente
Dim bMmUnits As Boolean = GetMainPrivateProfileInt(S_SCENE, K_MMUNITS, 1) <> 0
EgtSetUiUnits(bMmUnits)
'Map.refMyStatusBarVM.SetMeasureUnit(nMeasureUnit <> 0)
' imposto visualizzazione riferimento globale
EgtSetGlobFrameShow(True)
' imposto i dati della griglia
Dim bGridVisibility As Boolean = (GetMainPrivateProfileInt(S_GRID, K_SHOWGRID, 1) <> 0)
Dim dSnapStepMm As Double = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEP, 10)
Dim dSnapStepInch As Double = GetMainPrivateProfileDouble(S_GRID, K_SNAPSTEPINCH, 10)
Dim nMinLineSStep As Integer = GetMainPrivateProfileInt(S_GRID, K_MINLINESSTEP, 1)
Dim nMajLineSStep As Integer = GetMainPrivateProfileInt(S_GRID, K_MAJLINESSTEP, 10)
Dim nExtSStep As Integer = GetMainPrivateProfileInt(S_GRID, K_EXTSSTEP, 50)
Dim MinLnColor As Color3d = New Color3d(160, 160, 160)
GetMainPrivateProfileColor(S_GRID, K_MINLNCOLOR, MinLnColor)
Dim MajLnColor As Color3d = New Color3d(160, 160, 160)
GetMainPrivateProfileColor(S_GRID, K_MAJLNCOLOR, MajLnColor)
EgtSetGridFrame(Frame3d.GLOB)
If bMmUnits Then
EgtSetGridGeo(dSnapStepMm, nMinLineSStep, nMajLineSStep, nExtSStep)
Else
EgtSetGridGeo(dSnapStepInch, nMinLineSStep, nMajLineSStep, nExtSStep)
End If
EgtSetGridGeo( If( bMmUnits, OptionModule.m_dSnapStepMm, OptionModule.m_dSnapStepInch),
OptionModule.m_nMinLineSStep, OptionModule.m_nMajLineSStep, OptionModule.m_nExtSStep)
EgtSetGridColor(MinLnColor, MajLnColor)
EgtSetGridShow(bGridVisibility, bGridVisibility)
EgtSetGridShow(OptionModule.m_bGridVisibility, OptionModule.m_bGridVisibility)
' imposto tipo coordinate
MainScene.SetGridCursorPos(True)
' visualizzazione avanzata dei triangoli costituenti le superfici
@@ -242,13 +249,14 @@ Public Class MySceneHostVM
#Region "ProjectManager"
Public Overrides Sub NewProject()
Public Overrides Function NewProject() As Boolean
EgtSetCurrentContext(MainScene.GetCtx())
Dim bOk As Boolean = MainController.NewProject()
MainScene.SetStatusNull()
End Sub
Return bOk
End Function
Public Overrides Sub OpenProject(sFilePath As String)
Public Overrides Function OpenProject(sFilePath As String) As Boolean
EgtSetCurrentContext(MainScene.GetCtx())
Dim bOk As Boolean = False
If String.IsNullOrEmpty(sFilePath) Then
@@ -260,39 +268,76 @@ Public Class MySceneHostVM
If Not String.IsNullOrWhiteSpace(sDir) Then
sDir = Path.GetDirectoryName(sDir)
End If
bOk = MainController.OpenProject(sDir)
Else
bOk = MainController.OpenProject(sFilePath, False)
Dim OpenFileDialog As New Windows.Forms.OpenFileDialog With {
.Title = "Open",
.Filter = "Icarus project(*.icrs)|*.icrs" &
"|New geometry EgalTech(*.nge)|*.nge",
.FilterIndex = 1,
.InitialDirectory = sDir
}
If Not OpenFileDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then Return False
sFilePath = OpenFileDialog.FileName
End If
bOk = MainController.OpenProject(sFilePath, False)
' Imposto stato gestione mouse diretto della scena a nessuno
MainScene.SetStatusNull()
' imposto modalita' import
Map.refTopPanelVM.SelPage = Pages.NULL
End Sub
Return bOk
End Function
Public Overrides Sub SaveProject()
Public Overrides Function SaveProject() As Boolean
' Se nome progetto non definito o con estensione non valida lo chiedo
Dim sCurrFile As String = ""
EgtGetCurrFilePath(sCurrFile)
Dim bOk As Boolean = False
If String.IsNullOrWhiteSpace(sCurrFile) Or EgtGetFileType(sCurrFile) <> FT.NGE Then
MyBase.SaveAsProject()
Return
bOk = SaveAsProject()
Else
Dim bDeleteNgeFile As Boolean = Path.GetExtension(sCurrFile) = ".nge"
EgtSetCurrFilePath(Path.ChangeExtension(sCurrFile, "icrs"))
' Salvataggio standard
bOk = MainController.SaveProject()
If bOk AndAlso bDeleteNgeFile AndAlso File.Exists(sCurrFile) Then
Try
File.Delete(sCurrFile)
Catch ex As Exception
EgtOutLog("Delete nge file failed!")
End Try
End If
End If
' Salvataggio standard
MyBase.SaveProject()
' Imposto stato gestione mouse diretto della scena a nessuno
MainScene.SetStatusNull()
End Sub
Return bOk
End Function
Public Overrides Sub SaveAsProject()
Public Overrides Function SaveAsProject() As Boolean
m_bIsSaveAs = True
MyBase.SaveAsProject()
Dim sFile As String = ""
EgtGetCurrFilePath(sFile)
Dim bOk As Boolean = False
' Se nome vuoto, assegno "New"
If String.IsNullOrWhiteSpace(sFile) Then sFile = "New.icrs"
' Eventuale sistemazione estensione
sFile = IO.Path.ChangeExtension(sFile, "icrs")
' Assegnazione nome file con dialogo
Dim SaveFileDialog As New Windows.Forms.SaveFileDialog With {
.Title = "Save",
.Filter = "Icarus Project(*.icrs)|*.icrs",
.FileName = sFile,
.InitialDirectory = IO.Path.GetDirectoryName(sFile)
}
If SaveFileDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim sFileName As String = SaveFileDialog.FileName
EgtSetCurrFilePath(sFileName)
' Salvataggio standard
bOk = MainController.SaveProject()
End If
m_bIsSaveAs = False
' Imposto stato gestione mouse diretto della scena a nessuno
MainScene.SetStatusNull()
End Sub
Return bOk
End Function
Public Overrides Sub InsertProject()
' eseguo
Public Overrides Function InsertProject() As Boolean
' Recupero cartella dell'ultimo progetto aperto
Dim sDir As String = MainController.GetCurrFile()
If String.IsNullOrWhiteSpace(sDir) Then
@@ -309,15 +354,15 @@ Public Class MySceneHostVM
"|Step files (*.stp;*.step)|*.stp;*.step" &
"|3D Manufacturing format (*.3mf)|*.3mf" &
"|New geometry EgalTech(*.nge)|*.nge" &
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
"|All Files (*.*)|*.*",
.FilterIndex = ExtIndex,
.InitialDirectory = sDir}
If Not OpenFileDialog.ShowDialog Then
Return
Return False
End If
WriteMainPrivateProfileString(S_PRINTING3D, K_IMPORTCURREXTENSION, OpenFileDialog.FilterIndex)
Dim sFile As String = String.Empty
sFile = OpenFileDialog.FileName
Dim sFile As String = OpenFileDialog.FileName
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
Map.refProjManagerVM.SetProjCmdIsEnabled(False)
Map.refTopPanelVM.SetTopPanelIsEnabled(False)
@@ -327,8 +372,12 @@ Public Class MySceneHostVM
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(False)
Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(False)
Map.refSliderManagerVM.SetSliderVisibility(False)
' mostro finestra di caricamento
Dim ImportLoadingWnd As ImportLoadingWndV = New ImportLoadingWndV(Application.Current.MainWindow, New ImportLoadingWndVM)
ImportLoadingWnd.Show()
' importo la nuova geometria
If MainController.InsertProject(sFile, False) Then
Dim bOk As Boolean = MainController.InsertProject(sFile, False)
If bOk Then
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(True)
' la sposto in centro tavola
Dim nNewPartId As Integer = EgtGetLastPart()
@@ -346,10 +395,13 @@ Public Class MySceneHostVM
Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(True)
Map.refSliderManagerVM.SetSliderVisibility(True)
End If
' chiudo finestra di caricamento
ImportLoadingWnd.Close()
EgtDraw()
End Sub
Return bOk
End Function
Public Sub InsertRib()
Public Function InsertRib() As Boolean
' Recupero cartella dell'ultimo progetto aperto
Dim sDir As String = MainController.GetCurrFile()
If String.IsNullOrWhiteSpace(sDir) Then
@@ -365,42 +417,50 @@ Public Class MySceneHostVM
"|Step files (*.stp;*.step)|*.stp;*.step" &
"|3D Manufacturing format (*.3mf)|*.3mf" &
"|New geometry EgalTech(*.nge)|*.nge" &
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
"|All Files (*.*)|*.*",
.FilterIndex = 1,
.FilterIndex = 6,
.InitialDirectory = sDir}
If Not OpenFileDialog.ShowDialog Then
Return
Return False
End If
Dim sFile As String = String.Empty
sFile = OpenFileDialog.FileName
' importo la nuova geometria
If MainController.InsertProject(sFile, False) Then
Dim bOk As Boolean = MainController.InsertProject(sFile, False)
If bOk Then
' sposto le nuove geometrie nel layer rib del pezzo
Dim nNewPartId As Integer = EgtGetLastPart()
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
Dim frLayer As New Frame3d
EgtGetGroupGlobFrame( nNewLayerId, frLayer)
Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId)
While nNewEntityId <> GDB_ID.NULL
Dim EntityType As GDB_TY = EgtGetType(nNewEntityId)
Select Case EntityType
Case GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE, GDB_TY.CRV_ARC
Dim nNewRib = nNewEntityId
Dim nNewRib As Integer = GDB_ID.NULL
If EntityType = GDB_TY.CRV_LINE OrElse EntityType = GDB_TY.CRV_ARC Then
nNewRib = EgtCreateCurveCompo(Map.refTopPanelVM.SelPart.nPartId, nNewEntityId, False)
nNewRib = EgtCreateCurveCompo(nNewLayerId, nNewEntityId, False)
EgtRelocate( nNewRib, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON)
Else
' lo copio nel layer dei rib
nNewRib = EgtCopy(nNewEntityId, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON)
End If
EgtSetName(nNewRib, RIB_CURVE)
' elimino effetti di eventuale riferimento originale
EgtTransform( nNewRib, frLayer)
' elimino colore entita'
EgtResetColor(nNewEntityId)
' lo aggiungo alla lista
Dim NewEntity As RibEntity = New RibEntity(RibEntity.RibTypes.FROMIMPORT, nNewRib)
Map.refRibPanelVM.RibList.Add(NewEntity)
Case GDB_TY.SRF_MESH, GDB_TY.SRF_FRGN, GDB_TY.SRF_BEZ
Dim nNewRib = nNewEntityId
' lo copio nel layer dei rib
nNewRib = EgtCopy(nNewEntityId, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON)
Dim nNewRib As Integer = EgtCopy(nNewEntityId, Map.refRibPanelVM.nRibLayerId, GDB_POS.LAST_SON)
EgtSetName(nNewRib, RIB_EXTRUSION)
' elimino effetti di eventuale riferimento originale
EgtTransform( nNewRib, frLayer)
' elimino colore entita'
EgtResetColor(nNewEntityId)
' lo aggiungo alla lista
@@ -416,9 +476,10 @@ Public Class MySceneHostVM
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End If
End Sub
Return bOk
End Function
Public Sub InsertPrint(MenuItem As ManagerLayer_MenuItem)
Public Function InsertPrint(MenuItem As ManagerLayer_MenuItem) As Boolean
' Recupero cartella dell'ultimo progetto aperto
Dim sDir As String = MainController.GetCurrFile()
If String.IsNullOrWhiteSpace(sDir) Then
@@ -434,19 +495,22 @@ Public Class MySceneHostVM
"|Step files (*.stp;*.step)|*.stp;*.step" &
"|3D Manufacturing format (*.3mf)|*.3mf" &
"|New geometry EgalTech(*.nge)|*.nge" &
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
"|All Files (*.*)|*.*",
.FilterIndex = 1,
.FilterIndex = 6,
.InitialDirectory = sDir}
If Not OpenFileDialog.ShowDialog Then
Return
Return False
End If
Dim sFile As String = String.Empty
sFile = OpenFileDialog.FileName
Dim sFile As String = OpenFileDialog.FileName
' importo la nuova geometria
If MainController.InsertProject(sFile, False) Then
Dim bOk As Boolean = MainController.InsertProject(sFile, False)
If bOk Then
' sposto le nuove geometrie nel layer rib del pezzo
Dim nNewPartId As Integer = EgtGetLastPart()
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
Dim frLayer As New Frame3d
EgtGetGroupGlobFrame( nNewLayerId, frLayer)
' verifico che ci sia una sola entita'
If EgtGetGroupObjs(nNewLayerId) <> 1 Then
MessageBox.Show("Impossible importing file that contains more than one entity.", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
@@ -455,6 +519,8 @@ Public Class MySceneHostVM
If MenuItem.OrigLayer.EntityList.Count > 0 AndAlso MenuItem.OrigLayer.EntityList(0).nId <> GDB_ID.NULL Then EgtErase(MenuItem.OrigLayer.EntityList(0).nId)
Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId)
EgtRelocate(nNewEntityId, MenuItem.OrigLayer.nLayerId, GDB_POS.LAST_SON)
' elimino effetti di eventuale riferimento originale
EgtTransform( nNewEntityId, frLayer)
' elimino colore entita'
EgtResetColor(nNewEntityId)
' aggiorno riferimento pezzo
@@ -472,9 +538,10 @@ Public Class MySceneHostVM
EgtErase(nNewPartId)
EgtDraw()
End If
End Sub
Return bOk
End Function
Public Sub InsertShellNumber()
Public Function InsertShellNumber() As Boolean
' Recupero cartella dell'ultimo progetto aperto
Dim sDir As String = MainController.GetCurrFile()
If String.IsNullOrWhiteSpace(sDir) Then
@@ -490,42 +557,50 @@ Public Class MySceneHostVM
"|Step files (*.stp;*.step)|*.stp;*.step" &
"|3D Manufacturing format (*.3mf)|*.3mf" &
"|New geometry EgalTech(*.nge)|*.nge" &
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
"|All Files (*.*)|*.*",
.FilterIndex = 1,
.FilterIndex = 6,
.InitialDirectory = sDir}
If Not OpenFileDialog.ShowDialog Then
Return
Return False
End If
Dim sFile As String = String.Empty
sFile = OpenFileDialog.FileName
' importo la nuova geometria
If MainController.InsertProject(sFile, False) Then
Dim bOk As Boolean = MainController.InsertProject(sFile, False)
If bOk Then
' sposto le nuove geometrie nel layer ShellNumber del pezzo
Dim nNewPartId As Integer = EgtGetLastPart()
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
Dim frLayer As New Frame3d
EgtGetGroupGlobFrame( nNewLayerId, frLayer)
Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId)
While nNewEntityId <> GDB_ID.NULL
Dim EntityType As GDB_TY = EgtGetType(nNewEntityId)
Select Case EntityType
Case GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE, GDB_TY.CRV_ARC
Dim nNewShellNumberId As Integer = nNewEntityId
Dim nNewShellNumberId As Integer = GDB_ID.NULL
If EntityType = GDB_TY.CRV_LINE OrElse EntityType = GDB_TY.CRV_ARC Then
nNewShellNumberId = EgtCreateCurveCompo(Map.refTopPanelVM.SelPart.nPartId, nNewEntityId, False)
nNewShellNumberId = EgtCreateCurveCompo(nNewLayerId, nNewEntityId, False)
EgtRelocate( nNewShellNumberId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON)
Else
' lo copio nel layer dei shellnumber
nNewShellNumberId = EgtCopy(nNewEntityId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON)
End If
EgtSetName(nNewShellNumberId, RIB_CURVE)
' elimino effetti di eventuale riferimento originale
EgtTransform( nNewShellNumberId, frLayer)
' elimino colore entita'
EgtResetColor(nNewEntityId)
' lo aggiungo alla lista
Dim NewEntity As ShellNumberEntity = New ShellNumberEntity(ShellNumberEntity.ShellNumberTypes.FROMIMPORT, nNewShellNumberId)
Map.refShellNumberPanelVM.ShellNumberList.Add(NewEntity)
Case GDB_TY.SRF_MESH, GDB_TY.SRF_FRGN, GDB_TY.SRF_BEZ
Dim nNewShellNumberId = nNewEntityId
' lo copio nel layer dei rib
nNewShellNumberId = EgtCopy(nNewEntityId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON)
' lo copio nel layer dei shellnumber
Dim nNewShellNumberId As Integer = EgtCopy(nNewEntityId, Map.refShellNumberPanelVM.nShellNumberLayerId, GDB_POS.LAST_SON)
EgtSetName(nNewShellNumberId, RIB_EXTRUSION)
' elimino effetti di eventuale riferimento originale
EgtTransform( nNewShellNumberId, frLayer)
' elimino colore entita'
EgtResetColor(nNewEntityId)
' lo aggiungo alla lista
@@ -535,15 +610,16 @@ Public Class MySceneHostVM
nNewEntityId = EgtGetNext(nNewEntityId)
End While
EgtErase(nNewPartId)
' seleziono ultima rib
' seleziono ultima ShellNumber
Map.refShellNumberPanelVM.SelLastShellNumber()
EgtDraw()
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End If
End Sub
Return bOk
End Function
Public Sub InsertFilledSolid()
Public Function InsertFilledSolid() As Boolean
' Recupero cartella dell'ultimo progetto aperto
Dim sDir As String = MainController.GetCurrFile()
If String.IsNullOrWhiteSpace(sDir) Then
@@ -559,42 +635,50 @@ Public Class MySceneHostVM
"|Step files (*.stp;*.step)|*.stp;*.step" &
"|3D Manufacturing format (*.3mf)|*.3mf" &
"|New geometry EgalTech(*.nge)|*.nge" &
"|Imported Files (*.*)|*.stl;*.igs;*.iges;*.stp;*.step;*.3mf;*.nge" &
"|All Files (*.*)|*.*",
.FilterIndex = 1,
.FilterIndex = 6,
.InitialDirectory = sDir}
If Not OpenFileDialog.ShowDialog Then
Return
Return False
End If
Dim sFile As String = String.Empty
sFile = OpenFileDialog.FileName
' importo la nuova geometria
If MainController.InsertProject(sFile, False) Then
Dim bOk As Boolean = MainController.InsertProject(sFile, False)
If bOk Then
' sposto le nuove geometrie nel layer ShellNumber del pezzo
Dim nNewPartId As Integer = EgtGetLastPart()
Dim nNewLayerId As Integer = EgtGetFirstGroupInGroup(nNewPartId)
Dim frLayer As New Frame3d
EgtGetGroupGlobFrame( nNewLayerId, frLayer)
Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewLayerId)
While nNewEntityId <> GDB_ID.NULL
Dim EntityType As GDB_TY = EgtGetType(nNewEntityId)
Select Case EntityType
Case GDB_TY.CRV_COMPO, GDB_TY.CRV_LINE, GDB_TY.CRV_ARC
Dim nNewFilledSolidId As Integer = nNewEntityId
Dim nNewFilledSolidId As Integer = GDB_ID.NULL
If EntityType = GDB_TY.CRV_LINE OrElse EntityType = GDB_TY.CRV_ARC Then
nNewFilledSolidId = EgtCreateCurveCompo(Map.refTopPanelVM.SelPart.nPartId, nNewEntityId, False)
nNewFilledSolidId = EgtCreateCurveCompo(nNewLayerId, nNewEntityId, False)
EgtRelocate( nNewFilledSolidId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON)
Else
' lo copio nel layer dei shellnumber
' lo copio nel layer dei FilledSolid
nNewFilledSolidId = EgtCopy(nNewEntityId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON)
End If
EgtSetName(nNewFilledSolidId, RIB_CURVE)
' elimino effetti di eventuale riferimento originale
EgtTransform( nNewFilledSolidId, frLayer)
' elimino colore entita'
EgtResetColor(nNewEntityId)
' lo aggiungo alla lista
Dim NewEntity As FilledSolidEntity = New FilledSolidEntity(FilledSolidEntity.FilledSolidTypes.FROMIMPORT, nNewFilledSolidId)
Map.refFilledSolidPanelVM.FilledSolidList.Add(NewEntity)
Case GDB_TY.SRF_MESH, GDB_TY.SRF_FRGN, GDB_TY.SRF_BEZ
Dim nNewFilledSolidId = nNewEntityId
' lo copio nel layer dei rib
nNewFilledSolidId = EgtCopy(nNewEntityId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON)
' lo copio nel layer dei FilledSolid
Dim nNewFilledSolidId As Integer = EgtCopy(nNewEntityId, Map.refFilledSolidPanelVM.nFilledSolidLayerId, GDB_POS.LAST_SON)
EgtSetName(nNewFilledSolidId, RIB_EXTRUSION)
' elimino effetti di eventuale riferimento originale
EgtTransform( nNewFilledSolidId, frLayer)
' elimino colore entita'
EgtResetColor(nNewEntityId)
' lo aggiungo alla lista
@@ -604,27 +688,16 @@ Public Class MySceneHostVM
nNewEntityId = EgtGetNext(nNewEntityId)
End While
EgtErase(nNewPartId)
' seleziono ultima rib
' seleziono ultima FilledSolid
Map.refFilledSolidPanelVM.SelLastFilledSolid()
EgtDraw()
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End If
End Sub
Return bOk
End Function
Public Overrides Sub ImportProject()
Dim sDir As String = String.Empty
GetMainPrivateProfileString(S_MRUIMPORT, K_FILE & "1", "", sDir)
If Not String.IsNullOrWhiteSpace(sDir) Then
sDir = Path.GetDirectoryName(sDir)
End If
sDir.TrimEnd("\"c)
MainController.ImportProject(sDir)
' Imposto stato gestione mouse diretto della scena a nessuno
MainScene.SetStatusNull()
End Sub
Public Overrides Sub ExportProject()
Public Overrides Function ExportProject() As Boolean
' Reset controller e scena
MainController.ResetStatus()
'Assegnazione nome file con dialogo
@@ -636,18 +709,39 @@ Public Class MySceneHostVM
.FileName = Path.ChangeExtension(MainController.GetCurrFile(), "").TrimEnd("."c)
}
Dim DialogResult As Boolean? = SaveFileDialog.ShowDialog
If IsNothing(DialogResult) OrElse Not DialogResult Then Return
If IsNothing(DialogResult) OrElse Not DialogResult Then Return False
MainController.SetDefaultFilterForExport(EEX_FLT.DEFAULT + EEX_FLT.LEV_TEMP)
MainController.ExportProject(SaveFileDialog.FileName, False)
End Sub
Return MainController.ExportProject(SaveFileDialog.FileName, False)
End Function
Friend Shadows Sub ExecScript(sFilePath As String)
Public Function ExportProjectForMachine(sFilePath As String) As Boolean
' Reset controller e scena
MainController.ResetStatus()
MainController.SetDefaultFilterForExport(EEX_FLT.MODE_HIDDEN + EEX_FLT.MODE_STD + EEX_FLT.STAT_ON + EEX_FLT.STAT_OFF + EEX_FLT.LEV_TEMP)
Return MainController.ExportGeomId(Map.refTopPanelVM.SelPart.nPartId, sFilePath, False)
End Function
Public Function ExportProjectForMachine(sDirPath As String, b3dm As Boolean, ByRef sFilePath As String) As Boolean
sFilePath = sDirPath & "\ProjectSlice" & If(b3dm, ".3dm", ".3mf")
' Reset controller e scena
MainController.ResetStatus()
MainController.SetDefaultFilterForExport(EEX_FLT.MODE_HIDDEN + EEX_FLT.MODE_STD + EEX_FLT.STAT_ON + EEX_FLT.STAT_OFF + EEX_FLT.LEV_TEMP)
Dim nExportGeomId As Integer = 0
If b3dm Then
If Not ExecPrepare3dmExport(nExportGeomId) Then Return False
Else
nExportGeomId = Map.refTopPanelVM.SelPart.nPartId
End If
Return MainController.ExportGeomId(nExportGeomId, sFilePath, False)
End Function
Public Overrides Function ExecScript(sFilePath As String) As Boolean
Dim bOk As Boolean = False
If String.IsNullOrEmpty(sFilePath) Then
Dim sDir As String = String.Empty
'GetMainPrivateProfileString(S_GENERAL, K_LASTLUADIR, "", sDir)
MainController.Exec(sDir)
bOk = MainController.Exec(sDir)
Else
MainController.Exec(sFilePath, False)
bOk = MainController.Exec(sFilePath, False)
End If
Dim bMachiningMode As Boolean = EgtGetCurrMachGroup() <> GDB_ID.NULL
If Not bMachiningMode And EgtGetCurrLayer() = GDB_ID.NULL Then
@@ -656,7 +750,8 @@ Public Class MySceneHostVM
EgtResetCurrPartLayer()
End If
End If
End Sub
Return bOk
End Function
#End Region ' ProjectManager
@@ -950,33 +1045,15 @@ Public Class MySceneHostVM
Map.refDispositionPanelVM.OnKeyDown(e.KeyData)
Case ModifyModes.REFERENCE
Case ModifyModes.STARTMACH
Map.refStartMachPanelVM.OnKeyDown(e.KeyData)
Case ModifyModes.RIBS
Map.refRibPanelVM.OnKeyDown(e.KeyData)
Case ModifyModes.SHELLNUMBER
Map.refShellNumberPanelVM.OnKeyDown(e.KeyData)
Case ModifyModes.AUXSOLIDS
Map.refFilledSolidPanelVM.OnKeyDown(e.KeyData)
End Select
End If
'' Se in modalità edit L250
'If Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refFreeContourManagerVM.bIsActive Then
' ' Con DEL eseguo cancellazione delle entità selezionate
' If e.KeyData = System.Windows.Forms.Keys.Delete Then
' MainController.SetLastInteger(GDB_ID.SEL)
' MainController.ExecuteCommand(Controller.CMD.DELETE)
' ' Con SPAZIO ripeto l'ultimo comando
' ElseIf e.KeyData = System.Windows.Forms.Keys.Space Then
' MainController.RepeatLastCommand()
' ' Con 'A' e in modalità continuazione, forzo il passaggio ad arco
' ElseIf e.KeyData = System.Windows.Forms.Keys.A And MainController.GetContinue() Then
' MainController.ContinueArcPDP()
' ' Con 'L' e in modalità continuazione, forzo il passaggio a retta
' ElseIf e.KeyData = System.Windows.Forms.Keys.L And MainController.GetContinue() Then
' MainController.ContinueLine2P()
' ' Con 'V' cambio lo stato del check
' ElseIf e.KeyData = System.Windows.Forms.Keys.V Then
' Map.refFreeContourInputVM.ChangeInputBoxCheck()
' End If
'End If
End Sub
Private Sub OnCloseGetDist(sender As System.Object)
@@ -1002,6 +1079,7 @@ Public Class MySceneHostVM
Map.refTopPanelVM.PartList.Clear()
Map.refTopPanelVM.SetSelModifyMode(ModifyModes.NULL)
Map.refSliceManagerVM.UpdateTimeAndMass()
Map.refSliceManagerVM.UpdateDimensions()
Map.refSliderManagerVM.RefreshSlider(0, 0)
Map.refSliderManagerVM.SetLayerIndexToMax()
@@ -1108,6 +1186,7 @@ Public Class MySceneHostVM
' aggiorno tempo e massa
Map.refSliceManagerVM.UpdateTimeAndMass()
Map.refSliceManagerVM.UpdateDimensions()
Map.refSliderManagerVM.SetLayerIndexToMax()
@@ -1146,6 +1225,15 @@ Public Class MySceneHostVM
End If
End Sub
Private Sub OnInsertingProject(sender As Object, nType As Integer, ByRef nFlag As Integer)
If nType = FT.OBJ Or nType = FT.IGES Or nType = FT.STEP_ Or nType = FT.ACIS Or
nType = FT.PARASOLID Or nType = FT.JT Or nType = FT.VRML Or nType = FT.C3D Then
nFlag = GetMainPrivateProfileInt(S_IMPORT, K_ADVFLAG, 0)
Else
nFlag = 0
End If
End Sub
Private Sub OnInsertedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean)
' Segnalo eventuale errore
If Not bOk Then
@@ -1158,37 +1246,6 @@ Public Class MySceneHostVM
MainScene.SetStatusNull()
End Sub
Private Sub OnImportingProject(sender As Object, nType As Integer, ByRef nFlag As Integer)
If nType <> FT.NULL Then
If nType = FT.CNC Then
nFlag = GetMainPrivateProfileInt(S_IMPORT, K_CNCFLAG, EIC_FL.NONE)
Else
nFlag = 0
End If
' Abilito progress e bottone stop
Map.refMyStatusBarVM.StartLoading("", True)
Else
MessageBox.Show(Application.Current.MainWindow, EgtMsg(10005), EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' File type unknown - Error
End If
End Sub
Private Sub OnImportedProject(ByVal sender As Object, ByVal sFile As String, ByVal bOk As Boolean)
EgtZoom(ZM.ALL)
' Disabilito progress e bottone stop
Map.refMyStatusBarVM.EndLoading("")
' Salvo path
WriteMainPrivateProfileString(S_GENERAL, K_LASTIMPDIR, Path.GetDirectoryName(sFile))
' Segnalo eventuale errore
If Not bOk Then
Dim sMsg As String = EgtMsg(10006) & " '" & sFile & "'" 'Error importing file
MessageBox.Show(Application.Current.MainWindow, sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
ElseIf Path.GetExtension(sFile) <> ".cnc" Then
' creo oggetto pezzo in lista
'Map.refProjectVM.
End If
MainScene.SetStatusNull()
End Sub
Private Sub PrepareInputBox(ByVal sTitle As String, ByVal sLabel As String, ByVal sCheckLabel As String,
ByVal bShowCombo As Boolean, ByVal bShowBtn As Boolean)
Map.refControllerInputPanelVM.PrepareInputBox(sTitle, sLabel, sCheckLabel, bShowCombo, bShowBtn)
@@ -1451,13 +1508,18 @@ Public Class MySceneHostVM
Friend Sub StartMach_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
' Se eseguito drag
If Not m_bDragToStart Then
' se in scelta piano da oggetto resetto eventuale selezione
If Map.refRibPanelVM.bCPlaneObj_IsActive Then
EgtDeselectAll()
End If
' Se selezione da eseguire
ElseIf m_nIdToSel <> GDB_ID.NULL Then
If Map.refStartMachPanelVM.bCPlaneObj_IsActive Then
' eseguo comando
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
Map.refStartMachPanelVM.ResetCPlaneObjIsActive()
' imposto dimensioni griglia standard (non tavola)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
' ripristino selezioni precedenti
For Each Id In Map.refStartMachPanelVM.PrevSelObjs
EgtSelectObj(Id)
@@ -1532,13 +1594,18 @@ Public Class MySceneHostVM
Friend Sub Rib_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
' Se eseguito drag
If Not m_bDragToStart Then
' se in scelta piano da oggetto resetto eventuale selezione
If Map.refRibPanelVM.bCPlaneObj_IsActive Then
EgtDeselectAll()
End If
' Se selezione da eseguire
ElseIf m_nIdToSel <> GDB_ID.NULL Then
If Map.refRibPanelVM.bCPlaneObj_IsActive Then
' eseguo comando
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
Map.refRibPanelVM.ResetCPlaneObjIsActive()
' imposto dimensioni griglia standard (non tavola)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
' ripristino selezioni precedenti
For Each Id In Map.refRibPanelVM.PrevSelObjs
EgtSelectObj(Id)
@@ -1614,13 +1681,18 @@ Public Class MySceneHostVM
Friend Sub ShellNumber_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
' Se eseguito drag
If Not m_bDragToStart Then
' se in scelta piano da oggetto resetto eventuale selezione
If Map.refRibPanelVM.bCPlaneObj_IsActive Then
EgtDeselectAll()
End If
' Se selezione da eseguire
ElseIf m_nIdToSel <> GDB_ID.NULL Then
If Map.refShellNumberPanelVM.bCPlaneObj_IsActive Then
' eseguo comando
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
Map.refShellNumberPanelVM.ResetCPlaneObjIsActive()
' imposto dimensioni griglia standard (non tavola)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
' ripristino selezioni precedenti
For Each Id In Map.refShellNumberPanelVM.PrevSelObjs
EgtSelectObj(Id)
@@ -1696,13 +1768,18 @@ Public Class MySceneHostVM
Friend Sub FilledSolid_OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
' Se eseguito drag
If Not m_bDragToStart Then
' se in scelta piano da oggetto resetto eventuale selezione
If Map.refRibPanelVM.bCPlaneObj_IsActive Then
EgtDeselectAll()
End If
' Se selezione da eseguire
ElseIf m_nIdToSel <> GDB_ID.NULL Then
If Map.refFilledSolidPanelVM.bCPlaneObj_IsActive Then
' eseguo comando
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_OBJ)
Map.refFilledSolidPanelVM.ResetCPlaneObjIsActive()
' imposto dimensioni griglia standard (non tavola)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
' ripristino selezioni precedenti
For Each Id In Map.refFilledSolidPanelVM.PrevSelObjs
EgtSelectObj(Id)
+4 -2
View File
@@ -13,10 +13,12 @@
Background="Transparent"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtMainWindow}}">
<EgtWPFLib5:EgtMainWindow.TitlePanel>
<PrintApp:ProjManagerV DataContext="{StaticResource ProjManagerVM}"/>
</EgtWPFLib5:EgtMainWindow.TitlePanel>
<EgtWPFLib5:EgtMainWindow.OpacityMask>
<SolidColorBrush Color="White" Opacity="{Binding Window_Opacity}"/>
</EgtWPFLib5:EgtMainWindow.OpacityMask>
<!--Pannello principale -->
<DockPanel>
+14 -1
View File
@@ -9,6 +9,13 @@ Public Class SecondaryWindowVM
Private m_SplashScreen_Timer As New DispatcherTimer
Private m_WaitAfterRender As Integer = 0
Private m_Window_Opacity As Double = 0.2
Public ReadOnly Property Window_Opacity As Double
Get
Return m_Window_Opacity
End Get
End Property
' Titolo
Public ReadOnly Property sTitle As String
Get
@@ -106,8 +113,11 @@ Public Class SecondaryWindowVM
Private Sub SplashScreenTimer_Tick()
If m_WaitAfterRender > 1 Then
m_Window_Opacity = 1
NotifyPropertyChanged(NameOf(Window_Opacity))
' chiudo SplashScreen
Map.refSplashScreen.Close()
m_SplashScreen_Timer.Stop()
ElseIf m_WaitAfterRender > 0 Then
m_WaitAfterRender += 1
End If
@@ -120,7 +130,10 @@ Public Class SecondaryWindowVM
Dim sFile As String = Environment.GetCommandLineArgs(1)
Dim sExt As String = IO.Path.GetExtension(sFile).ToLower()
If String.IsNullOrWhiteSpace(sFile) OrElse String.IsNullOrWhiteSpace(sExt) Then Return False
Return OpenStdFile(sFile)
Dim bOk As Boolean = OpenStdFile(sFile)
m_Window_Opacity = 1
NotifyPropertyChanged(NameOf(Window_Opacity))
Return bOk
End Function
Friend Function OpenStdFile(sFile As String) As Boolean
+104 -136
View File
@@ -40,6 +40,10 @@ Public Class ShellNumberPanelVM
Return m_SelShellNumber
End Get
Set(value As ShellNumberEntity)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse Map.refShellNumberPanelVM.bCPlaneObj_IsActive Then
NotifyPropertyChanged(NameOf(SelShellNumber))
Return
End If
m_SelShellNumber = value
EgtDeselectAll()
If Not IsNothing(value) Then
@@ -218,7 +222,7 @@ Public Class ShellNumberPanelVM
Return m_bAdd_IsChecked
End Get
Set(value As Boolean)
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bAdd_IsChecked = value
If value Then
m_bEdit_IsChecked = False
@@ -240,7 +244,7 @@ Public Class ShellNumberPanelVM
Return m_bEdit_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bEdit_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -264,7 +268,7 @@ Public Class ShellNumberPanelVM
Return m_bGrid_IsChecked
End Get
Set(value As Boolean)
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bGrid_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -292,7 +296,7 @@ Public Class ShellNumberPanelVM
Return m_bMove_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bMove_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -316,7 +320,7 @@ Public Class ShellNumberPanelVM
Return m_bRotate_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelShellNumber) AndAlso Not m_bMachParam_IsChecked AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bRotate_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -340,7 +344,7 @@ Public Class ShellNumberPanelVM
Return m_bMachParam_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelShellNumber) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not IsNothing(Map.refTopPanelVM.SelMachining) AndAlso value Then
If Not IsNothing(m_SelShellNumber) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive AndAlso Not IsNothing(Map.refTopPanelVM.SelMachining) AndAlso value Then
m_bMachParam_IsChecked = True
m_bAdd_IsChecked = False
m_bEdit_IsChecked = False
@@ -354,6 +358,8 @@ Public Class ShellNumberPanelVM
NotifyPropertyChanged(NameOf(bRotate_IsChecked))
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.SHELLNUMBERPARAM)
NotifyPropertyChanged(NameOf(ShellNumberList_IsEnabled))
' disattivo interfaccia
ManageInterface(False)
Else
NotifyPropertyChanged(NameOf(m_bMachParam_IsChecked))
End If
@@ -363,6 +369,8 @@ Public Class ShellNumberPanelVM
m_bMachParam_IsChecked = False
NotifyPropertyChanged(NameOf(bMachParam_IsChecked))
NotifyPropertyChanged(NameOf(ShellNumberList_IsEnabled))
' riattivo interfaccia
ManageInterface(True)
End Sub
Public ReadOnly Property Compo_Visibility As Visibility
@@ -371,11 +379,17 @@ Public Class ShellNumberPanelVM
End Get
End Property
Private m_ShellNumberList_IsEnabled As Boolean = False
Public ReadOnly Property ShellNumberList_IsEnabled As Boolean
Get
Return Not m_bMachParam_IsChecked
Return If(m_ShellNumberList.Count > 0, m_ShellNumberList_IsEnabled, False)
End Get
End Property
Friend Sub SetShellNumberListIsEnabled(bValue As Boolean)
m_ShellNumberList_IsEnabled = bValue
NotifyPropertyChanged(NameOf(ShellNumberList_IsEnabled))
End Sub
' riferimento griglia all'ingresso in questa pagina
Private m_OriginalGridFrame As New Frame3d
@@ -393,6 +407,8 @@ Public Class ShellNumberPanelVM
End Get
End Property
Private m_bEscOnLine2P As Boolean = False
#Region "Tooltip"
Public ReadOnly Property Import_ToolTip As String
@@ -522,7 +538,6 @@ Public Class ShellNumberPanelVM
Private m_cmdCPlaneObj As ICommand
Private m_cmdDragMove As ICommand
Private m_cmdDragRotate As ICommand
Private m_cmdMachParam As ICommand
#End Region ' FIELDS & PROPERTIES
@@ -577,12 +592,15 @@ Public Class ShellNumberPanelVM
SelShellNumber = m_ShellNumberList(0)
NotifyPropertyChanged(NameOf(SelShellNumber))
End If
' abilito lista shell number
SetShellNumberListIsEnabled(True)
Map.refSceneHostVM.MainScene.SetStatusNull()
End Sub
Friend Sub Dispose()
' ripristino frame originale
EgtSetGridFrame(m_OriginalGridFrame)
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
' se in modifica parametri
If m_bMachParam_IsChecked Then
' ripristino modalita' standard
@@ -612,8 +630,13 @@ Public Class ShellNumberPanelVM
EgtSelectObj(m_SelShellNumber.nCurveId)
Case ShellNumberSelectionTypes.EXTRUSION
' creo layer per estrusione
Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION)
If nNewExtrusionLayerId = GDB_ID.NULL Then
nNewExtrusionLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
Else
EgtEmptyGroup(nNewExtrusionLayerId)
End If
EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
EgtSelectObj(m_SelShellNumber.nCurveId)
Case ShellNumberSelectionTypes.BOTH
@@ -621,6 +644,8 @@ Public Class ShellNumberPanelVM
EgtSelectObj(m_SelShellNumber.nExtrusionId)
End Select
EgtDraw()
' disattivo il resto dell'interfaccia
ManageInterface(False)
Return True
End Function
@@ -630,6 +655,7 @@ Public Class ShellNumberPanelVM
End Sub
Friend Sub OnExecCmdEnd(command As Controller.CMD)
m_bEscOnLine2P = False
Select Case command
Case Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE
' leggo altezza estrusione
@@ -669,6 +695,10 @@ Public Class ShellNumberPanelVM
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End Select
' se non ho creato percorso riabilito interfaccia
If Not m_bIsCreatingPath Then
ManageInterface(True)
End If
If command <> Controller.CMD.LINE2P AndAlso command <> Controller.CMD.EXTRUDE Then Return
' se finita creazione estrusione
If m_bIsCreatingExtrusion Then
@@ -711,6 +741,7 @@ Public Class ShellNumberPanelVM
If NewGeomType = GDB_TY.CRV_COMPO Then
If Not EgtCurveIsClosed(nNewEntityId) Then
EgtCloseCurveCompo(nNewEntityId)
m_bEscOnLine2P = True
End If
EgtSetName(nNewEntityId, RIB_CURVE)
' resetto colore entita'
@@ -723,9 +754,15 @@ Public Class ShellNumberPanelVM
' lo seleziono
SelShellNumber = NewEntity
NotifyPropertyChanged(NameOf(SelShellNumber))
' creo layer per estrusione
Dim nNewExtrusionLayerId As Integer = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
' verifico se esiste gia' layer estrusione e lo svuoto
Dim nNewExtrusionLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWEXTRUSION)
If nNewExtrusionLayerId <> GDB_ID.NULL Then
EgtEmptyGroup(nNewExtrusionLayerId)
Else
' altrimenti lo creo
nNewExtrusionLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewExtrusionLayerId, LAY_NEWEXTRUSION)
End If
EgtSetCurrPartLayer(m_nPartId, nNewExtrusionLayerId)
' seleziono percorso da estrudere
EgtDeselectAll()
@@ -757,6 +794,13 @@ Public Class ShellNumberPanelVM
' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull()
End If
' se esc su creazione percorso, lo annullo, altrimenti riabilito interfaccia
If m_bEscOnLine2P Then
m_bEscOnLine2P = False
Else
If m_bIsCreatingExtrusion Then m_bIsCreatingExtrusion = False
ManageInterface(True)
End If
End If
End Sub
@@ -792,6 +836,19 @@ Public Class ShellNumberPanelVM
Return nShellNumberIndex + 1
End Function
Friend Sub ManageInterface(bValue As Boolean)
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
Map.refProjManagerVM.SetProjCmdIsEnabled(bValue)
Map.refTopPanelVM.SetTopPanelIsEnabled(bValue)
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerIndexIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(bValue)
Map.refSliceManagerVM.SetButtonsIsEnabled(bValue)
Map.refInstrumentPanelVM.SetInstrumentPanelIsEnabled(bValue)
SetShellNumberListIsEnabled(bValue)
End Sub
#End Region ' METHODS
#Region "COMMANDS"
@@ -814,8 +871,10 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Import(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Map.refSceneHostVM.InsertShellNumber()
ManageInterface(True)
End Sub
#End Region ' Import
@@ -838,7 +897,8 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Line2P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Dim nNewShellNumberLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWRIB)
If nNewShellNumberLayerId = GDB_ID.NULL Then nNewShellNumberLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewShellNumberLayerId, LAY_NEWRIB)
@@ -863,7 +923,7 @@ Public Class ShellNumberPanelVM
End Property
Public Sub Delete()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If IsNothing(SelShellNumber) Then Return
Dim bOk As Boolean = False
Select Case m_SelShellNumber.Type
@@ -887,6 +947,7 @@ Public Class ShellNumberPanelVM
End If
NotifyPropertyChanged(NameOf(SelShellNumber))
End If
SetShellNumberListIsEnabled(True)
End Sub
#End Region ' Delete
@@ -909,7 +970,7 @@ Public Class ShellNumberPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub ModifyCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(ShellNumberSelectionTypes.CURVE)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MODIFYCURVE)
End Sub
@@ -934,7 +995,7 @@ Public Class ShellNumberPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub AddPointCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(ShellNumberSelectionTypes.CURVE)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOARC)
@@ -963,7 +1024,7 @@ Public Class ShellNumberPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub RemovePointCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(ShellNumberSelectionTypes.CURVE)
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOLINE)
@@ -992,7 +1053,7 @@ Public Class ShellNumberPanelVM
''' Execute the Extrude. This method is invoked by the ExtrudeCommand.
''' </summary>
Public Sub Extrude(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(ShellNumberSelectionTypes.EXTRUSION)
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.EXTRUDE) Then
m_bIsCreatingExtrusion = True
@@ -1020,7 +1081,8 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub CPlaneTop(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1045,7 +1107,8 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneFront. This method is invoked by the CPlaneFrontCommand.
''' </summary>
Public Sub CPlaneFront(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1070,7 +1133,8 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneRight. This method is invoked by the CPlaneRightCommand.
''' </summary>
Public Sub CPlaneRight(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1095,7 +1159,8 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneBack. This method is invoked by the CPlaneBackCommand.
''' </summary>
Public Sub CPlaneBack(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1120,7 +1185,8 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneLeft. This method is invoked by the CPlaneLeftCommand.
''' </summary>
Public Sub CPlaneLeft(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1145,7 +1211,8 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneBottom. This method is invoked by the CPlaneBottomCommand.
''' </summary>
Public Sub CPlaneBottom(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -1170,7 +1237,9 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneElevation. This method is invoked by the CPlaneElevationCommand.
''' </summary>
Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub
@@ -1194,88 +1263,14 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneOrigin. This method is invoked by the CPlaneOriginCommand.
''' </summary>
Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub
#End Region ' CPlaneOrigin
#Region "CPlaneRotate"
''' <summary>
''' Returns a command that do CPlaneRotate.
''' </summary>
Public ReadOnly Property CPlaneRotate_Command As ICommand
Get
If m_cmdCPlaneRotate Is Nothing Then
m_cmdCPlaneRotate = New Command(AddressOf CPlaneRotate)
End If
Return m_cmdCPlaneRotate
End Get
End Property
''' <summary>
''' Execute the CPlaneRotate. This method is invoked by the CPlaneRotateCommand.
''' </summary>
Public Sub CPlaneRotate(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE)
Else
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ROTATE3D)
End If
End Sub
#End Region ' CPlaneRotate
#Region "CPlane3P"
''' <summary>
''' Returns a command that do CPlane3P.
''' </summary>
Public ReadOnly Property CPlane3P_Command As ICommand
Get
If m_cmdCPlane3P Is Nothing Then
m_cmdCPlane3P = New Command(AddressOf CPlane3P)
End If
Return m_cmdCPlane3P
End Get
End Property
''' <summary>
''' Execute the CPlane3P. This method is invoked by the CPlane3PCommand.
''' </summary>
Public Sub CPlane3P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_3P)
End Sub
#End Region ' CPlane3P
#Region "CPlanePerpObj"
''' <summary>
''' Returns a command that do CPlanePerpObj.
''' </summary>
Public ReadOnly Property CPlanePerpObj_Command As ICommand
Get
If m_cmdCPlanePerpObj Is Nothing Then
m_cmdCPlanePerpObj = New Command(AddressOf CPlanePerpObj)
End If
Return m_cmdCPlanePerpObj
End Get
End Property
''' <summary>
''' Execute the CPlanePerpObj. This method is invoked by the CPlanePerpObjCommand.
''' </summary>
Public Sub CPlanePerpObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_PERPCURVE)
End Sub
#End Region ' CPlanePerpObj
#Region "CPlaneObj"
Private m_bCPlaneObj_IsActive As Boolean = False
@@ -1310,7 +1305,8 @@ Public Class ShellNumberPanelVM
''' Execute the CPlaneObj. This method is invoked by the CPlaneObjCommand.
''' </summary>
Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
@@ -1320,7 +1316,7 @@ Public Class ShellNumberPanelVM
End While
EgtDeselectAll()
m_bCPlaneObj_IsActive = True
' Map.refControllerInputPanelVM.PrepareInputBox("Grid from Selection", "Select the face of the object where to place the grid", "", False, False)
Map.refControllerInputPanelVM.ShowMessage("Grid from Selection", "Select the face of the object where to place the grid")
End Sub
#End Region ' CPlaneObj
@@ -1337,7 +1333,7 @@ Public Class ShellNumberPanelVM
End Property
Public Sub DragMove()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(ShellNumberSelectionTypes.BOTH)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MOVE)
End Sub
@@ -1356,41 +1352,13 @@ Public Class ShellNumberPanelVM
End Property
Public Sub DragRotate()
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand(ShellNumberSelectionTypes.BOTH)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.ROTATE)
End Sub
#End Region ' DragRotate
#Region "MachParam"
Public ReadOnly Property MachParam_Command As ICommand
Get
If m_cmdMachParam Is Nothing Then
m_cmdMachParam = New Command(AddressOf MachParam)
End If
Return m_cmdMachParam
End Get
End Property
Public Sub MachParam()
If IsNothing(Map.refTopPanelVM.SelMachining) Then Return
m_bAdd_IsChecked = False
m_bEdit_IsChecked = False
m_bGrid_IsChecked = False
m_bMove_IsChecked = False
m_bRotate_IsChecked = False
NotifyPropertyChanged(NameOf(bAdd_IsChecked))
NotifyPropertyChanged(NameOf(bEdit_IsChecked))
NotifyPropertyChanged(NameOf(bGrid_IsChecked))
NotifyPropertyChanged(NameOf(bMove_IsChecked))
NotifyPropertyChanged(NameOf(bRotate_IsChecked))
Map.refRightPanelVM.SetSelPanel(RightPanelVM.Panels.SHELLNUMBERPARAM)
End Sub
#End Region ' MachParam
#End Region ' COMMANDS
End Class
@@ -41,10 +41,10 @@ Public Class ShellNumberParamPanelVM
m_Type = Cathegories.SHELL_NUMBER
m_sName = "Reduce Shell Number"
m_MachiningParamList = New List(Of MachiningParam)({New ShellNumberNumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nShellNumberId, nPartId),
New ShellNumberNumericMachiningParam(MachiningParam.Params.SHELLNBRCOASTING, nShellNumberId, nPartId),
New ShellNumberNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPE, nShellNumberId, nPartId),
New ShellNumberNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nShellNumberId, nPartId)})
m_MachiningParamList = New List(Of MachiningParam)({New ShellNumberNumericMachiningParam(MachiningParam.Params.SHELLNBRDIFFERENCE, nShellNumberId, nPartId, Me),
New ShellNumberNumericMachiningParam(MachiningParam.Params.SHELLNBRCOASTING, nShellNumberId, nPartId, Me),
New ShellNumberNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPE, nShellNumberId, nPartId, Me),
New ShellNumberNumericMachiningParam(MachiningParam.Params.SHELLNBRWIPEDIR, nShellNumberId, nPartId, Me)})
NotifyPropertyChanged(NameOf(MachiningParamList))
NotifyPropertyChanged(NameOf(sName))
End Sub
@@ -164,8 +164,8 @@ Public Class ShellNumberNumericMachiningParam
' Definizione comandi
Private m_cmdResetParam As ICommand
Sub New(Type As Params, nShellNumberId As Integer, nPartId As Integer)
MyBase.New(Type)
Sub New(Type As Params, nShellNumberId As Integer, nPartId As Integer, Cathegory As MachiningCathegory)
MyBase.New(Type, Cathegory)
Dim bReadFromPart As Boolean = False
Select Case Type
Case Params.SHELLNBRDIFFERENCE
+21 -1
View File
@@ -23,6 +23,16 @@ Public Class MySimulation
#End Region ' FIELDS & PROPERTIES
#Region "Messages"
Public ReadOnly Property VMillAdditiveMsg As String
Get
Return "Virtual Additive"
End Get
End Property
#End Region ' Messages
#Region "CONSTRUCTOR"
Sub New()
@@ -57,12 +67,13 @@ Public Class MySimulation
SetShowPlay(True)
NotifyPropertyChanged("PlayPauseImage")
End If
' Se movimento non riuscito
' Se movimento non riuscito
Else
SetSimulationStatus(MCH_SIM_ST.UI_STOP)
' Aggiornamenti per bottone Play/Pause
SetShowPlay(True)
NotifyPropertyChanged("PlayPauseImage")
' Eventuale messaggio
Select Case nMove
Case MCH_SIM.END_
StatusMsg = EgtMsg(MSG_SIMULATIONPAGEUC + 1) 'Simulazione completata
@@ -104,6 +115,15 @@ Public Class MySimulation
MachineAxisList(Index).IsReadOnlyAxesValue = True
Next
End If
EgtSimSetUiStatus(GetStatus())
End Sub
Public Overrides Sub VMillActiveInfoTitle(VMillActive As Boolean)
If VMillActive Then
EgtSetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM, VMillActive)
Else
EgtRemoveInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM)
End If
End Sub
#End Region ' METHODS
+175 -133
View File
@@ -2,146 +2,188 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Width="310"
xmlns:PrintApp="clr-namespace:Icarus"
VerticalAlignment="Center">
<Grid.Resources>
<SolidColorBrush x:Key="SliderThumb.Track.Background" Color="{StaticResource Icarus_Blue_Color}"/>
<SolidColorBrush x:Key="SliderThumb.Track.Border" Color="{StaticResource Icarus_Blue_Color}"/>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Border Margin="0,0,0,2.5"
Style="{StaticResource Title_Border}">
<TextBlock Text="SIMULATION"
Style="{StaticResource Title_TextBlock}"/>
</Border>
<Border Grid.Row="1"
Margin="0,2.5,0,0"
Style="{StaticResource BottomGrayRow_Border}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<PrintApp:MachineViewPanelV DataContext="{StaticResource MachineViewPanelVM}"
Margin="0,0,5,0"/>
<Grid Grid.Column="1"
Width="310">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Border Margin="0,0,0,2.5"
Style="{StaticResource Title_Border}">
<TextBlock Text="SIMULATION"
Style="{StaticResource Title_TextBlock}"/>
</Border>
<Border Grid.Row="1"
Margin="0,2.5,0,0"
Style="{StaticResource BottomGrayRow_Border}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel DataContext="{Binding MySimul}"
Margin="2.5">
<UniformGrid Columns="3"
Margin="0,2.5,0,2.5">
<Button Grid.Column="0"
Grid.Row="3"
Command="{Binding StepCommand}"
ToolTip="{Binding OneStepToolTip}"
Margin="2.5,0,2.5,0"
Style="{StaticResource SimulationPanel_Button}">
<Image Source="/Resources/SimulationPanel/PlayStep.png"
Style="{StaticResource SimulationButton_Image}"/>
</Button>
<Button Grid.Column="1"
Grid.Row="3"
Command="{Binding PlayPauseCommand}"
ToolTip="{Binding PlayPauseToolTip}"
Margin="2.5,0,2.5,0"
Style="{StaticResource SimulationPanel_Button}">
<Image Source="{Binding PlayPauseImage}"
Style="{StaticResource SimulationButton_Image}"/>
</Button>
<Button Grid.Column="2" Grid.Row="3"
Command="{Binding StopCommand}"
ToolTip="{Binding StopHomeToolTip}"
Margin="2.5,0,2.5,0"
Style="{StaticResource SimulationPanel_Button}">
<Image Source="/Resources/SimulationPanel/Stop.png"
Style="{StaticResource SimulationButton_Image}"/>
</Button>
<StackPanel DataContext="{Binding MySimul}"
Margin="2.5">
<UniformGrid Columns="3"
Margin="0,2.5,0,2.5">
<Button Grid.Column="0"
Grid.Row="3"
Command="{Binding StepCommand}"
ToolTip="{Binding OneStepToolTip}"
Margin="2.5,0,2.5,0"
Style="{StaticResource SimulationPanel_Button}">
<Image Source="/Resources/SimulationPanel/PlayStep.png"
Style="{StaticResource SimulationButton_Image}"/>
</Button>
<Button Grid.Column="1"
Grid.Row="3"
Command="{Binding PlayPauseCommand}"
ToolTip="{Binding PlayPauseToolTip}"
Margin="2.5,0,2.5,0"
Style="{StaticResource SimulationPanel_Button}">
<Image Source="{Binding PlayPauseImage}"
Style="{StaticResource SimulationButton_Image}"/>
</Button>
<Button Grid.Column="2" Grid.Row="3"
Command="{Binding StopCommand}"
ToolTip="{Binding StopHomeToolTip}"
Margin="2.5,0,2.5,0"
Style="{StaticResource SimulationPanel_Button}">
<Image Source="/Resources/SimulationPanel/Stop.png"
Style="{StaticResource SimulationButton_Image}"/>
</Button>
</UniformGrid>
<TextBlock Text="{Binding StatusMsg}"
TextAlignment="Center"
Margin="2.5"
Style="{StaticResource Simulation_TextBlock}"/>
<Slider Name="SpeedSlider"
Foreground="{StaticResource Icarus_Gray}"
Value="{Binding SliderValue}"
Minimum="1"
Maximum="100"
TickPlacement="TopLeft"
TickFrequency="5"
Margin="2.5"
Style="{StaticResource LayerIndex_Slider}"/>
<Grid Margin="2.5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Border Style="{StaticResource SimulPanel_KeyValue_Border}">
<TextBlock Text="{Binding TName}"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource Simulation_TextBlock}"/>
</Border>
<Border Grid.Column="1"
Style="{StaticResource SimulPanel_KeyValue_Border}">
<TextBlock Text="{Binding SValue}"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource Simulation_TextBlock}"/>
</Border>
<Border Grid.Row="1"
Style="{StaticResource SimulPanel_KeyValue_Border}">
<TextBlock Text="{Binding GCode}"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource Simulation_TextBlock}"/>
</Border>
<Border Grid.Column="1"
Grid.Row="1"
Style="{StaticResource SimulPanel_KeyValue_Border}">
<TextBlock Text="{Binding FValue}"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource Simulation_TextBlock}"/>
</Border>
</Grid>
<ItemsControl ItemsSource="{Binding MachineAxisList}"
</UniformGrid>
<Grid DataContext="{Binding DataContext, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:SimulationPanelV}}}"
IsEnabled="{Binding MySimul.VMill_IsEnabled}"
Margin="2.5"
HorizontalAlignment="Center"
Visibility="{Binding MySimul.VMill_Visibility}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<CheckBox IsChecked="{Binding MySimul.VMillActive}"
VerticalAlignment="Center"
Margin="2.5"/>
<TextBlock Grid.Column="1"
Text="{Binding MySimul.VMillAdditiveMsg}"
Margin="2.5"
BorderThickness="0"
Padding="0">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Style="{StaticResource SimulPanel_KeyValue_Border}"
Margin="0,1,0,1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Token}"
Style="{StaticResource Simulation_TextBlock}"/>
<EgtWPFLib5:EgtTextBox Grid.Column="1"
BorderThickness="0"
Text="{Binding Value, UpdateSourceTrigger=Explicit}"
IsReadOnly="{Binding IsReadOnlyAxesValue}"
IsEnabled="{Binding IsEnabledAxesValue}"
Style="{StaticResource SimulationPanel_Axes_TextBox}">
</EgtWPFLib5:EgtTextBox>
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
<Button Grid.Row="3"
Command="{Binding Ok_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Ok.png"
Style="{StaticResource Button_Image}"/>
</Button>
</Grid>
</Border>
Style="{StaticResource Simulation_TextBlock}"/>
</Grid>
<Grid DataContext="{Binding DataContext, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:SimulationPanelV}}}"
IsEnabled="{Binding MySimul.Trace_IsEnabled}"
Margin="2.5"
HorizontalAlignment="Center"
Visibility="{Binding MySimul.Trace_Visibility}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<CheckBox IsChecked="{Binding MySimul.TraceActive}"
VerticalAlignment="Center"
Margin="2.5"/>
<TextBlock Grid.Column="1"
Text="{Binding MySimul.TraceMsg}"
Margin="2.5"
Style="{StaticResource Simulation_TextBlock}"/>
</Grid>
<TextBlock Text="{Binding StatusMsg}"
TextAlignment="Center"
Margin="2.5"
Style="{StaticResource Simulation_TextBlock}"/>
<Slider Name="SpeedSlider"
Foreground="{StaticResource Icarus_Gray}"
Value="{Binding SliderValue}"
Minimum="1"
Maximum="100"
TickPlacement="TopLeft"
TickFrequency="5"
Margin="2.5"
Style="{StaticResource LayerIndex_Slider}"/>
<Grid Margin="2.5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Border Style="{StaticResource SimulPanel_KeyValue_Border}">
<TextBlock Text="{Binding TName}"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource Simulation_TextBlock}"/>
</Border>
<Border Grid.Column="1"
Style="{StaticResource SimulPanel_KeyValue_Border}">
<TextBlock Text="{Binding SValue}"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource Simulation_TextBlock}"/>
</Border>
<Border Grid.Row="1"
Style="{StaticResource SimulPanel_KeyValue_Border}">
<TextBlock Text="{Binding GCode}"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource Simulation_TextBlock}"/>
</Border>
<Border Grid.Column="1"
Grid.Row="1"
Style="{StaticResource SimulPanel_KeyValue_Border}">
<TextBlock Text="{Binding FValue}"
Margin="2.5,2.5,2.5,2.5"
Style="{StaticResource Simulation_TextBlock}"/>
</Border>
</Grid>
<ItemsControl ItemsSource="{Binding MachineAxisList}"
Margin="2.5"
BorderThickness="0"
Padding="0">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Style="{StaticResource SimulPanel_KeyValue_Border}"
Margin="0,1,0,1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Token}"
Style="{StaticResource Simulation_TextBlock}"/>
<EgtWPFLib5:EgtTextBox2 Grid.Column="1"
BorderThickness="0"
Text="{Binding Value, UpdateSourceTrigger=Explicit}"
IsReadOnly="{Binding IsReadOnlyAxesValue}"
IsEnabled="{Binding IsEnabledAxesValue}"
Style="{StaticResource SimulationPanel_Axes_TextBox}">
</EgtWPFLib5:EgtTextBox2>
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
<Button Grid.Row="3"
Command="{Binding Ok_Command}"
Style="{StaticResource RightPanel_HalfRound_Button}">
<Image Source="\Resources\Common\Ok.png"
Style="{StaticResource Button_Image}"/>
</Button>
</Grid>
</Border>
</Grid>
</Grid>
+41 -5
View File
@@ -20,6 +20,15 @@ Public Class SimulationPanelVM
End Set
End Property
#Region "Messages"
Public ReadOnly Property VirtualAdditive_Msg As String
Get
Return "Virtual Additive"
End Get
End Property
#End Region
' Definizione comandi
Private m_cmdOk As ICommand
@@ -52,6 +61,10 @@ Public Class SimulationPanelVM
' Creo riferimento a questa classe in OmagOFFICEMap
Map.SetRefSimulationPanelVM(Me)
MySimul = New MySimulation
' leggo vista macchina da ini e la imposto
Dim DefaultMachViewMode As Integer = GetMainPrivateProfileInt(S_SIMUL, K_MACHVIEWMODE, 3)
MySimul.SetMachLook(DefaultMachViewMode)
Map.refMachineViewPanelVM.RefreshSelViewSlider()
End Sub
#End Region ' CONSTRUCTOR
@@ -76,7 +89,6 @@ Public Class SimulationPanelVM
'Cambio la vista della scena
EgtGetGenericView(m_dPrevAngVertDegView, m_dPrevAngHorizDegView)
EgtSetView(VT.ISO_SW, False)
MySimul.SetMachLook(MCH_LOOK.ALL)
EgtSetMachineLook(MySimul.GetMachLook())
' Nascondo griglia
EgtSetGridShow(False, False)
@@ -98,6 +110,32 @@ Public Class SimulationPanelVM
MySimul.SliderValue = SliderVal
MySimul.ShowCncData()
MySimul.StatusMsg = EgtMsg(MSG_SIMULATIONPAGEUC + 14) ' Home
' Gestione check VMill
If GetMainPrivateProfileInt(S_SIMUL, K_VIRTUALADDITIVE, 0) > 0 AndAlso
EgtUILib.GetPrivateProfileInt( S_VMILL, K_VM_ENABLE, 0, CurrentMachine.sMachIniFile) > 0 Then
MySimul.VMill_Visibility = Visibility.Visible
MySimul.VMill_IsEnabled = True
Dim bVal As Boolean
MySimul.SetVMillActive( EgtGetInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM, bVal) AndAlso bVal)
Else
' Disabilito Vmill, ma inibisco dichiarazione progetto modificato
MySimul.VMill_Visibility = Visibility.Collapsed
MySimul.VMill_IsEnabled = False
MySimul.VMillActive = False
EgtDisableModified()
EgtRemoveInfo(EgtGetCurrMachGroup(), KEY_MCHGRP_VM)
EgtEnableModified()
End If
' Gestione check Trace
If GetMainPrivateProfileInt(S_SIMUL, K_TRACEENABLE, 0) > 0 And
EgtUILib.GetPrivateProfileInt(S_TOOLTRACE, K_TT_ENABLE, 0, CurrentMachine.sMachIniFile) > 0 Then
MySimul.Trace_Visibility = Visibility.Visible
MySimul.Trace_IsEnabled = True
If MySimul.TraceActive Then MySimul.TraceActive = True
Else
MySimul.Trace_Visibility = Visibility.Collapsed
MySimul.Trace_IsEnabled = False
End If
' nascondo slider strati e layer da visualizzare
Map.refSliderManagerVM.SetSliderVisibility(False)
Map.refViewLayerManagerVM.SetViewLayerManagerVisibility(False)
@@ -111,6 +149,7 @@ Public Class SimulationPanelVM
Map.refSliderManagerVM.SetLayerIndexIsEnabled(False)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(False)
Map.refInstrumentPanelVM.SetEdgeAnalysisIsEnabled(False)
EgtDraw()
End Sub
Private Function LoadCurrTools() As Boolean
@@ -138,15 +177,12 @@ Public Class SimulationPanelVM
Map.refMyStatusBarVM.ClearOutputMessage()
' Mi assicuro di terminare la simulazione
MySimul.ResetSimulation()
' Ripristino visibilità standard
MySimul.SetMachLook(MCH_LOOK.TAB)
EgtSetMachineLook(MySimul.GetMachLook())
'' Nascondo tutte le lavorazioni
'CamAuto.HideAllMachinings()
' Abilito impostazione modificato
EgtEnableModified()
' Ripristino vista griglia
EgtSetGridShow(True, True)
EgtSetGridShow(OptionModule.m_bGridVisibility, OptionModule.m_bGridVisibility)
' Cambio la vista della scena
EgtSetGenericView(m_dPrevAngVertDegView, m_dPrevAngHorizDegView, False)
EgtZoom(ZM.ALL)
+59 -17
View File
@@ -15,21 +15,63 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding ghTime}"
Visibility="{Binding Time_Visibility}"
FontSize="35"
Style="{StaticResource SliceManager_TextBlock}"/>
<TextBlock Grid.Row="1"
Text="{Binding ghDimensions}"
FontSize="18"
Margin="0,0,0,5"
Style="{StaticResource SliceManager_TextBlock}"/>
<TextBlock Grid.Row="2"
Text="{Binding ghMass}"
Visibility="{Binding Mass_Visibility}"
FontSize="18"
Margin="0,0,0,5"
Style="{StaticResource SliceManager_TextBlock}"/>
<Grid HorizontalAlignment="Center"
Visibility="{Binding Time_Visibility}"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="\Resources\SliceManager\Time.png"
Height="25"
Width="25"
Margin="0,0,2.5,0"
Style="{StaticResource Button_Image}"/>
<TextBlock Grid.Column="1"
Text="{Binding ghTime}"
FontSize="35"
Style="{StaticResource SliceManager_TextBlock}"/>
</Grid>
<Grid Grid.Row="1"
HorizontalAlignment="Center"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="\Resources\SliceManager\Dimensions.png"
Visibility="{Binding ghDimensions, Converter={StaticResource StringToVisibilityConverter}}"
Height="25"
Width="25"
Margin="0,0,2.5,0"
Style="{StaticResource Button_Image}"/>
<TextBlock Grid.Column="1"
Text="{Binding ghDimensions}"
FontSize="18"
HorizontalAlignment="Left"
Margin="2.5,0,0,0"
Style="{StaticResource SliceManager_TextBlock}"/>
</Grid>
<Grid Grid.Row="2"
HorizontalAlignment="Center"
Visibility="{Binding Mass_Visibility}"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Image Source="\Resources\SliceManager\Mass.png"
Height="25"
Width="25"
Margin="0,0,2.5,0"
Style="{StaticResource Button_Image}"/>
<TextBlock Grid.Column="1"
Text="{Binding ghMass}"
FontSize="18"
HorizontalAlignment="Left"
Margin="2.5,0,0,0"
Style="{StaticResource SliceManager_TextBlock}"/>
</Grid>
<TextBlock Grid.Row="3"
Text="{Binding sLoadingText}"
Visibility="{Binding Loading_Visibility}"
@@ -76,12 +118,12 @@
Visibility="{Binding ModifyMode_Visibility}"
Margin="2.5,0,2.5,0"
Style="{StaticResource SliceMannager_Button}"/>
<Button Content="Update"
<!--<Button Content="Update"
Command="{Binding Update_Command}"
IsEnabled="{Binding Buttons_IsEnabled}"
Visibility="{Binding SliceMode_Visibility}"
Margin="2.5,0,2.5,0"
Style="{StaticResource SliceMannager_Button}"/>
Style="{StaticResource SliceMannager_Button}"/>-->
<Button Content="Generate"
Command="{Binding Generate_Command}"
IsEnabled="{Binding Buttons_IsEnabled}"
+191 -19
View File
@@ -2,6 +2,8 @@
Imports EgtUILib
Imports Microsoft.Win32
Imports System.IO
Imports Ionic.Zip
Imports Newtonsoft.Json
Public Class SliceManagerVM
Inherits VMBase
@@ -36,9 +38,19 @@ Public Class SliceManagerVM
Private m_bStopScriptToManage As Boolean = False
Private m_bSlice As Boolean = False
Friend ReadOnly Property bSlice As Boolean
Get
Return m_bSlice
End Get
End Property
Private m_bCalcTFS As Boolean = False
Private m_bGenerate As Boolean = False
Private m_bCalcSolid As Boolean = False
Friend ReadOnly Property bCalcSolid As Boolean
Get
Return m_bCalcSolid
End Get
End Property
Friend Sub SetCalcSolid(value As Boolean)
m_bCalcSolid = value
End Sub
@@ -118,7 +130,7 @@ Public Class SliceManagerVM
Public ReadOnly Property ghTime As String
Get
Dim dtTime As TimeSpan = TimeSpan.FromSeconds(m_dTime)
Return Math.Floor(dtTime.TotalHours) & ":" & (Math.Floor(dtTime.Minutes)).ToString("00") & ":" & (Math.Ceiling(dtTime.Seconds)).ToString("00")
Return Math.Floor(dtTime.TotalHours) & "h " & (Math.Floor(dtTime.Minutes)).ToString("00") & "m" '& (Math.Ceiling(dtTime.Seconds)).ToString("00")
End Get
End Property
@@ -133,7 +145,7 @@ Public Class SliceManagerVM
Get
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
Dim b3Print As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
Return "[ " & DoubleToString(b3Print.DimX, 1) & " x " & DoubleToString(b3Print.DimY, 1) & " x " & DoubleToString(b3Print.DimZ, 1) & " ]"
Return DoubleToString(b3Print.DimX, 1) & " x " & DoubleToString(b3Print.DimY, 1) & " x " & DoubleToString(b3Print.DimZ, 1) & " mm"
End If
Return ""
End Get
@@ -194,8 +206,6 @@ Public Class SliceManagerVM
Sub New()
' Creo riferimento a questa classe in EgtCAM5Map
Map.SetRefSliceManagerVM(Me)
' Installo funzione gestione eventi per lua
EgtSetProcessEvents(m_ProcEventsCallback)
UpdateState(False)
End Sub
@@ -230,7 +240,7 @@ Public Class SliceManagerVM
NotifyPropertyChanged(NameOf(Mass_Visibility))
End Sub
Private Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
Friend Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
' Se previsto, imposto progress
If nProg >= 0 Then
Dim dPartialProgress As Integer = 0
@@ -433,9 +443,6 @@ Public Class SliceManagerVM
Map.refSliderManagerVM.SetLayerIndexIsEnabled(True)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(True)
SetButtonsIsEnabled(True)
m_bSlice = False
m_bCalcTFS = False
m_bGenerate = False
Return bOk
End Function
@@ -449,6 +456,7 @@ Public Class SliceManagerVM
' Definisco e posiziono il grezzo sulla tavola
EgtAddMachGroup("3dPrint")
EgtSetTable("Tab")
EgtSetTableAreaOffset( 500, 500, 500, 500)
For Each CurrPart In Map.refTopPanelVM.PartList
Dim b3Part As New BBox3d
Dim b3PrintSolid As New BBox3d
@@ -526,6 +534,8 @@ Public Class SliceManagerVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Slice()
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse Map.refStartMachPanelVM.bCPlaneObj_IsActive OrElse Map.refRibPanelVM.bCPlaneObj_IsActive OrElse
Map.refShellNumberPanelVM.bCPlaneObj_IsActive OrElse Map.refFilledSolidPanelVM.bCPlaneObj_IsActive Then Return
If m_bCalculating Then Return
m_bCalculating = True
If IsNothing(Map.refTopPanelVM.SelPart) Then
@@ -543,8 +553,12 @@ Public Class SliceManagerVM
m_bCalculating = False
Return
End If
'' esco da altre pagine
'Dim PreviousPage As Pages = Map.refTopPanelVM.SelPage
Dim b3Print As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
If Not String.IsNullOrWhiteSpace(CurrentMachine.sMachDataIniFile) AndAlso Not CurrentMachine.b3ExtrusionArea.EnclosesXY(b3Print) Then
MessageBox.Show("Part outside the extrusion area!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
m_bCalculating = False
Return
End If
' eseguo calcoli
CalcSlice(False)
' se non ho interrotto calcoli
@@ -554,11 +568,16 @@ Public Class SliceManagerVM
Map.refSliderManagerVM.SetLayerIndexToMax()
NotifyPropertyChanged(NameOf(Time_Visibility))
NotifyPropertyChanged(NameOf(Mass_Visibility))
'Else
' Map.refTopPanelVM.SelPage = PreviousPage
' se ricalcolato slice attivo vista SliceToolpath e modo TillSelected
If m_bSlice Then
Map.refSliderManagerVM.SetSelViewSlider(SliderManagerVM.ViewSliderType.UNTIL_SELECTED)
End If
Else
m_bStopScriptToManage = False
End If
m_bSlice = False
m_bCalcTFS = False
m_bGenerate = False
m_bCalculating = False
End Sub
@@ -689,17 +708,34 @@ Public Class SliceManagerVM
End If
End If
' eseguo calcoli
CalcSlice(True, True)
Dim bOk As Boolean = CalcSlice(True, True)
' se non ho interrotto calcoli
If Not m_bStopScriptToManage Then
If bShiftPressed Then
' Se esiste ne lancio l'editing
If File.Exists(sIsoFilePath) Then
If bOk AndAlso Not m_bStopScriptToManage Then
' Se esiste l'iso
If File.Exists(sIsoFilePath) Then
If bShiftPressed Then
' Se esiste ne lancio l'editing
Process.Start("Notepad.exe", sIsoFilePath)
' altrimenti lo segnalo
Else
MessageBox.Show("Edit failed, missing part program file" & " (" & sIsoFilePath & ")")
End If
' verifico se creare pacchetto
If Map.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.MACHINE_EXPORT) AndAlso
GetMainPrivateProfileInt(S_GENERAL, K_MACHINEEXPORT, 1) > 0 Then
If Not CreateProjectForMachine(sIsoFilePath) Then
MessageBox.Show("Icrx file generation failed!!", "Error!", MessageBoxButton.OK, MessageBoxImage.Error)
End If
' riabilito ProjManager, TopPanel e uscita dal programma
Map.refProjManagerVM.SetProjCmdIsEnabled(True)
Map.refTopPanelVM.SetTopPanelIsEnabled(True)
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(True)
Map.refTFSEditorVM.SetTFSEditorIsEnabled(True)
Map.refSliderManagerVM.SetLayerIndexIsEnabled(True)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(True)
SetButtonsIsEnabled(True)
End If
Else
' altrimenti lo segnalo
MessageBox.Show("Part program generation failed!!", "Error", MessageBoxButton.OK, MessageBoxImage.Error)
End If
NotifyPropertyChanged(NameOf(Time_Visibility))
NotifyPropertyChanged(NameOf(Mass_Visibility))
@@ -709,6 +745,142 @@ Public Class SliceManagerVM
m_bCalculating = False
End Sub
Private Function CreateProjectForMachine(sIsoFilePath As String) As Boolean
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
Map.refProjManagerVM.SetProjCmdIsEnabled(False)
Map.refTopPanelVM.SetTopPanelIsEnabled(False)
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(False)
Map.refTFSEditorVM.SetTFSEditorIsEnabled(False)
Map.refSliderManagerVM.SetLayerIndexIsEnabled(False)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(False)
SetButtonsIsEnabled(False)
' creo cartella file da esportare in Temp
Dim sExportTempFolderPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\MachineExport"
If Directory.Exists(sExportTempFolderPath) Then
Try
Directory.Delete(sExportTempFolderPath, True)
Catch ex As Exception
EgtOutLog("Error! Impossible deleting folder " & sExportTempFolderPath & "!")
Return False
End Try
End If
Try
Directory.CreateDirectory(sExportTempFolderPath)
Catch ex As Exception
EgtOutLog("Error! Impossible creating folder " & sExportTempFolderPath & "!")
Return False
End Try
' mostro solido per eportazione
Dim SolidCheck As ViewLayer = Map.refViewLayerManagerVM.LayerList.FirstOrDefault(Function(x) x.Type = ViewLayer.ViewLayerType.SOLID_SLICE)
Dim CurrSolidCheckValue As Boolean? = SolidCheck.bIsVisible
If IsNothing(SolidCheck.bIsVisible) OrElse Not SolidCheck.bIsVisible Then
SolidCheck.bIsVisible = True
End If
' esporto file progetto
Dim sFileExtension As String
If True Then
sFileExtension = ".3dm"
Else
sFileExtension = ".3mf"
End If
Dim s3dFilePath As String = ""
If Not Map.refSceneHostVM.ExportProjectForMachine(sExportTempFolderPath, True, s3dFilePath) Then
EgtOutLog("Error! Impossible exporting 3mf file!")
Return False
End If
'' esporto file 3mf
'Dim s3mfPath As String = sExportTempFolderPath & "\ProjectSlice.3mf"
'If Not Map.refSceneHostVM.ExportProjectForMachine(s3mfPath) Then
' EgtOutLog("Error! Impossible exporting 3mf file!")
' Return False
'End If
' creo file json
Dim sProjName As String = ""
EgtGetCurrFilePath(sProjName)
Dim sJsonPath As String = sExportTempFolderPath & "\ProjectSlice.json"
CreateJson(sJsonPath)
' creo immagine preview
Dim sPreviewImagePath As String = sExportTempFolderPath & "\ProjectSlice.png"
CreatePreviewImage(sPreviewImagePath)
' nascondo solido
If IsNothing(CurrSolidCheckValue) OrElse Not CurrSolidCheckValue Then
SolidCheck.bIsVisible = CurrSolidCheckValue
End If
' creo path dello zip
Dim sZipPath As String = Path.ChangeExtension(sProjName, ".icrx")
' se esiste gia' lo cancello
If File.Exists(sZipPath) Then
Try
File.Delete(sZipPath)
Catch ex As Exception
EgtOutLog("Error! Impossible deleting old icrx file!")
Return False
End Try
End If
Try
Using zip As New Ionic.Zip.ZipFile(sZipPath, Console.Out)
zip.AlternateEncodingUsage = ZipOption.Always
zip.AlternateEncoding = Text.Encoding.UTF8
zip.CompressionMethod = CompressionMethod.None
' aggiungo file Iso
zip.AddItem(sIsoFilePath, "").FileName = "ProjectSlice" & Path.GetExtension(sIsoFilePath)
' aggiungo file 3mf
zip.AddItem(s3dFilePath, "")
' aggiungo json
zip.AddItem(sJsonPath, "")
' aggiungo immagine preview
zip.AddItem(sPreviewImagePath, "")
' salvo lo zip
zip.Save()
End Using
Catch ex As Exception
EgtOutLog("Error! Icrx file generation failed!!")
Return False
End Try
' elimino tutti i file temporanei creati
If Directory.Exists(sExportTempFolderPath) Then
Directory.Delete(sExportTempFolderPath, True)
End If
Return True
End Function
Private Function CreateJson(sJsonPath As String) As Boolean
' creo json
Dim JsonMain As New JsonMain(m_dTime, m_dMass)
Dim json As String = JsonConvert.SerializeObject(JsonMain, Formatting.Indented)
If File.Exists(sJsonPath) Then
Try
File.Delete(sJsonPath)
Catch ex As Exception
EgtOutLog("Error! Impossible deleting file " & sJsonPath & "!")
Return False
End Try
End If
Try
File.AppendAllText(sJsonPath, json)
Catch ex As Exception
EgtOutLog("Error! Impossible writing json file " & sJsonPath & "!")
Return False
End Try
Return True
End Function
Private Function CreatePreviewImage(sPreviewImagePath As String) As Boolean
' recupero posizione vista corrente
Dim nCurrAngVertDeg As Integer = 0
Dim nCurrAngHorizDeg As Integer = 0
EgtGetGenericView(nCurrAngVertDeg, nCurrAngHorizDeg)
EgtSetView(VT.ISO_SW, False)
SetTableVisibility(False)
EgtZoom(ZM.ALL, False)
'EgtExportSvg(GDB_ID.ROOT, sPreviewImagePath)
EgtGetImage(SM.SHADING, New Color3d(255, 255, 255, 255), New Color3d(255, 255, 255, 255), 3000, 3000, sPreviewImagePath)
EgtSetGenericView(nCurrAngVertDeg, nCurrAngHorizDeg, False)
SetTableVisibility(True)
EgtZoom(ZM.ALL, True)
Return True
End Function
#End Region ' Generate
#Region "Simulate"
+50 -47
View File
@@ -20,23 +20,22 @@ Public Class SliderManagerVM
End Get
Set(value As Integer)
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
Dim DisableMgr As New DisableModifiedMgr
Select Case m_nSelViewSlider
Case ViewSliderType.ONLY_SELECTED
' se diverso da nullo nascondo precedente
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
' riporto vecchio strato a visualizzazione di tutti i solidi
If m_nLayerIndex > 0 Then dLayerAdvancement = 100
If m_nLayerIndex = 0 Then
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
EgtSetStatus(Layer.nLayerId, GDB_ST.OFF)
Next
ElseIf m_nLayerIndex > 0 Then
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.OFF)
End If
' nascondo precedente
' riporto vecchio strato a visualizzazione di tutti i solidi
If m_nLayerIndex > 0 Then dLayerAdvancement = 100
If m_nLayerIndex = 0 Then
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
EgtSetStatus(Layer.nLayerId, GDB_ST.OFF)
Next
ElseIf m_nLayerIndex > 0 Then
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.OFF)
End If
m_nLayerIndex = value
' se diverso da nullo visualizzo corrente
If Not IsNothing(Map.refTopPanelVM.SelPart) AndAlso m_nLayerIndex > 0 Then EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.ON_)
If m_nLayerIndex > 0 Then EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(m_nLayerIndex - 1).nLayerId, GDB_ST.ON_)
' porto barra nuovo strato a 100
If m_nLayerIndex > 0 Then SetLayerAdvancement(100)
Case ViewSliderType.UNTIL_SELECTED
@@ -64,6 +63,7 @@ Public Class SliderManagerVM
End If
m_nLayerIndex = value
End Select
DisableMgr.ReEnable()
NotifyPropertyChanged(NameOf(ghShowValue))
NotifyPropertyChanged(NameOf(ghValueIndex))
NotifyPropertyChanged(NameOf(ghValueHeight))
@@ -71,47 +71,44 @@ Public Class SliderManagerVM
End Set
End Property
Private Sub SetLayerIndex(value As Integer)
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
Dim DisableMgr As New DisableModifiedMgr
Select Case m_nSelViewSlider
Case ViewSliderType.ONLY_SELECTED
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
' riporto vecchio strato a visualizzazione di tutti i solidi
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
If nLayerInd = value - 1 Then
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
Else
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
End If
Next
End If
' riporto vecchio strato a visualizzazione di tutti i solidi
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
If nLayerInd = value - 1 Then
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
Else
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
End If
Next
m_nLayerIndex = value
Case ViewSliderType.UNTIL_SELECTED
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
' riporto vecchio strato a visualizzazione di tutti i solidi
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
If nLayerInd <= value - 1 Then
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
Else
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
End If
Next
End If
' riporto vecchio strato a visualizzazione di tutti i solidi
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
If nLayerInd <= value - 1 Then
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
Else
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
End If
Next
m_nLayerIndex = value
Case ViewSliderType.FROM_SELECTED
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
' riporto vecchio strato a visualizzazione di tutti i solidi
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
If nLayerInd >= value - 1 Then
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
Else
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
End If
Next
End If
' riporto vecchio strato a visualizzazione di tutti i solidi
If m_nLayerIndex > 0 AndAlso m_nLayerIndex < Map.refTopPanelVM.SelPart.LayerList.Count Then dLayerAdvancement = 100
For nLayerInd = 0 To Map.refTopPanelVM.SelPart.LayerList.Count - 1
If nLayerInd >= value - 1 Then
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.ON_)
Else
EgtSetStatus(Map.refTopPanelVM.SelPart.LayerList(nLayerInd).nLayerId, GDB_ST.OFF)
End If
Next
m_nLayerIndex = value
End Select
DisableMgr.ReEnable()
NotifyPropertyChanged(NameOf(nLayerIndex))
NotifyPropertyChanged(NameOf(ghShowValue))
NotifyPropertyChanged(NameOf(ghValueIndex))
@@ -201,6 +198,8 @@ Public Class SliderManagerVM
Return m_dLayerAdvancement
End Get
Set(value As Double)
If IsNothing(Map.refTopPanelVM.SelPart) Then Return
Dim DisableMgr As New DisableModifiedMgr
Select Case m_nSelViewSlider
Case ViewSliderType.ONLY_SELECTED
Dim nTotSolid As Integer = 0
@@ -247,6 +246,7 @@ Public Class SliderManagerVM
End If
m_dLayerAdvancement = value
End Select
DisableMgr.ReEnable()
EgtDraw()
End Set
End Property
@@ -335,6 +335,7 @@ Public Class SliderManagerVM
WriteMainPrivateProfileString(S_PRINTING3D, K_VIEWSLIDER, m_nSelViewSlider)
' ciclo tutti i layer per nasconderli/mostrarli
If IsNothing(Map.refTopPanelVM.SelPart) OrElse IsNothing(Map.refTopPanelVM.SelPart.LayerList) Then Return
Dim DisableMgr As New DisableModifiedMgr
Select Case m_nSelViewSlider
Case ViewSliderType.ONLY_SELECTED
For Each Layer In Map.refTopPanelVM.SelPart.LayerList
@@ -361,6 +362,7 @@ Public Class SliderManagerVM
End If
Next
End Select
DisableMgr.ReEnable()
' mostro/nascondo slider orizzontale
m_LayerAdvancement_Visibility = If(m_nSelViewSlider = ViewSliderType.ONLY_SELECTED, Visibility.Visible, Visibility.Hidden)
NotifyPropertyChanged(NameOf(LayerAdvancement_Visibility))
@@ -368,7 +370,7 @@ Public Class SliderManagerVM
End Set
End Property
Friend Sub SetSelViewSlider(value As ViewSliderType)
m_nSelViewSlider = value
ghSelViewSlider = value - 1
NotifyPropertyChanged(NameOf(ghSelViewSlider))
End Sub
@@ -381,7 +383,8 @@ Public Class SliderManagerVM
Map.SetRefSliderManagerVM(Me)
' leggo valore default ViewSlider
Dim nViewSlider As Integer = GetMainPrivateProfileInt(S_PRINTING3D, K_VIEWSLIDER, 1)
SetSelViewSlider(nViewSlider)
m_nSelViewSlider = nViewSlider
NotifyPropertyChanged(NameOf(ghSelViewSlider))
End Sub
#End Region ' CONSTRUCTOR
+10 -23
View File
@@ -10,32 +10,19 @@
Height="600"
Width="1000">
<Grid>
<Image Source="/Resources/SplashScreen/GoldSplashscreen.png"
<Image Source="/Resources/SplashScreen/BlueSplashscreen.png"
Stretch="UniformToFill"/>
<TextBlock Text="ICARUS"
Foreground="#b9984c"
FontSize="47"
FontFamily="/Resources/Fonts/#Roboto"
FontWeight="Light"
Margin="463,125,0,0"/>
<TextBlock x:Name="VersionTxBl"
FontSize="14"
FontFamily="/Resources/Fonts/#Roboto"
Margin="500,175,0,0"/>
<Grid Height="180"
Width="92"
VerticalAlignment="Bottom"
Margin="620,0,0,0">
<Image Source="/Resources/SplashScreen/LogoEgalware.png"
Height="180"
Width="92"
Stretch="UniformToFill"/>
<TextBlock Text="2022-2023"
FontSize="12"
FontFamily="/Resources/Fonts/#Roboto"
HorizontalAlignment="Center"
Margin="0,140,0,0"/>
</Grid>
Foreground="White"
HorizontalAlignment="Center"
Margin="591,140,0,0"/>
<!--<TextBlock Text="2022-2023"
FontSize="6"
FontFamily="/Resources/Fonts/#Roboto"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Margin="0,0,254,60"/>-->
</Grid>
</Window>
@@ -28,6 +28,7 @@
ItemsSource="{Binding StartList}"
SelectedItem="{Binding SelStart}"
DisplayMemberPath="ghName"
IsEnabled="{Binding StartList_IsEnabled}"
Style="{StaticResource LeftPanel_ComboBox}"/>
<!-- Add Button -->
<ToggleButton x:Name="AddBtn"
+102 -47
View File
@@ -35,6 +35,10 @@ Public Class StartMachPanelVM
Return m_SelStart
End Get
Set(value As StartEntity)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse Map.refStartMachPanelVM.bCPlaneObj_IsActive Then
NotifyPropertyChanged(NameOf(SelStart))
Return
End If
m_SelStart = value
EgtDeselectAll()
If Not IsNothing(value) Then
@@ -199,7 +203,7 @@ Public Class StartMachPanelVM
Return m_bAdd_IsChecked
End Get
Set(value As Boolean)
If Map.refSceneHostVM.MainController.GetStep = 0 Then
If Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bAdd_IsChecked = value
If value Then
m_bEdit_IsChecked = False
@@ -221,7 +225,7 @@ Public Class StartMachPanelVM
Return m_bEdit_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelStart) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelStart) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bEdit_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -243,7 +247,7 @@ Public Class StartMachPanelVM
Return m_bGrid_IsChecked
End Get
Set(value As Boolean)
If Map.refSceneHostVM.MainController.GetStep = 0 Then
If Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bGrid_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -271,7 +275,7 @@ Public Class StartMachPanelVM
Return m_bMove_IsChecked
End Get
Set(value As Boolean)
If Not IsNothing(m_SelStart) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 Then
If Not IsNothing(m_SelStart) AndAlso Map.refSceneHostVM.MainController.GetStep = 0 AndAlso Not m_bCPlaneObj_IsActive Then
m_bMove_IsChecked = value
If value Then
m_bAdd_IsChecked = False
@@ -293,6 +297,18 @@ Public Class StartMachPanelVM
End Get
End Property
Private m_StartList_IsEnabled As Boolean = False
Public ReadOnly Property StartList_IsEnabled As Boolean
Get
Return If(m_StartList.Count > 0, m_StartList_IsEnabled, False)
End Get
End Property
Friend Sub SetStartListIsEnabled(bValue As Boolean)
m_StartList_IsEnabled = bValue
NotifyPropertyChanged(NameOf(StartList_IsEnabled))
End Sub
' riferimento griglia all'ingresso in questa pagina
Private m_OriginalGridFrame As New Frame3d
@@ -304,6 +320,8 @@ Public Class StartMachPanelVM
End Get
End Property
Private m_bEscOnLine2P As Boolean = False
#Region "Tooltip"
Public ReadOnly Property Point_ToolTip As String
@@ -458,12 +476,15 @@ Public Class StartMachPanelVM
SelStart = m_StartList(0)
NotifyPropertyChanged(NameOf(SelStart))
End If
' abilito lista start mach
SetStartListIsEnabled(True)
Map.refSceneHostVM.MainScene.SetStatusNull()
End Sub
Friend Sub Dispose()
' ripristino frame originale
EgtSetGridFrame(m_OriginalGridFrame)
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
EgtDeselectAll()
EgtDraw()
Map.refSceneHostVM.MainScene.SetStatusNull()
@@ -481,16 +502,33 @@ Public Class StartMachPanelVM
' seleziono percorso corrente
EgtDeselectAll()
EgtSelectObj(m_SelStart.nId)
EgtDraw()
' disattivo il resto dell'interfaccia
ManageInterface(False)
Return True
End Function
Friend Sub UpdateUI()
' se attiva operazione in piu' passaggi, esco
If Map.refSceneHostVM.MainController.GetContinue() Then Return
Dim NewEntity As StartEntity = Nothing
' se finita creazione curva (è stata chiusa)
End Sub
Friend Sub OnExecCmdEnd(command As Controller.CMD)
m_bEscOnLine2P = False
Select Case command
Case Controller.CMD.LINE2P, Controller.CMD.DELETE, Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE,
Controller.CMD.MOVE, Controller.CMD.ROTATE
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull()
End Select
' riabilito interfaccia
ManageInterface(True)
' se finita creazione curva
If bIsCreatingPath Then
m_bIsCreatingPath = False
Dim NewEntity As StartEntity = Nothing
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWSTART)
Dim nNewEntityId As Integer = EgtGetFirstInGroup(nNewStartLayerId)
Dim NewGeomType As GDB_TY = EgtGetType(nNewEntityId)
@@ -503,37 +541,22 @@ Public Class StartMachPanelVM
NewEntityType = StartMachTypes.COMPO
End Select
EgtSetName(nNewEntityId, START_GEOM)
' coloro l'entita' di rosso
Dim c3Red As Color3d
c3Red.FromColor(System.Drawing.Color.Red)
EgtSetColor(nNewEntityId, c3Red)
' resetto colore entita'
EgtResetColor(nNewEntityId)
' lo sposto nel layer degli start
EgtRelocateGlob(nNewEntityId, m_nStartMachLayerId, GDB_POS.LAST_SON)
' lo aggiungo alla lista
NewEntity = New StartEntity(nNewEntityId, NewEntityType)
m_StartList.Add(NewEntity)
' cancello layer di disegno
EgtErase(nNewStartLayerId)
' lo seleziono
SelStart = NewEntity
NotifyPropertyChanged(NameOf(SelStart))
End If
' cancello layer di disegno
EgtErase(nNewStartLayerId)
End If
' aggiorno posizione
RefreshPos()
' se aggiunta entita'
If Not IsNothing(NewEntity) Then
SelStart = NewEntity
NotifyPropertyChanged(NameOf(SelStart))
End If
' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull()
End Sub
Friend Sub OnExecCmdEnd(command As Controller.CMD)
Select Case command
Case Controller.CMD.LINE2P, Controller.CMD.DELETE, Controller.CMD.MODIFYCURVE, Controller.CMD.ADDPOINTCURVE, Controller.CMD.REMOVEPOINTCURVE,
Controller.CMD.MOVE, Controller.CMD.ROTATE
' Imposto flag di ricalcolo slice
EgtSetInfo(Map.refTopPanelVM.SelPart.nPartId, MAC_TORECALC_SLICE, True)
End Select
End Sub
Friend Sub OnKeyDown(Key As Forms.Keys)
@@ -550,6 +573,12 @@ Public Class StartMachPanelVM
' rimetto la selezione scena a null
Map.refSceneHostVM.MainScene.SetStatusNull()
End If
' se esc su creazione percorso, lo annullo, altrimenti riabilito interfaccia
If m_bEscOnLine2P Then
m_bEscOnLine2P = False
Else
ManageInterface(True)
End If
End If
End Sub
@@ -565,6 +594,18 @@ Public Class StartMachPanelVM
End If
End Sub
Friend Sub ManageInterface(bValue As Boolean)
' disabilito ProjManager, TopPanel, TFS, Slider, bottoni e uscita dal programma
Map.refProjManagerVM.SetProjCmdIsEnabled(bValue)
Map.refTopPanelVM.SetTopPanelIsEnabled(bValue)
Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerIndexIsEnabled(bValue)
Map.refSliderManagerVM.SetLayerAdvancementIsEnabled(bValue)
Map.refSliceManagerVM.SetButtonsIsEnabled(bValue)
Map.refInstrumentPanelVM.SetInstrumentPanelIsEnabled(bValue)
SetStartListIsEnabled(bValue)
End Sub
#End Region ' METHODS
#Region "COMMANDS"
@@ -587,14 +628,14 @@ Public Class StartMachPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Point(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup( m_nPartId, LAY_NEWSTART)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWSTART)
If nNewStartLayerId = GDB_ID.NULL Then
nNewStartLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewStartLayerId, LAY_NEWSTART)
End If
EgtSetCurrPartLayer(m_nPartId, nNewStartLayerId)
'InitCommand(True)
If Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.POINT) Then
m_bIsCreatingPath = True
End If
@@ -620,8 +661,9 @@ Public Class StartMachPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Line2P(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup( m_nPartId, LAY_NEWSTART)
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
Dim nNewStartLayerId As Integer = EgtGetFirstNameInGroup(m_nPartId, LAY_NEWSTART)
If nNewStartLayerId = GDB_ID.NULL Then
nNewStartLayerId = EgtCreateGroup(m_nPartId)
EgtSetName(nNewStartLayerId, LAY_NEWSTART)
@@ -653,7 +695,7 @@ Public Class StartMachPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub ModifyCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand()
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MODIFYCURVE)
End Sub
@@ -678,7 +720,7 @@ Public Class StartMachPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub AddPointCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand()
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOARC)
@@ -707,7 +749,7 @@ Public Class StartMachPanelVM
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
''' </summary>
Public Sub RemovePointCurve(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
InitCommand()
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.CURVETOLINE)
@@ -737,7 +779,8 @@ Public Class StartMachPanelVM
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub CPlaneTop(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeoAdv( -1, -1, -1, 0, CurrentMachine.b3Tab.DimX(), 0, CurrentMachine.b3Tab.DimY())
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.TOP)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -762,7 +805,8 @@ Public Class StartMachPanelVM
''' Execute the CPlaneFront. This method is invoked by the CPlaneFrontCommand.
''' </summary>
Public Sub CPlaneFront(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.FRONT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -787,7 +831,8 @@ Public Class StartMachPanelVM
''' Execute the CPlaneRight. This method is invoked by the CPlaneRightCommand.
''' </summary>
Public Sub CPlaneRight(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.RIGHT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -812,7 +857,8 @@ Public Class StartMachPanelVM
''' Execute the CPlaneBack. This method is invoked by the CPlaneBackCommand.
''' </summary>
Public Sub CPlaneBack(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BACK)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -837,7 +883,8 @@ Public Class StartMachPanelVM
''' Execute the CPlaneLeft. This method is invoked by the CPlaneLeftCommand.
''' </summary>
Public Sub CPlaneLeft(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.LEFT)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -862,7 +909,8 @@ Public Class StartMachPanelVM
''' Execute the CPlaneBottom. This method is invoked by the CPlaneBottomCommand.
''' </summary>
Public Sub CPlaneBottom(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.SetLastInteger(Controller.GRID_TYPE.BOTTOM)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID)
End Sub
@@ -887,7 +935,9 @@ Public Class StartMachPanelVM
''' Execute the CPlaneElevation. This method is invoked by the CPlaneElevationCommand.
''' </summary>
Public Sub CPlaneElevation(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ELEVATION)
End Sub
@@ -911,7 +961,9 @@ Public Class StartMachPanelVM
''' Execute the CPlaneOrigin. This method is invoked by the CPlaneOriginCommand.
''' </summary>
Public Sub CPlaneOrigin(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
EgtSetGridGeo( -1, -1, -1, OptionModule.m_nExtSStep)
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.GRID_ORIGIN)
End Sub
@@ -951,7 +1003,8 @@ Public Class StartMachPanelVM
''' Execute the CPlaneObj. This method is invoked by the CPlaneObjCommand.
''' </summary>
Public Sub CPlaneObj(ByVal param As Object)
If Map.refSceneHostVM.MainController.GetStep <> 0 Then Return
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
ManageInterface(False)
' salvo selezione precedente e deseleziono altri oggetti
m_PrevSelObjs.Clear()
Dim nSelObjId As Integer = EgtGetFirstSelectedObj()
@@ -961,7 +1014,7 @@ Public Class StartMachPanelVM
End While
EgtDeselectAll()
m_bCPlaneObj_IsActive = True
' Map.refControllerInputPanelVM.PrepareInputBox("Grid from Selection", "Select the face of the object where to place the grid", "", False, False)
Map.refControllerInputPanelVM.ShowMessage("Grid from Selection", "Select the face of the object where to place the grid")
End Sub
#End Region ' CPlaneObj
@@ -978,6 +1031,7 @@ Public Class StartMachPanelVM
End Property
Public Sub DragMove()
If Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
InitCommand()
Map.refSceneHostVM.MainController.ExecuteCommand(Controller.CMD.MOVE)
End Sub
@@ -996,7 +1050,7 @@ Public Class StartMachPanelVM
End Property
Public Sub Delete()
If IsNothing(SelStart) Then Return
If IsNothing(SelStart) OrElse Map.refSceneHostVM.MainController.GetStep <> 0 OrElse m_bCPlaneObj_IsActive Then Return
If EgtErase(m_SelStart.nId) Then
Dim nSelStartIndex As Integer = m_StartList.IndexOf(SelStart)
m_StartList.Remove(SelStart)
@@ -1011,6 +1065,7 @@ Public Class StartMachPanelVM
End If
NotifyPropertyChanged(NameOf(SelStart))
End If
SetStartListIsEnabled(True)
End Sub
#End Region ' Delete
+5 -6
View File
@@ -8,7 +8,6 @@ Public Class MyStatusBarVM
Inherits EgtWPFLib5.StatusBarVM
' Funzioni di callback per output in interfaccia da LUA
Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents)
Private m_OutTextCallback As New OutTextCallback(AddressOf OutText)
Private m_bStopProgress As Boolean
@@ -26,11 +25,13 @@ Public Class MyStatusBarVM
Set(value As Boolean)
If Map.refRibPanelVM.bGrid_IsChecked Or Map.refStartMachPanelVM.bGrid_IsChecked Or Map.refShellNumberPanelVM.bGrid_IsChecked Then Return
m_bGridVisibility = value
OptionModule.m_bGridVisibility = m_bGridVisibility
EgtSetGridShow(value, value)
EgtDraw()
Map.refRibPanelVM.NotifyPropertyChanged(NameOf(Map.refRibPanelVM.bGrid_IsEnabled))
Map.refStartMachPanelVM.NotifyPropertyChanged(NameOf(Map.refStartMachPanelVM.bGrid_IsEnabled))
Map.refRibPanelVM.NotifyPropertyChanged(NameOf(Map.refRibPanelVM.bGrid_IsEnabled))
Map.refShellNumberPanelVM.NotifyPropertyChanged(NameOf(Map.refShellNumberPanelVM.bGrid_IsEnabled))
Map.refFilledSolidPanelVM.NotifyPropertyChanged(NameOf(Map.refFilledSolidPanelVM.bGrid_IsEnabled))
End Set
End Property
@@ -115,12 +116,10 @@ Public Class MyStatusBarVM
Sub New()
' Creo riferimento a questa classe in Map
Map.SetRefMyStatusBarVM(Me)
' Installo funzione gestione eventi per lua
EgtSetProcessEvents(m_ProcEventsCallback)
' Installo funzione output testo su status per lua
EgtSetOutText(m_OutTextCallback)
' imposto stato di visualizzazione della griglia
m_bGridVisibility = GetMainPrivateProfileInt(S_GRID, K_SHOWGRID, 1) <> 0
m_bGridVisibility = OptionModule.m_bGridVisibility
NotifyPropertyChanged(NameOf(bGridVisibility))
End Sub
@@ -163,7 +162,7 @@ Public Class MyStatusBarVM
Return True
End Function
Private Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
Friend Function ProcessEvents(ByVal nProg As Integer, ByVal nPause As Integer) As Integer
' Se previsto, imposto progress
If nProg > 0 Then SetLoadingProgress(Math.Min(nProg, 100))
' Costringo ad aggiornare
+1
View File
@@ -42,6 +42,7 @@
IsChecked="{Binding bGridVisibility}"
ImageSource="/Resources/StatusBar/GridVisibility.png"
CheckedImageSource="/Resources/StatusBar/GridVisibilityWhite.png"
ToolTip="Grid Visibility"
Margin="0,2.5,0,0"
Style="{StaticResource StatusBar_ToggleButton}"/>
</Grid>
+13
View File
@@ -0,0 +1,13 @@
<Grid x:Class="ColumnHeader"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Header, RelativeSource={RelativeSource AncestorType={x:Type Grid}}}"
Style="{StaticResource BaseTextBlock}"/>
<TextBlock Grid.Row="1"
Text="{Binding MeasureUnit, RelativeSource={RelativeSource AncestorType={x:Type Grid}}}"
Style="{StaticResource MeasureUnit_TextBlock}"/>
</Grid>
+25
View File
@@ -0,0 +1,25 @@
Public Class ColumnHeader
Public Shared ReadOnly HeaderProperty As DependencyProperty = DependencyProperty.Register("Header", GetType(String), GetType(ColumnHeader), New FrameworkPropertyMetadata(""))
Public Property Header As String
Get
Return CStr(MyBase.GetValue(HeaderProperty))
End Get
Set(value As String)
MyBase.SetValue(HeaderProperty, value)
End Set
End Property
Public Shared ReadOnly MeasureUnitProperty As DependencyProperty = DependencyProperty.Register("MeasureUnit", GetType(String), GetType(ColumnHeader), New FrameworkPropertyMetadata(""))
Public Property MeasureUnit As String
Get
Return CStr(MyBase.GetValue(MeasureUnitProperty))
End Get
Set(value As String)
MyBase.SetValue(MeasureUnitProperty, value)
End Set
End Property
End Class
+162 -42
View File
@@ -29,13 +29,13 @@
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel Grid.ColumnSpan="2"
Orientation="Horizontal"
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center"
Margin="0,2.5,0,2.5">
<TextBlock Text="Modify"
@@ -45,7 +45,7 @@
<ComboBox ItemsSource="{Binding MediaTypeList}"
SelectedIndex="{Binding ghSelMediaType}"
Margin="2.5,0,0,0"
Width="160"
Width="150"
Style="{StaticResource RightPanel_ComboBox}"/>
</StackPanel>
<StackPanel Grid.Row="1"
@@ -77,12 +77,20 @@
Style="{StaticResource RightPanel_Button}"/>
</StackPanel>
<Button Grid.Column="1"
Grid.RowSpan="2"
Content="Update"
Command="{Binding Update_Command}"
Height="45"
Width="45"
Margin="0,2.5,2.5,2.5"
Style="{StaticResource RightPanel_Button}"/>
<Button Grid.Column="2"
Grid.RowSpan="2"
Content="Reset"
Command="{Binding Reset_Command}"
Height="45"
Width="45"
Margin="0,2.5,5,2.5"
Margin="2.5,2.5,5,2.5"
Style="{StaticResource RightPanel_Button}"/>
</Grid>
<ContentControl.Style>
@@ -106,7 +114,7 @@
<ComboBox ItemsSource="{Binding MediaTypeList}"
SelectedIndex="{Binding ghSelMediaType}"
Margin="2.5,0,2.5,0"
Width="160"
Width="150"
Style="{StaticResource RightPanel_ComboBox}"/>
</StackPanel>
<StackPanel Grid.Column="1"
@@ -136,12 +144,22 @@
Margin="2.5,0,0,0"
Style="{StaticResource RightPanel_Button}"/>
</StackPanel>
<Button Grid.Column="1"
Content="Reset"
Command="{Binding Reset_Command}"
HorizontalAlignment="Right"
Margin="0,0,5,0"
Style="{StaticResource RightPanel_Button}"/>
<StackPanel Grid.Column="1"
Orientation="Horizontal"
HorizontalAlignment="Right">
<Button Grid.Column="1"
Content="Update"
Command="{Binding Update_Command}"
HorizontalAlignment="Right"
Margin="0,0,5,0"
Style="{StaticResource RightPanel_Button}"/>
<Button Grid.Column="1"
Content="Reset"
Command="{Binding Reset_Command}"
HorizontalAlignment="Right"
Margin="0,0,5,0"
Style="{StaticResource RightPanel_Button}"/>
</StackPanel>
</Grid>
</ControlTemplate>
</Setter.Value>
@@ -158,69 +176,150 @@
SelectionMode="Extended"
HorizontalGridLinesBrush="White"
VerticalGridLinesBrush="White"
ColumnHeaderHeight="40"
Margin="0,2.5,0,2.5">
<DataGrid.Columns>
<DataGridTextColumn Header="Index"
<DataGridTextColumn Header="Layer"
Binding="{Binding nIndex}"
IsReadOnly="True"
Width="Auto"/>
Width="Auto">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.Layer_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Index_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="Length"
Binding="{Binding sLength}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="2*"
TextBlock.TextAlignment="Center"/>
Width="1.5*"
TextBlock.TextAlignment="Center">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.Length_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Millimeters_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="TMin"
Binding="{Binding sTMin}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="1*"/>
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.TMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Seconds_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="TTrg"
Binding="{Binding sTTrg}"
IsReadOnly="True"
Width="1*"/>
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.TTrg_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Seconds_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="TMax"
Binding="{Binding sTMax}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="1*"/>
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.TMax_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Seconds_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="TCurr"
Binding="{Binding sTCurr}"
IsReadOnly="True"
Width="1*"/>
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.TCurr_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Seconds_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Header="TWait"
Binding="{Binding sTWait}"
Visibility="{Binding DataContext.ColWait_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="1*"/>
<DataGridTextColumn Header="FMin"
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.TWait_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Seconds_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--<DataGridTextColumn Header="FMin"
Binding="{Binding sFMin}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="1*"/>
<DataGridTextColumn Header="FTrg"
Binding="{Binding sFTrg}"
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.FMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.MmPerMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>-->
<DataGridTextColumn Binding="{Binding sFTrg}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="1*"/>
<DataGridTextColumn Header="FMax"
Binding="{Binding sFMax}"
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.FTrg_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.MmPerMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding sFMax}"
IsReadOnly="True"
Visibility="{Binding DataContext.ColExtend_Visibility,
Source={x:Reference TFSEditorStackPanel}}"
Width="1*"/>
<DataGridTextColumn Header="FCurr"
Binding="{Binding sFCurr}"
Width="1*"/>
<DataGridTextColumn Header="Speed"
Binding="{Binding sSpeed}"
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.FMax_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.MmPerMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding sFCurr}"
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.FCurr_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.MmPerMin_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<DataGridTextColumn Binding="{Binding sSpeed}"
IsReadOnly="True"
Width="1*"/>
Width="1*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<PrintApp:ColumnHeader Header="{Binding DataContext.Speed_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"
MeasureUnit="{Binding DataContext.Rpm_Msg, RelativeSource={RelativeSource AncestorType={x:Type PrintApp:TFSEditorV}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
</DataGrid.Columns>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
@@ -243,16 +342,37 @@
SelectedIndex="{Binding nSelFilter}"
Width="125"
Margin="2.5,0,2.5,0"
ToolTip="Filter"
Style="{StaticResource RightPanel_ComboBox}"/>
<Button DockPanel.Dock="Right"
Command="{Binding Extend_Command}"
Margin="2.5,0,2.5,0"
Style="{StaticResource ToolBar_Button}">
<Image Source="/Resources/TFSEditor/Expand.png"
Style="{StaticResource Button_Image}"/>
</Button>
<ToggleButton DockPanel.Dock="Right"
IsChecked="{Binding bColExtend}"
Margin="2.5,0,2.5,0">
<ToggleButton.Resources>
<DataTemplate x:Key="Expand">
<Image Source="/Resources/TFSEditor/Expand.png"
Style="{StaticResource Button_Image}"/>
</DataTemplate>
<DataTemplate x:Key="Reduce">
<Image Source="/Resources/TFSEditor/Reduce.png"
Style="{StaticResource Button_Image}"/>
</DataTemplate>
</ToggleButton.Resources>
<ToggleButton.Style>
<Style TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource ToolBar_ToggleButton}">
<Setter Property="ContentTemplate" Value="{StaticResource Expand}"/>
<Setter Property="ToolTip" Value="Expand"/>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="ContentTemplate" Value="{StaticResource Reduce}"/>
<Setter Property="ToolTip" Value="Reduce"/>
</Trigger>
</Style.Triggers>
</Style>
</ToggleButton.Style>
</ToggleButton>
<Grid VerticalAlignment="Center"
HorizontalAlignment="Center">
HorizontalAlignment="Left"
Margin="2.5,0,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
+195 -47
View File
@@ -14,10 +14,10 @@ Public Class TFSEditorVM
Public Enum MediaTypes As Integer
HEIGHT = 1
SECTIONCHANGE = 2
SELECTION = 3
FEED_INCREMENT = 4
SELECTION_WAIT = 5
'SECTIONCHANGE = 2
SELECTION = 2
FEED_INCREMENT = 3
SELECTION_WAIT = 4
End Enum
Public Enum Filters As Integer
@@ -60,13 +60,13 @@ Public Class TFSEditorVM
End Set
End Property
Private m_MediaTypeList As New List(Of String)({"Feed by Slice Number", "Feed by Section change", "Feed by Selection", "Wait by Selection", "Feed by Increment"})
Private m_MediaTypeList As New List(Of String)({"Feed by Slice Number", "Feed by Selection", "Wait by Selection", "Feed by Increment"})
Public ReadOnly Property MediaTypeList As List(Of String)
Get
If bWaitingTime Then
Return New List(Of String)({"Feed by Slice Number", "Feed by Section change", "Feed by Selection", "Feed by Increment", "Wait by Selection"})
Return New List(Of String)({"Feed by Slice Number", "Feed by Selection", "Feed by Increment", "Wait by Selection"})
Else
Return New List(Of String)({"Feed by Slice Number", "Feed by Section change", "Feed by Selection", "Feed by Increment"})
Return New List(Of String)({"Feed by Slice Number", "Feed by Selection", "Feed by Increment"})
End If
' Return m_MediaTypeList
End Get
@@ -83,12 +83,12 @@ Public Class TFSEditorVM
Case MediaTypes.HEIGHT
SetSetVisibility(False)
SetMediaVisibility(True)
Case MediaTypes.SECTIONCHANGE
SetSetVisibility(False)
SetMediaVisibility(True)
'Case MediaTypes.SECTIONCHANGE
' SetSetVisibility(False)
' SetMediaVisibility(True)
Case MediaTypes.SELECTION
SetSetVisibility(True)
SetMediaVisibility(True)
SetMediaVisibility(False)
Case MediaTypes.SELECTION_WAIT
SetSetVisibility(True)
SetMediaVisibility(False)
@@ -170,10 +170,16 @@ Public Class TFSEditorVM
End Property
Private m_bColExtend As Boolean = False
Public ReadOnly Property bColExtend As Boolean
Public Property bColExtend As Boolean
Get
Return m_bColExtend
End Get
Set(value As Boolean)
m_bColExtend = value
NotifyPropertyChanged(NameOf(bColExtend))
NotifyPropertyChanged(NameOf(ColExtend_Visibility))
NotifyPropertyChanged(NameOf(ControlWidth))
End Set
End Property
Public ReadOnly Property ColExtend_Visibility As Visibility
Get
@@ -229,8 +235,8 @@ Public Class TFSEditorVM
Select Case m_nSelMediaType
Case MediaTypes.HEIGHT
Return "Slice Number:"
Case MediaTypes.SECTIONCHANGE
Return "Difference:"
'Case MediaTypes.SECTIONCHANGE
' Return "Difference:"
Case MediaTypes.SELECTION
Return "Feed:"
Case MediaTypes.SELECTION_WAIT
@@ -243,9 +249,116 @@ Public Class TFSEditorVM
End Get
End Property
#Region "Messages"
Public ReadOnly Property Layer_Msg As String
Get
Return "Layer"
End Get
End Property
Public ReadOnly Property Length_Msg As String
Get
Return "Length"
End Get
End Property
Public ReadOnly Property TMin_Msg As String
Get
Return "TMin"
End Get
End Property
Public ReadOnly Property TTrg_Msg As String
Get
Return "TTrg"
End Get
End Property
Public ReadOnly Property TMax_Msg As String
Get
Return "TMax"
End Get
End Property
Public ReadOnly Property TCurr_Msg As String
Get
Return "TCurr"
End Get
End Property
Public ReadOnly Property TWait_Msg As String
Get
Return "TWait"
End Get
End Property
Public ReadOnly Property FMin_Msg As String
Get
Return "FMin"
End Get
End Property
Public ReadOnly Property FTrg_Msg As String
Get
Return "FTrg"
End Get
End Property
Public ReadOnly Property FMax_Msg As String
Get
Return "FMax"
End Get
End Property
Public ReadOnly Property FCurr_Msg As String
Get
Return "FCurr"
End Get
End Property
Public ReadOnly Property Speed_Msg As String
Get
Return "Speed"
End Get
End Property
Public ReadOnly Property Index_Msg As String
Get
Return ""
End Get
End Property
Public ReadOnly Property Millimeters_Msg As String
Get
Return "mm"
End Get
End Property
Public ReadOnly Property Seconds_Msg As String
Get
Return "min:s"
End Get
End Property
Public ReadOnly Property MmPerMin_Msg As String
Get
Return "mm/min"
End Get
End Property
Public ReadOnly Property Rpm_Msg As String
Get
Return "rpm"
End Get
End Property
#End Region ' Messages
' Definizione comandi
Private m_cmdSet As ICommand
Private m_cmdMedia As ICommand
Private m_cmdUpdate As ICommand
Private m_cmdReset As ICommand
Private m_cmdExtend As ICommand
@@ -417,33 +530,33 @@ Public Class TFSEditorVM
m_LayerList(Index2).SetFCurr(dNewFCurr)
Next
Next
Case MediaTypes.SECTIONCHANGE
Dim ChangeIndexList As New List(Of Integer)({0})
Dim dPrevLength As Double = m_LayerList(0).dLength
' recupero punti di rottura
For Index = 1 To m_LayerList.Count() - 1
Dim dCurrLength = m_LayerList(Index)
If dPrevLength < m_LayerList(Index).dLength * (1 - (m_dModifyValue / 100)) OrElse dPrevLength > m_LayerList(Index).dLength * (1 + (m_dModifyValue / 100)) Then
ChangeIndexList.Add(Index)
End If
dPrevLength = m_LayerList(Index).dLength
Next
If ChangeIndexList(ChangeIndexList.Count - 1) <> m_LayerList.Count() - 1 Then
ChangeIndexList.Add(m_LayerList.Count() - 1)
End If
' ricalcolo media sugli intervalli trovati
For Index = 0 To ChangeIndexList.Count() - 2
Dim dFSum As Double = 0
Dim dFIndex As Double = 0
For Index2 = ChangeIndexList(Index) To ChangeIndexList(Index + 1)
dFSum += m_LayerList(Index2).sFCurr
dFIndex += 1
Next
Dim dNewFCurr As Double = dFSum / dFIndex
For Index2 = ChangeIndexList(Index) To ChangeIndexList(Index + 1)
m_LayerList(Index2).SetFCurr(dNewFCurr)
Next
Next
'Case MediaTypes.SECTIONCHANGE
' Dim ChangeIndexList As New List(Of Integer)({0})
' Dim dPrevLength As Double = m_LayerList(0).dLength
' ' recupero punti di rottura
' For Index = 1 To m_LayerList.Count() - 1
' Dim dCurrLength = m_LayerList(Index)
' If dPrevLength < m_LayerList(Index).dLength * (1 - (m_dModifyValue / 100)) OrElse dPrevLength > m_LayerList(Index).dLength * (1 + (m_dModifyValue / 100)) Then
' ChangeIndexList.Add(Index)
' End If
' dPrevLength = m_LayerList(Index).dLength
' Next
' If ChangeIndexList(ChangeIndexList.Count - 1) <> m_LayerList.Count() - 1 Then
' ChangeIndexList.Add(m_LayerList.Count() - 1)
' End If
' ' ricalcolo media sugli intervalli trovati
' For Index = 0 To ChangeIndexList.Count() - 2
' Dim dFSum As Double = 0
' Dim dFIndex As Double = 0
' For Index2 = ChangeIndexList(Index) To ChangeIndexList(Index + 1)
' dFSum += m_LayerList(Index2).sFCurr
' dFIndex += 1
' Next
' Dim dNewFCurr As Double = dFSum / dFIndex
' For Index2 = ChangeIndexList(Index) To ChangeIndexList(Index + 1)
' m_LayerList(Index2).SetFCurr(dNewFCurr)
' Next
' Next
Case MediaTypes.SELECTION
If m_SelLayers.Count <= 0 Then Return
Dim dFSum As Double = 0
@@ -475,6 +588,29 @@ Public Class TFSEditorVM
#End Region ' Media
#Region "Update"
''' <summary>
''' Returns a command that do CPlaneTop.
''' </summary>
Public ReadOnly Property Update_Command As ICommand
Get
If m_cmdUpdate Is Nothing Then
m_cmdUpdate = New Command(AddressOf Update)
End If
Return m_cmdUpdate
End Get
End Property
''' <summary>
''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand.
''' </summary>
Public Sub Update()
Map.refSliceManagerVM.Update()
End Sub
#End Region ' Update
#Region "Reset"
''' <summary>
@@ -571,14 +707,14 @@ Public Class TFSLayer
End Property
Public ReadOnly Property sTMin As String
Get
Return DoubleToString(m_dTMin, 0)
Return SecondsToStringConverter(m_dTMin)
End Get
End Property
Private m_dTTrg As Double
Public ReadOnly Property sTTrg As String
Get
Return DoubleToString(m_dTTrg, 0)
Return SecondsToStringConverter(m_dTTrg)
End Get
End Property
@@ -590,7 +726,7 @@ Public Class TFSLayer
End Property
Public ReadOnly Property sTMax As String
Get
Return DoubleToString(m_dTMax, 0)
Return SecondsToStringConverter(m_dTMax)
End Get
End Property
@@ -602,14 +738,14 @@ Public Class TFSLayer
End Property
Public ReadOnly Property sTCurr As String
Get
Return DoubleToString(m_dTCurr, 0)
Return SecondsToStringConverter(m_dTCurr)
End Get
End Property
Private m_dTWait As Double
Public Property sTWait As String
Get
Return LenToString(m_dTWait, 0)
Return SecondsToStringConverter(m_dTWait)
End Get
Set(value As String)
Dim dNewValue As Double
@@ -818,4 +954,16 @@ Public Class TFSLayer
m_dSpeed = dSpeed
End Sub
End Class
Private Function SecondsToStringConverter(value As Double) As String
Dim dtTime As TimeSpan = TimeSpan.FromSeconds(value)
Dim dHours As Double = Math.Floor(dtTime.TotalHours)
Dim dMinutes As Double = Math.Floor(dtTime.Minutes)
Dim dSeconds As Double = Math.Ceiling(dtTime.Seconds)
Return If(dHours > 0, dHours.ToString("00") & ":", "") & If(dHours > 0, dMinutes.ToString("00"), dMinutes.ToString()) & ":" & dSeconds.ToString("00")
End Function
Friend Function ConvertToJsonLayer() As JsonLayer
Return New JsonLayer(nIndex, dLength, dTMin, m_dTTrg, dTMax, dTCurr, m_dTWait, dFCurr, m_dFTrg, m_dFMax, m_dFCurr, dSpeed)
End Function
End Class
+1 -1
View File
@@ -58,7 +58,7 @@
<ToggleButton x:Name="ModifyBtn"
Grid.Column="2"
Grid.Row="1"
Content="{Binding SelectedItem.sName, ElementName=ModifyModeListBox}"
Content="{Binding SelModifyModeName}"
IsChecked="{Binding bModify_IsChecked}"
Margin="2.5,0,2.5,0"
Style="{StaticResource TopPanel_Modify_ToggleButton}">
+33 -30
View File
@@ -121,6 +121,7 @@ Public Class TopPanelVM
Map.refLeftPanelVM.SetSelPanel(LeftPanelVM.Panels.NULL)
NotifyPropertyChanged(NameOf(SelModifyMode))
End If
NotifyPropertyChanged(NameOf(SelModifyModeName))
' chiudo il popup
SetModifyIsChecked(False)
End Set
@@ -128,8 +129,15 @@ Public Class TopPanelVM
Friend Sub SetSelModifyMode(ModifyMode As ModifyModes)
SelModifyMode = m_ModifyModeList.FirstOrDefault(Function(x) x.ModifyMode = ModifyMode)
NotifyPropertyChanged(NameOf(SelModifyMode))
NotifyPropertyChanged(NameOf(SelModifyModeName))
End Sub
Public ReadOnly Property SelModifyModeName As String
Get
Return If(Not IsNothing(m_SelModifyMode) AndAlso m_SelModifyMode.ModifyMode <> ModifyModes.NULL, m_SelModifyMode.sName, "Modify")
End Get
End Property
Private m_bModify_IsChecked As Boolean
Public Property bModify_IsChecked As Boolean
Get
@@ -171,10 +179,8 @@ Public Class TopPanelVM
End If
m_SelPart = value
If Not IsNothing(value) Then
' Eseguo la selezione
' deseleziono tutto
EgtDeselectAll()
' EgtSetMark(m_SelPart.nPrintSolidId)
EgtDraw()
' imposto lavorazione e materiale del pezzo selezionato
Map.refCurrMachiningPanelVM.ReadMachParamFromSelPart()
Dim DbMachining As MachiningIndex = MachiningList.FirstOrDefault(Function(x) x.sGUID = Map.refCurrMachiningPanelVM.CurrMachining.sCurrGUID)
@@ -183,6 +189,9 @@ Public Class TopPanelVM
' notifico posizione pezzo
Map.refDispositionPanelVM.RefreshPos()
Map.refSliceManagerVM.UpdateDimensions()
' aggiorno area di estrusione
CurrentMachine.UpdateExtrusionArea()
EgtDraw()
End If
End Set
End Property
@@ -265,7 +274,27 @@ Public Class TopPanelVM
WriteMainPrivateProfileString(S_PRINTING3D, K_CURRMACHINING, value.sGUID.ToString())
' imposto selezionata come corrente
If Not IsNothing(m_SelPart) AndAlso (IsNothing(m_SelMachining) OrElse value.sGUID <> m_SelMachining.sGUID) Then
Dim GeneralCathegory As MachiningCathegory = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
Dim OldSlicingTypeValue As Machining.MPAR_SLICINGTYPE = Nothing
Dim NewSlicingTypeValue As Machining.MPAR_SLICINGTYPE = Nothing
If Not IsNothing(GeneralCathegory) Then
Dim SlicingTypeParam As ComboMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.SLICINGTYPE)
If Not IsNothing(SlicingTypeParam) Then
OldSlicingTypeValue = SlicingTypeParam.SelValue.Id
End If
End If
Map.refCurrMachiningPanelVM.SetCurrMachining(New CurrMachining(m_SelPart.nPartId, value.nIndex))
GeneralCathegory = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
If Not IsNothing(GeneralCathegory) Then
Dim SlicingTypeParam As ComboMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.SLICINGTYPE)
If Not IsNothing(SlicingTypeParam) Then
NewSlicingTypeValue = SlicingTypeParam.SelValue.Id
End If
End If
If IsNothing(OldSlicingTypeValue) OrElse IsNothing(NewSlicingTypeValue) OrElse OldSlicingTypeValue <> NewSlicingTypeValue Then
' aggiorno area di estrusione
CurrentMachine.UpdateExtrusionArea()
End If
End If
End If
m_SelMachining = value
@@ -597,15 +626,6 @@ Public Class TopPanelVM
' rinomino pezzo e layer
Dim nPartId As Integer = EgtGetLastPart()
EgtSetName(nPartId, PART)
'Dim nLayerId As Integer = EgtGetFirstInGroup(nPartId)
'EgtSetName(nLayerId, ORIGINAL_SOLID)
'' Recupero o creo layer ausiliario
'Dim nAuxId As Integer = EgtGetFirstNameInGroup(nPartId, LAY_AUX)
'If Not nAuxId Then
' nAuxId = EgtCreateGroup(nPartId)
' EgtSetName(nAuxId, LAY_AUX)
'End If
' Richiedo posizione origine e offset pezzo
Dim b3Part As New BBox3d
@@ -614,24 +634,6 @@ Public Class TopPanelVM
Dim nRefY As Integer = 1
Dim dPosX As Double = CurrentMachine.b3Tab.DimX / 2 - b3Part.DimX / 2
Dim dPosY As Double = CurrentMachine.b3Tab.DimY / 2 - b3Part.DimY / 2
' Dim Positions = EgtDialogBox( 'Part position on table:', { 'Reference', 'CB:Left,Center,Right'},
' { '', 'CB:Bottom,Middle,Top'},
' { 'X', EgtNumToString( EgtToUiUnits( dPosX), 1)},
' { 'Y', EgtNumToString( EgtToUiUnits( dPosY), 1)})
'Dim ChooseReferenceWndVM As New ChooseReferenceWndVM
'Dim ChooseReferenceWndV As New ChooseReferenceWndV(Application.Current.MainWindow, ChooseReferenceWndVM)
'If Not ChooseReferenceWndV.ShowDialog() Then Return
'Dim gg = ChooseReferenceWndVM.SelReference
'' Aggiungo il box del solido
'Dim nBoxId As Integer = EgtSurftmb(nAuxId, b3Solid, False, GDB_RT.GLOB)
'' posiziono il pezzo al centro
'Dim b3Part As New BBox3d
'EgtGetBBoxGlob(nPartId, GDB_BB.EXACT, b3Part)
'Dim dPosX As Double = (CurrentMachine.b3Tab.DimX() / 2) - (b3Part.DimX() / 2)
'Dim dPosY As Double = (CurrentMachine.b3Tab.DimY() / 2) - (b3Part.DimY() / 2)
' Posiziono il pezzo e aggiorno il suo box
Dim vtMove As Vector3d = New Point3d(dPosX, dPosY, 0) - b3Part.Min()
@@ -648,6 +650,7 @@ Public Class TopPanelVM
EgtAddMachGroup("3dPrint")
EgtSetTable("Tab")
EgtSetTableAreaOffset( 500, 500, 500, 500)
Dim nRawId As Integer = EgtAddRawPart(b3Part.Min, b3Part.DimX, b3Part.DimY, b3Part.DimZ, New Color3d(128, 128, 128, 30))
EgtAddPartToRawPart(nPartId, b3Part.Min, nRawId)
+92 -7
View File
@@ -28,6 +28,13 @@ Public Module CurrentMachine
Return m_sMachIniFile
End Get
End Property
' File ini dei dati della macchina
Private m_sMachDataIniFile As String = String.Empty
Friend ReadOnly Property sMachDataIniFile As String
Get
Return m_sMachDataIniFile
End Get
End Property
' File script della macchina
Private m_sMachScriptDir As String = String.Empty
Friend ReadOnly Property sMachScriptDir As String
@@ -64,6 +71,22 @@ Public Module CurrentMachine
End Get
End Property
' box dell'area di estrusione
Private m_b3ExtrusionArea As New BBox3d
Friend ReadOnly Property b3ExtrusionArea As BBox3d
Get
Return m_b3ExtrusionArea
End Get
End Property
' altezza massima di estrusione impostata in file ini macchina
Private m_dSlicingMaxHeight As Double
Public ReadOnly Property dSlicingMaxHeight As Double
Get
Return m_dSlicingMaxHeight
End Get
End Property
#Region "Init"
Sub InitCurrentMachine(sMachinesRootDir As String, sMachineName As String)
@@ -73,12 +96,17 @@ Public Module CurrentMachine
m_sMachDir = sMachinesRootDir & "\" & sMachineName
' Impostazione path MachIni file
m_sMachIniFile = sMachinesRootDir & "\" & sMachineName & "\" & sMachineName & ".ini"
' Impostazione path MachData Ini file
m_sMachDataIniFile = sMachinesRootDir & "\" & sMachineName & "\" & "CustomData" & "\" & MACHDATA_INI_FILE_NAME
If Not File.Exists(m_sMachDataIniFile) Then m_sMachDataIniFile = ""
' impostazione cartella script
m_sMachScriptDir = sMachinesRootDir & "\" & sMachineName & "\Scripts"
' impostazione cartella lavorazioni
m_sMachiningFilePath = sMachinesRootDir & "\" & sMachineName & "\Machinings\Machinings.ini"
' impostazione cartella materiali
m_sMaterialFilePath = sMachinesRootDir & "\" & sMachineName & "\Materials\Materials.ini"
' leggo altezza massima estrusione impostata su macchina
m_dSlicingMaxHeight = GetPrivateProfileDouble(S_MACH_PRINTING3D, K_MAX_HEIGHT, 900, m_sMachIniFile)
' Disabilito segnalazione modificato
Dim DisableMgr As New DisableModifiedMgr
' recupero box macchina
@@ -103,14 +131,8 @@ Public Module CurrentMachine
Public Sub CreateMachineTable()
' Disabilito segnalazione modificato
Dim DisableMgr As New DisableModifiedMgr
' Recupero dati tavola (creando gruppo di lavoro temporaneo)
Dim nTempId = EgtAddMachGroup("qqq")
EgtSetTable("Tab")
Dim b3Tab As New BBox3d
EgtGetTableArea(1, b3Tab)
Dim dTabX = b3Tab.DimX
Dim dTabX = b3Tab.DimX()
Dim dTabY = b3Tab.DimY()
EgtRemoveMachGroup(nTempId)
' Disegno tavola
Dim nTabPartId As Integer = EgtCreateGroup(GDB_ID.ROOT)
EgtSetLevel(nTabPartId, GDB_LV.SYSTEM)
@@ -128,10 +150,73 @@ Public Module CurrentMachine
EgtSetInfo(nTabPartId, KEY_MATERIAL_GUID, Map.refTopPanelVM.SelMaterial.sGUID)
EgtSetInfo(nTabPartId, KEY_MATERIAL_NAME, Map.refTopPanelVM.SelMaterial.sName)
End If
' creo area di estrusione
UpdateExtrusionArea()
' imposto dati griglia (primi tre parametri -1 indica tieni i correnti)
EgtSetGridGeoAdv( -1, -1, -1, 0, dTabX, 0, dTabY)
' Ripristino stato segnalazione modifica
DisableMgr.ReEnable()
End Sub
Public Sub SetTableVisibility(IsVisible As Boolean)
Dim nTableLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
EgtSetStatus(nTableLayerId, If(IsVisible, GDB_ST.ON_, GDB_ST.OFF))
End Sub
Public Sub UpdateExtrusionArea()
Dim DisableMgr As New DisableModifiedMgr
' recupero eventuale vecchia area di estrusione
Dim nTabPartId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, TABLE)
Dim nTabLayerId As Integer = EgtGetFirstNameInGroup(nTabPartId, TABLE)
Dim nExtrusionAreaId As Integer = EgtGetFirstNameInGroup(nTabLayerId, EXTRUSION_AREA)
If nExtrusionAreaId <> GDB_ID.NULL Then EgtErase(nExtrusionAreaId)
Dim nExtrusionRectId As Integer = EgtGetFirstNameInGroup(nTabLayerId, EXTRUSION_RECT)
If nExtrusionRectId <> GDB_ID.NULL Then EgtErase(nExtrusionRectId)
' se lavorazione corrente nulla, esco
If IsNothing(Map.refTopPanelVM.CurrMachining) Then
DisableMgr.ReEnable()
Return
End If
' se non esiste file dati macchina, esco
If String.IsNullOrWhiteSpace(m_sMachDataIniFile) Then
DisableMgr.ReEnable()
Return
End If
' recupero tipo di slice
Dim sExtrusionType As String = S_VERTICAL
Dim GeneralCathegory As MachiningCathegory = Map.refTopPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
Dim SlicingTypeParam As ComboMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(x) x.Type = MachiningParam.Params.SLICINGTYPE)
Dim SlicingTypeValue As Machining.MPAR_SLICINGTYPE = SlicingTypeParam.SelValue.Id
Select Case SlicingTypeValue
Case Machining.MPAR_SLICINGTYPE.VERTICAL
sExtrusionType = S_VERTICAL
Case Machining.MPAR_SLICINGTYPE.DEG45
sExtrusionType = S_45DEGX
Case Machining.MPAR_SLICINGTYPE.DEG45_Y
sExtrusionType = S_45DEGY
Case Machining.MPAR_SLICINGTYPE.HORIZONTAL
sExtrusionType = S_HORIZONTAL
End Select
Dim dExtrXMax = GetPrivateProfileDouble(sExtrusionType, K_MAXX, 0, m_sMachDataIniFile)
Dim dExtrXMin = GetPrivateProfileDouble(sExtrusionType, K_MINX, 0, m_sMachDataIniFile)
Dim dExtrYMax = GetPrivateProfileDouble(sExtrusionType, K_MAXY, 0, m_sMachDataIniFile)
Dim dExtrYMin = GetPrivateProfileDouble(sExtrusionType, K_MINY, 0, m_sMachDataIniFile)
Const AREA_WIDTH As Double = 10
Dim nAuxRectId As Integer = EgtCreateRectangle2P(nTabLayerId, New Point3d(dExtrXMin - AREA_WIDTH, dExtrYMin - AREA_WIDTH, 0), New Point3d(dExtrXMax + AREA_WIDTH, dExtrYMax + AREA_WIDTH, 0))
nExtrusionRectId = EgtCreateRectangle2P(nTabLayerId, New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
nExtrusionAreaId = EgtCreateSurfTmByRegion( nTabLayerId, { nAuxRectId, nExtrusionRectId}, EPS_STM)
EgtErase( nAuxRectId)
Dim c3Temp As New Color3d
c3Temp.FromColor(System.Drawing.Color.Lime)
EgtSetColor(nExtrusionAreaId, c3Temp)
EgtSetName(nExtrusionAreaId, EXTRUSION_AREA)
EgtSetColor(nExtrusionRectId, c3Temp)
EgtSetName(nExtrusionRectId, EXTRUSION_RECT)
m_b3ExtrusionArea = New BBox3d(New Point3d(dExtrXMin, dExtrYMin, 0), New Point3d(dExtrXMax, dExtrYMax, 0))
DisableMgr.ReEnable()
EgtDraw()
End Sub
Friend Function ReadMachiningParamString(lpAppName As String, lpKeyName As String, lpDefault As String, ByRef lpString As String, Optional sFilePath As String = "") As Integer
Dim nResult As Integer = GetPrivateProfileString(lpAppName, lpKeyName, "", lpString, If(Not String.IsNullOrWhiteSpace(sFilePath), sFilePath, m_sMachiningFilePath))
If Not String.IsNullOrWhiteSpace(lpString) Then
+127 -1
View File
@@ -703,6 +703,14 @@
<Setter Property="Template" Value="{StaticResource ToggleButton.NoBackgroundButton}"/>
</Style>
<Style x:Key="TFSExpand_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
<Setter Property="Height" Value="30"/>
<Setter Property="Width" Value="30"/>
<Setter Property="Background" Value="White"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template" Value="{StaticResource ToggleButton.NoBackgroundButton}"/>
</Style>
<!-- ______________________________________________________________________________________________________________________________________________ -->
<!-- TextBlock -->
@@ -828,10 +836,18 @@
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style x:Key="MeasureUnit_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource BaseTextBlock}">
<Setter Property="FontSize" Value="10"/>
<Setter Property="FontStyle" Value="Italic"/>
</Style>
<!-- ______________________________________________________________________________________________________________________________________________ -->
<!-- TextBox -->
<SolidColorBrush x:Key="TextBox.MouseOver.Border" Color="#FF7EB4EA"/>
<SolidColorBrush x:Key="TextBox.Focus.Border" Color="#FF569DE5"/>
<Style TargetType="{x:Type EgtWPFLib5:EgtTextBox}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtTextBox}}">
<Setter Property="Height" Value="22"/>
<Setter Property="FontFamily" Value="/Resources/Fonts/#Roboto"/>
@@ -917,12 +933,122 @@
<Style x:Key="ParameterList_TextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource BaseTextBox}">
<Setter Property="TextAlignment" Value="Center"/>
</Style>
<Style x:Key="ParameterList_TextBox2" TargetType="{x:Type EgtWPFLib5:EgtTextBox2}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtTextBox2}}">
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="ExplicitUpdateSource" Value="EnterKeyPressOrLostFocus"/>
<Setter Property="ResetValueOnLostFocus" Value="False"/>
</Style>
<Style x:Key="SimulationPanel_Axes_TextBox" TargetType="{x:Type EgtWPFLib5:EgtTextBox}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtTextBox}}">
<Style x:Key="SimulationPanel_Axes_TextBox" TargetType="{x:Type EgtWPFLib5:EgtTextBox2}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtTextBox2}}">
<Setter Property="FontSize" Value="18"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type EgtWPFLib5:EgtTextBox2}">
<TextBox Name="PART_TextBox"
AcceptsReturn="{TemplateBinding AcceptsReturn}"
AcceptsTab="{TemplateBinding AcceptsTab}"
AllowDrop="{TemplateBinding AllowDrop}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CacheMode="{TemplateBinding CacheMode}"
CaretBrush="{TemplateBinding CaretBrush}"
CharacterCasing="{TemplateBinding CharacterCasing}"
Clip="{TemplateBinding Clip}"
ClipToBounds="{TemplateBinding ClipToBounds}"
ContextMenu="{TemplateBinding ContextMenu}"
Cursor="{TemplateBinding Cursor}"
DataContext="{TemplateBinding DataContext}"
Effect="{TemplateBinding Effect}"
FlowDirection="{TemplateBinding FlowDirection}"
Focusable="{TemplateBinding Focusable}"
FocusVisualStyle="{TemplateBinding FocusVisualStyle}"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontStretch="{TemplateBinding FontStretch}"
FontWeight="{TemplateBinding FontWeight}"
ForceCursor="{TemplateBinding ForceCursor}"
Foreground="{TemplateBinding Foreground}"
Height="{TemplateBinding Height}"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
HorizontalScrollBarVisibility="{TemplateBinding HorizontalScrollBarVisibility}"
InputScope="{TemplateBinding InputScope}"
IsEnabled="{TemplateBinding IsEnabled}"
IsHitTestVisible="{TemplateBinding IsHitTestVisible}"
IsManipulationEnabled="{TemplateBinding IsManipulationEnabled}"
IsReadOnly="{TemplateBinding IsReadOnly}"
IsTabStop="{TemplateBinding IsTabStop}"
IsReadOnlyCaretVisible="{TemplateBinding IsReadOnlyCaretVisible}"
IsUndoEnabled="{TemplateBinding IsUndoEnabled}"
Language="{TemplateBinding Language}"
LayoutTransform="{TemplateBinding LayoutTransform}"
Margin="0"
MaxHeight="{TemplateBinding MaxHeight}"
MaxLength="{TemplateBinding MaxLength}"
MaxLines="{TemplateBinding MaxLines}"
MaxWidth="{TemplateBinding MaxWidth}"
MinHeight="{TemplateBinding MinHeight}"
MinLines="{TemplateBinding MinLines}"
MinWidth="{TemplateBinding MinWidth}"
Opacity="{TemplateBinding Opacity}"
OpacityMask="{TemplateBinding OpacityMask}"
OverridesDefaultStyle="{TemplateBinding OverridesDefaultStyle}"
Padding="{TemplateBinding Padding}"
RenderTransform="{TemplateBinding RenderTransform}"
RenderTransformOrigin="{TemplateBinding RenderTransformOrigin}"
SelectionBrush="{TemplateBinding SelectionBrush}"
SelectionOpacity="{TemplateBinding SelectionOpacity}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
TabIndex="{TemplateBinding TabIndex}"
Tag="{TemplateBinding Tag}"
TextAlignment="{TemplateBinding TextAlignment}"
TextDecorations="{TemplateBinding TextDecorations}"
TextWrapping="{TemplateBinding TextWrapping}"
ToolTip="{TemplateBinding ToolTip}"
Uid="{TemplateBinding Uid}"
UndoLimit="{TemplateBinding UndoLimit}"
UseLayoutRounding="{TemplateBinding UseLayoutRounding}"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
VerticalScrollBarVisibility="{TemplateBinding VerticalScrollBarVisibility}"
Visibility="{TemplateBinding Visibility}"
Width="{TemplateBinding Width}">
<TextBox.Style>
<Style TargetType="{x:Type TextBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Border x:Name="border" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="True">
<ScrollViewer x:Name="PART_ContentHost"
Focusable="false"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource TextBox.MouseOver.Border}"/>
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource TextBox.Focus.Border}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</TextBox.Style>
</TextBox>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="AboutBox_TextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
+205
View File
@@ -0,0 +1,205 @@
Imports EgtUILib.EgtInterface
Imports EgtWPFLib5
Public Class JsonMain
Private m_StrandW As Double
Public ReadOnly Property StrandW As Double
Get
Return m_StrandW
End Get
End Property
Private m_StrandH As Double
Public ReadOnly Property StrandH As Double
Get
Return m_StrandH
End Get
End Property
Private m_BoxX As Double
Public ReadOnly Property BoxX As Double
Get
Return m_BoxX
End Get
End Property
Private m_BoxY As Double
Public ReadOnly Property BoxY As Double
Get
Return m_BoxY
End Get
End Property
Private m_BoxZ As Double
Public ReadOnly Property BoxZ As Double
Get
Return m_BoxZ
End Get
End Property
Private m_dTime As Double
Public ReadOnly Property dTime As Double
Get
Return m_dTime
End Get
End Property
Private m_dMass As Double = 0
Public ReadOnly Property dMass As Double
Get
Return m_dMass
End Get
End Property
Private m_LayerQty As Double
Public ReadOnly Property LayerQty As Double
Get
Return m_LayerQty
End Get
End Property
Private m_MaterialName As String
Public ReadOnly Property MaterialName As String
Get
Return m_MaterialName
End Get
End Property
Private m_JsonLayerList As New List(Of JsonLayer)
Public ReadOnly Property JsonLayerList As List(Of JsonLayer)
Get
Return m_JsonLayerList
End Get
End Property
Sub New(dTime As Double, dMass As Double)
For Each Layer In Map.refTFSEditorVM.LayerList
m_JsonLayerList.Add(Layer.ConvertToJsonLayer())
Next
m_MaterialName = Map.refTopPanelVM.SelMaterial.sName
Dim GeneralCathegory As MachiningCathegory = Map.refCurrMachiningPanelVM.CurrMachining.CathegoryList.FirstOrDefault(Function(x) x.Type = MachiningCathegory.Cathegories.GENERAL)
If Not IsNothing(GeneralCathegory) Then
Dim StrandW As CurrNumericMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.STRANDW)
Dim StrandH As CurrNumericMachiningParam = GeneralCathegory.MachiningParamList.FirstOrDefault(Function(y) y.Type = MachiningParam.Params.STRANDH)
If Not IsNothing(StrandW) Then
m_StrandW = StrandW.dValue
End If
If Not IsNothing(StrandH) Then
m_StrandH = StrandH.dValue
End If
End If
m_dTime = dTime
m_dMass = dMass
If Not IsNothing(Map.refTopPanelVM.SelPart) Then
Dim b3Print As BBox3d = Map.refDispositionPanelVM.GetSolidForReferenceBBox(Map.refTopPanelVM.SelPart)
m_BoxX = b3Print.DimX
m_BoxY = b3Print.DimY
m_BoxZ = b3Print.DimZ
End If
m_LayerQty = Map.refSliderManagerVM.nLayerIndex_Maximum
End Sub
End Class
Public Class JsonLayer
Private m_nIndex As Integer
Public ReadOnly Property Index As Integer
Get
Return m_nIndex
End Get
End Property
Private m_dLength As Double
Public ReadOnly Property Length As Double
Get
Return m_dLength
End Get
End Property
Private m_dTMin As Double
Public ReadOnly Property TMin As Double
Get
Return m_dTMin
End Get
End Property
Private m_dTTrg As Double
Public ReadOnly Property TTrg As Double
Get
Return m_dTTrg
End Get
End Property
Private m_dTMax As Double
Public ReadOnly Property TMax As Double
Get
Return m_dTMax
End Get
End Property
Private m_dTCurr As Double
Public ReadOnly Property TCurr As Double
Get
Return m_dTCurr
End Get
End Property
Private m_dTWait As Double
Public ReadOnly Property TWait As Double
Get
Return m_dTWait
End Get
End Property
Private m_dFMin As Double
Public ReadOnly Property FMin As Double
Get
Return m_dFMin
End Get
End Property
Private m_dFTrg As Double
Public ReadOnly Property FTrg As Double
Get
Return m_dFTrg
End Get
End Property
Private m_dFMax As Double
Public ReadOnly Property FMax As Double
Get
Return m_dFMax
End Get
End Property
Private m_dFCurr As Double
Public ReadOnly Property FCurr As Double
Get
Return m_dFCurr
End Get
End Property
Private m_dSpeed As Double
Public ReadOnly Property Speed As Double
Get
Return m_dSpeed
End Get
End Property
Sub New(nIndex As Integer, dLength As Double, dTMin As Double, dTTrg As Double, dTMax As Double, dTCurr As Double, dTWait As Double, dFMin As Double, dFTrg As Double, dFMax As Double, dFCurr As Double, dSpeed As Double)
m_nIndex = nIndex
m_dLength = dLength
m_dTMin = dTMin
m_dTTrg = dTTrg
m_dTMax = dTMax
m_dTCurr = dTCurr
m_dTWait = dTWait
m_dFMin = dFMin
m_dFTrg = dFTrg
m_dFMax = dFMax
m_dFCurr = dFCurr
m_dSpeed = dSpeed
End Sub
End Class
+14
View File
@@ -115,4 +115,18 @@ Module LuaExec
Return bOk
End Function
Friend Function ExecPrepare3dmExport(ByRef nExportGeomId As Integer) As Boolean
Dim bOk As Boolean = True
EgtLuaCreateGlobTable("PRINT")
EgtLuaSetGlobStringVar("PRINT.BASEDIR", Map.refMainWindowVM.MainWindowM.s3dPrintingDir)
bOk = EgtLuaExecFile(Map.refMainWindowVM.MainWindowM.s3dPrintingDir & "\PrepareExport.lua")
If bOk Then
EgtLuaGetGlobIntVar("PRINT.EXPORTLAYER", nExportGeomId)
End If
' Cancello tavola globale
EgtLuaResetGlobVar("PRINT")
Return bOk
End Function
End Module
+24
View File
@@ -33,6 +33,8 @@ Module Map
Private m_refFilledSolidParamPanelVM As FilledSolidParamPanelVM
Private m_refSplashScreen As SplashScreen
Private m_refManagePartPanelVM As ManagePartPanelVM
Private m_refMachineViewPanelVM As MachineViewPanelVM
Private m_refImportLoadingWndVM As ImportLoadingWndVM
#Region "Get"
@@ -233,6 +235,18 @@ Module Map
End Get
End Property
Public ReadOnly Property refMachineViewPanelVM As MachineViewPanelVM
Get
Return m_refMachineViewPanelVM
End Get
End Property
Public ReadOnly Property refImportLoadingWndVM As ImportLoadingWndVM
Get
Return m_refImportLoadingWndVM
End Get
End Property
#End Region ' Get
#Region "Set"
@@ -391,6 +405,16 @@ Module Map
Return Not IsNothing(m_refManagePartPanelVM)
End Function
Friend Function SetRefMachineViewPanelVM(MachineViewPanelVM As MachineViewPanelVM) As Boolean
m_refMachineViewPanelVM = MachineViewPanelVM
Return Not IsNothing(m_refMachineViewPanelVM)
End Function
Friend Function SetRefImportLoadingWndVM(ImportLoadingWndVM As ImportLoadingWndVM) As Boolean
m_refImportLoadingWndVM = ImportLoadingWndVM
Return Not IsNothing(m_refImportLoadingWndVM)
End Function
#End Region ' Set
#Region "Init"
+12 -14
View File
@@ -35,7 +35,7 @@ Public Class ViewLayerManagerVM
End Sub
Sub New()
' Creo riferimento a questa classe in EgtCAM5Map
' Creo riferimento a questa classe in Map
Map.SetRefViewLayerManagerVM(Me)
m_LayerList = New ObservableCollection(Of ViewLayer)({New ViewLayer(ViewLayer.ViewLayerType.PRINT_SOLID, "Print", True),
New ViewLayer(ViewLayer.ViewLayerType.REFERENCE, "Origin Point", True),
@@ -133,20 +133,15 @@ Public Class ViewLayer
Return
End If
m_IsVisible = If(value, VisibilityType.ON_, VisibilityType.OFF)
'If Not bIsVisible AndAlso ((m_Type = ViewLayerType.REFERENCE AndAlso Map.refTopPanelVM.SelModifyMode.ModifyMode = ModifyModes.REFERENCE) OrElse
' (m_Type = ViewLayerType.START_MACHINING AndAlso Map.refTopPanelVM.SelModifyMode.ModifyMode = ModifyModes.STARTMACH) OrElse
' (m_Type = ViewLayerType.RIBS AndAlso Map.refTopPanelVM.SelModifyMode.ModifyMode = ModifyModes.RIBS) OrElse
' (m_Type = ViewLayerType.SHELL_NUMBER AndAlso Map.refTopPanelVM.SelModifyMode.ModifyMode = ModifyModes.SHELLNUMBER) OrElse
' (m_Type = ViewLayerType.AUX_SOLIDS AndAlso Map.refTopPanelVM.SelModifyMode.ModifyMode = ModifyModes.AUXSOLIDS)) Then
' m_bIsVisible = True
' NotifyPropertyChanged(NameOf(bIsVisible))
'Else
UpdateVisibility(m_IsVisible)
WriteIsVisibleToIni()
EgtDraw()
'End If
End Set
End Property
Friend Sub SetIsVisible(value As Boolean?)
bIsVisible = value
NotifyPropertyChanged(NameOf(bIsVisible))
End Sub
Sub New(Type As ViewLayerType, sName As String, bIsVisible As Boolean)
m_Type = Type
@@ -155,8 +150,8 @@ Public Class ViewLayer
End Sub
Friend Sub UpdateVisibility(bIsVisible As Boolean)
' Disabilito segnalazione modificato
Dim DisableMgr As New DisableModifiedMgr ' se solidi
Dim DisableMgr As New DisableModifiedMgr
' se solidi
If m_Type = ViewLayerType.SOLID_SLICE Then
If Map.refSceneHostVM.MainController.GetStep() = 0 Then
' aggiorno parametro di calcolo solidi sui pezzi
@@ -247,7 +242,6 @@ Public Class ViewLayer
Next
Next
End If
' Ripristino stato segnalazione modifica
DisableMgr.ReEnable()
End Sub
@@ -315,7 +309,11 @@ Public Class ViewLayer
Case ViewLayerType.SOLID_SLICE
nStatus = GetMainPrivateProfileInt(S_VIEWLAYER, K_SLC_SOLIDSLICE, 1)
Case ViewLayerType.SLICE_TOOLPATH
nStatus = GetMainPrivateProfileInt(S_VIEWLAYER, K_SLC_SLICETOOLPATH, 1)
If Map.refSliceManagerVM.bCalculating AndAlso Map.refSliceManagerVM.bSlice Then
nStatus = 1
Else
nStatus = GetMainPrivateProfileInt(S_VIEWLAYER, K_SLC_SLICETOOLPATH, 1)
End If
Case ViewLayerType.OTHERS
nStatus = GetMainPrivateProfileInt(S_VIEWLAYER, K_SLC_OTHERS, 1)
End Select
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Ionic.Zip" version="1.9.1.8" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
</packages>