- 积分
- 1215
- 精华
- 阅读权限
- 90
- 注册时间
- 2007-10-2
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2008-1-6 08:30:12
|Error|
显示全部楼层
三、对玻壳模具自动化设计的联合开发
根据对玻壳模具结构及其成型曲面的分析和设计数据的处理,运用UG中的知识熔接技术(UG/KF),把玻壳模具的设计方法、设计步骤和设计计算融合在一起,从而生成玻壳模具自动设计的UG/KF二次开发应用程序。联合开发的步骤为:用UG/KF编写DFA程序→编写Menuscript脚本文件→用UIStyler生成对话框→重新启动UG。
下面以玻壳锥凹模为例,介绍UG/KF、Menuscript和UIStyler对玻壳模具自动化设计的联合开发。
运用UG/KF编写的锥凹模自动设计程序如下:
#! UG/KF 19.0
DefClass:Funnel_Bottom_Mold (ug_base_part);
(string modifiable Parameter)Funnel_Glass_
Out_Surface_DataFile:
"e:\rqh\data_files\datafile_outter.prt";
(child) ss:{
class; ug_spreadsheet;
part_file; Funnel_Glass_Out_Surface
DataFile:;
};
(list modifiable)range_number:ss:
ask_named_range "iso_range");
(list modifiable) body_range_number: ss:ask_named_range: ("body_range");
(number modifiable parameter) Funnel_
Bottom_MM_Long_Axis_Contraction: 1.90;
(number modifiable parameter) Funnel_
Bottom_MM_Diagonal_Axis_Contraction: 2.35;
(number modifiable parameter) Funnel_
Bottom_MM_Short_Axis_Contraction: 1.65;
(number modifiable parameter) Funnel_
Bottom_Thickness: 35;
(number modifiable parameter) Funnel_
Bottom_Base_Diameter: if(ss:ask_number 2,4)/12.7>=20)then
275 else 250;
(number modifiable ) rad: Funnel_Bottom_
Base_Diameter:/2;
(number modifiable ) Funnel_Bottom_Tottal
_Height: ceiling(ss:ask_number 2,1)
+5);
(number modifiable parameter) milling_part
_height: 3.5;
(Child) out:{
Class,botom_mold_sheet_out_simple;
datafile,Funnel_Glass_Out_Surface_
DataFile:;
value_long_axie,Funnel_Bottom_MM_
Long_Axis_Contraction:;
value_diagonal_axie,Funnel_Bottom_MM_
Diagonal_Axis_Contraction:;
value_short_axie,Funnel_Bottom_MM_
Short_Axis_Contraction:;
milling_part_height,milling_part_
height:;
};
(number modifiable) Leng:ss:ask_number:
(2,2)+Funnel_Bottom_Thickness:+10;
(number modifiable ) Wid: ss:ask_number:
(2,6)+Funnel_Bottom_Thickness:+10;
(child) block:{
class, ug_block ;
Length, Leng:;
Width, Wid:;
Height, ss:ask_number:(2,1);
Origin, Point(0,0,0);
X_Axis, Vector(1,0,0);
Y_Axis, Vector(0,1,0);
};
(child) out_offset:{
class, ug_offset_sheet_body ;
Face,{nth(1,ug_body_askFaces(out:
sheet_for_out )};
Distance,-Funnel_Bottom_Thickness:;
Tolerances,{0.254,0.0254,0.0254};
};
(child)extend_out_offset:{
class, ug_extended_sheet;
Face,{nth(1,ug_body_askFaces(out_
offset )};
Option, Tangent_Length;
Start_Object, {nth(1,ug_body_
askEdgeClosestToPoint(out_
offset:, Point(ss:ask_number:(2,4)
*cos(36.87), ss:ask_number:(2,4)*sin(36.87), ss:ask_number:(2,1))))};
Parameters, {10.0};
Tolerances, {0.0254,0.0254,0.0254};
};
(child)sew_surface:{
class, ug_sew_sheet;
Target_sheet,{out_offset:};
Tool_sheets,{extend_out_offset:}; |
|