UG NX二次开发源码分享:获取边或者曲线的起点和终点(java
UG NX二次开发源码分享:获取边或者曲线的起点和终点(java)
这里做个参考,你使用其他语言类似,对于一般的曲线,建议使用evalator进行解析!!
static Point3d[] askCurveEnds(Curve theCurve) throws RemoteException, NXException
{
double[] limits = new double;
UFVariant evaluator;
EvaluateData start;
EvaluateData end;
evaluator = theUFSession.eval().initialize(theCurve.tag());
limits = theUFSession.eval().askLimits(evaluator);
start = theUFSession.eval().evaluate(evaluator, 0, limits);
end = theUFSession.eval().evaluate(evaluator, 0, limits);
theUFSession.eval().free(evaluator);
return new Point3d[]
{ new Point3d(start.point, start.point, start.point),
new Point3d(end.point, end.point, end.point) };
}
页:
[1]