示例#1
0
def checkone(knots, refpoints):  # <<<
    print(myprint(knots))
    mp_make_choices(knots, epsilon)
    print(myprint(knots))

    c = canvas.canvas()
    c.stroke(mypath(knots), [deco.shownormpath(), deco.earrow.normal])
    c.writePDFfile(bboxenlarge=unit.t_cm)
    c.writeEPSfile(bboxenlarge=unit.t_cm)
    c.writeSVGfile(bboxenlarge=unit.t_cm)

    check(knots, refpoints)
示例#2
0
def checkone(knots, refpoints): # <<<
    print(myprint(knots))
    mp_make_choices(knots, epsilon)
    print(myprint(knots))

    c = canvas.canvas()
    c.stroke(mypath(knots), [deco.shownormpath(), deco.earrow.normal])
    c.writePDFfile(bboxenlarge=unit.t_cm)
    c.writeEPSfile(bboxenlarge=unit.t_cm)
    c.writeSVGfile(bboxenlarge=unit.t_cm)

    check(knots, refpoints)
示例#3
0
def checkall(): # <<<
    c = None
    for knots, refpoints in [curve1(), curve2(), curve3(),
                             curve4(-90), curve4(0), curve4(70), curve5(),
                             curve6a(), curve6b(), curve6c(), curve7(),
                             curve8a(), curve8b(), curve9(), curve10()]:
        #print myprint(knots)
        mp_make_choices(knots, epsilon)
        #print myprint(knots)

        cc = canvas.canvas()
        cc.stroke(mypath(knots), [deco.shownormpath(), deco.earrow.normal])
        if c is None:
            c = canvas.canvas()
            c.insert(cc)
        else:
            c.insert(cc, [trafo.translate(0, c.bbox().bottom() - cc.bbox().top()-0.5)])

        check(knots, refpoints)
    c.writePDFfile()
    c.writeEPSfile()
    c.writeSVGfile()
示例#4
0
def checkall():  # <<<
    c = None
    for knots, refpoints in [
            curve1(),
            curve2(),
            curve3(),
            curve4(-90),
            curve4(0),
            curve4(70),
            curve5(),
            curve6a(),
            curve6b(),
            curve6c(),
            curve7(),
            curve8a(),
            curve8b(),
            curve9(),
            curve10()
    ]:
        #print myprint(knots)
        mp_make_choices(knots, epsilon)
        #print myprint(knots)

        cc = canvas.canvas()
        cc.stroke(mypath(knots), [deco.shownormpath(), deco.earrow.normal])
        if c is None:
            c = canvas.canvas()
            c.insert(cc)
        else:
            c.insert(cc, [
                trafo.translate(0,
                                c.bbox().bottom() - cc.bbox().top() - 0.5)
            ])

        check(knots, refpoints)
    c.writePDFfile()
    c.writeEPSfile()
    c.writeSVGfile()