Jump to content

Find the Area of Closed Polyline Overlap


Saxywolf

Recommended Posts

I need a Visual Lisp routine to find the area of overlapping polylines. Another function I plan to have is to create a polyline around the overlapping area. I haven't found any examples that quite apply. I've attached a test dwg with several odd characteristics included that might occur: PolylineOverlapAreaTest(1).dwg

 

I'd appreciate any help I can get.

 

--------Additional Info Below--------

  • The polyline on the left is twisted like a figure 8.
  • The areas overlap in two separate locations
  • The polylines share an edge near the top where no area is overlapping.
  • Modification of the original polylines is not allowed unless they are restored to their original condition
  • Working lines on another layer are fine even if they are left there.
  • Both polylines will be closed.
  • The vertexes may or may not be on the edge of the overlapping area.
  • The polyline around the overlapping area can be separate polylines if they overlap in different locations as in the example.
  • There is a closed Boundary polyline selected by the user where no area outside will be tabulated.
  • Not all the area within the boundary will be outlined
  • Sometimes the sub areas go outside the boundary

So you know where I'm coming from... I'm an amateur programmer and new to lisp. I usually learn a new language through examples and function libraries. I've found a ton of example code, but the function library in help seems lacking in good examples. My goal is to create a Visual Lisp routine (.lsp and .dcl) to make input of all the variables very clear to the user. I'm doing this for fun, but to use at work. I'm purposefully not telling you the whole project idea so I can try to work through it on my own as much as possible.

 

If it helps, I'm using Civil3D Land Desktop Companion 2009 with Map and Express Tools

Link to comment
Share on other sites

Just a thought....but you could use the boundary command with pick points and then add the areas of the newly created polylines.

Link to comment
Share on other sites

Heh, Thanks. I didn't even know about that boundary command (and I'm the computer/cad guy in the branch office). If I were to do this manually, I'd certainly make use of it (well, now anyway). However, there are anywhere from 50 to 200 or more areas that need to be determined, some of which are pretty small and easily overlooked. Also, there are three types of overlapping polyline areas, which in the end creates a 3D array that is maybe 100x12x4 of the area values. (My plan is to output to a text file as I cycle through the areas rather then make a huge 3D array.) On top of that the areas could change and need to be re-tabulated. Doing this manually requires that you have before and after records of the ones that change to make updating the total areas easier, is error prone, and a big pain.

 

As I'm thinking about how I might do it... it may be useful to know more of the constraints (also added to first post). If you think there are other constraints that might help the process, feel free to make a suggestion.

  • There is a closed Boundary polyline selected by the user where no area outside will be tabulated.
  • Not all the area within the boundary will be outlined
  • Sometimes the sub areas go outside the boundary

Just thinking... is there a function that can take a closed polyline and a point and return true if the point is inside the closed polyline?

Link to comment
Share on other sites

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...