CAD Forum - Database of tips, tricks and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
Czech English Deutsch
Login/Register:
 Visitors: 2044 
RSS tips RSS channel - CAD tips
RSS discussion RSS channel - CAD discussion

Discussion Discussion forum

HelpCAD discussion

CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate 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.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

The information that you provide in this form will make up your forum profile which can be viewed by other forum members. Your email address will only be visible by forum admin and moderators and will be used to send you Forum Notifications. To cancel your account, use the page Opt-out or contact webmaster@cadforum.cz.

It this Lisp even possible?

 Post Reply Post Reply
Author
MoeJoe View Drop Down
Newbie
Newbie


Joined: 03.Dec.2010
Location: United States
Using: AutoCAD2010, Inventor2010, Sigmanest
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote MoeJoe Quote  Post ReplyReply Direct Link To This Post 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!


Back to Top
philippe JOSEPH View Drop Down
Senior Member
Senior Member


Joined: 14.Mar.2011
Location: France
Using: AutoCAD Mechanical 2017
Status: Offline
Points: 1056
Post Options Post Options   Thanks (0) Thanks(0)   Quote philippe JOSEPH Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Kent Cooper View Drop Down
Senior Member
Senior Member


Joined: 12.Mar.2013
Location: United States
Using: AutoCAD2019
Status: Offline
Points: 457
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kent Cooper Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Kent Cooper View Drop Down
Senior Member
Senior Member


Joined: 12.Mar.2013
Location: United States
Using: AutoCAD2019
Status: Offline
Points: 457
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kent Cooper Quote  Post ReplyReply Direct Link To This Post Posted: 15.Mar.2019 at 19:41
Originally posted by Kent Cooper 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
Back to Top
MoeJoe View Drop Down
Newbie
Newbie


Joined: 03.Dec.2010
Location: United States
Using: AutoCAD2010, Inventor2010, Sigmanest
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote MoeJoe Quote  Post ReplyReply Direct Link To This Post 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! Smile
Back to Top
MoeJoe View Drop Down
Newbie
Newbie


Joined: 03.Dec.2010
Location: United States
Using: AutoCAD2010, Inventor2010, Sigmanest
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote MoeJoe Quote  Post ReplyReply Direct Link To This Post 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!
Back to Top
ketxu View Drop Down
Newbie
Newbie


Joined: 25.Nov.2010
Location: Vietnam
Using: Autocad2007
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote ketxu Quote  Post ReplyReply Direct Link To This Post Posted: 17.Mar.2019 at 15:54
So, you should post your drawing.
At the atlert, you do not two-arc-segment LWPolyline, clearly
Back to Top
Kent Cooper View Drop Down
Senior Member
Senior Member


Joined: 12.Mar.2013
Location: United States
Using: AutoCAD2019
Status: Offline
Points: 457
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kent Cooper Quote  Post ReplyReply Direct Link To This Post Posted: 18.Mar.2019 at 17:22
Originally posted by MoeJoe MoeJoe wrote:

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. ....
 
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.
Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,094 seconds.