OmagOFFICE 1.8k2 :
- tagli inclinati di colore diverso.
This commit is contained in:
@@ -269,7 +269,7 @@ Public Class SideEntityControlVM
|
||||
' If DirectCast(Entity, SideAngleEntity).dSideAngle <> 0 Then
|
||||
|
||||
' End If
|
||||
' 'AddTextToLine(Entity.sEntityName & " = " & DoubleToString(Entity.dSideAngle, 1) & "°", Entity.nTextId, Entity.nGeomId, 10, dBBoxRad, True)
|
||||
' 'AddTextToLine(Entity.sEntityName & " = " & DoubleToString(Entity.dSideAngle, 1) & "°", Entity.nTextId, Entity.nGeomId, 20, dBBoxRad, True)
|
||||
' Next
|
||||
'End Sub
|
||||
|
||||
@@ -297,6 +297,7 @@ Public Class SideEntityControlVM
|
||||
Else
|
||||
TextLayer = EgtCreateGroup(Part1)
|
||||
EgtSetName(TextLayer, SIDE_ANGLE_LAYER)
|
||||
EgtSetColor(TextLayer, New Color3d(0, 0, 0))
|
||||
End If
|
||||
|
||||
' Se modalità angoli di inclinazione...
|
||||
@@ -304,13 +305,13 @@ Public Class SideEntityControlVM
|
||||
' Per ogni entità, creo testo con nome e angolo di inclinazione
|
||||
For Each Entity In m_SideEntityList
|
||||
Dim sText As String = Entity.sEntityName & " = " & DoubleToString(DirectCast(Entity, SideAngleEntity).dSideAngle, 1) & "°"
|
||||
AddTextToLine(sText, Entity.nTextId, Entity.nGeomId, 10, dBBoxRad, True)
|
||||
AddTextToLine(sText, Entity.nTextId, Entity.nGeomId, 20, dBBoxRad, True)
|
||||
Next
|
||||
' Altrimenti modalità gocciolatoio
|
||||
Else
|
||||
' Per ogni entità creo testo con nome
|
||||
For Each Entity In m_SideEntityList
|
||||
AddTextToLine(Entity.sEntityName, Entity.nTextId, Entity.nGeomId, 10, dBBoxRad, True)
|
||||
AddTextToLine(Entity.sEntityName, Entity.nTextId, Entity.nGeomId, 20, dBBoxRad, True)
|
||||
Next
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
CreateDripGeom(Part1)
|
||||
@@ -343,6 +344,7 @@ Public Class SideEntityControlVM
|
||||
If TextLayer = GDB_ID.NULL Then
|
||||
TextLayer = EgtCreateGroup(Part1)
|
||||
EgtSetName(TextLayer, SIDE_ANGLE_LAYER)
|
||||
EgtSetColor(TextLayer, New Color3d(0, 0, 0))
|
||||
End If
|
||||
|
||||
Dim LastLine As Integer = EgtGetLastInGroup(OutLoop)
|
||||
@@ -500,11 +502,11 @@ Public Class SideEntityControlVM
|
||||
' Cancello inclinazione nell'apposito campo info
|
||||
EgtRemoveInfo(CurrLine, INFO_SIDE_ANGLE)
|
||||
' Creo testo con angolo di inclinazione 0
|
||||
AddTextToLine(sEntityName & " = 0°", TextLayer, CurrLine, 10, dBBoxRad, True)
|
||||
AddTextToLine(sEntityName & " = 0°", TextLayer, CurrLine, 20, dBBoxRad, True)
|
||||
Else
|
||||
m_SideEntityList.Add(New SideAngleEntity(CurrLine, sEntityName, TextLayer, dSideAngleVal, m_Mode))
|
||||
' Creo testo con angolo di inclinazione 0
|
||||
AddTextToLine(sEntityName & " = " & DoubleToString(dSideAngleVal, 1) & "°", TextLayer, CurrLine, 10, dBBoxRad, True)
|
||||
AddTextToLine(sEntityName & " = " & DoubleToString(dSideAngleVal, 1) & "°", TextLayer, CurrLine, 20, dBBoxRad, True)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -527,16 +529,16 @@ Public Class SideEntityControlVM
|
||||
' Cancello gocciolatoio nell'apposito campo info
|
||||
EgtRemoveInfo(CurrLine, INFO_HAVE_DRIP)
|
||||
' Creo testo entità
|
||||
AddTextToLine(sEntityName, TextLayer, CurrLine, 10, dBBoxRad, True)
|
||||
AddTextToLine(sEntityName, TextLayer, CurrLine, 20, dBBoxRad, True)
|
||||
Else
|
||||
m_SideEntityList.Add(New DripEntity(CurrLine, sEntityName, TextLayer, bHaveDripVal, m_Mode))
|
||||
' Creo testo con angolo di inclinazione 0
|
||||
AddTextToLine(sEntityName, TextLayer, CurrLine, 10, dBBoxRad, True)
|
||||
AddTextToLine(sEntityName, TextLayer, CurrLine, 20, dBBoxRad, True)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Funzione che dato un segmento e una distanza, scrive il testo centrato alla sua destra
|
||||
Friend Shared Sub AddTextToLine(sText As String, TextLayer As Integer, CurrLine As Integer, dDistance As Double, dBBoxRad As Double, bTextExt As Boolean)
|
||||
Friend Shared Function AddTextToLine(sText As String, TextLayer As Integer, CurrLine As Integer, dDistance As Double, dBBoxRad As Double, bTextExt As Boolean) As Integer
|
||||
' Calcolo altezza testo
|
||||
Dim dH As Double = 0.075 * dBBoxRad
|
||||
' Creo testo
|
||||
@@ -598,7 +600,8 @@ Public Class SideEntityControlVM
|
||||
' Calcolo il centro del testo
|
||||
Dim ptTextMC As Point3d = Point3d.Media(ptLineStart, ptLineEnd) + vtCurrLine * (dDistance + (vtCurrLine * vtptExtptMC))
|
||||
EgtMove(nText, (ptTextMC - Point3d.ORIG))
|
||||
End Sub
|
||||
Return nText
|
||||
End Function
|
||||
|
||||
' Funzione che crea le geometrie dei gocciolatoi
|
||||
Friend Sub CreateDripGeom(nPartId As Integer)
|
||||
@@ -628,7 +631,7 @@ Public Class SideEntityControlVM
|
||||
Dim nCrvId As Integer = EgtGetFirstInGroup(DripLayer)
|
||||
While nCrvId <> GDB_ID.NULL
|
||||
EgtOffsetCurve(nCrvId, -m_dDripOffset, OFF_TYPE.EXTEND)
|
||||
EgtSetColor(nCrvId, New Color3d(255, 0, 255))
|
||||
EgtSetColor(nCrvId, New Color3d(255, 165, 0))
|
||||
EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
||||
If m_dDripShort > EPS_SMALL Then
|
||||
Dim dLen As Double
|
||||
|
||||
Reference in New Issue
Block a user