theTopLoc_Location = shape.Location();
Handle(Geom_Surface) geomSurface = surface.Surface().Surface();
Handle(Geom_BSplineSurface) bsplineSurface = GeomConvert::SurfaceToBSplineSurface(geomSurface);
/*std::vector<gp_Pnt> points;
GetSixPointsFromBSplineSurface(bsplineSurface, points);*/
GeomConvert_SurfToAnaSurf converter(bsplineSurface);
converter.SetConvType(GeomConvert_Simplest);
converter.SetTarget(GeomAbs_Cylinder);
geomSurface=converter.ConvertToAnalytical(1);
//拟合出来的面都是在原点,需要先获取一下原始样条曲面的矩阵,把矩阵设置到拟合出来的圆圆柱面中。拟合的面没有高度,部分没有底面圆心。需要在其他里面出来。
if (geomSurface->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)))
{
Handle(Geom_CylindricalSurface)