TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: kraz on February 24, 2010, 08:31:01 PM

Title: [Question]Polygon Width Edit
Post by: kraz on February 24, 2010, 08:31:01 PM
(http://)

RedPolygon(2) is origin..
The polygon vertex is not 4 or 5...
I wanna change it like 1 or 3
angle and baseline is fixed

any idea please.....
Title: Re: [Question]Polygon Width Edit
Post by: Willie on February 24, 2010, 09:37:13 PM
I am not sure, but have a look at Parametrics
Title: Re: [Question]Polygon Width Edit
Post by: Kerry on February 24, 2010, 09:55:11 PM
Depending on how many you have to do ...

I'd do it like this :
load and run 'ofsegs' by gile here at theSwamp http://www.theswamp.org/index.php?topic=21933.msg266096#msg266096
Quote
;; OFSEGS -Gilles Chanteau- 2008/03/26
;; Offsets the selected segments of lwpolyline

Offset the baseLine by whatever you need
Stretch the top corners ( in turn ) to the intersection of the diagonal end with the offset line.
erase the offset line.

takes about 6 seconds.
Title: Re: [Question]Polygon Width Edit
Post by: kraz on February 24, 2010, 11:18:57 PM
thanks kerry but there is polygon about 60,000....

It may perhaps there is no royal road....

think..think...think....
if i made or found a routin...I'll share the way....
plz..Give me Good Luck

Title: Re: [Question]Polygon Width Edit
Post by: Kerry on February 24, 2010, 11:42:05 PM

I don't have time to play at the moment, but it wouldn't take much to make something to suit.

Is the only variable the offset dimension ??

lets see ... 60,000 units at 1c each + a 10% bonus donated to the site is ... uhmmmmm


yes, it's worth writing a program for :)
Title: Re: [Question]Polygon Width Edit
Post by: Kerry on February 24, 2010, 11:55:29 PM

Just to be sure,
are all polygons drawn ?

are they all the same ?

is the angle the same for each. ?



OR

do you consider each is different ?

Title: Re: [Question]Polygon Width Edit
Post by: CAB on February 25, 2010, 12:10:39 AM
More questions:

The longest side is fixed, the two adjoining sides have fixed angles
and the remaining side is moved a set amount?

The amount moved is one of these :
A. relative to it's existing position.
B. relative to the 'Long Side'

Title: Re: [Question]Polygon Width Edit
Post by: Kerry on February 25, 2010, 12:22:22 AM
More questions:

What Version of AutoCAD ?
Are  the shapes in the World UCS only ?

If you have 60,000 of these to do, how will you know which ones are done. ?  Are they on the same layer. ? Could the layer be changed as each is done ? ... and restored later ?
Title: Re: [Question]Polygon Width Edit
Post by: kraz on February 25, 2010, 01:05:33 AM
Thans for Your Interest...
for many question... attach the part of dwg(i'm using acadmap 2008 , 2010).
i had moved the polygons for the security(coordinate)

the polygon means ROAD
the polygon made by auto generator lisp prog and some modified by hand .

in project progressing, some idea hit me.
if polygons'width are changing... how can i modify it in a short time....
that's it!


Title: Re: [Question]Polygon Width Edit
Post by: Lee Mac on February 25, 2010, 06:01:35 AM
Looks like you need something like this  :wink:

http://www.theswamp.org/index.php?topic=30650.msg377566#msg377566 (http://www.theswamp.org/index.php?topic=30650.msg377566#msg377566)
Title: Re: [Question]Polygon Width Edit
Post by: kraz on February 25, 2010, 07:25:20 AM
Dynamic Offset is very nice.. :-D
but there is too many things for me.
anyway, thanks Lee
Title: Re: [Question]Polygon Width Edit
Post by: Lee Mac on February 25, 2010, 09:31:34 AM
Not the Dynamic Offset - but the other program that yanqui proposed in that thread.
Title: Re: [Question]Polygon Width Edit
Post by: CAB on February 25, 2010, 09:43:52 AM
The drawing tell the story.
Pseudo code to Automatically Widen the roadway
 
This can be done but is somewhat complex.
One problem is that there are some with multiple segments that make up a side.
Also the routine would be a bit slow given the numbers of polygons but much faster
than picking them one by one.
Title: Re: [Question]Polygon Width Edit
Post by: kraz on February 25, 2010, 08:05:30 PM
hmm...ok...i'll try it...
thanks for u'r advise