Research on dimensional redundancy inspection technology of engineering drawings based on the secondary development of SolidWorks
-
摘要: 针对SolidWorks工程图中尺寸标注易出错、人工检查难度大等问题,提出了一种对SolidWorks工程图尺寸冗余检查技术。基于VB.NET编程语言对SolidWorks进行二次开发,通过调用SolidWorks中的API函数获取工程图中的视图信息以及尺寸信息,用SQL Server数据库对数据进行储存和读取。运用比较法,实现了工程图中尺寸重复以及尺寸链封闭的检查,并将错误尺寸高亮显示在工程图中。最后以冷藏车的典型零件为对象,验证了该方法的可行性。该技术极大地降低了检查时间和错误率,提高了工作人员的效率。
-
关键词:
- SolidWorks二次开发 /
- VB.NET /
- API函数 /
- 尺寸标注 /
- 尺寸检查
Abstract: Aiming at the problems of error-prone size labeling and high difficulty in manual inspection of SolidWorks engineering drawings, a technology for SolidWorks engineering drawing size redundancy inspection is proposed. As the development tool, VB.NET is used to carry out the secondary development of SolidWorks. The view information and dimension information in the drawing are obtained by calling the API function in SolidWorks, the data is stored and read with SQL Server database. The comparison method is used to check the size duplication and size chain closure in engineering drawings, and the error size is highlighted in the drawing. The feasibility of this method is verified through taking the typical parts of the refrigerated truck as the object. The technique greatly reduces the checking time and design error rate, and improves the design efficiency of the staff.-
Key words:
- SolidWorks secondary development /
- VB.NET /
- API function /
- dimensions /
- dimensional inspection
-
表 1 事件方法表
事件或方法 对象或对象类型 注释 OpenDoc6() SldWorks 打开文件 Save SldWorks.ModelDoc 保存文件 CloseDoc SldWorks 关闭文件 GetName2 View 获取工程图中视图的名称 GetDimensionCount4() View 获取各视图中尺寸的数量 Type2 DisplayDimension 显示尺寸的类型 GetSystemValue Dimension 获取尺寸值 GetLineAtIndex3 DisplayDate 获取尺寸两端的坐标 GetArrowHeadAtIndex2 DisplayDate 获取尺寸线箭头两终端的坐标 SetLineColor DrawingDoc 高亮显示 -
[1] 刘灿涛, 汪叔淳. 尺寸封闭性检验的新算法[J]. 计算机辅助设计与图形学学报, 1997, 9(5): 84-89. doi: 10.3321/j.issn:1003-9775.1997.05.014 [2] 张树有, 卓勇. 基于逻辑坐标的多视图尺寸冗余性判别[J]. 工程图学学报, 1997(4): 66-70. [3] 杨勃. 基于约束原理和CR 图的工程图尺寸信息完备性检验和自动计算[D]. 湘潭: 湘潭大学, 2005. [4] Cheng Y L, Ni Z H, Liu T Y, et al. An intelligent approach for dimensioning completeness inspection in 3D based on transient geometric elements[J]. Computer Aided Design, 2014, 53(8): 14-27. [5] Luisa Martínez M, Félez J. A constraint solver to define correctly dimensioned and overdimensioned parts[J]. Computer-Aided Design, 2005, 37(13): 1353-1369. doi: 10.1016/j.cad.2005.01.004 [6] Korosec M, Balic J, Kopac J. Neural network based manufacturability evaluation of free form machining[J]. International Journal of Machine Tools & Manufacture, 2005, 45(14): 13-20. [7] Giachetti R E, Alvi M L. An object-oriented information model for manufacturability analysis of printed circuit board fabrication[J]. Computers in Industry, 2001, 45(2): 177-196. doi: 10.1016/S0166-3615(01)00092-6 [8] 吴权威. SolidWorks 2003中文版实务 [M]. 北京: 科学出版社, 2004. [9] 李大磊, 赵玉奇, 张志林, 等. SolidWorks高级功能与工程应用 [M]. 北京: 北京邮电大学出版社, 2009. [10] 陈超祥, 胡启登. SolidWorks高级教程简编: 2010版[M]. 北京: 机械工业出版社, 2010. [11] SolidWorks公司. SolidWorks高级教程: 2007版. 二次开发与API[M]. 北京: 机械工业出版社, 2009. [12] 王珊, 萨师煊. 数据库系统概论 [M]. 5版. 北京: 高等教育出版社, 2006. [13] 萨师煊. 数据库系统概论 [M]. 3版. 北京: 高等教育出版社, 2000. -