Jump to content

Automatically placing borehole tables with leaders without overlap


Recommended Posts

Posted (edited)

Hi everyone,

I’m working on a complex borehole location drawing in AutoCAD with many boreholes and corresponding data tables. When a new borehole is added, I would like to have an AutoLISP routine that can automatically place a new table and leader for that borehole without overlapping the existing tables.

The layout concept is roughly like the attached image:

Each borehole is a point/block near the center of the drawing.

Each borehole has a data table placed outside the central cluster.

A leader (polyline or multileader) connects the borehole to its table, using straight segments and preferably angles that are multiples of 60 degrees (or similar fixed angles).

When space on one side is not available, the routine should try other directions until it finds a free spot between the existing tables.

What I would like the routine to do is:

Take the new borehole (block or point) as input.

Use a standard table block (or AutoCAD table) with a known size and insertion point.

Search along several radial directions (0°, 60°, 120°, 180°, 240°, 300° or similar) at a given distance to find a position where the table’s bounding box does not overlap existing tables or a central “no‑go” area.

Insert the new table at the first (or best) free position and draw the leader from the borehole to the table with clean, orthogonal/60° segments.

I have some AutoLISP experience and I’m thinking about using:

Block/table bounding boxes (vla-getBoundingBox) for collision checks.

Simple rectangle overlap tests to avoid collisions.

Polar coordinates for candidate positions at fixed angles and distances.

Before I start building this “placement engine” from scratch, I’d really like your feedback:

Has anyone already written something similar (automatic table/label placement around a central cluster, avoiding overlaps)?

From your experience, is this approach (block + attributes + leader + bounding‑box collision tests) reasonable, or is there a better pattern?

Any tips on robust overlap detection or examples of similar LISP routines you recommend looking at?

Would you implement this with standard tables, block attributes, or something else for the borehole information ?

Any ideas, sample code, or links to existing routines would be greatly appreciated. Thanks in advance for your time and suggestions!

 

** Find attached plz

11.pdf

Edited by MSHR
Posted (edited)

Welcome.

 

To make a cleaner look I would make a master Chart (or multiple BH SW MW  or by area with a box around them) with all the relative call outs. this would allow a larger view of the area. eliminate the use/need of leaders that aren't really doing anything but cluttering the drawing.

 

-edit 

Then updating would be adding borehole location and adding to the chart.

Edited by mhupp
  • Agree 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...