Bill Toler Posted November 27, 2023 Share Posted November 27, 2023 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. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 27, 2023 Share Posted November 27, 2023 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) 1 Quote Link to comment Share on other sites More sharing options...
Bill Toler Posted November 27, 2023 Author Share Posted November 27, 2023 (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 Quote Link to comment Share on other sites More sharing options...
Steven P Posted November 28, 2023 Share Posted November 28, 2023 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? Quote Link to comment Share on other sites More sharing options...
Bill Toler Posted January 4 Author Share Posted January 4 ERROR: bad argument type Quote Link to comment Share on other sites More sharing options...
Bill Toler Posted January 4 Author Share Posted January 4 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. 1 Quote Link to comment Share on other sites More sharing options...
Emmanuel Delay Posted January 5 Share Posted January 5 What's a 3D arc? Isn't an arc by definition a 2D thing? Quote Link to comment Share on other sites More sharing options...
pkenewell Posted January 5 Share Posted January 5 @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. Quote Link to comment Share on other sites More sharing options...
Emmanuel Delay Posted January 5 Share Posted January 5 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 Quote Link to comment Share on other sites More sharing options...
pkenewell Posted January 5 Share Posted January 5 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.