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...
Handle(Geom_Surface) geom_Extrusion = BRepLib_FindSurface(nurbs.Shape()).Surface(); Handle(Geom_BSplineSurface) geombspline_Extrusion = GeomConvert::SurfaceToBSplineSurface(geom_Extrusion); Log into post comments Kreshnik Thu, 05/12/2005 - 12:31 ...
{boolb =false;if(S.IsNull())returnb;//平面直接返回if(S.ShapeType() ==TopAbs_FACE) 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....
下面的例子对6个点进行B样条曲面拟合,然后把Geom_BSplineSurface类型转TopoDS_Face类型,用于显示曲面。 #include<TColgp_Array2OfPnt.hxx>#include<gp_Pnt.hxx>#include<GeomAPI_PointsToBSplineSurface.hxx>#include"Viewer.h"#include<BRepBuilderA...
TopoDS_Shape halfspace;if( ! IfcGeom::Kernel::convert((IfcSchema::IfcHalfSpaceSolid*)l,halfspace) )returnfalse; TopoDS_Wire wire;if( ! convert_wire(l->PolygonalBoundary(),wire) || ! wire.Closed() )returnfalse; gp_Trsf trsf;if( ! convert(l->Position(),trsf) )returnfalse; ...
TopoDS_Shape aLocalF = F.Oriented(TopAbs_FORWARD); 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-...
(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...
TopoDS_Shape aShape = MC.Shape();if(aShape.IsNull())return0; aFunction->SetValue(aShape);log.SetTouched(Label());return1; } 开发者ID:triggerfish1,项目名称:pythonocc,代码行数:64,代码来源:GEOMImpl_CylinderDriver.cpp 示例3: Execute ...
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); ...