Inizio gestione disoposizione DXF in parcheggio
This commit is contained in:
@@ -2814,6 +2814,25 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Friend Function StoreOnePartDXF(nId As Integer, X As Double, Y As Double) As Boolean
|
||||
Const STORE_LARGH As Double = 6000
|
||||
Const STORE_DIST As Double = 200
|
||||
Const STORE_OFFS As Double = 20 + 40 + 20
|
||||
Dim dStoreLarg As Double = GetPrivateProfileDouble("Store", "StoreLargh", STORE_LARGH, m_MainWindow.GetMachIniFile())
|
||||
Dim dStoreDist As Double = GetPrivateProfileDouble("Store", "StoreDist", STORE_DIST, m_MainWindow.GetMachIniFile())
|
||||
Dim dStoreOffs As Double = GetPrivateProfileDouble("Store", "StoreOffs", STORE_OFFS, m_MainWindow.GetMachIniFile())
|
||||
' Recupero box tavola
|
||||
Dim b3Tab As New BBox3d
|
||||
If Not EgtGetTableArea(1, b3Tab) Then
|
||||
b3Tab.Add(New Point3d(0, 0, 0))
|
||||
b3Tab.Add(New Point3d(-3600, -2600, 0))
|
||||
End If
|
||||
Dim vt As New Vector3d(b3Tab.Min.x, b3Tab.Min.y - Y - STORE_DIST, b3Tab.Min.z)
|
||||
EgtMove(nId, vt, GDB_RT.GLOB)
|
||||
EgtSetStatus(nId, GDB_ST.ON_)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function PackPartInStore(nId As Integer) As Boolean
|
||||
' Recupero box tavola
|
||||
Dim b3Tab As New BBox3d
|
||||
|
||||
@@ -961,11 +961,17 @@ Public Class ImportPageUC
|
||||
End While
|
||||
' Nascondo tutti i pezzi inseriti (per evitare interferenze con pezzi in fase di parcheggio)
|
||||
nId = nFirstId
|
||||
Dim GlobBBox As New BBox3d
|
||||
While nId <> GDB_ID.NULL
|
||||
Dim bboxTemp As New BBox3d
|
||||
EgtGetBBox(nId, 0, bboxTemp)
|
||||
GlobBBox.Add(bboxTemp)
|
||||
EgtSetStatus(nId, GDB_ST.OFF)
|
||||
' Passo al pezzo successivo
|
||||
nId = EgtGetNextPart(nId)
|
||||
End While
|
||||
Dim x As Double = GlobBBox.DimX
|
||||
Dim Y As Double = GlobBBox.DimY
|
||||
|
||||
' Ciclo sui pezzi inseriti
|
||||
nId = nFirstId
|
||||
@@ -1002,7 +1008,9 @@ Public Class ImportPageUC
|
||||
' Imposto path di provenienza
|
||||
EgtSetInfo(nId, INFO_SOU_PATH, IO.Path.Combine(m_sCurrDir, m_sCurrFile))
|
||||
' Inserisco in parcheggio
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId, True)
|
||||
' !!!!!!!!!!!!!!!!!! NUOVO PARCHEGGIO !!!!!!!!!!!!!!!!!!!!!!!!
|
||||
' m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId, True)
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePartDXF(nId, x, Y)
|
||||
' Recupero Id di pezzo successivo
|
||||
Dim nNextId As Integer = EgtGetNextPart(nId)
|
||||
' Se richiesto posizionamento diretto, lo eseguo
|
||||
|
||||
Reference in New Issue
Block a user