3d pyramid tetrahedron

3d pyramid tetrahedron

Anonymous
Not applicable
6,390 Views
21 Replies
Message 1 of 22

3d pyramid tetrahedron

Anonymous
Not applicable

I use to draw a tetrahedron using only its four vertices with the command "3d pyramid v1 v2 v3 tetrahedron v4" where v1, v2, v3 and v4 are points (vertices). How can something similar be done now since there is no 3d pyramid command.

0 Likes
Accepted solutions (1)
6,391 Views
21 Replies
Replies (21)
Message 21 of 22

dbroad
Mentor
Mentor
Accepted solution

You may have used 2011 or earlier until 2014 but the 3d command and its subcommands were phased out in AutoCAD 2012.  The last version that had them was 2011.  Those commands created polyface meshes.  If you want polyface mesh objects, this lisp will give you the same functionality with a fraction of the size of using solids.  If you need 3d solids, then the contributors on this thread have given you a number of good ways.  Another alternative is to create a mesh object using entmake and then convert it to a solid, deleting the mesh object.

;;create a polyface mesh tetrahedron from 4 input points
;;Similar to legacy ai_pyramid with a base of 3 sides and using verticies entry.
;;All points must not lie on the same plane. Returns the object made.
;;D. C. Broad, Jr  4/21/2021
(defun 3dtetrapfm (p1 p2 p3 p4)
  (command "._pface" "_non" p1 "_non" p2 "_non" p3 "_non" p4
	   "" 1 2 3 "" 1 2 4 "" 2 3 4 "" 1 3 4 "" "")
  (entlast)
  )

 

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 22 of 22

Anonymous
Not applicable

This is enough - thank you.

0 Likes