找回密码 注册 QQ登录
开思网工业级高精度在线3D打印服务

iCAx开思网

CAD/CAM/CAE/设计/模具 高清视频【积分说明】如何快速获得积分?快速3D打印 手板模型CNC加工服务在线3D打印服务,上传模型,自动报价
查看: 15635|回复: 1
打印 上一主题 下一主题

如何调用KF自动生成程序中的参数?

[复制链接]
跳转到指定楼层
1
发表于 2005-10-9 21:16:44 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多同行朋友,交流,分享,学习。

您需要 登录 才可以下载或查看,没有帐号?注册

x
下面的程序是KF自动生成的,如何调用其中的axis   这句(Number Modifiable) axis: 50; 是我加的
#! UGNX/KF 2.0

DefClass: Syl_kf_gear (ug_base_part);

(Number Modifiable) axis: 50;

(Child) axis_gear: {
Class, ug_expression;
value, 0;
};

(Child) axis_kf: {
Class, ug_expression;
value, ug_askValueOfExpressionStr( "axis" );
};

(Child) udf_axis1: {
Class, ug_udfs;
Name, "udf_axis1";
Library, "/Metric";
Parameters, {{axis,
40},
{Diameter,
40},
{b,
43.5}};
References, {};
referenceFrame, FrameXY(Point_(0,0,0,worldFrame());Vector_(1,0,0,worldFrame());Vector_(0,1,0,worldFrame()));
Suppress?, if axis_gear:value:=0 then
FALSE
else TRUE;
targetLayer, 0;
demandOrder, {axis_gear:};
};

(Child) udf_bond1: {
Class, ug_udfs;
Name, "udf_bond1";
Library, "/Metric";
Parameters, {{z,
80},
{m,
2},
{axis,
30},
{b_bond,
if (ug_askValueOfExpressionStr( "axis" )<25) then 6 else 12},
{h_bond,
if (ug_askValueOfExpressionStr( "axis" )<25) then 4 else 8},
{alpha,
20},
{p173,
11}};
References, {};
referenceFrame, FrameXY(Point_(0,0,0,worldFrame());Vector_(1,0,0,worldFrame());Vector_(0,1,0,worldFrame()));
Suppress?, if axis_gear:value:=1 then TRUE else FALSE;
targetLayer, 0;
demandOrder, {axis_gear:};
};

(Child) udf_gear01: {
Class, ug_udfs;
Name, "udf_gear01";
Library, "/Metric";
Parameters, {{alpha,
20},
{z,
125},
{m,
2},
{b,
43.5}};
References, {};
referenceFrame, FrameXY(Point_(0,0,0,worldFrame());Vector_(1,0,0,worldFrame());Vector_(0,1,0,worldFrame()));
Suppress?, FALSE;
targetLayer, 0;
demandOrder, {axis_gear:};
};

(Child) udf_gear_02: {
Class, ug_udfs;
Name, "udf_gear_02";
Library, "/Metric";
Parameters, {{depth,
17.4},
{Diameter,
229}};
References, {};
referenceFrame, FrameXY(Point_(0,0,0,worldFrame());Vector_(1,0,0,worldFrame());Vector_(0,1,0,worldFrame()));
Suppress?, if axis_gear:value:=0 then FALSE else TRUE;
targetLayer, 0;
demandOrder, {axis_gear:};
};

(Child) udf_gear_array: {
Class, ug_udfs;
Name, "udf_gear_array";
Library, "/Metric";
Parameters, {{m,
2},
{z,
80},
{axis,
30}};
References, {};
referenceFrame, FrameXY(Point_(0,0,0,worldFrame());Vector_(1,0,0,worldFrame());Vector_(0,1,0,worldFrame()));
Suppress?, if ug_askValueOfExpressionStr( "da" )<50 then
TRUE
else FALSE;
targetLayer, 0;
demandOrder, {axis_gear:};
};

(Child) udf_gear_blend1: {
Class, ug_udfs;
Name, "udf_gear_blend1";
Library, "/Metric";
Parameters, {{b,
43.5}};
referenceFrame, FrameXY(Point_(0,0,0,worldFrame());Vector_(1,0,0,worldFrame());Vector_(0,1,0,worldFrame()));
References, {};
targetLayer, 0;
Suppress?, FALSE;
};

(Child) udf_gear_boss1: {
Class, ug_udfs;
Name, "udf_gear_boss1";
Library, "/Metric";
Parameters, {{Limit_1,
-2.25},
{b,
43.5},
{axis,
40},
{Limit_2,
45.75}};
References, {};
referenceFrame, FrameXY(Point_(0,0,0,worldFrame());Vector_(1,0,0,worldFrame());Vector_(0,1,0,worldFrame()));
Suppress?, if axis_gear:value:=1 then TRUE else FALSE;
targetLayer, 0;
demandOrder, {axis_gear:};
};
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 赞一下!赞一下!
2
发表于 2005-10-10 15:10:57 | 只看该作者

马上注册,结交更多同行朋友,交流,分享,学习。

您需要 登录 才可以下载或查看,没有帐号?注册

x
您需要登录后才可以回帖 登录 | 注册

本版积分规则

3D打印手板模型快速制作服务,在线报价下单!

QQ 咨询|手机版|联系我们|iCAx开思网  

GMT+8, 2024-11-6 16:58 , Processed in 0.022858 second(s), 11 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

快速回复 返回顶部 返回列表