DAFTAR PUSTAKA DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
DAFTAR PUSTAKA
Frieyadie. 2006. Panduan Pemrograman C++. Penerbit Andi : Yogyakarta Imran, Iswandi. 2005. Catatan Kuliah Struktur Beton. Penerbit ITB : Bandung Kadir, Abdul. 2004. Panduan Pemrograman Bahasa C. Penerbit Andi : Yogyakarta Nasution, Amrinsyah. 2007. Catatan Kuliah Struktur Beton. Penerbit ITB : Bandung
DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
xiii
LAMPIRAN A DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
LAMIRAN A (Main Form) using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace AnalisisBalok { public partial class MainForm : Form { public MainForm() { InitializeComponent(); } private void gayaDalamButton_Click(object sender, EventArgs e) { gaya_dalam gd = new gaya_dalam(); gd.Show(); } private void desainTunggalButton_Click(object sender, EventArgs e) { desain_tunggal dt = new desain_tunggal(); dt.Show(); } private void desainGandaButton_Click(object sender, EventArgs e) { desain_ganda dg = new desain_ganda(); dg.Show(); } private void tulGeserButton_Click(object sender, EventArgs e) { desain_geser g = new desain_geser(); DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN A DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
g.Show(); } private void kapasitasTunggalButton_Click(object sender, EventArgs e) { kapasitas_tunggal kt = new kapasitas_tunggal(); kt.Show(); } private void kapasitasGandaButton_Click(object sender, EventArgs e) { kapasitas_ganda kg = new kapasitas_ganda(); kg.Show(); } private void gayaDalamToolStripMenuItem_Click(object sender, EventArgs e) { gaya_dalam gd = new gaya_dalam(); gd.Show(); } private void designTunggalToolStripMenuItem_Click(object sender, EventArgs e) { desain_tunggal dt = new desain_tunggal(); dt.Show(); } private void designBalokToolStripMenuItem_Click(object sender, EventArgs e) { desain_ganda dg = new desain_ganda(); dg.Show(); } private void geserToolStripMenuItem_Click(object sender, EventArgs e) { desain_geser g = new desain_geser(); g.Show(); } private void kapastitasTunggalToolStripMenuItem_Click(object sender, EventArgs e) { DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN A DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
kapasitas_tunggal kt = new kapasitas_tunggal(); kt.Show(); } private void kapasitasGandaToolStripMenuItem_Click(object sender, EventArgs e) { kapasitas_ganda kg = new kapasitas_ganda(); kg.Show(); } private void aboutToolStripMenuItem_Click(object sender, EventArgs e) { AboutBox ab = new AboutBox(); ab.Show(); } private void exitToolStripMenuItem_Click(object sender, EventArgs e) { Application.Exit(); }
} }
DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN B DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
LAMPIRAN B (Desain Tulangan Tunggal) using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; namespace AnalisisBalok { public partial class desain_tunggal : Form { int it; float[] arrPolos = new float[9] { 10.0f, 13.0f, 16.0f, 19.0f, 22.0f, 25.0f, 29.0f, 32.0f, 36.0f }; float x, asbjtot, asbj, fympat, Mnt, betat, fcmpat, astperlu, asmint, asbt, asmaxt, aspt, ct, at, cbt, abt, bt, ht, dt, fct, fyt, Mut; bool lanjutOK = false; public desain_tunggal() { InitializeComponent(); } public desain_tunggal(float pMu) { InitializeComponent(); Muttb.Text = pMu.ToString(); } public desain_tunggal(float pB, float pH, float pD, float pFc, float pFy, float pMu) { InitializeComponent(); bttb.Text = pB.ToString(); httb.Text = pH.ToString(); dttb.Text = pD.ToString(); fcttb.Text = pFc.ToString(); DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN B DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
fyttb.Text = pFy.ToString(); Muttb.Text = pMu.ToString(); } private void prosesbutton_Click(object sender, EventArgs e) { dataGridView1.Rows.Clear(); bt = float.Parse(bttb.Text); ht = float.Parse(httb.Text); dt = float.Parse(dttb.Text); fct = float.Parse(fcttb.Text); fyt = float.Parse(fyttb.Text); Mut = float.Parse(Muttb.Text); fcmpat=fct/10.155f; betat=0.85f; if (fcmpat>30) betat=0.85f-0.05f*(fcmpat-30)/7; if (betat<0.65) betat=0.65f; Mnt=Mut/0.8f; x = 1; astperlu = (0.85f * fct * bt / fyt) * (dt - (float)Math.Sqrt(dt * dt - (2 * Mnt / (0.85f * fct * bt)))); float akar=dt*dt-(2*Mnt/(0.85f*fct*bt)); if (akar<0) { x = 2; astperlu = 0; } astperluL.Text = Math.Round(astperlu, 3) + " cm2"; at=astperlu*fyt/(0.85f*fct*bt); ct=at/betat; fympat=fyt/10.155f; asmint= 1.4f*bt*dt/fympat; asmintL.Text = Math.Round(asmint,3) + " cm2"; cbt=dt*0.003f/(0.003f+fyt/2100000.0f); abt=cbt*betat; DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN B DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
//abtL.Text = abt.ToString() + " cm2"; asbt= 0.85f*fct*abt*bt/fyt; asbtL.Text = Math.Round(asbt,3) + " cm2"; asmaxt=3*asbt/8; asmaxtL.Text = Math.Round(asmaxt,3) + " cm2";
aspt = 0; if ((astperlu
asmint)&&(astperluasmaxt)&&(asmaxt>asmint)) { x=0; //aspt=asmaxt; //keteranganL.Text = "Luas tulangan yang diperlukan lebih besar dari luas tulangan maksimum yang boleh dipakai menurut peraturan\nUlangi desain atau perbesar dimensi balok"; } else { x=2; //keteranganL.Text = "ERROR"; }
if (x == 0) DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN B DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
{ tabelTulanganL.Text = "Tidak ada tulangan; penampang terlalu kecil"; } else if (x == 2) { tabelTulanganL.Text = "ERROR , momen terlalu besar"; } else { tabelTulanganL.Text = "Tabel jumlah tulangan yang harus dipasang berdasarkan diameter tulangan"; for (int i = 0; i < 9; i++) { it=0; asbj=(22.0f/7.0f)*(arrPolos[i]/20.0f)*(arrPolos[i]/20.0f); asbjtot=asbj*it; while (asbjtot
LAMPIRAN B DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
if (lanjutOK) { desain_ganda dg = new desain_ganda(bt, ht, dt, fct, fyt, Mut); dg.Show(); } else MessageBox.Show("Proses belum selesai dilakukan!", " Tak Bisa Lanjut ", MessageBoxButtons.OK, MessageBoxIcon.Warning); } private void desainToolStripMenuItem_Click(object sender, EventArgs e) { if (lanjutOK) { desain_geser g = new desain_geser(bt, ht, dt, fct, fyt, Mut); g.Show(); } else MessageBox.Show("Proses belum selesai dilakukan!", " Tak Bisa Lanjut ", MessageBoxButtons.OK, MessageBoxIcon.Warning); } private void openToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Title = "Buka Input"; ofd.Filter = "Data Design Tunggal (*.iusd1)|*.iusd1"; if (ofd.ShowDialog() == DialogResult.OK) { StreamReader sr = new StreamReader(ofd.FileName); bttb.Text = sr.ReadLine(); httb.Text = sr.ReadLine(); dttb.Text = sr.ReadLine(); fcttb.Text = sr.ReadLine(); fyttb.Text = sr.ReadLine(); Muttb.Text = sr.ReadLine(); sr.Close(); } lanjutOK = true; }
DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN B DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
private void saveToolStripMenuItem_Click(object sender, EventArgs e) { SaveFileDialog sfd = new SaveFileDialog(); sfd.Title = "Simpan Input"; sfd.Filter = "Data Design Tunggal (*.iusd1)|*.iusd1"; sfd.DefaultExt = "dab"; if (sfd.ShowDialog() == DialogResult.OK) { StreamWriter sw = new StreamWriter(sfd.FileName); sw.WriteLine(bttb.Text); sw.WriteLine(httb.Text); sw.WriteLine(dttb.Text); sw.WriteLine(fcttb.Text); sw.WriteLine(fyttb.Text); sw.WriteLine(Muttb.Text); sw.Close(); } } private void exitToolStripMenuItem_Click(object sender, EventArgs e) { this.Close(); } private void label7_Click(object sender, EventArgs e) { } } }
DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN C DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
LAMPIRAN C (Desain Tulangan Ganda) using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; namespace AnalisisBalok { public partial class desain_ganda : Form { int it; float[] arrPolos = new float[9] { 10.0f, 13.0f, 16.0f, 19.0f, 22.0f, 25.0f, 29.0f, 32.0f, 36.0f }; float asbj,asbjtot,x,asperlu,asp,fympa,asmax,asmin,Mn,fs1,b,h,d,d1,fc,fy,alfa,Mu,beta,fcmpa,as1,a s2,as3,c,es1,ey; float fympat, Mnt, betat, fcmpat, astperlu, asmint, asbt, asmaxt, aspt, ct, at, cbt, abt, bt, ht, dt, fct, fyt, Mut; float As1p, qt, Asbj1tot; bool lanjutOK = false; public desain_ganda() { InitializeComponent(); } public desain_ganda(float pMu) { InitializeComponent(); mutb.Text = pMu.ToString(); } public desain_ganda(float pB, float pH, float pD, float pFc, float pFy, float pMu) { InitializeComponent(); DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN C DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
btb.Text = pB.ToString(); htb.Text = pH.ToString(); dtb.Text = pD.ToString(); fctb.Text = pFc.ToString(); fytb.Text = pFy.ToString(); mutb.Text = pMu.ToString(); } private bool isComplete() { if ((btb.Text.Length > 0) && (htb.Text.Length > 0) && (dtb.Text.Length > 0) && (d1tb.Text.Length > 0) && (fctb.Text.Length > 0) && (fytb.Text.Length > 0) && (mutb.Text.Length > 0) && (atb.Text.Length > 0)) { return true; } else { MessageBox.Show("Isi belum lengkap!", " Peringatan", MessageBoxButtons.OK, MessageBoxIcon.Warning); return false; } } private void hitungbutton_Click(object sender, EventArgs e) { dataGridView1.Rows.Clear(); if (isComplete()) { alfa = float.Parse(atb.Text); if (alfa == 0) { bt = float.Parse(btb.Text); ht = float.Parse(htb.Text); dt = float.Parse(dtb.Text); fct = float.Parse(fctb.Text); fyt = float.Parse(fytb.Text); Mut = float.Parse(mutb.Text);
DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN C DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
fcmpat=fct/10.155f; betat=0.85f; if (fcmpat>30) betat=0.85f-0.05f*(fcmpat-30)/7; if (betat<0.65) betat=0.65f; Mnt=Mut/0.8f; x = 1; astperlu = (0.85f * fct * bt / fyt) * (dt - (float)Math.Sqrt(dt * dt - (2 * Mnt / (0.85f * fct * bt)))); float akar=dt*dt-(2*Mnt/(0.85f*fct*bt)); if (akar<0) { x = 2; astperlu = 0; } asl.Text = Math.Round(astperlu, 3) + " cm2"; at=astperlu*fyt/(0.85f*fct*bt); ct=at/betat; fympat=fyt/10.155f; asmint= 1.4f*bt*dt/fympat; asmintL.Text = Math.Round(asmint,3) + " cm2"; cbt=dt*0.003f/(0.003f+fyt/2100000.0f); abt=cbt*betat; //abtL.Text = abt.ToString() + " cm2"; asbt= 0.85f*fct*abt*bt/fyt; asbalL.Text = Math.Round(asbt,3) + " cm2"; asmaxt=3*asbt/8; asmaxtL.Text = Math.Round(asmaxt,3) + " cm2";
aspt = 0; if ((astperlu
DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN C DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
//keteranganL.Text = "Luas tulangan yang diperlukan lebih kecil dari luas tulangan minimum yang boleh dipakai menurut peraturan\nJadi, luas tulangan minimum yang dapat dipakai adalah " + aspt + " cm2"; } else if ((astperlu>asmint)&&(astperluasmaxt)&&(asmaxt>asmint)) { x=0; //aspt=asmaxt; //keteranganL.Text = "Luas tulangan yang diperlukan lebih besar dari luas tulangan maksimum yang boleh dipakai menurut peraturan\nUlangi desain atau perbesar dimensi balok"; } else { x=2; //keteranganL.Text = "ERROR"; }
if (x == 0) { tabelTulanganL.Text = "Tidak ada tulangan; penampang terlalu kecil"; } else if (x == 2) { tabelTulanganL.Text = "ERROR , momen terlalu besar"; } else { tabelTulanganL.Text = "Tabel jumlah tulangan yang harus dipasang berdasarkan diameter tulangan"; for (int i = 0; i < 9; i++) DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN C DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
{ it=0; asbj=(22.0f/7.0f)*(arrPolos[i]/20.0f)*(arrPolos[i]/20.0f); asbjtot=asbj*it; while (asbjtot 30) beta = 0.85f - 0.05f * (fcmpa - 30) / 7; if (beta < 0.65f) beta = 0.65f; Mn = Mu / 0.8f; DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN C DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
//betal.Text = beta.ToString(); c = 0.001f; as1 = 0.85f * fc * beta * c * c * b / ((fy * c) - 6000 * alfa * (c - d1)); as2 = (Mn - 0.85f * fc * beta * c * b * (d - 0.5f * beta * c)) * c / (6000 * alfa * (c - d1) * (d - d1)); as3 = Math.Abs(as1 - as2) / as1; while (as3 >= 0.0001) { c = c + 0.00001f; as1 = 0.85f * fc * beta * c * c * b / (fy * c - 6000 * alfa * (c - d1)); as2 = (Mn - (0.85f * fc * beta * c * b * (d - 0.5f * beta * c))) * c / (6000 * alfa * (c - d1) * (d - d1)); as3 = Math.Abs(as1 - as2) / as1; } es1 = (c - d1) * 0.003f / c; ey = fy / 2000000; asperlu = 0; x = 1; asp = 0; fs1 = 0; if (es1 < ey) { fs1 = 6000 * (c - d1) / c; asperlu = as2; asl.Text = Math.Round(asperlu,3) + " cm2"; //cl.Text = c + " cm"; } if (es1 >= ey) { fs1 = fy; as1 = 0.85f * fc * beta * c * b / (fy * (1 - alfa)); as2 = (Mn - 0.85f * fc * beta * c * b * (d - 0.5f * beta * c)) / (alfa * fy * (d - d1)); as3 = Math.Abs(as1 - as2) / as1; while (as3 >= 0.0001) { DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN C DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
c = c + 0.00001f; as1 = 0.85f * fc * beta * c * b / (fy * (1 - alfa)); as2 = (Mn - 0.85f * fc * beta * c * b * (d - 0.5f * beta * c)) / (alfa * fy * (d - d1)); as3 = Math.Abs(as1 - as2) / as1; } asperlu = as2; asl.Text = "As min : " + asperlu + " cm2"; //cl.Text = c + " cm"; } float a = beta * c; //al.Text = a + " cm"; fympa = fy / 10.155f; asmin = 1.4f * b * d / fympa; asmintL.Text = Math.Round(asmin,3) + " cm2"; float cb = (6000 * d) / (6000 + fy); float asb = 0.85f * fc * beta * cb * b / fy; asbalL.Text = Math.Round(asb,3)+ " cm2"; asmax = 3*asb/8; asmaxtL.Text = Math.Round(asmax,3) + " cm2"; if ((asperlu < asmin) && (asmin < asmax)) { asp = asmin; //keteranganL.Text = "Luas tulangan yang diperlukan lebih kecil dari luas tulangan minimum yang boleh dipakai\nmenurut peraturan. Jadi, luas tulangan minimum yang dapat dipakai adalah " + asp + " cm2"; } else if ((asperlu > asmin) && (asperlu < asmax)) { asp = asperlu; //keteranganL.Text = "Luas tulangan yang diperlukan lebih besar dari luas tulangan minimum yang boleh dipakai\nmenurut peraturan dan lebih kecil dari luas tulangan maksimum yang boleh dipakai menurut peraturan.\nJadi, luas tulangan minimum yang dapat dipakai adalah " + asp + " cm2"; } else if ((asperlu > asmax) && (asmax > asmin)) DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN C DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
{ x = 2; //asp = asmax; //keteranganL.Text = "Luas tulangan yang diperlukan lebih besar dari luas tulangan maksimum yang boleh dipakai\nmenurut peraturan. Ulangi desain atau perbesar dimensi balok"; } else { x = 0; //keteranganL.Text = "ERROR"; } As1p = alfa * asp; if (x == 2) { tabelTulanganL.Text = "Tidak ada tulangan; penampang terlalu kecil"; } else if (x == 0) { tabelTulanganL.Text = "tidak terdefinisi"; } else { for (int i = 0; i < 9; i++) { it = 0; qt = 0; asbj = (22.0f / 7.0f) * (arrPolos[i] / 20.0f) * (arrPolos[i] / 20.0f); asbjtot = asbj * it; Asbj1tot = asbj * qt; while (asbjtot < asp) { it++; //asbj = (22.0f / 7.0f) * (arrPolos[i] / 20.0f) * (arrPolos[i] / 20.0f); asbjtot = asbj * it; } while (Asbj1tot < As1p) { qt++; DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN C DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
//asbj = (22.0f / 7.0f) * (arrPolos[i] / 20.0f) * (arrPolos[i] / 20.0f); Asbj1tot = asbj * qt; } if (asbjtot <= asmax) { dataGridView1.Rows.Add(arrPolos[i], asbj.ToString(), it.ToString(), asbjtot.ToString(), qt.ToString(), Asbj1tot.ToString()); } else { dataGridView1.Rows.Add(arrPolos[i], asbj.ToString(), "0", "0", "0", "0"); } } } } } lanjutOK = true; } private void desainBalokTulanganTunggalToolStripMenuItem_Click(object sender, EventArgs e) { if (lanjutOK) { desain_tunggal dt = new desain_tunggal(b, h, d, fc, fy, Mu); dt.Show(); } else MessageBox.Show("Proses belum selesai dilakukan!", " Tak Bisa Lanjut ", MessageBoxButtons.OK, MessageBoxIcon.Warning); } private void desainToolStripMenuItem_Click(object sender, EventArgs e) { if (lanjutOK) { DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN C DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
desain_geser g = new desain_geser(b, h, d, fc, fy, Mu); g.Show(); } else MessageBox.Show("Proses belum selesai dilakukan!", " Tak Bisa Lanjut ", MessageBoxButtons.OK, MessageBoxIcon.Warning); } private void openToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Title = "Buka Input"; ofd.Filter = "Data Design Ganda (*.iusd2)|*.iusd2"; if (ofd.ShowDialog() == DialogResult.OK) { StreamReader sr = new StreamReader(ofd.FileName); btb.Text = sr.ReadLine(); htb.Text = sr.ReadLine(); dtb.Text = sr.ReadLine(); d1tb.Text = sr.ReadLine(); fctb.Text = sr.ReadLine(); fytb.Text = sr.ReadLine(); mutb.Text = sr.ReadLine(); atb.Text = sr.ReadLine(); sr.Close(); } lanjutOK = true; } private void saveToolStripMenuItem_Click(object sender, EventArgs e) { SaveFileDialog sfd = new SaveFileDialog(); sfd.Title = "Simpan Input"; sfd.Filter = "Data Design Ganda (*.iusd2)|*.iusd2"; sfd.DefaultExt = "dab"; if (sfd.ShowDialog() == DialogResult.OK) { StreamWriter sw = new StreamWriter(sfd.FileName); sw.WriteLine(btb.Text); sw.WriteLine(htb.Text); sw.WriteLine(dtb.Text); DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN C DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
sw.WriteLine(d1tb.Text); sw.WriteLine(fctb.Text); sw.WriteLine(fytb.Text); sw.WriteLine(mutb.Text); sw.WriteLine(atb.Text); sw.Close(); } } private void exitToolStripMenuItem_Click(object sender, EventArgs e) { this.Close(); } } }
DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN D DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
LAMPIRAN D (Gaya Dalam)
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; namespace AnalisisBalok { public partial class gaya_dalam : Form { int mouseLeftCalibration = 473; bool resultOK = false; bool lanjutOK = false; int n1,n2,n; float m1,m2,r1,r2,v1,h1,h2,h,l; float[] w,a,b,p,c,v,m,x,d,normal; float[] drawPointSegment; float[] drawPointResultA; float[] drawPointResultB; float[] valueResultA; float[] valueResultB; private bool M1OK = false; private bool M2OK = false; private bool LOK = false; float Mu; float Vu; float Nu; public gaya_dalam() { DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN D DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
InitializeComponent(); normal= new float[25]; w = new float[25]; a = new float[25]; b = new float[25]; p = new float[25]; c = new float[25]; v = new float[302]; m = new float[302]; x = new float[302]; d = new float[25]; drawPointSegment = new float[302]; drawPointResultA = new float[302]; drawPointResultB = new float[302]; valueResultA = new float[302]; valueResultB = new float[302]; r1 = 0; r2 = 0; } private void M1TextBox_TextChanged(object sender, EventArgs e) { M1OK = true; } private void M2TextBox_TextChanged(object sender, EventArgs e) { M2OK = true; } private void LTextBox_TextChanged(object sender, EventArgs e) { LOK = true; } private void resetPreviousProcess() { while (IsiHasilCDataGridView.Rows.Count > 0) IsiHasilCDataGridView.Rows.RemoveAt(0); w = new float[25]; a = new float[25]; DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN D DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
b = new float[25]; p = new float[25]; c = new float[25]; v = new float[302]; m = new float[302]; x = new float[302]; d = new float[25]; drawPointSegment = new float[302]; drawPointResultA = new float[302]; drawPointResultB = new float[302]; valueResultA = new float[302]; valueResultB = new float[302]; } private void cleanAll() { while (bebanMerataDataGridView.Rows.Count > 0) bebanMerataDataGridView.Rows.RemoveAt(0); while (bebanPusatDataGridView.Rows.Count > 0) bebanPusatDataGridView.Rows.RemoveAt(0); while (IsiHasilCDataGridView.Rows.Count > 0) IsiHasilCDataGridView.Rows.RemoveAt(0); IsiHasilALabel.Text = "-"; IsiHasilBLabel.Text = "-"; resultAPictureBox.Image = null; resultBPictureBox.Image = null; resultCPictureBox.Image = null; labelPictureBoxC.Visible = false; } private void bebanMerataButton_Click(object sender, EventArgs e) { generateBebanMerataRows(); } private void generateBebanMerataRows() { //dapatkan isi dalam textbox, ubah ke int int jumlah = int.Parse(bebanMerataTextBox.Text); if (jumlah > 0) { DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN D DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
//hapus isi tabel sebelumnya while (bebanMerataDataGridView.Rows.Count > 0) bebanMerataDataGridView.Rows.RemoveAt(0); //tambahkan baris sesuai isi textbox for (int i = 1; i <= jumlah; i++) bebanMerataDataGridView.Rows.Add(i, "", "", ""); } else if (jumlah == 0) { while (bebanMerataDataGridView.Rows.Count > 0) bebanMerataDataGridView.Rows.RemoveAt(0); } } private void bebanPusatButton_Click(object sender, EventArgs e) { generateBebanPusatRows(); } private void generateBebanPusatRows() { //dapatkan isi dalam textbox, ubah ke int int jumlah = int.Parse(bebanPusatTextBox.Text); if (jumlah > 0) { //hapus isi tabel sebelumnya while (bebanPusatDataGridView.Rows.Count > 0) bebanPusatDataGridView.Rows.RemoveAt(0); //tambahkan baris sesuai isi textbox for (int i = 1; i <= jumlah; i++) bebanPusatDataGridView.Rows.Add(i, "", ""); } else if (jumlah == 0) { while (bebanPusatDataGridView.Rows.Count > 0) bebanPusatDataGridView.Rows.RemoveAt(0); } } private bool isPreOK() { DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN D DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
if ((M1OK) && (M2OK) && (LOK)) { m1 = float.Parse(M1TextBox.Text); m2 = float.Parse(M2TextBox.Text); l = float.Parse(LTextBox.Text); return true; } else { MessageBox.Show("M1, M2, atau L belum diisi", " Warning ", MessageBoxButtons.OK, MessageBoxIcon.Warning); return false; } } private bool isHorizontalOK() { h1 = float.Parse(h1TextBox.Text); h2 = float.Parse(h2TextBox.Text); return true; } private bool isBebanMerataOK() { r1 = 0; r2 = 0; if (int.Parse(bebanMerataTextBox.Text) > 0) { for (int i = 0; i < bebanMerataDataGridView.Rows.Count; i++) for (int j = 0; j < 4; j++) if (bebanMerataDataGridView.Rows[i].Cells[j].Value.ToString().Length == 0) { MessageBox.Show("Pembebanan Merata belum lengkap", " Warning ", MessageBoxButtons.OK, MessageBoxIcon.Warning); return false; } n1 = int.Parse(bebanMerataTextBox.Text); for (int i = 1; i <= n1; i++) {
DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN D DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
w[i] = float.Parse(bebanMerataDataGridView.Rows[i 1].Cells[1].Value.ToString()); a[i] = float.Parse(bebanMerataDataGridView.Rows[i 1].Cells[2].Value.ToString()); b[i] = float.Parse(bebanMerataDataGridView.Rows[i 1].Cells[3].Value.ToString()); r1 += w[i] * a[i]; r2 += w[i] * a[i] * (b[i] + 0.5f * a[i]); } } return true; } private bool isBebanPusatOK() { if (int.Parse(bebanPusatTextBox.Text) > 0) { for (int i = 0; i < bebanPusatDataGridView.Rows.Count; i++) for (int j = 0; j < 3; j++) if (bebanPusatDataGridView.Rows[i].Cells[j].Value.ToString().Length == 0) { MessageBox.Show("Pembebanan Terpusat belum lengkap", " Warning ", MessageBoxButtons.OK, MessageBoxIcon.Warning); return false; } n2 = int.Parse(bebanPusatTextBox.Text); for (int i = 1; i <= n2; i++) { p[i] = float.Parse(bebanPusatDataGridView.Rows[i 1].Cells[1].Value.ToString()); c[i] = float.Parse(bebanPusatDataGridView.Rows[i 1].Cells[2].Value.ToString()); r1 += p[i]; r2 += p[i] * c[i]; } } return true; } private bool isJumlahSegmenNOK() { DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN D DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
if (int.Parse(segmenBalokTextBox.Text) > 0) { n = int.Parse(segmenBalokTextBox.Text); return true; } else return false; } private void prosesButton_Click(object sender, EventArgs e) { resetPreviousProcess(); if (isPreOK() && isHorizontalOK() && isBebanMerataOK() && isBebanPusatOK() && isJumlahSegmenNOK()) { prosesHasil(); //buat gambar generateDrawTables(); normalizeTables(); drawPictures(); lanjutOK = true; } } private void prosesHasil() { r2 = (r2 + m1 + m2) / l; r1 -= r2; h = 0 - h1 - h2; v1 = r1; IsiHasilALabel.Text = r1.ToString(); IsiHasilBLabel.Text = r2.ToString(); hresult.Text = h.ToString(); for (int j = 1; j <= n + 1; j++) { x[j] = (float)(j - 1) * (float)l / (float)n; m[j] = m1 + x[j] * v1; v[j] = v1; DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN D DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
normal[j] = - h; if (n1 != 0) { for (int i = 1; i <= n1; i++) { if (x[j] > b[i]) { d[i] = b[i] + a[i]; if (x[j] < d[i]) { m[j] = m[j] - w[i] * (x[j] - b[i]) * (x[j] - b[i]) * 0.5f; v[j] = v[j] - w[i] * (x[j] - b[i]); normal[j] = -h; } else { m[j] = m[j] - w[i] * a[i] * (x[j] - (b[i] + a[i] * 0.5f)); v[j] = v[j] - w[i] * a[i]; normal[j] = -h; } } } } if (n2 != 0) { for (int i = 1; i <= n2; i++) { if (x[j] > c[i]) { m[j] = m[j] - p[i] * (x[j] - c[i]); v[j] = v[j] - p[i]; normal[j] = -h; } } } IsiHasilCDataGridView.Rows.Add(x[j], v[j], m[j],normal[j]); } DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN D DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
} private void generateDrawTables() { int nDraw = 300; for (int j = 1; j <= nDraw + 1; j++) { drawPointSegment[j] = (float)(j - 1) * (float)l / (float)nDraw; valueResultB[j] = m1 + drawPointSegment[j] * v1; valueResultA[j] = v1; if (n1 != 0) { for (int i = 1; i <= n1; i++) { if (drawPointSegment[j] > b[i]) { d[i] = b[i] + a[i]; if (drawPointSegment[j] < d[i]) { valueResultB[j] = valueResultB[j] - w[i] * (drawPointSegment[j] - b[i]) * (drawPointSegment[j] - b[i]) * 0.5f; valueResultA[j] = valueResultA[j] - w[i] * (drawPointSegment[j] - b[i]); } else { valueResultB[j] = valueResultB[j] - w[i] * a[i] * (drawPointSegment[j] (b[i] + a[i] * 0.5f)); valueResultA[j] = valueResultA[j] - w[i] * a[i]; } } } } if (n2 != 0) { for (int i = 1; i <= n2; i++) { if (drawPointSegment[j] > c[i]) { valueResultB[j] = valueResultB[j] - p[i] * (drawPointSegment[j] - c[i]); valueResultA[j] = valueResultA[j] - p[i]; } DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN D DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
} } } } private void normalizeTables() { float minA = 99999.0F, maxA = 0, minB = 99999.0F, maxB = 0; for (int i = 1; i <= 300; i++) { if (minA > valueResultA[i]) minA = valueResultA[i]; if (maxA < valueResultA[i]) maxA = valueResultA[i]; if (minB > valueResultB[i]) minB = valueResultB[i]; if (maxB < valueResultB[i]) maxB = valueResultB[i]; } if (Math.Abs(minA) > maxA) maxA = Math.Abs(minA); if (Math.Abs(minB) > maxB) maxB = Math.Abs(minB); Mu = maxB; Vu = maxA; for (int i = 1; i <= 300; i++) { drawPointResultA[i] = valueResultA[i] / maxA * 50; drawPointResultB[i] = valueResultB[i] / maxB * 50; } } private void drawPictures() { if ((r1 != 0) && (r2 != 0)) { int prevPixel = 50; Bitmap bmpResultA = new Bitmap(300, 101); for (int i = 1; i <= 300; i++) { if (Math.Abs(prevPixel - (50 + -(int)drawPointResultA[i])) > 3) { if (prevPixel > (50 + -(int)drawPointResultA[i])) { for (int j = 0; j < (prevPixel - (50 + -(int)drawPointResultA[i])); j++) bmpResultA.SetPixel(i - 1, prevPixel - j, Color.Black); } DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN D DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
else { for (int j = 0; j < ((50 + -(int)drawPointResultA[i]) - prevPixel); j++) bmpResultA.SetPixel(i - 1, prevPixel + j, Color.Black); } } bmpResultA.SetPixel(i - 1, 50, Color.Blue); bmpResultA.SetPixel(i - 1, 50 + -(int)drawPointResultA[i], Color.Black); prevPixel = 50 + -(int)drawPointResultA[i]; } if (prevPixel > 50) for (int j = 0; j < prevPixel - 50; j++) bmpResultA.SetPixel(299, prevPixel - j, Color.Black); else for (int j = 0; j < 50 - prevPixel; j++) bmpResultA.SetPixel(299, prevPixel + j, Color.Black); resultAPictureBox.Image = bmpResultA; Bitmap bmpResultB = new Bitmap(300, 101); int lastPixel = 50 + (int)drawPointResultB[1]; if (lastPixel > 50) for (int j = 0; j < lastPixel - 50; j++) bmpResultB.SetPixel(0, lastPixel - j, Color.Black); else for (int j = 0; j < 50 - lastPixel; j++) bmpResultB.SetPixel(0, lastPixel + j, Color.Black); for (int i = 1; i <= 300; i++) { bmpResultB.SetPixel(i - 1, 50, Color.Blue); bmpResultB.SetPixel(i - 1, 50 + (int)drawPointResultB[i], Color.Black); } lastPixel = 50 + (int)drawPointResultB[300]; if (lastPixel > 50) for (int j = 0; j < lastPixel - 50; j++) bmpResultB.SetPixel(299, lastPixel - j, Color.Black); else for (int j = 0; j < 50 - lastPixel; j++) bmpResultB.SetPixel(299, lastPixel + j, Color.Black); resultBPictureBox.Image = bmpResultB; Bitmap bmpResultC = new Bitmap(300, 101); DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN D DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
if (normal[1] > 0) { for (int i = 1; i <= 15; i++) { bmpResultC.SetPixel(0, 50 - i, Color.Black); bmpResultC.SetPixel(299, 50 - i, Color.Black); } for (int i = 1; i <= 300; i++) { bmpResultC.SetPixel(i - 1, 50, Color.Blue); bmpResultC.SetPixel(i - 1, 35, Color.Black); } } else if (normal[1] < 0) { for (int i = 1; i <= 15; i++) { bmpResultC.SetPixel(0, 50 + i, Color.Black); bmpResultC.SetPixel(299, 50 + i, Color.Black); } for (int i = 1; i <= 300; i++) { bmpResultC.SetPixel(i - 1, 50, Color.Blue); bmpResultC.SetPixel(i - 1, 65, Color.Black); } } else { for (int i = 1; i <= 300; i++) { bmpResultC.SetPixel(i - 1, 50, Color.Black); } } resultCPictureBox.Image = bmpResultC; labelPictureBoxC.Text = "h = " + normal[1]; labelPictureBoxC.Visible = true; Nu = normal[1]; resultOK = true; } DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN D DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
} private void resultPictureBox_MouseMove(object sender, MouseEventArgs e) { int mouseX = MousePosition.X - this.Location.X - 4; int mouseY = MousePosition.Y - this.Location.Y - 23; printInfo(mouseX, mouseY, 1); } private void resultPictureBox_MouseLeave(object sender, EventArgs e) { pointerAtasPictureBox.Visible = false; pointerBawahPictureBox.Visible = false; mouseLabelAtas.Visible = false; mouseLabelBawah.Visible = false; } private void resultBPictureBox_MouseMove(object sender, MouseEventArgs e) { int mouseX = MousePosition.X - this.Location.X - 4; int mouseY = MousePosition.Y - this.Location.Y - 23; printInfo(mouseX, mouseY, 2); } private void printInfo(int x, int y, int type) { if (resultOK) { int positionX = x - mouseLeftCalibration; pointerAtasPictureBox.Left = x - 2; pointerBawahPictureBox.Left = x - 2; if (type == 1) { pointerAtasPictureBox.Top = hasilGroupBox.Top + panel1.Top + resultAPictureBox.Top - (int)drawPointResultA[positionX] + 43; pointerBawahPictureBox.Top = hasilGroupBox.Top + panel1.Top + resultAPictureBox.Top - (int)drawPointResultA[positionX] + 52; mouseLabelAtas.Top = hasilGroupBox.Top + panel1.Top + resultAPictureBox.Top - (int)drawPointResultA[positionX] + 28; DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN D DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
mouseLabelBawah.Top = hasilGroupBox.Top + panel1.Top + resultAPictureBox.Top - (int)drawPointResultA[positionX] + 60; mouseLabelBawah.Text = valueResultA[positionX].ToString() + " ton"; } else { pointerAtasPictureBox.Top = hasilGroupBox.Top + panel2.Top + resultBPictureBox.Top + (int)drawPointResultB[positionX] + 43; pointerBawahPictureBox.Top = hasilGroupBox.Top + panel2.Top + resultBPictureBox.Top + (int)drawPointResultB[positionX] + 52; mouseLabelAtas.Top = hasilGroupBox.Top + panel2.Top + resultBPictureBox.Top + (int)drawPointResultB[positionX] + 28; mouseLabelBawah.Top = hasilGroupBox.Top + panel2.Top + resultBPictureBox.Top + (int)drawPointResultB[positionX] + 60; mouseLabelBawah.Text = valueResultB[positionX].ToString() + " ton-m"; } mouseLabelAtas.Text = drawPointSegment[positionX].ToString() + " m"; if (positionX > 150) { mouseLabelAtas.Left = x - mouseLabelAtas.Size.Width + 1; mouseLabelBawah.Left = x - mouseLabelBawah.Size.Width + 1; } else { mouseLabelAtas.Left = x; mouseLabelBawah.Left = x; } if (!pointerAtasPictureBox.Visible) { pointerAtasPictureBox.Visible = true; pointerBawahPictureBox.Visible = true; mouseLabelAtas.Visible = true; mouseLabelBawah.Visible = true; } } } private void resultBPictureBox_MouseLeave(object sender, EventArgs e) DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN D DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
{ pointerAtasPictureBox.Visible = false; pointerBawahPictureBox.Visible = false; mouseLabelAtas.Visible = false; mouseLabelBawah.Visible = false; } private void exitToolStripMenuItem_Click(object sender, EventArgs e) { Application.Exit(); } private void saveToolStripMenuItem_Click(object sender, EventArgs e) { if (isPreOK() && isHorizontalOK() && isBebanMerataOK() && isBebanPusatOK() && isJumlahSegmenNOK()) { SaveFileDialog sfd = new SaveFileDialog(); sfd.Title = "Simpan Input"; sfd.Filter = "Data Gaya Dalam (*.iusgd)|*.iusgd"; sfd.DefaultExt = "dab"; if (sfd.ShowDialog() == DialogResult.OK) { StreamWriter sw = new StreamWriter(sfd.FileName); sw.WriteLine(m1); sw.WriteLine(m2); sw.WriteLine(l); sw.WriteLine(h1); sw.WriteLine(h2); sw.WriteLine(int.Parse(bebanMerataTextBox.Text)); for (int i = 1; i <= int.Parse(bebanMerataTextBox.Text); i++) { sw.WriteLine(w[i]); sw.WriteLine(a[i]); sw.WriteLine(b[i]); } sw.WriteLine(int.Parse(bebanPusatTextBox.Text)); for (int i = 1; i <= int.Parse(bebanPusatTextBox.Text); i++) { sw.WriteLine(p[i]); sw.WriteLine(c[i]); DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN D DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
} sw.WriteLine(n); sw.Close(); } } } private void openToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Title = "Buka Input"; ofd.Filter = "Data Gaya Dalam (*.iusgd)|*.iusgd"; if (ofd.ShowDialog() == DialogResult.OK) { cleanAll(); StreamReader sr = new StreamReader(ofd.FileName); M1TextBox.Text = sr.ReadLine(); M2TextBox.Text = sr.ReadLine(); LTextBox.Text = sr.ReadLine(); h1TextBox.Text = sr.ReadLine(); h2TextBox.Text = sr.ReadLine(); bebanMerataTextBox.Text = sr.ReadLine(); for (int i = 1; i <= int.Parse(bebanMerataTextBox.Text); i++) { bebanMerataDataGridView.Rows.Add(i, sr.ReadLine(), sr.ReadLine(), sr.ReadLine()); } bebanPusatTextBox.Text = sr.ReadLine(); for (int i = 1; i <= int.Parse(bebanPusatTextBox.Text); i++) { bebanPusatDataGridView.Rows.Add(i, sr.ReadLine(), sr.ReadLine()); } segmenBalokTextBox.Text = sr.ReadLine(); sr.Close(); } } private void desainBalokTulanganTunggalToolStripMenuItem_Click(object sender, EventArgs e) { if (lanjutOK) DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN D DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
{ desain_tunggal dt = new desain_tunggal(Mu * 100000); dt.Show(); } else MessageBox.Show("Proses belum selesai dilakukan!", " Tak Bisa Lanjut ", MessageBoxButtons.OK, MessageBoxIcon.Warning); } private void desainBalokTulanganGandaToolStripMenuItem_Click(object sender, EventArgs e) { if (lanjutOK) { desain_ganda dg = new desain_ganda(Mu * 100000); dg.Show(); } else MessageBox.Show("Proses belum selesai dilakukan!", " Tak Bisa Lanjut ", MessageBoxButtons.OK, MessageBoxIcon.Warning); } private void desainToolStripMenuItem_Click(object sender, EventArgs e) { if (lanjutOK) { desain_geser g = new desain_geser(Mu * 100000, Nu * 1000, Vu * 1000); g.Show(); } else MessageBox.Show("Proses belum selesai dilakukan!", " Tak Bisa Lanjut ", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } }
DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN E DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
LAMPIRAN E (Desain Geser) using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; namespace AnalisisBalok { public partial class desain_geser : Form { float sg, smaxg, s8g, smax8g, Av8g, fyvg, fyv8g, V18g, V28g, V38g, V48g, Vs8g, dvg, dv8g, bg, hg, dg, fcg, fyg, Mug, Nug, b8g, h8g, d8g, fc8g, fy8g, Mu8g, Nu8g, Asg, As8g, Vc8g, Vug, Vu8g, q8g, Pw8g, Mm8g, Vc8xg; bool lanjutOK = false; public desain_geser() { InitializeComponent(); } public desain_geser(float pMu, float pNu, float pVu) { InitializeComponent(); Mugtb.Text = pMu.ToString(); Nugtb.Text = pNu.ToString(); Vugtb.Text = pVu.ToString(); } public desain_geser(float pB, float pH, float pD, float pFc, float pFy, float pMu) { InitializeComponent(); bgtb.Text = pB.ToString(); hgtb.Text = pH.ToString(); dgtb.Text = pD.ToString(); fcgtb.Text = pFc.ToString(); DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN E DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
fygtb.Text = pFy.ToString(); Mugtb.Text = pMu.ToString(); } private void prosesbutton_Click(object sender, EventArgs e) { bg = float.Parse(bgtb.Text); hg = float.Parse(hgtb.Text); dg = float.Parse(dgtb.Text); fcg = float.Parse(fcgtb.Text); fyg = float.Parse(fygtb.Text); Asg = float.Parse(Asgtb.Text); dvg = float.Parse(dvgtb.Text); fyvg = float.Parse(fyvgtb.Text); Mug = float.Parse(Mugtb.Text); Vug = float.Parse(Vugtb.Text); Nug = float.Parse(Nugtb.Text); fc8g = fcg / 10.155f;//mpa fy8g = fyg / 10.155f;//mpa fyv8g = fyvg / 10.155f;//mpa b8g = bg * 10;//mm d8g = dg * 10;//mm dv8g = dvg * 10;//mm h8g = hg * 10;//mm Nu8g = Nug * 10;//N Vu8g = Vug * 10;//N Mu8g = Mug * 100;//N-mm As8g = Asg * 100;//mm2 Vc8g = 0; //menghitung Vc //lentur saja if (Nug == 0) { Vc8g = (float)(b8g * d8g * Math.Sqrt(fc8g) / 6); } //tarik else if (Nug > 0) { DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN E DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
Vc8g = (float)((1 - 0.3f * Nu8g / (b8g * d8g)) * b8g * d8g * Math.Sqrt(fc8g) / 3); } //tekan else { Mm8g = Mu8g - Nu8g * (4 * h8g - d8g) / 8; if (Mm8g < 0) { Vc8g = (float)(Math.Sqrt(1 + 0.3f * Nu8g / (b8g * d8g)) * 0.3f * b8g * d8g * Math.Sqrt(fc8g)); } else if (Mm8g > 0) { q8g = Vu8g * d8g / Mm8g; if (q8g < 1) { q8g = 1.0f; } Pw8g = As8g / (b8g * d8g); Vc8g = (float)(Math.Sqrt(fc8g) + (120 * Pw8g * q8g)) * b8g * d8g / 7; Vc8xg = (float)(Math.Sqrt(1 + 0.3f * Nu8g / (b8g * d8g)) * 0.3f * b8g * d8g * Math.Sqrt(fc8g)); if (Vc8g > Vc8xg) { Vc8g = Vc8xg; } } }
//Menghitung Vs Av8g = 3.14f * dv8g * dv8g / 2; Vs8g = 0; smax8g = 10000; V18g = 0.5f * 0.6f * Vc8g; V28g = 0.6f * Vc8g;//pi * Vc if (Vu8g <= V18g) { zonasiL.Text = "ZONA 1 : tidak perlu menggunakan tulangan geser"; } DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN E DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
else if ((Vu8g > V18g) && (Vu8g <= V28g)) { zonasiL.Text = "ZONA 2 : secara teoritis, untuk keadaan ini tidak perlu menggunakan\n tulangan geser; tapi untuk keamanan,\n gunakan tulangan geser dengan spasi terjauh"; Av8g = b8g * 0.5f * d8g / (3 * fyv8g); } else if (Vu8g > V28g) { Vs8g = (Vu8g - V28g) / 0.6f; V38g = (float)(b8g * d8g * Math.Sqrt(fc8g) / 3); V48g = (float)(2 * b8g * d8g * Math.Sqrt(fc8g) / 3); if (Vs8g < V38g) { zonasiL.Text = "ZONA 3"; smax8g = 0.5f * d8g; } else if ((Vs8g > V38g) && (Vs8g < V48g)) { zonasiL.Text = "ZONA 4"; smax8g = 0.25f * d8g; } else if (Vs8g > V48g) { zonasiL.Text = "diluar zona : perbesar penampang"; } else { zonasiL.Text = "ERROR"; } } else { zonasiL.Text = "ERROR"; }
s8g = Av8g * fyv8g * d8g / Vs8g; sg = s8g / 10; smaxg = smax8g / 10; DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN E DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
sperluL.Text = Math.Round(sg,3) + " cm"; smaxL.Text = Math.Round(smaxg,3) + " cm"; if (sg >= smaxg) { kesimpulanL.Text = "s maksimum = " + Math.Round(smaxg,3)+" cm"; } else if (sg < smaxg) { kesimpulanL.Text = "s maksimum = " + Math.Round(sg,3) + " cm"; } if (bg < 25) { kesimpulanL.Text = "tidak membutuhkan tulangan geser karena b < 25cm"; } lanjutOK = true; } private void desainBalokTulanganTunggalToolStripMenuItem_Click(object sender, EventArgs e) { if (lanjutOK) { desain_tunggal dt = new desain_tunggal(bg, hg, dg, fcg, fyg, Mug); dt.Show(); } else MessageBox.Show("Proses belum selesai dilakukan!", " Tak Bisa Lanjut ", MessageBoxButtons.OK, MessageBoxIcon.Warning); } private void desainBalokTulanganGandaToolStripMenuItem_Click(object sender, EventArgs e) { if (lanjutOK) { desain_ganda dgf = new desain_ganda(bg, hg, dg, fcg, fyg, Mug); dgf.Show(); } DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN E DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
else MessageBox.Show("Proses belum selesai dilakukan!", " Tak Bisa Lanjut ", MessageBoxButtons.OK, MessageBoxIcon.Warning); } private void openToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Title = "Buka Input"; ofd.Filter = "Data Desain Geser (*.iusgs)|*.iusgs"; if (ofd.ShowDialog() == DialogResult.OK) { StreamReader sr = new StreamReader(ofd.FileName); bgtb.Text = sr.ReadLine(); hgtb.Text = sr.ReadLine(); dgtb.Text = sr.ReadLine(); fcgtb.Text = sr.ReadLine(); fygtb.Text = sr.ReadLine(); Asgtb.Text = sr.ReadLine(); Mugtb.Text = sr.ReadLine(); Vugtb.Text = sr.ReadLine(); Nugtb.Text = sr.ReadLine(); fyvgtb.Text = sr.ReadLine(); dvgtb.Text = sr.ReadLine(); sr.Close(); } lanjutOK = true; } private void saveToolStripMenuItem_Click(object sender, EventArgs e) { SaveFileDialog sfd = new SaveFileDialog(); sfd.Title = "Simpan Input"; sfd.Filter = "Data Desain Geser (*.iusgs)|*.iusgs"; sfd.DefaultExt = "dab"; if (sfd.ShowDialog() == DialogResult.OK) { StreamWriter sw = new StreamWriter(sfd.FileName); sw.WriteLine(bgtb.Text); sw.WriteLine(hgtb.Text); sw.WriteLine(dgtb.Text); DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN E DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
sw.WriteLine(fcgtb.Text); sw.WriteLine(fygtb.Text); sw.WriteLine(Asgtb.Text); sw.WriteLine(Mugtb.Text); sw.WriteLine(Vugtb.Text); sw.WriteLine(Nugtb.Text); sw.WriteLine(fyvgtb.Text); sw.WriteLine(dvgtb.Text); sw.Close(); } } private void exitToolStripMenuItem_Click(object sender, EventArgs e) { this.Close(); } } }
DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN F DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
LAMPIRAN F (Cek Kapasitas Balok Tulangan Tunggal)
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; namespace AnalisisBalok { public partial class kapasitas_tunggal : Form { public kapasitas_tunggal() { InitializeComponent(); } private void Proses_Click(object sender, EventArgs e) { float fa = float.Parse(Astb.Text) * float.Parse(fytb.Text) / (0.85f * float.Parse(fctb.Text) * float.Parse(btb.Text)); float ft = float.Parse(Astb.Text) * float.Parse(fytb.Text); //Cc.Text = "Cc :" + 0.85f * float.Parse(fctb.Text) * fa * float.Parse(btb.Text) + " kg"; Mu.Text = "Mn k :" + Math.Round(ft * (float.Parse(dtb.Text) - 0.5 * fa),3) + " kg cm"; } private void openToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Title = "Buka Input"; ofd.Filter = "Data Kapasitas Tunggal (*.iusk1)|*.iusk1"; if (ofd.ShowDialog() == DialogResult.OK) { StreamReader sr = new StreamReader(ofd.FileName); btb.Text = sr.ReadLine(); DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN F DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
htb.Text = sr.ReadLine(); dtb.Text = sr.ReadLine(); Astb.Text = sr.ReadLine(); fctb.Text = sr.ReadLine(); fytb.Text = sr.ReadLine(); sr.Close(); } } private void saveToolStripMenuItem_Click(object sender, EventArgs e) { SaveFileDialog sfd = new SaveFileDialog(); sfd.Title = "Simpan Input"; sfd.Filter = "Data Kapasitas Tunggal (*.iusk1)|*.iusk1"; sfd.DefaultExt = "dab"; if (sfd.ShowDialog() == DialogResult.OK) { StreamWriter sw = new StreamWriter(sfd.FileName); sw.WriteLine(btb.Text); sw.WriteLine(htb.Text); sw.WriteLine(dtb.Text); sw.WriteLine(Astb.Text); sw.WriteLine(fctb.Text); sw.WriteLine(fytb.Text); sw.Close(); } } private void exitToolStripMenuItem_Click(object sender, EventArgs e) { this.Close(); } } }
DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN G DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
LAMPIRAN G (Cek Kapasitas Balok Tulangan Ganda)
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; namespace AnalisisBalok { public partial class kapasitas_ganda : Form { public kapasitas_ganda() { InitializeComponent(); } private void Proses_Click(object sender, EventArgs e) { float bk = float.Parse(bktb.Text); float hk = float.Parse(hktb.Text); float dk = float.Parse(dktb.Text); float d1k = float.Parse(d1ktb.Text); float alfak = float.Parse(alfaktb.Text); float ask = float.Parse(Asktb.Text); float fck = float.Parse(fcktb.Text); float fyk = float.Parse(fyktb.Text); float fcmpak = fck / 10.155f; float betak = 0.85f; if (fcmpak > 30) betak = 0.85f - 0.05f * (fcmpak - 30) / 7; if (betak < 0.65) betak = 0.65f; float as1k=alfak*ask; float Ak = 0.85f * fck * bk; float Bk = ask * (6000 * alfak - fyk); float Ck = - alfak * ask * 6000 * d1k * betak; DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN G DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
float a1k = (float)(-Bk + Math.Sqrt(Bk * Bk - 4 * Ak * Ck)) / (2 * Ak); float a2k = (float)(-Bk - Math.Sqrt(Bk * Bk - 4 * Ak * Ck)) / (2 * Ak); float ak = 0; if (a1k > a2k) { ak = a1k; } else if (a1k <= a2k) { ak = a2k; } float ck= ak/betak; float fs1k = 6000 * (ck - d1k) / ck; float es1k = (ck - d1k) * 0.003f / ck; float eyk = fyk / 2000000; if (es1k < eyk) { //fs1k = 6000 * (ck - d1k) / ck; } else if (es1k >= eyk) { fs1k = fyk; ck = ask * fyk * (1.0f - alfak) / (0.85f * fck * betak * bk); } float csk = alfak * ask * fs1k; float cck = 0.85f * fck * betak * ck * bk; float tk = ask * fyk; float Mnk = (csk * (dk - d1k) + cck * (dk - 0.5f * ak)); float Muk = Mnk * 0.8f; Mu.Text = "Mn k : " + Math.Round(Mnk, 3) + " kg - cm"; } private void openToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Title = "Buka Input"; ofd.Filter = "Data Kapasitas Ganda (*.iusk2)|*.iusk2"; if (ofd.ShowDialog() == DialogResult.OK) DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)
LAMPIRAN G DESAIN BALOK LENTUR DENGAN GRAPHICAL USER INTERFACE (GUI) DALAM PERANGKAT PENGEMBANG PEMROGRAMAN
{ StreamReader sr = new StreamReader(ofd.FileName); bktb.Text = sr.ReadLine(); hktb.Text = sr.ReadLine(); dktb.Text = sr.ReadLine(); d1ktb.Text = sr.ReadLine(); alfaktb.Text = sr.ReadLine(); Asktb.Text = sr.ReadLine(); fcktb.Text = sr.ReadLine(); fyktb.Text = sr.ReadLine(); sr.Close(); } } private void saveToolStripMenuItem_Click(object sender, EventArgs e) { SaveFileDialog sfd = new SaveFileDialog(); sfd.Title = "Simpan Input"; sfd.Filter = "Data Kapasitas Ganda (*.iusk2)|*.iusk2"; sfd.DefaultExt = "dab"; if (sfd.ShowDialog() == DialogResult.OK) { StreamWriter sw = new StreamWriter(sfd.FileName); sw.WriteLine(bktb.Text); sw.WriteLine(hktb.Text); sw.WriteLine(dktb.Text); sw.WriteLine(d1ktb.Text); sw.WriteLine(alfaktb.Text); sw.WriteLine(Asktb.Text); sw.WriteLine(fcktb.Text); sw.WriteLine(fyktb.Text); sw.Close(); } } private void exitToolStripMenuItem_Click(object sender, EventArgs e) { this.Close(); } } } DARIUS (150 03 082) MARSHEL SEPTIMIUS (150 03 096)