Changes between Version 23 and Version 24 of PythonOcc


Ignore:
Timestamp:
Nov 5, 2012, 3:46:26 PM (12 years ago)
Author:
skulovec
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PythonOcc

    v23 v24  
    5656{{{
    5757#!python
    58 def simple_test(event=None):
    59     display.EraseAll()
    60     display.Test()
    61 def simple_cylinder(event=None):
     58def 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
     64def valj(event=None):
    6265    from OCC.BRepPrimAPI import BRepPrimAPI_MakeCylinder
    6366    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())
    6669}}}
    6770
     
    6972{{{
    7073#!python       
    71 add_menu('simple test')
    72 add_function_to_menu('simple test',simple_test)
    73 add_function_to_menu('simple test',simple_cylinder)
     74add_menu('enostaven primer')
     75add_function_to_menu('enostaven primer', kocka)
     76add_function_to_menu('enostaven primer', valj)
    7477}}}
    7578
     
    7982display.View_Iso()
    8083display.FitAll()
    81 # Zanka DISPLAY() je neskončna
    82 start_display()
     84
     85start_display() # Zanka start_display() je neskončna
    8386}}}
    8487