CAD Forum - Database of tips, tricks and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 2946
RSS channel - CAD tips RSS tips
RSS discussions

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

Topic ClosedIt 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
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: 1425
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: AutoCAD2020, 2023
Status: Offline
Points: 616
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: AutoCAD2020, 2023
Status: Offline
Points: 616
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
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
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
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: AutoCAD2020, 2023
Status: Offline
Points: 616
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
rebellio View Drop Down
Senior Member
Senior Member


Joined: 04.Mar.2009
Location: Netherlands
Using: Autocad 2018
Status: Offline
Points: 125
Direct Link To This Post Posted: 26.Mar.2019 at 12:41
pline --> start point --> enter A --> second point --> 3th point --> enter

Then the lisp will just work fine
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,352 seconds.