Puzzle, make solid smooth objects (1 Viewer)

namliam

The Mailman - AWF VIP
Local time
Today, 05:56
Joined
Aug 11, 2003
Messages
11,680
So I have a collection of coordinates longitude and latitude.... From these I am trying to create a "smooth" free form, but all I seem to be able to get is crap with holes in it

Even trying to sort out Up, Down, Left and Right, I seem to be getting gaps that I dont really want.

When you run the code as is, it will create a somewhat small object that looks OK at about row 63 column J, which you can stretch to match the current green object you can see in the excel.
Behind it is a red object I made manually based on the green object, to show the gaps I dont want (ignore the outer edges, manual error)

How from my set of data would I be able to draw a "proper" shape like the red object? I been :banghead: trying to fix the shape, but for the life of me I cant seem to manage

Best I managed was to completely ignore the left and right edges but that seems to make them too cluncky

Anyone able to (using code, not manually) make things work "smoother" ???

P.S. please ignore all the commented lines etc, it is a work in progress :)
 

Attachments

  • Smooth shape.zip
    27.8 KB · Views: 50

CJ_London

Super Moderator
Staff member
Local time
Today, 04:56
Joined
Feb 19, 2013
Messages
12,585
Had a quick look at the code and images and it seems to me you need an additional function 'ignore if within bounds' as it appears some coordinates need to be ignored if they are within the shape.

However no suggestions how to do this.

Other thought - a bit off the wall - is to come at this from the other direction.

Start off with a blue or black square,
complete your boundaries
remove the black outside the boundaries
recolour all internal colours green
 

Rx_

Nothing In Moderation
Local time
Yesterday, 21:56
Joined
Oct 22, 2009
Messages
2,803
Sorry I won't have time to review the download today. I think CJ_London has a good solution. Searched my notes for Overlap. This large document is a set of other postings on the Internet. Go to the end of document.
There was a step-by-step example of using overlapping drawing objects over a set of data. It seemed that it describes the boundaries and interior as necessary. Thanks and Credit go to CJ_London for pointing this out.

While it doesn't include the specific code for this, it might help verify the requirements for a coding solution.

See Attachment - zip of Word Doc
 

Attachments

  • VBA_Drawing_withExcel 2007-VRx2.zip
    109 KB · Views: 296

Users who are viewing this thread

Top Bottom