Updated to work with 0.13

- This is _totally_ experimental, and I haven't done exhaustive
   tests
 - 88 unit tests do pass though, and I added a new import test.
 - 0.12 and 0.13 seem to structure stuff a bit differently,
   probably due to changes in the FreeCAD lib wrappers.
 - Not tested on windows (but should work) or 0.12. Need some
   help there.
This commit is contained in:
Derek Anderson
2013-04-27 23:49:41 -07:00
parent 8089ef1e04
commit c3290fca92
9 changed files with 265 additions and 95 deletions

View File

@ -3,9 +3,15 @@ import sys
import unittest
from tests import BaseTest
import FreeCAD
from cadquery.freecad_impl.verutil import fc_import
FreeCAD = fc_import("FreeCAD")
if not hasattr(FreeCAD, 'Part'):
FreeCAD.Part = fc_import("FreeCAD.Part")
from cadquery import *
class TestCadObjects(BaseTest):
def testVectorConstructors(self):
@ -57,6 +63,6 @@ class TestCadObjects(BaseTest):
def testVertices(self):
e = Shape.cast(FreeCAD.Part.makeLine((0,0,0),(1,1,0)))
self.assertEquals(2,len(e.Vertices()))
if __name__ == '__main__':
unittest.main()
unittest.main()