Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Draw arc by length, radius, and delta

30 REPLIES 30
Reply
Message 1 of 31
sdbeach
14308 Views, 30 Replies

Draw arc by length, radius, and delta

Does anyone have a Lisp. that will draw an arc given the length, radius, and delta?

Thanks,
Devon
30 REPLIES 30
Message 2 of 31
Anonymous
in reply to: sdbeach

How would you prefer to define the direction it is going? From the end of a
tangent line? direction of chord?

wrote in message news:4909152@discussion.autodesk.com...
Does anyone have a Lisp. that will draw an arc given the length, radius, and
delta?

Thanks,
Devon
Message 3 of 31
sdbeach
in reply to: sdbeach

Lets me define the 1st point.
Message 4 of 31
Anonymous
in reply to: sdbeach

There are an infinity of arcs with LRD, even starting at a given point. You need one other
parameter/ Since LRD are not independent variables (L = R * D) you only have two out of
three required for a second-degree curve.

rs

wrote in message news:4909152@discussion.autodesk.com...
Does anyone have a Lisp. that will draw an arc given the length, radius, and delta?

Thanks,
Devon
Message 5 of 31
Anonymous
in reply to: sdbeach

PS

I had a long and heated chat with a surveyor on the subject. He and most surveyors make a
practice of showing LRD on a boundary description. This is all very well if it is assured
that one end of the arc is tangent to something. I put forth my case to include bearing
and length on the chord. Would it kill him? Apparently so, because he has not changed his
ways.

rs
Message 6 of 31
Anonymous
in reply to: sdbeach

Out here in California we do not show anything other than DRL unless the arc
is not tangent to an adjacent line/curve. In those cases we show the Radial
Bearing at the start/end point.

Jeff


"tcebob" wrote in message
news:4909467@discussion.autodesk.com...
PS

I had a long and heated chat with a surveyor on the subject. He and most
surveyors make a
practice of showing LRD on a boundary description. This is all very well if
it is assured
that one end of the arc is tangent to something. I put forth my case to
include bearing
and length on the chord. Would it kill him? Apparently so, because he has
not changed his
ways.

rs
Message 7 of 31
Anonymous
in reply to: sdbeach

That's the tradition. But almost no surveyor marks "PC" or "PT," so who can tell? I
swallow hard and assume tangency if it looks sort of tangent on the 4th generation xerox
plan the client gives me. If it closes in the same county I figure it's ok. Sometimes the
curve is clearly not tangent. "And thence by an arc of radius two hundred feet, more or
less, and length 65 feet, more or less, to the point of beginning" is second on my list of
New England survey vagueisms, after ". . . from the stump of an old green apple tree to a
stone wall."

Radial bearing is nice, but I think chord would be more helpful, in office and field. But
surveying, like religion, leans heavily on Tradition. And immunity to black flies.

rs

"Jeff Mishler" wrote in message
news:4909499@discussion.autodesk.com...
Out here in California we do not show anything other than DRL unless the arc
is not tangent to an adjacent line/curve. In those cases we show the Radial
Bearing at the start/end point.

Jeff


"tcebob" wrote in message
news:4909467@discussion.autodesk.com...
PS

I had a long and heated chat with a surveyor on the subject. He and most
surveyors make a
practice of showing LRD on a boundary description. This is all very well if
it is assured
that one end of the arc is tangent to something. I put forth my case to
include bearing
and length on the chord. Would it kill him? Apparently so, because he has
not changed his
ways.

rs
Message 8 of 31
Anonymous
in reply to: sdbeach

". . . from the stump of an old green apple tree to a stone wall."

LOL.....a few years back, my mother-in-law asked me to let her know the
acreage of a piece of land she owns. I said "Sure!" like any good son-in-law
would do. Of course I neglected to even ask where it was.....upstate New
York, out by the Finger Lakes. About a week later I get a copy of the deed
in the mail, with a note saying thanks and she needs it rather quickly. I
knew I was in trouble when the first part of the description started out:
"Beginning at a dip in the road between Dundee and Altay, from which an old
stone fence corner lies northerly about 5 paces....." Uh huh......but it
ended like so: "Being about 50 acres"

guess what I told ma-in-law 🙂
Message 9 of 31
Anonymous
in reply to: sdbeach

Haw!

rs

"Jeff Mishler" wrote in message
news:4909555@discussion.autodesk.com...
". . . from the stump of an old green apple tree to a stone wall."

LOL.....a few years back, my mother-in-law asked me to let her know the
acreage of a piece of land she owns. I said "Sure!" like any good son-in-law
would do. Of course I neglected to even ask where it was.....upstate New
York, out by the Finger Lakes. About a week later I get a copy of the deed
in the mail, with a note saying thanks and she needs it rather quickly. I
knew I was in trouble when the first part of the description started out:
"Beginning at a dip in the road between Dundee and Altay, from which an old
stone fence corner lies northerly about 5 paces....." Uh huh......but it
ended like so: "Being about 50 acres"

