Exemplo n.º 1
0
def geom_plate(event=None):
    p1,p2,p3,p4,p5 = gp_Pnt(0,0,0),gp_Pnt(0,100,0),gp_Pnt(0,100,100),gp_Pnt(0,0,100),gp_Pnt(50,50,50)
    poly = make_closed_polygon([p1,p2,p3,p4])
    edges = [i for i in Topo(poly).edges()]
    face = make_n_sided(edges, [p5])
    my_renderer = webgl_renderer.WebGlRenderer()
    my_renderer.DisplayShape(face)
Exemplo n.º 2
0
def geom_plate(event=None):
    p1,p2,p3,p4,p5 = gp_Pnt(0,0,0),gp_Pnt(0,100,0),gp_Pnt(0,100,100),gp_Pnt(0,0,100),gp_Pnt(50,50,50)
    poly = make_closed_polygon([p1,p2,p3,p4])
    edges = [i for i in Topo(poly).edges()]
    face = make_n_sided(edges, [p5])
    my_renderer = webgl_renderer.WebGlRenderer()
    my_renderer.DisplayShape(face)
Exemplo n.º 3
0
def solve_radius(event=None):
    p1,p2,p3,p4,p5 = gp_Pnt(0,0,0),gp_Pnt(0,10,0),gp_Pnt(0,10,10),gp_Pnt(0,0,10),gp_Pnt(5,5,5)
    poly = make_closed_polygon([p1,p2,p3,p4])
    for i in arange(0.1,3.,0.2).tolist():
        rcs = RadiusConstrainedSurface(display, poly, p5, i )
        face = rcs.solve()
        print 'Goal: %s radius: %s' % ( i, rcs.curr_radius )
        time.sleep(0.5)
Exemplo n.º 4
0
def solve_radius(event=None):
    p1,p2,p3,p4,p5 = gp_Pnt(0,0,0),gp_Pnt(0,10,0),gp_Pnt(0,10,10),gp_Pnt(0,0,10),gp_Pnt(5,5,5)
    poly = make_closed_polygon([p1,p2,p3,p4])
    for i in arange(0.1,3.,0.2).tolist():
        rcs = RadiusConstrainedSurface(display, poly, p5, i )
        face = rcs.solve()
        print 'Goal: %s radius: %s' % ( i, rcs.curr_radius )
        time.sleep(0.5)
Exemplo n.º 5
0
def geom_plate(event=None):
    display.EraseAll()
    p1,p2,p3,p4,p5 = gp_Pnt(0,0,0),gp_Pnt(0,10,0),gp_Pnt(0,10,10),gp_Pnt(0,0,10),gp_Pnt(5,5,5)
    poly = make_closed_polygon([p1,p2,p3,p4])
    edges = [i for i in Topo(poly).edges()]
    face = make_n_sided(edges, [p5])
    display.DisplayShape(edges)
    display.DisplayShape(make_vertex(p5))
    display.DisplayShape(face, update=True)
Exemplo n.º 6
0
def geom_plate(event=None):
    display.EraseAll()
    p1,p2,p3,p4,p5 = gp_Pnt(0,0,0),gp_Pnt(0,10,0),gp_Pnt(0,10,10),gp_Pnt(0,0,10),gp_Pnt(5,5,5)
    poly = make_closed_polygon([p1,p2,p3,p4])
    edges = [i for i in Topo(poly).edges()]
    face = make_n_sided(edges, [p5])
    display.DisplayShape(edges)
    display.DisplayShape(make_vertex(p5))
    display.DisplayShape(face, update=True)