OmagCUT 1.6l7 :
- aggiornamenti per nesting.
This commit is contained in:
+4
-4
@@ -6,10 +6,10 @@
|
||||
|
||||
Public Overrides Function Init() As Boolean
|
||||
' Assegno valori ad assi per test
|
||||
d_axis_position(0) = -3740 + 2000
|
||||
d_axis_position(1) = -2424 + 363.5 + 800
|
||||
d_axis_position(2) = -1379.5 + 45 + 50 + 50
|
||||
d_axis_position(8) = 90.0
|
||||
d_axis_position(0) = -1500
|
||||
d_axis_position(1) = -1300
|
||||
d_axis_position(2) = -1240
|
||||
d_axis_position(8) = 67.315
|
||||
d_axis_position(7) = 90.0
|
||||
|
||||
Return True
|
||||
|
||||
@@ -59,6 +59,8 @@ Module ConstGen
|
||||
Public Const NAME_KERF As String = "Kerf"
|
||||
' Chiave per info di kerf nel grezzo
|
||||
Public Const KEY_KERF As String = "Kerf"
|
||||
' Nome della regione fuori kerf nel grezzo
|
||||
Public Const NAME_OUTKERF As String = "SheetOut"
|
||||
|
||||
' Contrassegno di progetto OmagCut
|
||||
Public Const NAME_PROJMARK As String = "OmagCut"
|
||||
|
||||
+17
-2
@@ -87,6 +87,8 @@ Public Class NestPageUC
|
||||
Not m_CurrProjPage.CurrentProjectScene.IsStatusNull() Then
|
||||
Return
|
||||
End If
|
||||
' Per default no drag
|
||||
m_bDrag = False
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
EgtSetObjFilterForSelect(True, True, True, True, True)
|
||||
Dim nSel As Integer
|
||||
@@ -111,6 +113,8 @@ Public Class NestPageUC
|
||||
m_nPartPos = IIf(bPartInTable, PART_POS.IN_TABLE, PART_POS.OUT_TABLE)
|
||||
End If
|
||||
EgtDraw()
|
||||
' Drag possibile
|
||||
m_bDrag = True
|
||||
Exit While
|
||||
End If
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
@@ -121,7 +125,7 @@ Public Class NestPageUC
|
||||
End If
|
||||
' Dati per drag
|
||||
m_locPrev = e.Location
|
||||
m_bDrag = EgtUnProjectPoint(e.Location, m_ptPrev)
|
||||
m_bDrag = m_bDrag AndAlso EgtUnProjectPoint(e.Location, m_ptPrev)
|
||||
m_bDragToStart = m_bDrag
|
||||
End Sub
|
||||
|
||||
@@ -150,12 +154,23 @@ Public Class NestPageUC
|
||||
' Ricavo il vettore di movimento
|
||||
Dim vtMove As Vector3d = ptCurr - m_ptPrev
|
||||
' Muovo i pezzi selezionati di quanto possibile
|
||||
If vtMove.SqLen() > 100 * EPS_SMALL * EPS_SMALL Then
|
||||
If vtMove.SqLen() > EPS_SMALL * EPS_SMALL Then
|
||||
' annullo deselezione
|
||||
m_nIdToDesel = GDB_ID.NULL
|
||||
' muovo il pezzo
|
||||
EgtMoveSelectedPartCluster(m_bReducedCut, vtMove, m_ptRawMin.x + m_dKerf, m_ptRawMin.y + m_dKerf,
|
||||
m_ptRawMax.x - m_dKerf, m_ptRawMax.y - m_dKerf)
|
||||
' se movimento risultante nullo
|
||||
If vtMove.IsSmall() Then
|
||||
' se tangente recuperabile di ostacolo lineare
|
||||
Dim vtTang As Vector3d
|
||||
If EgtGetObstacleTangent(vtTang) OrElse EgtGetMovingTangent(vtTang) Then
|
||||
vtMove = ((ptCurr - m_ptPrev) * vtTang) * vtTang
|
||||
' riprovo con il movimento corretto
|
||||
EgtMoveSelectedPartCluster(m_bReducedCut, vtMove, m_ptRawMin.x + m_dKerf, m_ptRawMin.y + m_dKerf,
|
||||
m_ptRawMax.x - m_dKerf, m_ptRawMax.y - m_dKerf)
|
||||
End If
|
||||
End If
|
||||
EgtDraw()
|
||||
End If
|
||||
' Aggiorno il punto precedente
|
||||
|
||||
+1
-1
@@ -145,7 +145,7 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="2" Style="{StaticResource OmagCut_GradientBlueIconButton}" Click="OkBtn_Click">
|
||||
<Button Name="OkBtn" Grid.Column="2" Style="{StaticResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="Resources/V.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
@@ -373,6 +373,9 @@ Public Class RawPartPageUC
|
||||
' Cancello eventuale vecchio contorno di kerf
|
||||
Dim nKerfId As Integer = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_KERF)
|
||||
EgtErase(nKerfId)
|
||||
' Cancello eventuale vecchia regione fuori kerf per nesting
|
||||
Dim nOutKerfId As Integer = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_OUTKERF)
|
||||
EgtErase(nOutKerfId)
|
||||
' box grezzo
|
||||
Dim ptMin, ptMax As Point3d
|
||||
GetRawBox(ptMin, ptMax)
|
||||
|
||||
Reference in New Issue
Block a user