Jump to content

A script to find and select odd angles?


Recommended Posts

Posted

Hello again! I think I might have a moderately complicated automation problem, so I will try to break it down as much as I can.

  • Basically, I have a series of short, equal-length lines - connected at endpoints into a long "curved" line, similar to a section of the perimeter of a polygon.

  • The purpose of the script would be to find the mistakes that I made when assembling the "curved" lines.

What I am looking for is a script of some sort; one which can read the angles of a selected set of connected short lines, and then deselect all the segments that surround the mode (most common) angles, except for the segments that surround the uncommon angles. Then the mistakes will be selected so I can modify them.

 

The vast majority of the segments are properly assembled, but I think it might be easier to correct the drawing by selecting the mistakes, putting them on a different layer and re-matching them to the drawing like a jigsaw puzzle.

 

Secondary objectives:

  1. Any segments that are not connected on both endpoints should also remain selected.

I hope someone can help me with this, I have been working on this drawing nonstop the past week or two, and I'm finally almost done with the first step!

FindAngle.dwg

Posted
...and then deselect all the segments that surround the mode angle...

 

I'm not sure what you mean by this? :unsure:

Posted

Hi Lee, Thanks for responding so quickly! I just read your comment, & I have edited the line in question to say "mode angles".

 

Here are a few additional details about my question:

 

  • Since I only want to select the segments surrounding the messed-up angles, it will be necessary to deselect any segments which surround the identical angles which make up the "curved" lines.

  • Some segments might have a correct angle on one endpoint, but the wrong angle at the other end. I'm not sure what the best way would be to select only the segments which comprise the bad angles.

Would that be very complex? I would like to learn how to write these macros and Lisps. Could you recommend any great books to get started on?

Posted
Even though I am working on a project to save the world for free, I can be a little over-cautious with my ideas because I need to save myself and my son before I can be much help to the rest of the world.

 

What the...?

Posted

Yeah, we can save the world for free. Money is useful, I mean it keeps the internet on and stuff, but it is just a symbol for true wealth.

Posted
Yeah, we can save the world for free. Money is useful, I mean it keeps the internet on and stuff, but it is just a symbol for true wealth.

 

Alleluia, Alleluia

 

 

That's Deep.

Posted
Yeah, we can save the world for free. Money is useful, I mean it keeps the internet on and stuff, but it is just a symbol for true wealth.

Better living through chemicals...

Posted

Alright, alright. Can we please just stay on topic here? It kind of annoys me when I have to stop doing something in order to explain it.

Posted
Alright, alright. Can we please just stay on topic here? It kind of annoys me when I have to stop doing something in order to explain it.

Hmmm... who was the first to digress?

Here is a copy of the drawing I am working on. I know it was annoying that I wouldn't share it before. Even though I am working on a project to save the world for free, I can be a little over-cautious with my ideas because I need to save myself and my son before I can be much help to the rest of the world.

annoying? certainly is

Posted

Are you sure digression is annoying, because we still seem to be preoccupied with it. It would annoy me to try and prove that my assertions are logically sound just because of an insinuation of intoxication.

 

I just explained a little more about the project is all. The drawing is part of my plan to save the world. I didn't post the file earlier because I want to own my creations through implementation.

 

I am looking for a Lisp to find which segments I arranged in the wrong order and also a few good books on AutoCAD and Lisps.

Posted

I guess everyone's a critic. I'm just going to start re-doing my drawing. Apparently criticizing me for having a plan to save the world is easy and helping out with a Lisp for finding the odd angles is difficult.

Posted

If you get annoyed at having to explain matters, how can anyone help you?

 

It is very difficult to understand what you are trying to draw. It looks like Polygons with 17 sides. Have you tried drawing those directly?

 

Also, when there is a wrong angle, then ALL the lines after that will have to be rotated to make it correct.

 

It might be easier if you extracted the coordinates of the lines, and calculated it all in a spreadsheet, but then I am not trying to save the world, just helping you.

Posted
I'm just going to start re-doing my drawing. Apparently criticizing me for having a plan to save the world is easy and helping out with a Lisp for finding the odd angles is difficult.

 

Bear in mind we only volunteer our time to help, we are not working for you and your goal to 'save the world'. So don't get impatient when we don't jump when you say the word.

Posted

Good mornings! I might qualify for being impervious to annoyance in explaining logical/technical matters, but I did over-react somewhat to the very slight hint that I might be less than coherent in my optimism. All I can say is that it will be very hard for us to explain some of the rationale of the "olden days" to our grand kids!

 

I wasn't expecting an immediate response on Saturday night, I was just a little apprehensive about getting into a distracting conversation about whether or not my thinking is fundamentally flawed. If you decide to help me with my project(s), you will in fact be working toward the goal of saving the world in many ways. Even if you don't help me or my projects in particular, this forum and all of its helpful individuals is doing a great deal toward the stated goal.

  • As far as the sample drawing, it is very different from the file I am working with, which is ludicrously huge. To create the sample, I did draw a polygon, trace around it with the line tool, and bend one corner to some random 8 decimal angle. If the angles in the original drawing were projected as polygons, they would have several hundred sides.

  • Basically I was hoping for a program that could read the angle between each pair of segments, and then select the segments which comprise the non-standard angles. There might be 50 identical angles and 2 or 3 odd ones for each "curved" line.

I actually have been up all night re-doing the drawing, but I will still need to check this one. I also have a lot of similar projects like this to do, so the angle-finding tool will be very handy. Thanks for your thousands of posts, this is the main site I go to for CAD questions now, and I enjoy asking good questions and trying to help out where I can!

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