PolyProperties

PolyProperties - A script to calculate properties of generic polygons - Сообщения

#1 Опубликовано: 08.03.2013 16:11:13
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: 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 КиБ) скачан 345 раз(а).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
4 пользователям понравился этот пост
Martin Kraska 09.03.2013 06:10:00, sergio 09.03.2013 14:11:00, Andrey Ivashov 09.03.2013 18:46:00, Fridel Selitsky 08.03.2013 18:17:00
#2 Опубликовано: 09.03.2013 06:43:49
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: 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 Опубликовано: 09.03.2013 07:43:27
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: 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 Опубликовано: 09.03.2013 08:49:10
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: 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 пользователям понравился этот пост
Davide Carpi 09.03.2013 09:20:00
#5 Опубликовано: 04.06.2013 02:54:03
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: 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 пользователям понравился этот пост
Radovan Omorjan 04.06.2013 03:16:00
#6 Опубликовано: 03.09.2013 14:16:45
sublim21

sublim21

3 сообщений из 36 понравились пользователям.

Группа: 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 Опубликовано: 03.09.2013 18:20:09
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: 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 Опубликовано: 24.09.2018 03:40:53
Daniel Compel

Daniel Compel

0 сообщений из 6 понравились пользователям.

Группа: 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 Опубликовано: 24.09.2018 04:27:16
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

of course it is possible

Ibeam_ha.sm (23 КиБ) скачан 143 раз(а).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#10 Опубликовано: 24.09.2018 06:13:47
Daniel Compel

Daniel Compel

0 сообщений из 6 понравились пользователям.

Группа: User

Wrote

of course it is possible

Ibeam_ha.sm (23 КиБ) скачан 143 раз(а).



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 Опубликовано: 24.09.2018 07:55:01
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: 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 пользователям понравился этот пост
NDTM Amarasekera 24.09.2018 10:54:00, frapuano 24.09.2018 08:13:00, sergio 24.09.2018 08:19:00, Fridel Selitsky 24.09.2018 08:32:00, bdrunagle 24.09.2018 10:49:00, Вячеслав Мезенцев 24.09.2018 15:36:00, Andrey Ivashov 24.09.2018 17:12:00
#12 Опубликовано: 24.09.2018 15:46:18
Вячеслав Мезенцев

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

1402 сообщений из 1708 понравились пользователям.

Группа: Moderator

2018-09-24_23-45-46.png
Russia ☭ forever, Viacheslav N. Mezentsev
3 пользователям понравился этот пост
Davide Carpi 24.09.2018 16:17:00, NDTM Amarasekera 24.09.2018 21:45:00, IVR 25.09.2018 15:12:00
#13 Опубликовано: 25.09.2018 08:26:56
sergio

sergio

115 сообщений из 329 понравились пользователям.

Группа: User

Davide,
I find this error in the PolyProperties.sm file (also in the definition of CHS_beam)
[albumimg]1515[/albumimg]
sergio
1 пользователям понравился этот пост
Davide Carpi 26.09.2018 07:00:00
#14 Опубликовано: 25.09.2018 13:34:15
Daniel Compel

Daniel Compel

0 сообщений из 6 понравились пользователям.

Группа: 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 Опубликовано: 25.09.2018 15:14:03
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

... construction for novice.

Hbeam.PNG
#16 Опубликовано: 26.09.2018 07:51:26
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: 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 пользователям понравился этот пост
sergio 26.09.2018 08:26:00
#17 Опубликовано: 26.09.2018 08:25:52
Вячеслав Мезенцев

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

1402 сообщений из 1708 понравились пользователям.

Группа: 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 Опубликовано: 26.09.2018 10:15:19
Daniel Compel

Daniel Compel

0 сообщений из 6 понравились пользователям.

Группа: 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 Опубликовано: 26.09.2018 10:36:02
Вячеслав Мезенцев

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

1402 сообщений из 1708 понравились пользователям.

Группа: 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 Опубликовано: 26.09.2018 10:57:35
Daniel Compel

Daniel Compel

0 сообщений из 6 понравились пользователям.

Группа: 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
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений