下面的例子对6个点进行B样条曲面拟合,然后把Geom_BSplineSurface类型转TopoDS_Face类型,用于显示曲面。 #include<TColgp_Array2OfPnt.hxx>#include<gp_Pnt.hxx>#include<GeomAPI_PointsToBSplineSurface.hxx>#include"Viewer.h"#include<BRepBuilderA...
b=IsPlane(TopoDS::Face(S), pln, tol);//根据边查平面else{ BRepLib_FindSurface finder(S.Located(TopLoc_Location()), tol/*-1*/,true);if(!finder.Found())returnb; pln=GeomAdaptor_Surface(finder.Surface()).Plane(); pln.Transform(S.Location().Transformation()); b=true; }returnb; } ...
IsDone()){ TopoDS_Edge topoEdge = makeCircleEdge.Edge(); judgeTopoEdgeType(topoEdge); } } //结果输出: //Type is Geom_Line //Type is Geom_Circle 其他继承Geom_Curve的子类也可判断 TopoDS_Face类型通过BRep_Tool::Surface判断 编辑于 2023-05-14 17:57・广东...
const Standard_Real HelixLength){Standard_Realu0 = 0.0;Standard_Realu1 = 2 * M_PI;Standard_Realv0 = 0.0;Standard_Realv1 = HelixLength;doubleuInter = (u1 - u0) / 1000;doublevInter = (v1 - v0) / 1000;TColgp_HArray1OfPntP...