TColStd_SequenceOfReal TolSeq;
GeomAbs_CurveType CurType;
TopoDS_Vertex FirstVertex, LastVertex;
- Standard_Boolean FinalReverse = Standard_False;
BRepTools_WireExplorer wexp(theWire) ;
for (; wexp.More(); wexp.Next())
LparSeq.Append(lpar);
CurType = aType;
FirstVertex = wexp.CurrentVertex();
- if (anEdge.Orientation() == TopAbs_REVERSED)
- FinalReverse = Standard_True;
}
else
{
LastVertex = wexp.CurrentVertex();
TolSeq.Append(BRep_Tool::Tolerance(LastVertex));
- TopoDS_Vertex FirstVtx_final = (FinalReverse)? LastVertex : FirstVertex;
- FirstVtx_final.Orientation(TopAbs_FORWARD);
- TopoDS_Vertex LastVtx_final = (FinalReverse)? FirstVertex : LastVertex;
- LastVtx_final.Orientation(TopAbs_REVERSED);
+ FirstVertex.Orientation(TopAbs_FORWARD);
+ LastVertex.Orientation(TopAbs_REVERSED);
if (!CurveSeq.IsEmpty())
{
Standard_ConstructionError::Raise("Construction aborted : The given Wire has sharp bends between some Edges, no valid Edge can be built");
}
ResEdge = BRepLib_MakeEdge(concatcurve->Value(concatcurve->Lower()),
- FirstVtx_final, LastVtx_final,
+ FirstVertex, LastVertex,
concatcurve->Value(concatcurve->Lower())->FirstParameter(),
concatcurve->Value(concatcurve->Lower())->LastParameter());
}
aNewCurve->Transform(LocSeq(1).Location().Transformation());
ResEdge = BRepLib_MakeEdge(aNewCurve,
- FirstVtx_final, LastVtx_final,
+ FirstVertex, LastVertex,
FparSeq(1), LparSeq(1));
}
}
- if (FinalReverse)
- ResEdge.Reverse();
-
return ResEdge;
}