Jump to content

find coordinate of a point at desired distanse of a polyline!!


kasra

Recommended Posts

Hi.

By which combination of functions, I can get coordination of a point at desired distace from the start point of a polyline?

Link to comment
Share on other sites

Hi Kasra

 

A suitable function would be

 

(vlax-curve-getPointAtDist <ename> <dist>)

 

where

 

is the enity name

length along the curve

 

vlax-curve-getPointAtDist will return nil if the specified length does not lie on the curve

 

Just a quick sample

 

(defun c:test ()

 (if
   (and
     (setq ename    (car (entsel)))
     (setq chainage (getreal "\nChainage"))
     (setq basepoint    (vlax-curve-getPointAtDist ename chainage)))

   (entmake (list (cons 0 "Point")(cons 10 basepoint)))
 )
 )

Link to comment
Share on other sites

Hi Kasra

 

Your welcome

 

How it can identify the start point of polyline?

 

Would you like to insert a point at the start of the curve? If this is the case the distance at the startpoint would be 0

Link to comment
Share on other sites

Kasra,

 

Search the VLIDE help for vlax-curve* :)

 

Also check out the

 

AutoLISP Developers Guide
    > Appendixes
         > AutoLISP Function  Synopsis
              > Visual  LISP Extensions to AutoLISP
                   > Curve Measurement Functions

 

section in the VLIDE help.

 

Lee

Link to comment
Share on other sites

^^^^^

sincere apologies for going offtopic

 

lee, is the swamp offline? i can't access the webpage

 

You are actually the third person to ask me whether it be by PM, email etc... I should think it would be maintenance, but yes, it has been down certainly this afternoon. I'm sure Mark will get it back up soon - people need their daily Swamp fix. :)

Link to comment
Share on other sites

You are actually the third person to ask me whether it be by PM, email etc... I should think it would be maintenance, but yes, it has been down certainly this afternoon. I'm sure Mark will get it back up soon - people need their daily Swamp fix. :)

Maybe it's in honor of Alan (not me) going on vacation.:lol:

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...