SolidWorks二次开发中型钢设计方法

SolidWorks二次开发中型钢设计方法

摘 要:型钢是指具有一定截面形状和尺寸的条形钢材。针对型钢在三维建模中标准尺寸和建模相似率大的问题,提出了一种基于SolidWorks二次开发的型钢快速设计方法。该方法将不同种类型钢的标准截面尺寸存储在SQL Serve数据库中,并能够对该数据进行增、删、改、查等操作。在相关强度计算的基础上实现截面尺寸的自动选择,此外还可以进行手动选择以满足企业的特殊需求。实例表明该方法能够自动生成和保存多种型钢的工程图与三维模型,且自动生成的型钢的力学性能能够满足实际使用要求。

关键词:型钢;SolidWorks二次开发;数据库 DOI:10.11907/rjdk.172700 中图分类号:TP319

文献标识码:A 文章编号:1672-7800(2018)005-0154-03 Abstract:Section steel is a strip steel with certain cross-sectional shape and size. To address the problem of high similarity between the standard size and the modeling similarity in the 3D modeling, this paper proposes a rapid design method of section steel based on SolidWorks secondary development. This method stores the standard cross-sectional

dimensions of different types of section steel in the SQL service database and enables the data to be added, deleted, improved and checked. On the basis of the relevant strength’calculation, we can realize the automatic selection of the section size.In addition,we can also manually choose to meet the specific needs of enterprises. The example shows that the method can automatically generate and save a variety of steel engineering drawings and 3D model, and the automatically generated section steel properties can meet the actual requirements.

Key Words:section steel; solid Works; secondary development; database 0 引言

SolidWorks?c其它三维制图软件类似,能够进行2D绘图与3D造型,且能实现零部件尺寸、材料明细表(BOM)、零件编号自动生成、模拟动态装配、干涉检查等功能[1],它是一套基于Windows的CAD/CAE/CAM/PDM桌面集成系统[2]。在企业中往往会遇到一些共性问题,为了满足企业的个性化需求,提高劳动效率,避免重复性劳动,则有必要对SolidWorks进行二次开发。 1 Solidworlk二次开发基础

SolidWorks提供了很多API函数,这些API函数是

SolidWorks的OlE或者COM接口。OLE在应用程序中对OLE对象与属性进行操作,几乎实现所有的SolidWorks功能[3];COM是软件组件互相通信的一种方式。对SolidWorks进行二次开发可以使用VB、VBA、VC、Delphi等语言[4]。SolidWorks二次开发分为2种,一种是基于自动化技术的;另一种开发方式是基于COM的,该方式可以使用很多的SolidWorks API[5]。

在SolidWorks二次开发过程中将相关数据存到数据库中。数据库是存储数据的地方,本文使用的数据库是SQL Server数据库。SQL Server数据库作为一种关系型数据库在目前已经被广泛使用,SQL Server数据库中重要的组成部分是存储过程,存储过程则是SQL语句与可选流程控制语句的预编译集合,其它应用程序可以通过调用执行相关命令[6]。VB.NET可以直接通过ADO技术调用SQL Serve的存储过程对数据进行操作。 2 应用实例

型钢是具有一定截面形状和尺寸的条形钢材,钢材分为建材、管材、板材、型材等成品钢材,其中型材分为工角槽、H型钢、方钢、扁钢、球扁钢等[7]。型钢力学性能较高,便于后期加工、安装和拆除,同时也便于购买。型钢在机械、农业、建筑等行业应用非常广泛,由于钢材规格是一定的,所以在使用这类钢材模型进行二次开发时,要注意这些钢材

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4