PolyProperties

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

#21 Опубликовано: 26.09.2018 12:23:30
Jean Giraud

Jean Giraud

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

Группа: User

Wrote

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.


My understanding is that you want to scale on a fixed canvas.

Ubeam.PNG

#22 Опубликовано: 26.09.2018 15:34:04
Daniel Compel

Daniel Compel

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

Группа: User

Wrote

Wrote

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.


My understanding is that you want to scale on a fixed canvas.



Im gonna explain it graphically

1) on the right you can see stretching of the addon graph
2) on the left you can see fixed XY axis ratio

gif.gif
#23 Опубликовано: 26.09.2018 16:08:27
Вячеслав Мезенцев

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

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

Группа: Moderator

Ok, now I see. You need some CAD features for the graph. I wanted to make a separate plug-in for this (based on Opens-CAD). But there is no time for this.

I'll think about what I can do here.
Russia ☭ forever, Viacheslav N. Mezentsev
#24 Опубликовано: 26.09.2018 19:13:45
Davide Carpi

Davide Carpi

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

Группа: Moderator

Wrote

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?



About this case in particular:
- The violet area isn't hard to draw, there is a chunk() algorithm in my worksheet provided to trim polygons;
- Green area is slightly more complicated, but starting from the polygon above you can search the leftmost points and then you can insert in amid the four rectangle's corners (in the correct order, the opposite of the inner figure);
- Red line length: the simplest thing is to create the clipped violet polygon, calculate the perimeter, find the leftmost points and subtract the difference of their y-coordinates


If you want something more general, you can implement a clipping algorithm in SMath code (would be very nice);

You can even use an already backed Clipping library (f.e. here we have the GPC Wrapper, that however has license limitations);
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
sergio 27.09.2018 08:38:00
#25 Опубликовано: 07.01.2022 20:50:32
Mo

Mo

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

Группа: User

Hi Davide, and thanks for this wonderful sheet.
I found a bug in the sheet, for some reason all the rectangle solid or hollow sections don't work. I am using build 7822.
I tried to test your code and for some reason, the compounded matrix created from your shape functions does not end up being a matrix with "n" rows and "2" columns but rather a matrix in a matrix and I don't know why
1.png
2.png
#26 Опубликовано: 08.01.2022 08:03:22
sergio

sergio

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

Группа: User

Mido0,
try to update, because with the current release it doesn't seem to have problems

Показать спойлер



sergio
#27 Опубликовано: 10.01.2022 13:35:52
Mo

Mo

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

Группа: User

Thanks Pompelmo, I updated my Smath and still the problem exists!!
Itried to uninstall all Smath and reinstall it again with the same problem!!
fig.png
#28 Опубликовано: 10.01.2022 14:26:23
Davide Carpi

Davide Carpi

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

Группа: Moderator

Just change p2:roundedRect(...) optimization from symolic to numeric.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
Mo 10.01.2022 19:19:00
#29 Опубликовано: 10.01.2022 17:39:14
Alvaro Diaz Falconi

Alvaro Diaz Falconi

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

Группа: User

In my personal experience, the stack and agument functions, along with other allies such as reverse and matrix, always manage to cause some kind of issue. The issue also is related about where the evaluation appear, or the function, or something else. The attached shows the issue in an isolated environment.

roundedRect.pdf (124 КиБ) скачан 61 раз(а).
roundedRect.sm (24 КиБ) скачан 57 раз(а).

With those two evals it seems that roundedRect works, for numeric and symbolic evaluations.

img.png

Best regards.
Alvaro.
1 пользователям понравился этот пост
Mo 10.01.2022 18:24:00
#30 Опубликовано: 10.01.2022 18:25:39
Mo

Mo

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

Группа: User

THANK YOU, Davide !!!, THANK YOU, Razonar!!!
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений