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

Method spline

cadquery/sketch.py:908–926  ·  view source on GitHub ↗

Construct a spline edge.

(
        self: T,
        pts: Iterable[Point],
        tangents: Optional[Iterable[Point]],
        periodic: bool,
        tag: Optional[str] = None,
        forConstruction: bool = False,
    )

Source from the content-addressed store, hash-verified

906
907 @multimethod
908 def spline(
909 self: T,
910 pts: Iterable[Point],
911 tangents: Optional[Iterable[Point]],
912 periodic: bool,
913 tag: Optional[str] = None,
914 forConstruction: bool = False,
915 ) -> T:
916 """
917 Construct a spline edge.
918 """
919
920 val = Edge.makeSpline(
921 [Vector(*p) for p in pts],
922 [Vector(*t) for t in tangents] if tangents else None,
923 periodic,
924 )
925
926 return self.edge(val, tag, forConstruction)
927
928 @spline.register
929 def spline(

Callers

nothing calls this directly

Calls 3

edgeMethod · 0.95
VectorClass · 0.85
makeSplineMethod · 0.80

Tested by

no test coverage detected