Skip to main content

make_slab_brep

Function make_slab_brep 

Source
pub fn make_slab_brep(
    size: [f64; 2],
    knots_u: &[f64],
    knots_v: &[f64],
    heights: &[Vec<f64>],
) -> Result<BrepSolid, KernelRefusal>
Expand description

The slab over the rectangle 0 ≤ x ≤ size[0], 0 ≤ y ≤ size[1], from z = 0 up to the bicubic B-spline height field with clamped knots knots_u, knots_v (along x and along y) and coefficients heights[i][j] (i along x), every one positive.

Refuses a size that is not positive, knots that are not a clamped cubic vector over [0, 1] for the coefficients, a height that is not positive and finite, and a slab under a millionth as thick or narrow as it is wide.