Jump to content

Recommended Posts

Posted

how can i make 3d mesh lisp take in mind that osnap turn off when using command 3d then mesh, i want use endpoint?

  • 3 years later...
Posted

you can watch my class at Autodesk University 2012, LISP your MESH into Shape! It shows how to use entmake and entmod to create and modify 3d meshes

Posted

;*** means the group is required

 

To entmake a mesh, 1st you must make the HEADER :

 

(entmake (list (cons 0 "POLYLINE")  ;***
              (cons 6 "BYLAYER")
              (cons 8 "0")
              (cons 10 (list 0.0 0.0 0.0)) ;***
              (cons 39 0.0)
              (cons 40 0.0)
              (cons 41 0.0)
              (cons 62 256)
              (cons 66 1)  ;***
              (cons 70 16) ;***
              (cons 71 2)  ;***
              (cons 72 2)  ;***
              (cons 73 0)
              (cons 74 0)
              (cons 75 0)
              (cons 210 (list 0.0 0.0 1.0))))

 

For each VERTEX :

(entmake (list (cons 0 "VERTEX") ;***
              (cons 6 "BYLAYER")
              (cons 8 "0")
              (cons 10 (list 0.0 0.0 0.0)) ;***
              (cons 39 0.0)
              (cons 40 0.0)
              (cons 41 0.0)
              (cons 42 0.0)
              (cons 50 0.0)
              (cons 70 64) ;*** 
              (cons 71 0)
              (cons 72 0)
              (cons 73 0)
              (cons 74 0)
              (cons 62 256)))

 

The SEQEND entity :

 

	   
(entmake (list (cons 0 "SEQEND") ;***
              (cons 8 "0")))

 

A PFACE mesh has different logic, so watch your step there.

 

The trick is in knowing the correct value for the required groups

 

Header group 66:

1 bit MUST be set

 

Header group 70:

16 bit MUST be set

for closed M direction, add the 1 bit

for closed N direction, add the 32 bit

 

Header group 71:

M mesh count

 

Header group 72

N mesh count

 

 

Vertex group 70:

64 bit MUST be set

 

 

These are pretty much the bare minimums

 

How you collect or construct the point list pretty much arbitrary as long as you feed them to the vertex call in the proper order and quantity. Just keep in mind that they are WCS point values. -David

Posted

WOW I didn't realize how old this thread was gggrrrrr

Posted

And an advertisement reply to boot !

 

 

Sucked me in :x

Posted

I hadn't realized that post's age. Found it in Google.

You are describing how to entmake legacy Polygon or Polyface meshes.

If you watch my AU 2012 class (call it an advertisement if you wish) you'll find out how to entmake the new MESH (not POLYLINE variants) entities. And to modify them through entmod.

Posted
(call it an advertisement if you wish)

 

If it's self promoting and ain't free, it's an advertisement to me.

Posted (edited)

I am including a link to the handout for my AU2012 class in which the source code for entmake-ing/entmod-ing MESH (SubDMesh) entities is explained.

I hope this will clear any misunderstanding.

https://docs.google.com/open?id=0B9W7tCC4QFV7blpRcExhRkxvS3M

If anyone is interested in watching the videos, the link is:

http://au.autodesk.com/?nd=au_player#1%0:3202

Best regards,

Reinaldo N. Togores

University of Cantabria, Spain.

Edited by togores
The docs.google.com link has been changed

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