cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
GDL
About building parametric objects with GDL.
SOLVED!

GDL: Cutplane height self adjusting!?

DGSketcher
Legend

I have a drawing symbol that I want to display if it is positioned below the Floor Plan Cut Plane. The ability to offset from its Home Story is a valid option. What is confusing is the Cut Plane returned value is reducing by the amount of the offset when theoretically it should be a static global value, shouldn't it?

 

!2D Script
!Show subtype Drawing Symbol text values if symbol Z is below cutplane

circle2 0,0, 0.5

if Symb_Pos_Z < (GLOB_CSTORY_ELEV + GLOB_CUTPLANES_INFO[1]) + (Symb_Pos_Z - GLOB_HSTORY_ELEV) + eps then
strText3 = "CP: " + STR((GLOB_CSTORY_ELEV + GLOB_CUTPLANES_INFO[1]), 8 , 3) + " OS: " + STR((Symb_Pos_Z - GLOB_HSTORY_ELEV), 8 , 3) + " Z: " + STR(Symb_Pos_Z, 8 , 3)
text2 0, 0,	strText3
endif

 

My symbol is working, I am just curious why the returned Cut Plane value is changing or have I missed something?  

Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
sinceV6
Advocate

@DGSketcher wrote:

....What is confusing is the Cut Plane returned value is reducing by the amount of the offset when theoretically it should be a static global value...


Hi.

Completely agree with you that CutPlane info is not intuitive at first, but the key part from the GDL reference is "in the library part's local coordinate system".

In other words, for example, cutplane height (GLOB_CUTPLANES_INFO[1]) gives you the difference between the start of your object (or its local system) and cutplane as in settings. If your object's home offset is exactly at the cutplane height setting, GLOB_CUTPLANES_INFO[1] (for that object) will return 0; and then you can calculate which parts to show, which are overhead, etc.

This is why the value is reducing by the home story offset amount.

At least, that is how I got it understood in the end.

Best regads.

View solution in original post

3 REPLIES 3
Solution
sinceV6
Advocate

@DGSketcher wrote:

....What is confusing is the Cut Plane returned value is reducing by the amount of the offset when theoretically it should be a static global value...


Hi.

Completely agree with you that CutPlane info is not intuitive at first, but the key part from the GDL reference is "in the library part's local coordinate system".

In other words, for example, cutplane height (GLOB_CUTPLANES_INFO[1]) gives you the difference between the start of your object (or its local system) and cutplane as in settings. If your object's home offset is exactly at the cutplane height setting, GLOB_CUTPLANES_INFO[1] (for that object) will return 0; and then you can calculate which parts to show, which are overhead, etc.

This is why the value is reducing by the home story offset amount.

At least, that is how I got it understood in the end.

Best regads.

@sinceV6 Thank you. I have clearly missed the "local coordinate" reference. That would also explain the troubles I am having with one of my other objects. 

Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)
DGSketcher
Legend

I am struggling with GLOB_CUTPLANES_INFO[3] giving inconsistent results in a four story environment when setting the view limit to more than one story below the top story... trying to find the logic!

 

Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)

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!