Import problem with STEP file from solid works

Hi all,

I try to import and preview a toroidal surface with trim wire from a step file created with Solid works. I use python OCC and the Qt viewer interface provided with it.

The basis geometry of the toroidal surface is good but the trimming don't work. When I import the file to solid works, all works fine. If I reverse the wire, the trimming seems to work.

Has anyone got this kind of problem ? I don't know if there is a problem in solid works export, OCC import or if I have a error in my code.


jelle's picture

Perhaps you could post the code generating the shape?

qvirol's picture

Yep, here my code :
Other shapes are displayed correctly, I have just a problem with a toroidal surface.

reader = STEPCAFControl_Reader()

document = TDocStd_Document(TCollection_ExtendedString("STEP"))

if XCAFDoc_DocumentTool.IsXCAFDocument(document.GetHandle()):
print "doc is ok !"

rootNode = XCAFDoc_DocumentTool.ShapesLabel(document.Main())

from OCC.Display.SimpleGui import *
display, start_display, add_menu, add_function_to_menu = init_display()

rootChildren = TDF_ChildIterator(rootNode)
currentNode = rootChildren.Value()
shape = TopoDS_Shape()
XCAFDoc_ShapeTool.GetShape(currentNode, shape)
shapes = [shape]

display.DisplayColoredShape([topoSphere], 'RED')

I can attach the step file if needed.