mymesh.delaunay.ConvexHull#
- mymesh.delaunay.ConvexHull(NodeCoords, method=None, OrientSurf=True, nD=None)[source]#
Identify the convex hull of a set of points. For a 2D point set (np.shape(NodeCoords) = (n,2)), a 2D convex hull of line elements will be generated. For a 3D point set (np.shape(NodeCoords) = (n,2)), a 3D convex hull of triangle elements will be generated.
- Parameters:
NodeCoords (array_like) – Coordinates of points around which the convex hull will be identified.
method (str, optional) –
Convex hull method, by default ‘QuickHull’ for 2D and ‘scipy’ for 3D.
’QuickHull’ - Use the quickhull algorithm (
QuickHull2d())’GiftWrapping’ - Use the gift wrapping algorithm (
GiftWrapping2d())’scipy’ or ‘qhull’ - Use qhull via
scipy.spatial.ConvexHull’BowyerWatson’ - Extract the boundary of a Delaunay triangulation by the Bowyer-Watson algorithm (
BowyerWatson2d()orBowyerWatson3d()). This option is mostly for theoretical interest.
- OrientSurfstr, optional
Ensure the normals of the convex hull are consistently oriented outward, by default True. This is only relevant for method==’scipy’, other methods are oriented regardless.
- Returns:
Hull – Mesh object containing the convex hull.
Hull.Type='line'for a 2D hull orHull.Type='surf'for a 3D hull.- Return type: