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

Method line

cadquery/cq.py:1608–1620  ·  view source on GitHub ↗

Make a line from the current point to the provided point, using dimensions relative to the current point :param xDist: x distance from current point :param yDist: y distance from current point :return: the workplane object with the current point at the end o

(self: T, xDist: float, yDist: float, forConstruction: bool = False)

Source from the content-addressed store, hash-verified

1606
1607 # line a specified incremental amount from current point
1608 def line(self: T, xDist: float, yDist: float, forConstruction: bool = False) -> T:
1609 """
1610 Make a line from the current point to the provided point, using
1611 dimensions relative to the current point
1612
1613 :param xDist: x distance from current point
1614 :param yDist: y distance from current point
1615 :return: the workplane object with the current point at the end of the new line
1616
1617 see :meth:`lineTo` if you want to use absolute coordinates to make a line instead.
1618 """
1619 p = self._findFromPoint(True) # return local coordinates
1620 return self.lineTo(p.x + xDist, yDist + p.y, forConstruction)
1621
1622 def vLine(self: T, distance: float, forConstruction: bool = False) -> T:
1623 """

Callers 11

vLineMethod · 0.95
hLineMethod · 0.95
polarLineMethod · 0.95
test_mirror_faceMethod · 0.80
test_lineMethod · 0.80
test_add_shape_lineMethod · 0.80
testCleanMethod · 0.80
testNoCleanMethod · 0.80
testExplicitCleanMethod · 0.80
test_line_from_vertexMethod · 0.80

Calls 2

_findFromPointMethod · 0.95
lineToMethod · 0.95

Tested by 8

test_mirror_faceMethod · 0.64
test_lineMethod · 0.64
test_add_shape_lineMethod · 0.64
testCleanMethod · 0.64
testNoCleanMethod · 0.64
testExplicitCleanMethod · 0.64
test_line_from_vertexMethod · 0.64