mojo8997 Posted February 26, 2010 Posted February 26, 2010 hey guys i have a question, still learning here... but my friend sent me this example but has been really busy and we havent had time to talk more. Im not sure how to do it and i could really use it today if i could figure it out, any help would be much appreciated!! [font=Arial][font=Arial][font=Arial](setq ABC212 (LIST '(AA 1 2 3 4)[/font] [font=Arial] '(AB 2 3 4 5)[/font] [font=Arial] '(AC 3 4 5 6)[/font] [font=Arial] );end list[/font] [font=Arial]);end setq[/font] [/font][/font] Quote
mojo8997 Posted February 26, 2010 Author Posted February 26, 2010 i want to have a list of parametric shapes that i can draw, then extrude them along a line, im going to use these list to get points then create a pline along the points, then extrude it. So im trying to figure out how to drill into a sub list and load the correct one then plot the points from that sublist, then run the routine Quote
Lee Mac Posted February 26, 2010 Posted February 26, 2010 Ok, so what operation do you want to perform on this list? Quote
mojo8997 Posted February 26, 2010 Author Posted February 26, 2010 i want to draw a pline from point to point then close it, then extrude it (by entering a distance) Quote
mojo8997 Posted February 26, 2010 Author Posted February 26, 2010 so i guess enter the defun, then specify the list, like AA then tell it how far to extrude from the basepoint i pick Quote
Lee Mac Posted February 26, 2010 Posted February 26, 2010 So the list you provided in your first post is the list of vertices for the polyline? I would suggest looking into the assoc function. Quote
alanjt Posted February 26, 2010 Posted February 26, 2010 So the list you provided in your first post is the list of vertices for the polyline? I would suggest looking into the assoc function. Don't forget cdr. Command: (assoc "B" (list '("A" 1 2 3) '("B" 4 5 6) '("C" 7 8 9))) ("B" 4 5 6) Command: (cdr (assoc "B" (list '("A" 1 2 3) '("B" 4 5 6) '("C" 7 8 9)))) (4 5 6) Quote
mojo8997 Posted February 26, 2010 Author Posted February 26, 2010 let me try that, i just started getting into lisp then i got busy with work now im trying to remember everything Quote
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.