马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
这是nx5 help中自带的一个例子,但是我按其步骤调试了一下却是提示错误,请熟悉kf的指点一下:
问题描述是红色部分好像参数调用不对,但是我看了半天觉得应该没问题啊。
#! NX/KF 4.0
DefClass: udf_rule.prt (ug_base_part);
(Number) RotationAngle: 0;
(Vector)ProjectionVector: vector(0,-1,0);
(Point)Origin:Point(4,7,7);
(string)FaceName:"front";
(string)RotationAngle_label:"Angle";
(String)ProjectionVector_laber:"Vector";
(String)Origin_label:"Origin";
(String)FaceName_label:"Face Name";
(list)input_parameters:{RatationAngle:,ProjectionVector:,Origin:,FaceName:};
(list)Faceselection:ug_refObjectByName( FaceName:,{ug_face}, "" );
(list)LocatorOnsurface: ug_face_askPointParametersAtPoint( first(faceselection:),Origin:, Projection_Vector, ProjectionVector: );
(Point)PointOnface:ug_face_askPointOnFace( first(faceselection:), LocatorOnsurface: );
(Vector)FaceNormal:ug_face_askNormal( first(faceselection:), LocatorOnsurface: );
(Vector)x: RotateVector(vector(-1,0,0), RotationAngle:, FaceNormal:);
(Vector)x: RotateVector(x:,-90,FaceNormal:);
(Child) ReferencePlane: {
Class, ug_datum_plane;
thru_point, Pointonface:;
Direction, FaceNormal:;
Suppress_Children?, FALSE;
};
(Child) Xaxis: {
Class, ug_datum_axis;
thru_point,Pointonface:;
Direction, x:;
Suppress_Children?, FALSE;
};
(Child) Yaxis: {
Class, ug_datum_axis;
thru_point,Pointonface:;
Direction, Y:;
Suppress_Children?, FALSE;
};
(Child) Zaxis: {
Class, ug_datum_axis;
thru_point,Pointonface:;
Direction, -FaceNormal:;
Suppress_Children?, FALSE;
};
|