A patch by JGV for correct usage of filling in function MakeAnyFace.

This commit is contained in:
jfa 2012-03-29 14:04:01 +00:00
parent 0304ec44b3
commit 332a5b2f74

View File

@ -27,6 +27,8 @@
#include "utilities.h"
#include <Basics_OCCTVersion.hxx>
#include <BRep_Tool.hxx>
#include <BRep_TFace.hxx>
#include <BRep_Builder.hxx>
@ -1358,6 +1360,20 @@ TCollection_AsciiString GEOMImpl_Block6Explorer::MakeAnyFace (const TopoDS_Wire&
// 12.04.2006 for PAL12149 begin
Handle(Geom_Surface) aGS = BRep_Tool::Surface(TopoDS::Face(aFace));
#if OCC_VERSION_LARGE > 0x06050200
BRep_Builder BB;
TopoDS_Iterator itw(theWire);
for (; itw.More(); itw.Next())
{
const TopoDS_Edge& anEdge = TopoDS::Edge(itw.Value());
TopoDS_Edge NewEdge = TopoDS::Edge(MF.Generated(anEdge).First());
Standard_Real fpar, lpar;
Handle(Geom2d_Curve) NewPCurve = BRep_Tool::CurveOnSurface(NewEdge, TopoDS::Face(aFace), fpar, lpar);
TopLoc_Location aLoc;
Standard_Real NewTol = BRep_Tool::Tolerance(NewEdge);
BB.UpdateEdge(anEdge, NewPCurve, aGS, aLoc, NewTol);
}
#endif
BRepBuilderAPI_MakeFace MK1 (aGS, theWire);
if (MK1.IsDone()) {
TopoDS_Shape aFace1 = MK1.Shape();