public int AddForce(NForce F)//添加荷载,返回荷载在Loads中从零开始的索引 { if (F.NodeIndex < 0 || F.NodeIndex >= NCount) { return(-1); } Loads.Add(F); return(FCount - 1); }
private void DrawAndAddForce(PointF spf, PointF epf, bool IsGridPointF = false) { if (spf == epf) { return; } int NI = TS.GetNodeIndex(ToGridPointF(spf)); if (NI == -1) { return; } if (!IsGridPointF) { spf = ToGridPointF(spf); epf = ToGridPointF(epf); } NForce nf = new NForce(spf, epf, NI, UnitSize); int FI = TS.AddForce(nf); DrawForce(spf, epf, FI + 1, nf.Size, true); }