Jump to content

2d versus 3d arcs


Bill Toler

Recommended Posts

How do I tell the difference between 2d and 3d arcs in autocad lisp?  If I ask for the normal vector for a 2d arc it crashes the program, but you can have a 3d arc at z=0, so just checking the z value doesn't do it.

Link to comment
Share on other sites

      (setq normal (cdr (assoc 210 ent))) ; Extract the normal vector - problem here
      ; : this command throws an error and crashes the program on a 2D arc
 

Link to comment
Share on other sites

That works for me with 2d arc:

 

(setq MyEnt (car (entsel "Select Arc")))
(setq normal (cdr (assoc 210 (entget MyEnt))))

 

What error message are you getting?

Link to comment
Share on other sites

  • 1 month later...

Hey Steve P: Thanks!  I figured out the problem was I had "normal" as a parameter in the function parameter list - apparently can't use it twice.  That was the reason for the error.  Now I'm on my way on this again.

  • Like 1
Link to comment
Share on other sites

1 minute ago, pkenewell said:

@Emmanuel Delay I think what the OP means by a "3D" arc is an arc that is not in the WCS, or not in the primary UCS plane relative to the view.

 

I that cas I either:

- set the UCS to whatever the arc requires.

- make the arc in WCS, align the arc to its final position

Link to comment
Share on other sites

4 minutes ago, Emmanuel Delay said:

I that cas I either:

- set the UCS to whatever the arc requires.

- make the arc in WCS, align the arc to its final position

@Emmanuel Delay Sure, but the OP was only asking how to detect whether the Arc is normal to the WCS or not. :)

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