MCPcopy
hub / github.com/CadQuery/cadquery / test_axis_constraint

Function test_axis_constraint

tests/test_assembly.py:2291–2302  ·  view source on GitHub ↗
(simple_assy2)

Source from the content-addressed store, hash-verified

2289
2290
2291def test_axis_constraint(simple_assy2):
2292
2293 assy = simple_assy2
2294
2295 assy.constrain("b1@faces@>Z", "b2@faces@>Z", "Axis", 0)
2296 assy.constrain("b1@faces@>X", "b2@faces@>X", "Axis", 45)
2297
2298 assy.solve()
2299
2300 q2 = assy.children[1].loc.wrapped.Transformation().GetRotation()
2301
2302 assert degrees(q2.GetRotationAngle()) == pytest.approx(45)
2303
2304
2305def test_point_constraint(simple_assy2):

Callers

nothing calls this directly

Calls 2

constrainMethod · 0.45
solveMethod · 0.45

Tested by

no test coverage detected