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

Method makeLine

cadquery/occ_impl/shapes.py:2850–2860  ·  view source on GitHub ↗

Create a line between two points :param v1: Vector that represents the first point :param v2: Vector that represents the second point :return: A linear edge between the two provided points

(cls, v1: VectorLike, v2: VectorLike)

Source from the content-addressed store, hash-verified

2848
2849 @classmethod
2850 def makeLine(cls, v1: VectorLike, v2: VectorLike) -> Edge:
2851 """
2852 Create a line between two points
2853
2854 :param v1: Vector that represents the first point
2855 :param v2: Vector that represents the second point
2856 :return: A linear edge between the two provided points
2857 """
2858 return cls(
2859 BRepBuilderAPI_MakeEdge(Vector(v1).toPnt(), Vector(v2).toPnt()).Edge()
2860 )
2861
2862 @classmethod
2863 def makeBezier(cls, points: list[Vector]) -> Edge:

Callers 15

finalize_hullFunction · 0.80
slotMethod · 0.80
segmentMethod · 0.80
solveMethod · 0.80
lineToMethod · 0.80
slot2DMethod · 0.80
polylineMethod · 0.80
closeMethod · 0.80
makeEllipseMethod · 0.80
_dxf_lineFunction · 0.80
testEdgeWrapperRadiusMethod · 0.80

Calls 2

VectorClass · 0.85
toPntMethod · 0.80

Tested by 9

testEdgeWrapperRadiusMethod · 0.64
test_hullFunction · 0.64
test_dxf_ellipse_arcFunction · 0.64
testMakeShellSolidMethod · 0.64
testLocationAtMethod · 0.64
testRadiusNthSelectorMethod · 0.64
test_constraint_getPlnFunction · 0.64