diff --git a/pylele_tail.py b/pylele_tail.py old mode 100644 new mode 100755 index f2babfed..485f553d --- a/pylele_tail.py +++ b/pylele_tail.py @@ -14,9 +14,15 @@ class LeleTail(LeleBase): def gen(self) -> Shape: """ Generate Tail """ + assert self.cli.separate_end + cfg = self.cfg joinTol = cfg.joinCutTol cutAdj = (FIT_TOL + 2*joinTol) if self.isCut else 0 + + # this assertion should be verified + assert self.cli.end_flat_width > 4.0 + 2*cutAdj, 'end_flat_width too small! %f, should be larger than %f' % (self.cli.end_flat_width, 4+2*cutAdj) + tailX = cfg.tailX chmBackX = cfg.scaleLen + cfg.chmBack tailLen = tailX - chmBackX + 2*cutAdj @@ -60,9 +66,9 @@ def test_tail(): component = 'tail' tests = { - 'cut' : ['-C'], - 'cadquery': ['-i','cadquery'], - 'blender' : ['-i','blender'] + 'cut' : ['-E','-e','10','-C'], + 'cadquery': ['-E','-e','4.3','-i','cadquery'], + 'blender' : ['-E','-e','4.3','-i','blender'] } for test,args in tests.items(): diff --git a/pylele_test.py b/pylele_test.py index 22b492ac..ccd55bba 100755 --- a/pylele_test.py +++ b/pylele_test.py @@ -36,6 +36,7 @@ from pylele_texts import test_texts from pylele_rim import test_rim from pylele_worm_key import test_worm_key +from pylele_tail import test_tail # assemblies from pylele_nut_assembly import test_nut_assembly @@ -159,6 +160,10 @@ def test_worm_key(self): """ Test Worm Key """ test_worm_key() + def test_tail(self): + """ Test Tail """ + test_tail() + ## Assemblies def test_nut_assembly(self):