pierce_shells Module

Defines:
  • pierce_shell_model(bdf_filename, xyz_points, tol=1.0)

pyNastran.bdf.mesh_utils.pierce_shells.pierce_shell_model(bdf_filename: BDF | str, xyz_points: Any, tol: float = 1.0) tuple[list[int], ndarray, list[list[int]]][source]

Pierces a shell model with a <0., 0., 1.> vector. In other words, models are pierced in the xy plane.

Parameters:
bdf_filenamestr / BDF()

the model to run

xyz_points(npoints, 3) float ndarray

the xyz_points to pierce

tolfloat; default=1.0

the pierce tolerance pick a value that is ~3x the max local element edge length

Returns:
eids_piercelist[int]
intThe element ids that were pierced.

If multiple elements are pierced, the one with the largest pierced z value will be returned.

None : invalid pierce

xyz_pierces_maxlist[float ndarray, None]

ndarray : pierce location None : invalid pierce

node_idslist[int ndarray, None]

ndarray : pierced element’s nodes None : invalid pierce

pyNastran.bdf.mesh_utils.pierce_shells.quad_intersection(orig: ndarray, direction: ndarray, v0: ndarray, v1: ndarray, v2: ndarray, v3: ndarray) ndarray[source]

Pierces a quad

Parameters:
orig(3, ) float ndarray

the point to pierce

direction(3, ) float ndarray

the pierce vector

v0, v1, v2, v3(3, ) float ndarray

the xyz points of the quad

Returns:
p(3, ) float ndarray or None

ndarray : the pierce point None : failed pierce

pyNastran.bdf.mesh_utils.pierce_shells.triangle_intersection(orig: ndarray, direction: ndarray, v0: ndarray, v1: ndarray, v2: ndarray) ndarray | None[source]

Pierces a triangle

Parameters:
orig(3, ) float ndarray

the point to pierce

direction(3, ) float ndarray

the pierce vector

v0, v1, v2(3, ) float ndarray

the xyz points of the triangle

Returns:
p(3, ) float ndarray or None

ndarray : the pierce point None : failed pierce