MCPcopy Index your code
hub / github.com/CadQuery/cadquery / edgeOn

Function edgeOn

cadquery/occ_impl/shapes.py:5879–5899  ·  view source on GitHub ↗

Build an edge on a face from points in (u,v) space.

(
    base: Shape,
    pts: Sequence[tuple[Real, Real]],
    periodic: bool = False,
    tol: float = 1e-6,
)

Source from the content-addressed store, hash-verified

5877
5878@multidispatch
5879def edgeOn(
5880 base: Shape,
5881 pts: Sequence[tuple[Real, Real]],
5882 periodic: bool = False,
5883 tol: float = 1e-6,
5884) -> Edge:
5885 """
5886 Build an edge on a face from points in (u,v) space.
5887 """
5888
5889 f = _get_one(base, "Face")
5890
5891 # interpolate the u,v points
5892 spline_bldr = Geom2dAPI_Interpolate(_pts_to_harray2D(pts), periodic, tol)
5893 spline_bldr.Perform()
5894
5895 # build the final edge
5896 rv = BRepBuilderAPI_MakeEdge(spline_bldr.Curve(), f._geomAdaptor()).Edge()
5897 BRepLib.BuildCurves3d_s(rv)
5898
5899 return _shape(rv, Edge)
5900
5901
5902@multidispatch

Callers 2

wireOnFunction · 0.85
test_edgeOnFunction · 0.85

Calls 11

_get_oneFunction · 0.85
_pts_to_harray2DFunction · 0.85
_shapeFunction · 0.85
_get_edgesFunction · 0.85
_floats_to_harrayFunction · 0.85
_compound_or_shapeFunction · 0.85
sampleMethod · 0.80
_boundsMethod · 0.80
IsClosedMethod · 0.80
appendMethod · 0.80
_geomAdaptorMethod · 0.45

Tested by 1

test_edgeOnFunction · 0.68