Jump to content

create a meshed surface from points


tuli01

Recommended Posts

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

Link to comment
Share on other sites

  • 3 years later...
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?

Link to comment
Share on other sites

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