diff --git a/CompoCsvTrfDataWindow/CompoCsvDataWindowV.xaml b/CompoCsvTrfDataWindow/CompoCsvDataWindowV.xaml
new file mode 100644
index 0000000..79523e7
--- /dev/null
+++ b/CompoCsvTrfDataWindow/CompoCsvDataWindowV.xaml
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CompoCsvTrfDataWindow/CompoCsvDataWindowV.xaml.vb b/CompoCsvTrfDataWindow/CompoCsvDataWindowV.xaml.vb
new file mode 100644
index 0000000..d67088b
--- /dev/null
+++ b/CompoCsvTrfDataWindow/CompoCsvDataWindowV.xaml.vb
@@ -0,0 +1,22 @@
+Public Class CompoCsvDataWindowV
+
+ Private m_CompoCsvDataWindowVM As CompoCsvDataWindowVM
+
+ Sub New(Owner As Window, CompoCsvDataWndVM As CompoCsvDataWindowVM)
+ MyBase.New(Owner)
+ ' This call is required by the designer.
+ InitializeComponent()
+ Me.DataContext = CompoCsvDataWndVM
+ ' Assegno al riferimento locale al VM il VM preso dal DataContext
+ m_CompoCsvDataWindowVM = CompoCsvDataWndVM
+ End Sub
+
+ Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
+ DialogResult = True
+ End Sub
+
+ 'Private Sub Cancel_Click(sender As Object, e As RoutedEventArgs) Handles CancelBtn.Click
+ ' DialogResult = False
+ 'End Sub
+
+End Class
diff --git a/CompoCsvTrfDataWindow/CompoCsvDataWindowVM.vb b/CompoCsvTrfDataWindow/CompoCsvDataWindowVM.vb
new file mode 100644
index 0000000..64640ab
--- /dev/null
+++ b/CompoCsvTrfDataWindow/CompoCsvDataWindowVM.vb
@@ -0,0 +1,103 @@
+Imports EgtUILib
+
+Public Class CompoCsvDataWindowVM
+
+#Region "FIELDS & PROPERTIES"
+
+ Private m_sOrder As String
+ Public Property Order As String
+ Get
+ Return m_sOrder
+ End Get
+ Set(value As String)
+ m_sOrder = value
+ End Set
+ End Property
+
+ Private m_sList As String
+ Public Property List As String
+ Get
+ Return m_sList
+ End Get
+ Set(value As String)
+ m_sList = value
+ End Set
+ End Property
+
+ Private m_sName As String
+ Public Property Name As String
+ Get
+ Return m_sName
+ End Get
+ Set(value As String)
+ m_sName = value
+ End Set
+ End Property
+
+#Region "Messages"
+
+ Public ReadOnly Property TitleMsg As String
+ Get
+ Return EgtMsg( 90398) 'Dati Csv
+ End Get
+ End Property
+
+ Public ReadOnly Property OrderMsg As String
+ Get
+ Return EgtMsg( 90467) 'Ordine
+ End Get
+ End Property
+
+ Public ReadOnly Property ListMsg As String
+ Get
+ Return EgtMsg( 90468) 'Distinta
+ End Get
+ End Property
+
+ Public ReadOnly Property NameMsg As String
+ Get
+ Return EgtMsg( 90469) 'Nome
+ End Get
+ End Property
+
+ Public ReadOnly Property OkMsg As String
+ Get
+ Return EgtMsg(MSG_GENERIC + 1)
+ End Get
+ End Property
+
+ Public ReadOnly Property CancelMsg As String
+ Get
+ Return EgtMsg(MSG_GENERIC + 2)
+ End Get
+ End Property
+
+#End Region ' Messages
+
+#End Region 'FIELDS & PROPERTIES
+
+#Region "CONSTRUCTOR"
+
+ Sub New()
+
+ End Sub
+
+#End Region ' CONSTRUCTOR
+
+#Region "METHODS"
+
+ Friend Sub SetData(sOrder As String, sList As String, sName As String)
+ Order = sOrder
+ List = sList
+ Name = sName
+ End Sub
+
+ Friend Sub GetData(ByRef sOrder As String, ByRef sList As String, ByRef sName As String)
+ sOrder = Order
+ sList = List
+ sName = Name
+ End Sub
+
+#End Region
+
+End Class
diff --git a/CompoTrfDataWindow/CompoTrfDataWindowV.xaml b/CompoCsvTrfDataWindow/CompoTrfDataWindowV.xaml
similarity index 100%
rename from CompoTrfDataWindow/CompoTrfDataWindowV.xaml
rename to CompoCsvTrfDataWindow/CompoTrfDataWindowV.xaml
diff --git a/CompoTrfDataWindow/CompoTrfDataWindowV.xaml.vb b/CompoCsvTrfDataWindow/CompoTrfDataWindowV.xaml.vb
similarity index 100%
rename from CompoTrfDataWindow/CompoTrfDataWindowV.xaml.vb
rename to CompoCsvTrfDataWindow/CompoTrfDataWindowV.xaml.vb
diff --git a/CompoTrfDataWindow/CompoTrfDataWindowVM.vb b/CompoCsvTrfDataWindow/CompoTrfDataWindowVM.vb
similarity index 100%
rename from CompoTrfDataWindow/CompoTrfDataWindowVM.vb
rename to CompoCsvTrfDataWindow/CompoTrfDataWindowVM.vb
diff --git a/CompoWindow/CompoManager/CompoManagerV.xaml b/CompoWindow/CompoManager/CompoManagerV.xaml
index c815672..480087f 100644
--- a/CompoWindow/CompoManager/CompoManagerV.xaml
+++ b/CompoWindow/CompoManager/CompoManagerV.xaml
@@ -19,6 +19,12 @@
Margin="0,0,0,5"
Style="{StaticResource CompoWindow_Button}"/>
+
+
diff --git a/CompoWindow/CompoManager/CompoManagerVM.vb b/CompoWindow/CompoManager/CompoManagerVM.vb
index 67b3523..3224b25 100644
--- a/CompoWindow/CompoManager/CompoManagerVM.vb
+++ b/CompoWindow/CompoManager/CompoManagerVM.vb
@@ -6,7 +6,6 @@ Public Class CompoManagerVM
#Region "FIELDS & PROPERTIES"
Private Const LUA_CMP_VARS As String = "CMP"
- Friend Const LUA_CMP_WITHTOP As String = LUA_CMP_VARS & ".WithTop"
Private m_TopIsChecked As Boolean
Public Property TopIsChecked As Boolean
@@ -107,12 +106,6 @@ Public Class CompoManagerVM
End Property
' Trf Data
- Private m_bTrfData As Boolean = False
- Public ReadOnly Property bTrfData As Boolean
- Get
- Return m_bTrfData
- End Get
- End Property
Private m_sTrfOrderCode As String = ""
Public ReadOnly Property sTrfOrderCode As String
Get
@@ -150,6 +143,37 @@ Public Class CompoManagerVM
End Get
End Property
+ Private m_CsvData_Visibility As Visibility
+ Public Property CsvData_Visibility As Visibility
+ Get
+ Return m_CsvData_Visibility
+ End Get
+ Set(value As Visibility)
+ m_CsvData_Visibility = value
+ NotifyPropertyChanged("CsvData_Visibility")
+ End Set
+ End Property
+
+ ' Csv Data
+ Private m_sCsvOrder As String = ""
+ Public ReadOnly Property sCsvOrder As String
+ Get
+ Return m_sCsvOrder
+ End Get
+ End Property
+ Private m_sCsvList As String = ""
+ Public ReadOnly Property sCsvList As String
+ Get
+ Return m_sCsvList
+ End Get
+ End Property
+ Private m_sCsvName As String = ""
+ Public ReadOnly Property sCsvName As String
+ Get
+ Return m_sCsvName
+ End Get
+ End Property
+
#Region "Messages"
Public ReadOnly Property TopMsg As String
@@ -167,6 +191,11 @@ Public Class CompoManagerVM
Return EgtMsg(MSG_DRAWPAGEUC + 9)
End Get
End Property
+ Public ReadOnly Property CsvDataMsg As String
+ Get
+ Return EgtMsg( 90398) 'Dati Csv
+ End Get
+ End Property
Public ReadOnly Property PartNumMsg As String
Get
Return EgtMsg(MSG_DRAWPAGEUC + 1)
@@ -188,6 +217,7 @@ Public Class CompoManagerVM
' definizione comandi
Private m_cmdOk As ICommand
Private m_cmdTrfData As ICommand
+ Private m_cmdCsvData As ICommand
#End Region ' FIELDS & PROPERTIES
@@ -207,10 +237,7 @@ Public Class CompoManagerVM
PartName_Visibility = Visibility.Visible
PartNum_Visibility = Visibility.Visible
OkExit_Visibility = Visibility.Visible
- ' Verifico se il compo selezionato ha la segnalazione del Top abilitata
- Dim bHasTop As Boolean = False
- EgtLuaGetGlobBoolVar(LUA_CMP_WITHTOP, bHasTop)
- Top_Visibility = If(bHasTop, Visibility.Visible, Visibility.Collapsed)
+ Top_Visibility = Visibility.Visible
Else
Top_Visibility = Visibility.Collapsed
PartName_Visibility = Visibility.Collapsed
@@ -227,12 +254,23 @@ Public Class CompoManagerVM
m_sTrfMatCode = ""
m_sTrfSurfCode = ""
m_dTrfThickness = 0
+ ' Reset dati Csv
+ m_sCsvOrder = ""
+ m_sCsvList = ""
+ m_sCsvName = ""
- If Not CompoWindowMap.refCompoWindowVM.bTrfData Then
- TrfData_Visibility = Windows.Visibility.Collapsed
- Else
- PartName_Visibility = Windows.Visibility.Collapsed
+ If CompoWindowMap.refCompoWindowVM.bTrfData Then
TrfData_Visibility = Windows.Visibility.Visible
+ CsvData_Visibility = Windows.Visibility.Collapsed
+ PartName_Visibility = Windows.Visibility.Collapsed
+ ElseIf CompoWindowMap.refCompoWindowVM.bCsvData Then
+ CsvData_Visibility = Windows.Visibility.Visible
+ TrfData_Visibility = Windows.Visibility.Collapsed
+ PartName_Visibility = Windows.Visibility.Collapsed
+ Else
+ PartName_Visibility = Windows.Visibility.Visible
+ TrfData_Visibility = Windows.Visibility.Collapsed
+ CsvData_Visibility = Windows.Visibility.Collapsed
End If
End Sub
@@ -243,7 +281,6 @@ Public Class CompoManagerVM
#Region "OkCommand"
- ' Returns a command that manage the MainWindow_Unloaded command
Public ReadOnly Property OkCommand() As ICommand
Get
If m_cmdOk Is Nothing Then
@@ -253,7 +290,6 @@ Public Class CompoManagerVM
End Get
End Property
- ' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
Public Sub Ok(ByVal param As Object)
' se errore esco
If Not CompoWindowMap.refCompoWindowVM.m_bDrawOk Then
@@ -284,7 +320,6 @@ Public Class CompoManagerVM
#Region "TrfDataCommand"
- ' Returns a command that manage the MainWindow_Unloaded command
Public ReadOnly Property TrfData_Command() As ICommand
Get
If m_cmdTrfData Is Nothing Then
@@ -294,7 +329,6 @@ Public Class CompoManagerVM
End Get
End Property
- ' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
Public Sub TrfData(ByVal param As Object)
Dim DlgTrfDataVM As New CompoTrfDataWindowVM()
Dim DlgTrfDataV As New CompoTrfDataWindowV(Application.Current.MainWindow, DlgTrfDataVM)
@@ -306,6 +340,28 @@ Public Class CompoManagerVM
#End Region ' TrfDataCommand
+#Region "CsvDataCommand"
+
+ Public ReadOnly Property CsvData_Command() As ICommand
+ Get
+ If m_cmdCsvData Is Nothing Then
+ m_cmdCsvData = New Command(AddressOf CsvData)
+ End If
+ Return m_cmdCsvData
+ End Get
+ End Property
+
+ Public Sub CsvData(ByVal param As Object)
+ Dim DlgCsvDataVM As New CompoCsvDataWindowVM()
+ Dim DlgCsvDataV As New CompoCsvDataWindowV(Application.Current.MainWindow, DlgCsvDataVM)
+ DlgCsvDataVM.SetData(m_sCsvOrder, m_sCsvList, m_sCsvName)
+ If DlgCsvDataV.ShowDialog() Then
+ DlgCsvDataVM.GetData(m_sCsvOrder, m_sCsvList, m_sCsvName)
+ End If
+ End Sub
+
+#End Region ' CsvDataCommand
+
#End Region ' COMMANDS
End Class
diff --git a/CompoWindow/CompoWindowVM.vb b/CompoWindow/CompoWindowVM.vb
index dc51476..1ea0021 100644
--- a/CompoWindow/CompoWindowVM.vb
+++ b/CompoWindow/CompoWindowVM.vb
@@ -39,6 +39,14 @@ Public Class CompoWindowVM
End Get
End Property
+ ' Csv Data
+ Private m_bCsvData As Boolean = False
+ Friend ReadOnly Property bCsvData As Boolean
+ Get
+ Return m_bCsvData
+ End Get
+ End Property
+
Private m_CompoPage As CompoPageOpt
Public Property CompoPage As CompoPageOpt
Get
@@ -110,9 +118,12 @@ Public Class CompoWindowVM
CompoWindowMap.refCompoParamPageVM.Drip_IsEnabled = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.UNDER_CUT)
CompoWindowMap.refCompoListPageVM.Drip_IsEnabled = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.UNDER_CUT)
- ' Abilitazione Nome/TrfData
+ ' Abilitazione TrfData
m_bTrfData = OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.TRF_IMPORT) And
(GetMainPrivateProfileInt(S_COMPO, K_TRFDATA, 0) <> 0)
+ ' Abilitazione CsvData
+ m_bCsvData = Not m_bTrfData And
+ (GetMainPrivateProfileInt(S_COMPO, K_CSVDATA, 0) <> 0)
End Sub
#End Region ' CONSTRUCTOR
@@ -194,24 +205,8 @@ Public Class CompoWindowVM
EgtGetBBoxGlob(nOutLoopLayer, GDB_BB.STANDARD, b3Part)
' Muovo la regione in Z per evitare problemi in visualizzazione
EgtMove(nRegLayId, New Vector3d(0, 0, DELTAZ_REG), GDB_RT.GLOB)
- ' Se pezzo con dati normali
- If Not m_bTrfData Then
- ' Se definito nome lo inserisco nel testo
- If Not String.IsNullOrWhiteSpace(sName) Then
- Dim nTextId = EgtGetFirstInGroup(nRegLayId)
- While nTextId <> GDB_ID.NULL
- If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
- Dim sText As String = String.Empty
- EgtTextGetContent(nTextId, sText)
- Dim sNewText = sName & " " & sText
- EgtModifyText(nTextId, sNewText)
- Exit While
- End If
- nTextId = EgtGetNext(nTextId)
- End While
- End If
- ' altrimenti se pezzo con dati TRF
- Else
+ ' Se pezzo con dati TRF
+ If m_bTrfData Then
' Nome da dati Trf
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
While nTextId <> GDB_ID.NULL
@@ -249,15 +244,52 @@ Public Class CompoWindowVM
EgtSetInfo(Pz, "T", CompoWindowMap.refCompoManagerVM.dTrfThickness)
EgtSetInfo(Pz, "V1", DoubleToString(b3Part.DimX(), 1))
EgtSetInfo(Pz, "V2", DoubleToString(b3Part.DimY(), 1))
+ ' Se altrimenti pezzo con dati Csv
+ ElseIf m_bCsvData Then
+ ' Nome del pezzo
+ EgtSetName( Pz, CompoWindowMap.refCompoManagerVM.sCsvName)
+ ' Dati Csv
+ EgtSetInfo( Pz, INFO_CSV_PART, CompoWindowMap.refCompoManagerVM.sCsvName)
+ EgtSetInfo( Pz, INFO_CSV_ORD, CompoWindowMap.refCompoManagerVM.sCsvOrder)
+ EgtSetInfo( Pz, INFO_CSV_DIST, CompoWindowMap.refCompoManagerVM.sCsvList)
+ EgtSetInfo( Pz, INFO_CSV_MAT, CurrentMachine.CurrMat.sName)
+ EgtSetInfo( Pz, INFO_CSV_V1, DoubleToString( b3Part.DimX(), 1))
+ EgtSetInfo( Pz, INFO_CSV_V2, DoubleToString( b3Part.DimY(), 1))
+ ' Se definito nome lo inserisco nel testo
+ If Not String.IsNullOrWhiteSpace( CompoWindowMap.refCompoManagerVM.sCsvName) Then
+ Dim nTextId = EgtGetFirstInGroup(nRegLayId)
+ While nTextId <> GDB_ID.NULL
+ If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
+ Dim sText As String = String.Empty
+ EgtTextGetContent(nTextId, sText)
+ Dim sNewText = CompoWindowMap.refCompoManagerVM.sCsvName & " " & sText
+ EgtModifyText(nTextId, sNewText)
+ Exit While
+ End If
+ nTextId = EgtGetNext(nTextId)
+ End While
+ End If
+ ' Altrimenti pezzo con dati normali
+ Else
+ ' Se definito nome lo inserisco nel testo
+ If Not String.IsNullOrWhiteSpace(sName) Then
+ Dim nTextId = EgtGetFirstInGroup(nRegLayId)
+ While nTextId <> GDB_ID.NULL
+ If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
+ Dim sText As String = String.Empty
+ EgtTextGetContent(nTextId, sText)
+ Dim sNewText = sName & " " & sText
+ EgtModifyText(nTextId, sNewText)
+ Exit While
+ End If
+ nTextId = EgtGetNext(nTextId)
+ End While
+ End If
End If
' Eventuale testo per indicare il sopra (solo nel caso di rettangolo)
If CompoWindowMap.refCompoManagerVM.Top_Visibility = Visibility.Visible And
CompoWindowMap.refCompoManagerVM.TopIsChecked Then
- Dim dDimX As Double = b3Part.DimX()
- Dim dDimY As Double = b3Part.DimY()
- Dim dH As Double = Math.Min(0.1 * dDimY, 30)
- Dim nText As Integer = EgtCreateTextAdv(nRegLayId, New Point3d(dDimX / 2, dDimY - 0.6 * dH, 0), 0, "*TOP*", "", 500, False, dH, 1, 0, INS_POS.MC)
- EgtSetColor(nText, New Color3d())
+ AddTopToPartRegion( nRegLayId)
End If
' Scrivo testi per nesting
SideEntityControlVM.WriteSideAngleForNest(CompoWindowMap.refCompoSceneHostV.CompoScene.GetCtx())
diff --git a/Constants/ConstIni.vb b/Constants/ConstIni.vb
index b026bb0..e787bcf 100644
--- a/Constants/ConstIni.vb
+++ b/Constants/ConstIni.vb
@@ -82,6 +82,7 @@ Module ConstIni
Public Const K_COMPODIR As String = "CompoDir"
Public Const K_SIDEMODE As String = "SideMode"
Public Const K_TRFDATA As String = "TrfData"
+ Public Const K_CSVDATA As String = "CsvData"
Public Const S_FLATPARTS As String = "FlatParts"
Public Const K_FLPCURRDIR As String = "CurrDir"
@@ -91,6 +92,7 @@ Module ConstIni
Public Const K_MAXSIDEANGLE As String = "MaxSideAngle"
Public Const K_PARSIDE_AS_TRF As String = "ParSideAsTrf"
Public Const K_SIDEANGLE As String = "SideAngle"
+ Public Const K_DELTA_ANG_TG As String = "DeltaAngTg"
Public Const K_DRIPOFFSET As String = "DripOffset"
Public Const K_DRIPOFFSET2 As String = "DripOffset2"
Public Const K_DRIPDEPTH As String = "DripDepth"
@@ -123,6 +125,7 @@ Module ConstIni
Public Const S_RAWPART As String = "RawPart"
Public Const K_RAWCOLOR As String = "RawColor"
Public Const K_KERFCOLOR As String = "KerfColor"
+ Public Const K_SLABID As String = "EnableSlabId"
Public Const K_RAWLENGTH As String = "Length"
Public Const K_RAWWIDTH As String = "Width"
Public Const K_RAWHEIGHT As String = "Height"
diff --git a/DxfImportWindow/DxfImportWindowV.xaml b/DxfImportWindow/DxfImportWindowV.xaml
index 1e31c63..c8402a9 100644
--- a/DxfImportWindow/DxfImportWindowV.xaml
+++ b/DxfImportWindow/DxfImportWindowV.xaml
@@ -65,14 +65,15 @@
Margin="0,0,0,5">
+ Style="{StaticResource CompoWindow_WrapToggleButton}"/>
+ Style="{StaticResource CompoWindow_WrapToggleButton}"
+ IsEnabled="{Binding Drip_IsEnabled}"
+ />
@@ -89,7 +90,8 @@
+ Visibility="{Binding PartData_Visibility}"
+ Margin="0,0,0,10">
@@ -98,7 +100,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0)
' imposto quantità
m_PartNum = 1
NotifyPropertyChanged("PartNum")
@@ -577,8 +664,32 @@ Public Class DxfImportWindowVM
' Muovo la regione in Z per evitare problemi in visualizzazione
Dim nRegId = EgtGetFirstNameInGroup(nId, NAME_REGION)
EgtMove(nRegId, New Vector3d(0, 0, DELTAZ_REG), GDB_RT.GLOB)
+ ' Se file origine Dxf o Nge
+ If m_nFileType = FT.DXF Or m_nFileType = FT.NGE Then
+ ' Eventuale testo per indicare il sopra
+ If TopIsChecked Then
+ AddTopToPartRegion( nRegId)
+ End If
+ ' Se richiesti, inserisco dati Ordine, Distinta, Nome, Origine
+ If m_bEnableOrderList Then
+ ' Cerco il nome del pezzo
+ Dim sName As String = ""
+ EgtGetName( nId, sName)
+ ' Recupero il box del pezzo
+ Dim b3Reg As New BBox3d : EgtGetBBox( nRegId, GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM, b3Reg)
+ ' Aggiungo info equivalenti a CSV
+ EgtSetInfo(nId, INFO_CSV_PART, sName)
+ EgtSetInfo(nId, INFO_CSV_ORD, Order)
+ EgtSetInfo(nId, INFO_CSV_DIST, List)
+ EgtSetInfo(nId, INFO_CSV_MAT, CurrentMachine.CurrMat.sName)
+ EgtSetInfo(nId, INFO_CSV_V1, b3Reg.DimX())
+ EgtSetInfo(nId, INFO_CSV_V2, b3Reg.DimY())
+ End If
+ End If
' Imposto colore testi
EstCalc.SetTextColor( nRegId)
+ ' Imposto path di provenienza
+ EgtSetInfo(nId, INFO_SOU_PATH, m_sFilePath)
' Inserisco in parcheggio
EstCalc.StoreOnePart(nId, True)
' Recupero Id di pezzo successivo
@@ -735,6 +846,8 @@ Public Class DxfImportWindowVM
' Carico il file
LoadCurrFile()
Type_IsEnabled = True
+ PartData_Visibility = Visibility.Visible
+ OrderList_Visibility = Visibility.Visible
End Sub
#End Region ' OpenDxfCommand
diff --git a/EgtStoneLib/ConstMach.vb b/EgtStoneLib/ConstMach.vb
index 7d14258..52bb57f 100644
--- a/EgtStoneLib/ConstMach.vb
+++ b/EgtStoneLib/ConstMach.vb
@@ -85,6 +85,10 @@ Module ConstMach
Public Const NAME_RAW_PHOTO_OUTLINE As String = "RawPhotoOutline"
' Nome testo per Barcode
Public Const NAME_BARCODE As String = "BarCode"
+ ' Info per identificativo blocco
+ Public Const INFO_RAW_BLOCK = "Block"
+ ' Info per numero lastra nel blocco
+ Public Const INFO_RAW_SLABNBR = "SlabNbr"
' Contrassegno di progetto OmagCut
Public Const NAME_PROJMARK As String = "OmagCut"
@@ -203,10 +207,22 @@ Module ConstMach
Public Const INFO_MCH_ORILEADIN As String = "OriLI"
' Info in lavorazione taglio per uscita originale
Public Const INFO_MCH_ORILEADOUT As String = "OriLO"
+ ' Info in pezzo con path di provenienza
+ Public Const INFO_SOU_PATH As String = "SouPath"
' Info in pezzo con path di Csv di provenienza
Public Const INFO_CSV_PATH As String = "CsvPath"
' Info in pezzo con suo nome in Csv
Public Const INFO_CSV_PART As String = "CsvPart"
+ ' Info in pezzo con suo ordine in Csv
+ Public Const INFO_CSV_ORD As String = "CsvOrd"
+ ' Info in pezzo con sua distinta in Csv
+ Public Const INFO_CSV_DIST As String = "CsvDist"
+ ' Info in pezzo con suo materiale in Csv
+ Public Const INFO_CSV_MAT As String = "CsvMat"
+ ' Info in pezzo con dimensione X in Csv
+ Public Const INFO_CSV_V1 As String = "V1"
+ ' Info in pezzo con dimensione Y in Csv
+ Public Const INFO_CSV_V2 As String = "V2"
' Nome layer per valori angoli di inclinazione dei lati
Public Const SIDE_ANGLE_LAYER As String = "SideAngle"
' Nome layer per regioni selezione percorsi interni
diff --git a/EgtStoneLib/CsvM.vb b/EgtStoneLib/CsvM.vb
index 2cf30c2..5010d21 100644
--- a/EgtStoneLib/CsvM.vb
+++ b/EgtStoneLib/CsvM.vb
@@ -178,6 +178,9 @@ Module CsvM
' Aggiungo info su CSV di origine
EgtSetInfo(nId, INFO_CSV_PATH, m_sCsvPath)
EgtSetInfo(nId, INFO_CSV_PART, CurrPart.m_sName)
+ EgtSetInfo(nId, INFO_CSV_ORD, CurrPart.m_sOrd)
+ EgtSetInfo(nId, INFO_CSV_DIST, CurrPart.m_sDist)
+ EgtSetInfo(nId, INFO_CSV_MAT, CurrPart.m_sMaterial)
' Imposto colore testi
EstCalc.SetTextColor( nRegId)
' Lo sposto nel gruppo speciale
@@ -321,6 +324,8 @@ Module CsvM
Dim sN As String = i.ToString()
EgtLuaGetGlobStringVar("CSV.NAME" & sN, OnePart.m_sName)
OnePart.m_bActive = True
+ EgtLuaGetGlobStringVar("CSV.ORD" & sN, OnePart.m_sOrd)
+ EgtLuaGetGlobStringVar("CSV.DIST" & sN, OnePart.m_sDist)
EgtLuaGetGlobStringVar("CSV.MAT" & sN, OnePart.m_sMaterial)
EgtLuaGetGlobIntVar("CSV.COUNT" & sN, OnePart.m_nCount)
OnePart.m_nToNest = OnePart.m_nCount
@@ -386,6 +391,8 @@ Module CsvM
Dim CurrPart As CsvPart = m_CsvPartList(i - 1)
Writer.WriteLine("[P" & i.ToString() & "]")
Writer.WriteLine("Nam=" & CurrPart.m_sName)
+ Writer.WriteLine("Ord=" & CurrPart.m_sOrd)
+ Writer.WriteLine("Dist=" & CurrPart.m_sDist)
Writer.WriteLine("Mat=" & CurrPart.m_sMaterial)
Writer.WriteLine("Act=" & If(CurrPart.m_bActive, "1", "0"))
Writer.WriteLine("Cnt=" & CurrPart.m_nCount.ToString())
@@ -458,6 +465,10 @@ Module CsvM
If sItems.Count() >= 2 Then
If sItems(0) = "Nam" Then
OnePart.m_sName = sItems(1)
+ ElseIf sItems(0) = "Ord" Then
+ OnePart.m_sOrd = sItems(1)
+ ElseIf sItems(0) = "Dist" Then
+ OnePart.m_sDist = sItems(1)
ElseIf sItems(0) = "Mat" Then
OnePart.m_sMaterial = sItems(1)
ElseIf sItems(0) = "Act" Then
@@ -501,6 +512,8 @@ End Module
Public Class CsvPart
Public m_sName As String = String.Empty
+ Public m_sOrd As String = String.Empty
+ Public m_sDist As String = String.Empty
Public m_sMaterial As String = String.Empty
Public m_bActive As Boolean = True
Public m_nCount As Integer = 0
diff --git a/EgtStoneLib/EstCalc.vb b/EgtStoneLib/EstCalc.vb
index bd254bb..8a3b26c 100644
--- a/EgtStoneLib/EstCalc.vb
+++ b/EgtStoneLib/EstCalc.vb
@@ -720,4 +720,40 @@ Module EstCalc
Return True
End Function
+ Public Function AddTopToPartRegion( nRegId As Integer) As Boolean
+ Dim frReg As New Frame3d : EgtGetGroupGlobFrame( nRegId, frReg)
+ Dim b3Reg As New BBox3d : EgtGetBBoxGlob( nRegId, GDB_BB.STANDARD, b3Reg)
+ Dim dH As Double = Math.Min(0.1 * b3Reg.DimY(), 30)
+ Dim ptIns As New Point3d( b3Reg.Center().x, b3Reg.Max().y - dH, 0)
+ ptIns.ToLoc( frReg)
+ Dim nSfrId As Integer = EgtGetFirstInGroup( nRegId)
+ While nSfrId <> GDB_ID.NULL
+ If EgtGetType( nSfrId) = GDB_TY.SRF_FRGN Then Exit While
+ nSfrId = EgtGetNext( nSfrId)
+ End While
+ If nSfrId <> GDB_ID.NULL Then
+ Dim ptStart As New Point3d ( b3Reg.Min().x, b3Reg.Max().y - dH, 0)
+ ptStart.ToLoc( frReg)
+ Dim ptEnd As New Point3d ( b3Reg.Max().x, b3Reg.Max().y - dH, 0)
+ ptEnd.ToLoc( frReg)
+ Dim nLineId As Integer = EgtCreateLine( nRegId, ptStart, ptEnd)
+ Dim nCount As Integer = 0
+ Dim nNewId As Integer = EgtTrimCurveWithRegion( nLineId, nSfrId, True, False, nCount)
+ If nNewId <> GDB_ID.NULL Then
+ If nCount > 0 Then EgtMidPoint( nNewId, ptIns)
+ For nTmpId As Integer = nNewId To nNewId + nCount - 1
+ EgtErase( nTmpId)
+ Next
+ Else
+ EgtErase( nLineId)
+ End If
+ End If
+ Dim vtDir As New Vector3d( 1, 0, 0)
+ vtDir.ToLoc( frReg)
+ Dim dLen, dAngV, dAngH As Double
+ vtDir.ToSpherical( dLen, dAngV, dAngH)
+ Dim nText As Integer = EgtCreateTextAdv(nRegId, ptIns, dAngH, "*TOP*", "", 500, False, dH, 1, 0, INS_POS.MC)
+ Return ( nText <> GDB_ID.NULL)
+ End Function
+
End Module
diff --git a/MainWindow/MainWindowM.vb b/MainWindow/MainWindowM.vb
index 4e255ec..800aafe 100644
--- a/MainWindow/MainWindowM.vb
+++ b/MainWindow/MainWindowM.vb
@@ -174,8 +174,8 @@ Public Class MainWindowM
' Verifico abilitazione nesting automatico
m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey)
' Recupero livello e opzioni della chiave
- Dim bKey As Boolean = EgtGetKeyLevel(9423, 21, 1, m_nKeyLevel) And
- EgtGetKeyOptions(9423, 21, 1, m_nKeyOptions)
+ Dim bKey As Boolean = EgtGetKeyLevel(9423, 22, 1, m_nKeyLevel) And
+ EgtGetKeyOptions(9423, 22, 1, m_nKeyOptions)
' Verifico abilitazione prodotto
Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE)
' Inizializzazione generale di EgtInterface
diff --git a/MainWindow/MainWindowV.xaml b/MainWindow/MainWindowV.xaml
index 01100f7..c9e7d1b 100644
--- a/MainWindow/MainWindowV.xaml
+++ b/MainWindow/MainWindowV.xaml
@@ -5,7 +5,7 @@
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
DataContext="{StaticResource MainWindowVM}"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
- Title="{Binding Title}" Icon="/Resources/OmagCUT.ico"
+ Title="{Binding Title}" Icon="/Resources/OmagOFFICE.ico"
MinHeight="600" MinWidth="800"
AboutBoxCommand="{Binding AboutBoxCommand}" WindowStyle="None" ResizeMode="NoResize"
CloseCommand="{Binding CloseApplicationCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb
index 0f43b6e..16b8f62 100644
--- a/My Project/AssemblyInfo.vb
+++ b/My Project/AssemblyInfo.vb
@@ -69,5 +69,5 @@ Imports System.Windows
' by using the '*' as shown below:
'
-
-
+
+
diff --git a/OmagOFFICE.vbproj b/OmagOFFICE.vbproj
index b7ffcb8..5f61799 100644
--- a/OmagOFFICE.vbproj
+++ b/OmagOFFICE.vbproj
@@ -101,7 +101,7 @@
true
- Resources\OmagCUT.ico
+ Resources\OmagOFFICE.ico
@@ -137,10 +137,14 @@
AboutBoxV.xaml
-
+
+ CompoCsvDataWindowV.xaml
+
+ CompoTrfDataWindowV.xaml
-
+
+ CompoListPageV.xaml
@@ -237,6 +241,10 @@
OptionPanelV.xaml
+
+ SlabIdWindowV.xaml
+
+ RawPartTabV.xaml
@@ -301,7 +309,11 @@
DesignerMSBuild:Compile
-
+
+ MSBuild:Compile
+ Designer
+
+ DesignerMSBuild:Compile
@@ -397,6 +409,10 @@
DesignerMSBuild:Compile
+
+ MSBuild:Compile
+ Designer
+ DesignerMSBuild:Compile
@@ -521,7 +537,7 @@
-
+
@@ -621,6 +637,9 @@
+
+
+ IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagOFFICE\OmagOFFICER32.exe
diff --git a/OptionPanel/RawPartTab/RawPartTabV.xaml b/OptionPanel/RawPartTab/RawPartTabV.xaml
index 6601bdc..681e8a9 100644
--- a/OptionPanel/RawPartTab/RawPartTabV.xaml
+++ b/OptionPanel/RawPartTab/RawPartTabV.xaml
@@ -13,6 +13,15 @@
+