下面的例子对6个点进行B样条曲面拟合,然后把Geom_BSplineSurface类型转TopoDS_Face类型,用于显示曲面。 #include<TColgp_Array2OfPnt.hxx>#include<gp_Pnt.hxx>#include<GeomAPI_PointsToBSplineSurface.hxx>#include"Viewer.h"#include<BRepBuilderA...
intconvert_to_ifc(constTopoDS_Face& f, IfcSchema::IfcFace*& face,booladvanced){ Handle_Geom_Surface surf = BRep_Tool::Surface(f);TopExp_Explorerexp(f, TopAbs_WIRE); IfcSchema::IfcFaceBound::list::ptrbounds(newIfcSchema::IfcFaceBound::list);intindex =0;for(;exp.More();exp.Next(),...
");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...
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...
在OpenCASCADE中,要判断一个TopoDS_Face是否为平面,可以通过使用BRepAdaptor_Surface类及其方法来实现。BRepAdaptor_Surface类为TopoDS_Face提供了一个适配器,允许我们访问底层的几何表面信息,包括表面的类型。 以下是一个分步骤的解答,包括代码片段,用于判断TopoDS_Face是否为平面: 1. 包含必要的头文件 首先,确保你的代...
cout << "face count is " << aFaceMap.Extent() << std::endl; for (int i = 1; i <= aFaceMap.Extent(); ++i) { const TopoDS_Face& curFace = TopoDS::Face(aFaceMap(i)); BRepAdaptor_Surface adaptorSurface(curFace); GeomAbs_SurfaceType surfaceType = adaptorSurface.GetType(); ...
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 属地广东...
OpenCASCADE的查找平面的类(BRepLib_FindSurface,根据形状中的边查找平面)。 boolIsPlane(constTopoDS_Face &F, gp_Pln&pln, Standard_Real tol) { BRepAdaptor_Surface BASur(F); GeomAbs_SurfaceType type=BASur.GetType(); //平面类型if(type ==GeomAbs_Plane) ...
When I import an IGES file I cannot recognize the plane surface with : TopoDS_Face aFace = TopoDS::Face(aSubShape); Handle(Geom_Surface) Surface = BRep_Tool::Surface(aFace); if (Surface->IsKind(STANDARD_TYPE(Geom_Plane)) ) ... Have you find any solution to this question ? Thanks...
(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...