guess what I told ma-in-law 🙂
Message 10 of 31
Anonymous
in reply to: sdbeach

Small world, I know that area, well did back in the 60's-70's
Dundee had one of the best dirt track racing in the area.

Murph


"Jeff Mishler" <> wrote in message ...
"Beginning at a dip in the road between Dundee and Altay, from which an old
stone fence corner lies northerly about 5 paces....."
Message 11 of 31
sdbeach
in reply to: sdbeach

I’m given a line:
N 64(degrees) 00’00”W, length = 40.61’

Then given curve data table with:
Delta: 90(degrees) , Radius: 40, Length:62.83, Tangent: 40

I need to draw this curve....
Message 12 of 31
Anonymous
in reply to: sdbeach

Sorry, d, not enough; still only 2 independent variables. You might assume the curve is
tangent to the end of the line and go ahead and see if the whole shebang closes. But you
are not given the direction of the arc, so unless you have a plan in front of you can
only guess which way to go.

Drawing the curve is simple: extend the tangent 40', draw a line at 90 degrees any length
greater than 40 and fillet r = 40.

rs

wrote in message news:4910111@discussion.autodesk.com...
I'm given a line:
N 64(degrees) 00'00"W, length = 40.61'

Then given curve data table with:
Delta: 90(degrees) , Radius: 40, Length:62.83, Tangent: 40

I need to draw this curve....
Message 13 of 31
sdbeach
in reply to: sdbeach

I have a plan in front of me..

I will try your suggestion, however, if I fillet the two lines, it will not give me a arc that's 62.83' in length!
Message 14 of 31
Anonymous
in reply to: sdbeach

Just tried it: 62.832'. If you think of it, it's one quadrant of a circle of radius 40'.
Length 2pi*40/4 = 62.831258. More or less.

rs

wrote in message news:4910213@discussion.autodesk.com...
I have a plan in front of me..

I will try your suggestion, however, if I fillet the two lines, it will not give me a arc
that's 62.83' in length!
Message 15 of 31
sdbeach
in reply to: sdbeach

Thanks,
I will have to try this with the rest of the lines/curves.

I find it hard to believe that there is not a way to draw an arc tangent to a line/or other arc given the radius, delta, and length. I'm sure someone out there has a lisp. for this...

Thanks for the help
Message 16 of 31
Anonymous
in reply to: sdbeach

Here's what I made years ago to do arcs when all you know is the radius and
the length along the curve. [It's a Screen Menu item, but could be defun'd
into a "command" of its own.] It uses the prompt responses to calculate the
center-point and included angle of the arc, and generates it from those. If
you only have a written description and no graphic version, you'll have to
do something like sketch it up roughly to figure out which direction the arc
turns.

The three variables you mention are not independent -- any two of them will
determine the third, so you can't force AutoCAD to use all three if any are
rounded off at all. Your example with a 90-degree arc drove someone's
earlier suggestion to fillet perpendicular lines, and its length figure was
most likely what was rounded off.

I made this routine because of having often run across deed descriptions
containing arcs with only the radius and length. They were almost always
tangent continuations of preceding straight line segments. If you are given
the included angle, too, then you have to decide which two variables of the
three you want to use to determine the arc, and which one to allow to be the
rounded-off resultant. I would be inclined most of the time to let that be
the length, since if the arc meets tangent straight lines at both ends,
their angles will determine the included angle of the arc, and the radius is
usually a nice round number.

(Watch for word wrap -- all lines except the last one should end with +
signs.)


