Exemplo n.º 1
0
        private void menuChangeMode(object sender, EventArgs e)
        {
            var dataIn = sender.ToString();

            if (Params.Input.Count == 3)
            {
                GH_ComponentParamServer.IGH_SyncObject so = Params.EmitSyncObject();
                List <IGH_Param> pars = new List <IGH_Param>();
                pars.AddRange(Params.Input);
                foreach (IGH_Param pi in pars)
                {
                    if (pi.NickName == "DOF Start" || pi.NickName == "DOF End")
                    {
                        pi.IsolateObject();
                        Params.UnregisterInputParameter(pi);
                    }
                }
            }

            eFixityType tempFixType = eFixityType.FULLY_FIXED;

            switch (dataIn)
            {
            case "Fully Fixed":
                tempFixType = eFixityType.FULLY_FIXED;
                break;

            case "ReleaseMoment At Start":
                tempFixType = eFixityType.MOMENTREALESED_START;
                break;

            case "ReleaseMoment At End":
                tempFixType = eFixityType.MOMENTREALESED_END;
                break;

            case "ReleaseMoment At Both":
                tempFixType = eFixityType.MOMENTREALESED_BOTH;
                break;

            case "Release By Degree of Freedom":
                NewBooleanParam("DOF Start", "DOF Start", "", GH_ParamAccess.list);
                NewBooleanParam("DOF End", "DOF End", "", GH_ParamAccess.list);
                tempFixType = eFixityType.FIXITIES_BY_DOF;
                break;
            }

            SetFixType(tempFixType);
        }
Exemplo n.º 2
0
 public void SetFixType(eFixityType ftype)
 {
     fixType = ftype;
     this.ExpireSolution(true);
 }