Convex hull

../../../../_images/thumbnail2.png

Description

Computes the convex hull of each zone.

Parameters

  • base: Base

    The input base in which compute the convex hull

Preconditions

  • This treatment needs VTK

  • The base must have valid coordinate names

Postconditions

The output base has as many zones as the input base. The only variables in these zones will be the coordinates.

If the zone geometry is shared, the output zone will also be in the shared instant and the zone will contain no instants, regardless of the instants in the input zone. If the zone geometry is not shared, then the output zone will contain as many instants as the input base.

Usage

import antares
t = antares.Treatment('convexhull')
t['base'] = base
convex_hull = t.execute()

or

import antares
convex_hull = antares.treatment.ConvexHull(base=base)

Example

The following example shows how use the treatment

import antares
import os

output_folder = os.path.join("OUTPUT", "TreatmentConvexHull")
os.makedirs(output_folder, exist_ok=True)

# Read base
base = antares.io.Read(
    format = 'hdf_cgns',
    filename = '../data/A320NEO/a320neo.cgns',
    shared = False,
    )

# Compute convex hull
convex_hull = antares.treatment.ConvexHull(base)

# Dump base
antares.io.Dump(
    base=convex_hull,
    filename='convex_hull.plt',
    folder=output_folder,
    format='bin_tp')
../../../../_images/thumbnail2.png