基于AutoCAD ObjectARX二次开发的线画图标记中节点类型判别
发布时间:2019-06-21 11:17
【摘要】:随着科学技术的发展,人—机之间用图形进行通讯日益受到重视,在许多场合显示出其重要性。为使计算机能“看”懂物体投影线图,需要研究计算机解释投影线图的机理。计算机分析、处理和理解线图的研究成果可用于互联网、CAD系统中的人—机通讯接口、逆向工程及计算机视觉系统中,能缩短图形输入时间,减轻人—机通讯中“人”的工作量。 本文旨在研究判别法国学者Cooper对曲面物体的线图标记中给出的新的节点标记分类。其节点代表分类有:terminal、C、curvature-L、L、3-tangent、W、Y、T、4-tangent、X0、K、Ψ、Peak、Multi、X、L0等。本文对立体线图的线条标记中常见的这16种节点的判定给出了多种较为详细的算法,并且给出了每种算法的数学推理过程,对于判断同一节点类型的算法进行了对比以寻求更优的算法。在前期的部分节点算法验证中,利用Visual C++6.0进行了编程,并通过MFC界面输入节点坐标和节点相邻点坐标及输出节点图形与判断结果的一致性,验证了这些算法的可行性。 由于立体线图的线条标记在二维平面中进行,所以选择在AutoCAD中判别线画图标记中节点的类型。通过对立体线图的线条标记中节点的类型判别的要求分析,进一步明确得出了所二次开发的AutoCAD软件的功能。并通过对AutoCAD系统结构和接口语言的深入了解以及对前人在AutoCAD二次开发扩展功能时的相关经验的总结,得出了在AutoCAD 2002平台上以二次开发形式解决线画图标记中节点类型判别问题的可行性并给出了整个节点类型判别系统的总体设计方案和相应的各种判别流程图。通过对AutoCAD各种二次开发工具特点的对比和分析,结合AutoCAD 2002节点判别功能需求,决定以Visual C++6.0为平台、以ObjectARX为开发工具。 在节点类型判别系统开发中,通过对各种节点组成线型的分析,选用对应各种线型的类,如AcDbLine类,AcDbCurve类对应直线和曲线,选用相应的获取直线和曲线的起点和终点函数,如对于曲线利用AcDbCurve类定义对象,通过函数getStartPoint ()和getEndPoint ()获取起点和终点坐标。除获取起点和终点外,还可以通过获取曲线和直线的特征点等方法获取所需点,如使用函数getOsnapPoints()获取椭圆、椭圆弧等对象捕捉点。在一个节点的的所有的获取的点中,通过比较算法实现获取节点坐标,进而可以通过其余获取点的坐标、节点坐标与其余点坐标问的数学关系及统计曲线和直线的条数来分类节点的算法等实现节点类型的判别。 为了使AutoCAD二次开发扩展界面符合人们的操作习惯及与原来界面的区分,除了让用户使用自定义的命令外,还加入了功能菜单,使用开发工具ObjectARX的MFC功能创建了非模态对话框的可停靠窗口。
[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软件林业制图功能模块的设计与实现[J];农业工程学报;2012年12期
,本文编号:2504038
本文链接:https://www.wllwen.com/kejilunwen/jixiegongcheng/2504038.html