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,
)
| 5877 | |
| 5878 | @multidispatch |
| 5879 | def 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 |