#include <TDataStd_ListIteratorOfListOfExtendedString.hxx>
#include <TDataStd_RealList.hxx>
+#include <TopoDS_Iterator.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
-
+#include <TopTools_HSequenceOfShape.hxx>
+#include <ShapeAnalysis_FreeBounds.hxx>
+#include <TopoDS.hxx>
#include <QColor>
#include <QPainterPath>
#include <QVariant>
aMakeWire.Add( aSectionWire );
}
}
+// all input wires in the <aSectionWiresList>
+ Handle(TopTools_HSequenceOfShape) aSeqWires = new TopTools_HSequenceOfShape;
+ Handle(TopTools_HSequenceOfShape) aSeqEdges = new TopTools_HSequenceOfShape;
+ TopTools_ListIteratorOfListOfShape it(aSectionWiresList);
+ for(;it.More();it.Next()) {
+ TopoDS_Iterator it2(it.Value());
+ for(;it2.More();it2.Next())
+ aSeqEdges->Append(it2.Value());
+ }
+ BRep_Builder aBB;
+ TopoDS_Compound aCmp;
+ aBB.MakeCompound(aCmp);
+ if(aSeqEdges->Length() >1) {
+ ShapeAnalysis_FreeBounds::ConnectEdgesToWires(aSeqEdges,Precision::Confusion(),Standard_True,aSeqWires);
+ for (Standard_Integer i = 1; i <= aSeqWires->Length();i++) {
+ const TopoDS_Shape& aS1 = aSeqWires->Value(i);
+ aBB.Add(aCmp, aS1);
+ }
+ } else if (aSeqEdges->Length() == 1) {
+ BRepBuilderAPI_MakeWire mkWire (TopoDS::Edge(aSeqEdges->Value(1)));
+ if (mkWire.IsDone())
+ aBB.Add(aCmp, mkWire.Wire());
+ }
- TopoDS_Shape aShape;
-
+
+/*
if ( aMakeWire.IsDone() )
{
aShape = aMakeWire.Shape();
aShape = aCompound;
}
-
- setPolylineShape( aShape );
+*/
+ setPolylineShape( aCmp );
}
/**