Creating a wire

I'm trying to import NURBS surfaces into OpenCascade from Rhino3dm through PyOCCT. I have been able to create Faces with BSplinesurfaces and wires the majority of the surfaces, but some of the wires cannot be created. I'm using BRepBuilderAPI_MakeWire, where I insert edges into and when i visualize the edges they seem form a nicely closed loop. When i try to create the wire i get the following "BRep_API: command not done"

I want to use the ShapeFix command, but it seems to take the input of TopoDS_wire, which i cannot create since my wire is incomplete.

Am i missing something here?

Best regards
Jesper

Jesper Pedersen's picture

I made it work by inserting the edges into BRepbuilder in the right order.