Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages<12
Options
Go to last post Go to first unread
Offline Jean Giraud  
#21 Posted : 26 September 2018 18:23:30(UTC)
Jean Giraud


Rank: Advanced Member

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 4,899
Canada

Was thanked: 802 time(s) in 636 post(s)
Originally Posted by: Flenders Go to Quoted Post
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

Offline Flenders  
#22 Posted : 26 September 2018 21:34:04(UTC)
Flenders

Rank: Newbie

Groups: Registered
Joined: 18/09/2018(UTC)
Posts: 6
Slovakia

Originally Posted by: Jean Giraud Go to Quoted Post
Originally Posted by: Flenders Go to Quoted Post
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 Good

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

Edited by user 27 September 2018 08:26:55(UTC)  | Reason: Not specified

Offline uni  
#23 Posted : 26 September 2018 22:08:27(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,090
Man
Russian Federation

Was thanked: 969 time(s) in 554 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
💰 Support me for plugins development: https://money.yandex.ru/to/410013245578758/100
Offline Davide Carpi  
#24 Posted : 27 September 2018 01:13:45(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,312
Man
Italy
Location: Italy

Was thanked: 1167 time(s) in 768 post(s)
Originally Posted by: Flenders Go to Quoted Post
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 a donation to SMath Studio; for personal contributions to me: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 27/09/2018(UTC)
Users browsing this topic
2 Pages<12
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.