Combinations


union2(obj1, obj2)

Union boolean operation between two SDFs.

Parameters:
  • obj1 (ndarray) –

    First SDF, evaluated at the coordinate points.

  • obj2 (ndarray) –

    Second SDF, evaluated at the coordinate points.

Returns: Combined SDF, evaluated at the coordinate points.

union(objs)

Union boolean operation between multiple SDFs.

Parameters:
  • objs (array_like_type) –

    Array of SDFs, evaluated at the coordinate points.

Returns: Combined SDF, evaluated at the coordinate points.

subtract2(obj1, obj2)

Subtract boolean operation between two SDFs.

Parameters:
  • obj1 (array_like_type) –

    First SDF, evaluated at the coordinate points.

  • obj2 (array_like_type) –

    Second SDF, evaluated at the coordinate points.

Returns: Combined SDF, evaluated at the coordinate points.

intersect2(obj1, obj2)

Intersect boolean operation between two SDFs.

Parameters:
  • obj1 (array_like_type) –

    First SDF, evaluated at the coordinate points.

  • obj2 (array_like_type) –

    Second SDF, evaluated at the coordinate points.

Returns: Combined SDF, evaluated at the coordinate points.

intersect(objs)

Intersect boolean operation between multiple SDFs.

Parameters:
  • objs (array_like_type) –

    Array of SDFs, evaluated at the coordinate points.

Returns: Combined SDF, evaluated at the coordinate points.

add(obj1, obj2)

Computes the sum of two SDFs.

Parameters:
  • obj1 (array_like_type) –

    First SDF, evaluated at the coordinate points.

  • obj2 (array_like_type) –

    Second SDF, evaluated at the coordinate points.

Returns: Combined SDF, evaluated at the coordinate points.

difference(obj1, obj2)

Computes the difference between two SDFs.

Parameters:
  • obj1 (array_like_type) –

    First SDF, evaluated at the coordinate points.

  • obj2 (array_like_type) –

    Second SDF, evaluated at the coordinate points.

Returns: Combined SDF, evaluated at the coordinate points.

smoothmin_poly2(x, y, a)

Computes the second order smooth minimum. https://iquilezles.org/articles/smin/

Parameters:
  • x (array_like_type | scalar_like_type) –

    First value.

  • y (array_like_type | scalar_like_type) –

    Second value.

  • a (scalar_like_type) –

    Smoothing parameter.

Returns: Smooth minimum between x and y, based on parameter a.

smoothmin_poly3(x, y, a)

Computes the third order smooth minimum. https://iquilezles.org/articles/smin/

Parameters:
  • x (array_like_type | scalar_like_type) –

    First value.

  • y (array_like_type | scalar_like_type) –

    Second value.

  • a (scalar_like_type) –

    Smoothing parameter.

Returns: Smooth minimum between x and y, based on parameter a.

smoothmax_boltz(x, y, a)

Computes the smooth maximum. https://en.wikipedia.org/wiki/Smooth_maximum

Parameters:
  • x (array_like_type | scalar_like_type) –

    First value.

  • y (array_like_type | scalar_like_type) –

    Second value.

  • a (scalar_like_type) –

    Smoothing parameter.

Returns: Smooth maximum between x and y, based on parameter a.

smooth_union2_2o(obj1, obj2, width)

Second order parametric union boolean operation between two SDFs.

Parameters:
  • obj1 (array_like_type) –

    First SDF, evaluated at the coordinate points.

  • obj2 (array_like_type) –

    Second SDF, evaluated at the coordinate points.

  • width (scalar_like_type) –

    Smoothing parameter.

Returns: Combined SDF, evaluated at the coordinate points.

smooth_union2_3o(obj1, obj2, width)

Third order parametric union boolean operation between two SDFs.

Parameters:
  • obj1 (array_like_type) –

    First SDF, evaluated at the coordinate points.

  • obj2 (array_like_type) –

    Second SDF, evaluated at the coordinate points.

  • width (scalar_like_type) –

    Smoothing parameter.

Returns: Combined SDF, evaluated at the coordinate points.

smooth_intersect2_2o(obj1, obj2, width)

Second order parametric intersect boolean operation between two SDFs.

Parameters:
  • obj1 (array_like_type) –

    First SDF, evaluated at the coordinate points.

  • obj2 (array_like_type) –

    Second SDF, evaluated at the coordinate points.

  • width (scalar_like_type) –

    Smoothing parameter.

Returns: Combined SDF, evaluated at the coordinate points.

smooth_intersect2_3o(obj1, obj2, width)

Third order parametric intersect boolean operation between two SDFs.

Parameters:
  • obj1 (array_like_type) –

    First SDF, evaluated at the coordinate points.

  • obj2 (array_like_type) –

    Second SDF, evaluated at the coordinate points.

  • width (scalar_like_type) –

    Smoothing parameter.

Returns: Combined SDF, evaluated at the coordinate points.

smooth_subtract2_2o(obj1, obj2, width)

Second order parametric subtract boolean operation between two SDFs.

Parameters:
  • obj1 (array_like_type) –

    First SDF, evaluated at the coordinate points.

  • obj2 (array_like_type) –

    Second SDF, evaluated at the coordinate points.

  • width (scalar_like_type) –

    Smoothing parameter.

Returns: Combined SDF, evaluated at the coordinate points.

smooth_subtract2_3o(obj1, obj2, width)

Third order parametric subtract boolean operation between two SDFs.

Parameters:
  • obj1 (array_like_type) –

    First SDF, evaluated at the coordinate points.

  • obj2 (array_like_type) –

    Second SDF, evaluated at the coordinate points.

  • width (scalar_like_type) –

    Smoothing parameter.

Returns: Combined SDF, evaluated at the coordinate points.

combine_2_sdfs(function_1, function_2, params_1, params_2, combine_function)

Function that combines two SDFs, based on the parameters and the 'combine_function', and returns the combined SDF.

Parameters:
  • function_1 (function_like_type) –

    Function defining the first SDF.

  • function_2 (function_like_type) –

    Function defining the second SDF.

  • params_1 (tuple) –

    Parameters for the first SDF.

  • params_2 (tuple) –

    Parameters for the second SDF.

  • combine_function (combine_function_type) –

    Parameter-less function that combines two SDFs.

Returns: Combined SDF.

combine_multiple_sdfs(functions_array, params_array, combine_function)

Function that combines two SDFs, based on the parameters and the 'combine_function', and returns the combined SDF.

Parameters:
  • functions_array (array_like_type) –

    Array of functions defining the SDFs to be combined.

  • params_array (array_like_type) –

    Array of parameters of the SDFs in functions_array.

  • combine_function (combine_multiple_function_type) –

    Parameter-less function that combines multiple SDFs.

Returns: Combined SDF.

parametric_combine_2_sdfs(function_1, function_2, params_1, params_2, combine_function, combine_parameter)

Function that combines two SDFs, based on the parameters and the parametric 'combine_function', and returns the combined SDF.

Parameters:
  • function_1 (function_like_type) –

    Function defining the first SDF.

  • function_2 (function_like_type) –

    Function defining the second SDF.

  • params_1 (tuple) –

    Parameters for the first SDF.

  • params_2 (tuple) –

    Parameters for the second SDF.

  • combine_function (parametric_combine_function_type) –

    Parametric function that combines two SDFs.

  • combine_parameter (scalar_like_type) –

    Parameter of the 'combine_function'.

Returns: Combined SDF.