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

Method curvatures

cadquery/occ_impl/shapes.py:2537–2552  ·  view source on GitHub ↗

Calculate mean curvatures along the underlying curve. :param d: distance or parameter values :param mode: position calculation mode (default: length) :param resolution: resolution of the calculation (default: 1e-6) :return: mean curvature value at the specif

(
        self: Mixin1DProtocol,
        ds: Iterable[float],
        mode: ParamMode = "length",
        resolution: float = 1e-6,
    )

Source from the content-addressed store, hash-verified

2535 return props.Curvature()
2536
2537 def curvatures(
2538 self: Mixin1DProtocol,
2539 ds: Iterable[float],
2540 mode: ParamMode = "length",
2541 resolution: float = 1e-6,
2542 ) -> list[float]:
2543 """
2544 Calculate mean curvatures along the underlying curve.
2545
2546 :param d: distance or parameter values
2547 :param mode: position calculation mode (default: length)
2548 :param resolution: resolution of the calculation (default: 1e-6)
2549 :return: mean curvature value at the specified d value.
2550 """
2551
2552 return [self.curvatureAt(d, mode, resolution) for d in ds]
2553
2554
2555class Edge(Shape, Mixin1D):

Callers 1

test_curvatureFunction · 0.80

Calls 1

curvatureAtMethod · 0.95

Tested by 1

test_curvatureFunction · 0.64