public void getForcesDiagram(AbstractCase ac, LineElement line, LineForceComponent component, float[,] controlPoints, out float fI, out float fJ)
{
Vector3 vI, vJ;
switch (component)
{
case LineForceComponent.Axial:
case LineForceComponent.Shear22:
case LineForceComponent.Shear33:
vI = new Vector3(model.Results.ElementJointForces[line.Id, 0, 0],
model.Results.ElementJointForces[line.Id, 0, 1],
model.Results.ElementJointForces[line.Id, 0, 2]);
vJ = new Vector3(model.Results.ElementJointForces[line.Id, 1, 0],
model.Results.ElementJointForces[line.Id, 1, 1],
model.Results.ElementJointForces[line.Id, 1, 2]);
break;
default:
vI = new Vector3(model.Results.ElementJointForces[line.Id, 0, 3],
model.Results.ElementJointForces[line.Id, 0, 4],
model.Results.ElementJointForces[line.Id, 0, 5]);
vJ = new Vector3(model.Results.ElementJointForces[line.Id, 1, 3],
model.Results.ElementJointForces[line.Id, 1, 4],
model.Results.ElementJointForces[line.Id, 1, 5]);
break;
}
// Transform to the line's local coordinate system
// From the global system
// (WARNING: This is supposed to come in the joint's local coordinate system)
vI = toLocal(line, vI);
vJ = toLocal(line, vJ);
switch (component)
{
case LineForceComponent.Axial:
case LineForceComponent.Torsion:
fI = vI.X;
fJ = vJ.X;
break;
case LineForceComponent.Shear22:
case LineForceComponent.Moment22:
fI = vI.Y;
fJ = vJ.Y;
break;
default:
fI = vI.Z;
fJ = vJ.Z;
break;
}
//float fI = model.Results.ElementJointForces[line.Id, 0, (int)component];
//float fJ = model.Results.ElementJointForces[line.Id, 1, (int)component];
// Add Isostatic curves if there's a load on the LineElement
addToShearMomentDiagram(ac, line, controlPoints, component, 1f);
}