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

Method lineTo

cadquery/cq.py:1553–1572  ·  view source on GitHub ↗

Make a line from the current point to the provided point :param x: the x point, in workplane plane coordinates :param y: the y point, in workplane plane coordinates :return: the Workplane object with the current point at the end of the new line See :meth:`l

(self: T, x: float, y: float, forConstruction: bool = False)

Source from the content-addressed store, hash-verified

1551 return n
1552
1553 def lineTo(self: T, x: float, y: float, forConstruction: bool = False) -> T:
1554 """
1555 Make a line from the current point to the provided point
1556
1557 :param x: the x point, in workplane plane coordinates
1558 :param y: the y point, in workplane plane coordinates
1559 :return: the Workplane object with the current point at the end of the new line
1560
1561 See :meth:`line` if you want to use relative dimensions to make a line instead.
1562 """
1563 startPoint = self._findFromPoint(False)
1564
1565 endPoint = self.plane.toWorldCoords((x, y))
1566
1567 p = Edge.makeLine(startPoint, endPoint)
1568
1569 if not forConstruction:
1570 self._addPendingEdge(p)
1571
1572 return self.newObject([p])
1573
1574 def bezier(
1575 self: T,

Callers 15

lineMethod · 0.95
vLineToMethod · 0.95
hLineToMethod · 0.95
polarLineToMethod · 0.95
testBasicLinesMethod · 0.95
test2DDrawingMethod · 0.95
testSplineShapeMethod · 0.95
test_bezier_curveMethod · 0.80
testRevolveConeMethod · 0.80
testRevolveErrorsMethod · 0.80
testSweepMethod · 0.80
testMultisectionSweepMethod · 0.80

Calls 5

_findFromPointMethod · 0.95
_addPendingEdgeMethod · 0.95
newObjectMethod · 0.95
toWorldCoordsMethod · 0.80
makeLineMethod · 0.80

Tested by 15

testBasicLinesMethod · 0.76
test2DDrawingMethod · 0.76
testSplineShapeMethod · 0.76
test_bezier_curveMethod · 0.64
testRevolveConeMethod · 0.64
testRevolveErrorsMethod · 0.64
testSweepMethod · 0.64
testMultisectionSweepMethod · 0.64
testTriangularPrismMethod · 0.64
testBoundingBoxMethod · 0.64
testSimpleMirrorMethod · 0.64
testTangentArcToPointMethod · 0.64