MCPcopy Index your code
hub / github.com/CadQuery/cadquery / test_line_from_vertex

Method test_line_from_vertex

tests/test_cadquery.py:5911–5921  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5909 )
5910
5911 def test_line_from_vertex(self):
5912
5913 # select one vertex and create an Edge
5914 res = Workplane().rect(1, 1).vertices(">(1,1,0)").line(1, 0)
5915
5916 # check if an Edge was created
5917 assert isinstance(res.val(), Edge)
5918
5919 # check that errors are handled
5920 with raises(ValueError):
5921 Workplane().box(1, 1, 1).line(1, 0)

Callers

nothing calls this directly

Calls 6

WorkplaneClass · 0.85
lineMethod · 0.80
boxMethod · 0.80
verticesMethod · 0.45
rectMethod · 0.45
valMethod · 0.45

Tested by

no test coverage detected