The method to add loads is kind of big.
Maybe the responsibility could be handed the load itself.
Myabe the load adding needs to be done on element level, but not sure about that, some loads apply to multiple elements at once (seeiing the infill load function).
Just for cleanup this might help:
public class Mesh
{
public ILoad AddLoad(ILoad load)
{
return load.AddTo(this);
}
}
public interface ILoad
{
ILoad AddTo(Mesh mesh);
}
public class NodelLoad : ILoad
{
public ILoad AddTo(Mesh mesh)
{
// find the node in the mesh and attach load
}
}
public class InfillLoad : ILoad
{
public ILoad AddTo(Mesh mesh)
{
// find the elements in the mesh and attach
}
}
The method to add loads is kind of big. Maybe the responsibility could be handed the load itself.
Myabe the load adding needs to be done on element level, but not sure about that, some loads apply to multiple elements at once (seeiing the infill load function).
Just for cleanup this might help: