Jump to content

Intersection from two points at Polygon


Juergen

Recommended Posts

Hi,

I need a lisp that draw a point at the intersection axis extension of two picked Points at a Polygon.

Or make this point as basepoint. (e.g. when I move the polygon)

 

Thanks everybody for your help.

 

 

 

 

[ATTACH]63511[/ATTACH][ATTACH]63511[/ATTACH]

Link to comment
Share on other sites

It appears as if you have attached something, but I'm unable to view it.

 

From what I'm understanding, you want to be able to pick an X point and a Y point. This will designate a point at the spot where they intersect?

Also, did you want this to move the object right away, or are you trying to create a handle for future use?

 

I have thrown together some quick code that does what I think you might want. It's definitely not bulletproof, but should be able to help get things started.

(defun c:test ( / ss p1 p2 p3 )
(prompt "\nSelect objects to move.")
(setq ss (ssget))
(setq p1 (getpoint "\nPick a point for X."))
(setq p2 (getpoint "\nPick a point for Y."))
(setq p3 (list (car p1)(cadr p2)(caddr p1))) ;get x and z value from p1 and y value from p2
(ssadd (entmakex (list (cons 0 "POINT")(cons 10 p3))) ss) ;create point
(command "_.move" ss "" "_non" p3)
)

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