Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
How to make the tangent?
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: How to make the tangent? (Read 3114 times)
0 Members and 1 Guest are viewing this topic.
2e4lite
Guest
How to make the tangent?
«
on:
November 01, 2013, 10:27:16 PM »
Who can write a program that can make the tangent by specifying the point in 2d curves,the length and the angle? It will a great help to me.Thanks!
«
Last Edit: November 01, 2013, 11:18:44 PM by 2e4lite
»
Logged
Kerry
Mesozoic relic
Seagull
Posts: 11654
class keyThumper<T>:ILazy<T>
Re: How to make the tangent ?
«
Reply #1 on:
November 01, 2013, 10:37:33 PM »
Please clarify your question.
What information do you know.?
Logged
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.
ymg
Guest
Re: How to make the tangent?
«
Reply #2 on:
November 02, 2013, 04:14:26 AM »
Not sure if it is what you are looking for, but using this little bit of code by AlanJT
you have the angle. You already have the point.
So your tangent is an xline starting at your point with angle as slope.
ymg
Code - Auto/Visual Lisp:
[Select]
;; Return angle along curve, at specified point (on curve) ;
;; e - valid curve (ENAME or VLA-OBJECT) ;
;; p - point on curve ;
;; Alan J. Thompson, 11.04.10 ;
(
defun
AngleAtPoint
(
e p
)
(
angle
'
(
0
.
0
.
0
.
)
(
vlax-curve-getFirstDeriv
e
(
vlax-curve-getParamAtPoint
e p
)
)
)
)
;; Example call and entmaking an XLINE
(
setq
a
(
angleatpoint enameofcurve point
)
)
(
entmakex
(
list
'
(
0
.
"XLINE"
)
'
(
100
.
"AcDbEntity"
)
'
(
100
.
"AcDbXline"
)
'
(
62
.
1
)
(
cons
10
point
)
(
list
11
(
cos
a
)
(
sin
a
)
0.0
)
)
)
«
Last Edit: November 02, 2013, 04:46:56 AM by ymg
»
Logged
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
How to make the tangent?