




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、/* This Code Was Created By Jeff Molofee 2000* A HUGE Thanks To Fredric Echols For Cleaning Up* And Optimizing The Base Code, Making It More Flexible!* If You've Found This Code Useful, Please Let Me Know.*/#include / Header File For Windows#include / Header File For The OpenGL32 Library#include
2、 / Header File For The GLu32 Library#include / Header File For The Glaux LibraryHDC hDC=NULL; / Private GDI Device ContextHGLRC hRC=NULL; / Permanent Rendering ContextHWND hWnd=NULL; / Holds Our Window HandleHINSTANCE hInstance; / Holds The Instance Of The Applicationbool keys256; / Array Used For T
3、he Keyboard Routinebool active=TRUE; / Window Active Flag Set To TRUE By Defaultbool fullscreen=TRUE; / Fullscreen Flag Set To Fullscreen Mode By DefaultGLfloat rtri; / Angle For The Triangle ( NEW GLfloat rquad; / Angle For The Quad ( NEW LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM; / Decla
4、ration For WndProcGLvoid ReSizeGLScene(GLsizei width, GLsizei height / Resize And Initialize The GL Windowif (height=0 / Prevent A Divide By Zero Byheight=1; / Making Height Equal OneglViewport(0,0,width,height; / Reset The Current ViewportglMatrixMode(GL_PROJECTION; / Select The Projection Matrixgl
5、LoadIdentity(; / Reset The Projection Matrix/ Calculate The Aspect Ratio Of The WindowgluPerspective(45.0f,(GLfloatwidth/(GLfloatheight,0.1f,100.0f;glMatrixMode(GL_MODELVIEW; / Select The Modelview MatrixglLoadIdentity(; / Reset The Modelview Matrixint InitGL(GLvoid / All Setup For OpenGL Goes Hereg
6、lShadeModel(GL_SMOOTH; / Enable Smooth ShadingglClearColor(0.0f, 0.0f, 0.0f, 0.5f; / Black BackgroundglClearDepth(1.0f; / Depth Buffer SetupglEnable(GL_DEPTH_TEST; / Enables Depth TestingglDepthFunc(GL_LEQUAL; / The Type Of Depth Testing To DoglHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST; / Reall
7、y Nice Perspective Calculationsreturn TRUE; / Initialization Went OKint DrawGLScene(GLvoid / Here's Where We Do All The DrawingglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT; / Clear Screen And Depth BufferglLoadIdentity(; / Reset The Current Modelview MatrixglTranslatef(-1.5f,0.0f,-6.0f; / M
8、ove Left 1.5 Units And Into The Screen 6.0glRotatef(rtri,0.0f,1.0f,0.0f; / Rotate The Triangle On The Y axis ( NEW glBegin(GL_TRIANGLES; / Start Drawing A TriangleglColor3f(1.0f,0.0f,0.0f; / RedglVertex3f( 0.0f, 1.0f, 0.0f; / Top Of Triangle (FrontglColor3f(0.0f,1.0f,0.0f; / GreenglVertex3f(-1.0f,-1
9、.0f, 1.0f; / Left Of Triangle (FrontglColor3f(0.0f,0.0f,1.0f; / BlueglVertex3f( 1.0f,-1.0f, 1.0f; / Right Of Triangle (FrontglColor3f(1.0f,0.0f,0.0f; / RedglVertex3f( 0.0f, 1.0f, 0.0f; / Top Of Triangle (RightglColor3f(0.0f,0.0f,1.0f; / BlueglVertex3f( 1.0f,-1.0f, 1.0f; / Left Of Triangle (RightglCo
10、lor3f(0.0f,1.0f,0.0f; / GreenglVertex3f( 1.0f,-1.0f, -1.0f; / Right Of Triangle (RightglColor3f(1.0f,0.0f,0.0f; / RedglVertex3f( 0.0f, 1.0f, 0.0f; / Top Of Triangle (BackglColor3f(0.0f,1.0f,0.0f; / GreenglVertex3f( 1.0f,-1.0f, -1.0f; / Left Of Triangle (BackglColor3f(0.0f,0.0f,1.0f; / BlueglVertex3f
11、(-1.0f,-1.0f, -1.0f; / Right Of Triangle (BackglColor3f(1.0f,0.0f,0.0f; / RedglVertex3f( 0.0f, 1.0f, 0.0f; / Top Of Triangle (LeftglColor3f(0.0f,0.0f,1.0f; / BlueglVertex3f(-1.0f,-1.0f,-1.0f; / Left Of Triangle (LeftglColor3f(0.0f,1.0f,0.0f; / GreenglVertex3f(-1.0f,-1.0f, 1.0f; / Right Of Triangle (
12、LeftglEnd(; / Done Drawing The PyramidglLoadIdentity(; / Reset The Current Modelview MatrixglTranslatef(1.5f,0.0f,-7.0f; / Move Right 1.5 Units And Into The Screen 7.0glRotatef(rquad,1.0f,1.0f,1.0f; / Rotate The Quad On The X axis ( NEW glBegin(GL_QUADS; / Draw A QuadglColor3f(0.0f,1.0f,0.0f; / Set
13、The Color To GreenglVertex3f( 1.0f, 1.0f,-1.0f; / Top Right Of The Quad (TopglVertex3f(-1.0f, 1.0f,-1.0f; / Top Left Of The Quad (TopglVertex3f(-1.0f, 1.0f, 1.0f; / Bottom Left Of The Quad (TopglVertex3f( 1.0f, 1.0f, 1.0f; / Bottom Right Of The Quad (TopglColor3f(1.0f,0.5f,0.0f; / Set The Color To O
14、rangeglVertex3f( 1.0f,-1.0f, 1.0f; / Top Right Of The Quad (Bottom后鋼板彈簧吊耳加工工藝及夾具設(shè)計(jì)本次設(shè)計(jì)是對(duì)后鋼板彈簧吊耳零件的加工工藝規(guī)程及一些工序的專用夾具設(shè)計(jì)。后鋼板彈簧吊零件的主要加工表面是平面及孔。由加工工藝原則可知,保證平面的加工精度要比保證孔的加工精度容易。所以本設(shè)計(jì)遵循先面后孔的原則。并將孔與平面的加工明確劃分成粗加工和精加工階段以保證加工精度?;鶞?zhǔn)選擇以后鋼板彈簧吊耳大外圓端面作為粗基準(zhǔn),以后鋼板彈簧吊耳大外圓端面與兩個(gè)工藝孔作為精基準(zhǔn)。主要加工工序安排是先以后鋼板彈簧吊耳大外圓端面互為基準(zhǔn)加工出端面,再以端
15、面定位加工出工藝孔。在后續(xù)工序中除個(gè)別工序外均用端面和工藝孔定位加工其他孔與平面。整個(gè)加工過(guò)程均選用組合機(jī)床。關(guān)鍵詞 后鋼板彈簧吊耳,加工工藝,專用夾具The design of the plate after spring lug parts of the processing order of the processes and some special fixture design. Spring plate after hanging parts of the main plane of the surface and pore. By the principle known Proc
16、essing , the plane guarantee precision machining holes than guarantee the machining precision easy. So the design follows the surface after the first hole principle. Plane with holes and the processing clearly divided into roughing and finishing stages of processing to ensure accuracy. After selecti
17、ng base plate spring lug large cylindrical face as a rough benchmark, After the leaf spring lug large cylindrical end with two holes as a precision technology benchmarks. main processes arrangements after the first spring plate lug large cylindrical face each other benchmarks machined face, End posi
18、tion to further processing out of holes. In addition to the follow-up processes are individual processes with end-positioning technology and other processing Kong and plane. The entire process of processing machine combinations were selected.* 目 錄摘 要 . ABSTRACT . . I I目錄 . 11緒 論 . 12 后鋼板彈簧吊耳加工工藝規(guī)程設(shè)計(jì)
19、 . 32.1零件的分析 . 3height2.3后鋼板彈簧吊耳加工定位基準(zhǔn)的選擇 . 42.5機(jī)械加工余量、工序尺寸及毛坯尺寸的確定 . 62.6確定切削用量及基本工時(shí)(機(jī)動(dòng)時(shí)間) . 72.8 本章小結(jié) . 183 粗銑后鋼板彈簧吊耳內(nèi)側(cè)端面夾具設(shè)計(jì) . 193.1粗銑后鋼板彈簧吊耳內(nèi)側(cè)端面夾具設(shè)計(jì) . 193.2定位方案的分析和定位基準(zhǔn)的選擇 . 193.3定位誤差分析 . 193.4銑削力與夾緊力計(jì)算 . 203.5定向鍵與對(duì)刀裝置設(shè)計(jì) . 213.7夾具設(shè)計(jì)及操作的簡(jiǎn)要說(shuō)明 . 243.8本章小結(jié) . 24 4 加工30mm 工藝孔夾具設(shè)計(jì) . 254.1加工30mm 工藝孔夾具設(shè)計(jì)
20、 . . 254.2定位方案的分析和定位基準(zhǔn)的選擇 . 254.4切削力的計(jì)算與夾緊力分析 . 264.5鉆套、襯套、鉆模板及夾具體設(shè)計(jì) . 264.6夾具精度分析 . 284.7夾具設(shè)計(jì)及操作的簡(jiǎn)要說(shuō)明 . 284.8本章小結(jié) . 29 5 加工10.5mm 工藝孔夾具設(shè)計(jì) . . 305.3定位元件的設(shè)計(jì) . 305.5切削力的計(jì)算與夾緊力分析 . 325.6鉆套、襯套、鉆模板及夾具體設(shè)計(jì) . 325.7夾具精度分析 . 345.8夾具設(shè)計(jì)及操作的簡(jiǎn)要說(shuō)明 . 345.9本章小結(jié) . 35結(jié) 論 . 36* fullscreenflag - Use Fullscreen Mode (TRU
21、E Or Windowed Mode (FALSE */BOOL CreateGLWindow(char* title, int width, int height, int bits, bool fullscreenflagGLuint PixelFormat; / Holds The Results After Searching For A MatchWNDCLASS wc; / Windows Class StructureDWORD dwExStyle; / Window Extended StyleDWORD dwStyle; / Window StyleRECT WindowRe
22、ct; / Grabs Rectangle Upper Left / Lower Right ValuesWindowRect.left=(long0; / Set Left Value To 0WindowRect.right=(longwidth; / Set Right Value To Requested WidthWindowRect.top=(long0; / Set Top Value To 0WindowRect.bottom=(longheight; / Set Bottom Value To Requested Heightfullscreen=fullscreenflag
23、; / Set The Global Fullscreen FlaghInstance = GetModuleHandle(NULL; / Grab An Instance For Our Windowwc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; / Redraw On Size, And Own DC For Window.wc.lpfnWndProc = (WNDPROC WndProc; / WndProc Handles Messageswc.cbClsExtra = 0; / No Extra Window Datawc.cbWndEx
24、tra = 0; / No Extra Window Datawc.hInstance = hInstance; / Set The Instancewc.hIcon = LoadIcon(NULL, IDI_WINLOGO; / Load The Default Iconwc.hCursor = LoadCursor(NULL, IDC_ARROW; / Load The Arrow Pointerwc.hbrBackground = NULL; / No Background Required For GLwc.lpszMenuName = NULL; / We Don't Wan
25、t A Menuwc.lpszClassName = "OpenGL" / Set The Class Nameif (!RegisterClass(&wc / Attempt To Register The Window ClassMessageBox(NULL,"Failed To Register The Window Class.","ERROR",MB_OK|MB_ICONEXCLAMATION;return FALSE; / Return FALSEif (fullscreen / Attempt Fullscre
26、en Mode?DEVMODE dmScreenSettings; / Device Modememset(&dmScreenSettings,0,sizeof(dmScreenSettings; / Makes Sure Memory's CleareddmScreenSettings.dmSize=sizeof(dmScreenSettings; / Size Of The Devmode StructuredmScreenSettings.dmPelsWidth = width; / Selected Screen WidthdmScreenSettings.dmPels
27、Height = height; / Selected Screen HeightdmScreenSettings.dmBitsPerPel = bits; / Selected Bits Per PixeldmScreenSettings.dmFields=DM_BITSPERPEL|DM_PELSWIDTH|DM_PELSHEIGHT;/ Try To Set Selected Mode And Get Results. NOTE: CDS_FULLSCREEN Gets Rid Of Start Bar.if (ChangeDisplaySettings(&dmScreenSet
28、tings,CDS_FULLSCREEN!=DISP_CHANGE_SUCCESSFUL/ If The Mode Fails, Offer Two Options. Quit Or Use Windowed Mode.if (MessageBox(NULL,"The Requested Fullscreen Mode Is Not Supported BynYour Video Card. Use Windowed Mode Instead?","NeHe GL",MB_YESNO|MB_ICONEXCLAMATION=IDYESfullscreen=
29、FALSE; / Windowed Mode Selected. Fullscreen = FALSEelse/ Pop Up A Message Box Letting User Know The Program Is Closing.MessageBox(NULL,"Program Will Now Close.","ERROR",MB_OK|MB_ICONSTOP;return FALSE; / Return FALSEif (fullscreen / Are We Still In Fullscreen Mode?dwExStyle=WS_EX_
30、APPWINDOW; / Window Extended StyledwStyle=WS_POPUP; / Windows StyleShowCursor(FALSE; / Hide Mouse PointerelsedwExStyle=WS_EX_APPWINDOW | WS_EX_WINDOWEDGE; / Window Extended StyledwStyle=WS_OVERLAPPEDWINDOW; / Windows StyleAdjustWindowRectEx(&WindowRect, dwStyle, FALSE, dwExStyle; / Adjust Window
31、 To True Requested Size/ Create The Windowif (!(hWnd=CreateWindowEx( dwExStyle, / Extended Style For The Window"OpenGL", / Class Nametitle, / Window TitledwStyle | / Defined Window StyleWS_CLIPSIBLINGS | / Required Window StyleWS_CLIPCHILDREN, / Required Window Style0, 0, / Window Position
32、WindowRect.right-WindowRect.left, / Calculate Window WidthWindowRect.bottom-WindowRect.top, / Calculate Window HeightNULL, / No Parent WindowNULL, / No MenuhInstance, / InstanceNULL / Dont Pass Anything To WM_CREATEKillGLWindow(; / Reset The DisplayMessageBox(NULL,"Window Creation Error.",
33、"ERROR",MB_OK|MB_ICONEXCLAMATION;return FALSE; / Return FALSEstatic PIXELFORMATDESCRIPTOR pfd= / pfd Tells Windows How We Want Things To Besizeof(PIXELFORMATDESCRIPTOR, / Size Of This Pixel Format Descriptor1, / Version NumberPFD_DRAW_TO_WINDOW | / Format Must Support WindowPFD_SUPPORT_OPE
34、NGL | / Format Must Support OpenGLspan PFD_DOUBLEBUFFER, / Must Support Double BufferingPFD_TYPE_RGBA, / Request An RGBA Formatbits, Consequently there appeared a whole set of implements covering spade, shovels and sickles etc. for smashing earth, leveling fields, excavating soil as well as pruning,
35、 weeding and harvesting. The innovated means and intensive farming led to a considerable increase of grains, such lines as “From Wu are shipped Corn and Silk Cloth” and “Fine rice comes far from Eastern Wu” exhibiting the local prosperous agriculture in profile.0, 0, 0, 0, 0, 0, / Color Bits Ignored
36、0, / No Alpha Buffer0, / Shift Bit Ignored0, / No Accumulation Buffer0, 0, 0, 0, / Accumulation Bits Ignored16, / 16Bit Z-Buffer (Depth Buffer 0, / No Stencil Buffer0, / No Auxiliary BufferPFD_MAIN_PLANE, / Main Drawing Layer0, / Reserved0, 0, 0 / Layer Masks Ignored;if (!(hDC=GetDC(hWnd / Did We Ge
37、t A Device Context?KillGLWindow(; / Reset The DisplayMessageBox(NULL,"Can't Create A GL Device Context.","ERROR",MB_OK|MB_ICONEXCLAMATION;return FALSE; / Return FALSEif (!(PixelFormat=ChoosePixelFormat(hDC,&pfd / Did Windows Find A Matching Pixel Format?KillGLWindow(; / R
38、eset The DisplayMessageBox(NULL,"Can't Find A Suitable PixelFormat.","ERROR",MB_OK|MB_ICONEXCLAMATION;return FALSE; / Return FALSEif(!SetPixelFormat(hDC,PixelFormat,&pfd / Are We Able To Set The Pixel Format?KillGLWindow(; / Reset The DisplayMessageBox(NULL,"Can'
39、t Set The PixelFormat.","ERROR",MB_OK|MB_ICONEXCLAMATION;return FALSE; / Return FALSEif (!(hRC=wglCreateContext(hDC / Are We Able To Get A Rendering Context?KillGLWindow(; / Reset The DisplayMessageBox(NULL,"Can't Create A GL Rendering Context.","ERROR",MB_OK|M
40、B_ICONEXCLAMATION;return FALSE; / Return FALSEif(!wglMakeCurrent(hDC,hRC / Try To Activate The Rendering ContextKillGLWindow(; / Reset The DisplayMessageBox(NULL,"Can't Activate The GL Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION;return FALSE; / Return FALSEShowWindow
41、(hWnd,SW_SHOW; / Show The WindowSetForegroundWindow(hWnd; / Slightly Higher PrioritySetFocus(hWnd; / Sets Keyboard Focus To The WindowReSizeGLScene(width, height; / Set Up Our Perspective GL Screenif (!InitGL( / Initialize Our Newly Created GL WindowKillGLWindow(; / Reset The DisplayMessageBox(NULL,
42、"Initialization Failed.","ERROR",MB_OK|MB_ICONEXCLAMATION;return FALSE; / Return FALSEreturn TRUE; / SuccessLRESULT CALLBACK WndProc( HWND hWnd, / Handle For This WindowUINT uMsg, / Message For This WindowWPARAM wParam, / Additional Message InformationLPARAM lParam / Additional M
43、essage Informationswitch (uMsg / Check For Windows Messagescase WM_ACTIVATE: / Watch For Window Activate Message/ LoWord Can Be WA_INACTIVE, WA_ACTIVE, WA_CLICKACTIVE,/ The High-Order Word Specifies The Minimized State Of The Window Being Activated Or Deactivated./ A NonZero Value Indicates The Wind
44、ow Is Minimized.if (LOWORD(wParam != WA_INACTIVE && !(BOOLHIWORD(wParamactive=TRUE; / Program Is Activeelseactive=FALSE; / Program Is No Longer Activereturn 0; / Return To The Message Loopcase WM_SYSCOMMAND: / Intercept System Commandsswitch (wParam / Check System Callscase SC_SCREENSAVE: /
45、Screensaver Trying To Start?case SC_MONITORPOWER: / Monitor Trying To Enter Powersave?return 0; / Prevent From Happeningbreak; / Exitcase WM_CLOSE: / Did We Receive A Close Message?PostQuitMessage(0; / Send A Quit Messagereturn 0; / Jump Backcase WM_KEYDOWN: / Is A Key Being Held Down?keyswParam = T
46、RUE; / If So, Mark It As TRUEreturn 0; / Jump Backcase WM_KEYUP: / Has A Key Been Released?keyswParam = FALSE; / If So, Mark It As FALSEreturn 0; / Jump Backcase WM_SIZE: / Resize The OpenGL WindowReSizeGLScene(LOWORD(lParam,HIWORD(lParam; / LoWord=Width, HiWord=Heightreturn 0; / Jump Back/ Pass All Unhandled Messages To DefWindowProcreturn DefWindowProc(hWnd,uMsg,wParam,lParam;int WINAPI WinMain( HINSTANCE hInstance, / InstanceHINSTANCE hPrevInstance, / Previous InstanceLPSTR lpCmdLine, / Command Line Paramete
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 五金店新零售模式探索與實(shí)施策略考核試卷
- 工程設(shè)計(jì)規(guī)范與標(biāo)準(zhǔn)考核試卷
- 機(jī)織運(yùn)動(dòng)服裝在運(yùn)動(dòng)康復(fù)中的角色考核試卷
- 技術(shù)服務(wù)多元化戰(zhàn)略與市場(chǎng)拓展考核試卷
- 服裝行業(yè)大數(shù)據(jù)分析應(yīng)用考核試卷
- 戶外登山鞋租賃與保養(yǎng)常識(shí)考核試卷
- 中小學(xué)生手衛(wèi)生課件
- 施工電梯備案合同范本
- 勞務(wù)永久合同范本
- 寵物購(gòu)買意向合同范本
- 注冊(cè)安全工程師安全生產(chǎn)技術(shù)培訓(xùn)講義課件
- 美發(fā)店承包合同范本(2篇)
- 2023年蘇州健雄職業(yè)技術(shù)學(xué)院?jiǎn)握锌荚嚸嬖囶}庫(kù)及答案解析
- 公司組織架構(gòu)圖(可編輯模版)
- 人教版六年級(jí)科學(xué)下冊(cè)教案全冊(cè)
- TCITSA 24-2022 基于ETC的高速公路自由流收費(fèi)技術(shù)規(guī)范
- 叉車裝卸區(qū)域安全風(fēng)險(xiǎn)告知牌
- 2022屆江蘇省南京師范大學(xué)附屬中學(xué)高三(下)考前最后一模物理試題(解析版)
- 《普通生物學(xué)教案》word版
- 貴州省就業(yè)失業(yè)登記表
- 預(yù)防電信詐騙網(wǎng)絡(luò)詐騙講座PPT幻燈片課件
評(píng)論
0/150
提交評(píng)論