2023-04-13 12:54 PM
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?
Solved! Go to Solution.
2023-04-13 05:29 PM
@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.
2023-04-13 05:29 PM
@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.
2023-04-13 06:00 PM
@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.
2023-04-15 03:04 PM - edited 2023-04-15 07:11 PM
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!