UG NX二次开发源码分享:使用java来显示曲线或者边的方向
UG NX二次开发源码分享:使用java来显示曲线或者边的方向
如果你用C的ufun的话,应该很简单,java这么用,基本都一样!!!
static void showCurveDirection(NXObject theCurveOrEdge)
throws RemoteException, NXException
{
double[] limits = new double;
UFVariant evaluator;
EvaluateData start;
evaluator = theUFSession.eval().initialize(theCurveOrEdge.tag());
limits = theUFSession.eval().askLimits(evaluator);
start = theUFSession.eval().evaluate(evaluator, 1, limits);
theUFSession.eval().free(evaluator);
Point3d startPoint = new Point3d(start.point, start.point, start.point);
Vector3d dir = new Vector3d(start.derivatives, start.derivatives,
start.derivatives);
displayConehead(startPoint, dir, "Curve Direction");
}
页:
[1]