iCAx开思工具箱

标题: 如何调用KF自动生成程序中的参数? [打印本页]

作者: wyhjeremy    时间: 2005-10-9 21:16
标题: 如何调用KF自动生成程序中的参数?
下面的程序是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:};
};
作者: Afang    时间: 2005-10-10 15:10
axis是一个number型的变量,调用的时候只用用axis:就可以了啊




欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3