Serrated HLCt developed and implemented
This commit is contained in:
parent
23c26dedd9
commit
0ccfdf4170
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -476,12 +476,20 @@
|
|||
gratingTable.Rows(0)("CROSSBAR_SPACING") = CInt(cSpacing)
|
||||
|
||||
If Individual.ComboBox_Type.Text = "Pressure Welded" Then
|
||||
gratingTable.Rows(0)("TYPE") = "pressure_welded"
|
||||
If gratingSerrated = True Then
|
||||
gratingTable.Rows(0)("TYPE") = "pressure_welded_serrated"
|
||||
Else
|
||||
gratingTable.Rows(0)("TYPE") = "pressure_welded"
|
||||
End If
|
||||
gratingTable.Rows(0)("CROSSBAR_DIAMETER") = CBDiameter
|
||||
gratingTable.Rows(0)("CROSSBAR_THICKNESS") = 0
|
||||
gratingTable.Rows(0)("CROSSBAR_HEIGHT") = 0
|
||||
Else
|
||||
gratingTable.Rows(0)("TYPE") = "type_a"
|
||||
If gratingSerrated = True Then
|
||||
gratingTable.Rows(0)("TYPE") = "type_a_serrated"
|
||||
Else
|
||||
gratingTable.Rows(0)("TYPE") = "type_a"
|
||||
End If
|
||||
gratingTable.Rows(0)("CROSSBAR_DIAMETER") = 0
|
||||
gratingTable.Rows(0)("CROSSBAR_THICKNESS") = 2 'CBThickness FIXA
|
||||
gratingTable.Rows(0)("CROSSBAR_HEIGHT") = 20 'CBHeight FIXA
|
||||
|
|
|
|||
|
|
@ -2,15 +2,13 @@
|
|||
Imports SldWorks
|
||||
Public Class Individual_Frame_3D
|
||||
Private Shared designName As String
|
||||
|
||||
Public Shared frameDT As New DataTable
|
||||
Public Shared cuttingList As New Dictionary(Of Integer, Integer())
|
||||
Public Shared sideFrameLengths As New Dictionary(Of String, Integer)
|
||||
|
||||
Public Shared Sub Build_Frame(gratingParameters As DataRow, parentID As Integer)
|
||||
Dim frameDT As New DataTable
|
||||
frameDT = Generate_FrameData(gratingParameters)
|
||||
|
||||
|
||||
For i = 0 To frameDT.Rows.Count - 1
|
||||
If frameDT.Rows(i)("TYPE") = "SIDE" Then
|
||||
sideFrameLengths.Add("Frame " & sideFrameLengths.Count + 1, frameDT.Rows(i)("LENGTH"))
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
Imports SldWorks
|
||||
|
||||
Public Class Model_3D
|
||||
Private Shared gratingParameters As DataRow
|
||||
Private Shared designName As String
|
||||
Public Shared partDT As New DataTable
|
||||
Public Shared Sub BuildGrating()
|
||||
|
|
@ -13,7 +14,7 @@ Public Class Model_3D
|
|||
|
||||
Dim inst_ As Integer
|
||||
Dim parentID As Integer = 0
|
||||
Dim gratingParameters As DataRow = exportTable.Rows(0)
|
||||
gratingParameters = exportTable.Rows(0)
|
||||
|
||||
inst_ = ExternalClass.instantiate_parts(parentID, gratingParameters("TYPE"), "")
|
||||
ExternalClass.modify_parameter_value("DP_GRATING_WIDTH", inst_, gratingParameters("WIDTH"))
|
||||
|
|
@ -23,7 +24,7 @@ Public Class Model_3D
|
|||
ExternalClass.modify_parameter_value("DP_LOADBAR_SPACING", inst_, gratingParameters("LOADBAR_SPACING"))
|
||||
ExternalClass.modify_parameter_value("DP_CROSSBAR_SPACING", inst_, gratingParameters("CROSSBAR_SPACING"))
|
||||
|
||||
If gratingParameters("TYPE") = "pressure_welded" Then
|
||||
If gratingParameters("TYPE") = "pressure_welded" Or gratingParameters("TYPE") = "pressure_welded_serrated" Then
|
||||
ExternalClass.modify_parameter_value("DP_CROSSBAR_DIAMETER", inst_, gratingParameters("CROSSBAR_DIAMETER"))
|
||||
Else
|
||||
ExternalClass.modify_parameter_value("DP_CROSSBAR_THICKNESS", inst_, gratingParameters("CROSSBAR_THICKNESS"))
|
||||
|
|
@ -49,9 +50,16 @@ Public Class Model_3D
|
|||
Recess_Indent()
|
||||
Save_Assembly()
|
||||
|
||||
Individual_Frame_3D.Generate_End_Frame_Pieces()
|
||||
Individual_Frame_Drawing.Create_Assemblies()
|
||||
Individual_Frame_Drawing.Generate_Drawings()
|
||||
For Each DR As DataRow In Individual_Frame_3D.frameDT.Rows
|
||||
If DR("TYPE") = "SIDE" Then
|
||||
Individual_Frame_3D.Generate_End_Frame_Pieces()
|
||||
Individual_Frame_Drawing.Create_Assemblies()
|
||||
Individual_Frame_Drawing.Generate_Drawings()
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Shared Sub Save_Assembly()
|
||||
|
|
@ -342,6 +350,21 @@ Public Class Model_3D
|
|||
End If
|
||||
Next
|
||||
|
||||
|
||||
If gratingParameters("TYPE") = "pressure_welded_serrated" Then
|
||||
For i = 1 To 5
|
||||
boolstatus = AssemblyExtension.SelectByID2("Serrated-Cut" & i & "@" & gratingPartName & "-1@" & designName, "BODYFEATURE", 0, 0, 0, False, 0, Nothing, 0)
|
||||
modelDoc.EditUnsuppress2()
|
||||
Next
|
||||
|
||||
ElseIf gratingParameters("TYPE") = "type_a_serrated" Then
|
||||
For i = 1 To 2
|
||||
boolstatus = AssemblyExtension.SelectByID2("Serrated-Cut" & i & "@" & gratingPartName & "-1@" & designName, "BODYFEATURE", 0, 0, 0, False, 0, Nothing, 0)
|
||||
modelDoc.EditUnsuppress2()
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
Assembly.EditAssembly
|
||||
|
||||
components = Assembly.GetComponents(True)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
Imports SldWorks
|
||||
|
||||
Public Class Model_3D_Fill
|
||||
Private Shared gratingParameters As DataRow
|
||||
Private Shared designName As String
|
||||
Public Shared Sub BuildGrid()
|
||||
Dim exportTable As DataTable
|
||||
|
|
@ -12,7 +13,7 @@ Public Class Model_3D_Fill
|
|||
|
||||
Dim inst_ As Integer
|
||||
Dim parentID As Integer = 0
|
||||
Dim gratingParameters As DataRow = exportTable.Rows(0)
|
||||
gratingParameters = exportTable.Rows(0)
|
||||
|
||||
For i = 0 To Grating_Fill.gratingDimensions.Rows.Count - 1
|
||||
inst_ = ExternalClass.instantiate_parts(parentID, gratingParameters("TYPE"), "") ' Ange pressure_welded eller type A, Serrated?
|
||||
|
|
@ -21,7 +22,7 @@ Public Class Model_3D_Fill
|
|||
ExternalClass.modify_parameter_value("DP_LOADBAR_SPACING", inst_, gratingParameters("LOADBAR_SPACING"))
|
||||
ExternalClass.modify_parameter_value("DP_CROSSBAR_SPACING", inst_, gratingParameters("CROSSBAR_SPACING"))
|
||||
|
||||
If gratingParameters("TYPE") = "pressure_welded" Then
|
||||
If gratingParameters("TYPE") = "pressure_welded" Or gratingParameters("TYPE") = "pressure_welded_serrated" Then
|
||||
ExternalClass.modify_parameter_value("DP_CROSSBAR_DIAMETER", inst_, gratingParameters("CROSSBAR_DIAMETER"))
|
||||
Else
|
||||
ExternalClass.modify_parameter_value("DP_CROSSBAR_THICKNESS", inst_, gratingParameters("CROSSBAR_THICKNESS"))
|
||||
|
|
@ -393,6 +394,35 @@ Public Class Model_3D_Fill
|
|||
Assembly.EditAssembly
|
||||
boolstatus = modelDoc.EditRebuild3()
|
||||
Next
|
||||
|
||||
If gratingParameters("TYPE") = "pressure_welded_serrated" Or gratingParameters("TYPE") = "type_a_serrated" Then
|
||||
Dim numOfFeat As Integer = 0
|
||||
If gratingParameters("TYPE") = "pressure_welded_serrated" Then
|
||||
numOfFeat = 5
|
||||
ElseIf gratingParameters("TYPE") = "type_a_serrated" Then
|
||||
numOfFeat = 2
|
||||
End If
|
||||
For i = 0 To Grating_Fill.numOfVertical * Grating_Fill.numOfHorizontal - 1
|
||||
Dim gratingPartName As String = partDT.Rows(i)("partName")
|
||||
Dim indexGrating As Integer
|
||||
For j = 0 To components.Length - 1
|
||||
If components(j).Name2 = gratingPartName & "-1" Then
|
||||
indexGrating = j
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Dim gratingComponent As SldWorks.Component2 = components(indexGrating)
|
||||
boolstatus = AssemblyExtension.SelectByID2(gratingPartName & "-1@" & designName, "COMPONENT", 0, 0, 0, False, 0, Nothing, 0)
|
||||
Assembly.EditPart
|
||||
|
||||
For j = 1 To numOfFeat
|
||||
boolstatus = AssemblyExtension.SelectByID2("Serrated-Cut" & j & "@" & gratingPartName & "-1@" & designName, "BODYFEATURE", 0, 0, 0, False, 0, Nothing, 0)
|
||||
modelDoc.EditUnsuppress2()
|
||||
Next
|
||||
Assembly.EditAssembly
|
||||
Next
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue