PolyProperties - A script to calculate properties of generic polygons - Messages
#1 Posted: 3/8/2013 4:11:13 PM
Hi all,
This is a SMath Studio worksheet to calculate properties of generic polygons (perimeter, area, centroid, second moment of area, radius of gyration, elastic section modulus, plastic section modulus, orientation of principal axes of inertia, principal moments of inertia, radii of gyration about principal axes of inertia); the script contains a wide range of shortcuts to plot and transform the most common polygons.
Below attached the very first version (OUTDATED), look in the gallery for the latest revision.
PolyProperties_2013.02.01.sm (969 KiB) downloaded 350 time(s).
This is a SMath Studio worksheet to calculate properties of generic polygons (perimeter, area, centroid, second moment of area, radius of gyration, elastic section modulus, plastic section modulus, orientation of principal axes of inertia, principal moments of inertia, radii of gyration about principal axes of inertia); the script contains a wide range of shortcuts to plot and transform the most common polygons.
- download from extension's page: http://smath.info/view/PolyProperties
- download from inside the program: SMath Studio: Tools > Plugins... > Examples > Online Gallery;
- UI languages:
Below attached the very first version (OUTDATED), look in the gallery for the latest revision.
PolyProperties_2013.02.01.sm (969 KiB) downloaded 350 time(s).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
4 users liked this post
Martin Kraska 3/9/2013 6:10:00 AM, sergio 3/9/2013 2:11:00 PM, Andrey Ivashov 3/9/2013 6:46:00 PM, Fridel Selitsky 3/8/2013 6:17:00 PM
#2 Posted: 3/9/2013 6:43:49 AM
Hi Davide,
great stuff (as usual). Unfortunately I was only able to open the file with the portable version of SMath. The installed version throws an "empty stack" error message, even if all external plugins are disabled.
I wonder if you could take advantage of the gpc plugin or extend it with your functions. Of course, this proposal collides with the problem reported above.
There is a gpc topic in the russian forum.
Martin
great stuff (as usual). Unfortunately I was only able to open the file with the portable version of SMath. The installed version throws an "empty stack" error message, even if all external plugins are disabled.
I wonder if you could take advantage of the gpc plugin or extend it with your functions. Of course, this proposal collides with the problem reported above.
There is a gpc topic in the russian forum.
Martin
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#3 Posted: 3/9/2013 7:43:27 AM
Thank you Martin, 
The issue is related with a previously reported SMath bug: str2num problems with regional settings (2nd post); Waiting for the official fix, I've reuploaded the file with an hidden hack (I've used the greek semicolon ; instead of the latin semicolon ; ).
About the GPC plugin I think will be useful an english translation for this side of the forum (all examples and screenshots are in russian)
best regards,
w3b5urf3r


