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

Method polarLine

cadquery/cq.py:1666–1679  ·  view source on GitHub ↗

Make a line of the given length, at the given angle from the current point :param distance: distance of the end of the line from the current point :param angle: angle of the vector to the end of the line with the x-axis :return: the Workplane object with the current

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

Source from the content-addressed store, hash-verified

1664 return self.lineTo(xCoord, p.y, forConstruction)
1665
1666 def polarLine(
1667 self: T, distance: float, angle: float, forConstruction: bool = False
1668 ) -> T:
1669 """
1670 Make a line of the given length, at the given angle from the current point
1671
1672 :param distance: distance of the end of the line from the current point
1673 :param angle: angle of the vector to the end of the line with the x-axis
1674 :return: the Workplane object with the current point at the end of the new line
1675 """
1676 x = math.cos(math.radians(angle)) * distance
1677 y = math.sin(math.radians(angle)) * distance
1678
1679 return self.line(x, y, forConstruction)
1680
1681 def polarLineTo(
1682 self: T, distance: float, angle: float, forConstruction: bool = False

Callers 2

testPolarLinesMethod · 0.95
testPolarArrayMethod · 0.80

Calls 1

lineMethod · 0.95

Tested by 2

testPolarLinesMethod · 0.76
testPolarArrayMethod · 0.64