diff --git a/HLCt/Parts/~$START.SLDPRT b/HLCt/Parts/~$START.SLDPRT
new file mode 100644
index 0000000..b07f2ee
Binary files /dev/null and b/HLCt/Parts/~$START.SLDPRT differ
diff --git a/HLCt/frame_l_corner.SLDPRT b/HLCt/frame_l_corner.SLDPRT
new file mode 100644
index 0000000..2fac45d
Binary files /dev/null and b/HLCt/frame_l_corner.SLDPRT differ
diff --git a/HLCt/frame_l_straight.SLDPRT b/HLCt/frame_l_straight.SLDPRT
index 40684af..77ae3f9 100644
Binary files a/HLCt/frame_l_straight.SLDPRT and b/HLCt/frame_l_straight.SLDPRT differ
diff --git a/HLCt/pressure_welded.SLDPRT b/HLCt/pressure_welded.SLDPRT
index 6c48880..eb7a3e6 100644
Binary files a/HLCt/pressure_welded.SLDPRT and b/HLCt/pressure_welded.SLDPRT differ
diff --git a/Wardrobe/SolidWorks/Individual_Frame_3D.vb b/Wardrobe/SolidWorks/Individual_Frame_3D.vb
new file mode 100644
index 0000000..5f9c609
--- /dev/null
+++ b/Wardrobe/SolidWorks/Individual_Frame_3D.vb
@@ -0,0 +1,138 @@
+Imports XCCLibrary
+Public Class Individual_Frame_3D
+ Private Shared designName As String
+ Public Shared Sub Build_Frame(gratingParameters As DataRow, parentID As Integer)
+ Dim frameDT As New DataTable
+ frameDT = Generate_Frame_Data(gratingParameters)
+
+ Dim inst_ As Integer
+
+ For i = 0 To frameDT.Rows.Count - 1
+ Dim HLCtName As String
+ If frameDT.Rows(i)("TYPE") = "CORNER" Then
+ HLCtName = "frame_l_corner"
+ Else
+ HLCtName = "frame_l_straight"
+ End If
+ inst_ = ExternalClass.instantiate_parts(parentID, HLCtName, "")
+ ExternalClass.modify_parameter_value("DP_HEIGHT", inst_, 30)
+ ExternalClass.modify_parameter_value("DP_WIDTH", inst_, 40)
+
+ ExternalClass.modify_parameter_value("DP_ROTATION", inst_, frameDT.Rows(i)("ROTATION"))
+ ExternalClass.modify_parameter_value("DP_OFFSET_W", inst_, frameDT.Rows(i)("OFFSET_W"))
+ ExternalClass.modify_parameter_value("DP_OFFSET_L", inst_, frameDT.Rows(i)("OFFSET_L"))
+
+
+ If frameDT.Rows(i)("TYPE") = "SIDE" Then
+ ExternalClass.modify_parameter_value("DP_CUTOFFSET1", inst_, 0)
+ ExternalClass.modify_parameter_value("DP_CUTOFFSET2", inst_, 2000 - frameDT.Rows(i)("LENGTH"))
+ End If
+ Next
+
+
+
+
+
+ End Sub
+
+ Private Shared Function Generate_Frame_Data(gratingParameters As DataRow)
+ Dim DT As New DataTable
+ DT.Columns.Add("TYPE", GetType(String))
+ DT.Columns.Add("LENGTH", GetType(Integer))
+ DT.Columns.Add("SIDE", GetType(Integer))
+ DT.Columns.Add("CORNER", GetType(Integer))
+ DT.Columns.Add("ROTATION", GetType(Integer))
+ DT.Columns.Add("OFFSET_W", GetType(Integer))
+ DT.Columns.Add("OFFSET_L", GetType(Integer))
+ Dim DTRow As DataRow
+ For i = 0 To Data.gratingPoints.Rows.Count - 1
+ If Data.gratingPoints.Rows(i)("RECESS OK") Then
+ DTRow = DT.NewRow
+ DTRow("TYPE") = "CORNER"
+ DTRow("CORNER") = Data.gratingPoints.Rows(i)("QUADRANT")
+ DTRow("ROTATION") = 360 - Data.gratingPoints.Rows(i)("QUADRANT") * 90
+
+ If DTRow("CORNER") = 1 Then
+ DTRow("OFFSET_W") = gratingParameters("WIDTH")
+ DTRow("OFFSET_L") = 0
+ ElseIf DTRow("CORNER") = 2 Then
+ DTRow("OFFSET_W") = gratingParameters("WIDTH")
+ DTRow("OFFSET_L") = gratingParameters("LENGTH")
+ ElseIf DTRow("CORNER") = 3 Then
+ DTRow("OFFSET_W") = 0
+ DTRow("OFFSET_L") = gratingParameters("LENGTH")
+ Else
+ DTRow("OFFSET_W") = 0
+ DTRow("OFFSET_L") = 0
+
+ End If
+
+
+ DT.Rows.Add(DTRow)
+ End If
+
+
+
+ Dim i2 As Integer
+ If i = Data.gratingPoints.Rows.Count - 1 Then
+ i2 = 0
+ Else
+ i2 = i + 1
+
+ End If
+
+ Dim sideFrame As Boolean = False
+ If Data.gratingPoints.Rows(i)("X") = Data.gratingPoints.Rows(i2)("X") Then
+ If Data.gratingPoints.Rows(i)("X") = Data.grossAreaPoints.Rows(0)("X") Or Data.gratingPoints.Rows(i)("X") = Data.grossAreaPoints.Rows(1)("X") Then
+ sideFrame = True
+ End If
+ ElseIf Data.gratingPoints.Rows(i)("Y") = Data.gratingPoints.Rows(i2)("Y") Then
+ If Data.gratingPoints.Rows(i)("Y") = Data.grossAreaPoints.Rows(0)("Y") Or Data.gratingPoints.Rows(i)("Y") = Data.grossAreaPoints.Rows(3)("Y") Then
+ sideFrame = True
+ End If
+ End If
+
+ If sideFrame = True Then
+ DTRow = DT.NewRow
+ DTRow("TYPE") = "SIDE"
+
+ If Data.gratingPoints.Rows(i)("X") = Data.gratingPoints.Rows(i2)("X") Then
+
+ If Data.gratingPoints.Rows(i)("Y") > Data.gratingPoints.Rows(i2)("Y") Then
+ DTRow("SIDE") = 3
+ DTRow("LENGTH") = (Data.gratingPoints.Rows(i)("Y") - Data.gratingPoints.Rows(i2)("Y")) * 1000 - 420 'Fixa 420 baserat på hörnens längd
+ DTRow("OFFSET_W") = 210 'FIXA
+ DTRow("OFFSET_L") = gratingParameters("LENGTH")
+ Else
+ DTRow("SIDE") = 1
+ DTRow("LENGTH") = (Data.gratingPoints.Rows(i2)("Y") - Data.gratingPoints.Rows(i)("Y")) * 1000 - 420 'Fixa 420 baserat på hörnens längd
+ DTRow("OFFSET_W") = 210 'FIXA
+ DTRow("OFFSET_L") = 0
+ End If
+ Else
+ If Data.gratingPoints.Rows(i)("X") > Data.gratingPoints.Rows(i2)("X") Then
+ DTRow("SIDE") = 4
+ DTRow("LENGTH") = (Data.gratingPoints.Rows(i)("X") - Data.gratingPoints.Rows(i2)("X")) * 1000 - 420 'Fixa 420 baserat på hörnens längd
+ DTRow("OFFSET_W") = 0
+ DTRow("OFFSET_L") = 210 'FIXA
+ Else
+ DTRow("SIDE") = 2
+ DTRow("LENGTH") = (Data.gratingPoints.Rows(i2)("X") - Data.gratingPoints.Rows(i)("X")) * 1000 - 420 'Fixa 420 baserat på hörnens längd
+ DTRow("OFFSET_W") = gratingParameters("WIDTH")
+ DTRow("OFFSET_L") = 210 'FIXA
+ End If
+ End If
+ DTRow("ROTATION") = 360 - DTRow("SIDE") * 90
+ DT.Rows.Add(DTRow)
+ End If
+
+
+ Next
+
+
+
+
+ Return DT
+
+ End Function
+End Class
diff --git a/Wardrobe/SolidWorks/Model_3D.vb b/Wardrobe/SolidWorks/Model_3D.vb
index bf4d25b..b07f561 100644
--- a/Wardrobe/SolidWorks/Model_3D.vb
+++ b/Wardrobe/SolidWorks/Model_3D.vb
@@ -36,6 +36,8 @@ Public Class Model_3D
Inst_Recesses(parentID, gratingParameters, recessDR)
Next
+ Individual_Frame_3D.Build_Frame(gratingParameters, parentID)
+
importClass.copyGroupsByDataSet(ExternalClass.groupds_new)
Dim grNr = groupClass.NewGroupID
Dim designTable = designModel.selectDesign("*")
diff --git a/Wardrobe/Wardrobe.vbproj b/Wardrobe/Wardrobe.vbproj
index 2df7171..26d51a7 100644
--- a/Wardrobe/Wardrobe.vbproj
+++ b/Wardrobe/Wardrobe.vbproj
@@ -120,6 +120,7 @@
+
diff --git a/Weland ritningsmallar/Ritningspil.png b/Weland ritningsmallar/Ritningspil.png
new file mode 100644
index 0000000..ab0fceb
Binary files /dev/null and b/Weland ritningsmallar/Ritningspil.png differ