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); }
private void menuChangeMode(object sender, EventArgs e) { var dataIn = sender.ToString(); if (Params.Input.Count > 1) { 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 == "points") { continue; } pi.IsolateObject(); Params.UnregisterInputParameter(pi); } } eSupportType tempSupType = eSupportType.FIXED; switch (dataIn) { case "AllFixed": tempSupType = eSupportType.FIXED; break; case "AllPinned": tempSupType = eSupportType.PINNED; break; case "ByConstraints": NewBooleanParam("x", "x", "", GH_ParamAccess.item, true); NewBooleanParam("y", "y", "", GH_ParamAccess.item, true); NewBooleanParam("z", "z", "", GH_ParamAccess.item, true); NewBooleanParam("rx", "rx", "", GH_ParamAccess.item, true); NewBooleanParam("ry", "ry", "", GH_ParamAccess.item, true); NewBooleanParam("rz", "rz", "", GH_ParamAccess.item, true); tempSupType = eSupportType.CUSTOM; break; } SetSupportType(tempSupType); }