1樓:果子的
private sub command1_click()
'引數初始化
dim r0%, r1%, h%, e%
dim a1%, a01%, a2%, a02%
r0 = val(inputbox("請輸入基圓半徑"))
r1 = val(inputbox("請輸入滾子半徑"))
h = val(inputbox("請輸入升程"))
e = val(inputbox("請輸入偏距"))
a1 = val(inputbox("請輸入推程運動角"))
a01 = val(inputbox("請輸入遠休止角"))
a2 = val(inputbox("請輸入回程運動角"))
a02 = val(inputbox("請輸入近休止角"))
text1.text = r0
text2.text = r1
text3.text = h
text4.text = e
text5.text = a1
text6.text = a01
text7.text = a2
text8.text = a02
picture1.scale (-75, 55)-(75, -55) '建立座標系
picture1.line (0, 50)-(0, -50)
picture1.line (-55, 0)-(55, 0)
'初始化引數
dim i!, j!, k!, m!, n!
dim a!, b!, c!, d!
const pi = 3.141592653
dim s#(360), s1#(360)
dim ds#(360), ds1#(360)
dim dx#(360), dy#(360)
a = a1
b = a1 + a01
c = a1 + a01 + a2
d = 360
j = 0
for i = 0 to a '推程段
s(j) = h * ((i / a1) - sin(2 * pi * i * pi / a1 / 180) / (2 * pi))
ds(j) = h * (1 - cos(2 * pi * i * pi / a1 / 180)) / a1
ds1(j) = ds(j) / 2
s1(j) = s(j) / 2 '按比例定義引數值
j = j + 1
next i
for i = (a + 1) to b '遠休段
s(j) = h
ds(j) = 0
ds1(j) = 0
s1(j) = s(j) / 2
j = j + 1
next i
for i = (b + 1) to c '回程段
s(j) = h * (1 + cos(3 * (i - 150) * pi / 180)) / 2
ds(j) = -h * pi * sin(3 * pi * (i - 150) / 180) / (2 * a2)
ds1(j) = ds(j) / 2
s1(j) = s(j) / 2
j = j + 1
next i
for i = (c + 1) to d '近休段
s(j) = 0
ds(j) = 0
ds1(j) = 0
s1(j) = s(j) / 2
j = j + 1
next i
'初始化引數'
dim x0#, y0#, x1#, y1#, x2#, y2#
dim x11#, y12#, x21#, y22#
dim e1#, r#, p#, q#, r11#
dim s0#
'按比例定義引數值'
e1 = e / 2
r = r0 / 2
r11 = r1 / 2
s0 = sqr(r ^ 2 - e1 ^ 2)
for i = 1 to 360
dx(i) = (ds1(i) - e) * sin(i * pi / 180) + (s0 + s1(i)) * cos(i * pi / 180)
dy(i) = (ds1(i) - e) * cos(i * pi / 180) - (s0 + s1(i)) * sin(i * pi / 180)
next i
'輸出理論、實際輪廓線影象及座標值'
x0 = e1: y0 = s0
for g = 2 to 360
m = g - 1
'求理論輪廓線
x2 = (s1(g) + s0) * sin(g * pi / 180) + e1 * cos(g * pi / 180)
y2 = (s1(g) + s0) * cos(g * pi / 180) - e1 * sin(g * pi / 180)
x1 = (s1(m) + s0) * sin(m * pi / 180) + e1 * cos(m * pi / 180)
y1 = (s1(m) + s0) * cos(m * pi / 180) - e1 * sin(m * pi / 180)
picture1.line (x0, y0)-(x1, y1) '輸出理論輪廓線圖
picture1.line (x1, y1)-(x2, y2)
'求實際輪廓線
p = dx(m) / sqr(dx(m) ^ 2 + dy(m) ^ 2)
q = -dy(m) / sqr(dx(m) ^ 2 + dy(m) ^ 2)
p1 = dx(g) / sqr(dx(g) ^ 2 + dy(g) ^ 2)
q1 = -dy(g) / sqr(dx(g) ^ 2 + dy(g) ^ 2)
x11 = x1 - r11 * q
y12 = y1 - r11 * p
x21 = x2 - r11 * q1
y22 = y2 - r11 * p1
picture1.pset (x11, y12) '輸出實際輪廓線圖
text9.text = text9.text & " " & m & " " & 2 * x1 & " " & 2 * y1 & " " & 2 * x11 & " " & 2 * y12 & " " & vbcrlf '輸出理論、實際輪廓線座標值
x0 = x2: y0 = y2
next g
end sub
2樓:匿名使用者
cde你好,整理的1000份機械課設畢設,你說的裡面有的,直接用就行f
3樓:奔走的奶牛
'引數初始化
dim r0%, r1%, h%, e%
dim a1%, a01%, a2%, a02%
r0 = val(inputbox("請輸入基圓半徑"))
r1 = val(inputbox("請輸入滾子半徑"))
h = val(inputbox("請輸入升程"))
e = val(inputbox("請輸入偏距"))
a1 = val(inputbox("請輸入推程運動角"))
a01 = val(inputbox("請輸入遠休止角"))
a2 = val(inputbox("請輸入回程運動角"))
a02 = val(inputbox("請輸入近休止角"))
text1.text = r0
text2.text = r1
text3.text = h
text4.text = e
text5.text = a1
text6.text = a01
text7.text = a2
text8.text = a02
picture1.scale (-75, 55)-(75, -55) '建立座標系
picture1.line (0, 50)-(0, -50)
picture1.line (-55, 0)-(55, 0)
'初始化引數
dim i!, j!, k!, m!, n!
dim a!, b!, c!, d!
const pi = 3.141592653
dim s#(360), s1#(360)
dim ds#(360), ds1#(360)
dim dx#(360), dy#(360)
a = a1
b = a1 + a01
c = a1 + a01 + a2
d = 360
j = 0
for i = 0 to a '推程段
s(j) = h * ((i / a1) - sin(2 * pi * i * pi / a1 / 180) / (2 * pi))
ds(j) = h * (1 - cos(2 * pi * i * pi / a1 / 180)) / a1
ds1(j) = ds(j) / 2
s1(j) = s(j) / 2 '按比例定義引數值
j = j + 1
next i
for i = (a + 1) to b '遠休段
s(j) = h
ds(j) = 0
ds1(j) = 0
s1(j) = s(j) / 2
j = j + 1
next i
for i = (b + 1) to c '回程段
s(j) = h * (1 + cos(3 * (i - 150) * pi / 180)) / 2
ds(j) = -h * pi * sin(3 * pi * (i - 150) / 180) / (2 * a2)
ds1(j) = ds(j) / 2
s1(j) = s(j) / 2
j = j + 1
next i
for i = (c + 1) to d '近休段
s(j) = 0
ds(j) = 0
ds1(j) = 0
s1(j) = s(j) / 2
j = j + 1
next i
'初始化引數'
dim x0#, y0#, x1#, y1#, x2#, y2#
dim x11#, y12#, x21#, y22#
dim e1#, r#, p#, q#, r11#
dim s0#
'按比例定義引數值'
e1 = e / 2
r = r0 / 2
r11 = r1 / 2
s0 = sqr(r ^ 2 - e1 ^ 2)
for i = 1 to 360
dx(i) = (ds1(i) - e) * sin(i * pi / 180) + (s0 + s1(i)) * cos(i * pi / 180)
dy(i) = (ds1(i) - e) * cos(i * pi / 180) - (s0 + s1(i)) * sin(i * pi / 180)
next i
'輸出理論、實際輪廓線影象及座標值'
x0 = e1: y0 = s0
for g = 2 to 360
m = g - 1
'求理論輪廓線
x2 = (s1(g) + s0) * sin(g * pi / 180) + e1 * cos(g * pi / 180)
y2 = (s1(g) + s0) * cos(g * pi / 180) - e1 * sin(g * pi / 180)
x1 = (s1(m) + s0) * sin(m * pi / 180) + e1 * cos(m * pi / 180)
y1 = (s1(m) + s0) * cos(m * pi / 180) - e1 * sin(m * pi / 180)
picture1.line (x0, y0)-(x1, y1) '輸出理論輪廓線圖
picture1.line (x1, y1)-(x2, y2)
'求實際輪廓線
p = dx(m) / sqr(dx(m) ^ 2 + dy(m) ^ 2)
q = -dy(m) / sqr(dx(m) ^ 2 + dy(m) ^ 2)
p1 = dx(g) / sqr(dx(g) ^ 2 + dy(g) ^ 2)
q1 = -dy(g) / sqr(dx(g) ^ 2 + dy(g) ^ 2)
x11 = x1 - r11 * q
y12 = y1 - r11 * p
x21 = x2 - r11 * q1
y22 = y2 - r11 * p1
picture1.pset (x11, y12) '輸出實際輪廓線圖
text9.text = text9.text & " " & m & " " & 2 * x1 & " " & 2 * y1 & " " & 2 * x11 & " " & 2 * y12 & " " & vbcrlf '輸出理論、實際輪廓線座標值
x0 = x2: y0 = y2
next g
end sub
化工原理課程設計,化工原理課程設計
實踐總週數 2周 總學分 2學分。特別是化學工程與工藝的專業,設計設計步驟。1 性質 目的 化工原理課程設計是化工原理教學的一個重要環節,是綜合應用本門課程和有關先修課程所學知識,完成以單元操作為主的一次設計實踐。通過課程設計使學生掌握化工設計的基本程式和方法,並在查閱技術資料 選用公式和資料 用簡...
機械原理課程設計冷霜自動灌裝機
機械原理課程設計 旋轉型灌裝機運動方案設計 指導教師 莊幼敏 小組成員 機械0404 王小琛 040800404 機械0404 趙鳳滿 040800405 2007年1月19日 目錄1.題目 2.設計題目及任務 1 2.1 設計題目 1 2.2 設計任務 1 3 運動方案 2 3.1 方案一 2 3...
vb課程設計滾動字幕版
private sub command1 click dim i as long dim r as long dim a 1 to 20 as longlist1.clear randomize for i 1 to 6 dor int rnd 20 1 loop until a r 2 a r a...