CivPy¶
About¶
This package provides civil engineering tools and algorithms for creating survey and structure models in Python.
Installation¶
The development version of this package may be installed via pip:
pip install git+https://github.com/mpewsey/civpy#egg=civpy
Table of Contents¶
Math (civpy.math
)¶
Contains math functions.
Linear Algebra¶
projection_angles (name) |
Returns the rotation angles for the specified projection. |
rotation_matrix2 (angle) |
Returns the 2D rotation matrix. |
rotation_matrix3 ([angle_x, angle_y, angle_z]) |
Returns the 3D rotation matrix. |
rotate2 (x, angle[, origin]) |
Rotates the input 2D vectors by the specified angle. |
rotate3 (x[, angle_x, angle_y, angle_z, origin]) |
Rotates the input 3D vectors by the specified angles. |
Structures (civpy.structures
)¶
Contains components for performing structural analysis.
Components¶
CrossSection (name, area[, width, height, …]) |
A class representing a member cross section. |
Material (name, elasticity[, rigidity]) |
A class representing an engineered material. |
ElementGroup (name, section, material) |
A class representing a group of element properties. |
Node |
A class representing a structural node. |
Element (name, inode, jnode, group[, …]) |
A class representing a structural element. |
Structure (name, nodes, elements[, symmetry]) |
A class representing a structure. |
Loads¶
LoadCase (name[, node_loads, elem_loads]) |
A class representing a structural load case. |
NodeLoad |
A class representing a load applied to a node. |
ElementLoad |
A class representing an element load. |
Element Functions¶
rotation_matrix (dx, dy, dz[, roll]) |
Returns the rotation matrix of shape (3, 3) for an element. |
transformation_matrix (dx, dy, dz[, roll]) |
Returns the transformation matrix of shape (12, 12) for an element. |
local_stiffness (l, lu, a, ix, iy, j, e, g[, …]) |
Returns the local stiffness matrix of shape (12, 12) of the element. |
clear_element_cache () |
Clears the element function cache. |
Element Load Functions¶
load_distances (dx, dy, dz, ix, delx) |
Returns the load distances to where an element load is applied. |
force_local_reactions (fx, fy, fz, dx, dy, …) |
Returns the local force reaction vector for an element. |
moment_local_reactions (mx, my, mz, dx, dy, …) |
Returns the local moment reaction vector for an element. |
local_reactions (fx, fy, fz, mx, my, mz, dx, …) |
Returns the local reaction vector for an element. |
clear_element_load_cache () |
Clears the element load function cache. |
Survey (civpy.survey
)¶
Contains functions for modeling alignments and performing spatial queries.
Spatial Models¶
SpatialHash (points, grid) |
A class representing a spatial hash structure for efficient distance queries. |
SurveyPoint |
A class representing a survey point. |
TIN (name[, points, breaklines, max_edge, …]) |
A class for creating triangulated irregular networks (TIN) models for 3D surfaces. |

Alignment¶
PI |
A class representing a point of intersection (PI) of an alignment. |
SurveyStake |
A class representing a survey stake. |
Alignment (name[, pis, stakes, grid, …]) |
A class representing a survey alignment. |
