Structural Property Calculator — Improved Dec 2019

Interactive Calculator on iPad using Pythonista
In October, I introduced an interactive calculator — equipped with AISC properties — providing an easy way to document/calculate structural equations. Original post: Structural Property Calculator on iPad/iPhone using Pythonista
Improvement
This next portion was added on December 9, 2019.

Properties are mathematical functions; structural shapes are now delimited with two leading periods.

Leading double periods seems more natural and is more convenient on iOS keyboards.

Also implemented the usual Python attribute syntax (dot syntax) for named variables.

#
calc> ddet(..w8x31) # not case sensitive
8.0


#
# On assignment, now, the calculator
# returns __str__(object)
# the string representation of the object
#
# Therefore,
# On assignment of an AISC shape the calculator
# returns __str__(shape)
# the string representation of the shape
#
calc > a = ..w8x31 # not case sensitive
Shape: LABEL =                     W8X31  W = 31.000  D =  8.000 
calc > a.tf
0.435
calc > a.tf * a.bf
3.48
calc > a.twdet
0.3125


#
calc > angle = ..2L3-1/2x3-1/2x3/8
Shape: LABEL =         2L3-1/2X3-1/2X3/8  W = 17.000  D =  3.500
calc > a.rx
3.47
calc > a.ry
2.02


#
calc > col = ..w12x40
Shape: LABEL =                     W8X40  W = 40.000  D =  11.900
calc > beam = ..w14x43
Shape: LABEL =                     W8X43  W = 43.000  D =  13.700
calc > area_flange_col = col.tf * col.bf
4.12515
calc > area_flange_beam = beam.tf * beam.bf
4.24

#
calc > area_flange_col
4.12515
calc > area_flange_beam
4.24

Leave a Reply

Your email address will not be published. Required fields are marked *