#include <BRepBuilderAPI_Transform.hxx>
#include <BRepBuilderAPI_Copy.hxx>
#include <TopTools_SequenceOfShape.hxx>
+#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <BRepLib.hxx>
#include <Geom2dAdaptor_HCurve.hxx>
{
TopExp_Explorer Explo(aShape, TopAbs_FACE);
BRep_Builder BB;
+
for (; Explo.More(); Explo.Next())
{
TopoDS_Shape aFace = Explo.Current();
for (; itf.More(); itf.Next())
{
TopoDS_Shape aWire = itf.Value();
- TopTools_SequenceOfShape ModEdges;
+ TopTools_ListOfShape Ledges;
TopoDS_Iterator itw(aWire);
for (; itw.More(); itw.Next())
- {
- TopoDS_Shape anEdge = itw.Value();
- if (Emap.Contains(anEdge))
- ModEdges.Append(anEdge);
- }
+ Ledges.Append(itw.Value());
+
aWire.Free(Standard_True);
- for (Standard_Integer ii = 1; ii <= ModEdges.Length(); ii++)
+ TopTools_ListIteratorOfListOfShape itl(Ledges);
+ for (; itl.More(); itl.Next())
+ BB.Remove(aWire, itl.Value());
+
+ for (itl.Initialize(Ledges); itl.More(); itl.Next())
{
- BB.Remove(aWire, ModEdges(ii));
- BB.Add(aWire, ModEdges(ii).Reversed());
+ TopoDS_Shape anEdge = itl.Value();
+ if (Emap.Contains(anEdge))
+ anEdge.Reverse();
+ BB.Add(aWire, anEdge);
}
}
}
if (!theLoc.IsIdentity())
{
TopoDS_Shape NewMyFirst = BRepBuilderAPI_Copy(myFirst);
+ RemLoc.Remove(NewMyFirst);
+ NewMyFirst = RemLoc.GetResult();
TopLoc_Location theIdentity;
NewMyFirst.Location(theIdentity);
- myFirst = BRepBuilderAPI_Transform(NewMyFirst, theLoc.Transformation());
+ myFirst = BRepBuilderAPI_Transform(NewMyFirst, theLoc.Transformation(), Standard_True);
}
myLoc->Law(myLoc->NbLaw())->GetDomain(first, last);
if (!theLoc.IsIdentity())
{
TopoDS_Shape NewMyLast = BRepBuilderAPI_Copy(myLast);
+ RemLoc.Remove(NewMyLast);
+ NewMyLast = RemLoc.GetResult();
TopLoc_Location theIdentity;
NewMyLast.Location(theIdentity);
- myLast = BRepBuilderAPI_Transform(NewMyLast, theLoc.Transformation());
+ myLast = BRepBuilderAPI_Transform(NewMyLast, theLoc.Transformation(), Standard_True);
}
#if DRAW