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

Method polarLineTo

cadquery/cq.py:1681–1697  ·  view source on GitHub ↗

Make a line from the current point to the given polar coordinates Useful if it is more convenient to specify the end location rather than the distance and angle from the current point :param distance: distance of the end of the line from the origin :param a

(
        self: T, distance: float, angle: float, forConstruction: bool = False
    )

Source from the content-addressed store, hash-verified

1679 return self.line(x, y, forConstruction)
1680
1681 def polarLineTo(
1682 self: T, distance: float, angle: float, forConstruction: bool = False
1683 ) -> T:
1684 """
1685 Make a line from the current point to the given polar coordinates
1686
1687 Useful if it is more convenient to specify the end location rather than
1688 the distance and angle from the current point
1689
1690 :param distance: distance of the end of the line from the origin
1691 :param angle: angle of the vector to the end of the line with the x-axis
1692 :return: the Workplane object with the current point at the end of the new line
1693 """
1694 x = math.cos(math.radians(angle)) * distance
1695 y = math.sin(math.radians(angle)) * distance
1696
1697 return self.lineTo(x, y, forConstruction)
1698
1699 # absolute move in current plane, not drawing
1700 def moveTo(self: T, x: float = 0, y: float = 0) -> T:

Callers 1

testPolarLinesMethod · 0.80

Calls 1

lineToMethod · 0.95

Tested by 1

testPolarLinesMethod · 0.64