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

Function spline

cadquery/occ_impl/shapes.py:6303–6313  ·  view source on GitHub ↗

Construct a spline from points.

(*pts: VectorLike, tol: float = 1e-6, periodic: bool = False)

Source from the content-addressed store, hash-verified

6301
6302@multimethod
6303def spline(*pts: VectorLike, tol: float = 1e-6, periodic: bool = False) -> Edge:
6304 """
6305 Construct a spline from points.
6306 """
6307
6308 data = _pts_to_harray(pts)
6309
6310 builder = GeomAPI_Interpolate(data, periodic, tol)
6311 builder.Perform()
6312
6313 return _shape(BRepBuilderAPI_MakeEdge(builder.Curve()).Edge(), Edge)
6314
6315
6316@multimethod

Callers 9

test_edge_paramsFunction · 0.90
test_extendFunction · 0.90
test_nurbs.pyFile · 0.85
test_ctrlPtsFunction · 0.85
test_splineFunction · 0.85
test_spline_paramsFunction · 0.85
test_sweepFunction · 0.85
test_sweep_auxFunction · 0.85

Calls 4

_pts_to_harrayFunction · 0.85
_shapeFunction · 0.85
_floats_to_harrayFunction · 0.85
VectorClass · 0.85

Tested by 8

test_edge_paramsFunction · 0.72
test_extendFunction · 0.72
test_ctrlPtsFunction · 0.68
test_splineFunction · 0.68
test_spline_paramsFunction · 0.68
test_sweepFunction · 0.68
test_sweep_auxFunction · 0.68