# Discussion forum

Please abide by the rules of this forum.

How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.

# It this Lisp even possible?

Author
Topic Search   Topic Options
MoeJoe
Newbie

Joined: 03.Dec.2010
Location: United States
Status: Offline
Points: 6
Post Options    Thanks(0)    Quote  Reply Topic: It this Lisp even possible?
Posted: 14.Mar.2019 at 22:05
I am working on a project that a lisp routine would help a lot.  The problem is I don't know if it is even possible. I assume it is, but don't know.  Thought someone here with more knowledge would be able to tell me if it is.  I have several polylines that need to be offset to a variable I enter and then snapped back to the beginning and ending of that polyline that it is offset to.  I know crazy.  I attached an image to illustrate what i am talking about. Let me know your thoughts. ? Thanks!

philippe JOSEPH
Senior Member

Joined: 14.Mar.2011
Location: France
Status: Offline
Points: 1056
Post Options    Thanks(0)    Quote  Reply Posted: 15.Mar.2019 at 07:19
Hello MoeJoe, I don't know if the lisp is possible but when I draw with your method the last 2 polylines are with an angle in the middle.

Edited by philippe JOSEPH - 15.Mar.2019 at 07:20
Kent Cooper
Senior Member

Joined: 12.Mar.2013
Location: United States
Status: Offline
Points: 457
Post Options    Thanks(0)    Quote  Reply Posted: 15.Mar.2019 at 15:08
If it's always a two-arc-segment Polyline in which the two segments are tangent to each other [red]:
Offset the Polyline to both sides by the desired distance [blue].
Type SNAPANG, and for the angle, Osnap ENDpoint to the mid-way vertices of any two Polylines, to get the skewed crosshairs [white].  One of the crosshair directions is the tangent direction of all 3 Polylines at their mid-way vertices.
ARC command, start at one of the mid-way vertices of a blue Polyline, use End option and pick a far end of the red Polyline, then use Direction option, and with ORTHO On, specify the tangent direction for the Arc [yellow] to head in from its start point.
Do the same 4 times, or if it's a symmetrical original Polyline, twice for one side and do some grip-edit Copying and Rotating for the other side.
If you want a single-Polyline result, use PEDIT's Join option or the JOIN command to connect the yellow Arcs.

The equivalent could be made into an AutoLisp routine, but first verify that this is the situation, and the result you need.

Edited by Kent Cooper - 15.Mar.2019 at 15:11
Kent Cooper
Senior Member

Joined: 12.Mar.2013
Location: United States
Status: Offline
Points: 457
Post Options    Thanks(0)    Quote  Reply Posted: 15.Mar.2019 at 19:41
 Kent Cooper wrote:.... The equivalent could be made into an AutoLisp routine, but first verify that this is the situation, and the result you need.

Give this a try!

Edited by Kent Cooper - 15.Mar.2019 at 19:42
MoeJoe
Newbie

Joined: 03.Dec.2010
Location: United States
Status: Offline
Points: 6
Post Options    Thanks(0)    Quote  Reply Posted: 16.Mar.2019 at 13:23
Wow you guy are amazing.  I will take a look at the lsp. I really appreciate your time and feedback on this.  Thank You!
MoeJoe
Newbie

Joined: 03.Dec.2010
Location: United States
Status: Offline
Points: 6
Post Options    Thanks(0)    Quote  Reply Posted: 16.Mar.2019 at 13:33
I tried the lsp but just got the following
Two-arc-segment LWPolyline center-path to make Double-Ogee:
Nothing selected, locked Layer, or not two-arc-segment LWPolyline.
I converted the line to a LWPolyline but I still couldn't get it to work.  I am probably doing something wrong.  What am I doing wrong?  Thanks!
ketxu
Newbie

Joined: 25.Nov.2010
Location: Vietnam
Status: Offline
Points: 2
Post Options    Thanks(0)    Quote  Reply Posted: 17.Mar.2019 at 15:54
So, you should post your drawing.
At the atlert, you do not two-arc-segment LWPolyline, clearly
Kent Cooper
Senior Member

Joined: 12.Mar.2013
Location: United States
Status: Offline
Points: 457
Post Options    Thanks(0)    Quote  Reply Posted: 18.Mar.2019 at 17:22
 MoeJoe wrote:I tried the lsp but just got the followingTwo-arc-segment LWPolyline center-path to make Double-Ogee:Nothing selected, locked Layer, or not two-arc-segment LWPolyline. I converted the line to a LWPolyline but I still couldn't get it to work. ....

If by "line" you mean an AutoCAD Line entity, that won't work.  It requires a Polyline made of two [and only two] arc segments [and only arc segments].  If you pick on anything else, whether any different entity type or a Polyline that doesn't match those requirements, OR if you simply missed in picking, or if you picked a qualifying Polyline but it's on a locked Layer, you'll get that message.  As suggested, post a drawing file [limited to just the Polyline in question] if you think everything qualifies.