Block Functions¶
- plot3d.blockfunctions.block_connection_matrix(blocks: List[Block], outer_faces: List[Dict[str, int]] = [], tol: float = 1e-08)[source]¶
Creates a matrix representing how block edges are connected to each other
- Parameters:
blocks (List[Block]) – List of blocks that describe the Plot3D mesh
outer_faces (List[Dict[str,int]], optional) – List of outer faces remaining from connectivity. Useful if you are interested in finding faces that are exterior to the block. Also useful if you combine outerfaces with match faces, this will help identify connections by looking at split faces. Defaults to [].
tol (float, optional) – Matching tolerance to look for when comparing face centroids.
- Returns:
containing
connectivity (np.ndarray): integer matrix defining how the blocks are connected to each other connectivity_i (np.ndarray): integer matrix defining connectivity of all blocks where IMAX=IMIN connectivity_j (np.ndarray): integer matrix defining connectivity of all blocks where JMAX=JMIN connectivity_k (np.ndarray): integer matrix defining connectivity of all blocks where KMAX=KMIN
- Return type:
(Tuple)
- plot3d.blockfunctions.get_outer_bounds(blocks: List[Block])[source]¶
Get outer bounds for a set of blocks
- Parameters:
blocks (List[Block]) – Blocks defining your shape
- Returns:
xbounds (Tuple[float,float]): xmin,xmax ybounds (Tuple[float,float]): ymin,ymax zbounds (Tuple[float,float]): zmin,zmax
- Return type:
(Tuple) containing
- plot3d.blockfunctions.reduce_blocks(blocks: List[Block], factor: int)[source]¶
reduce the blocks by a factor of (factor)
- Parameters:
blocks (List[Block]) – list of blocks to reduce in size
factor (int, optional) – Number of indicies to skip . Defaults to 2.
- Returns:
[description]
- Return type:
[type]