Jump to content

Recommended Posts

Posted

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.

Posted

Maybe look at the 210 dxf code (210 0.0 0.0 1.0) this is world ucs, an arc drawn in a UCS will be like, (210 0.0 -0.334116324669344 0.94253184645902)

  • Like 1
Posted

      (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
 

Posted

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?

  • 1 month later...
Posted

ERROR: bad argument type

Posted

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
Posted

What's a 3D arc?

Isn't an arc by definition a 2D thing?

Posted

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

Posted
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

Posted
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. :)

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