polypropertiesx(1)s... · submatrix , , , ,1 rows p 1 2 ux uy 1 0 1 0 1 0 0 #p #p augment p, 1...
Post on 09-Aug-2020
5 Views
Preview:
TRANSCRIPT
PolyProperties
@description: calculate properties of generic polygons
@version: 2013.02.01
@author: Davide Carpi >>> davide.carpi@gmail.com
@translation: Davide Carpi
@SMath: 0.95.4594 >>> http://en.smath.info
@license: CC BY-SA 3.0 >>> http://creativecommons.org/licenses/by-sa/3.0
just remember to give credit where it's due, and don't try to pass off other people's work as your own,
or your own as anyone else's.
@disclaimer: this script should be used with caution; the author assumes no responsibility for any damage resulting
from its use or misuse.
SEE THE LICENSE (human-readable summary)
DRAWING TIPS and RULES
A__POLYGON
A polygon is a closed chain of straight lines (the polygon sides);
the points where two sides meet are the polygon's vertices.
In this SMath Studio worksheet:
- a polygon is defined by it's vertices;
- definition of vertices can be either clockwise or anticlockwise;
- last vertex must be equal to the first;
- intersections points must be numered twice.
10 mar 2013 14:05:03 - PolyProperties
1 / 41
POLYGONS__(discontinuous__areas)
To have multiple polygons:
- draw all the vertices having same wise;
- close each polygon;
- don't forget to close the vertices chain in the first vertex.
NOTE:
- perimeter calculation cut off overlapped sides with opposite wise.
POLYGONS__(overlapped__areas)
With multiple polygons you can draw overlapped areas; like above:
- draw all the vertices having same wise;
- close each polygon;
- don't forget to close the vertices chain in the first vertex.
10 mar 2013 14:05:03 - PolyProperties
2 / 41
A__HOLLOW__POLYGON
To have a hollow polygon, draw the internal and the external vertices with opposite wise;
don't forget to close the vertices chain in the first vertex!
CURVED__SIDES
Using an adequate approximation you can draw curved sides (and therefore generic figures).
10 mar 2013 14:05:03 - PolyProperties
3 / 41
SHORTCUTS
Save time: use "SHORTCUTS" to draw common shapes and to make transformations (rotate, scale, translate, etc...)
On the right of the GEOMETRY area there is a complete list of all available SHORTCUTS
10 mar 2013 14:05:03 - PolyProperties
4 / 41
SHORTCUTS LIBRARY
Snippet: Operations with units 2012.01.00
TRANSFORMATIONS
rotation matrix; rotatation about the origin of the Cartesian coordinate system.
θ: anticlockwise rotation.
cos θsin θ
sin θcos θRot θ
reflection matrix; reflection about a line through the origin of the Cartesian coordinate system.
θ: angle of the reflection line through the origin with the x-axis.
cos θ2sin θ2
sin θ2cos θ2Ref θ
scaling matrix; scaling about the origin of the Cartesian coordinate system.
s.x: x-scaling factor;
s.y: y-scaling factor.
sy0
0sx
Sc
, sy
sx
shear matrix; shearing about the origin of the Cartesian coordinate system.
λ.x: shearing factor, parallel to x;
λ.y: shearing factor, parallel to y.
1λx
λy1
Sh
, λy
λx
10 mar 2013 14:05:03 - PolyProperties
5 / 41
geometric translation of a polygon.
P: polygon matrix;
u.x: x translation;
u.y: y translation.
submatrix , , , , 21rows P1
1uy
ux
010
001
#P
augment , matrix , 1rows P1P#P
"use homogeneous coordinates"Translate , , uy
ux
P
rotating a polygon about the origin of the Cartesian coordinate system.
P: polygon matrix;
θ: anticlockwise rotation.
submatrix , , , , 21rows P1
100
0cos θsin θ
0sin θcos θ
#P
augment , matrix , 1rows P1P#P
"use homogeneous coordinates"Rotate , θP
scaling a polygon about the origin of the Cartesian coordinate system.
P: polygon matrix;
s.x: x scaling;
s.y: y scaling.
submatrix , , , , 21rows P1
100
0sy0
00sx
#P
augment , matrix , 1rows P1P#P
"use homogeneous coordinates"Scale , , sy
sx
P
10 mar 2013 14:05:03 - PolyProperties
6 / 41
shearing a polygon about the origin of the Cartesian coordinate system.
P: polygon matrix;
λ.x: shearing factor, parallel to x;
λ.y: shearing factor, parallel to y.
submatrix , , , , 21rows P1
100
01λx
0λy1
#P
augment , matrix , 1rows P1P#P
"use homogeneous coordinates"Shear , , λy
λx
P
mirroring a polygon.
P: polygon matrix;
θ: angle of the reflection line through the origin with the x-axis or case-insensitiveaxes name ["x","y","xy"].
submatrix , , , , 21rows P1
100
0cos Θ2sin Θ2
0sin Θ2cos Θ2
#P
augment , matrix , 1rows P1P#P
if
else
θΘ
for
if
else
0
2kθa
Θ
1kθa
θ
..rows θa
1k
T
4
π
4
π
2
π
2
π00
"XY""xy""Y""y""X""x"
θa
"N.A."Θ
IsString θ
"use homogeneous coordinates"Mirror , θP
10 mar 2013 14:05:03 - PolyProperties
7 / 41
create a chunk of a polygon.
pgon: complete polygon;
TLV: Threshold Limit Value;
zone: (relative) semi-plane to keep ["y+","y-","x+","x-"].
Rot ∆θ#chunk#chunk
for
if
else
0
1jj
#TLV2j
#chunk
eval1k
#pgon
2k#pgon
21k#pgon
2k#pgon#TLV
1k#pgon
11k#pgon
1j#chunk
0#TLV21k
#pgon#TLV2k
#pgon
if
else
0
1jj
2k#pgon
2j#chunk
1k#pgon
1j#chunk
#TLV2k
#pgon
.. 1r1k
1j
rows pgonr
00#chunk
for
if
else
0
break
Rot ∆θpgon#pgon
3kΖTLV#TLV
2kΖ∆θ
zone1k
Ζ
..41k
12
π"x-"
12
π"x+"
1π"y-"
10"y+"
Ζ
chunk , , zoneTLVpgon
10 mar 2013 14:05:03 - PolyProperties
8 / 41
#chunk
eval21
#chunk2j
#chunk
eval11
#chunk1j
#chunk
Rot ∆θ#chunk#chunk10 mar 2013 14:05:03 - PolyProperties
9 / 41
POLYGONS
convex regular polygons.
s: number of sides/vertices;
c: circumradius;
θ: anticlockwise rotation.
#out
eval21
#out21s
#out
eval11
#out11s
#out
Rot θ#out#out
for
eval coss
kπ2c
21k#out
eval sins
kπ2c
11k#out
..s0k
max3
ss
00#outpgon , , θcs
hollow convex regular polygons.
s: number of sides/vertices;
c: external circumradius;
t: border thickness;
θ: anticlockwise rotation.
Rot θstack , eval row , 1#out#out
stack , reverse pgon , , 0tcspgon , , 0cs#outhPgon , , , θtcs
overlapped convex regular polygons.
s: number of sides/vertices;
ce: external circumradius;
ci: internal circumradius;
θ: anticlockwise rotation.
Rot θstack , eval row , 1#out#out
stack , pgon , , 0ci
spgon , , 0ce
s#outoPgon , , , θci
ce
s
10 mar 2013 14:05:03 - PolyProperties
10 / 41
star regular polygons.
p: number of sides/vertices[must be ≥ 3];
q: connected vertices spacing [{p/q} is the polygon Schläfli symbol];
c: circumradius;
θ: anticlockwise rotation.
NOTE: stellations of regular or star polygons are for drawing purposes only.
if
if
else
if
else
"stellation of a star polygon"
Rot θstr2num concat , substr , 5num2str #out"sys("
for
pgon , , 1kp
π2cround , 0
q'
pk
#out
..q'1k
"stellation of a regular polygon"
1q'
GCD
gcd , q'pGCD
"stellations"
#out
eval21
#out21p
#out
eval11
#out11p
#out
Rot θ#out#out
for
eval cosp
q'kπ2c
21k#out
eval sinp
q'kπ2c
11k#out
..p0k
00#out
1q'1gcd , q'p
3p
out
if
else
gcd , mod , babout
aout
0bgcd , ba
min1round , 0
2
p
q
q'
sPgon , , , θcqp
10 mar 2013 14:05:03 - PolyProperties
11 / 41
else
0
if
else
0
eval str2num concat , substr , 5num2str #out"sys("
for
Rot 1kp
π2#star
k#out
..GCD1k
sPgon , , , θcGCDGCD
p#star
0truncGCD
q'
GCD
q'
"stellation of a star polygon"10 mar 2013 14:05:03 - PolyProperties
12 / 41
edge of star polygons.
p: number of sides/vertices[must be ≥ 3];
q: connected vertices spacing [{p/q} is the polygon Schläfli symbol];
c: circumradius;
θ: anticlockwise rotation.
if
else
0
#out
eval21
#out21p2
#out
eval11
#out11p2
#out
Rot θ#out#out
for
eval cosp2
kπ2r
21k#out
eval sinp2
kπ2r
11k#out
if
else
ci
c
0trunc2
k
2
kr
.. p20k
sinp2
π2
q'
p2
π2q'
p
π
sin
q'
p2
π2q'
p
c
ci
00#out
3p
min1round , 0
2
p
q
q'
esPgon , , , θcqp
10 mar 2013 14:05:03 - PolyProperties
13 / 41
star-shaped polygons.
s: number of spikes [must be ≥ 3];
c.e: external circumradius;
c.i: internal circumradius;
θ: anticlockwise rotation.
if
else
0
#out
eval21
#out21s2
#out
eval11
#out11s2
#out
Rot θ#out#out
for
eval coss2
kπ2r
21k#out
eval sins2
kπ2r
11k#out
if
else
ci
ce
0trunc2
k
2
kr
.. s20k
00#out
3sssPgon , , , θci
ce
s
triangle.
B: x-length;
H: y-shift of top vertex;
a: x-shift of top vertex;
θ: anticlockwise rotation.
Rot θ
00
Ha
0B
00
triangle , , , θaHB
10 mar 2013 14:05:03 - PolyProperties
14 / 41
right triangle.
B: x-length;
H: y-shift of top vertex;
θ: anticlockwise rotation.
Rot θ
00
H0
0B
00
rTriangle , , θHB
isosceles triangle.
B: x-length;
H: y-shift of top vertex;
θ: anticlockwise rotation.
Rot θ
00
H2
B
0B
00
iTriangle , , θHB
equilateral triangle.
a: side length;
θ: anticlockwise rotation.
Rot θ
00
a2
3
2
a
0a
00
eTriangle , θa
10 mar 2013 14:05:03 - PolyProperties
15 / 41
rhombus.
p: x-diagonal;
q: y-diagonal;
θ: anticlockwise rotation.
Rot θ
02
p
2
q0
02
p
2
q0
02
p
rhombus , , θqp
square.
a: sides length;
θ: anticlockwise rotation.
Rot θ
00
a0
aa
0a
00
square , θa
rectangle.
B: width;
H: height;
θ: anticlockwise rotation.
Rot θ
00
H0
HB
0B
00
rectangle , , θHB
10 mar 2013 14:05:03 - PolyProperties
16 / 41
golden rectangle.
B: width;
θ: anticlockwise rotation.
Rot θ
00
H0
HB
0B
00
φ
BH
2
51φ
goldenRect , θB
rounded rectangle.
h: external height;
b: external width;
r: corner radius;
θ: anticlockwise rotation.
Rot θ#out
stack , , eval row , 1#outeval reverse10
01#out#out#out
stack , eval reverse10
01#out#out#out
if
else
2
h
2
b
#tmp
for
eval r2
hsin
pts
k
2
πr
21k#tmp
eval r2
bcos
pts
k
2
πr
11k#tmp
..pts0k
15pts
00#tmp
0r#outroundedRect , , , θrbh
10 mar 2013 14:05:03 - PolyProperties
17 / 41
parallelogram.
b: base;
a: x-shift of top base;
h: height;
θ: anticlockwise rotation.
Rot θ
00
ha
hab
0b
00
parallelogram , , , θhab
trapezoid.
a: top base;
b: bottom base;
c: x-shift of top base;
h: height;
θ: anticlockwise rotation.
Rot θ
00
ha
hac
0b
00
trapezoid , , , , θhcba
right trapezoid.
a: top base;
b: bottom base;
h: height;
θ: anticlockwise rotation.
Rot θ
00
h0
ha
0b
00
rTrapezoid , , , θhba
10 mar 2013 14:05:03 - PolyProperties
18 / 41
isosceles trapezoid.
a: top base;
b: bottom base;
h: height;
θ: anticlockwise rotation.
Rot θ
00
h2
ab
h2
aba
0b
00
iTrapezoid , , , θhba
L shape.
a: top base;
b: bottom base;
c: top height;
h: total height;
θ: anticlockwise rotation.
Rot θ
00
h0
ha
cha
chb
0b
00
L , , , , θhcba
10 mar 2013 14:05:03 - PolyProperties
19 / 41
T shape.
a: top base;
b: bottom base;
c: top height;
h: total height;
θ: anticlockwise rotation.
Rot θ#out
stack , , eval row , 1#outeval reverse10
01#out#out#out
02
b
ch2
b
ch2
a
h2
a
#out
T , , , , θhcba
circle.
D: diameter.
pgon , , 02
D100circle D
semicircle.
D: diameter;
θ: anticlockwise rotation.
Rot θ#out
stack , eval row , 1#out#out#out
for
eval sinpts
kπ
2
D21k
#out
eval cospts
kπ
2
D11k
#out
..pts0k
100pts
00#outsemicircle , θD
10 mar 2013 14:05:03 - PolyProperties
20 / 41
segmental arch.
r.e: external radius;
r.i: external radius;
ω: inner angle;
θ: anticlockwise rotation.
Rot θ#P
stack , eval row , 1#P#P#P
stack , #P2#P1#P
for
eval sinpts
kω
2
ωπri21kpts
#P2
eval cospts
kω
2
ωπri11kpts
#P2
..0ptsk
50pts
00#P2
for
eval sinpts
kω
2
ωπre21k
#P1
eval cospts
kω
2
ωπre11k
#P1
..pts0k
50pts
00#P1arch , , , θωri
re
10 mar 2013 14:05:03 - PolyProperties
21 / 41
ellipse.
p: x-axis;
q: y-axis;
θ: anticlockwise rotation.
Rot θ#out
stack , eval reverse10
01#out#out#out
for
eval
2
a
11k#out
1b21k
#out
eval kpts
pa
11k#out
..pts0k
40pts
00#out
2
qb
2
pa
ellipse , , θqp
10 mar 2013 14:05:03 - PolyProperties
22 / 41
Hollow Structural Sections.
h: external height;
b: external width;
t: wall thickness;
r.e: external corner radius (typical=2t);
r.i: internal corner radius (typical=t);
θ: anticlockwise rotation.
Rot θstack , eval row , 1#out#out
stack , eval reverse roundrect , , , 0ri
t2bt2hroundrect , , , 0re
bh#outHSSbeam
, , , , , θri
re
tbh
Circular Hollow Sections.
De: external diameter;
t: border thickness.
hPgon , , , 0t2
De
75CHSbeam
, tDe
Elliptical Hollow Sections.
p: external x-axis;
q: external y-axis;
t: wall thickness;
θ: anticlockwise rotation.
Rot θstack , eval row , 1#out#out
stack , eval reverse ellipse , , θt2qt2pellipse , , θqp#outEHSbeam
, , , θtqp
10 mar 2013 14:05:03 - PolyProperties
23 / 41
european I-beam (UE:IPE/HE/HL/HD/HP;UK:UB/UC/UBP; US:W/HP; RU:HG; JP:H).
h: beam height;
b: flange width;
tw: web thickness;
tf: flange thickness;
r: web-flange junction radius;
θ: anticlockwise rotation.
Rot θ#out
stack , , eval row , 1#outeval reverse10
01#out#out#out
stack , eval reverse10
01#out#out#out
stack , #out
tf2
h
2
b
2
h
2
b
#out
if
else
tf2
h
2
tw
#tmp
for
eval rtf2
hsin
pts
k
2
π
2
πr
21k#tmp
eval r2
tw
cospts
k
2
π
2
πr
11k#tmp
..pts0k
25pts
00#tmp
0r#outIbeam
, , , , , θrtf
tw
bh
10 mar 2013 14:05:03 - PolyProperties
24 / 41
european (un)equal legs angles.
h: height;
b: width;
t: thickness;
r1: legs junction radius;
r2: legs corner radius;
θ: anticlockwise rotation.
if
for
eval r2
tcospts
k
2
πr211k
#tmp
..pts0k
30pts
00#tmp
0r2
#P4
if
else
tt
#tmp
for
eval r1
tsinpts
k
2
ππ
2
3r121k
#tmp
eval r1
tcospts
k
2
ππ
2
3r111k
#tmp
..pts0k
30pts
00#tmp
0r1
#P3
if
else
tb
#tmp
for
eval r2
tsinpts
k
2
πr221k
#tmp
eval r2
bcospts
k
2
πr211k
#tmp
..pts0k
30pts
00#tmp
0r2
#P2
0b
00
h0
#P1
Lbeam
, , , , , θr2
r1
tbh
10 mar 2013 14:05:03 - PolyProperties
25 / 41
Rot θ#P
stack , , , , #P5#P4#P3#P2#P1#P
h0#P5
else
ht
#tmp
eval r2
hsinpts
k
2
πr221k
#tmp
european U-beam [DIN 1026-1:2000] (UPN) and parallel flange channels (UPE/PFC).
h: beam height [mm];
b: flange width;
tw: web thickness;
tf: flange thickness;
r1: web-flange junction radius;
r2: flange corner radius (UPE/PFC when r2=0);
θ: anticlockwise rotation.
if
00#tmp
0r2
#P2
2
hb
2
h0
#P1
eval tf
r1
2tw
r1
ubp2hd
if
else
0p
2
bu
if
else
100
5p
2
tw
b
u
100
8p
2
bu
300h
0r2
Ubeam
, , , , , , θr2
r1
tf
tw
bh
10 mar 2013 14:05:03 - PolyProperties
26 / 41
Rot θ#P
stack , , #P5eval reverse10
01#P#P#P
stack , , , #P4#P3#P2#P1#P
2
h0#P5
if
else
tf2
htw
#tmp
for
eval2
dsin
pts
k
2
π
2
πr121k
#tmp
eval r1
tw
cospts
k
2
π
2
πr111k
#tmp
..pts0k
25pts
00#tmp
0r1
#P4
tf2
hub#P3
else
tf2
hb
#tmp
for
eval r2
pr2
utf2
hsin
pts
k
2
πr221k
#tmp
eval r2
bcospts
k
2
πr211k
#tmp
..pts0k
25pts
00#tmp
PSEUDONYMS
CHSbeam
, tDe
ring , tDe
10 mar 2013 14:05:03 - PolyProperties
27 / 41
GEOMETRY
GEOMETRY
polygon coordinates - x y
mmUbeam
, , , , , , °156.513139.585240polygon
polygon
polygon
-0.125 0 0.125
0.125
0.0625
0
-0.0625
-0.125
x
y
Axes conventions
10 mar 2013 14:05:03 - PolyProperties
28 / 41
PLOT SETTINGS
CALCULATIONS OF CROSS-SECTION PROPERTIES
coordinates
eval col , 1polygonx
eval col , 2polygony
vertices (+1)
length xn
perimeter
=
1n
1i
2
iy
1iy
2
ix
1ixP
calculate total length of overlapped segments with opposite wise
eval
#links
for
if
else
0
eval sWiseoWise22
jy
1jy
2
jx
1jx#links#links
0oWise
for
if
else
if
else
0
1sWisesWise
ky
1jy
kx
1jx
1ky
jy
1kx
jx
1oWiseoWise
1ky
1jy
1kx
1jx
ky
jy
kx
jx
..n2jk
0oWisesWise
.. 2n1j
0#links∆P
∆PPP
10 mar 2013 14:05:03 - PolyProperties
29 / 41
area
=
1n
1ii
y1i
x1i
yi
x2
1A
centroid
=
1n
1ii
y1i
x1i
yi
x1i
xi
xA6
1Cx
=
1n
1ii
y1i
x1i
yi
x1i
yi
yA6
1Cy
use centroid as origin
dRound , 10Cx
Cx
dRound , 10Cy
Cy
Cx
xX
Cy
yY
second moments of area (any cross section allowed)
=
1n
1ii
Y1i
X1i
Yi
X2
1iY
1iY
iY
2
iY
12
1JXX
=
1n
1ii
Y1i
X1i
Yi
X2
1iX
1iX
iX
2
iX
12
1JYY
10 mar 2013 14:05:03 - PolyProperties
30 / 41
=
1n
1ii
Y1i
X1i
Yi
Xi
Y1i
X1i
Y1i
X2i
Yi
X21i
Yi
X24
1JXY
output adjustements due to clockwise/anticlockwise vertices definition
dRound , 10PP
AA
JXX
IX
JYY
IY
dRound , 10JXY
IXY
radii of gyration
A
IX
iX
A
IY
iY
elastic section modulus
max Y
IX
Wel;top
10 mar 2013 14:05:03 - PolyProperties
31 / 41
min Y
IX
Wel;bot
min X
IY
Wel;left
max X
IY
Wel;right
orientation of principal axes of inertia (u,v)
if
else
sign IXY4
π
2
π0I
YIX
sign JXX
atanIY
IX
IXY
2
2
1
0dRound , 10IY
IX
α
principal moments of inertia
2IXY
42
IY
IX2
1
2
IY
IX
Iu
2IXY
42
IY
IX2
1
2
IY
IX
Iv
radii of gyration about principal axes of inertia
A
Iu
iu
A
Iv
iv
10 mar 2013 14:05:03 - PolyProperties
32 / 41
plot with centroid as origin
Translate , , Cy
Cx
polygonpolygonC
ellipsoid of gyration
eval stack , , , , , 0iv00i
u0iu000ellipse , , 0eval i
u2eval i
v2ellipsoid
vertices numbering
function to numbering vertices of polygons.
values for opt:
"all" to enumerate all vertices;
### to enumerate vertices spaced at least the ### value;
any other text to disable numbering.
if
for
if
#colorv
#size4c
vn
num2str k3c
vn
2kpgon
2cvn
1kpgon
1cvn
opt#df
opt#dp
eval2
21kpgon
2kpgon
2
11kpgon
1kpgon#d
f
eval2
21kpgon
2kpgon
2
11kpgon
1kpgon#d
p
.. 1r2k
2c
#color#sizeconcat , , ")"num2str r"1("21pgon
11pgonv
n
IsString opt
rows pgonr
verticesnamesize
#size
verticescolor
#colornumbering , optpgon
10 mar 2013 14:05:03 - PolyProperties
33 / 41
else
if
else
00
vn
""3r
vn
concat , , ")"num2str r"1("31
vn
for
eval
#color5k
vn
#size4k
vn
num2str k3k
vn
..r1k
pgonvn
"all"opt
vn
else
0
1cc
#color5c
vn
numbering , verticesnumbering
polygonC
vertices
augment , submatrix , , , , 53rows vertices1verticesRot αsubmatrix , , , , 21rows vertices1verticesverticesuv
10 mar 2013 14:05:03 - PolyProperties
34 / 41
CROSS-SECTION__PROPERTIES polygon refered to centroid
-0.125 0 0.125 0.25
0.125
0.0625
0
-0.0625
-0.125
x
y
82
291(111)
110
G
perimeter
mm775.65P
area
2mm4230.01A
centroid (relative to global coordinates x,y)
mm21.6Cx
mm5.79Cy
second moments of area (relative to centroid)
4cm3373.7I
X
4cm471.96I
Y
4cm837.66I
XY
radii of gyration
cm8.93iX
cm3.34iY
elastic section modulus
3cm255.35W
el;top
3cm277.22W
el;bot
3cm89.62W
el;left
3cm51.55W
el;right
10 mar 2013 14:05:03 - PolyProperties
35 / 41
orientation of principal axes of inertia (u,v) orientation about principal axes of inertia
-0.125 0 0.125
0.125
0.0625
0
-0.0625
-0.125
x
y
82
291(111)
110
G
°15α
principal moments of inertia
4cm3598.15I
u
4cm247.51I
v
radii of gyration about principal axes of inertia
cm9.22iu
cm2.42iv
CALCULATION OF PLASTIC SECTION MODULUS (CREOSS-SECTION HAVE CONSTANT YELDING STRESS)
plastic neutral axis position
polygon area
if
else
0
eval
=
1r
1n2n
pgon11n
pgon21n
pgon1n
pgon2
1
3r
rows pgonrAPpgon
SMath geometry Unit of Measurement
UoM PUoM
check if "polygon" could have multiple areas
eval 0∆PisMultiPgon
search for a Plastic Neutral Axis (PNA).
pgon: polygon matrix;
axis: axis orthogonal to the PNA orientation ["x" or "y"];
mPgon: 1 if is a multiple polygon, 0 otherwise.
10 mar 2013 14:05:03 - PolyProperties
36 / 41
if
for
if
if
p#
plast
0round , 5fp#
Apgon
APchunk , , concat , "-"axisp
#pgon2A
pgonfp#
0round , 5UoM
ptmp
p#
evalk
Pchunk
p#
..11length Pchunk
k
sort col , columnchunk , , concat , "-"axisptarget
pgonPchunk
1targetp
targetptmp
plast
"search PNA regions"
0mPgon
0∆target
bisection , pmax
pmintarget
eval max col , columnpgonpmax
eval min col , columnpgonpmin
if
else
if
else
bisection , Ubound
p
bisection , pLbound
0fp
p
0fp
eval round , 5Apgon
APchunk , , concat , "-"axisppgon2A
pgonfp
2
Ubound
Lbound
p
bisection , Ubound
Lbound
AApgon
eval "y"axis1columnPNAhunter
, , mPgonaxispgon
10 mar 2013 14:05:03 - PolyProperties
37 / 41
∆target
target
else
0
for
if
else
0
p#
ptmp
if
else
break
if
else
0
1target
2target∆
target
plast2
target
ptarget
plast
p#
plast
0round , 5fp#
Apgon
APchunk , , concat , "-"axisp
#pgon2A
pgonfp#
0round , 5UoM
ptmp
p#
evalk
Pchunk
p#
..length Pchunk
2k
ptarget
ptmp
plast
sort col , columnchunk , , concat , "+"axisptarget
pgonPchunk
else
0
p#
ptmp
else
break
plast1
target
#last10 mar 2013 14:05:03 - PolyProperties
38 / 41
PNA x-position
eval PNAhunter
, , isMultiPgon"x"polygonPNA
eval1
PNAPNAx
eval2
PNAPNA∆x
PNA y-position
eval PNAhunter
, , isMultiPgon"y"polygonPNA
eval1
PNAPNAy
eval2
PNAPNA∆y
allowable region for PNAs
Translate , , Cy
1PNA
yCx
1PNA
xrectangle , , 0PNA
∆yPNA
∆xPNAs
BOX
PNA infos to plot
#P
for
eval stack ,PNA
colorPNA
namesizePNA
name2kPNAs
BOX1k
PNAsBOX
PNAcolor
PNAsymbolsize
PNAsymbol2k
PNAsBOX
1kPNAs
BOX
#P#P
..21k
centroidcolor
centroidnamesize
centroidname00
centroidcolor
centroidsymbolsize
centroidsymbol00
#P
PNAsplot
script has found discontinuous equal areas; green box/line show the PNAs region0msg1
PNAs and plastic section modulus calculated for equal areas0msg2
if
description msg2
0PNA∆y
0PNA∆x
msg
10 mar 2013 14:05:03 - PolyProperties
39 / 41
else
description msg2
plastic section modulus
PNAx;y
Cnp
Anp
PNAx;y
Cpp
App
eval
=
1r
1ii
y1i
x1i
yi
x1i
yi
yAnp
6
1Cnp
AP#chunkA
np
rows #chunkr
col , 2#chunky
col , 1#chunkx
chunk , , "y-"PNAx;y
#pgon#chunk
eval
=
1r
1ii
y1i
x1i
yi
x1i
yi
yApp
6
1Cpp
AP#chunkA
pp
rows #chunkr
col , 2#chunky
col , 1#chunkx
chunk , , "y+"PNAx;y
#pgon#chunk
if
else
eval pgon
eval Rot2
πpgon
"x"axis#pgonWpl
, , axisPNAx;y
pgon
plastic section modulus (x)
Wpl
, , "y"1
PNAy
polygonWpl;x
plastic section modulus (y)
Wpl
, , "x"1
PNAx
polygonWpl;y
10 mar 2013 14:05:03 - PolyProperties
40 / 41
plastic neutral axes (relative to global coordinates x,y)
1PNAx
PNAx
1PNAy
PNAy
plastic neutral axes (relative to centroid)
Cx
PNAx
PNAX
Cy
PNAy
PNAY
PLASTIC__SECTION__MODULUS plastice neutral axes center/region
-0.125 0 0.125
0.125
0.0625
0
-0.0625
-0.125
x
y
ZGZ
plastic neutral axes (relative to global coordinates x,y)
mm15.92PNAx
mm1.23PNAy
plastic neutral axes (relative to centroid)
mm5.68PNAX
mm4.56PNAY
plastic section modulus
3cm345.42W
pl;x
3cm111.7W
pl;y
note: "PNAs and plastic section modulus calculated for equal areas"
10 mar 2013 14:05:03 - PolyProperties
41 / 41
top related