License Delivery maintenance is expected to occur on Saturday, November 30, between 8 AM and 11 AM CET. This may cause a short 3-hours outage in which license-related tasks: license key upload, download, update, SSA validation, access to the license pool and Graphisoft ID authentication may not function properly. We apologize for any inconvenience.
GDL
About building parametric objects with GDL.
SOLVED!

Cannot figure out how to get wall radius for label

Podolsky
Ace
I need to script a label, that would know radius (also coordinates of radius centre) of the wall. I looked how window knows about it - for that there is special global variable WIDO_ORIG_DIST. But wall's global variables do not have any information about it. Any ideas? Or it's just impossible?
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Anonymous
Not applicable
Looks like AC25 has the solution.
New label parameter: LABEL_ASSOC_ELEM_GEOMETRY

radius_of_circle = Arc Length/Subtended Angle in Radians
r = s/θ

Does this now makes sense?

View solution in original post

21 REPLIES 21
I have never found the answer either.
I was hoping the radial dimension tool would be a GDL object I could explore, but sadly no.
So I think there is a way to do the math from other values but I haven't had time to look into yet. You would need start, end points (and center maybe) and then a length value.
Or perhaps there is a command I just haven't found it.
Creator of Cadswift's parametric GDL libraries
Creator of Infinite Openings and Component Catalogues
Push the envelope & watch it bend
website: https://cadswift.com.au/
YouTube: https://www.youtube.com/user/CADSwift/playlists
Podolsky
Ace
The only once way for solving this problem I found via using label coordinates. By placing label automatically it appears always in the middle of the wall. Then I have wall start point, wall arc middle point, chord direction and length of arc. This information would be enough to get formula finding radius and centre of radius.
But the only problem here - if I'm placing label manually (not in the middle of the wall arc) it will calculate wrong radius, also if I'm modifying wall radius, length or position of the end point - it will give me wrong radius.
But there is no another possibility, probably.
Barry Kelly
Moderator
The 'Moldings and Panel' wall accessory works on curved walls.
Having a quick look at the scripts, it uses 'ac_wall_radius'.

So 'ac_wall_radius' will read the radius of the wall for you if you can use that in your label.


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
Podolsky
Ace
Barry wrote:
The 'Moldings and Panel' wall accessory works on curved walls.
Having a quick look at the scripts, it uses 'ac_wall_radius'.

So 'ac_wall_radius' will read the radius of the wall for you if you can use that in your label.


Barry.
No, I cannot. Wall accessory passing to the GDL object parameters values via Add-on (all information about wall geometry). There is no connection between label and Add-on. If I just set new parameter variable AC_wall_radius in label it will return me zero.
Anonymous
Not applicable
I noticed that WALL_POSITION[1] gives the chord length of the arc. That with WALL_DIRECTION gives us the real cord length. With this and WALL_LENGTH_A (Arc length) we can get the wall radius thru https://www.vcalc.com/wiki/vCalc/Circle+-+Chord+Length+from+Arc+Length+and+Radius.
Does this makes sense?
Podolsky
Ace
No. WALL_POSITION means wall position - coordinates x,y,z. Wall position cannot give arc chord length.
Lingwisyer
Guru
Braza wrote:
WALL_POSITION[1]

Is that a new variable in AC24/25? It is not available in AC23...



Ling.

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
Podolsky
Ace
Screen shot from AC17 GDL manual.
Guys, what's wrong here is happening?
Anonymous
Not applicable
Yes. WALL_POSITION long exists.
But I did a test with a dummy label with WALL_POSITION[1] AND [2] text2.
Noticed that the arc is always counterclockwise although the origin straight wall was from left to right.
Perhaps it is just luck. But it gives you the chord length. Though if I move the wall to the negative side of the origin it will give a different value...
Just turning some rocks.