Beispiel #1
0
        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);
        }
Beispiel #2
0
 public JSPointLoad(JSPointLoad pointLoad)
 {
     Force = pointLoad.Force;
     Node  = pointLoad.Node;
 }