图书简介:
目 录
第1章 知识熔接技术概述 1
1.1 知识工程介绍 1
1.2 知识熔接技术概述 2
1.3 知识熔接语言的特点 2
1.4 关键概念 3
1.4.1 类 3
1.4.2 对象 3
1.4.3 属性 3
1.4.4 规则 4
1.5 创建第一个KF实例 4
第2章 KF编程基础 8
2.1 类 8
2.2 属性 9
2.2.1 属性的语法 9
2.2.2 属性的数据类型 10
3.2.3 属性的行为标识 11
2.2.4 属性的命名标准 12
2.2.5 属性规则 12
2.3 子规则 13
2.4 子规则群 15
2.5 表达式 17
2.5.1 表达式分类 17
2.5.2 运算符及操作数 18
2.5.3 表达式中的函数 19
2.5.4 参考表达式 24
2.5.5 KF导航器的操作 26
2.5.6 ug_expression类 31
2.6 DemandOrder 32
2.7 DemandValue 32
2.8 参考坐标系 33
第3章 KF控制语句 42
3.1 表达式块 42
3.2 选择语句 43
3.3 循环控制语句 44
3.3.1 循环结构的语法形式 44
3.3.2 循环体内语句介绍 45
3.4 方法 52
3.5 函数 54
第4章 KF系统资源 56
4.1 常用类 56
4.2 常用函数 60
第5章 KF控制设计 63
5.1 几何采用 63
5.1.1 何谓几何采用 63
5.1.2 几何采用操作过程 64
5.2 KF与用户自定义特征 67
5.2.1 创建UDF库 67
5.2.2 ug_udfs类 70
5.2.3 UDF的定位 71
5.2.4 嵌入知识的UDF 73
5.2.5 调用UDF系统对话框 76
第6章 KF与用户界面 78
6.1 UI Styler对话框 78
6.1.1 UI Styler环境 78
6.1.2 控件种类 79
6.1.3 对话框属性设置 80
6.2 KF UI Styler程序 82
6.2.1 KF UI Styler程序目录的设置 82
6.2.2 KF UI Styler程序的创建方式 83
6.2.3 在KF中访问UI Styler控件属性 84
6.2.4 对话框和控件回调函数 86
6.2.5 Button控件应用 91
6.3 Block UI Styler 95
第7章 KF与其他语言的集成 102
7.1 NXOpen介绍 102
7.1.1 通用应用编程接口(Common API) 102
7.1.2 经典APIs(ClassicAPIs) 103
7.1.3 其他NX工具包 103
7.2 KF调用NX Open for C程序 104
7.3 在KF中调用NX Openfor .NET程序 111
7.4 在NXOpen程序中创建和操纵KF规则 113
第8章 KF与装配 116
8.1 NX中的装配操作 116
8.2 KF装配操作中的消息传递机制 117
8.3 几何对象拷贝 119
8.4 装配实例 120
8.5 创建装配约束 125
第9章 外部数据访问 128
9.1 文件操作 128
9.2 电子表格操作 130
9.3 外部数据库操作 133
9.3.1 创建ODBC数据源 133
9.3.2 ug_odbc_recordset类 134
第10章 基于KF的齿轮零件设计模板 150
10.1 项目背景描述 150
10.2 齿轮零件模板创建过程 152
10.3 UDF创建过程描述 154
10.4 系统集成 167
展开
Preface
Siemens PLM Software has partnered with the Education Management Information Center of the People’s Republic of China Ministry of Education (MOE) to support education in engineering technology and help provide the global manufacturing industry with a highly trained and heavily recruited workforce.
This textbook cultivates innovative engineering technology talent and enhances career competitive advantages for China’s university students. It supports the use of leading edge technology to give students a solid platform to become the excellent engineer in the 21st century, and the pioneer the development of digital and intelligent manufacturing throughout the country.
This book combines theory and practice through explanation and examples to enhance the reader’s basic knowledge and skills product lifecycle management (PLM).
The curriculum integrates attributes and processes from Siemens PLM software, which is used by leading manufacturing companies around the globe to develop some of the world’s most sophisticated products. This includes NX software for integrated computer-aided design, manufacturing and engineering simulation (CAD/CAM/CAE), Teamcenter® software for digital lifecycle management software and Tecnomatix® software for digital manufacturing.
Strong instruction by top Chinese universities accelerates the development of certified industrial IT talent and boosts the application of computer-aided and digital technologies in the field of engineering.
We are impressed with the innovative engineering design projects developed by students leveraging this textbook with top notch classroom instruction.
Leo Liang
CEO and Managing Director
Greater China
Siemens PLM Software
Dora Smith
Global Director
Academic Partner Program
Siemens PLM Software
----------------------------------------------------------------------------
前 言
本书是教育部“西门子2013年产学合作专业综合改革项目”系列教材之一(教高司函[2013]101号)。
NX是Siemens PLM Software的核心产品之一,是新一代数字化产品开发系统,是当今世界上最先进和高度集成、面向制造行业的CAD/CAE/CAM软件系统,支持从概念(CAID)到设计(CAD)、到分析(CAE)、到制造(CAM)的产品开发全过程。NX广泛应用于通用机械、模具、汽车和航空航天领域,被很多世界著名公司选定为企业计算机辅助设计、分析、制造的标准。根据开放式设计的理念,NX提供了各种开发工具、接口和解决方案,使客户在产品全生命周期中捕捉和保留领域知识,包括捕捉流程知识、自动化设计和定制用户使用环境等。
知识工程(Knowledge-based Engineering,KBE)技术是面向现代设计要求而产生和发展起来的新型智能设计方法,目的是充分利用工程专家的领域知识和经验,为工程问题提供最佳解决方案,是近年来十分活跃的研究与应用热点技术。
知识融合(Knowledge Fusion,KF)是一种新的设计思想和工具,它是在基于特征的参数化建模技术和KBE技术的基础上发展起来的。KF能够有效地将设计知识、专家经验、工程标准等与CAD模型进行融合,并进行解析和推理,能够访问数据库、电子表格等外部数据源,并且能够与其他NX二次开发工具(如NXOpen、UI Styler等)进行集成,功能强大。使用KF,工程师可以高效便捷地建立工程规则和表达自己的设计意图,从而实现设计的自动化。
编写本书的目的是使读者能够深入理解基于知识库和规则推理的机械设计过程,熟悉和掌握KF中的基本概念、语法、程序结构和编程元素,掌握KF中的几何采用、用户自定义特征、外部数据访问、建模和装配操作等,能够利用KF中的类、方法和函数等描述机械设计制造中的各种知识、经验和规则,能够使用KF开发各种CAD应用系统,满足企业数字化设计与制造的需要。
西门子工业软件(上海)有限公司徐海峰先生对全书进行了详细审校,并提供了宝贵的指导意见,韩泽明先生提供了部分例题;在本书的编写过程中,得到了盐城工学院刘德仿副校长、西门子工业软件(上海)有限公司方正先生的支持和指导;盐城工学院周临震、李青祝老师提出了很多宝贵意见,在此一并致以最衷心的感谢。
Jim Rusk
产品工程软件高级副总裁
Siemens PLM Software
展开