Make Polygon square

Discussion of MicroSurvey CAD related issues and questions.

Moderators: Brian Sloman, Jason Poitras, James Johnston

Make Polygon square

Postby geoidwalker » Thu Mar 27, 2014 10:06 am

Hello,
I was wondering if anyone knows of a way to make all polygon vertices square. Here's what I want to do:
Given a polygon where all vertices intersect at an angle close to 90 or 270, is it possible to run a command so that all vertices are exactly 90 or 270?
It's a long shot but thought I'd ask in case there's some trick - would save me a lot of time :)
cheers,

Jon
geoidwalker
 
Posts: 9
Joined: Tue Jun 12, 2012 12:11 pm

Re: Make Polygon square

Postby jwall » Tue Apr 01, 2014 4:09 pm

Hi Jon,

I wrote a LISP program to perform a task that sounds very similar to what you're interested in.

The steps of the program in a nutshell:
- Asks user to select a polyline that is the perimeter boundary of the shape (building)
- Computes weighted best-fit orientation by analyzing the distance and slope of each segment of the polyline
- Draws new polyline on current layer by computing intersecting points of the best-fit orientation and @ 90 from mid-points of adjacent existing segments

I have not optimized it but if you're interested send me a message and I can forward you the code for testing. It takes about the same time to run as it takes to blink :o , with the polygons I've tested it on.

Jacob
jwall
 
Posts: 5
Joined: Tue Feb 18, 2014 6:00 pm


Return to MicroSurvey CAD

Who is online

Users browsing this forum: No registered users and 2 guests

cron