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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Polygon / Polyline Points - Tidyup Horizontal / Vertical vortexes

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
andyhill Posted - Feb 09 2025 : 14:20:28
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
2   L A T E S T    R E P L I E S    (Newest First)
andyhill Posted - Feb 11 2025 : 13:23:49
Thanks Nigel, will test

Andy
xequte Posted - Feb 09 2025 : 18:09:35
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