Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,866 Was thanked: 981 time(s) in 809 post(s)
|
Originally Posted by: Flenders 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.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 18/09/2018(UTC) Posts: 6
|
Originally Posted by: Jean Giraud Originally Posted by: Flenders 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 Edited by user 27 September 2018 08:26:55(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
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 |
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,647 Location: Italy Was thanked: 1329 time(s) in 875 post(s)
|
Originally Posted by: Flenders 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 consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 10/01/2017(UTC) Posts: 31 Location: Alberta
|
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
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/12/2011(UTC) Posts: 319 Location: italy Was thanked: 109 time(s) in 93 post(s)
|
Mido0, try to update, because with the current release it doesn't seem to have problems
sergio
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 10/01/2017(UTC) Posts: 31 Location: Alberta
|
Thanks Pompelmo, I updated my Smath and still the problem exists!! Itried to uninstall all Smath and reinstall it again with the same problem!!
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,647 Location: Italy Was thanked: 1329 time(s) in 875 post(s)
|
Just change p2:roundedRect(...) optimization from symolic to numeric. |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 28/08/2014(UTC) Posts: 1,356 Was thanked: 815 time(s) in 516 post(s)
|
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 (125kb) downloaded 11 time(s). roundedRect.sm (25kb) downloaded 18 time(s).With those two evals it seems that roundedRect works, for numeric and symbolic evaluations. Best regards. Alvaro. Edited by user 10 January 2022 23:52:49(UTC)
| Reason: Not specified
|
1 user thanked Razonar for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 10/01/2017(UTC) Posts: 31 Location: Alberta
|
THANK YOU, Davide !!!, THANK YOU, Razonar!!!
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.