Abstract Coordinate measuring machine(cMM)is ing themajor inspection equipment in quality control system ofautomatically production with the rapid development ofinspection technology。In themodem inspection process,a huge amount produces inpipeline need tobe inspected automatic thatthecoordinate measuring machine can integrated with enterprise’SC1MS system tofully use the resource ofenterprise,and toloadtheCAD file automatically,implement theconstruction ofbasicgeometry、automatic distribution ofsampling points、optimization of measure paths、the inspection ofcollision andavoidance ofcollision base on the information ofCAD control the inspection process andimplement standard inspectionprocess,coordinate measuring machine mustsupport theinspection standard. Thispaper firststudies how tomake themeasuring software work withCAD studying alltheCAD system,the OpenCasCadeCAD system hasbeen plenty ofCAD files,provides simple development tools and supplies richfunction interfaces,which made forthesoftware ofcoordinate measuring machine. Thepaper adopts theleastsquare method torebuild the basicgeometry elements and analyses the designs andanalysesthe%mpling method base OR the Hattou sequeuce with information ofCAD files,optimizes themeasuring paths and solves thecollisioninspection and collisionavoidance withscanning method andsearching method. Tocontrol thecoordinate measuring machine instandard way,DMIs system has been adopted. The system can generate measuring program automatically andsupports writing programming 0ffline. Key words:Coordinate measuring machine,OpenCasCade,least square method,Inspection planning 图1-1三坐标测鼍机组成示意图图2-1 CIMS 1:程开发步骤? 2-2消息系统设计总体结构图目录???????。2 ???????。7 ???????..7 幽2-3CAD模型显示过样图?????图3-1公式(3-10)意义???图3-2点到平面的距离????(a)中显示的是Jittered采样法, 图4_2Halton点在平面上的分布??? 10 图(b)显示的是Latin Hypercube Sampling, ???????图4_4二角平面的Halton点序列分布???????图4-5当N=10,pl--2,p2=3时,圆面上Halt