Kerry,
But first :
I'd rethink the concept of grid lines.
I'd be thinking of 'zones' . The labelling could be the same as your proposal.
The 'Zone' could be the space between imaginary dividing lines that contain each point.
You could draw the dividing lines to assist with visual checking of the process.
It looks like your approach is similar to what I have seen while searching for a better algorithm. In their approach they created a grid of tiles and checked for points within. If found, the point was modified.
I'd assume you have a minimum / maximum space in mind ?? ( not critical, but it would help )
- The column spacing is usually consistent, but the row spacing can vary.
- There are instances where a column may not have the same number of points.
- There is a maximum number of points that can reside in each column. This is what is used to define each section.
- The sections may or may not have extra space between them.
You'd need to select [ all ] the points to determine the extents of the collection.
Each group of points is in a block. The block is defined by a polyline boundary drawn by hand. I currently use this polyline to select the points within it.
The complexity of the sorting algorithm will depend on the regularity of the arrangement.
How will you handle 'stray' points ?
So far, the point irregularity is less than half of the grid spacing in either direction.
Would the naming convention be consistent ?
For each project, yes. There are some variances between clients that require changes in the names. For the attached image, the names would be Block-Section-Column-Row (104-1-2-A).
You may need to provide X and Y axis markers for the spacing direction, to guide the sorting. A rotated block marker would work. The block could be located at one of the predetermined (say bottom-left ) extreme corners of the arrangement perhaps.
I currently ask the user to select complete columns of points across all sections. These are used to determine the row spacing.
I will start with a list of point objects inside of the block polyline. I then take the list of user selected points and get the Y value at the limits of each section. I use these to get the points within that section.
I then sort the points (W to E, N to S) and then iterate the list to add the names. When I get to the bottom of the column (based on Y coordinate), I reset the name counters.
I assume the objects would be 'POINTS' .
What action would the function perform, other than determining the naming designations. ?
add data ?
There may be a need to correct the irregularities and align the points to a grid.
return a list of names >
return a list of names and points ?
write (what) data to a file ?
For our usage, changing the name of the Civil 3D cogopoint and adding the individual designations to user defined properties is needed. The attached image is of an actual drawing and not overly simplified like my first post. My goal with this post is to see if there is a better approach to accomplish this. I would also like to eliminate as much user interaction as possible.
Thank you for your feedback.
Stacy