iCAx开思工具箱
标题:
【求教】这个ugdfa文件问题在哪里?
[打印本页]
作者:
虫二
时间:
2007-8-1 09:35
标题:
【求教】这个ugdfa文件问题在哪里?
这是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;
};
作者:
jon_wu
时间:
2007-8-4 05:55
你有没有按照Help的要求一步一步做?
(string)FaceName:"front"; --> 你制作udf的part里面需要有一个面,并且名字叫“front”。
作者:
iread
时间:
2007-8-4 09:23
顶,支持对NX/KF的学习。
欢迎光临 iCAx开思工具箱 (https://t.icax.org/)
Powered by Discuz! X3.3