Worked on a new way to optimize grating sizes for fill area
This commit is contained in:
parent
e880c88064
commit
bd3bbf2609
|
|
@ -277,10 +277,9 @@
|
||||||
dashPen.DashPattern = {6, 4}
|
dashPen.DashPattern = {6, 4}
|
||||||
|
|
||||||
'Vertical lines
|
'Vertical lines
|
||||||
Dim singleLength As Integer = Grating_Fill.minLength / Data.scaleDiff
|
Dim singleLength As Integer = Calculate_Fill_Grid.gratingLength / Data.scaleDiff
|
||||||
For i = 0 To Grating_Fill.numOfHorizontal - 2
|
For i = 0 To Calculate_Fill_Grid.numOfHorizontal - 2
|
||||||
Dim x As Integer
|
Dim x As Integer = Data.grossAreaPoints.Rows(0)("GUI X") + singleLength * (i + 1)
|
||||||
x = Data.grossAreaPoints.Rows(0)("GUI X") + singleLength * (i + 1)
|
|
||||||
|
|
||||||
Dim y1 As Integer = Data.grossAreaPoints.Rows(0)("GUI Y")
|
Dim y1 As Integer = Data.grossAreaPoints.Rows(0)("GUI Y")
|
||||||
Dim y2 As Integer = Data.grossAreaPoints.Rows(3)("GUI Y")
|
Dim y2 As Integer = Data.grossAreaPoints.Rows(3)("GUI Y")
|
||||||
|
|
@ -288,14 +287,10 @@
|
||||||
Next
|
Next
|
||||||
|
|
||||||
'Horizontal lines
|
'Horizontal lines
|
||||||
Dim singleWidth As Integer = Grating_Fill.maxSingleWidth / Data.scaleDiff
|
Dim singleWidth As Integer = 1000 / Data.scaleDiff 'Calculate_Fill_Grid.gratingWidth
|
||||||
For i = 0 To Grating_Fill.numOfVertical - 2
|
For i = 0 To Calculate_Fill_Grid.numOfVertical - 2
|
||||||
Dim y As Integer
|
Dim y As Integer = Data.grossAreaPoints.Rows(0)("GUI Y") + singleWidth * (i + 1)
|
||||||
If Grating_Fill.widthRevNeeded AndAlso i = Grating_Fill.numOfVertical - 2 Then
|
|
||||||
y = Data.grossAreaPoints.Rows(0)("GUI Y") + singleWidth * i + Grating_Fill.revWidth / Data.scaleDiff
|
|
||||||
Else
|
|
||||||
y = Data.grossAreaPoints.Rows(0)("GUI Y") + singleWidth * (i + 1)
|
|
||||||
End If
|
|
||||||
Dim x1 As Integer = Data.grossAreaPoints.Rows(0)("GUI X")
|
Dim x1 As Integer = Data.grossAreaPoints.Rows(0)("GUI X")
|
||||||
Dim x2 As Integer = Data.grossAreaPoints.Rows(1)("GUI X")
|
Dim x2 As Integer = Data.grossAreaPoints.Rows(1)("GUI X")
|
||||||
g.DrawLine(dashPen, x1, y, x2, y)
|
g.DrawLine(dashPen, x1, y, x2, y)
|
||||||
|
|
|
||||||
|
|
@ -289,14 +289,14 @@ Public Class Individual
|
||||||
' ---------------------------------- Calculate ----------------------------------
|
' ---------------------------------- Calculate ----------------------------------
|
||||||
' --- When calculate button is pressed ---
|
' --- When calculate button is pressed ---
|
||||||
Public Sub Button_Calculate_Click(sender As Object, e As EventArgs)
|
Public Sub Button_Calculate_Click(sender As Object, e As EventArgs)
|
||||||
Grating_Fill.Calculate_Grid()
|
Calculate_Fill_Grid.Calculate_Grid()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' ---------------------------------- Export to SW ----------------------------------
|
' ---------------------------------- Export to SW ----------------------------------
|
||||||
' --- When export to SW button is pressed ---
|
' --- When export to SW button is pressed ---
|
||||||
Private Sub Button_Export_SW_Click(sender As Object, e As EventArgs) Handles Button_Export_SW.Click
|
Private Sub Button_Export_SW_Click(sender As Object, e As EventArgs) Handles Button_Export_SW.Click
|
||||||
If AppForm.fillMode Then
|
If AppForm.fillMode Then
|
||||||
Grating_Fill.Calculate_Grid()
|
Calculate_Fill_Grid.Calculate_Grid()
|
||||||
|
|
||||||
Dim frameCreated As Boolean = False
|
Dim frameCreated As Boolean = False
|
||||||
If User_Input.add3DGrating = True Then
|
If User_Input.add3DGrating = True Then
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,132 @@
|
||||||
|
Public Class Calculate_Fill_Grid
|
||||||
|
Public Shared maxGratingWidth, maxGratingLength As Integer
|
||||||
|
Public Shared numOfHorizontal, numOfVertical As Integer
|
||||||
|
Public Shared gratingLength, gratingWidth As Integer
|
||||||
|
|
||||||
|
Public Shared gratingDimensions As New DataTable
|
||||||
|
|
||||||
|
Public Shared Sub Calculate_Grid()
|
||||||
|
maxGratingWidth = Get_Max_Width()
|
||||||
|
maxGratingLength = Get_Max_Length(maxGratingWidth)
|
||||||
|
|
||||||
|
Get_NumOf_Vertical(maxGratingWidth)
|
||||||
|
Get_NumOf_Horizontal(maxGratingLength)
|
||||||
|
|
||||||
|
|
||||||
|
gratingDimensions.Clear()
|
||||||
|
gratingDimensions.Columns.Clear()
|
||||||
|
gratingDimensions.Columns.Add("INDEX", GetType(Integer))
|
||||||
|
gratingDimensions.Columns.Add("ROW", GetType(Integer))
|
||||||
|
gratingDimensions.Columns.Add("COLUMN", GetType(Integer))
|
||||||
|
gratingDimensions.Columns.Add("WIDTH", GetType(Integer))
|
||||||
|
gratingDimensions.Columns.Add("LENGTH", GetType(Integer))
|
||||||
|
|
||||||
|
gratingLength = Calculate_Grating_Length(maxGratingLength, 100)
|
||||||
|
|
||||||
|
For i = 0 To numOfHorizontal * numOfVertical - 1
|
||||||
|
Dim tempDR As DataRow = gratingDimensions.NewRow
|
||||||
|
tempDR("INDEX") = i
|
||||||
|
tempDR("ROW") = Math.Floor((i + 0.5) / numOfHorizontal)
|
||||||
|
tempDR("COLUMN") = i Mod numOfHorizontal
|
||||||
|
|
||||||
|
If tempDR("ROW") + 1 < numOfVertical Then
|
||||||
|
tempDR("WIDTH") = 1000
|
||||||
|
Else
|
||||||
|
If Data.gratingW Mod 1000 <= 200 Then
|
||||||
|
tempDR("WIDTH") = maxGratingWidth
|
||||||
|
Else
|
||||||
|
tempDR("WIDTH") = Data.gratingW Mod 1000
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If tempDR("COLUMN") + 1 < numOfHorizontal Then
|
||||||
|
tempDR("LENGTH") = gratingLength
|
||||||
|
Else
|
||||||
|
tempDR("LENGTH") = Data.gratingL - gratingLength * (numOfHorizontal - 1)
|
||||||
|
End If
|
||||||
|
|
||||||
|
gratingDimensions.Rows.Add(tempDR)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Individual.Panel_Grating.Refresh()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Shared Function Get_Max_Width()
|
||||||
|
If Data.gratingW >= 1000 Then
|
||||||
|
If Data.gratingW Mod 1000 > 0 AndAlso Data.gratingW Mod 1000 <= 200 Then
|
||||||
|
Return (Data.gratingW Mod 1000) + 1000
|
||||||
|
End If
|
||||||
|
Return 1000
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return Data.gratingW
|
||||||
|
End Function
|
||||||
|
Private Shared Function Get_Max_Length(gratingMaxWidth As Integer)
|
||||||
|
' Funkar just nu bara för pressure welded (ty diameter)
|
||||||
|
|
||||||
|
Dim loadBarHeight As Integer = 25
|
||||||
|
Dim loadBarThickness As Integer = 2
|
||||||
|
Dim crossBarDiameter As Integer = 5
|
||||||
|
|
||||||
|
Dim loadBarWeight As Double = 0.385 ' För 1x1 m
|
||||||
|
Dim crossBarWeight As Double = 0.153 ' För 1x1 m
|
||||||
|
|
||||||
|
Dim maxWeight As Double = 70 ' FIXA: Sätta i GUI?
|
||||||
|
|
||||||
|
Dim LBHdiff As Double = 1 + (User_Input.gratingHeight - loadBarHeight) / loadBarHeight
|
||||||
|
loadBarWeight *= LBHdiff
|
||||||
|
Dim LBTdiff As Double = 1 + (User_Input.loadBarThickness - loadBarThickness) / loadBarThickness
|
||||||
|
loadBarWeight *= LBTdiff
|
||||||
|
Dim CBDdiff As Double = 1 + (User_Input.CBDiameter - crossBarDiameter) / crossBarDiameter
|
||||||
|
crossBarWeight *= CBDdiff
|
||||||
|
|
||||||
|
Dim numOfLB As Integer = 1 + Math.Floor((1000 - User_Input.loadBarSpacing) / User_Input.loadBarSpacing)
|
||||||
|
Dim numOfCB As Integer = 1 + Math.Floor((1000 - User_Input.crossBarSpacing) / User_Input.crossBarSpacing)
|
||||||
|
|
||||||
|
Dim gratingWeight As Double = (numOfLB + 4) * loadBarWeight + numOfCB * crossBarWeight
|
||||||
|
|
||||||
|
Dim maxArea As Double = maxWeight / gratingWeight
|
||||||
|
Dim maxLength As Double = maxArea / (gratingMaxWidth / 1000)
|
||||||
|
maxLength = Math.Floor(maxLength * 10) * 100
|
||||||
|
|
||||||
|
Return CInt(maxLength)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Shared Sub Get_NumOf_Horizontal(maxGratingLength As Integer)
|
||||||
|
If (Data.gratingL / maxGratingLength) Mod 1 = 0 Then
|
||||||
|
numOfHorizontal = Data.gratingL / maxGratingLength
|
||||||
|
Else
|
||||||
|
numOfHorizontal = Math.Floor(Data.gratingL / maxGratingLength) + 1
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Private Shared Sub Get_NumOf_Vertical(maxGratingWidth As Integer)
|
||||||
|
If Data.gratingW < 1000 Then
|
||||||
|
numOfVertical = 1
|
||||||
|
ElseIf Data.gratingW Mod 1000 = 0 Then
|
||||||
|
numOfVertical = Data.gratingW / 1000
|
||||||
|
Else
|
||||||
|
If Data.gratingW Mod 1000 <= 200 Then
|
||||||
|
numOfVertical = Math.Floor(Data.gratingW / 1000)
|
||||||
|
Else
|
||||||
|
numOfVertical = Math.Floor(Data.gratingW / 1000) + 1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Shared Function Calculate_Grating_Length(gratingLength As Integer, modInterval As Integer)
|
||||||
|
Dim gLength As Integer
|
||||||
|
|
||||||
|
If Data.gratingL Mod gratingLength = 0 Then
|
||||||
|
gLength = gratingLength
|
||||||
|
ElseIf Data.gratingL Mod gratingLength >= 300 AndAlso Math.Floor((Data.gratingL + 0.5) / gratingLength) + 1 = numOfHorizontal Then
|
||||||
|
gLength = gratingLength
|
||||||
|
ElseIf Math.Floor((Data.gratingL + 0.5) / gratingLength) + 1 > numOfHorizontal Then
|
||||||
|
gLength = Calculate_Grating_Length(maxGratingLength, 10)
|
||||||
|
Else
|
||||||
|
gLength = Calculate_Grating_Length(gratingLength - modInterval, modInterval)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return gLength
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
Public Class Grating_Fill
|
Public Class Grating_Fill2
|
||||||
Public Shared maxSingleWidth, maxSingleLength As Integer
|
Public Shared maxSingleWidth, maxSingleLength As Integer
|
||||||
Public Shared numOfHorizontal, numOfVertical As Integer
|
Public Shared numOfHorizontal, numOfVertical As Integer
|
||||||
Public Shared widthRevNeeded, lengthRevNeeded As Boolean
|
Public Shared widthRevNeeded, lengthRevNeeded As Boolean
|
||||||
|
|
@ -8,6 +8,8 @@ Public Class Grating_Fill
|
||||||
|
|
||||||
Public Shared gratingDimensions As New DataTable
|
Public Shared gratingDimensions As New DataTable
|
||||||
Public Shared Sub Calculate_Grid()
|
Public Shared Sub Calculate_Grid()
|
||||||
|
Calculate_Fill_Grid.Calculate_Grid() 'FIXA: TA BORT
|
||||||
|
|
||||||
Get_SingleGratingMaxDimensions()
|
Get_SingleGratingMaxDimensions()
|
||||||
|
|
||||||
gratingDimensions.Clear()
|
gratingDimensions.Clear()
|
||||||
|
|
@ -86,7 +88,7 @@ Public Class Grating_Fill
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
Individual.Panel_Grating.Refresh()
|
'Individual.Panel_Grating.Refresh()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Shared Sub Get_SingleGratingMaxDimensions()
|
Private Shared Sub Get_SingleGratingMaxDimensions()
|
||||||
|
|
@ -509,7 +509,7 @@ Public Class Frame_3D
|
||||||
boolstatus = Part.EditRebuild3()
|
boolstatus = Part.EditRebuild3()
|
||||||
Dim swErrors As Integer
|
Dim swErrors As Integer
|
||||||
Dim swWarnings As Integer
|
Dim swWarnings As Integer
|
||||||
boolstatus = Part.Save3(1, swErrors, swWarnings)
|
boolstatus = Part.Save3(4, swErrors, swWarnings)
|
||||||
|
|
||||||
swApp.CloseDoc(Settings.folderPaths("object_" & Data.objectNum & "_models3D_frames_sw_support") & "\FRAME_L_END_PIECE" & j + 1 & ".SLDPRT")
|
swApp.CloseDoc(Settings.folderPaths("object_" & Data.objectNum & "_models3D_frames_sw_support") & "\FRAME_L_END_PIECE" & j + 1 & ".SLDPRT")
|
||||||
End If
|
End If
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ Public Class Individual_3D
|
||||||
Dim Warnings As Integer
|
Dim Warnings As Integer
|
||||||
Dim model As IModelDoc2
|
Dim model As IModelDoc2
|
||||||
model = Assembly
|
model = Assembly
|
||||||
status = model.Save3(1, Errors, Warnings)
|
status = model.Save3(4, Errors, Warnings)
|
||||||
|
|
||||||
Dim sourcePath, destPath As String
|
Dim sourcePath, destPath As String
|
||||||
Dim childrenSourcePaths As New List(Of String)
|
Dim childrenSourcePaths As New List(Of String)
|
||||||
|
|
@ -378,9 +378,9 @@ Public Class Individual_3D
|
||||||
components = Assembly.GetComponents(True)
|
components = Assembly.GetComponents(True)
|
||||||
For i = 0 To UBound(components)
|
For i = 0 To UBound(components)
|
||||||
Dim partDoc = components(i).GetModelDoc2()
|
Dim partDoc = components(i).GetModelDoc2()
|
||||||
boolstatus = partDoc.Save3(1, swErrors, swWarnings)
|
boolstatus = partDoc.Save3(4, swErrors, swWarnings)
|
||||||
Next
|
Next
|
||||||
boolstatus = Assembly.Save3(1, swErrors, swWarnings)
|
boolstatus = Assembly.Save3(4, swErrors, swWarnings)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Shared Function Check_Interference(comp1 As SldWorks.Component2, comp2 As SldWorks.Component2) ' Test Albins mocro för interference
|
Private Shared Function Check_Interference(comp1 As SldWorks.Component2, comp2 As SldWorks.Component2) ' Test Albins mocro för interference
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ Public Class Individual_3D_Simplified
|
||||||
Dim Warnings As Integer
|
Dim Warnings As Integer
|
||||||
Dim model As IModelDoc2
|
Dim model As IModelDoc2
|
||||||
model = Assembly
|
model = Assembly
|
||||||
status = model.Save3(1, Errors, Warnings)
|
status = model.Save3(4, Errors, Warnings)
|
||||||
|
|
||||||
|
|
||||||
Dim sourcePath, destPath As String
|
Dim sourcePath, destPath As String
|
||||||
|
|
@ -410,9 +410,9 @@ Public Class Individual_3D_Simplified
|
||||||
components = Assembly.GetComponents(True)
|
components = Assembly.GetComponents(True)
|
||||||
For i = 0 To UBound(components)
|
For i = 0 To UBound(components)
|
||||||
Dim partDoc = components(i).GetModelDoc2()
|
Dim partDoc = components(i).GetModelDoc2()
|
||||||
boolstatus = partDoc.Save3(1, swErrors, swWarnings)
|
boolstatus = partDoc.Save3(4, swErrors, swWarnings)
|
||||||
Next
|
Next
|
||||||
boolstatus = Assembly.Save3(1, swErrors, swWarnings)
|
boolstatus = Assembly.Save3(4, swErrors, swWarnings)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Shared Function Check_Interference(comp1 As SldWorks.Component2, comp2 As SldWorks.Component2) ' Test Albins mocro för interference
|
Private Shared Function Check_Interference(comp1 As SldWorks.Component2, comp2 As SldWorks.Component2) ' Test Albins mocro för interference
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ Public Class Instructions
|
||||||
|
|
||||||
Dim numOfGratings = 1
|
Dim numOfGratings = 1
|
||||||
If AppForm.fillMode = True Then
|
If AppForm.fillMode = True Then
|
||||||
numOfGratings = Grating_Fill.numOfHorizontal * Grating_Fill.numOfVertical - Multiple_3D_Simplified.listOfObsolete.Count
|
numOfGratings = Calculate_Fill_Grid.numOfHorizontal * Calculate_Fill_Grid.numOfVertical - Multiple_3D_Simplified.listOfObsolete.Count
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim gratingCounter As Integer = numOfGratings
|
Dim gratingCounter As Integer = numOfGratings
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ Public Class Multiple_3D
|
||||||
Dim parentID As Integer = 0
|
Dim parentID As Integer = 0
|
||||||
gratingParameters = exportTable.Rows(0)
|
gratingParameters = exportTable.Rows(0)
|
||||||
|
|
||||||
For i = 0 To Grating_Fill.gratingDimensions.Rows.Count - 1
|
For i = 0 To Calculate_Fill_Grid.gratingDimensions.Rows.Count - 1
|
||||||
inst_ = ExternalClass.instantiate_parts(parentID, gratingParameters("TYPE"), "") ' Ange pressure_welded eller type A, Serrated?
|
inst_ = ExternalClass.instantiate_parts(parentID, gratingParameters("TYPE"), "") ' Ange pressure_welded eller type A, Serrated?
|
||||||
ExternalClass.modify_parameter_value("DP_LOADBAR_THICKNESS", inst_, gratingParameters("LOADBAR_THICKNESS"))
|
ExternalClass.modify_parameter_value("DP_LOADBAR_THICKNESS", inst_, gratingParameters("LOADBAR_THICKNESS"))
|
||||||
ExternalClass.modify_parameter_value("DP_LOADBAR_HEIGHT", inst_, gratingParameters("LOADBAR_HEIGHT"))
|
ExternalClass.modify_parameter_value("DP_LOADBAR_HEIGHT", inst_, gratingParameters("LOADBAR_HEIGHT"))
|
||||||
|
|
@ -36,23 +36,23 @@ Public Class Multiple_3D
|
||||||
ExternalClass.modify_parameter_value("DP_CROSSBAR_HEIGHT", inst_, gratingParameters("CROSSBAR_HEIGHT"))
|
ExternalClass.modify_parameter_value("DP_CROSSBAR_HEIGHT", inst_, gratingParameters("CROSSBAR_HEIGHT"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ExternalClass.modify_parameter_value("DP_GRATING_WIDTH", inst_, Grating_Fill.gratingDimensions.Rows(i)("WIDTH"))
|
ExternalClass.modify_parameter_value("DP_GRATING_WIDTH", inst_, Calculate_Fill_Grid.gratingDimensions.Rows(i)("WIDTH"))
|
||||||
ExternalClass.modify_parameter_value("DP_GRATING_LENGTH", inst_, Grating_Fill.gratingDimensions.Rows(i)("LENGTH"))
|
ExternalClass.modify_parameter_value("DP_GRATING_LENGTH", inst_, Calculate_Fill_Grid.gratingDimensions.Rows(i)("LENGTH"))
|
||||||
Dim offsetX As Integer = 0
|
Dim offsetX As Integer = 0
|
||||||
For j = 1 To Grating_Fill.gratingDimensions.Rows(i)("COLUMN")
|
For j = 1 To Calculate_Fill_Grid.gratingDimensions.Rows(i)("COLUMN")
|
||||||
offsetX += Grating_Fill.gratingDimensions.Rows(i - j)("LENGTH")
|
offsetX += Calculate_Fill_Grid.gratingDimensions.Rows(i - j)("LENGTH")
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Dim offsetY As Integer = 0
|
Dim offsetY As Integer = 0
|
||||||
For j = 1 To Grating_Fill.gratingDimensions.Rows(i)("ROW")
|
For j = 1 To Calculate_Fill_Grid.gratingDimensions.Rows(i)("ROW")
|
||||||
offsetY += Grating_Fill.gratingDimensions.Rows(i - Grating_Fill.numOfHorizontal * j)("WIDTH")
|
offsetY += Calculate_Fill_Grid.gratingDimensions.Rows(i - Calculate_Fill_Grid.numOfHorizontal * j)("WIDTH")
|
||||||
Next
|
Next
|
||||||
|
|
||||||
ExternalClass.modify_parameter_value("DP_OFFSET_X", inst_, (Grating_Fill.gratingDimensions.Rows(i)("LENGTH") / 2) + offsetX)
|
ExternalClass.modify_parameter_value("DP_OFFSET_X", inst_, (Calculate_Fill_Grid.gratingDimensions.Rows(i)("LENGTH") / 2) + offsetX)
|
||||||
ExternalClass.modify_parameter_value("DP_OFFSET_Y", inst_, (Grating_Fill.gratingDimensions.Rows(i)("WIDTH") / 2) + offsetY)
|
ExternalClass.modify_parameter_value("DP_OFFSET_Y", inst_, (Calculate_Fill_Grid.gratingDimensions.Rows(i)("WIDTH") / 2) + offsetY)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
parentID = Grating_Fill.numOfHorizontal * (Grating_Fill.numOfVertical - 1) + 1
|
parentID = Calculate_Fill_Grid.numOfHorizontal * (Calculate_Fill_Grid.numOfVertical - 1) + 1
|
||||||
For Each recessDR As DataRow In Data.recessData.Rows
|
For Each recessDR As DataRow In Data.recessData.Rows
|
||||||
Inst_Recesses(parentID, gratingParameters, recessDR)
|
Inst_Recesses(parentID, gratingParameters, recessDR)
|
||||||
Next
|
Next
|
||||||
|
|
@ -93,7 +93,7 @@ Public Class Multiple_3D
|
||||||
Dim Warnings As Integer
|
Dim Warnings As Integer
|
||||||
Dim model As IModelDoc2
|
Dim model As IModelDoc2
|
||||||
model = Assembly
|
model = Assembly
|
||||||
status = model.Save3(1, Errors, Warnings)
|
status = model.Save3(4, Errors, Warnings)
|
||||||
|
|
||||||
Dim sourcePath, destPath As String
|
Dim sourcePath, destPath As String
|
||||||
Dim childrenSourcePaths As New List(Of String)
|
Dim childrenSourcePaths As New List(Of String)
|
||||||
|
|
@ -291,7 +291,7 @@ Public Class Multiple_3D
|
||||||
Dim components = Assembly.GetComponents(True)
|
Dim components = Assembly.GetComponents(True)
|
||||||
|
|
||||||
'Indent
|
'Indent
|
||||||
Dim recessParentName As String = partDT.Rows(Grating_Fill.numOfHorizontal * (Grating_Fill.numOfVertical - 1))("partName")
|
Dim recessParentName As String = partDT.Rows(Calculate_Fill_Grid.numOfHorizontal * (Calculate_Fill_Grid.numOfVertical - 1))("partName")
|
||||||
Dim recessParts = partDT.Select("parentName = '" & recessParentName & "'")
|
Dim recessParts = partDT.Select("parentName = '" & recessParentName & "'")
|
||||||
For i = 0 To recessParts.Count - 1
|
For i = 0 To recessParts.Count - 1
|
||||||
Dim recessPartName As String = recessParts(i)("partName")
|
Dim recessPartName As String = recessParts(i)("partName")
|
||||||
|
|
@ -318,7 +318,7 @@ Public Class Multiple_3D
|
||||||
|
|
||||||
Dim recessFace = recessBodies(indexBody).GetFirstFace
|
Dim recessFace = recessBodies(indexBody).GetFirstFace
|
||||||
|
|
||||||
For j = 0 To Grating_Fill.numOfVertical * Grating_Fill.numOfHorizontal - 1
|
For j = 0 To Calculate_Fill_Grid.numOfVertical * Calculate_Fill_Grid.numOfHorizontal - 1
|
||||||
Assembly.ClearSelection2(True)
|
Assembly.ClearSelection2(True)
|
||||||
|
|
||||||
Dim gratingPartName As String = partDT.Rows(j)("partName")
|
Dim gratingPartName As String = partDT.Rows(j)("partName")
|
||||||
|
|
@ -388,7 +388,7 @@ Public Class Multiple_3D
|
||||||
boolstatus = AssemblyExtension.SelectByID2("Cut-Body@" & recessPartName & "-1@" & designName, "BODYFEATURE", 0, 0, 0, False, 0, Nothing, 0)
|
boolstatus = AssemblyExtension.SelectByID2("Cut-Body@" & recessPartName & "-1@" & designName, "BODYFEATURE", 0, 0, 0, False, 0, Nothing, 0)
|
||||||
modelDoc.EditSuppress2()
|
modelDoc.EditSuppress2()
|
||||||
|
|
||||||
For j = 0 To Grating_Fill.numOfVertical * Grating_Fill.numOfHorizontal - 1
|
For j = 0 To Calculate_Fill_Grid.numOfVertical * Calculate_Fill_Grid.numOfHorizontal - 1
|
||||||
Dim gratingPartName As String = partDT.Rows(j)("partName")
|
Dim gratingPartName As String = partDT.Rows(j)("partName")
|
||||||
Dim indexGrating As Integer
|
Dim indexGrating As Integer
|
||||||
For l = 0 To components.Length - 1
|
For l = 0 To components.Length - 1
|
||||||
|
|
@ -463,7 +463,7 @@ Public Class Multiple_3D
|
||||||
ElseIf gratingParameters("TYPE") = "type_a_serrated" Then
|
ElseIf gratingParameters("TYPE") = "type_a_serrated" Then
|
||||||
numOfFeat = 2
|
numOfFeat = 2
|
||||||
End If
|
End If
|
||||||
For i = 0 To Grating_Fill.numOfVertical * Grating_Fill.numOfHorizontal - 1
|
For i = 0 To Calculate_Fill_Grid.numOfVertical * Calculate_Fill_Grid.numOfHorizontal - 1
|
||||||
Dim gratingPartName As String = partDT.Rows(i)("partName")
|
Dim gratingPartName As String = partDT.Rows(i)("partName")
|
||||||
Dim indexGrating As Integer
|
Dim indexGrating As Integer
|
||||||
For j = 0 To components.Length - 1
|
For j = 0 To components.Length - 1
|
||||||
|
|
@ -516,8 +516,8 @@ Public Class Multiple_3D
|
||||||
Public Shared Function Find_Obsolete()
|
Public Shared Function Find_Obsolete()
|
||||||
Dim listOfObsolete As New List(Of Integer)
|
Dim listOfObsolete As New List(Of Integer)
|
||||||
|
|
||||||
For i = 0 To Grating_Fill.numOfVertical * Grating_Fill.numOfHorizontal - 1
|
For i = 0 To Calculate_Fill_Grid.numOfVertical * Calculate_Fill_Grid.numOfHorizontal - 1
|
||||||
Dim gratingDR As DataRow = Grating_Fill.gratingDimensions.Rows(i)
|
Dim gratingDR As DataRow = Calculate_Fill_Grid.gratingDimensions.Rows(i)
|
||||||
Dim origo(2) As Integer
|
Dim origo(2) As Integer
|
||||||
origo(0) = Data.gratingL / 2
|
origo(0) = Data.gratingL / 2
|
||||||
origo(1) = Data.gratingW / 2
|
origo(1) = Data.gratingW / 2
|
||||||
|
|
@ -527,14 +527,14 @@ Public Class Multiple_3D
|
||||||
p1(0) = -origo(0)
|
p1(0) = -origo(0)
|
||||||
p2(0) = -origo(0) + gratingDR("LENGTH")
|
p2(0) = -origo(0) + gratingDR("LENGTH")
|
||||||
For j = 1 To gratingDR("COLUMN")
|
For j = 1 To gratingDR("COLUMN")
|
||||||
p1(0) += Grating_Fill.gratingDimensions.Rows(i - j)("LENGTH")
|
p1(0) += Calculate_Fill_Grid.gratingDimensions.Rows(i - j)("LENGTH")
|
||||||
p2(0) += Grating_Fill.gratingDimensions.Rows(i - j)("LENGTH")
|
p2(0) += Calculate_Fill_Grid.gratingDimensions.Rows(i - j)("LENGTH")
|
||||||
Next
|
Next
|
||||||
p1(1) = origo(1)
|
p1(1) = origo(1)
|
||||||
p3(1) = origo(1) - gratingDR("WIDTH")
|
p3(1) = origo(1) - gratingDR("WIDTH")
|
||||||
For j = 1 To gratingDR("ROW")
|
For j = 1 To gratingDR("ROW")
|
||||||
p1(1) -= Grating_Fill.gratingDimensions.Rows(i - Grating_Fill.numOfHorizontal * j)("WIDTH")
|
p1(1) -= Calculate_Fill_Grid.gratingDimensions.Rows(i - Calculate_Fill_Grid.numOfHorizontal * j)("WIDTH")
|
||||||
p3(1) -= Grating_Fill.gratingDimensions.Rows(i - Grating_Fill.numOfHorizontal * j)("WIDTH")
|
p3(1) -= Calculate_Fill_Grid.gratingDimensions.Rows(i - Calculate_Fill_Grid.numOfHorizontal * j)("WIDTH")
|
||||||
Next
|
Next
|
||||||
|
|
||||||
p2(1) = p1(1)
|
p2(1) = p1(1)
|
||||||
|
|
|
||||||
|
|
@ -17,26 +17,26 @@ Public Class Multiple_3D_Simplified
|
||||||
Dim parentID As Integer = 0
|
Dim parentID As Integer = 0
|
||||||
gratingParameters = exportTable.Rows(0)
|
gratingParameters = exportTable.Rows(0)
|
||||||
|
|
||||||
For i = 0 To Grating_Fill.gratingDimensions.Rows.Count - 1
|
For i = 0 To Calculate_Fill_Grid.gratingDimensions.Rows.Count - 1
|
||||||
inst_ = ExternalClass.instantiate_parts(parentID, "simplified_floor_grating", "")
|
inst_ = ExternalClass.instantiate_parts(parentID, "simplified_floor_grating", "")
|
||||||
ExternalClass.modify_parameter_value("DP_LOADBAR_HEIGHT", inst_, gratingParameters("LOADBAR_HEIGHT"))
|
ExternalClass.modify_parameter_value("DP_LOADBAR_HEIGHT", inst_, gratingParameters("LOADBAR_HEIGHT"))
|
||||||
ExternalClass.modify_parameter_value("DP_GRATING_WIDTH", inst_, Grating_Fill.gratingDimensions.Rows(i)("WIDTH"))
|
ExternalClass.modify_parameter_value("DP_GRATING_WIDTH", inst_, Calculate_Fill_Grid.gratingDimensions.Rows(i)("WIDTH"))
|
||||||
ExternalClass.modify_parameter_value("DP_GRATING_LENGTH", inst_, Grating_Fill.gratingDimensions.Rows(i)("LENGTH"))
|
ExternalClass.modify_parameter_value("DP_GRATING_LENGTH", inst_, Calculate_Fill_Grid.gratingDimensions.Rows(i)("LENGTH"))
|
||||||
Dim offsetX As Integer = 0
|
Dim offsetX As Integer = 0
|
||||||
For j = 1 To Grating_Fill.gratingDimensions.Rows(i)("COLUMN")
|
For j = 1 To Calculate_Fill_Grid.gratingDimensions.Rows(i)("COLUMN")
|
||||||
offsetX += Grating_Fill.gratingDimensions.Rows(i - j)("LENGTH")
|
offsetX += Calculate_Fill_Grid.gratingDimensions.Rows(i - j)("LENGTH")
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Dim offsetY As Integer = 0
|
Dim offsetY As Integer = 0
|
||||||
For j = 1 To Grating_Fill.gratingDimensions.Rows(i)("ROW")
|
For j = 1 To Calculate_Fill_Grid.gratingDimensions.Rows(i)("ROW")
|
||||||
offsetY += Grating_Fill.gratingDimensions.Rows(i - Grating_Fill.numOfHorizontal * j)("WIDTH")
|
offsetY += Calculate_Fill_Grid.gratingDimensions.Rows(i - Calculate_Fill_Grid.numOfHorizontal * j)("WIDTH")
|
||||||
Next
|
Next
|
||||||
|
|
||||||
ExternalClass.modify_parameter_value("DP_OFFSET_X", inst_, (Grating_Fill.gratingDimensions.Rows(i)("LENGTH") / 2) + offsetX)
|
ExternalClass.modify_parameter_value("DP_OFFSET_X", inst_, (Calculate_Fill_Grid.gratingDimensions.Rows(i)("LENGTH") / 2) + offsetX)
|
||||||
ExternalClass.modify_parameter_value("DP_OFFSET_Y", inst_, (Grating_Fill.gratingDimensions.Rows(i)("WIDTH") / 2) + offsetY)
|
ExternalClass.modify_parameter_value("DP_OFFSET_Y", inst_, (Calculate_Fill_Grid.gratingDimensions.Rows(i)("WIDTH") / 2) + offsetY)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
parentID = Grating_Fill.numOfHorizontal * (Grating_Fill.numOfVertical - 1) + 1
|
parentID = Calculate_Fill_Grid.numOfHorizontal * (Calculate_Fill_Grid.numOfVertical - 1) + 1
|
||||||
For Each recessDR As DataRow In Data.recessData.Rows
|
For Each recessDR As DataRow In Data.recessData.Rows
|
||||||
Inst_Recesses(parentID, gratingParameters, recessDR)
|
Inst_Recesses(parentID, gratingParameters, recessDR)
|
||||||
Next
|
Next
|
||||||
|
|
@ -163,7 +163,7 @@ Public Class Multiple_3D_Simplified
|
||||||
Dim Warnings As Integer
|
Dim Warnings As Integer
|
||||||
Dim model As IModelDoc2
|
Dim model As IModelDoc2
|
||||||
model = assembly
|
model = assembly
|
||||||
status = model.Save3(1, Errors, Warnings)
|
status = model.Save3(4, Errors, Warnings)
|
||||||
|
|
||||||
Dim sourcePath, destPath As String
|
Dim sourcePath, destPath As String
|
||||||
Dim childrenSourcePaths As New List(Of String)
|
Dim childrenSourcePaths As New List(Of String)
|
||||||
|
|
@ -368,7 +368,7 @@ Public Class Multiple_3D_Simplified
|
||||||
Dim components = Assembly.GetComponents(True)
|
Dim components = Assembly.GetComponents(True)
|
||||||
|
|
||||||
'Indent
|
'Indent
|
||||||
Dim recessParentName As String = partDT.Rows(Grating_Fill.numOfHorizontal * (Grating_Fill.numOfVertical - 1))("partName")
|
Dim recessParentName As String = partDT.Rows(Calculate_Fill_Grid.numOfHorizontal * (Calculate_Fill_Grid.numOfVertical - 1))("partName")
|
||||||
Dim recessParts = partDT.Select("parentName = '" & recessParentName & "'")
|
Dim recessParts = partDT.Select("parentName = '" & recessParentName & "'")
|
||||||
For i = 0 To recessParts.Count - 1
|
For i = 0 To recessParts.Count - 1
|
||||||
Dim recessPartName As String = recessParts(i)("partName")
|
Dim recessPartName As String = recessParts(i)("partName")
|
||||||
|
|
@ -395,7 +395,7 @@ Public Class Multiple_3D_Simplified
|
||||||
|
|
||||||
Dim recessFace = recessBodies(indexBody).GetFirstFace
|
Dim recessFace = recessBodies(indexBody).GetFirstFace
|
||||||
|
|
||||||
For j = 0 To Grating_Fill.numOfVertical * Grating_Fill.numOfHorizontal - 1
|
For j = 0 To Calculate_Fill_Grid.numOfVertical * Calculate_Fill_Grid.numOfHorizontal - 1
|
||||||
Assembly.ClearSelection2(True)
|
Assembly.ClearSelection2(True)
|
||||||
|
|
||||||
Dim gratingPartName As String = partDT.Rows(j)("partName")
|
Dim gratingPartName As String = partDT.Rows(j)("partName")
|
||||||
|
|
@ -479,8 +479,8 @@ Public Class Multiple_3D_Simplified
|
||||||
Public Shared Function Find_Obsolete()
|
Public Shared Function Find_Obsolete()
|
||||||
Dim listOfObsolete As New List(Of Integer)
|
Dim listOfObsolete As New List(Of Integer)
|
||||||
|
|
||||||
For i = 0 To Grating_Fill.numOfVertical * Grating_Fill.numOfHorizontal - 1
|
For i = 0 To Calculate_Fill_Grid.numOfVertical * Calculate_Fill_Grid.numOfHorizontal - 1
|
||||||
Dim gratingDR As DataRow = Grating_Fill.gratingDimensions.Rows(i)
|
Dim gratingDR As DataRow = Calculate_Fill_Grid.gratingDimensions.Rows(i)
|
||||||
Dim origo(2) As Integer
|
Dim origo(2) As Integer
|
||||||
origo(0) = Data.gratingL / 2
|
origo(0) = Data.gratingL / 2
|
||||||
origo(1) = Data.gratingW / 2
|
origo(1) = Data.gratingW / 2
|
||||||
|
|
@ -490,14 +490,14 @@ Public Class Multiple_3D_Simplified
|
||||||
p1(0) = -origo(0)
|
p1(0) = -origo(0)
|
||||||
p2(0) = -origo(0) + gratingDR("LENGTH")
|
p2(0) = -origo(0) + gratingDR("LENGTH")
|
||||||
For j = 1 To gratingDR("COLUMN")
|
For j = 1 To gratingDR("COLUMN")
|
||||||
p1(0) += Grating_Fill.gratingDimensions.Rows(i - j)("LENGTH")
|
p1(0) += Calculate_Fill_Grid.gratingDimensions.Rows(i - j)("LENGTH")
|
||||||
p2(0) += Grating_Fill.gratingDimensions.Rows(i - j)("LENGTH")
|
p2(0) += Calculate_Fill_Grid.gratingDimensions.Rows(i - j)("LENGTH")
|
||||||
Next
|
Next
|
||||||
p1(1) = origo(1)
|
p1(1) = origo(1)
|
||||||
p3(1) = origo(1) - gratingDR("WIDTH")
|
p3(1) = origo(1) - gratingDR("WIDTH")
|
||||||
For j = 1 To gratingDR("ROW")
|
For j = 1 To gratingDR("ROW")
|
||||||
p1(1) -= Grating_Fill.gratingDimensions.Rows(i - Grating_Fill.numOfHorizontal * j)("WIDTH")
|
p1(1) -= Calculate_Fill_Grid.gratingDimensions.Rows(i - Calculate_Fill_Grid.numOfHorizontal * j)("WIDTH")
|
||||||
p3(1) -= Grating_Fill.gratingDimensions.Rows(i - Grating_Fill.numOfHorizontal * j)("WIDTH")
|
p3(1) -= Calculate_Fill_Grid.gratingDimensions.Rows(i - Calculate_Fill_Grid.numOfHorizontal * j)("WIDTH")
|
||||||
Next
|
Next
|
||||||
|
|
||||||
p2(1) = p1(1)
|
p2(1) = p1(1)
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ Public Class Multiple_Drawing
|
||||||
status = layMgr.SetCurrentLayer("Svenska")
|
status = layMgr.SetCurrentLayer("Svenska")
|
||||||
|
|
||||||
Dim myView As View
|
Dim myView As View
|
||||||
myView = iDrawing.CreateDrawViewFromModelView3(Settings.folderPaths("object_" & Data.objectNum & "_models3D_frames_sw_support") & "\gratings_assembly_simplified.SLDASM",
|
myView = iDrawing.CreateDrawViewFromModelView3(Settings.folderPaths("object_" & Data.objectNum & "_models3D_gratings_sw_support") & "\GRATINGS_ASSEMBLY_SIMPLIFIED.SLDASM",
|
||||||
"*Front", swSheetWidth / 2, swSheetHeight / 2, 0)
|
"*Front", swSheetWidth / 2, swSheetHeight / 2, 0)
|
||||||
myView.UseSheetScale() = True
|
myView.UseSheetScale() = True
|
||||||
myView.SetDisplayTangentEdges2(2)
|
myView.SetDisplayTangentEdges2(2)
|
||||||
|
|
@ -50,7 +50,7 @@ Public Class Multiple_Drawing
|
||||||
mesOffsets(3) = OutLine(0) - 0.005
|
mesOffsets(3) = OutLine(0) - 0.005
|
||||||
|
|
||||||
' -- Recess measurements --
|
' -- Recess measurements --
|
||||||
Dim recessDT = modelsDT.Select("parentName = '" & modelsDT.Rows(Grating_Fill.numOfHorizontal * (Grating_Fill.numOfVertical - 1))("partName") & "'")
|
Dim recessDT = modelsDT.Select("parentName = '" & modelsDT.Rows(Calculate_Fill_Grid.numOfHorizontal * (Calculate_Fill_Grid.numOfVertical - 1))("partName") & "'")
|
||||||
For i = 0 To Data.recessData.Rows.Count - 1
|
For i = 0 To Data.recessData.Rows.Count - 1
|
||||||
Dim DR As DataRow = Data.recessData.Rows(i)
|
Dim DR As DataRow = Data.recessData.Rows(i)
|
||||||
Dim recessName As String = recessDT(i)("partName")
|
Dim recessName As String = recessDT(i)("partName")
|
||||||
|
|
@ -127,7 +127,7 @@ Public Class Multiple_Drawing
|
||||||
status = False
|
status = False
|
||||||
counter = 0
|
counter = 0
|
||||||
While status = False
|
While status = False
|
||||||
gratingName = modelsDT.Rows(Grating_Fill.numOfHorizontal - 1 + counter * Grating_Fill.numOfHorizontal)("partName")
|
gratingName = modelsDT.Rows(Calculate_Fill_Grid.numOfHorizontal - 1 + counter * Calculate_Fill_Grid.numOfHorizontal)("partName")
|
||||||
iDrawing.ClearSelection2(True)
|
iDrawing.ClearSelection2(True)
|
||||||
|
|
||||||
plane2Name = "Point1@SL2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
plane2Name = "Point1@SL2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||||
|
|
@ -153,7 +153,7 @@ Public Class Multiple_Drawing
|
||||||
status = False
|
status = False
|
||||||
counter = 0
|
counter = 0
|
||||||
While status = False
|
While status = False
|
||||||
gratingName = modelsDT.Rows(Grating_Fill.numOfHorizontal * Grating_Fill.numOfVertical - 1 - counter)("partName")
|
gratingName = modelsDT.Rows(Calculate_Fill_Grid.numOfHorizontal * Calculate_Fill_Grid.numOfVertical - 1 - counter)("partName")
|
||||||
iDrawing.ClearSelection2(True)
|
iDrawing.ClearSelection2(True)
|
||||||
|
|
||||||
plane2Name = "Point1@SW2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
plane2Name = "Point1@SW2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||||
|
|
@ -178,7 +178,7 @@ Public Class Multiple_Drawing
|
||||||
status = False
|
status = False
|
||||||
counter = 0
|
counter = 0
|
||||||
While status = False
|
While status = False
|
||||||
gratingName = modelsDT.Rows(Grating_Fill.numOfHorizontal * Grating_Fill.numOfVertical - 1 - counter * Grating_Fill.numOfHorizontal)("partName")
|
gratingName = modelsDT.Rows(Calculate_Fill_Grid.numOfHorizontal * Calculate_Fill_Grid.numOfVertical - 1 - counter * Calculate_Fill_Grid.numOfHorizontal)("partName")
|
||||||
iDrawing.ClearSelection2(True)
|
iDrawing.ClearSelection2(True)
|
||||||
|
|
||||||
plane2Name = "Point1@SL2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
plane2Name = "Point1@SL2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||||
|
|
@ -203,7 +203,7 @@ Public Class Multiple_Drawing
|
||||||
status = False
|
status = False
|
||||||
counter = 0
|
counter = 0
|
||||||
While status = False
|
While status = False
|
||||||
gratingName = modelsDT.Rows(Grating_Fill.numOfHorizontal * (Grating_Fill.numOfVertical - 1) + counter)("partName")
|
gratingName = modelsDT.Rows(Calculate_Fill_Grid.numOfHorizontal * (Calculate_Fill_Grid.numOfVertical - 1) + counter)("partName")
|
||||||
iDrawing.ClearSelection2(True)
|
iDrawing.ClearSelection2(True)
|
||||||
|
|
||||||
plane2Name = "Point1@SW2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
plane2Name = "Point1@SW2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||||
|
|
@ -233,7 +233,7 @@ Public Class Multiple_Drawing
|
||||||
status = False
|
status = False
|
||||||
counter = 0
|
counter = 0
|
||||||
While status = False
|
While status = False
|
||||||
gratingName = modelsDT.Rows(Grating_Fill.numOfHorizontal * Grating_Fill.numOfVertical - 1 - counter)("partName")
|
gratingName = modelsDT.Rows(Calculate_Fill_Grid.numOfHorizontal * Calculate_Fill_Grid.numOfVertical - 1 - counter)("partName")
|
||||||
iDrawing.ClearSelection2(True)
|
iDrawing.ClearSelection2(True)
|
||||||
|
|
||||||
plane2Name = "Point1@SW2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
plane2Name = "Point1@SW2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||||
|
|
@ -252,7 +252,7 @@ Public Class Multiple_Drawing
|
||||||
status = False
|
status = False
|
||||||
counter = 0
|
counter = 0
|
||||||
While status = False
|
While status = False
|
||||||
gratingName = modelsDT.Rows(Grating_Fill.numOfHorizontal * Grating_Fill.numOfVertical - 1 - counter * Grating_Fill.numOfHorizontal)("partName")
|
gratingName = modelsDT.Rows(Calculate_Fill_Grid.numOfHorizontal * Calculate_Fill_Grid.numOfVertical - 1 - counter * Calculate_Fill_Grid.numOfHorizontal)("partName")
|
||||||
iDrawing.ClearSelection2(True)
|
iDrawing.ClearSelection2(True)
|
||||||
|
|
||||||
plane2Name = "Point1@SL2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
plane2Name = "Point1@SL2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||||
|
|
@ -273,11 +273,11 @@ Public Class Multiple_Drawing
|
||||||
Next
|
Next
|
||||||
|
|
||||||
' -- Loop Horizontal --
|
' -- Loop Horizontal --
|
||||||
For i = 0 To Grating_Fill.numOfHorizontal - 1
|
For i = 0 To Calculate_Fill_Grid.numOfHorizontal - 1
|
||||||
status = False
|
status = False
|
||||||
counter = 0
|
counter = 0
|
||||||
While status = False
|
While status = False
|
||||||
gratingName = modelsDT.Rows(i + counter * Grating_Fill.numOfHorizontal)("partName")
|
gratingName = modelsDT.Rows(i + counter * Calculate_Fill_Grid.numOfHorizontal)("partName")
|
||||||
iDrawing.ClearSelection2(True)
|
iDrawing.ClearSelection2(True)
|
||||||
plane1Name = "Point1@SL1@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
plane1Name = "Point1@SL1@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||||
status = swExtensions.SelectByID2(plane1Name, "EXTSKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
|
status = swExtensions.SelectByID2(plane1Name, "EXTSKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
|
||||||
|
|
@ -296,7 +296,7 @@ Public Class Multiple_Drawing
|
||||||
status = False
|
status = False
|
||||||
counter = 0
|
counter = 0
|
||||||
While status = False
|
While status = False
|
||||||
gratingName = modelsDT.Rows(counter * Grating_Fill.numOfHorizontal)("partName")
|
gratingName = modelsDT.Rows(counter * Calculate_Fill_Grid.numOfHorizontal)("partName")
|
||||||
iDrawing.ClearSelection2(True)
|
iDrawing.ClearSelection2(True)
|
||||||
plane1Name = "Point1@SL1@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
plane1Name = "Point1@SL1@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||||
status = swExtensions.SelectByID2(plane1Name, "EXTSKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
|
status = swExtensions.SelectByID2(plane1Name, "EXTSKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
|
||||||
|
|
@ -306,7 +306,7 @@ Public Class Multiple_Drawing
|
||||||
status = False
|
status = False
|
||||||
counter = 0
|
counter = 0
|
||||||
While status = False
|
While status = False
|
||||||
gratingName = modelsDT.Rows(Grating_Fill.numOfHorizontal - 1 + counter * Grating_Fill.numOfHorizontal)("partName")
|
gratingName = modelsDT.Rows(Calculate_Fill_Grid.numOfHorizontal - 1 + counter * Calculate_Fill_Grid.numOfHorizontal)("partName")
|
||||||
plane2Name = "Point1@SL2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
plane2Name = "Point1@SL2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||||
status = swExtensions.SelectByID2(plane2Name, "EXTSKETCHSEGMENT", 0, 0, 0, True, 0, Nothing, 0)
|
status = swExtensions.SelectByID2(plane2Name, "EXTSKETCHSEGMENT", 0, 0, 0, True, 0, Nothing, 0)
|
||||||
counter += 1
|
counter += 1
|
||||||
|
|
@ -319,11 +319,11 @@ Public Class Multiple_Drawing
|
||||||
measurement.ShowParenthesis = True
|
measurement.ShowParenthesis = True
|
||||||
|
|
||||||
' -- Loop Vertical --
|
' -- Loop Vertical --
|
||||||
For i = 0 To Grating_Fill.numOfVertical - 1
|
For i = 0 To Calculate_Fill_Grid.numOfVertical - 1
|
||||||
status = False
|
status = False
|
||||||
counter = 0
|
counter = 0
|
||||||
While status = False
|
While status = False
|
||||||
gratingName = modelsDT.Rows(i * Grating_Fill.numOfHorizontal + counter)("partName")
|
gratingName = modelsDT.Rows(i * Calculate_Fill_Grid.numOfHorizontal + counter)("partName")
|
||||||
iDrawing.ClearSelection2(True)
|
iDrawing.ClearSelection2(True)
|
||||||
plane1Name = "Point1@SW1@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
plane1Name = "Point1@SW1@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||||
status = swExtensions.SelectByID2(plane1Name, "EXTSKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
|
status = swExtensions.SelectByID2(plane1Name, "EXTSKETCHSEGMENT", 0, 0, 0, False, 0, Nothing, 0)
|
||||||
|
|
@ -352,7 +352,7 @@ Public Class Multiple_Drawing
|
||||||
status = False
|
status = False
|
||||||
counter = 0
|
counter = 0
|
||||||
While status = False
|
While status = False
|
||||||
gratingName = modelsDT.Rows(Grating_Fill.numOfHorizontal * (Grating_Fill.numOfVertical - 1) + counter)("partName")
|
gratingName = modelsDT.Rows(Calculate_Fill_Grid.numOfHorizontal * (Calculate_Fill_Grid.numOfVertical - 1) + counter)("partName")
|
||||||
plane2Name = "Point1@SW2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
plane2Name = "Point1@SW2@" & CompName & "@" & myView.GetName2 & "/" & gratingName & "-1@" & CompName.Split("-")(0)
|
||||||
status = swExtensions.SelectByID2(plane2Name, "EXTSKETCHSEGMENT", 0, 0, 0, True, 0, Nothing, 0)
|
status = swExtensions.SelectByID2(plane2Name, "EXTSKETCHSEGMENT", 0, 0, 0, True, 0, Nothing, 0)
|
||||||
counter += 1
|
counter += 1
|
||||||
|
|
|
||||||
|
|
@ -74,9 +74,10 @@
|
||||||
<Import Include="System.Xml.Linq" />
|
<Import Include="System.Xml.Linq" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="Gratings Data\Calculate_Fill_Grid.vb" />
|
||||||
<Compile Include="Gratings Data\Database.vb" />
|
<Compile Include="Gratings Data\Database.vb" />
|
||||||
<Compile Include="Gratings Data\Data.vb" />
|
<Compile Include="Gratings Data\Data.vb" />
|
||||||
<Compile Include="Gratings Data\Grating_Fill.vb" />
|
<Compile Include="Gratings Data\Grating_Fill2.vb" />
|
||||||
<Compile Include="Gratings Data\User_Input.vb" />
|
<Compile Include="Gratings Data\User_Input.vb" />
|
||||||
<Compile Include="GUI\AppForm.Designer.vb">
|
<Compile Include="GUI\AppForm.Designer.vb">
|
||||||
<DependentUpon>AppForm.vb</DependentUpon>
|
<DependentUpon>AppForm.vb</DependentUpon>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue