版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
SOMEALGORITHMSFORNCMACHININGSIMULATIONANDVERIFICATIONAbstract:Thispaperpresentsanapproximationmethodtodisplayrealisticpicturesofnumericalcontrol(NC)machiningsimulationveryquickly.Thetoolmovementenvelopeisdividedintomanysmallregionsandthenormaltothesesmallregionsiscalculated.Thesystemsavesthecalculatedresultinafilebeforestartinganimationdisplay.Whenthesystemstartsdisplayingmachininganimation,itdoesnotneedtocalculatesmalltriangularfacetsnormaltotheworkpiecesurface.Itonlyneedstofindoutwhatpartofthecuttercutstheworkpiecesurfaceandtoreadthenormalfromthefile.AhighlyefficientNCcodeverificationmethodisalsopresentedinthispaper.Themethodfirstdetectstheerrorinzdirection.Ifsomepointsarereportedtobeoutofthetolerance,thesystemdividesneighborhoodofthesepointsintosmallergridsandcalculatesthenormalsurfaceateachgridintersectionandtheerrorinthenormalvectordirection.Keywords:numericalcontrolmachining;simulation;verification;realisticpictureNCprogramvalidationhasoftenbeenclassifiedintotwoimportantpartsimulationandverification.Thesimulationmainlydisplaysmaterialremoval,cuttermovementandmodificationofageometricmodeloftheworkpiecetokeeptrackofthematerialremovalprocess.Theverificationprocessrequiresacomparisonbetweenthefinalworkpiecemodelandthegeometricmodelofthepart.Thispaperproposessomeessentialalgorithmsaboutsimulationandverification.Solidgeometrymodelingsystemsofferthepossibilityofdoingbothsimulationandverification[1j4].SimulationisachievedbyBooleansubtractionofthetoolmovementvolumefromtheworkpiecemodel.TheverificationisachievedbyBooleandifferencesbetweenmodelsoftheworkpieceandthedesiredpart.Butonamicrocomputer,solidmodelBooleansubtractionistooslowtoshowanimationofmaterialremoval.Someothermethodsarepresentedtoincreaseefficiencyofthesimulationalsystem.VanHook[5]hasdevelopedarealtimeshadeddisplayofasolidmodelbeingmilledbyacuttingtoolwhichfollowsanNCpath.Thisapproachutilizesadexel(depthelement)representationoftheworkpieceandthecuttergeometries.Thedatastructureisarunlengthencodedversionofavolumetricdatarepresentation.AnupdatingrateoftencuttingoperationspersecondisattainedbyusingBooleansetoperationsontheone-dimensionaldexels.TheviewpointofdependencyofthisapproachisovercomedbyanextensionofthemethodbyHuang[6],whohasintroducedthepossibilityoferrorassessmenttoHooksmethod.Takafumihasalsousedanextensionofthez-buffermethod(calledG-buffer)tosimulateNCmilling[7].Somepeoplehaveusedasurfacemodelratherthansolidmodel[8].Theirmethodsdividethesurfaceofgeometricmodelalonguandvdirectionsintomanygrids.Thenormalvectoristhencalculatedatintersectionsofeachgrid.Duringsimulatingthelengthofvectorisreducedifitintersectsthetoolmovementenvelope.Ananalogycanbemadewithmowingafieldofgrass.Eachvectorinsimulationcorrespondstoabladeofgrassogrowingpfromthedesiredobject.Asthesimulationprogresses,thebladesareimoweddowno.Thefinallengthofthevectorcorrespondstotheamountofexcessmaterial(abovethesurface)orthedepthofgouge(belowthesurface)atthepoint.In1993,P-LHsuandW-TYang[9]presentedamethodforreal-time3Dsimulationof3-axismillingmachining.Theyfirstdividedstockandtootintoarrayofmanysmallcubes(voxelcell).Fordisplayingrealisticpictureoftheprocessofmachining,itisnecessarytodeterminewhichofthesesmallcubeswouldbecutandneednotbedisplayed.TheirmethodnotonlyavoidstheBooleansubtractionoperation,butalsodoesnotneedtocalculatethenormalvector.Sothismethodcandisplaythesimulationpictureandthecuttermovementatveryhighspeed.Butbecausethesmallestdisplayunitisasmallcube(voxelcell),itisimpossibletocreategoodrealisticpicturesofthesimulationprocess.Furthermore,itcannotdetectsmallmachiningerrors(lessthanonevoxelcell).InthispaperarapidmethodtodisplaytheanimationofmaterialremovingprocessofNCmachiningispresented.AndamethodisalsoproposedtosimplifythecalculationofNCverificationprocess.1DISCRETIZATIONOFRAWSTOCKANDREALISTICPICTUREDISPLAYIn3-axismillingprocesses,onlydataonthezaxis(parallelcutteraxis)changewhenthecuttingtoolsaresweptovertheworkpiece.SowediscretestockasanarrayoftriangularprismsasshowninFig.1.ThisdiscretemethodissomewhatstructureofZ-mappresentedbyP-LHsuandW-TYangin1993.Z-mapstructureisanarrayofquadrangularpillar-shapedelements.Whenthecuttermovesandcutsthispillar,eachpillarhasfourintersectionswiththecutterthatareactuallynotinthesameplane.Thiswillbringmanytroublesinthedisplayofrealisticpictures.Improvementismadeinthisresearch,weusetriangularprismsratherthanquadrangularpillar-shapedelementsdonebyP-LHsuandW-TYang.Eachpillarcontainsthreeintersectionsandthesethreepointsconstructasmallfacet.Allthesefacetsconstructthecuttingsurfacethatismodified.Forcreatingahighqualityrealisticpicture,itisnecessarytogettheinformationaboutthenormalvectorofeachfacet.Ifthesystemcalculatesthenormalvectortoallfacetswithanordinarymethod,itisdifficulttodisplayasmoothanimationwithhighqualityrealisticpicturesofthematerialremovingprocessonmicrocomputer.Wefindthattheorientationofsmallfacetisdeterminedbytheshapeofcuttermovementenvelopeandtheplacewherethecuttertouchesthefacet.Forexample,aball-endcuttercuttingthestockisshowninFig.2.Thenewlycreatedsmalltriangularfacetshavethesameorientationasthecuttersurface.Iftheplaceofasmalltriangularfacetinthelocalreferenceframeofthecutterisobtained,itsnormalvectorcanberapidlycalculated.WedividethecutterintoalotofsmallregionsasshowninFig.3.Onceacutterischosen,wecancalculatethenormalvectoratthesediscretepointsbeforedisplayinganimationofmachiningprocessandstoringtheresultinafile.ThecutterlocalreferenceframeissettledasshowninFig.3,andthecuttercentercoordinateisxc,yc,zc.Aisapointonthecuttersurfaceanditslocalcoordinateisxl,yl,zl.Itscoordinatesxa,ya,zacanbeobtainedfromthefollowingequationsya=yc+ylxa=xc+xlza=zc+zlBecauseanynormalvectortoballsurfacepointstothecenteroftheball,thenormalvectoratpointAisxc-xa,yc-ya,zc-za.Thecuttercentercoordinatesxc,yc,zccanbedirectlyreadfromtheNCfile.IfthecoordinateofpointBonasmalltriangularfacetisxb,yb,zb,itslocalcoordinatesarexb-xc,yb-yc,zb-zc.Thenormalvectortoallsmalltriangularfacetscanbecalculatedbythemethodatveryhighspeed.Withthenormalvectorstoallsmalltriangularfacets,itbecomespossibleandsimpletocreateanddisplayhighqualityrealisticpicturesathighspeedonamicrocomputerwithOpenGL.WesetthemodeofGLShadeModel(Glenummode)asGL-SOOMTH.OpenGLcandisplayrealisticpicturesthatarenearlyasgoodinqualityasraytracepictures.Fig.4showsalocalzoompictureofamoldmachiningsimulation.Gougescreatedbytheball-endcutterareveryclearlyobserved.Fig.5showsaNURBSsurfacepicture.NCprogramiscreatedbyUGII,whichcontains10584cutterlocationdatalines.Ittakes35stocompletethewholesimulationdisplayonPII300PCcomputer.Forthedisplayofrealisticpicturesathighspeed,someotherdisplaytechniquesneedtobeused,suchasthelocalrefreshingandspecialfacehidingalgorithm[10,11].2NCPROGRAMVERIFICATIONFig.6showsasurfacewithasetofpointsandassociateddirectionvectorsnormaltothesurface.Itwouldbecomputationallyexpensivetocalculatetheintersectionofallthedirectionvectorsforeachtoolmovementwiththem.Ifwechoosedirectionvectorsparalleltothezaxisofthecuttertool(Fig.7),theintersectioncalculationismoreefficient.ButasR.B.JerardandS.Z.Hussainipointedout,choosingallvectorsinzdirectionintroducesapotentialproblemwheneverthesurfacenormaldeviatesfromthezdirection[8].TheproblembecomesmostapparentfornearlyverticalsurfacesasshowninFig.8.TheuncorrectableestimateofthecuttingerroristheverticaldistancebetweenthesurfacepointPandthecutpointP.Thiseffectcausesoverestimatederrors.Noerrorswillbemissedbutpointswillbereportedtobeoutoftolerance.InverificationofNCprogram,ourmethodcanbedescribedintwosteps.Inthefirststep,thesystemdiscretesrawstockandcalculatestheintersectionofvectorsinthezdirectionateachdiscretepointwiththecuttertoolmovementenvelope.Thesetaskshavemainlybeenfulfilledinthesimulationalphase.Wedesignadatastructure,Small-Prism-Data(doublex,doubley,doublez,intLine-num),tosaveintersectioncoordinatesP(βx,βy,βz)andthelinenumberofNCfilewhosedatadrivesthetooltocutthisvector.Aftersimulationanimationdisplayend,thesystemhasthecoordinatesofalltheintersectionsandthelinenumberthatcutsthesevectors.Ifz-zβatalldiscretepointsisnotoutoftolerance,itimpliesthattheNCprogramisright.Thesecondstepofverificationisnotneeded.Becausenoerrorwillbemissedinthefirststep,inthesecondstepweonlyreprocessthosepointsreportedtobeoutoftolerance.IfapointP(βx,βy,βz)atcuttingsurfaceasshowninFig.8hasbeenreportedtobeoutoftolerance,thenΔxandΔywillbecreateddependingonthevalueofz-z.AvectorVwillbecreatednormaltothesurfaceofthegeometricalmodelatthepointP(x,y,z).ThemethoddoesnotcalculatetheintersectionofVandeverytoolmovementenvelopes.WecangetalistoflinenumberfromdatastructureSmall-PrismData{xx,yy,zz,Num},herexx-[x-Δx,x+Δx]andyy-[y-Δy,y+Δy]andconstructseveraltoolmovementenvelopesdependingonthelistofNCprogramlinenumber.WejustcalculateintersectionsofvectorVwiththesetoolenvelopesandjudgeifthispoint(βx,βy,βz)isoutoftolerance.Becausethepointsareoutoftolerancearemuchfewerthanthesewhicharenot,thesecondstepneedsonlytoprocessafewpoints.Sothemethodhasacomparativelyhighprocessspeed.BecausewesavelinenumberofNCprogramwiththeintersectioncutbythislinedatatogether,itbecomespossibletodetectsmallmachiningerrors.Whensomelocalregionhasverysmalltolerancezone,thesystemcandividethissmallregionintosmallergridsasshowninFig.9.BecauseofknowingwhichlinesdatainNCprogramcutthisregion,wedonotneedtorepeatthesimulatedcalculation.WejustreadthedatafromNCprogramdependingonthelinenumbersavedinthedatastructureSmallPrismData,buildcuttermovementenvelopesandcalculatenormaltothesesmallregionsandtheintersections.3DISCUSSIONMethodsforsimulationandverificationofNCmachininghavebeenpresentedinthispaper.Wedividesimulationandverificationintotwosteps.ThemaintaskofsimulationistodisplayrealisticpictureanimationofNCmachiningprocess.Thesimulationisachievedbycalculatingtheintersectionofvectorswithtoolpathenvelopes.Inordertoincreasecomputationalefficiency,weusesomeapproximationcomputationalmethods,suchasthemethodforcalculatingthenormaltosmalltriangularfacetsandusingthezdirectionvectortocalculatetheintersectionwiththecuttermovementenvelope.Theyarepreciseenoughtodisplaytherightshapeoftheworkpiece.Thesemethodsmakeitpossibleforthesystemtodisplayhighqualityrealisticpicturesveryquicklyonamicrocomputer.Furthermore,inthesimulationalphase,thesystemsavesnecessaryinformationthatisneededinthenextphase,i.e.verification.TheverificationfirstcomparespointP(x,y,z)onthegeometricmodelsurfacewithpointP(βx,y,zβ)onthecuttingsurface.PointP(βx,y,zβ)isanintersectionofthetoolpathenvelopewithzdirectionvector.Ifthesystemreportsmachiningerroratthispointtobeoutoftolerance,thesystemcalculatesaneighborhoodofpointP,dividesthisneighborhoodintosmallgridarrayandcalculatesthenormalvectortogeometricmodelsurfaceatallintersectionpointsofthisgrid.ThenthesystemcalculatesintersectionPγofthenormalvectorwithtoolmovementenvelopeandcomparespointPandpointPγalongthenormaldirection.JustasshowninFig.8,onlyonthenearlyverticalsurface,themachiningerrorswillbeoverestimatedandtheNCmachiningG-CodesgeneratedbyCAMsystemareordinarilyimpossibletocontainmanyerrors.Sotherearefewpointstobereportedoutoftoleranceandneedtobeprocessedwiththesecondstepoftheverification.Sothemethodhashighcomputationalefficiency.4CONCLUSIONNowcuttingsimulationasameansoftestingandverifyingNCcuttingpathshasbecomeanimportantpartofmodernCAD/CAMsoftware.AthreeaxisNCmachiningsimulationsystemhasalreadybeendevelopedbasedonthealgorithmspresentedinthispaperandhasbeensuccessfulintestingandverifyingmanyG-Codesofferedbymanufacturingfactories.ThelargestoneoftheseG-Codefilescontainsmorethan300000commandstomanifestthatthesystemispractical.数控加工和仿真的关键算法摘要:本设计提出了一种快速显示数控加工仿真高质量真实感图形的近似方法。刀具运动扫掠体被划分成一些小区域,系统计算出每个小区域的法向量并将这些向量存储在一个文件中。当显示加工动画时不必再计算毛坯外表小平面的法向量,仅仅需要计算是刀具的哪局部切削了该小平面,然后从文件中读出对应的法向量。文中还提出了一种高效率的NC加工代码验证方法。该方法先计算z方向的误差,如果发现某些点超差,在这些点附近系统自动对毛坯进行进一步细分,计算出外表法向量的误差。关键字:数控加工;仿真;验算;真实感图形;数控加工程序确实定通常分为两个重要的局部:仿真和验算。仿真主要通过显示材料去除,切削过程以及工件几何模型的改变来记录材料去除过程。验算过程需要在最终工件模型和部件的几何模型之间比拟。本文提出了一些关于仿真和验算的重要算法,实体几何模型系统提供了做仿真和验算的可能性[1j4]。仿真是通过刀具从工件模型的移动量的布尔减法来实现的,验算是通过工件模型和所需局部的布尔值差来实现的。但是,在微型计算机下,实体几何模型的布尔减法太慢而不能动态显示去除材料的过程。因此,提出一些其他的方法来提高仿真系统的效率。VanHook[5]通过一个跟踪NC路径的切削刀具开发了一种实时阴影显示铣削实体模型的过程。这种方法使用一个深度元件表示工件和刀具的几何形状。该数据结构是一个体积数据表示的游程长度编码的版本。每秒十切削操作的更新率是通过使用布尔设置操作的一维dexels来获得的。这种方法所依据的观点被黄所提出的方法的延伸所克服[6]。黄将错误估计的可能性引进到Hooks的方法中。Takafumi也使用了一种z缓冲的方法〔称谓G缓冲区的扩展〕仿真数控铣削[7]。有些人使用的是外表模型而不是实体模型。他们将几何模型的外表沿着u和v方向分为很多网格。然后计算每个网格交点的法向量。仿真过程中,如果它与刀具轨迹的包络线相交矢量的长度会减少。就好比修减一块草地的草。在仿真中每一个向量对应一棵小草,随着仿真过程刀片从i切割到o。向量的最终长度对应于这点多余材料的数量〔外表以上或者挖切的深度〔外表以下〕〕。1993年,P-LHsuandW-TYang[9]提出了一种三轴铣床的3D真实仿真方法。他们首先将实体划分为许多小立方体〔体素细胞〕的排列。为了演示机加工过程的真实图像,有必要决定切削哪些小立方体演示哪些小立方体。他们的方法不仅防止了布尔减法运算,而且不需要计算法向量。所以这种方法能够以很高的速度演示仿真图像和切削运动。但是因为最小的显示单元是小立方体〔体素细胞〕,不可能创立仿真过程中良好的逼真的图像。此外,它不能够检测小型加工误差〔小于一个体素细胞〕。本研究提出了一种快速动态显示数控机床材料移除过程的方法,并且提出了一种简化数控验算过程的方法。1、原材料的离散化和逼真的画面显示在三轴铣削过程中,当刀具扫过工件时只有z方向的数值发生变化。因此,如图一所示我们将原材料离散为三角棱镜阵列。图一:原材料的离散化1993年P-LHsuandW-TYang基于z映射结构提出这种离散方法。Z映射结构是四棱柱元素的阵列。当刀具移动切削四棱柱时,每一个棱柱和刀具有不在同一外表的四个交点。这给真实图形的显示带来很多困难,这项研究对此作了提升,我们使用三棱柱而不是P-LHsuandW-TYang使用的四棱柱元素。每一个棱柱包括三个交点,这些交点构成一个平面。所有的这些平面构成了被修改的切削外表。为了创立高质量的真实图像,有必要获得每一个平面的法向量的信息。如果系统使用一般的方法计算所有平面的法向量,在微型计算机中就很难以高质量的真实图像流畅地显示材料去除过程动画效果。我们发现切削运动轨迹的包络和刀具接触点决定小平面的方向。例如,图二所示的是球头立铣刀切削毛坯的图形。新建的小三角形外表和切削外表方向相同,如果获得的切割器的局部参考系中的小三角形面的地方,它的法线向量可以迅速地计算出来。图二:小三角形外表和切削外表的关系如图三所示,我们将刀具分为好多小区域,一旦刀具被选中,我们就能够在动态显示机加工过程和存储结果之前计算在这些离散点的法向量。刀具参考系如图三所示,刀具中心的坐标为〔xc,yc,zc〕。A点为切削外表的一点相对坐标为〔xl,yl,zl〕,它的绝对坐标能够有如下公式得出:ya=yc+ylxa=xc+xlza=zc+zl因为球面上点的任何法向量指向球心,所以点A的法向量为xc-xa,yc-ya,zc-za。切削中心的坐标xc,yc,zc能够直接从NC文件中读出。假设小三角平面上一点B的坐标为xb,yb,zb,它的绝对坐标为xb-xc,yb-yc,zb-zc。用这种方法所有小三角形平面的法向量能够迅速的计算出来。图三:球头面铣刀上一点的法向量利用这些小三角形平面的法向量,就有可能实现在微型计算机中使用OpenGL高速地创立并演示高质量的真实图像。我们设定的GL阴影模型〔Glenum模式〕模式为GL-SOOMTH。OpenGL能够显示和光线跟踪图像质量的真实图像。如图四所示为一个模具加工仿真的局部放大图。由球头铣刀造成的擦伤可以非常清楚的观察到。图五为一个非均匀有理样条曲面的图像。数控程序由UGII创立,它包含了10584条刀位数据线。在PII300个人计算机上,花费35秒完成全部的仿真演示。为了高速显示真实图像,需要用到一些其他的算法,例如局部更新和特殊外表隐藏算法[10,11]。图四:模具加工仿真的局部放大图图五:加工仿真的非均匀有理样条曲面图六:刀具路径包络和法向量的交点2、数控程序的验算图六为外表的一系列点以及相关联的垂直于外表的方向矢量。计算每一个刀具
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 铌酸锂晶体制取工岗前综合管理考核试卷含答案
- 脂肪醇装置操作工安全技能评优考核试卷含答案
- 炭素煅烧操作工QC考核试卷含答案
- 热注运行工安全文化强化考核试卷含答案
- 遮蔽剂调制与涂布工班组协作知识考核试卷含答案
- 实验动物繁殖员基础培训强化考核试卷含答案
- 酸性气体吸收工诚信品质强化考核试卷含答案
- 高压电工证如何开展题库练习?大型工厂电气人员换证备考须知
- 2026年小学三年级语文上册第7单元第22课《带刺的朋友》说课教案
- 2026年小学成语故事《改过自新》自省向善语文课堂教案
- 电池均衡原理及讲解
- 日本eju考试物理真题及答案
- 供水管网改造期间的供水保障与服务
- 初中教师节升旗仪式演讲稿(16篇)
- 2026年高考总复习优化设计一轮复习化学(广西版)-第1讲 化学反应的热效应
- 从理论到实践:斯根普数学教育思想的深度剖析与应用探索
- 2025年高考语文真题全国一卷4篇高分范文
- 特殊人群服务管理课件
- 神经内科头痛诊疗规范
- 大学外事工作管理办法
- 2025至2030中国肌萎缩侧索硬化症(ALS)治疗行业项目调研及市场前景预测评估报告
评论
0/150
提交评论