diff --git a/Icarus/ReferencePanel/ReferencePanelVM.vb b/Icarus/ReferencePanel/ReferencePanelVM.vb index 0cce7dd..1e4da42 100644 --- a/Icarus/ReferencePanel/ReferencePanelVM.vb +++ b/Icarus/ReferencePanel/ReferencePanelVM.vb @@ -115,6 +115,9 @@ Public Class ReferencePanelVM ElseIf EgtGetInfo(SelPart.nPartId, KEY_MOVEDPART2, vtMovedPart) Then ptOrig = ptOrig - vtMovedPart End If + ' elimino precedente + EgtEmptyGroup(SelPart.nPartReferenceLayerId) + ' creo nuovo frame Dim nPartFrameId As Integer = EgtCreateGeoFrame(SelPart.nPartReferenceLayerId, New Frame3d(ptOrig), GDB_RT.GLOB) EgtSetStatus(nPartFrameId, GDB_ST.OFF) ' elimino componente Z diff --git a/Icarus/SliceManager/SliceManagerVM.vb b/Icarus/SliceManager/SliceManagerVM.vb index 00a0427..3358c73 100644 --- a/Icarus/SliceManager/SliceManagerVM.vb +++ b/Icarus/SliceManager/SliceManagerVM.vb @@ -461,8 +461,11 @@ Public Class SliceManagerVM Dim b3Part As New BBox3d Dim b3PrintSolid As New BBox3d EgtGetBBoxGlob(CurrPart.nPartId, GDB_BB.STANDARD, b3Part) - EgtGetBBoxGlob(CurrPart.nPrintSolidId, GDB_BB.STANDARD, b3PrintSolid) - Dim nRawId As Integer = EgtAddRawPart(b3PrintSolid.Min, b3PrintSolid.DimX, b3PrintSolid.DimY, b3PrintSolid.DimZ, New Color3d(128, 128, 128, 30)) + b3PrintSolid = Map.refDispositionPanelVM.GetSolidForReferenceBBox( CurrPart) + Dim dRawDimX As Double = Math.Max(b3PrintSolid.DimX, 1.0) + Dim dRawDimY As Double = Math.Max(b3PrintSolid.DimY, 1.0) + Dim dRawDimZ As Double = Math.Max(b3PrintSolid.DimZ, 1.0) + Dim nRawId As Integer = EgtAddRawPart(b3PrintSolid.Min, dRawDimX, dRawDimY, dRawDimZ, New Color3d(128, 128, 128, 30)) EgtAddPartToRawPart(CurrPart.nPartId, Point3d.ORIG() + (b3Part.Min - b3PrintSolid.Min), nRawId) EgtMoveToCornerRawPart(nRawId, b3PrintSolid.Min, MCH_CR.BL) Next