pylbm.elements.STLElement

class pylbm.elements.STLElement(filename, label=0, isfluid=False)

Class STLElement

Parameters:
filename: string

the file containing the STL element

label: int

the label on the element

isfluid: boolean
  • True if the element is added

  • False if the element is deleted

Notes

Add a STLElement requires the module numpy-stl!

Attributes:
mesh: stl.mesh.Mesh

the surface mesh of the element

dim: int

3

Methods

distance(grid, v[, dmax, normal])

Compute the distance in the v direction between the element and the points defined in grid by (x, y) or (x, y, z).

get_bounds()

return the smallest box where the element is.

point_inside(grid)

return a boolean array which defines if a point is inside or outside of the element.

test_label()

test if the number of labels is equal to the number of bounds.

visualize(viewer, color[, viewlabel, scale, ...])

visualize the element

Attributes

number_of_bounds