tuli01 Posted January 16, 2006 Posted January 16, 2006 Autocad ver. 2006 I need to generate a meshed surface (using Visual Basic) using an array of points (x,y,z) Please advise Tuli Quote
David Bethel Posted January 16, 2006 Posted January 16, 2006 Here is how you do it autolisp. Maybe someone can convert it to VBA (defun draw_mesh (vlist mmesh nmesh mflg nflg / cflg) (and (= (type vlist) 'LIST) (= (type nmesh) 'INT) (= (type mmesh) 'INT) (< nmesh 256) (< mmesh 256) (> nmesh 2) (> mmesh 2) (cond ((and nflg mflg) (setq cflg 49)) (nflg (setq cflg 48)) (mflg (setq cflg 17)) (t (setq clfg 16))) (entmake (list (cons 0 "POLYLINE")(cons 66 1) (cons 6 "BYLAYER") (cons 10 (list 0 0 0)) (cons 70 cflg) (cons 71 mmesh)(cons 72 nmesh) (cons 39 0))) (foreach v vlist (entmake (list (cons 0 "VERTEX") (cons 6 "BYLAYER") (cons 10 v) (cons 70 64)))) (entmake (list (cons 0 "SEQEND"))))) vlist = list of vertice points ( the order is very important ) nmesh - INT between 2 & 255 mmesh - INT between 2 & 255 n & m flags = T nil The length of vlist must = nmesh * mmesh -David Quote
nicouille Posted June 12, 2009 Posted June 12, 2009 Here is how you do it autolisp. Maybe someone can convert it to VBA (defun draw_mesh (vlist mmesh nmesh mflg nflg / cflg) (and (= (type vlist) 'LIST) (= (type nmesh) 'INT) (= (type mmesh) 'INT) (< nmesh 256) (< mmesh 256) (> nmesh 2) (> mmesh 2) (cond ((and nflg mflg) (setq cflg 49)) (nflg (setq cflg 48)) (mflg (setq cflg 17)) (t (setq clfg 16))) (entmake (list (cons 0 "POLYLINE")(cons 66 1) (cons 6 "BYLAYER") (cons 10 (list 0 0 0)) (cons 70 cflg) (cons 71 mmesh)(cons 72 nmesh) (cons 39 0))) (foreach v vlist (entmake (list (cons 0 "VERTEX") (cons 6 "BYLAYER") (cons 10 v) (cons 70 64)))) (entmake (list (cons 0 "SEQEND"))))) vlist = list of vertice points ( the order is very important ) nmesh - INT between 2 & 255 mmesh - INT between 2 & 255 n & m flags = T nil The length of vlist must = nmesh * mmesh -David Is this the autoslip corresponding to 3dmesh?I'm trying to run it but it doesn't seem to work (or better I don't seem to be bale to make it work!!!) Any advice? 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.