def test_shifted_sketch(self): sketch = Sketch() var1 = sketch.add_variable_point() var2 = sketch.add_point((2.0, 3.0, 4.0)) sketch.add_alignment_constraint(var1, var2, 0, 2.0) sketch.add_alignment_constraint(var1, var2, 1, 3.0) sketch.add_alignment_constraint(var1, var2, 2, 4.0) self.assertTrue(sketch.is_constrained)
def test_simple_sketch(self): sketch = Sketch() var1 = sketch.add_variable_point() var2 = sketch.add_point((2.0, 3.0, 4.0)) # make the points align sketch.add_alignment_constraint(var1, var2, 0, 0.0) sketch.add_alignment_constraint(var1, var2, 1, 0.0) sketch.add_alignment_constraint(var1, var2, 2, 0.0) self.assertTrue(sketch.is_constrained)
def test_sketch_one_point_variable(self): sketch = Sketch() sketch.add_point((0.0, 0.0, 0.0)) sketch.add_variable_point() self.assertFalse(sketch.is_constrained)