EgtCAM5 1.9l1 :
- migliorate icone della TopBar e di esecuzione script - aggiunti a opzioni fattori di scala per import Dxf, Stl e immagini - aggiunte a opzioni dimensioni immagini di export.
This commit is contained in:
@@ -6,8 +6,22 @@ Friend Module OptionModule
|
||||
' Parametri che contengono lista delle lingue disponibili e lingua selezionata
|
||||
Friend m_LanguageList As New ObservableCollection(Of Language)
|
||||
Friend m_SelectedLanguage As Language
|
||||
' Colori di sfondo della vista e della griglia
|
||||
Friend m_TopSceneBackground As Color3d
|
||||
Friend m_BotSceneBackground As Color3d
|
||||
Friend m_GridColor As Color3d
|
||||
' Flag per visualizzazione smussata delle superfici
|
||||
Friend m_bTriMeshSmoothed As Boolean
|
||||
|
||||
' Colore di default in disegno
|
||||
Friend m_DefMaterialColor As Color3d
|
||||
' Tolleranza geometrica
|
||||
Friend m_dGeometryTolerance As Double
|
||||
|
||||
' Parametri per import
|
||||
Friend m_dDxfScaleFactor As Double
|
||||
Friend m_dStlScaleFactor As Double
|
||||
Friend m_dImgScaleFactor As Double
|
||||
|
||||
' Parametri per export
|
||||
Friend m_nImgWidth As Integer
|
||||
@@ -23,22 +37,52 @@ Friend Module OptionModule
|
||||
Friend m_SelGeomSawFinishing As SceneSelModeOpt
|
||||
Friend m_SelGeomGenMachining As SceneSelModeOpt
|
||||
Friend m_SelGeomChiseling As SceneSelModeOpt
|
||||
|
||||
' Tolleranza geometrica
|
||||
Friend m_GeometryTolerance As Double
|
||||
' Variabile che indica se quando viene creata una nuova operazione di lavorazione deve essere aggiunta in fondo
|
||||
' alla fase o subito dopo la lavorazione selezionata
|
||||
' Flag per aggiungere una nuova lavorazione alla fine della fase o subito dopo la lavorazione selezionata
|
||||
Friend m_bNewMachiningIsLastOne As Boolean
|
||||
' Variabile che indica se usare lo script per calcolare automaticamente la disposizione quando si passa in lavorazione
|
||||
Friend m_bUseDispositionScript As Boolean
|
||||
|
||||
Friend m_TopSceneBackground As Color3d
|
||||
Friend m_BotSceneBackground As Color3d
|
||||
Friend m_GridColor As Color3d
|
||||
Friend m_DefMaterialColor As Color3d
|
||||
|
||||
' inizializzazione lettura variabili ad inizio programma
|
||||
Friend Sub InitOptionModule()
|
||||
' Leggo elenco lingue disponibili da file ini
|
||||
Dim nIndex As Integer = 1
|
||||
Dim ReadLanguage As Language = GetPrivateProfileLanguage(S_LANGUAGES, K_LANGUAGE & nIndex)
|
||||
While Not IsNothing(ReadLanguage)
|
||||
OptionModule.m_LanguageList.Add(ReadLanguage)
|
||||
nIndex += 1
|
||||
ReadLanguage = GetPrivateProfileLanguage(S_LANGUAGES, K_LANGUAGE & nIndex)
|
||||
End While
|
||||
' Inizializzo la lingua corrente
|
||||
Dim sMsgName As String = String.Empty
|
||||
GetPrivateProfileString(S_GENERAL, K_MESSAGES, "", sMsgName)
|
||||
For Each Language In OptionModule.m_LanguageList
|
||||
If Language.Name = sMsgName Then
|
||||
OptionModule.m_SelectedLanguage = Language
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
' Inizializzo variabili colori di sfondo scena, griglia
|
||||
Dim BackTopColor As New Color3d(192, 192, 192)
|
||||
GetPrivateProfileColor(S_SCENE, K_BACKTOP, BackTopColor)
|
||||
m_TopSceneBackground = BackTopColor
|
||||
Dim BackBotColor As New Color3d(BackTopColor)
|
||||
GetPrivateProfileColor(S_SCENE, K_BACKBOTTOM, BackBotColor)
|
||||
m_BotSceneBackground = BackBotColor
|
||||
Dim GridColor As New Color3d(0, 0, 0)
|
||||
GetPrivateProfileColor(S_GRID, K_MINLNCOLOR, GridColor)
|
||||
m_GridColor = GridColor
|
||||
' Inizializzo flag visualizzazione smussata delle superfici
|
||||
m_bTriMeshSmoothed = GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0
|
||||
' Inizio colore di default in disegno
|
||||
Dim DefColor As New Color3d(0, 0, 0)
|
||||
GetPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
|
||||
m_DefMaterialColor = DefColor
|
||||
' Inizializzo tolleranza geometrica
|
||||
m_dGeometryTolerance = GetPrivateProfileDouble(S_GEOMDB, K_SURFTMTOLER, 0.05)
|
||||
' Inizializzo variabili per import
|
||||
m_dDxfScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_DXFSCALE, 1)
|
||||
m_dStlScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_STLSCALE, 1)
|
||||
m_dImgScaleFactor = GetPrivateProfileDouble(S_IMPORT, K_IMGSCALE, 1)
|
||||
' Inizializzo variabili per export
|
||||
m_nImgWidth = GetPrivateProfileInt(S_EXPORT, K_IMGWIDTH, 400)
|
||||
m_nImgHeight = GetPrivateProfileInt(S_EXPORT, K_IMGHEIGHT, 300)
|
||||
@@ -62,25 +106,10 @@ Friend Module OptionModule
|
||||
m_SelGeomGenMachining = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
||||
Temp = GetPrivateProfileInt(S_MACH, K_SELGEOMCHISELING, -1)
|
||||
m_SelGeomChiseling = If(Temp < 0 Or Temp > 3, SceneSelModeOpt.PARTCURVESANDSURFACES, DirectCast(Temp, SceneSelModeOpt))
|
||||
' Inizializzo tolleranza geometrica
|
||||
m_GeometryTolerance = GetPrivateProfileDouble(S_GEOMDB, K_SURFTMTOLER, 0.05)
|
||||
' Inizializzo variabile che indica posizione nuova operazione di lavorazione
|
||||
m_bNewMachiningIsLastOne = If(GetPrivateProfileInt(S_OPTIONS, K_NEWMACHININGISLASTONE, 0) <> 0, True, False)
|
||||
' Inizializzo variabile che indica se usare script di disposizione
|
||||
m_bUseDispositionScript = If(GetPrivateProfileInt(S_OPTIONS, K_USEDISPOSITIONSCRIPT, 0) <> 0, True, False)
|
||||
' Inizializzo variabili colori di sfondo scena, griglia e materiale default
|
||||
Dim BackTopColor As New Color3d(192, 192, 192)
|
||||
GetPrivateProfileColor(S_SCENE, K_BACKTOP, BackTopColor)
|
||||
Dim BackBotColor As New Color3d(BackTopColor)
|
||||
GetPrivateProfileColor(S_SCENE, K_BACKBOTTOM, BackBotColor)
|
||||
Dim DefColor As New Color3d(0, 0, 0)
|
||||
GetPrivateProfileColor(S_GEOMDB, K_DEFAULTCOLOR, DefColor)
|
||||
Dim GridColor As New Color3d(0, 0, 0)
|
||||
GetPrivateProfileColor(S_GRID, K_MINLNCOLOR, GridColor)
|
||||
m_TopSceneBackground = BackTopColor
|
||||
m_BotSceneBackground = BackBotColor
|
||||
m_GridColor = GridColor
|
||||
m_DefMaterialColor = DefColor
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
|
||||
Reference in New Issue
Block a user