[ARCxDist]^C^C^P(setq pt (getpoint "Starting Point <@>: ")) \+
(if (= pt nil) (setq pt (getvar "LASTPOINT"))) +
(setq rad (getdist pt "Radius: ")) \+
(setq dir (getangle pt "Starting Direction : ")) \+
(if (= dir nil) (setq dir (getvar "LASTANGLE"))) +
(setq dist (getdist "Distance Along Curve: ")) \+
(setq curve (strcase (getstring "Curving Left (CCW) or Right (CW) (L/R)?
: "))) \+
(setq ang (* (/ (/ dist rad) pi) 180) offset (/ pi 2)) +
(if (= curve "R") (setq ang (- ang) offset (- offset) angl 50) +
(setq angl 51)) (setq dir2 (+ dir offset) ctr (polar pt dir2 rad)) +
(command "ARC" pt "C" ctr "A" ang) +
(setvar "LASTPOINT" (polar (getvar "LASTPOINT") +
(cdr (assoc angl (entget (entlast)))) (cdr (assoc 40 (entget (entlast))))))
^P

--
Kent Cooper


wrote...
Thanks,
I will have to try this with the rest of the lines/curves.

I find it hard to believe that there is not a way to draw an arc tangent to
a line/or other arc given the radius, delta, and length. I'm sure someone
out there has a lisp. for this...

Thanks for the help
Message 17 of 31
Anonymous
in reply to: sdbeach

Here's one that will draw a tangent arc from the end of a selected line, or
if the last object created was a line you can just hit enter to use it. You
must supply the Radius and Delta. The delta must be input in the format of
the current AUnit setting. The end of the line is determined by either where
the line is selected (the nearest endpoint is used) or the end of the last
line.

[code]
(defun c:arcfromline (/ ang ctrpt delta dist doc endang endpt ent half
obj pick rad space ss1 ss2 startang stpt)
(vl-load-com)
(setq doc (vla-get-activedocument (vlax-get-acad-object))
space (if (= (getvar "cvport") 1)
(vla-get-paperspace doc)
(vla-get-modelspace doc)
)
)
(princ "\nSelect line or Enter to use last created line: ")
(if (or (setq ss1 (ssget ":S" '((0 . "LINE"))))
(setq ss2 (ssget "L" '((0 . "LINE"))))
)
(progn
(setq obj (vlax-ename->vla-object (ssname ss 0))
pick (if ss1
(last (last (last (ssnamex ss1 0))))
(vlax-get obj 'endpoint)
)
half (/ (vla-get-length obj) 2.0)
)
(setq dist (vlax-curve-getdistatpoint obj
(vlax-curve-getclosestpointto obj pick)))
(if (< half dist)
(setq stPt (vlax-get obj 'startpoint)
endPt (vlax-get obj 'endpoint)
)
(setq stPt (vlax-get obj 'endpoint)
endPt (vlax-get obj 'startpoint)
)
)
(setq rad (getdist endPt "\nRadius of arc: ")
ang (angle stPt endPt)
ctrPt (polar endPt (- ang (/ pi 2)) rad)
startang (+ pi (- ang (/ pi 2)))
delta (getangle "\nDelta: ")
)
(if (minusp rad)
(setq startang (angle ctrPt endPt)
endang (+ startang delta))
(setq endang (angle ctrPt endPt)
startang (- startang delta))
)
(vlax-invoke space 'addarc ctrPt (abs rad) startang endang)
)
)
(princ)
)
[/code]

wrote in message news:4910298@discussion.autodesk.com...
Thanks,
I will have to try this with the rest of the lines/curves.

I find it hard to believe that there is not a way to draw an arc tangent to
a line/or other arc given the radius, delta, and length. I'm sure someone
out there has a lisp. for this...

Thanks for the help
Message 18 of 31
sdbeach
in reply to: sdbeach

Thanks,

When I pick a line I get the following error message:
bad argument type: lselsetp nil

do I have to change a line in the lisp??

Devon
Message 19 of 31
Anonymous
in reply to: sdbeach

Sorry about that....I added the option to use the last line and messed up
the ss. This one should work for you.

(defun c:arcfromline (/ ang ctrpt delta dist doc endang endpt ent half
obj pick rad space ss1 ss2 startang stpt)
(setq doc (vla-get-activedocument (vlax-get-acad-object))
space (if (= (getvar "cvport") 1)
(vla-get-paperspace doc)
(vla-get-modelspace doc)
)
)
(princ "\nSelect line or Enter to use last created line: ")
(if (or (setq ss1 (ssget ":S" '((0 . "LINE"))))
(setq ss2 (ssget "L" '((0 . "LINE"))))
)
(progn
(if ss1
(setq obj (vlax-ename->vla-object (ssname ss1 0))
pick (last (last (last (ssnamex ss1 0))))
)
(setq obj (vlax-ename->vla-object (ssname ss2 0))
pick (vlax-get obj 'endpoint)
)
)
(setq half (/ (vla-get-length obj) 2.0)
dist (vlax-curve-getdistatpoint obj
(vlax-curve-getclosestpointto obj pick)))
(if (< half dist)
(setq stPt (vlax-get obj 'startpoint)
endPt (vlax-get obj 'endpoint)
)
(setq stPt (vlax-get obj 'endpoint)
endPt (vlax-get obj 'startpoint)
)
)
(setq rad (getdist endPt "\nRadius of arc: ")
ang (angle stPt endPt)
ctrPt (polar endPt (- ang (/ pi 2)) rad)
startang (+ pi (- ang (/ pi 2)))
delta (getangle "\nDelta: ")
)
(if (minusp rad)
(setq startang (angle ctrPt endPt)
endang (+ startang delta))
(setq endang (angle ctrPt endPt)
startang (- startang delta))
)
(vlax-invoke space 'addarc ctrPt (abs rad) startang endang)
)
)
(princ)
)
wrote in message news:4910418@discussion.autodesk.com...
Thanks,

When I pick a line I get the following error message:
bad argument type: lselsetp nil

do I have to change a line in the lisp??

Devon
Message 20 of 31
sdbeach
in reply to: sdbeach

Awesome, works great.

Thank you,
Devon

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost