EgtUILib :
- aggiunto prototipo per creazione FlatRegion - aggiunto comando di creazione di FlatRegion.
This commit is contained in:
+42
-1
@@ -91,6 +91,7 @@ Public Class Controller
|
||||
POLYGONSIDE
|
||||
TEXT
|
||||
TEXTPLUS
|
||||
REGION
|
||||
PLANE
|
||||
EXTRUDE
|
||||
REVOLVE
|
||||
@@ -1057,6 +1058,9 @@ Public Class Controller
|
||||
' Text Plus
|
||||
Case CMD.TEXTPLUS
|
||||
Return ProcessTextPlus()
|
||||
' Region
|
||||
Case CMD.REGION
|
||||
Return ProcessRegion()
|
||||
' Plane
|
||||
Case CMD.PLANE
|
||||
Return ProcessPlane()
|
||||
@@ -3456,6 +3460,43 @@ Public Class Controller
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ProcessRegion() As Boolean
|
||||
If m_nStep <> 0 Then
|
||||
Return False
|
||||
End If
|
||||
' posso partire solo se esiste un gruppo corrente
|
||||
If GetCurrLayer() = GDB_ID.NULL Then
|
||||
Return False
|
||||
End If
|
||||
' creo la regione piana (a partire da uno o più contorni selezionati)
|
||||
EnableCommandLog()
|
||||
If EgtGetSelectedObjCount() = 1 Then
|
||||
EgtCreateSurfTmByFlatContour(GetCurrLayer(), EgtGetLastSelectedObj(), EPS_STM)
|
||||
Else
|
||||
' creo vettore di entità selezionate
|
||||
Dim nCrvNum As Integer = 0
|
||||
Dim nCrvIds(EgtGetSelectedObjCount() - 1) As Integer
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
Select Case EgtGetType(nId)
|
||||
Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO
|
||||
nCrvIds(nCrvNum) = nId
|
||||
nCrvNum = nCrvNum + 1
|
||||
End Select
|
||||
nId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
' creo la superficie
|
||||
EgtCreateSurfFlatRegion(GetCurrLayer(), nCrvIds)
|
||||
End If
|
||||
DisableCommandLog()
|
||||
' reset stato scena
|
||||
m_Scene.ResetStatus()
|
||||
' reset stato
|
||||
m_nStep = 0
|
||||
RaiseEvent UpdateUI(Me, True)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function ProcessPlane() As Boolean
|
||||
If m_nStep <> 0 Then
|
||||
Return False
|
||||
@@ -3482,7 +3523,7 @@ Public Class Controller
|
||||
nId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
' creo la superficie
|
||||
EgtCreateSurfTmByRegion(GetCurrLayer(), nCrvNum, nCrvIds, EPS_STM)
|
||||
EgtCreateSurfTmByRegion(GetCurrLayer(), nCrvIds, EPS_STM)
|
||||
End If
|
||||
DisableCommandLog()
|
||||
' reset stato scena
|
||||
|
||||
Reference in New Issue
Block a user