close a wire

I have a topods_wire that looks closed, but it is not actually closed.
Is there any way to make it closed?

Roman Lygin's picture

Hi Tony,

ShapeFix_Wire may be your help.

TopoDS_Wire aWire = ...;
Handle(ShapeFix_Wire) aFWire = new ShapeFix_Wire (aWire);
aFWire->FixReorder(); //mandatory to call 1st
aFWire->FixConnected(); //to ensure vertices are shared btw edges
TopoDS_Wire aNewWire = aFWire->Wire();


sushilkumar vijay thamke's picture

Hi Roman. I have a TopoDS_Wire which is obtained from a shape by getting all the edges and joining them to form a wire. But the wire formed is not completely connected, it has two disconnectivities and i need the wire to be completely connected. I have used fixed reorder and fix connected also but it is not working for me. How can i do that? Any help would be deeply appreciated.Attached is the code which i am using to get the wire and to fix it. Thanks

sushilkumar vijay thamke's picture

Hi all. what does ShapeAnalysis_Wire::CheckConnected(const Standard_Real prec) do. It is returning false even though i have a wire which is disconnected at two places. what is the mistake iam doing .? is it something related to precission?
please help