27 lines
1.4 KiB
Plaintext
27 lines
1.4 KiB
Plaintext
Friend Sub WriteSideAngleForNest(nCtx As Integer)
|
|
' Imposto contesto corrente
|
|
EgtSetCurrentContext(nCtx)
|
|
Dim PartId As Integer = EgtGetFirstPart()
|
|
While PartId <> GDB_ID.NULL
|
|
' Se richiesti lati paralleli con misura sul top come in TRF e non già misure sul top, verifico e aggiusto
|
|
If GetPrivateProfileInt( S_SIDES, K_PARSIDE_AS_TRF, 0, m_MainWindow.GetIniFile()) <> 0 AndAlso
|
|
GetPrivateProfileInt( S_SIDES, K_SIZEALWAYSONTOP, 0, m_MainWindow.GetIniFile()) = 0 Then
|
|
AdjustAsTrfParSides( PartId)
|
|
End If
|
|
' Elimino eventuale precedente layer per testi
|
|
EgtErase(EgtGetFirstNameInGroup(PartId, SIDE_ANGLE_LAYER))
|
|
' Creo layer per testi nesting
|
|
Dim TextLayId As Integer = EgtCreateGroup(PartId)
|
|
EgtSetName(TextLayId, SIDE_ANGLE_LAYER)
|
|
EgtSetColor(TextLayId, New Color3d(0, 0, 128))
|
|
' Opero su geometria esterna pezzo
|
|
WriteSideAngleOnLoop(EgtGetFirstNameInGroup(PartId, NAME_OUTLOOP), TextLayId)
|
|
' Ciclo su geometria interna pezzo
|
|
Dim LoopId As Integer = EgtGetFirstNameInGroup(PartId, NAME_INLOOP)
|
|
While LoopId <> GDB_ID.NULL
|
|
WriteSideAngleOnLoop(LoopId, TextLayId)
|
|
LoopId = EgtGetNextName(LoopId, NAME_INLOOP)
|
|
End While
|
|
PartId = EgtGetNextPart(PartId)
|
|
End While
|
|
End Sub |