Changes between Version 23 and Version 24 of PythonOcc
- Timestamp:
- Nov 5, 2012, 3:46:26 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PythonOcc
v23 v24 56 56 {{{ 57 57 #!python 58 def simple_test(event=None): 59 display.EraseAll() 60 display.Test() 61 def simple_cylinder(event=None): 58 def kocka(event=None): 59 from OCC.BRepPrimAPI import BRepPrimAPI_MakeBox 60 display.Erase.All() 61 my_box= BRepPrimAPI_MakeBox(10., 20., 30.) 62 display.DisplayShape(my_box.Shape()) 63 64 def valj(event=None): 62 65 from OCC.BRepPrimAPI import BRepPrimAPI_MakeCylinder 63 66 display.Erase.All() 64 s= BRepPrimAPI_MakeCylinder(60, 200)65 display.DisplayShape( s.Shape())67 my_cylinder = BRepPrimAPI_MakeCylinder(60, 200) 68 display.DisplayShape(my_cylinder.Shape()) 66 69 }}} 67 70 … … 69 72 {{{ 70 73 #!python 71 add_menu(' simple test')72 add_function_to_menu(' simple test',simple_test)73 add_function_to_menu(' simple test',simple_cylinder)74 add_menu('enostaven primer') 75 add_function_to_menu('enostaven primer', kocka) 76 add_function_to_menu('enostaven primer', valj) 74 77 }}} 75 78 … … 79 82 display.View_Iso() 80 83 display.FitAll() 81 # Zanka DISPLAY() je neskončna 82 start_display() 84 85 start_display() # Zanka start_display() je neskončna 83 86 }}} 84 87