PolyProperties

PolyProperties - A script to calculate properties of generic polygons - Messages

#1 Posted: 3/8/2013 4:11:13 PM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

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 344 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
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

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
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
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

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



Mappa caratteri.png
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
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

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
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
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

Added to the Gallery (SMath Studio 0.96.4902)


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
sublim21

sublim21

3 likes in 36 posts.

Group: User

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
#7 Posted: 9/3/2013 6:20:09 PM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

Wrote

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


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
Daniel Compel

Daniel Compel

0 likes in 6 posts.

Group: User

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
Asymmetric profile

Thank you!
#9 Posted: 9/24/2018 4:27:16 AM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

of course it is possible

Ibeam_ha.sm (23 KiB) downloaded 141 time(s).
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
Daniel Compel

Daniel Compel

0 likes in 6 posts.

Group: User

Wrote

of course it is possible

Ibeam_ha.sm (23 KiB) downloaded 141 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 . Maybe with simple sketch ?! No need to hurry.

Thank you again

Daniel
#11 Posted: 9/24/2018 7:55:01 AM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

Sure!

First of all what we want to archieve is to draw the shape using less points and operations as possible.

  1. Taking advantage of the symmetry we draw one side
    01.png

  2. 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
    02.png

  3. This can be solved by using the reverse() function
    03.png

  4. To close the figure then what you need is only to add as last point the first
    04.png


(I've cleared the eval() that aren't needed)

About the fillet...

  1. You can draw a counterclockwise arc in this way:
    fillet - 01.png

    k/pts*pi/2 is the angle at each loop, and increments from 0 to pi/2 as k increments from 0 to pts

  2. 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)
    fillet - 02.png

  3. You have only to shift it from the origin to the correct location
    fillet - 03.png


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
#12 Posted: 9/24/2018 3:46:18 PM
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

2018-09-24_23-45-46.png
Russia ☭ forever, Viacheslav N. Mezentsev
3 users liked this post
Davide Carpi 9/24/2018 4:17:00 PM, NDTM Amarasekera 9/24/2018 9:45:00 PM, IVR 9/25/2018 3:12:00 PM
#13 Posted: 9/25/2018 8:26:56 AM
sergio

sergio

115 likes in 329 posts.

Group: User

Davide,
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
Daniel Compel

Daniel Compel

0 likes in 6 posts.

Group: User

First of all, Thank you Davide Carpi! Amazing work!



Wrote

2018-09-24_23-45-46.png



Uni, your graph addon is amazing, but I have one question. How can I lock the X-Y ratio of the graph?

Bez nazvu.jpg

Thank you,

Daniel.
#15 Posted: 9/25/2018 3:14:03 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... construction for novice.

Hbeam.PNG
#16 Posted: 9/26/2018 7:51:26 AM
Davide Carpi

Davide Carpi

1417 likes in 2873 posts.

Group: Moderator

Wrote

Davide,
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
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Wrote

Uni, 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
Daniel Compel

Daniel Compel

0 likes in 6 posts.

Group: User

Wrote

Wrote

Uni, 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
Вячеслав Мезенцев

Вячеслав Мезенцев

1402 likes in 1708 posts.

Group: Moderator

Wrote

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.


This works with X-Y Plot too.
Russia ☭ forever, Viacheslav N. Mezentsev
#20 Posted: 9/26/2018 10:57:35 AM
Daniel Compel

Daniel Compel

0 likes in 6 posts.

Group: User

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.

aaa.png

Thank you for any help!

Daniel
  • New Posts New Posts
  • No New Posts No New Posts