public static dynamic GetTSObject(RebarHookData dynObject) { if (dynObject is null) { return(null); } return(dynObject.teklaObject); }
/// <summary> /// Get start hook real length /// </summary> /// <param name="rebarHookData">Hook data</param> /// <param name="actualRebarSize">Actual rebar size</param> /// <returns>Real length of start hook</returns> private double GetHookRealLength(RebarHookData rebarHookData, double actualRebarSize) { double radius = rebarHookData.Radius; double length = rebarHookData.Length; double angle = rebarHookData.Angle; double hookAngleRadians = (Math.Abs(angle) / 180.0) * Math.PI; double r = radius + actualRebarSize / 2.0; double legnthOfBend = hookAngleRadians * r; double startHookRealLength = length + legnthOfBend - (r + actualRebarSize / 2.0); if (length < DistanceEpsilon) { startHookRealLength = 0.0; } return(startHookRealLength); }