cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Got a minute? We appreciate your feedback:

GDL
About building parametric objects with GDL.

## Obtaining pyramid's face angle

Expert

Hello,

I have a pyramid object using the pyramid command, but I would like to show the angle of each face in the floor plan. Is there a way to obtain and display that kind of information?

Juan

2 ACCEPTED SOLUTIONS
7 REPLIES 7
Booster

Solution
Legend

The reference manual says:

Pyramid based on a polyline in the x-y plane. The peak of the pyramid is located at (0, 0, h).

So you know your coordinates. And you know "h", since you defined it....

Now all you need is the distance of the line to p{0,0} and a bit of simplest trigonometry. Should be straightforward.

Lucas Becker | AC 27 on Mac | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»
Solution
Hero

θ = atn( h / a )

θa = atn( abs( ze - za ) / ( xe - xa ) )

 AC22-23 AUS 7000 Help Those Help You - Add a Signature Self-taught, bend it till it breaks Creating a Thread Win10 | R5 2600 | 16GB | GTX1660
Expert

Thank you all, I agree it should be pretty straight forward. I think my main issue is (as far as I know) there is no console to print values, just like in python to corroborate the values.

Moderator

Just use the PRINT command.

If in the 2D script , view the 2D preview and you will get a message.

Same in the 3D script, view the 3D preview.

You may need to set your Work Environment to interrupt with error messages if that is turned off.

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Hero

If you are just wanting it to display on the floorplan, just use a text2 with the result of the above trig?

 AC22-23 AUS 7000 Help Those Help You - Add a Signature Self-taught, bend it till it breaks Creating a Thread Win10 | R5 2600 | 16GB | GTX1660

That did the trick, sometimes I tkae the most complicated route 😅

Latest solutions

Most liked posts