import unittest, math
from skdb.geom import *
from skdb import load_package, Package, close_enough
class TestMating(unittest.TestCase):
    def test_part_mating(self):
        lego_pack = Package("lego")
        brick1 = deepcopy([0])
        brick2 = deepcopy([0])
        #they should be the same thing so far
        #self.assertTrue(brick1 == brick2)
        options = brick1.options([brick2])
        #select one of the Connection instances to test with
        selected = options[1]
        blah = mate_connection(selected)
        #print blah #TopoDS shape (is this useful?)
        #not sure what to do with that. brick2 has already been transformed, brick2.transformation = some new transformation. 
        self.assertNotEqual(brick1.transformation, brick2.transformation)
        self.assertNotEqual(brick1, brick2)
    def test_lego_volume(self):
        pack = Package("lego")
        round_brick_volume = shape_volume([0].shapes[0])
        self.assertEqual(round(round_brick_volume), 865)
        brick1 = deepcopy([0])
        brick2 = deepcopy([0])
        options = brick1.options(brick2)
        option = options[0]
        print estimate_collision_existence([brick1, brick2])
if __name__ == "__main__":