基于AutoCAD ObjectARX二次開發(fā)的線畫圖標記中節(jié)點類型判別
發(fā)布時間:2019-06-21 11:17
【摘要】:隨著科學技術的發(fā)展,人—機之間用圖形進行通訊日益受到重視,在許多場合顯示出其重要性。為使計算機能“看”懂物體投影線圖,需要研究計算機解釋投影線圖的機理。計算機分析、處理和理解線圖的研究成果可用于互聯(lián)網(wǎng)、CAD系統(tǒng)中的人—機通訊接口、逆向工程及計算機視覺系統(tǒng)中,能縮短圖形輸入時間,減輕人—機通訊中“人”的工作量。 本文旨在研究判別法國學者Cooper對曲面物體的線圖標記中給出的新的節(jié)點標記分類。其節(jié)點代表分類有:terminal、C、curvature-L、L、3-tangent、W、Y、T、4-tangent、X0、K、Ψ、Peak、Multi、X、L0等。本文對立體線圖的線條標記中常見的這16種節(jié)點的判定給出了多種較為詳細的算法,并且給出了每種算法的數(shù)學推理過程,對于判斷同一節(jié)點類型的算法進行了對比以尋求更優(yōu)的算法。在前期的部分節(jié)點算法驗證中,利用Visual C++6.0進行了編程,并通過MFC界面輸入節(jié)點坐標和節(jié)點相鄰點坐標及輸出節(jié)點圖形與判斷結果的一致性,驗證了這些算法的可行性。 由于立體線圖的線條標記在二維平面中進行,所以選擇在AutoCAD中判別線畫圖標記中節(jié)點的類型。通過對立體線圖的線條標記中節(jié)點的類型判別的要求分析,進一步明確得出了所二次開發(fā)的AutoCAD軟件的功能。并通過對AutoCAD系統(tǒng)結構和接口語言的深入了解以及對前人在AutoCAD二次開發(fā)擴展功能時的相關經(jīng)驗的總結,得出了在AutoCAD 2002平臺上以二次開發(fā)形式解決線畫圖標記中節(jié)點類型判別問題的可行性并給出了整個節(jié)點類型判別系統(tǒng)的總體設計方案和相應的各種判別流程圖。通過對AutoCAD各種二次開發(fā)工具特點的對比和分析,結合AutoCAD 2002節(jié)點判別功能需求,決定以Visual C++6.0為平臺、以ObjectARX為開發(fā)工具。 在節(jié)點類型判別系統(tǒng)開發(fā)中,通過對各種節(jié)點組成線型的分析,選用對應各種線型的類,如AcDbLine類,AcDbCurve類對應直線和曲線,選用相應的獲取直線和曲線的起點和終點函數(shù),如對于曲線利用AcDbCurve類定義對象,通過函數(shù)getStartPoint ()和getEndPoint ()獲取起點和終點坐標。除獲取起點和終點外,還可以通過獲取曲線和直線的特征點等方法獲取所需點,如使用函數(shù)getOsnapPoints()獲取橢圓、橢圓弧等對象捕捉點。在一個節(jié)點的的所有的獲取的點中,通過比較算法實現(xiàn)獲取節(jié)點坐標,進而可以通過其余獲取點的坐標、節(jié)點坐標與其余點坐標問的數(shù)學關系及統(tǒng)計曲線和直線的條數(shù)來分類節(jié)點的算法等實現(xiàn)節(jié)點類型的判別。 為了使AutoCAD二次開發(fā)擴展界面符合人們的操作習慣及與原來界面的區(qū)分,除了讓用戶使用自定義的命令外,還加入了功能菜單,使用開發(fā)工具ObjectARX的MFC功能創(chuàng)建了非模態(tài)對話框的可停靠窗口。
[Abstract]:With the development of science and technology, more and more attention has been paid to the communication between people and machines by graphics, which has shown its importance on many occasions. In order for the computer to "read" the projection diagram of the object, it is necessary to study the mechanism of the computer interpretation of the projection diagram. The research results of computer analysis, processing and understanding diagram can be used in Internet, man-machine communication interface in CAD system, reverse engineering and computer vision system, which can shorten the input time of graphics and reduce the workload of "people" in man-machine communication. The purpose of this paper is to study the new classification of node marks given by French scholar Cooper in the graph marking of curved objects. The representative categories of the nodes are as follows: terminal,C,curvature-L,3-tangent,W,Y,T,4-tangent,X0,K, Peak,Multi,X,L0 and so on. In this paper, a variety of detailed algorithms are given for the determination of these 16 kinds of nodes, and the mathematical reasoning process of each algorithm is given, and the algorithms for judging the same node type are compared in order to find a better algorithm. In the previous verification of some node algorithms, Visual C6.0 is used to program, and the feasibility of these algorithms is verified by the consistency of MFC interface input node coordinates and node adjacent point coordinates and output node graphics with judgment results. Because the line mark of stereo graph is carried out in two dimensional plane, the type of node in line drawing mark is selected in AutoCAD. Based on the analysis of the requirements of node type discrimination in line marking of stereoscopic graph, the function of the secondary developed AutoCAD software is further obtained. Through the deep understanding of the structure and interface language of AutoCAD system and the summary of the previous experience in the secondary development and extension of AutoCAD, the feasibility of solving the problem of node type discrimination in line drawing marking in the form of secondary development on AutoCAD 2002 platform is obtained, and the overall design scheme and corresponding discriminant flow chart of the whole node type discrimination system are given. Through the comparison and analysis of the characteristics of various secondary development tools of AutoCAD, combined with the functional requirements of AutoCAD 2002 nodes, it is decided to take Visual C 6.0 as the platform and ObjectARX as the development tool. In the development of node type discrimination system, through the analysis of the linetypes of various nodes, the classes corresponding to various linetypes, such as AcDbLine class, AcDbCurve class corresponding lines and curves, are selected to obtain the starting and ending functions of the lines and curves. For example, the AcDbCurve class is used to define the object for the curve, and the starting and ending coordinates are obtained by the functions getStartPoint () and getEndPoint (). In addition to obtaining the starting point and the end point, the required points can be obtained by obtaining the characteristic points of the curve and the straight line, such as using the function getOsnapPoints () to obtain the object capture points such as ellipse, elliptical arc and so on. In all the acquired points of a node, the node coordinates can be obtained by comparing the algorithm, and then the node type can be classified by the mathematical relationship between the coordinates of the other obtained points, the mathematical relationship between the node coordinates and the coordinates of the remaining points, and the number of statistical curves and lines. In order to make the secondary development and extension interface of AutoCAD conform to people's operation habits and distinguish from the original interface, in addition to letting users use custom commands, the function menu is added, and the dockable window of non-modal dialog box is created by using the MFC function of development tool ObjectARX.
【學位授予單位】:太原理工大學
【學位級別】:碩士
【學位授予年份】:2011
【分類號】:TP391.72;TH122
本文編號:2504038
[Abstract]:With the development of science and technology, more and more attention has been paid to the communication between people and machines by graphics, which has shown its importance on many occasions. In order for the computer to "read" the projection diagram of the object, it is necessary to study the mechanism of the computer interpretation of the projection diagram. The research results of computer analysis, processing and understanding diagram can be used in Internet, man-machine communication interface in CAD system, reverse engineering and computer vision system, which can shorten the input time of graphics and reduce the workload of "people" in man-machine communication. The purpose of this paper is to study the new classification of node marks given by French scholar Cooper in the graph marking of curved objects. The representative categories of the nodes are as follows: terminal,C,curvature-L,3-tangent,W,Y,T,4-tangent,X0,K, Peak,Multi,X,L0 and so on. In this paper, a variety of detailed algorithms are given for the determination of these 16 kinds of nodes, and the mathematical reasoning process of each algorithm is given, and the algorithms for judging the same node type are compared in order to find a better algorithm. In the previous verification of some node algorithms, Visual C6.0 is used to program, and the feasibility of these algorithms is verified by the consistency of MFC interface input node coordinates and node adjacent point coordinates and output node graphics with judgment results. Because the line mark of stereo graph is carried out in two dimensional plane, the type of node in line drawing mark is selected in AutoCAD. Based on the analysis of the requirements of node type discrimination in line marking of stereoscopic graph, the function of the secondary developed AutoCAD software is further obtained. Through the deep understanding of the structure and interface language of AutoCAD system and the summary of the previous experience in the secondary development and extension of AutoCAD, the feasibility of solving the problem of node type discrimination in line drawing marking in the form of secondary development on AutoCAD 2002 platform is obtained, and the overall design scheme and corresponding discriminant flow chart of the whole node type discrimination system are given. Through the comparison and analysis of the characteristics of various secondary development tools of AutoCAD, combined with the functional requirements of AutoCAD 2002 nodes, it is decided to take Visual C 6.0 as the platform and ObjectARX as the development tool. In the development of node type discrimination system, through the analysis of the linetypes of various nodes, the classes corresponding to various linetypes, such as AcDbLine class, AcDbCurve class corresponding lines and curves, are selected to obtain the starting and ending functions of the lines and curves. For example, the AcDbCurve class is used to define the object for the curve, and the starting and ending coordinates are obtained by the functions getStartPoint () and getEndPoint (). In addition to obtaining the starting point and the end point, the required points can be obtained by obtaining the characteristic points of the curve and the straight line, such as using the function getOsnapPoints () to obtain the object capture points such as ellipse, elliptical arc and so on. In all the acquired points of a node, the node coordinates can be obtained by comparing the algorithm, and then the node type can be classified by the mathematical relationship between the coordinates of the other obtained points, the mathematical relationship between the node coordinates and the coordinates of the remaining points, and the number of statistical curves and lines. In order to make the secondary development and extension interface of AutoCAD conform to people's operation habits and distinguish from the original interface, in addition to letting users use custom commands, the function menu is added, and the dockable window of non-modal dialog box is created by using the MFC function of development tool ObjectARX.
【學位授予單位】:太原理工大學
【學位級別】:碩士
【學位授予年份】:2011
【分類號】:TP391.72;TH122
【引證文獻】
相關期刊論文 前1條
1 曹恒;馮仲科;張茜;;CASS軟件林業(yè)制圖功能模塊的設計與實現(xiàn)[J];農(nóng)業(yè)工程學報;2012年12期
,本文編號:2504038
本文鏈接:http://sikaile.net/kejilunwen/jixiegongcheng/2504038.html
教材專著