pythonocc-core icon indicating copy to clipboard operation
pythonocc-core copied to clipboard

SimpleGui visualization failed

Open whjdark opened this issue 3 years ago • 2 comments

I used SimpleGui to visualize a shape. `display, start_display, add_menu, add_function_to_menu = init_display()

ais_shp = AIS_ColoredShape(shape)
for face in bottom_map.keys():
    if bottom_map[face]:
        ais_shp.SetCustomColor(face, rgb_color(0,1,0))

display.Context.Display(ais_shp, True)
display.FitAll()

start_display()`

Howerver, i got a wrong visualization, which lost a lot of faces. 2KG8 CMB @`UN3$ZC@_1FV I tried to save the step file and used STP viewer to visualize. The visualization was correct. PFHK%HH)@A%GHF6XTB)U~ZJ

whjdark avatar Nov 14 '22 06:11 whjdark

Have you tried this?

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

display.DisplayShape(shape)
display.FitAll()
start_display()

Tanneguydv avatar Mar 13 '23 20:03 Tanneguydv

Have you tried this?

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

display.DisplayShape(shape)
display.FitAll()
start_display()

Thank you for your reply. I'm wondering how to display a 3D model with white surface and black edge lines using SimpleGui, and also how to adjust line width. Looking forward to your reply. Thank you very much.

di-huang avatar May 27 '23 21:05 di-huang