Standard_Real CPnts_AbscissaPoint::Length(const Adaptor3d_Curve& C,
const Standard_Real U1,
const Standard_Real U2)
{
CPnts_MyGaussFunction FG;
//POP pout WNT
CPnts_RealFunction rf = f3d;
FG.Init(rf,(Standard_Address)&C);
// FG.Init(f3d,(Standard_Address)&C);
math_GaussSingleIntegration TheLength(FG, U1, U2, order(C));
if (!TheLength.IsDone()) {
Standard_ConstructionError::Raise();
}
return Abs(TheLength.Value());
}
根据上述求曲线弧长的代码可知,只需要给定曲线及其求积区间,即可计算出此区间内曲线的弧长。因为采用直接求积计算,所得曲线的弧长值的精度还是很高的。
相关文章: