下面的例子对6个点进行B样条曲面拟合,然后把Geom_BSplineSurface类型转TopoDS_Face类型,用于显示曲面。 #include<TColgp_Array2OfPnt.hxx>#include<gp_Pnt.hxx>#include<GeomAPI_PointsToBSplineSurface.hxx>#include"Viewer.h"#include<BRepBuilderA...
I've constructed a surface by revolving some curves (by making edges, wires etc) then fused the shapes together (BRepAlgoAPI_Fuse). Is there some way to get a Geom_Surface from the resulting TopoDS_Shape?Log in to post comments Benedicte...
");constTopoDS_Faceface = TopoDS::Face(sh);if(face.IsNull())throwBase::Exception("Null face in SketchBased::getSupportFace()!");BRepAdaptor_Surfaceadapt(face);if(adapt.GetType() != GeomAbs_Plane)throwBase::Exception("No planar face...
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・IP 属地广东...
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()); ...
TopoDS_Face FF = TopoDS::Face(aLocalF); Handle(Geom2d_Curve) C1 = BRep_Tool::CurveOnSurface(E1,FF,f1,l1); Handle(Geom2d_Curve) C2 = BRep_Tool::CurveOnSurface(E2,FF,f2,l2);if(E1.Orientation() == TopAbs_FORWARD) P1 = C1->Value(f1);elseP1 = C1->Value(l1);if(E2.Orientatio...
TopoDS_Face F =TopoDS::Face(ex.Current()); BRepBuilderAPI_NurbsConvert nurbs(F); Handle(Geom_Surface) geom_Extrusion = BRepLib_FindSurface(nurbs).Surface(); Handle(Geom_BsplineSurface) geombspline_extrusion = GeomConvert::SurfaceToBSplineSurface(geom_extrusion) ; ...
(center, zr);//creata profile of gringing wheelTopoDS_Shapegw = createGrindingwheel2();//creata cylinder surfaceStandard_RealR = 0.306/2;Handle(Geom_CylindricalSurface)aCylinder = new Geom_CylindricalSurface(gp::XOY(), R);TopoDS_Shapec...
GeomAbs_SurfaceType aTS; TopLoc_Location aLoc;//bRet=Standard_False;//aExp.Init(aShape, TopAbs_FACE);for(; aExp.More(); aExp.Next()) {constTopoDS_Face& aF=*((TopoDS_Face*)&aExp.Current());if(aMF.Add(aF)) {constHandle(Geom_Surface)& aS=BRep_Tool::Surface(aF, aLoc); ...