/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { //Input Point3d supportPt = new Point3d(); DA.GetData(0, ref supportPt); bool isXFixed = true; DA.GetData(1, ref isXFixed); bool isYFixed = true; DA.GetData(2, ref isYFixed); bool isZFixed = true; DA.GetData(3, ref isZFixed); double weight = 1.0; DA.GetData(4, ref weight); //Warning if no direction is fixed if (!isXFixed && !isYFixed && !isZFixed) { this.AddRuntimeMessage(GH_RuntimeMessageLevel.Warning, "The specified point is free to move!"); } //Create simple support goal GoalObject support = new SupportGoal(supportPt, isXFixed, isYFixed, isZFixed, weight); //Output DA.SetData(0, support); }