From eac09dcfb0f901ee9bf4c0ced403b23cb647d387 Mon Sep 17 00:00:00 2001 From: jfa Date: Tue, 10 Jul 2007 12:49:48 +0000 Subject: [PATCH] Fix bug 15646: Problem with GlueFaces operation. Correct for WIREs. --- src/GEOMAlgo/GEOMAlgo_Gluer.cxx | 49 +++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer.cxx b/src/GEOMAlgo/GEOMAlgo_Gluer.cxx index 0d1b7707c..e2f2c9a69 100755 --- a/src/GEOMAlgo/GEOMAlgo_Gluer.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Gluer.cxx @@ -417,6 +417,55 @@ void GEOMAlgo_Gluer::MakeSubShapes (const TopoDS_Shape& theShape, // aBB.Add(theResult, aNewSolid); } + else if (theShape.ShapeType() == TopAbs_WIRE) + { + if (myKeepNonSolids) + { + // just add image + if (!myOrigins.IsBound(theShape)) + { + // build wire + const TopoDS_Wire& aW=TopoDS::Wire(theShape); + // + TopoDS_Wire newWire; + aBB.MakeWire(newWire); + // + TopExp_Explorer aExpE (aW, TopAbs_EDGE); + for (; aExpE.More(); aExpE.Next()) { + const TopoDS_Edge& aE=TopoDS::Edge(aExpE.Current()); + TopoDS_Edge aER=TopoDS::Edge(myOrigins.Find(aE)); + // + aER.Orientation(TopAbs_FORWARD); + if (!BRep_Tool::Degenerated(aER)) { + // build p-curve + //if (bIsUPeriodic) { + // GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax); + //} + //BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aER, aFFWD); + // + // orient image + Standard_Boolean bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aER, aE, myContext); + if (bIsToReverse) { + aER.Reverse(); + } + } + else { + aER.Orientation(aE.Orientation()); + } + // + aBB.Add(newWire, aER); + } + // xf + TopTools_ListOfShape aLW; + // + aLW.Append(aW); + myImages.Bind(newWire, aLW); + myOrigins.Bind(aW, newWire); + } + const TopoDS_Shape& aShapeR = myOrigins.Find(theShape); + aBB.Add(theResult, aShapeR); + } + } else { if (myKeepNonSolids) -- 2.39.2