2026-03-09 10:19 AM
I have an object that has worked fine for years until I have come across this Project where the ground level is mostly below the flood plane ie. it is a negative number. Problem is my simple little Inspection Chamber object doesn't like a negative number when creating the Chamber.
So for example my Basement is -1.750 and my Ground Floor is 0.000
So my object uses the
CLIL = SYMB_POS_Z - ILCLIL (Cover Level to Invert Level) is what height the object was inserted at (with Gravity used when placing the object on the topo mesh). However GDL can't make the Cylinder shape because in this case its trying to use a negative value.
!==========================
1:
MATERIAL "Paint - Dark Gray"
CYLIND CLIL,icdia/2
MATERIAL "C01"
ADD 0,0,CLIL -0.060
CYLIND CLIL,icdia/2
DEL 1
RETURN
!==========================Any suggestions or strategies on how I can work around this issue? Nothing is jumping out at me by way of a Function to temporarily make the negative number into a positive number. TIA
Operating system used: Windows 11 25H2 26200.7840
Solved! Go to Solution.
2026-03-09 11:11 AM
2026-03-09 11:11 AM
CYLIND ABS(CLIL),icdia/2
2026-03-09 11:26 AM
Magic thank you that sorted it.
2026-03-10 01:45 AM
I see you caught a solution... and Im not a GDL wizard, but any time I need a length parameter to never be negative, I set a master script:
IF lengthparametername < .001 THEN lengthparametername = .001 ELSE ENDIF