Algo API

merge_surfaces(leader, surfaces, exclude_seams=True)

Merge surfaces

Note

After the merge, the input surfaces are deleted. This function has no effects if surfaces is empty or only contains the leader.

Parameters
  • leader (Surface) -- The leader surface to use for the merge.

  • surfaces (list(Surface)) -- The list of surfaces to merge. The leader surface can be in the list or can be omitted.

  • exclude_seams (bool) -- Whether to exclude seam surfaces or surfaces containing seams. If False, these surfaces will be merged but the seam information will be lost.

Returns

The merged surface.

Return type

Surface

Raises
  • ReadOnlyError -- If Database is in read only mode.

  • ValueError -- If not enough surfaces to merge.

  • ValueError -- If a surface is not in the same model as the leader.

  • ValueError -- If the leader contains seams but exclude_seams is True.

render_lighting(database, remote=False)

Render lighting

Note

Render lighting for the current active model.

Note

Remote rendering is not available when using .p3d direct access.

Parameters
  • database (Database) -- Database.

  • remote (bool) -- Whether to use remote rendering or not.

Raises

ReadOnlyError -- If Database is in read only mode.

render_lighting_for_surfaces(layer, surfaces, remote=False)

Render lighting for the specified surfaces

Note

Render lighting for the current active model.

Note

Remote rendering is not available when using .p3d direct access.

Parameters
  • layer (LightingLayer) -- Lighting layer to render.

  • surfaces (list(Surface)) -- Surfaces to render lighting.

  • remote (bool) -- Whether to use remote rendering or not.

Raises

ReadOnlyError -- If Database is in read only mode.

unmerge_surface(surface)

Unmerge surface

Note

If the surface cannot be unmerged, an exception will be raised, otherwhise the input surface is deleted.

Parameters

surface (Surface) -- The surface to unmerge.

Returns

The list of surfaces resulting of the surfaces unmerge.

Return type

list(Surface)

Raises