3d pyramid tetrahedron

3d pyramid tetrahedron

Anonymous
Not applicable
6,385 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,386 Views
21 Replies
Replies (21)
Message 2 of 22

ian.mag
Collaborator
Collaborator

Hey @Anonymous,

I believe the equivalent of what you want can be achieved by using the EXTRUDE and using the Taper angle.

Have you ever tried this before?

0 Likes
Message 3 of 22

Anonymous
Not applicable
The tetrahedron is on an arbitrary position given by the coordenates of its
four vertices. Extrude is not acceptable, even if it works because it would
require changing the UCS.

There is nothing more primitive in 3D solid modelling than an irregular
tetrahedron. What happened to the previous existing "3d pyramid" command?
0 Likes
Message 4 of 22

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

does this video show what you are looking for?

 

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 5 of 22

Anonymous
Not applicable
No, the base of the tetrahedron shown in the video is on the XY plane.

The current autocad "pyramid" command is as ridiculous as having a "3d
face" that only draws an equilateral triangle on the XY plane.
0 Likes
Message 6 of 22

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> the base of the tetrahedron shown in the video is on the XY plane.

You can use any 3D coordinates for the base point. Just use command _UCS to set the plane for the polyline before starting the PLINE command.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 7 of 22

SEANT61
Advisor
Advisor

Continuing in the framework as explained by @Alfred.NESWADBA, here is a command macro, as well as a screen recording of it in action:

^C^C_3dpoly;\\\c;_loft;mo;so;last;po;\co;g0;;_brep;last;

 

 

 

 

 


************************************************************
May your cursor always snap to the location intended.
Message 8 of 22

Anonymous
Not applicable
Notice: (1) You can draw a line in 3D with 2 vertices. (2) You can
draw a triangle in 3D with 3 vertices. (3) Why not a tetrahedron in 3D
with 4 vertices? These shapes are the most primitive shapes in their
respective dimensions - 1D, 2D and 3D.

AutoCAD had the possibility of drawing a tetrahedron until a few years
ago. It does not make sense to remove the very basic shape of 3D solid
modeling.

0 Likes
Message 9 of 22

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> AutoCAD had the possibility of drawing a tetrahedron until a few years ago.

Autodesk had not reduced functionality in AutoCAD, at least not with that function.

Or with other words: AutoCAD never had a command creating a tetrahedron as 3D solid based on 4 points.

 

Also I don't know why you are not using the suggestions you have got from our sides, both create the result you are looking for (at least how I understood your need). You have got 2 solutions and don't accept them ... why?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 10 of 22

schulz8NPAP
Advocate
Advocate

Here is a Lisp I use for years.

Regards

Jochen

www.ant-ares.de

0 Likes
Message 11 of 22

Anonymous
Not applicable

Yes, it has. The PYRAMID command used to accept 3 points and then the word TETRAHEDRON followed by another point. It is hard to believe that Autodesk can not understand that a tetrahedron is a primitive entity in 3D in the same way a triangle, which is drawn by the 3DFACE command, is a primitive entity in 2D. The way PYRAMID works is as useless as a 3DFACE command that draws only equilateral triangle in the XY plane.

0 Likes
Message 12 of 22

JDMather
Consultant
Consultant

Loft to Point.

Done!


-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional


0 Likes
Message 13 of 22

Anonymous
Not applicable

Please make an example.

0 Likes
Message 14 of 22

Anonymous
Not applicable

The following script, where # stands for space, worked. Thank you.

 

3dpoly 0.0,0.0,0.0 2.0,0.0,1.0 1.0,1.75,0.0 0.0,0.0,0.0#
loft last PO 1.75,2.00,1.00 CO G0#

Message 15 of 22

dbroad
Mentor
Mentor

@Anonymous , You are somewhat correct.  AutoCAD used to have an AI_PYRAMID command that did all that. It created some kind of polyface mesh rather than a solid.  I can find evidence in textbooks about AutoCAD circa 2004.  If you still want to use it, BricsCAD still has it. See here:  https://help.bricsys.com/hc/en-us/articles/360006650233-Ai-Pyramid

 

Nevertheless, if actually want to create solids, the help you've gotten in this thread beats that command.

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

Anonymous
Not applicable

This solution to draw a tetrahedron is not good. It is too slow when you must draw thousands of tetrahedra. The resulting file is too big probably because the object drawn by loft is way more complex than the required to draw a tetrahedron.

0 Likes
Message 17 of 22

Anonymous
Not applicable

The 3D PYRAMID TETRAHEDRON command existed until at least 2014. I have computer codes from this time using it.

0 Likes
Message 18 of 22

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:

.... to draw a tetrahedron using only its four vertices .... How can something similar be done now since there is no 3d pyramid command.


Try this [very lightly tested]:

 

(defun C:TetraHedron (/ v1 v2 v3 v4)
  (setq
    v1 (getpoint "\nFirst Tetrahedron vertex: ")
    v2 (getpoint v1 "\nSecond Tetrahedron vertex: ")
    v3 (getpoint v2 "\nThird Tetrahedron vertex: ")
    v4 (getpoint v3 "\nFourth Tetrahedron vertex: ")
  ); setq
  (command
    "_.3dpoly" v1 v2 v3 "_close"
    "_.extrude" "_last" "" "_direction" v1 v4
    "_.slice" "_last" "" "_3points" v2 v3 v4 v1
  ); command
  (princ)
); defun

 

It doesn't control for Osnap [yet], so turn off running Osnap modes first.  With some (grread) and (grvecs) fanciness, it could be made to not just show a rubber-band line from the latest point when asking for subsequent ones, but to build-drag the triangle for the base when asking for vertex 3, and maybe the tetrahedral edges when asking for vertex 4.  And it could use Undo begin-end wrapping, and the usual enhancements, but first see whether it does what you want.

Kent Cooper, AIA
0 Likes
Message 19 of 22

Anonymous
Not applicable

In the following scripts # stands for space. Two possibilities were tested by a volume discretization into 7680 tetrahedra. Creating a box where the tetrahedron is inscribed and making 4 slices is faster, but the resulting file is 35% bigger.

 

1 - Using loft:

 

3dface#x1,y1,z1#x2,y2,z2#x3,y3,z3##
loft#last#PO#x4,y4,z4#CO#G0#

 

2 – Creating a box where the tetrahedron is inscribed and making 4 slices:

 

box#xmin,ymin,zmin#xmax,ymax,zmax
slice#last###x1,y1,z1#x2,y2,z2#x3,y3,z3#x4,y4,z4
slice#last###x2,y2,z2#x3,y3,z3#x4,y4,z4#x1,y1,z1
slice#last###x3,y3,z3#x4,y4,z4#x1,y1,z1#x2,y2,z2
slice#last###x4,y4,z4#x1,y1,z1#x2,y2,z2#x3,y3,z3

0 Likes
Message 20 of 22

Anonymous
Not applicable

Your suggestion was also tested by a volume discretization into 7680 tetrahedra. It is the best solution among the three that were tested. A 3dface was extruded instead of a 3dpoly.

 

3dface#x1,y1,z1#x2,y2,z2#x3,y3,z3##
extrude#last##D#x1,y1,z1#x4,y4,z4
slice#last###x2,y2,z2#x3,y3,z3#x4,y4,z4#x1,y1,z1

0 Likes