# Parametric Surface functions | OpenStaad Python

> Parametric surfaces used to generate plate meshes — define, mesh, and query the surface, its regions, and density points.

Source: https://www.openstaad.com/docs/parametric-surface

Every function is a method of the session `s = ops.connect()` (`from openstaad import ops`).

## Create

### CreateParametricSurfaceThicknessProperty

**Description**

Creates the parametric surface thickness property.

**Parameters**

- `node_thickness_list` (list): node thickness list.

**Returns**

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.CreateParametricSurfaceThicknessProperty([1, 2])
print(result)
```

### DefineParametricSurface

**Description**

Defines the parametric surface.

**Parameters**

- `name` (str): name.
- `type` (int): type.
- `origin_Node` (int): origin node.
- `x_vertex_node` (int): x vertex node.
- `y_vertex_node` (int): y vertex node.
- `vertices_list` (list): vertices list.
- `auto_generate` (bool): auto generate.

**Returns**

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.DefineParametricSurface("value", 1, 1, 1, 1, [1, 2], True)
print(result)
```

## Add

### AddCircularRegionToSurface

**Description**

Adds the circular region to surface.

**Parameters**

- `surfaceNo` (int): surface no.
- `x` (float): x.
- `y` (float): y.
- `z` (float): z.
- `radius` (float): radius.
- `divisions` (int): divisions.
- `density` (int): density.
- `is_opening` (bool, optional (default `False`)): is opening.

**Returns**

bool: `True` if the call succeeded, `False` otherwise.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.AddCircularRegionToSurface(1, 1.0, 1.0, 1.0, 1.0, 1, 1, True)
print(result)
```

### AddDensityLineToSurface

**Description**

Adds the density line to surface.

**Parameters**

- `surfaceNo` (int): surface no.
- `x1` (float): x 1.
- `y1` (float): y 1.
- `z1` (float): z 1.
- `density1` (int): density 1.
- `x2` (float): x 2.
- `y2` (float): y 2.
- `z2` (float): z 2.
- `density2` (int): density 2.
- `divisions` (int): divisions.

**Returns**

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.AddDensityLineToSurface(1, 1.0, 1.0, 1.0, 1, 1.0, 1.0, 1.0, 1, 1)
print(result)
```

### AddDensityPointToSurface

**Description**

Adds the density point to surface.

**Parameters**

- `surfaceNo` (int): surface no.
- `pointData` (list): point data.

**Returns**

None: This function does not return a value.

**Example**

```python
from openstaad import ops

s = ops.connect()
s.AddDensityPointToSurface(1, [1, 2])
```

### AddParametricSurfaceToModel

**Description**

Adds the parametric surface to model.

**Parameters**

- `surfaceNo` (int): surface no.

**Returns**

bool: `True` if the call succeeded, `False` otherwise.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.AddParametricSurfaceToModel(1)
print(result)
```

### AddPolygonalRegionToSurface

**Description**

Adds the polygonal region to surface.

**Parameters**

- `surfaceNo` (int): surface no.
- `regionData` (list): region data.

**Returns**

None: This function does not return a value.

**Example**

```python
from openstaad import ops

s = ops.connect()
s.AddPolygonalRegionToSurface(1, [1, 2])
```

## Get

### GetParametricSurfaceCount

**Description**

Returns the parametric surface count.

**Parameters**

None.

**Returns**

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetParametricSurfaceCount()
print(result)
```

### GetParametricSurfaceInfo

**Description**

Returns the parametric surface info.

**Parameters**

- `surfaceNo` (int): surface no.

**Returns**

tuple: A tuple of `(str, str, int, int, int, int)`.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetParametricSurfaceInfo(1)
print(result)
```

### GetParametricSurfaceInfoEx

**Description**

Returns the parametric surface info ex.

**Parameters**

- `surfaceNo` (int): surface no.

**Returns**

tuple: A tuple of `(str, int, str, int, float, int, int, bool, int, int, int, int, int, int, int, int, int)`.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetParametricSurfaceInfoEx(1)
print(result)
```

### GetParametricSurfaceMeshData

**Description**

Returns the parametric surface mesh data.

**Parameters**

- `surfaceNo` (int): surface no.

**Returns**

tuple: A tuple of `(list[int], list[int])`.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetParametricSurfaceMeshData(1)
print(result)
```

### GetParametricSurfaceMeshInfo

**Description**

Returns the parametric surface mesh info.

**Parameters**

- `surfaceNo` (int): surface no.

**Returns**

tuple: A tuple of `(int, int)`.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetParametricSurfaceMeshInfo(1)
print(result)
```

### GetParametricSurfaceSubType

**Description**

Returns the parametric surface sub type.

**Parameters**

- `surfaceName` (str): surface name.

**Returns**

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetParametricSurfaceSubType("value")
print(result)
```

### GetParametricSurfaceUniqueID

**Description**

Returns the parametric surface unique ID.

**Parameters**

- `surface_name` (str): surface name.

**Returns**

raw: The raw return value from the underlying OpenSTAAD COM call. Refer to the official Bentley OpenSTAAD API reference for this method's exact return semantics.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetParametricSurfaceUniqueID("value")
print(result)
```

### GetResultantForceAlongLineForParametricSurface

**Description**

Returns the resultant force along line for parametric surface.

**Parameters**

- `parametricSurfaceName` (str): parametric surface name.
- `nplates` (int): nplates.
- `loadId` (int): load Id.
- `startNode` (list): start node.
- `endNode` (list): end node.
- `facingNode` (list): facing node.
- `isTransformForceToGlobal` (int): is transform force to global.
- `firstNode` (int): first node.
- `secondNode` (int): second node.
- `thirdNode` (int): third node.

**Returns**

list: A list of numbers (floats).

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.GetResultantForceAlongLineForParametricSurface("value", 1, 1, [1, 2], [1, 2], [1, 2], 1, 1, 1, 1)
print(result)
```

## Set/Assign

### CommitParametricSurfaceMesh

**Description**

Commits the parametric surface mesh.

**Parameters**

- `surfaceNo` (int): surface no.

**Returns**

bool: `True` if the call succeeded, `False` otherwise.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.CommitParametricSurfaceMesh(1)
print(result)
```

### SetParametricSurfaceSubType

**Description**

Sets the parametric surface sub type.

**Parameters**

- `surfaceName` (str): surface name.
- `subType` (str): sub type.

**Returns**

None: This function does not return a value.

**Example**

```python
from openstaad import ops

s = ops.connect()
s.SetParametricSurfaceSubType("value", "value")
```

### SetParametricSurfaceUniqueID

**Description**

Sets the parametric surface unique ID.

**Parameters**

- `surface_name` (str): surface name.
- `unique_id` (str): unique id.

**Returns**

None: This function does not return a value.

**Example**

```python
from openstaad import ops

s = ops.connect()
s.SetParametricSurfaceUniqueID("value", "value")
```

## Remove

### RemoveParametricSurfaceMesh

**Description**

Removes the parametric surface mesh.

**Parameters**

- `surfaceNo` (int): surface no.

**Returns**

bool: `True` if the call succeeded, `False` otherwise.

**Example**

```python
from openstaad import ops

s = ops.connect()
result = s.RemoveParametricSurfaceMesh(1)
print(result)
```

## View

### HideSurface

**Description**

Hides the surface.

**Parameters**

- `nSurface` (int): n surface.

**Returns**

None: This function does not return a value.

**Example**

```python
from openstaad import ops

s = ops.connect()
s.HideSurface(1)
```
