Visualization#

Interactive 3D visualization tools using Plotly.

Create an interactive 3D plot of the vessel using Plotly.

Parameters:
  • vessel (Vessel) – The vessel to visualize.

  • show_hulls (bool) – Whether to show hull meshes.

  • show_tanks (bool) – Whether to show tank meshes.

  • show_silhouettes (bool) – Whether to show silhouette profiles.

  • show_openings (bool) – Whether to show downflooding openings.

  • opacity_hull (float) – Opacity for hull meshes (0.0 to 1.0).

  • opacity_tank (float) – Opacity for tank meshes (0.0 to 1.0).

  • title (str) – Title of the plot.

  • enable_opacity_slider (bool) – Whether to add a slider to control hull opacity.

  • show_axes (bool) – Whether to show axes, grid, and background.

Returns:

A Plotly Figure object.

Return type:

plotly.graph_objects.Figure

Visualize the vessel at a specific hydrostatic condition (floating in water). The waterplane is fixed at Z=0. The vessel is transformed (translated and rotated) to match the draft, trim, and heel.

Parameters:
  • vessel (Vessel) – The vessel to visualize.

  • draft (float) – Draft at midship (or reference point) in meters.

  • trim (float) – Trim angle in degrees (positive = stern down usually).

  • heel (float) – Heel angle in degrees (positive = starboard down usually).

  • show_hulls (bool) – Whether to show hull meshes.

  • show_tanks (bool) – Whether to show tank meshes.

  • show_silhouettes (bool) – Whether to show silhouette profiles.

  • show_openings (bool) – Whether to show downflooding openings.

  • opacity_hull (float) – Opacity for hull meshes (0.0 to 1.0).

  • opacity_tank (float) – Opacity for tank meshes (0.0 to 1.0).

  • title (str) – Title of the plot.

  • enable_opacity_slider (bool) – Whether to add a slider to control hull opacity.

  • cog (tuple[float, float, float] or None) – Optional Center of Gravity (x, y, z) to display.

  • show_axes (bool) – Whether to show axes, grid, and background.

Returns:

A Plotly Figure object.

Return type:

plotly.graph_objects.Figure