KRBeckman Posted March 25, 2010 Share Posted March 25, 2010 I'm thinking about writing a lisp that was looking for some direction on... If you don't know how creating surfaces in AutoCAD (in this case Revsurf's) depending on which end of the profile curve you are closest to when you select it determines which direction the face normal will be. And since the company I work for uses only 1-sided faces for rendering this gets to be a pain in the butt. Also depending on which end of the object that defines the axis of rotation determines which direction the surface is created (clockwise or counterclockwise) So basically using the same two entities you can get 4 similar, but completely different in my case, surfaces. I assume there has to be some sort of logic behind which ends you pick and what the result is, but I've spent quite a bit of time trying to figure it out and I can't. So what I'm thinkink is create a lisp that will prompt me to select both objects, then the lisp will try one possible input (top of profile & top of axis), then prompt for a yes or no whether it worked. If yes end the program, if no continue to the next option, etc. But in order to do this I need to be able to tell the lisp WHERE to select the two entities, not just which entities. My first question would be is this possible? And if so how? Any help would be greatly appriciated. Quote Link to comment Share on other sites More sharing options...
KRBeckman Posted March 26, 2010 Author Share Posted March 26, 2010 I thought that was going to happen... 43 views and no replies. Quote Link to comment Share on other sites More sharing options...
KRBeckman Posted March 29, 2010 Author Share Posted March 29, 2010 Anybody???? Oh, btw bump. Quote Link to comment Share on other sites More sharing options...
jammie Posted March 29, 2010 Share Posted March 29, 2010 But in order to do this I need to be able to tell the lisp WHERE to select the two entities, not just which entities. My first question would be is this possible? And if so how? Entsel returns two items ( ) To call on certain commands, such as trim or revsuf, you can specify the pick by creating you own list Maybe the folowing could give you a stating point at least. No error trapping (defun c:test () (vl-load-com) (setq sourceObject (entsel "\nSelect object to revolve: :")) (setq revolutionAxis (entsel "\nSelect axis: :")) (setq ename (car revolutionAxis)) (initget "Start End") (setq Mode (getkword "\n[start/End]")) (cond ((= Mode "Start")(setq revEntsel (list ename (vlax-curve-getStartPoint ename)))) ((= Mode "End") (setq revEntsel (list ename (vlax-curve-getEndPoint ename))))) (command "revsurf" sourceObject revEntsel 0 30) ) Quote Link to comment Share on other sites More sharing options...
KRBeckman Posted March 29, 2010 Author Share Posted March 29, 2010 Ok, I get where you're going... I'll give this a try. Thanks a ton. I do have one question... if the revolution axis intersects with another object at its endpoint, could there be an issue with autodad selecting the wrong object at that point? Quote Link to comment Share on other sites More sharing options...
jammie Posted March 29, 2010 Share Posted March 29, 2010 Ok, I get where you're going... I'll give this a try. Thanks a ton Your welcome if the revolution axis intersects with another object at its endpoint, could there be an issue with autodad selecting the wrong object at that point? I don't think there should be an issue. By supplying the Revsurf command picks using ( ) the objects should be selected correctly Mabye test it for a few different scenarios just to be sure The only things to watch out for may be OSNAPS. Also the direction of which the curves are drawn (For determaining the start/end points) Quote Link to comment Share on other sites More sharing options...
KRBeckman Posted March 30, 2010 Author Share Posted March 30, 2010 Awesome, thanks again for your help. I'll let you know how it goes. 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.