Jump to content

vlax-curve-getDistAtPoint, vlax-curve-getParamAtPoint


Grrr

Recommended Posts

Hi guys, I have some question:

Whats the difference between "distance" and "parameter" on vlax-curve-**** functions?

 

I can't imagine it graphically...

Does "parameter" means the length value of the curve at a given point from it?

For example, if the curve is "unrolled" up to a straight line, and measured.

If so, what does "Distance" mean?

 

I've been reading several times acad's help file, but I don't/can't understand/imagine the difference.

Link to comment
Share on other sites

Distatpoint gives you distance - just opposite of what you stated Grrr, and like BIGAL pointed parameters are numerical derivation of curve from which you can get other data - vector of tangent (vlax-curve-getfirstderiv curve param), or secondderiv which data can be used in calculation position of center and radius of curvature at that parameter of curve belonging to your reference point on curve... Starting parameter may have value different than 0.0 - for distances it's always 0.0, and for POLYLINES it was implemented such convention that for every vertex of polyline, parameter should be every next floating integer number (for first vertex - param=0.0, for second - param=1.0, ... , for last vertex - param=number of vertices - 1 in floating form...)

Link to comment
Share on other sites

Thank you for the explanation, Marko!

I was hoping for you to reply (as I've read some of your old posts about vlax-curve-* functions, surely you know alot about them).

I did some experiments with ParamAtPoint on polylines, where the results on the vertices are exactly as you mentioned (still this seems kinda odd for me).

Sorry for my late reply.

 

I still can't utilize (vlax-curve-getfirstderiv curve param), quoted from help:

Signature
(vlax-curve-getFirstDeriv curve-obj param)

curve-obj
Type: VLA-object
The object to be measured.

param
Type: Integer or Real
A number specifying a parameter on the curve.

Return Values
Type: List or nil
[b]A 3D vector, if successful[/b]; otherwise nil.

When I have this list representing that "3D vector", how can I emake/grdraw the tangent on a given parameter?

Can someone post examples about using First/Second Deriv?

Sorry if I'm going slightly offtopic.

Link to comment
Share on other sites

A example

 

(defun alg-ang (obj pnt)
 (angle '(0. 0. 0.)
    (vlax-curve-getfirstderiv
      obj
      (vlax-curve-getparamatpoint
        obj
        pnt
      )
    )
 )
)

 

Thank you so much, Big Al !

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...