I am just getting started, and have been looking at some of the exampls
etc... So to draw a line, you would do this:

def test5():
    ''' Test creating a line segment''
    display, start_display, add_menu, add_function_to_menu = init_display()

    from OCC.gp import gp_Pnt, gp_Dir
    from OCC.Geom import Geom_Line
    from OCC.BRepBuilderAPI import BRepBuilderAPI_MakeEdge
    p1 = gp_Pnt(0,0,0)
    line_dir = gp_Dir(1,1,0)
    my_line = Geom_Line(p1, line_dir).Lin()
    my_line = BRepBuilderAPI_MakeEdge(my_line)
    my_line.Build()
    my_line = my_line.Shape()
    display.DisplayShape(my_line)

    display.View_Iso()
    display.FitAll()
    start_display()


Is there a simpler way?
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Patrick
_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to