Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /usr/bin/python -i
import sys
sys.path+=['.']
from oe import *
root = cvar.root
import os
os.chdir('build')
def changeDocument(doc): # DO NOT RUN, SEGFAULT
#if root.document:
# del root.document
#if root.document:
# del root.document
root.document = doc
root.editDisplay.setDocument(root.document)
root.commandDisplay.setDocument(root.document)
root.controller = OE_controller(root.display, root.document)
root.commandDisplay.setController(root.controller)
def addAction(newAct):
root.controller.addAction(newAct)
newAct.thisown = False
def getCurve(n):
return root.controller.getCurve(n)
def newSubCurve(ncurve, start, end, reverse):
addAction(OE_actionNewSubCurve(getCurve(ncurve), start, end, reverse))
def newBirailStitch(ncurve1, ncurve2, reverse1, reverse2, offset1, offset2, len_):
addAction(OE_actionNewBirailStitch(getCurve(ncurve1), getCurve(ncurve2), reverse1, reverse2, offset1, offset2, len_))
def testLogo2():
root.document.setZeroPoint(vector_2d(0,1050))
#newSubCurve(14, 3, 0, True)
#newSubCurve(14, 1, 2, False)
#newBirailStitch(-1, -2, False, False, -0.2, -0.2, 0.5)
root.controller.newSubCurve(14,3,0,True)
root.controller.newSubCurve(14,1,2,False)
root.controller.newBirailStitch(-1, -2, False, False, -0.2, -0.2, 0.5)