Check this Post: about similar topic for pipe fittings [Compliance with POMI method of measurement]
This Premise may also help
Fitting Length VOL5.dyn (227.9 KB)
Also check this amazing topic by Jeremy from the Building Coder [ contains code snippets in Python and C# ]
https://thebuildingcoder.typepad.com/blog/2024/09/mep-cable-tray-bend-and-tee-analysis-1.html