Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 953083e429 | |||
| c11925e90f | |||
| d745119195 | |||
| aa283fd190 | |||
| 243125cbb4 | |||
| 2789051005 | |||
| 0b13379731 | |||
| 6cc7ba8ccd | |||
| 36674aeb65 | |||
| 9aa9b51710 | |||
| 15b87d7911 | |||
| c8bf133113 | |||
| faba640eee | |||
| e9ff1c198b |
@@ -18,6 +18,7 @@ Module ConstIni
|
||||
Public Const S_GENERAL As String = "General"
|
||||
Public Const K_DEBUG As String = "Debug"
|
||||
Public Const K_LICENCE As String = "Licence"
|
||||
Public Const K_NETKEY As String = "NetKey"
|
||||
Public Const K_USERLEVEL As String = "UserLevel"
|
||||
Public Const K_MAXINST As String = "MaxInstances"
|
||||
Public Const K_INSTANCES As String = "Instances"
|
||||
@@ -103,6 +104,7 @@ Module ConstIni
|
||||
Public Const K_ENGRAVENUMBER2 As String = "EngraveNumber2"
|
||||
Public Const K_ENGRAVEDEPTH As String = "EngraveDepth"
|
||||
Public Const K_ENGRAVESHORT As String = "EngraveShort"
|
||||
Public Const K_ENGRAVEDEPTH2 As String = "EngraveDepth2"
|
||||
Public Const K_DRIPOFFSET As String = "DripOffset"
|
||||
Public Const K_DRIPOFFSET2 As String = "DripOffset2"
|
||||
Public Const K_DRIPDEPTH As String = "DripDepth"
|
||||
|
||||
@@ -95,6 +95,74 @@ Friend Module CamAuto
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllSplitCurv() As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
|
||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, "AUX_SPLIT_WJ")
|
||||
EgtErase(IdAuxLayer)
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
EgtRemoveInfo(nIdMy, "JoinEntity")
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
nIdPart = EgtGetNextPart(nIdPart)
|
||||
End While
|
||||
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
|
||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, "AUX_SPLIT_WJ")
|
||||
EgtErase(IdAuxLayer)
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
EgtRemoveInfo(nIdMy, "JoinEntity")
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||
End While
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllStartCurv() As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
EgtRemoveInfo(nIdLayerOutLoop, "Start")
|
||||
nIdPart = EgtGetNextPart(nIdPart)
|
||||
End While
|
||||
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
EgtRemoveInfo(nIdLayerOutLoop, "Start")
|
||||
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||
End While
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
' verifico che il contorno passato non sia stato separato
|
||||
Friend Function VerifyOutLoopIsClosed(nIdLayerOutLoop As Integer) As Boolean
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
Dim nValInfo As Integer = 1
|
||||
If EgtGetInfo(nIdMy, "JoinEntity", nValInfo) Then
|
||||
If nValInfo = 0 Then Return False
|
||||
End If
|
||||
EgtRemoveInfo(nIdMy, "JoinEntity")
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function RemoveFinalEmptyPhases() As Boolean
|
||||
Dim nOpeId As Integer = EgtGetLastOperation()
|
||||
While nOpeId <> GDB_ID.NULL
|
||||
|
||||
@@ -251,6 +251,12 @@ Module ConstMach
|
||||
Public Const SELECT_REGION_LAYER As String = "SelectRegion"
|
||||
' Info in pezzo per stato rotazione
|
||||
Public Const INFO_PARTROT As String = "ROT"
|
||||
' Info in entità in OutLoop per indicare se è separata WaterJet
|
||||
Public Const INFO_JOINTENTITY As String = "JoinEntity"
|
||||
' Nome layer per "*" inidcanti un lato separato nel taglio WaterJet
|
||||
Public Const INFO_AUX_SPLIT_WJ As String = "AUX_SPLIT_WJ"
|
||||
' Info in OutLoop per punto inzio lavorazione WaterJet
|
||||
Public Const INFO_START As String = "Start"
|
||||
|
||||
' Nome di pezzo che è una cornice
|
||||
Public Const NAME_FRAME As String = "Frame"
|
||||
|
||||
@@ -192,6 +192,8 @@ Public Class MainWindowM
|
||||
Dim sNestKey As String = ""
|
||||
EgtUILib.GetPrivateProfileString( S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
|
||||
EgtSetNestKey( sNestKey)
|
||||
Dim bNetHwKey As Boolean = ( GetMainPrivateProfileInt(S_GENERAL, K_NETKEY, 0) = 1)
|
||||
EgtSetNetHwKey( bNetHwKey)
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey)
|
||||
' Recupero livello e opzioni della chiave
|
||||
|
||||
@@ -69,6 +69,6 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.4.5.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.5.1")>
|
||||
<Assembly: AssemblyVersion("2.4.5.4")>
|
||||
<Assembly: AssemblyFileVersion("2.4.5.4")>
|
||||
|
||||
|
||||
@@ -248,6 +248,10 @@ Public Class MyMachGroupPanelVM
|
||||
' aggiungo alla lista delle lastre correnti/orig
|
||||
Dim sSlabNameDB As String = GetSlabName()
|
||||
LoadSlabsList(sSlabNameDB)
|
||||
|
||||
' imposto la visibilità dei comandi per il waterjet
|
||||
OmagOFFICEMap.refNestingTabVM.Set_WJ_Cmd_Visibility()
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
@@ -797,6 +797,15 @@ Public Class SplitModeVM
|
||||
vtXY.Normalize()
|
||||
Dim ptCen As Point3d = Point3d.Media(ptMin, ptMax) + vtXY * If(Not b2ndLav, -0.8, 0.8) * dHtxt
|
||||
ptCen.z = ptMax.z + 1
|
||||
|
||||
' ricavo la posizione del punto (se waterjet separata)
|
||||
If m_MachiningList(nI).m_nType = MCH_OY.WATERJETTING Or m_MachiningList(nI).m_nType = MCH_OY.MILLING Then
|
||||
Dim ptMid As Point3d
|
||||
Dim vVers As Vector3d
|
||||
MidPointOfCurve(m_MachiningList(nI).m_nId, ptMid, vVers)
|
||||
ptCen = ptMid ' + vVers * If(Not b2ndLav, -0.8, 0.8) * dHtxt
|
||||
End If
|
||||
|
||||
If bNumber Then
|
||||
Dim nNbrId As Integer = EgtCreateTextAdv(m_nNbrGrpId, ptCen, 0, (nI + 1).ToString(), "",
|
||||
300, False, dHtxt, dRat, 0, INS_POS.MC)
|
||||
@@ -851,6 +860,36 @@ Public Class SplitModeVM
|
||||
Return EgtGetBBoxGlob(nPvId, GDB_BB.STANDARD, ptMin, ptMax)
|
||||
End Function
|
||||
|
||||
Private Function MidPointOfCurve(nOperId As Integer, ByRef ptMid As Point3d, ByRef vVers As Vector3d) As Boolean
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
' creo un layer ausiliario per creare la curva composita
|
||||
Dim AuxLayer As Integer = EgtCreateGroup(nPvId)
|
||||
' imposto la lavorazione corrente
|
||||
EgtSetCurrMachining(nOperId)
|
||||
' recupero tutte le entità della lavorazione corrente
|
||||
Dim nInd As Integer = 0
|
||||
Dim nIdCurr As Integer
|
||||
Dim nSub As Integer
|
||||
Dim CurveCompoList As New List(Of Integer)
|
||||
While EgtGetMachiningGeometry(nInd, nIdCurr, nSub)
|
||||
CurveCompoList.Add(nIdCurr)
|
||||
nInd += 1
|
||||
End While
|
||||
Dim PtNearStart As Point3d
|
||||
Dim nIdCutPath As Integer = EgtCreateCurveCompoByChain(AuxLayer, CurveCompoList.ToArray, PtNearStart, False)
|
||||
Dim dLength As Double = 0
|
||||
EgtCurveLength(nIdCutPath, dLength)
|
||||
Dim dParam As Double = 0
|
||||
EgtCurveParamAtLength(nIdCutPath, dLength / 2, dParam)
|
||||
EgtAtParamPoint(nIdCutPath, dParam, GDB_RT.GLOB, ptMid)
|
||||
EgtAtParamVector(nIdCutPath, dParam, -1, vVers)
|
||||
vVers.Normalize()
|
||||
vVers.Rotate(Vector3d.Z_AX, 90)
|
||||
EgtErase(AuxLayer)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function AddMachiningDirection(ptStart As Point3d, vtDir As Vector3d, dLen As Double, bTwin As Boolean) As Integer
|
||||
Dim dArrX As Double = dLen * Math.Cos(30 * Math.PI / 180)
|
||||
Dim dArrY As Double = dLen * Math.Sin(30 * Math.PI / 180)
|
||||
|
||||
@@ -137,24 +137,24 @@
|
||||
|
||||
</Border>
|
||||
|
||||
<UniformGrid Grid.Column="0" Columns="2" Margin="0,0,0,5">
|
||||
<Button Content="{Binding InsertPartMsg}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Command="{Binding InsertPartCommand}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<Button Content="{Binding StorePartMsg}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Command="{Binding StorePartCommand}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
<UniformGrid Grid.Column="0" Columns="2" Margin="0,0,0,5">
|
||||
<Button Content="{Binding InsertPartMsg}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Command="{Binding InsertPartCommand}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<Button Content="{Binding StorePartMsg}" Grid.Column="1"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Command="{Binding StorePartCommand}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
<!--<ToggleButton Content="{Binding StartCurvWJMsg}" Grid.Column="2"
|
||||
Visibility="{Binding StartCurvWJ_Visibility}"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"
|
||||
IsChecked="{Binding bStartCurvWJ}"
|
||||
Margin="2.5,0,2.5,0"/>-->
|
||||
</UniformGrid>
|
||||
|
||||
<Grid Margin="0,0,-2.5,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<UniformGrid Grid.Column="0" Columns="{Binding CountColumn}" Margin="0,0,0,5">
|
||||
<Button Content="{Binding RemovePartMsg}"
|
||||
Grid.ColumnSpan="{Binding DragRectangle_Cl_Span}"
|
||||
Style="{StaticResource OptionPanel_TextButton}"
|
||||
Command="{Binding RemovePartCommand}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
@@ -163,8 +163,23 @@
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"
|
||||
IsChecked="{Binding bDragRectangle}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
</Grid>
|
||||
<!--<ToggleButton Content="{Binding SplitCurvWJMsg}" Grid.Column="2"
|
||||
Visibility="{Binding SplitCurvWJ_Visibility}"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"
|
||||
IsChecked="{Binding bSplitCurvWJ}"
|
||||
Margin="2.5,0,2.5,0"/>-->
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Grid.Column="0" Columns="2" Margin="0,0,0,5" Visibility="{Binding WJ_Cmd_Visibility}">
|
||||
<ToggleButton Content="{Binding SplitCurvWJMsg}" Grid.Column="2"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"
|
||||
IsChecked="{Binding bSplitCurvWJ}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
<ToggleButton Content="{Binding StartCurvWJMsg}" Grid.Column="2"
|
||||
Style="{StaticResource OptionPanel_ToggleButton}"
|
||||
IsChecked="{Binding bStartCurvWJ}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Columns="2" Margin="0,0,0,5">
|
||||
<Button Content="{Binding SelectAllMsg}"
|
||||
|
||||
@@ -46,6 +46,9 @@ Public Class NestingTabVM
|
||||
Private m_SideListRectangle(4) As Integer
|
||||
Private m_sTextContent As String = String.Empty
|
||||
|
||||
' Id dei lato WJ da separare tramite comando ON_OFF
|
||||
Private m_nIdSelectedSideWJ As Integer = GDB_ID.NULL
|
||||
Private m_nIdSelectedWaterJet As Integer = GDB_ID.NULL
|
||||
|
||||
Private m_CsvImportWindow As CsvWindowV
|
||||
Friend ReadOnly Property CsvImportWindow As CsvWindowV
|
||||
@@ -152,6 +155,13 @@ Public Class NestingTabVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_CountColumn As Integer = 1
|
||||
Public ReadOnly Property CountColumn As Integer
|
||||
Get
|
||||
Return m_CountColumn
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property InsertPartMsg As String
|
||||
@@ -178,6 +188,20 @@ Public Class NestingTabVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SplitCurvWJMsg As String
|
||||
Get
|
||||
'91133=Separa
|
||||
Return EgtMsg(91133)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property StartCurvWJMsg As String
|
||||
Get
|
||||
'91132=Start
|
||||
Return EgtMsg(91132)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SelectAllMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_NESTPAGEUC + 4)
|
||||
@@ -198,7 +222,7 @@ Public Class NestingTabVM
|
||||
|
||||
Public ReadOnly Property CsvDataMsg As String
|
||||
Get
|
||||
Return EgtMsg( 90398) 'Dati Csv
|
||||
Return EgtMsg(90398) 'Dati Csv
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -230,11 +254,12 @@ Public Class NestingTabVM
|
||||
Sub New()
|
||||
If GetMainPrivateProfileInt(S_NEST, K_DRAGRECTANGLE, 1) <> 0 Then
|
||||
m_DragRectangle_Visibility = Visibility.Visible
|
||||
m_CountColumn += 1
|
||||
Else
|
||||
m_DragRectangle_Visibility = Visibility.Collapsed
|
||||
End If
|
||||
NotifyPropertyChanged("DragRectangle_Visibility")
|
||||
NotifyPropertyChanged("DragRectangle_Cl_Span")
|
||||
NotifyPropertyChanged("CountColumn")
|
||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||
OmagOFFICEMap.SetRefNestingTabVM(Me)
|
||||
End Sub
|
||||
@@ -580,7 +605,7 @@ Public Class NestingTabVM
|
||||
End If
|
||||
' recupero il gruppo della lavorazione associata
|
||||
Dim nIdParentPart As Integer = EgtGetParent(nIdParent)
|
||||
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, "PV")
|
||||
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, NAME_PREVIEW)
|
||||
' se non esiste un gruppo di lavorazione associato allora esco
|
||||
If nIdPV = GDB_ID.NULL Then
|
||||
'm_CurrProjPage.ClearMessage()
|
||||
@@ -846,6 +871,12 @@ Public Class NestingTabVM
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bDragRectangle = value
|
||||
m_bSplitCurvWJ = False
|
||||
ResetSplitCurvWJParam(True)
|
||||
m_bStartCurvWJ = False
|
||||
ResetStartCurvWJParam(True)
|
||||
NotifyPropertyChanged("bSplitCurvWJ")
|
||||
NotifyPropertyChanged("bStartCurvWJ")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -856,15 +887,401 @@ Public Class NestingTabVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property DragRectangle_Cl_Span As Integer
|
||||
Get
|
||||
If m_DragRectangle_Visibility = Visibility.Visible Then
|
||||
Return 1
|
||||
#Region "WATERJET SPLIT CURVE"
|
||||
|
||||
' funzione per la selezione dei lati su cui operare la separazione del tagli waterjet
|
||||
Private Sub OnMyMouseDownSceneSplitCurv(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
' Si può selezionare solo con il tasto sinistro e se il bottone TEST Attivo
|
||||
If e.Button <> Windows.Forms.MouseButtons.Left Or
|
||||
Not m_bSplitCurvWJ Then
|
||||
Return
|
||||
End If
|
||||
' Se esiste un elemento selezionato
|
||||
EgtResetMark(m_nIdSelectedWaterJet)
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||
Dim nSelMy As Integer
|
||||
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSelMy)
|
||||
Dim nIdMy As Integer = EgtGetFirstObjInSelWin()
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
Dim sLayer As String = String.Empty
|
||||
' layer di origine
|
||||
Dim nIdParent As Integer = EgtGetParent(nIdMy)
|
||||
' recupero il nome del Layer
|
||||
EgtGetName(nIdParent, sLayer)
|
||||
' solo se il nome del layer è quello associato ad un lato esterno allora procedo con l'evidenziazione
|
||||
If sLayer = NAME_OUTLOOP Then
|
||||
If EgtGetType(nIdMy) = GDB_TY.CRV_ARC OrElse EgtGetType(nIdMy) = GDB_TY.CRV_COMPO OrElse EgtGetType(nIdMy) = GDB_TY.CRV_LINE Then
|
||||
If m_nIdSelectedSideWJ <> GDB_ID.NULL Or m_nIdSelectedSideWJ = nIdMy Then
|
||||
EgtDeselectObj(m_nIdSelectedSideWJ)
|
||||
End If
|
||||
' recupero il gruppo della lavorazione associata
|
||||
Dim nIdParentPart As Integer = EgtGetParent(nIdParent)
|
||||
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, NAME_PREVIEW)
|
||||
' VERIFICA: recupero l'elenco delle Preview di Tipo WaterJet associate a questo Part
|
||||
Dim ListGroup As List(Of Integer) = ResearchGropuWJ(nIdParent, nIdPV)
|
||||
' VERIFICA: se esistono delle lavorazioni associate al percorso OutLoop di tipo Saw allora non procedo
|
||||
Dim ListGroupSaw As List(Of Integer) = ResearchGropuSaw(nIdParent, nIdPV)
|
||||
' se non esiste almeno 1 Preview di tipo WaterJet
|
||||
If ListGroup.Count > 0 And ListGroupSaw.Count = 0 Then
|
||||
m_nIdSelectedSideWJ = nIdMy
|
||||
Dim nValInfo As Integer = 1
|
||||
Dim nNewValInfo As Integer = nValInfo
|
||||
If EgtGetInfo(nIdMy, INFO_JOINTENTITY, nValInfo) Then
|
||||
If nValInfo = 1 Then
|
||||
nNewValInfo = 0
|
||||
Else
|
||||
nNewValInfo = 1
|
||||
End If
|
||||
Else
|
||||
' se manca l'info allora il taglio sValInfo = "1" quindi separo il taglio
|
||||
nNewValInfo = 0
|
||||
End If
|
||||
EgtSetInfo(nIdMy, INFO_JOINTENTITY, nNewValInfo)
|
||||
' Ricalcolo tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
' recupero l'indice del PreView che deve essere acceso per indicare la selezione
|
||||
ListGroup = ResearchGropuWJ(nIdParent, nIdPV)
|
||||
Dim nIdWJ As Integer = GetPVIdFromIdSide(ListGroup, nIdMy)
|
||||
GetCurrentPVFromIdSide(ListGroup, nIdMy, nIdWJ, nIdParent)
|
||||
' assegno un identificativo grafico per inidcare che è un taglio separato
|
||||
If nNewValInfo = 0 Then
|
||||
AssignFlagOnGraphic(nIdMy, nIdParentPart)
|
||||
Else
|
||||
EraseFlagOnGraphic(nIdMy, nIdParentPart)
|
||||
End If
|
||||
' salvo il valore del PreView evidenziato
|
||||
m_nIdSelectedWaterJet = nIdWJ
|
||||
EgtSetMark(nIdWJ)
|
||||
EgtSelectObj(nIdMy)
|
||||
EgtDraw()
|
||||
Exit While
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
Return 2
|
||||
nIdMy = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
Return
|
||||
End Sub
|
||||
|
||||
' restituisce l'elenco dei Gruppi Waterjet associati al contorno indicato
|
||||
Public Function ResearchGropuWJ(nIdOutLoop As Integer, nIdPV As Integer) As List(Of Integer)
|
||||
Dim ListOfGroupPV As New List(Of Integer)
|
||||
Dim nIdGroup As Integer = GDB_ID.NULL
|
||||
Dim nIdMy As Integer = GDB_ID.NULL
|
||||
' recupero il primo lato dall'elenco dei lati della figura
|
||||
nIdMy = EgtGetFirstInGroup(nIdOutLoop)
|
||||
' altrimenti cerco all'interno del layer OutLoop per ogni lato la lavorazione associata
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
' verifico se esiste una Preview associata al lato
|
||||
nIdGroup = EgtGetFirstNameInGroup(nIdPV, "Waterjet" & nIdMy.ToString & "S")
|
||||
If nIdGroup <> GDB_ID.NULL Then
|
||||
ListOfGroupPV.Add(nIdGroup)
|
||||
End If
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
Return ListOfGroupPV
|
||||
End Function
|
||||
|
||||
' restituisce l'elenco dei Gruppi Saw associati al contorno indicato
|
||||
Public Function ResearchGropuSaw(nIdOutLoop As Integer, nIdPV As Integer) As List(Of Integer)
|
||||
Dim ListOfGroupPV As New List(Of Integer)
|
||||
Dim nIdGroup As Integer = GDB_ID.NULL
|
||||
Dim nIdMy As Integer = GDB_ID.NULL
|
||||
' recupero il primo lato dall'elenco dei lati della figura
|
||||
nIdMy = EgtGetFirstInGroup(nIdOutLoop)
|
||||
' altrimenti cerco all'interno del layer OutLoop per ogni lato la lavorazione associata
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
' verifico se esiste una Preview associata al lato
|
||||
nIdGroup = EgtGetFirstNameInGroup(nIdPV, "Saw" & nIdMy.ToString)
|
||||
If nIdGroup <> GDB_ID.NULL Then
|
||||
ListOfGroupPV.Add(nIdGroup)
|
||||
End If
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
Return ListOfGroupPV
|
||||
End Function
|
||||
|
||||
Public Function GetPVIdFromIdSide(ListGroup As List(Of Integer), nIdMy As Integer) As Integer
|
||||
Dim IdWaterjetPV As Integer = GDB_ID.NULL
|
||||
For Each nIdItem As Integer In ListGroup
|
||||
Dim sName As String = String.Empty
|
||||
If EgtGetName(nIdItem, sName) Then
|
||||
If sName.Contains(nIdMy.ToString) Then
|
||||
IdWaterjetPV = nIdItem
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Return IdWaterjetPV
|
||||
End Function
|
||||
|
||||
Public Sub GetCurrentPVFromIdSide(ListGroup As List(Of Integer), nIdMy As Integer, ByRef nIdWj As Integer, nIdParent As Integer)
|
||||
Dim nObjInGroup As Integer = EgtGetGroupObjs(nIdParent)
|
||||
Dim nCount As Integer = 0
|
||||
GetNextSideJoint(ListGroup, nIdMy, nIdWj, nCount, nObjInGroup)
|
||||
If nIdWj <> GDB_ID.NULL Then Return
|
||||
GetPrevSideJoint(ListGroup, nIdMy, nIdWj, nCount, nObjInGroup)
|
||||
End Sub
|
||||
|
||||
' funzione ricorsiva per la ricerca del lato al quale è associata la PreView
|
||||
Private Sub GetNextSideJoint(ListGroup As List(Of Integer), nIdMy As Integer, ByRef nIdWj As Integer, ByRef nCount As Integer, nObjInGroup As Integer)
|
||||
Dim nValInfo As Integer = 1
|
||||
' espressione di controllo per evitare di generare Loop infinito
|
||||
If nCount > nObjInGroup Then Return
|
||||
If nIdWj = GDB_ID.NULL Then
|
||||
Dim nIdWJNext As Integer = EgtGetNext(nIdMy)
|
||||
If nIdWJNext = GDB_ID.NULL Then nIdWJNext = EgtGetFirstInGroup(EgtGetParent(nIdMy))
|
||||
nCount += 1
|
||||
EgtGetInfo(nIdWJNext, "JoinEntity", nValInfo)
|
||||
If nValInfo = 1 Then
|
||||
nIdWj = GetPVIdFromIdSide(ListGroup, nIdWJNext)
|
||||
If nIdWj <> GDB_ID.NULL Then Return
|
||||
Else
|
||||
Return
|
||||
End If
|
||||
'nIdWJNext = EgtGetNext(nIdWJNext)
|
||||
GetNextSideJoint(ListGroup, nIdWJNext, nIdWj, nCount, nObjInGroup)
|
||||
If nIdWj <> GDB_ID.NULL Then Return
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' funzione ricorsiva per la ricerca del lato al quale è associata la PreView
|
||||
Private Sub GetPrevSideJoint(ListGroup As List(Of Integer), nIdMy As Integer, ByRef nIdWj As Integer, ByRef nCount As Integer, nObjInGroup As Integer)
|
||||
Dim nValInfo As Integer = 1
|
||||
' espressione di controllo per evitare di generare Loop infinito
|
||||
If nCount > nObjInGroup Then Return
|
||||
If nIdWj = GDB_ID.NULL Then
|
||||
Dim nIdWJPrev As Integer = EgtGetPrev(nIdMy)
|
||||
' se arrivato al primo valore allora continuo la ricerca dall'ultimo
|
||||
If nIdWJPrev = GDB_ID.NULL Then nIdWJPrev = EgtGetLastInGroup(EgtGetParent(nIdMy))
|
||||
nCount += 1
|
||||
EgtGetInfo(nIdWJPrev, INFO_JOINTENTITY, nValInfo)
|
||||
If nValInfo = 1 Then
|
||||
nIdWj = GetPVIdFromIdSide(ListGroup, nIdWJPrev)
|
||||
If nIdWj <> GDB_ID.NULL Then Return
|
||||
Else
|
||||
Return
|
||||
End If
|
||||
'nIdWJPrev = EgtGetPrev(nIdWJPrev)
|
||||
GetPrevSideJoint(ListGroup, nIdWJPrev, nIdWj, nCount, nObjInGroup)
|
||||
If nIdWj <> GDB_ID.NULL Then Return
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub ResetSplitCurvWJParam(Optional bAllParam As Boolean = True)
|
||||
If bAllParam Then
|
||||
EgtDeselectObj(m_nIdSelectedSideWJ)
|
||||
EgtResetMark(m_nIdSelectedWaterJet)
|
||||
End If
|
||||
m_nIdSelectedSideWJ = GDB_ID.NULL
|
||||
m_nIdSelectedWaterJet = GDB_ID.NULL
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
' ricevo l'ID del percorso di lavorazione WJ al quale associo una etichetta grafica con scritto "S"
|
||||
Private Sub AssignFlagOnGraphic(nIdMy As Integer, IdParentPart As Integer)
|
||||
' cerco se esiste già un layer nominato "AUX_SPLIT_WJ", altrimenti lo creo
|
||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(IdParentPart, INFO_AUX_SPLIT_WJ)
|
||||
If IdAuxLayer = GDB_ID.NULL Then
|
||||
IdAuxLayer = EgtCreateGroup(IdParentPart)
|
||||
EgtSetName(IdAuxLayer, INFO_AUX_SPLIT_WJ)
|
||||
End If
|
||||
' recupero il punto medio del segmento selezionato
|
||||
Dim MidPoint As Point3d
|
||||
EgtMidPoint(nIdMy, GDB_RT.GLOB, MidPoint)
|
||||
'Dim nIdTextFlag As Integer = EgtCreateText(IdAuxLayer, MidPoint, "*", 20, GDB_RT.GLOB)
|
||||
Dim nIdTextFlag As Integer = GetCreateFlagText(nIdMy, IdAuxLayer)
|
||||
EgtSetColor(nIdTextFlag, New Color3d(255, 0, 0))
|
||||
EgtSetName(nIdTextFlag, "RefSide_" & nIdMy.ToString)
|
||||
End Sub
|
||||
|
||||
Private Function GetCreateFlagText(nId As Integer, nIdLayer As Integer, Optional sText As String = "*") As Integer
|
||||
' recupero il punto medio
|
||||
Dim MidPoint As Point3d
|
||||
EgtMidPoint(nId, GDB_RT.GLOB, MidPoint)
|
||||
' recupero la direzione del vettore nel punto medio
|
||||
Dim vVers As Vector3d
|
||||
EgtMidVector(nId, GDB_RT.GLOB, vVers)
|
||||
vVers.Normalize()
|
||||
vVers.Rotate(Vector3d.Z_AX, 90)
|
||||
' Ingombro complessivo della lavorazione
|
||||
Dim ptMin, ptMax As Point3d
|
||||
EgtStartPoint(nId, GDB_RT.GLOB, ptMin)
|
||||
EgtEndPoint(nId, GDB_RT.GLOB, ptMax)
|
||||
' Metto il numero nel centro
|
||||
Dim dRadXY = Point3d.DistXY(ptMin, ptMax)
|
||||
Dim dHtxt As Double = 50
|
||||
Dim dRat As Double = 0.75
|
||||
If dRadXY < 200 Then
|
||||
dHtxt = 40
|
||||
dRat = 0.6
|
||||
ElseIf dRadXY < 25 Then
|
||||
dHtxt = 25
|
||||
dRat = 0.5
|
||||
End If
|
||||
' determino la posizione del flag
|
||||
MidPoint.x += vVers.x * dHtxt / 2
|
||||
MidPoint.y += vVers.y * dHtxt / 2
|
||||
|
||||
Return EgtCreateTextAdv(nIdLayer, MidPoint, 0, sText, "", 300, False, dHtxt, dRat, 0, INS_POS.MC, GDB_RT.GLOB)
|
||||
End Function
|
||||
|
||||
Private Sub EraseFlagOnGraphic(nIdMy As Integer, IdParentPart As Integer)
|
||||
' cerco se esiste già un layer nominato "AUX_SPLIT_WJ", altrimenti lo creo
|
||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(IdParentPart, INFO_AUX_SPLIT_WJ)
|
||||
If IdAuxLayer = GDB_ID.NULL Then Return
|
||||
Dim nIdTextFlag As Integer = EgtGetFirstNameInGroup(IdAuxLayer, "RefSide_" & nIdMy.ToString)
|
||||
EgtErase(nIdTextFlag)
|
||||
End Sub
|
||||
|
||||
#End Region ' WaterJet Section and StartPoint
|
||||
|
||||
Private m_bSplitCurvWJ As Boolean
|
||||
Public Property bSplitCurvWJ As Boolean
|
||||
Get
|
||||
Return m_bSplitCurvWJ
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bSplitCurvWJ = value
|
||||
If Not m_bSplitCurvWJ Then
|
||||
' resetto i parametri di selezione dei lati
|
||||
ResetSplitCurvWJParam(True)
|
||||
End If
|
||||
m_bDragRectangle = False
|
||||
m_bStartCurvWJ = False
|
||||
ResetStartCurvWJParam(True)
|
||||
NotifyPropertyChanged("bDragRectangle")
|
||||
NotifyPropertyChanged("bStartCurvWJ")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_WJ_Cmd_Visibility As Visibility = Visibility.Collapsed
|
||||
Public ReadOnly Property WJ_Cmd_Visibility As Visibility
|
||||
Get
|
||||
Return m_WJ_Cmd_Visibility
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' in funzione della macchinata attiva predispone la visualizzazione del bottone SplitCurv (abilitato solo per WaterJet Machine)
|
||||
Public Sub Set_WJ_Cmd_Visibility()
|
||||
' gestisco la visualizzazione del comando ON_OFF (per i tagli waterjet)
|
||||
If CurrentMachine.WaterJettingActive Then
|
||||
m_WJ_Cmd_Visibility = Visibility.Visible
|
||||
Else
|
||||
m_WJ_Cmd_Visibility = Visibility.Collapsed
|
||||
End If
|
||||
NotifyPropertyChanged("WJ_Cmd_Visibility")
|
||||
End Sub
|
||||
|
||||
#Region "WATERJET START POINT"
|
||||
|
||||
' funzione per la selezione del punto di inizio tagli waterjet (percorso chiuso)
|
||||
Private Sub OnMyMouseDownSceneStartCurv(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
' Si può selezionare solo con il tasto sinistro e se il bottone TEST Attivo
|
||||
If e.Button <> Windows.Forms.MouseButtons.Left Or
|
||||
Not m_bStartCurvWJ Then
|
||||
Return
|
||||
End If
|
||||
|
||||
' Acquisisco punto da disegno
|
||||
Dim ptStartCurv As New Point3d
|
||||
EgtUnProjectPoint(e.Location, ptStartCurv)
|
||||
' Aggiusto Z punto acquisito (è in globale)
|
||||
Dim ptRawMax As New Point3d
|
||||
Dim ptRawMin As New Point3d
|
||||
If GetRawBox(ptRawMin, ptRawMax) Then
|
||||
ptStartCurv.z = ptRawMax.z
|
||||
End If
|
||||
|
||||
' Se esiste un elemento selezionato
|
||||
EgtResetMark(m_nIdSelectedWaterJet)
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||
Dim nSelMy As Integer
|
||||
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSelMy)
|
||||
Dim nIdMy As Integer = EgtGetFirstObjInSelWin()
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
Dim sLayer As String = String.Empty
|
||||
' layer di origine
|
||||
Dim nIdParent As Integer = EgtGetParent(nIdMy)
|
||||
' recupero il nome del Layer
|
||||
EgtGetName(nIdParent, sLayer)
|
||||
' solo se il nome del layer è quello associato ad un lato esterno allora procedo con l'evidenziazione
|
||||
If sLayer = NAME_OUTLOOP Or sLayer = NAME_INLOOP Then
|
||||
If EgtGetType(nIdMy) = GDB_TY.CRV_ARC OrElse EgtGetType(nIdMy) = GDB_TY.CRV_COMPO OrElse EgtGetType(nIdMy) = GDB_TY.CRV_LINE Then
|
||||
' verifico che il contorno sia chiuso, altrimenti esco
|
||||
If Not VerifyOutLoopIsClosed(nIdParent) Then
|
||||
'91131=Il contorno non è chiuso
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(91131), MSG_TYPE.WARNING)
|
||||
Exit While
|
||||
End If
|
||||
' recupero il gruppo della lavorazione associata
|
||||
Dim nIdParentPart As Integer = EgtGetParent(nIdParent)
|
||||
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, NAME_PREVIEW)
|
||||
' VERIFICA: recupero l'elenco delle Preview di Tipo WaterJet_n_S associate a questo Part
|
||||
Dim ListGroup As List(Of Integer) = ResearchGropuWJ(nIdParent, nIdPV)
|
||||
' VERIFICA: se esistono delle lavorazioni associate al percorso OutLoop di tipo Saw allora non procedo
|
||||
Dim ListGroupSaw As List(Of Integer) = ResearchGropuSaw(nIdParent, nIdPV)
|
||||
' se non esiste almeno 1 Preview di tipo WaterJet
|
||||
If ListGroup.Count = 1 And ListGroupSaw.Count = 0 Then
|
||||
EgtSetInfo(nIdParent, INFO_START, ptStartCurv)
|
||||
' Ricalcolo tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
' recupero l'indice del PreView che deve essere acceso per indicare la selezione
|
||||
ListGroup = ResearchGropuWJ(nIdParent, nIdPV)
|
||||
Dim nIdWJ As Integer = GetPVIdFromIdSide(ListGroup, nIdMy)
|
||||
GetCurrentPVFromIdSide(ListGroup, nIdMy, nIdWJ, nIdParent)
|
||||
m_nIdSelectedWaterJet = nIdWJ
|
||||
EgtSetMark(nIdWJ)
|
||||
EgtDraw()
|
||||
Exit While
|
||||
Else
|
||||
'91131=Il contorno non è chiuso
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(91131), MSG_TYPE.WARNING)
|
||||
Exit While
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
nIdMy = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
Return
|
||||
End Sub
|
||||
|
||||
#End Region ' Water Start Point
|
||||
|
||||
Private m_bStartCurvWJ As Boolean
|
||||
Public Property bStartCurvWJ As Boolean
|
||||
Get
|
||||
Return m_bStartCurvWJ
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bStartCurvWJ = value
|
||||
If Not m_bStartCurvWJ Then
|
||||
ResetStartCurvWJParam(True)
|
||||
End If
|
||||
m_bDragRectangle = False
|
||||
m_bSplitCurvWJ = False
|
||||
ResetSplitCurvWJParam(True)
|
||||
NotifyPropertyChanged("bDragRectangle")
|
||||
NotifyPropertyChanged("bSplitCurvWJ")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub ResetStartCurvWJParam(Optional bAllParam As Boolean = True)
|
||||
If bAllParam Then
|
||||
EgtDeselectObj(m_nIdSelectedSideWJ)
|
||||
EgtResetMark(m_nIdSelectedWaterJet)
|
||||
End If
|
||||
m_nIdSelectedSideWJ = GDB_ID.NULL
|
||||
m_nIdSelectedWaterJet = GDB_ID.NULL
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
@@ -1450,6 +1867,10 @@ Public Class NestingTabVM
|
||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||
' Cancello eventuali messaggi
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
' cancello tutti i tagli di separazione
|
||||
ResetAllSplitCurv()
|
||||
' cancello tutti i punti di inizio (Waterjet)
|
||||
ResetAllStartCurv()
|
||||
' Cancello tutte le lavorazioni
|
||||
CamAuto.EraseMachinings(GDB_ID.NULL)
|
||||
' Reinserisco tutte le lavorazioni piane
|
||||
@@ -1512,8 +1933,8 @@ Public Class NestingTabVM
|
||||
EgtTextGetContent( nTextId, sText)
|
||||
Dim nPos As Integer = sText.IndexOf( sCsvName)
|
||||
Dim sNewText As String
|
||||
If nPos < 0 Then
|
||||
sNewText = sNewName & "<br/>" & sText
|
||||
If nPos <0 Then
|
||||
sNewText= sNewName & "<br/>" & sText
|
||||
Else
|
||||
sNewText = sText.Remove( nPos, sCsvName.Length()).Insert( nPos, sNewName)
|
||||
End If
|
||||
@@ -1547,6 +1968,17 @@ Public Class NestingTabVM
|
||||
m_vtTotMove = Vector3d.NULL()
|
||||
Return
|
||||
End If
|
||||
' se in modalità separazione curve WaterJet
|
||||
If m_bSplitCurvWJ Then
|
||||
OnMyMouseDownSceneSplitCurv(sender, e)
|
||||
Return
|
||||
End If
|
||||
' se in modalità punto inizio curve WaterJet
|
||||
If m_bStartCurvWJ Then
|
||||
OnMyMouseDownSceneStartCurv(sender, e)
|
||||
Return
|
||||
End If
|
||||
|
||||
' Per default no drag
|
||||
m_bDrag = False
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
@@ -1610,7 +2042,7 @@ Public Class NestingTabVM
|
||||
If Not m_bDrag Or m_bDragging Then Return
|
||||
' Se primo movimento di drag, verifico di aver superato la soglia di movimento in pixel
|
||||
If m_bDragToStart Then
|
||||
If Math.Abs(e.Location.X - m_locPrev.X) < m_nRestRadius And
|
||||
If Math.Abs(e.Location.X - m_locPrev.X) <m_nRestRadius And
|
||||
Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
Return
|
||||
End If
|
||||
@@ -1729,6 +2161,17 @@ Public Class NestingTabVM
|
||||
ResetDragRectangleParam()
|
||||
Return
|
||||
End If
|
||||
' verifico che sia attivo il comando di modifica tagli waterjet
|
||||
If m_bSplitCurvWJ Then
|
||||
' deseleziono gli oggeti, resetto le variabili usate, aggiorno il disegno
|
||||
' ResetSplitCurvWJParam(False)
|
||||
Return
|
||||
End If
|
||||
If m_bStartCurvWJ Then
|
||||
' ResetStartCurvWJParam(False)
|
||||
Return
|
||||
End If
|
||||
|
||||
' Se eseguito drag
|
||||
If Not m_bDragToStart Then
|
||||
' Se movimento con sola verifica finale
|
||||
|
||||
@@ -347,11 +347,16 @@ Public Class SideEntityControlVM
|
||||
Return LenToString(m_Parameter4, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
If m_Mode <> ModeOpt.SIDEANGLE Then
|
||||
If m_Mode = ModeOpt.DRIP Then
|
||||
StringToLen(value, m_Parameter4)
|
||||
m_dDripShort = m_Parameter4
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||
StringToLen(value, m_Parameter4)
|
||||
m_dEngraveDepth2 = m_Parameter4
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -376,6 +381,7 @@ Public Class SideEntityControlVM
|
||||
Private m_dDripOffset2 As Double = 0
|
||||
Private m_nEngrNbr2 As Integer = 1
|
||||
Private m_dDripDepth As Double = 10
|
||||
Private m_dEngraveDepth2 As Double = 5
|
||||
Private m_dDripShort As Double = 0
|
||||
|
||||
Private m_CallingWndScene As Scene
|
||||
@@ -415,10 +421,10 @@ Public Class SideEntityControlVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Parameter4Msg As String = EgtMsg(MSG_IMPORTPAGEUC + 12)
|
||||
Private m_Parameter4Msg As String = EgtMsg(MSG_IMPORTPAGEUC + 11) & "2"
|
||||
Public Property Parameter4Msg As String
|
||||
Get
|
||||
Return m_Parameter4Msg ' Accorciamento
|
||||
Return m_Parameter4Msg ' Affondamento2
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Parameter4Msg = value
|
||||
@@ -482,7 +488,7 @@ Public Class SideEntityControlVM
|
||||
Else
|
||||
' Temporaneamente lo disabilito
|
||||
Parameter23_Visibility = Windows.Visibility.Visible
|
||||
Parameter4_Visibility = Visibility.Collapsed
|
||||
Parameter4_Visibility = Visibility.Visible
|
||||
Parameter2ab_Visibility = Visibility.Visible
|
||||
Parameter2_Visibility = Visibility.Hidden
|
||||
End If
|
||||
@@ -512,12 +518,13 @@ Public Class SideEntityControlVM
|
||||
m_nEngrNbr2 = GetMainPrivateProfileInt(S_SIDES, K_ENGRAVENUMBER2, 1)
|
||||
m_dDripDepth = GetMainPrivateProfileDouble(S_SIDES, K_DRIPDEPTH, 10)
|
||||
m_dDripShort = GetMainPrivateProfileDouble(S_SIDES, K_DRIPSHORT, 0)
|
||||
m_dEngraveDepth2 = GetMainPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH2, 0)
|
||||
SetParameter1(m_dDripOffset)
|
||||
SetParameter2(m_dDripOffset2)
|
||||
SetParameter2a(m_nEngrNbr2)
|
||||
SetParameter2b(m_dDripOffset2)
|
||||
SetParameter3(m_dDripDepth)
|
||||
SetParameter4(m_dDripShort)
|
||||
SetParameter4(m_dEngraveDepth2)
|
||||
|
||||
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
|
||||
' definisco i nomi dei campi
|
||||
@@ -536,6 +543,9 @@ Public Class SideEntityControlVM
|
||||
LoadCurrentCompo()
|
||||
End If
|
||||
|
||||
' aggiorno i testi sui lati della figura
|
||||
RefreshSideAngleText()
|
||||
|
||||
' Aggiorno visualizzazione
|
||||
If CallingWindow = CallingWindowOpt.COMPO Then
|
||||
EgtZoom(ZM.ALL)
|
||||
@@ -717,7 +727,7 @@ Public Class SideEntityControlVM
|
||||
End If
|
||||
|
||||
' Aggiorno interfaccia
|
||||
If m_CallingWindow = CallingWindowOpt.DXFIMPORT Then
|
||||
If m_CallingWindow = CallingWindowOpt.DXFIMPORT Or m_CallingWindow = CallingWindowOpt.COMPO Then
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
For Each Entity In m_SideEntityList
|
||||
If DirectCast(Entity, SideAngleEntity).dSideAngle <> 0 Then
|
||||
@@ -1101,6 +1111,9 @@ Public Class SideEntityControlVM
|
||||
Dim nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
While nCrvId <> GDB_ID.NULL
|
||||
EgtOffsetCurve(nCrvId, -m_dDripOffset, OFF_TYPE.EXTEND)
|
||||
If m_Mode = ModeOpt.ENGRAVE Then
|
||||
EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
||||
End If
|
||||
nCrvId = EgtGetNext(nCrvId)
|
||||
End While
|
||||
' Eventuali curve aggiuntive con offset2
|
||||
@@ -1111,10 +1124,14 @@ Public Class SideEntityControlVM
|
||||
For i As Integer = 1 To m_nEngrNbr2
|
||||
Dim nNewId As Integer = EgtCopy(nCrvId, nCrvId, GDB_POS.AFTER)
|
||||
EgtOffsetCurve(nNewId, -i * m_dDripOffset2, OFF_TYPE.EXTEND)
|
||||
If m_Mode = ModeOpt.ENGRAVE Then
|
||||
EgtSetInfo(nNewId, INFO_DEPTH, m_dEngraveDepth2)
|
||||
End If
|
||||
Next
|
||||
nCrvId = nNextCrvId
|
||||
End While
|
||||
End If
|
||||
|
||||
If m_Mode = ModeOpt.DRIP Then
|
||||
' Esplodo nelle curve componenti
|
||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
@@ -1137,7 +1154,7 @@ Public Class SideEntityControlVM
|
||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
While nCrvId <> GDB_ID.NULL
|
||||
EgtSetColor(nCrvId, COL_MCH_DRIPCUT())
|
||||
EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
||||
' EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
||||
EgtSetInfo(nCrvId, INFO_STRICT, If(m_dDripShort > EPS_SMALL, "3", "0"))
|
||||
nCrvId = EgtGetNext(nCrvId)
|
||||
End While
|
||||
@@ -1266,8 +1283,8 @@ Public Class SideEntityControlVM
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
WriteMainPrivateProfileString(S_SIDES, K_SIDEANGLE, DoubleToString(m_Parameter1, 3))
|
||||
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
||||
WriteMainPrivateProfileString(S_SIDES, K_FILOTOPOFFSET, DoubleToString(m_Parameter1, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_FILOTOPDEPTH, DoubleToString(m_Parameter2, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_FILOTOPOFFSET, LenToString(m_Parameter1, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_FILOTOPDEPTH, LenToString(m_Parameter2, 3))
|
||||
' Aggiorno affondamento del profilo
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
@@ -1283,10 +1300,10 @@ Public Class SideEntityControlVM
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
ElseIf m_Mode = ModeOpt.DRIP Then
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET, DoubleToString(m_dDripOffset, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET2, DoubleToString(m_dDripOffset2, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPDEPTH, DoubleToString(m_dDripDepth, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPSHORT, DoubleToString(m_dDripShort, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET, LenToString(m_dDripOffset, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET2, LenToString(m_dDripOffset2, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPDEPTH, LenToString(m_dDripDepth, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPSHORT, LenToString(m_dDripShort, 3))
|
||||
For Each objEntity In m_SideEntityList
|
||||
If TypeOf objEntity Is DripEntity Then
|
||||
Dim CurrEntity As DripEntity = DirectCast(objEntity, DripEntity)
|
||||
@@ -1295,11 +1312,12 @@ Public Class SideEntityControlVM
|
||||
End If
|
||||
Next
|
||||
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEOFFSET, DoubleToString(m_dDripOffset, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEOFFSET2, DoubleToString(m_dDripOffset2, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEOFFSET, LenToString(m_dDripOffset, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEOFFSET2, LenToString(m_dDripOffset2, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVENUMBER2, m_nEngrNbr2.ToString)
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, DoubleToString(m_dDripDepth, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVESHORT, DoubleToString(m_dDripShort, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, LenToString(m_dDripDepth, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVESHORT, LenToString(m_dDripShort, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEDEPTH2, LenToString(m_dEngraveDepth2, 3))
|
||||
For Each objEntity In m_SideEntityList
|
||||
If TypeOf objEntity Is DripEntity Then
|
||||
Dim CurrEntity As DripEntity = DirectCast(objEntity, DripEntity)
|
||||
|
||||
Reference in New Issue
Block a user