diff --git a/Icarus/Constants/ConstGen.vb b/Icarus/Constants/ConstGen.vb index 30e31c2..1e1ccef 100644 --- a/Icarus/Constants/ConstGen.vb +++ b/Icarus/Constants/ConstGen.vb @@ -34,6 +34,7 @@ Public Module ConstGen MATERIALDB = 5 MACHININGDB = 6 CURRMACHINING = 7 + MODIFYPART = 8 End Enum ' MOdalita' di modifica diff --git a/Icarus/ImportPanel/ImportPanelVM.vb b/Icarus/ImportPanel/ImportPanelVM.vb index 00c5747..ec7ee57 100644 --- a/Icarus/ImportPanel/ImportPanelVM.vb +++ b/Icarus/ImportPanel/ImportPanelVM.vb @@ -364,6 +364,7 @@ Public Class ImportPanelVM EgtSetMode(nFrameId, GDB_MD.LOCKED) End If EgtSetInfo(nReferenceLayerId, KEY_REFERENCE, PrintSolidEntity.Reference) + EgtMove(nPartId, New Vector3d(0, 0, -b3PrintSolid.Min.z)) ' lo aggiungo a lista pezzi Dim sFilePath As String = "" EgtGetInfo(m_nImportedPartId, FILE_PATH, sFilePath) diff --git a/Icarus/LeftPanel/LeftPanelV.xaml b/Icarus/LeftPanel/LeftPanelV.xaml index 82dc800..377cf51 100644 --- a/Icarus/LeftPanel/LeftPanelV.xaml +++ b/Icarus/LeftPanel/LeftPanelV.xaml @@ -35,6 +35,9 @@ + + ''' Returns a command that do CPlaneTop. + ''' + Public ReadOnly Property PartModify_Command As ICommand + Get + If m_cmdPartModify Is Nothing Then + m_cmdPartModify = New Command(AddressOf PartModify) + End If + Return m_cmdPartModify + End Get + End Property + + ''' + ''' Execute the CPlaneTop. This method is invoked by the CPlaneTopCommand. + ''' + Public Sub PartModify() + If IsNothing(m_SelPart) Then Return + SelPage = Pages.MODIFYPART + End Sub + +#End Region ' PartModify + #Region "Machining" ''' diff --git a/Icarus/ViewLayerManager/ViewLayerManagerVM.vb b/Icarus/ViewLayerManager/ViewLayerManagerVM.vb index 6c2694d..0da700b 100644 --- a/Icarus/ViewLayerManager/ViewLayerManagerVM.vb +++ b/Icarus/ViewLayerManager/ViewLayerManagerVM.vb @@ -166,9 +166,11 @@ Public Class ViewLayer Map.refTopPanelVM.SetTopPanelIsEnabled(True) Map.refViewLayerManagerVM.SetViewLayerManagerIsEnabled(True) End If - If Map.refTopPanelVM.SelPage = Pages.SLICE Then - Map.refSliderManagerVM.SetSliderVisibility(bIsVisible) - End If + End If + If Map.refTopPanelVM.SelPage = Pages.SLICE AndAlso (m_Type = ViewLayerType.SOLID_SLICE OrElse m_Type = ViewLayerType.SLICE_TOOLPATH) Then + 'If Then + ' Map.refSliderManagerVM.SetSliderVisibility(Map.refViewLayerManagerVM.LayerList.Any(Function(x) (x.Type = ViewLayerType.SOLID_SLICE OrElse x.Type = ViewLayerType.START_MACHINING) AndAlso x.bIsVisible)) + 'End If End If Dim Status As GDB_ST = If(bIsVisible, GDB_ST.ON_, GDB_ST.OFF) For Each CurrPart In Map.refTopPanelVM.PartList @@ -187,14 +189,14 @@ Public Class ViewLayer EgtSetStatus(CurrPart.nAuxSolidsLayerId, Status) Case ViewLayerType.SOLID_SLICE For Each Layer In Map.refTopPanelVM.SelPart.LayerList - EgtSetStatus(Layer.nLayerId, GDB_ST.ON_) + 'EgtSetStatus(Layer.nLayerId, GDB_ST.ON_) For Each Entity In Layer.SolidLayerIdList EgtSetStatus(Entity, Status) Next Next Case ViewLayerType.SLICE_TOOLPATH For Each Layer In Map.refTopPanelVM.SelPart.LayerList - EgtSetStatus(Layer.nLayerId, GDB_ST.ON_) + 'EgtSetStatus(Layer.nLayerId, GDB_ST.ON_) For Each Entity In Layer.ToolPathLayerIdList EgtSetStatus(Entity, Status) Next