ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Polygon / Polyline Points - Tidyup Horizontal / Vertical vortexes
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

andyhill

Australia
137 Posts

Posted - Feb 09 2025 :  14:20:28  Show Profile  Reply
User draws polygon by tracing floor plan image where the end result (polygon points) need fine tuning:-

X1 = 100, Y1 = 101, X2 = 503, Y2 = 105
X3 = 507, Y1 = 102, X4 = 503, Y2 = 305

becomes

X1 = 100, Y1 = 100, X2 = 500, Y2 = 100
X3 = 500, Y3 = 100, X4 = 500, Y4 = 300

Many years ago there was a Delphi CAD library that had an "iso" option to tidy up points, can we do this with ImageEn points ?

If not can anyone show me an optimized way ? Obviously there would need to be a tolerance factor.

Andy

xequte

38796 Posts

Posted - Feb 09 2025 :  18:09:35  Show Profile  Reply
Hi Andy

When sizing, you can force alignment using:

https://www.imageen.com/help/TImageEnView.LayersSnapDist.html

Otherwise you can iterate over the points yourself and apply your own snapping algorithm:

pt.X := Round( IESnapValue( pt.X, Snap_Distance ));

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

andyhill

Australia
137 Posts

Posted - Feb 11 2025 :  13:23:49  Show Profile  Reply
Thanks Nigel, will test

Andy
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: