Merge branch 'Features/3D_In_VeinMatch' of https://gitlab.steamware.net/egalware-cadcam/interfacce/omagoffice into Features/3D_In_VeinMatch

This commit is contained in:
Daniele Bariletti
2024-01-16 15:36:30 +01:00
2 changed files with 33 additions and 1 deletions
+21
View File
@@ -952,6 +952,27 @@ Friend Module CamAuto
End If
End Function
Friend Function GetRawHeightFromPart(CurrIdPart As Integer, VeinCtx As Integer, MachCtx As Integer) As Double
Dim H As Double = 5
EgtSetCurrentContext(MachCtx)
Dim IdRaw As Integer = EgtGetFirstRawPart()
While IdRaw <> GDB_ID.NULL
Dim IdPart As Integer = EgtGetFirstPartInRawPart(IdRaw)
While IdPart <> GDB_ID.NULL
If IdPart = CurrIdPart Then
Dim ptRawMin, ptRawMax As Point3d
EgtGetRawPartBBox(GetCurrentRaw(), ptRawMin, ptRawMax)
EgtSetCurrentContext(VeinCtx)
Return ptRawMax.z - ptRawMin.z
End If
IdPart = EgtGetNextPartInRawPart(IdPart)
End While
IdRaw = EgtGetNextRawPart(IdRaw)
End While
EgtSetCurrentContext(VeinCtx)
Return H
End Function
Friend Function UpdateAllRawsZ(dDeltaZ As Double) As Boolean
For i As Integer = 1 To EgtGetPhaseCount()
EgtSetCurrPhase(i)
+12 -1
View File
@@ -1293,6 +1293,9 @@ Public Class VeinMatchingWindow
Dim IdFP As Integer = EgtGetFirstPart()
Dim sName As String = String.Empty
While IdFP <> GDB_ID.NULL And sName <> "SOLID"
Dim nOriId As Integer = GDB_ID.NULL
EgtGetInfo(IdFP, KEY_ORI_ID, nOriId)
dThick = GetRawHeightFromPart(nOriId, m_nVeinCtx, OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
CreateSolid(IdFP, dThick, False)
IdFP = EgtGetNextPart(IdFP)
EgtGetName(IdFP, sName)
@@ -1333,8 +1336,16 @@ Public Class VeinMatchingWindow
ResetAllSolids()
End Sub
Private Sub TgBtn_Rotation_Click(sender As Object, e As RoutedEventArgs) Handles TgBtn_Rotation.Click
Private Sub TgBtn_Rotation_Click(sender As Object, e As RoutedEventArgs) Handles TgBtn_Rotation.Checked
' ? boh non lo so, attiva la modalità rotazione
If m_nIdPart = GDB_ID.NULL Then Return
Dim PartSolidSel = GetPartSolid(m_nIdPart)
Dim PtMin As Point3d
Dim PtMax As Point3d
EgtGetPartBBoxGlob(PartSolidSel.PartId, PtMin, PtMax)
Dim MaxLen As Double = Math.Max(PartSolidSel.bbSolid.DimX, PartSolidSel.bbSolid.DimY)
MaxLen = Math.Max(MaxLen, PartSolidSel.bbSolid.DimZ)
' procedo a disegnare gli assi..
End Sub
Private Sub RotatePart(dAng As Double)