X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FBlockFix%2FBlockFix_UnionFaces.cxx;h=9a42dde438bf06ce2564a6677921f0583ed78f5d;hb=2736f682fe0d63fbaf9dff49c46b4fa6c23d72ce;hp=35e9ff26eda13df3d4c48b2e45ee9ff3c05e2269;hpb=8af6f2a74ecd53c356e81e728d91af4d865b8261;p=modules%2Fgeom.git diff --git a/src/BlockFix/BlockFix_UnionFaces.cxx b/src/BlockFix/BlockFix_UnionFaces.cxx index 35e9ff26e..9a42dde43 100644 --- a/src/BlockFix/BlockFix_UnionFaces.cxx +++ b/src/BlockFix/BlockFix_UnionFaces.cxx @@ -125,7 +125,7 @@ Standard_Integer& BlockFix_UnionFaces::GetOptimumNbFaces() //======================================================================= //function : AddOrdinaryEdges -//purpose : auxilary +//purpose : auxiliary // adds edges from the shape to the sequence // seams and equal edges are dropped // Returns true if one of original edges dropped @@ -177,7 +177,7 @@ static Standard_Boolean AddOrdinaryEdges(TopTools_SequenceOfShape& edges, //======================================================================= //function : ClearRts -//purpose : auxilary +//purpose : auxiliary //======================================================================= static Handle(Geom_Surface) ClearRts(const Handle(Geom_Surface)& aSurface) { @@ -191,7 +191,7 @@ static Handle(Geom_Surface) ClearRts(const Handle(Geom_Surface)& aSurface) //======================================================================= //function : IsFacesOfSameSolids -//purpose : auxilary +//purpose : auxiliary //======================================================================= static Standard_Boolean IsFacesOfSameSolids (const TopoDS_Face &theFace1, @@ -591,10 +591,13 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape) sfw->SetMaxTolerance(Max(1.,myTolerance*1000.)); sfw->SetFace(aFace); for (TopoDS_Iterator iter (aFace,Standard_False); iter.More(); iter.Next()) { - TopoDS_Wire wire = TopoDS::Wire(iter.Value()); - sfw->Load(wire); - sfw->FixReorder(); - sfw->FixShifted(); + TopoDS_Shape aFaceCont = iter.Value(); + if (!aFaceCont.IsNull() && aFaceCont.ShapeType() == TopAbs_WIRE) { + TopoDS_Wire wire = TopoDS::Wire(iter.Value()); + sfw->Load(wire); + sfw->FixReorder(); + sfw->FixShifted(); + } } } } // end processing each solid