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

Method threePointArc

cadquery/cq.py:2087–2114  ·  view source on GitHub ↗

Draw an arc from the current point, through point1, and ending at point2 :param point1: point to draw through :type point1: 2-tuple, in workplane coordinates :param point2: end point for the arc :type point2: 2-tuple, in workplane coordinates :return

(
        self: T, point1: VectorLike, point2: VectorLike, forConstruction: bool = False,
    )

Source from the content-addressed store, hash-verified

2085 return self.newObject([rv_w if makeWire else e])
2086
2087 def threePointArc(
2088 self: T, point1: VectorLike, point2: VectorLike, forConstruction: bool = False,
2089 ) -> T:
2090 """
2091 Draw an arc from the current point, through point1, and ending at point2
2092
2093 :param point1: point to draw through
2094 :type point1: 2-tuple, in workplane coordinates
2095 :param point2: end point for the arc
2096 :type point2: 2-tuple, in workplane coordinates
2097 :return: a workplane with the current point at the end of the arc
2098
2099 Future Enhancements:
2100 provide a version that allows an arc using relative measures
2101 provide a centerpoint arc
2102 provide tangent arcs
2103 """
2104
2105 gstartPoint = self._findFromPoint(False)
2106 gpoint1 = self.plane.toWorldCoords(point1)
2107 gpoint2 = self.plane.toWorldCoords(point2)
2108
2109 arc = Edge.makeThreePointArc(gstartPoint, gpoint1, gpoint2)
2110
2111 if not forConstruction:
2112 self._addPendingEdge(arc)
2113
2114 return self.newObject([arc])
2115
2116 def sagittaArc(
2117 self: T, endPoint: VectorLike, sag: float, forConstruction: bool = False,

Callers 11

sagittaArcMethod · 0.95
testSweepMethod · 0.80
testMultisectionSweepMethod · 0.80
testBoundingBoxMethod · 0.80
test2DDrawingMethod · 0.80
testOccBottleMethod · 0.80
testSimpleMirrorMethod · 0.80
testCloseMethod · 0.80
Ex023_Sweep.pyFile · 0.80

Calls 5

_findFromPointMethod · 0.95
_addPendingEdgeMethod · 0.95
newObjectMethod · 0.95
toWorldCoordsMethod · 0.80
makeThreePointArcMethod · 0.80

Tested by 7

testSweepMethod · 0.64
testMultisectionSweepMethod · 0.64
testBoundingBoxMethod · 0.64
test2DDrawingMethod · 0.64
testOccBottleMethod · 0.64
testSimpleMirrorMethod · 0.64
testCloseMethod · 0.64