We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

GDL
About building parametric objects with GDL.
SOLVED!

Obtaining pyramid's face angle

jc4d
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

Accepted Solutions
Solution
runxel
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 | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

View solution in original post

Solution
Lingwisyer
Guru

θ = atn( h / a )

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

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660

View solution in original post

7 REPLIES 7
yongler
Enthusiast

Please illustrate your ideas and requirements with a diagram 😀

Solution
runxel
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 | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
Solution
Lingwisyer
Guru

θ = atn( h / a )

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

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660
jc4d
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.

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
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Lingwisyer
Guru

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 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660

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

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!