# HM_ExtAPI::GeomSurfaceExpandParameterBounds()

Expands parametric bounds of the surface by given values.

## Syntax

```
bool GeomSurfaceExpandParameterBounds(
const HM_EntityGeometrySurface & surf,
bool extend_by_length3d,
double u_start_extend_value,
double u_end_extend_value,
double v_start_extend_value,
double v_end_extend_value
double u_start_ref3d_v = 0,
double u_end_ref3d_v = 0,
double v_start_ref3d_u = 0,
double v_end_ref3d_u = 0,
int continuity_degree = 0
);
```

## Type

HyperMesh Ext API Function

## Description

The function is supported for NURBS_SURFACE type only.

If one or more of extension value parameters (`u_start_extend_value`,
`u_end_extend_value`, `v_start_extend_value`,
`v_end_extend_value`) are zero or negative then those parameters are
ignored and no extension is added to corresponding parametric boundary of the surface. If
none of parameters is positive then the function returns false.

All parametric values are given in units relative to corresponding parametric range of the
input surface. For example, if U parametric range of the surface is [-3…7] then extension
value `u_end_extend_value` equal to 0.1 corresponds to absolute extension
value of 1 (assuming `extend_by_length3d` is false) and will result in
extension of the U parametric range of the surface to [-3…8]. The value of
`v_start_ref3d_u` equal to 0.8 in this case corresponds to absolute U
parameter value of reference point equal to 5.

Use the function HM_ExtAPI::GeomSurfaceGetParameterBounds() to obtain parametric range of the surface.

If the function succeeds, the return value is true. If the function fails, the return value is false. To get extended value information, call HM_ExtAPI::GetLastErrorCode().

Requires including hm_extapi.h.

## Inputs

`surf`- [in] - Handle to surface object that was returned by previous calls to API functions.
`extend_by_length3d`- [in] - Specifies whether extension sizes are given as approximate extension lengths or corresponding surface parameter extension values. The parameter can have one of following values.
`u_start_extend_value`- [in] - If
`extend_by_length3d`is false then the value by which parametric range of the surface increases at U parameter start. If`extend_by_length3d`is true then approximate length of surface extension at U parameter start measured from the point with V parameter equal to`u_start_ref3d_v`. `u_end_extend_value`- [in] - If
`extend_by_length3d`is false then the value by which parametric range of the surface increases at U parameter end. If`extend_by_length3d`is true then approximate length of surface extension at U parameter end measured from the point with V parameter equal to`u_end_ref3d_v`. `v_start_extend_value`- [in] - If
`extend_by_length3d`is false then the value by which parametric range of the surface increases at V parameter start. If`extend_by_length3d`is true then approximate length of surface extension at V parameter start measured from the point with U parameter equal to`v_start_ref3d_u`. `v_end_extend_value`- [in] - If
`extend_by_length3d`is false then the value by which parametric range of the surface increases at V parameter end. If`extend_by_length3d`is true then approximate length of surface extension at V parameter end measured from the point with U parameter equal to`v_end_ref3d_u`. `u_start_ref3d_v`- [in] - If
`extend_by_length3d`is true then the value of V parameter of the point from which extension distance is measured at U parameter start. Ignored if`extend_by_length3d`is false. `u_end_ref3d_v`- [in] - If
`extend_by_length3d`is true then the value of V parameter of the point from which extension distance is measured at U parameter end. Ignored if`extend_by_length3d`is false. `v_start_ref3d_u`- [in] - If
`extend_by_length3d`is true then the value of U parameter of the point from which extension distance is measured at V parameter start. Ignored if`extend_by_length3d`is false. `v_end_ref3d_u`- [in] - If
`extend_by_length3d`is true then the value of U parameter of the point from which extension distance is measured at V parameter end. Ignored if`extend_by_length3d`is false. `continuity_degree`- [in] - Continuity degree of the extension. The parameter can have one of following values.

## Errors

None.