TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started 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.....
-
I am not sure, but have a look at Parametrics
-
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
;; 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.
-
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
-
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 :)
-
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 ?
-
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'
-
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 ?
-
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!
-
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)
-
Dynamic Offset is very nice.. :-D
but there is too many things for me.
anyway, thanks Lee
-
Not the Dynamic Offset - but the other program that yanqui proposed in that thread.
-
The drawing tell the story.
Pseudo code to Automatically Widen the roadway
- Select all the polygons on layer SOTONG_PG_2LV
- separate polygon's into pairs that share a long side(s)
- stretch the side opposite the common side while
maintaining the angle of the end segments
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.
-
hmm...ok...i'll try it...
thanks for u'r advise