public JSModel DoAnalysis() { var lowerSupportNode = new JSNode(new Vector2d(0, 0)) { XRestrained = true, YRestrained = true }; var upperSupportNode = new JSNode(new Vector2d(0, 10)) { XRestrained = true, YRestrained = true }; var forceNode = new JSNode(new Vector2d(5, 5)); var nodes = new JSNode[] { upperSupportNode, forceNode, lowerSupportNode }; var force = new JSPointLoad(new Vector2d(0, -1), forceNode); var forces = new JSPointLoad[] { force }; var lowerBar = new JSBar(lowerSupportNode, forceNode); var upperBar = new JSBar(upperSupportNode, forceNode); var bars = new JSBar[] { upperBar, lowerBar }; var analyser = new JSModel(); analyser.AddItems(bars, nodes, forces); analyser.Solve(); return(analyser); }
public JSBar(JSBar bar) { StartVertex = bar.StartVertex; EndVertex = bar.EndVertex; EA = bar.EA; }
/// <summary> /// Create a vertex to a node. /// </summary> public JSVertex(JSNode node, JSBar bar) { Position = node.Position; Node = node; Bar = bar; }
/// <summary> /// Create a vertex without a node. /// The node will be populated when it is added to the JointAnalysis model. /// </summary> public JSVertex(Vector2d position, JSBar bar) { Position = position; Bar = bar; }