The issue is related with a previously reported SMath bug: str2num problems with regional settings (2nd post); Waiting for the official fix, I've reuploaded the file with an hidden hack (I've used the greek semicolon ; instead of the latin semicolon ; ).
About the GPC plugin I think will be useful an english translation for this side of the forum (all examples and screenshots are in russian)
best regards,
w3b5urf3r
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#4 Posted: 3/9/2013 8:49:10 AM
Hi Davide,
the modified file works, thank you. In the german handbook there is a section on the gpc plugin, explaining the matrix object structure. Also, the functions of the plugin (all starting with gpc_) are listed and shortly explained in the function reference part (best access via index).
Perhaps the essential part is the matrix format.
[MATH lang=ENG]mat(r,range(el(p.,1),el(p.,r)),range(range(el(x,1,1),el(x,1,el(p,1))),range(el(x,r,1),el(x,r,el(p,r)))),p,range(el(f.,1),el(f.,r)),range(range(el(y,1,1),el(y,1,el(p,1))),range(el(y,r,1),el(y,r,el(p,r)))),2,3)[/MATH]
r: number of boundaries
p: number vertices
p.i is the number of vertices in the i-th boundary
f.i is the hole-flag. 1=boundary defines a hole, 0 otherwise
x[i;j is the vertex co-ordinate of the j-th vertex in the i-th boundary.
The matrix has 1 + r + sum(p[i) columns.
some day I shall add some examples to the handbook, e.g. for area and centroid calculation.
Martin
the modified file works, thank you. In the german handbook there is a section on the gpc plugin, explaining the matrix object structure. Also, the functions of the plugin (all starting with gpc_) are listed and shortly explained in the function reference part (best access via index).
Perhaps the essential part is the matrix format.
[MATH lang=ENG]mat(r,range(el(p.,1),el(p.,r)),range(range(el(x,1,1),el(x,1,el(p,1))),range(el(x,r,1),el(x,r,el(p,r)))),p,range(el(f.,1),el(f.,r)),range(range(el(y,1,1),el(y,1,el(p,1))),range(el(y,r,1),el(y,r,el(p,r)))),2,3)[/MATH]
r: number of boundaries
p: number vertices
p.i is the number of vertices in the i-th boundary
f.i is the hole-flag. 1=boundary defines a hole, 0 otherwise
x[i;j is the vertex co-ordinate of the j-th vertex in the i-th boundary.
The matrix has 1 + r + sum(p[i) columns.
some day I shall add some examples to the handbook, e.g. for area and centroid calculation.
Martin
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
Davide Carpi 3/9/2013 9:20:00 AM
#5 Posted: 6/4/2013 2:54:03 AM
Added to the Gallery (SMath Studio 0.96.4902) 
best regards,
w3b5urf3r

best regards,
w3b5urf3r
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 users liked this post
Radovan Omorjan 6/4/2013 3:16:00 AM
#6 Posted: 9/3/2013 2:16:45 PM
Excellent Job Man. I was working on something similar. I'll post my version when it's ready.
Also, love that you licensed your work the way you did.
-Pete
Also, love that you licensed your work the way you did.
-Pete
#7 Posted: 9/3/2013 6:20:09 PM
WroteExcellent Job Man. I was working on something similar. I'll post my version when it's ready.
Also, love that you licensed your work the way you did.
-Pete
Cool, I'll wait your worksheet

If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#8 Posted: 9/24/2018 3:40:53 AM
Hello,
Firstly, let me thank you for such a wonderful work. It is amazing sheet.
To the point, Is it possible to arrange the calculation for horizontally asymmetric I profile? Such as following

Thank you!
Firstly, let me thank you for such a wonderful work. It is amazing sheet.
To the point, Is it possible to arrange the calculation for horizontally asymmetric I profile? Such as following

Thank you!
#9 Posted: 9/24/2018 4:27:16 AM
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#10 Posted: 9/24/2018 6:13:47 AM
Wroteof course it is possible
Ibeam_ha.sm (23 KiB) downloaded 145 time(s).
Thank you for such a prompt response

If you dont mind, I would like to ask you for short explanation. Ive tried to make it by myself, everything was clear except the part with the fillet. Ive got it flipped around vertical axis. I would really appreciate short explanation to understand it completely

Thank you again
Daniel
#11 Posted: 9/24/2018 7:55:01 AM
Sure! 
First of all what we want to archieve is to draw the shape using less points and operations as possible.
(I've cleared the eval() that aren't needed)
About the fillet...
That's all, I think

First of all what we want to archieve is to draw the shape using less points and operations as possible.
- Taking advantage of the symmetry we draw one side
- Once we have the points, the other side can be drawn by symmetry using the symmetry matrix multiplication, then stacking the points; the problem is that they aren't sorted in the correct order
- This can be solved by using the reverse() function
- To close the figure then what you need is only to add as last point the first
(I've cleared the eval() that aren't needed)
About the fillet...
- You can draw a counterclockwise arc in this way:
k/pts*pi/2 is the angle at each loop, and increments from 0 to pi/2 as k increments from 0 to pts - You can add pi to the angles above to have the arc with the correct order of points and the right orientation (remember that we are drawing the RHS of the shape)
- You have only to shift it from the origin to the correct location
That's all, I think

If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
7 users liked this post
NDTM Amarasekera 9/24/2018 10:54:00 AM, frapuano 9/24/2018 8:13:00 AM, sergio 9/24/2018 8:19:00 AM, Fridel Selitsky 9/24/2018 8:32:00 AM, bdrunagle 9/24/2018 10:49:00 AM, Вячеслав Мезенцев 9/24/2018 3:36:00 PM, Andrey Ivashov 9/24/2018 5:12:00 PM
#13 Posted: 9/25/2018 8:26:56 AM
Davide,
I find this error in the PolyProperties.sm file (also in the definition of CHS_beam)
[albumimg]1515[/albumimg]
sergio
I find this error in the PolyProperties.sm file (also in the definition of CHS_beam)
[albumimg]1515[/albumimg]
sergio
1 users liked this post
Davide Carpi 9/26/2018 7:00:00 AM
#14 Posted: 9/25/2018 1:34:15 PM
#15 Posted: 9/25/2018 3:14:03 PM
#16 Posted: 9/26/2018 7:51:26 AM
WroteDavide,
I find this error in the PolyProperties.sm file (also in the definition of CHS_beam)
sergio
Thank you, updated (in the gallery)

If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 users liked this post
sergio 9/26/2018 8:26:00 AM
#17 Posted: 9/26/2018 8:25:52 AM
WroteUni, your graph addon is amazing, but I have one question. How can I lock the X-Y ratio of the graph?
I'm not sure that this is possible.
Russia ☭ forever, Viacheslav N. Mezentsev
#18 Posted: 9/26/2018 10:15:19 AM
WroteWroteUni, your graph addon is amazing, but I have one question. How can I lock the X-Y ratio of the graph?
I'm not sure that this is possible.
It works perfectly with standard plot. If you want to change the ratio of X-Y axes you just hold either shift or control while graph is selected and scroll up / down. would be perfect to have an option to have it like that with your addon, so you can lock ratio of X-Y to 1:1.
Or maybe Im just picky but its a major option for me since I use graphing as visual check of designed profile and i want it to be in 1:1 ratio.

Anyways your addon is still really good.

#19 Posted: 9/26/2018 10:36:02 AM
WroteIf you want to change the ratio of X-Y axes you just hold either shift or control while graph is selected and scroll up / down.
This works with X-Y Plot too.
Russia ☭ forever, Viacheslav N. Mezentsev
#20 Posted: 9/26/2018 10:57:35 AM
I would have another question regarding poly properties,
I think Ive made a lot of progress but Im stuck on one particular problem.
1) How can I substract areas of these polygons? Either green or violet area.
2) How can I calculate length of red line in overlapping area?
Ive looked up definitions in polyproperties but didnt come up with anyting working. Ive made these polygons with standard methods reversed from Davide Carpi post and his polyprop sheet.

Thank you for any help!
Daniel
I think Ive made a lot of progress but Im stuck on one particular problem.
1) How can I substract areas of these polygons? Either green or violet area.
2) How can I calculate length of red line in overlapping area?
Ive looked up definitions in polyproperties but didnt come up with anyting working. Ive made these polygons with standard methods reversed from Davide Carpi post and his polyprop sheet.
Thank you for any help!
Daniel
-
New Posts
-
No New Posts