Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions cadquery/sketch.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,8 @@ def arc(
) -> T:
"""
Construct an arc.

The arc starts at p1, passes through p2 and ends at p3.
"""

val = Edge.makeThreePointArc(Vector(p1), Vector(p2), Vector(p3))
Expand All @@ -876,6 +878,10 @@ def arc(
tag: Optional[str] = None,
forConstruction: bool = False,
) -> T:
"""
Construct an arc starting at the end of the last edge, passing through p2
and ending at p3.
"""

p1 = self._endPoint()
val = Edge.makeThreePointArc(Vector(p1), Vector(p2), Vector(p3))
Expand All @@ -892,6 +898,15 @@ def arc(
tag: Optional[str] = None,
forConstruction: bool = False,
) -> T:
"""
Construct an arc from its center, radius and angles.

:param c: Center.
:param r: Radius.
:param a: Start angle in degrees, measured counter-clockwise from the x axis.
:param da: Angle spanned by the arc in degrees, counter-clockwise if positive
and clockwise if negative. A full circle is made if ``abs(da) >= 360``.
"""

if abs(da) >= 360:
val = Edge.makeCircle(r, Vector(c), angle1=a, angle2=a, orientation=da > 0)
Expand Down