/// <summary> /// Registers all the input parameters for this component. /// </summary> protected override void RegisterInputParams(GH_InputParamManager pManager) { base.RegisterInputParams(pManager); pManager.AddBrepParameter("Obstacle", "O", "A brep representing the obstacle to avoid.", GH_ParamAccess.item); pManager.AddNumberParameter(RS.visionRadiusMultiplierName, RS.visionRadiusMultiplierNickname, RS.visionRadiusMultiplierDescription, GH_ParamAccess.item, RS.visionRadiusMultiplierDefault / 5); }
protected override void RegisterInputParams(GH_InputParamManager pManager) { pManager.AddBrepParameter("Planar Brep", "Brp", "Planar Brep specifying the boundaries of the Cross Section", GH_ParamAccess.list); pManager.AddPlaneParameter("Plane", "Pln", "Plane", GH_ParamAccess.list, Plane.WorldYZ); pManager.AddIntegerParameter("Section Id", "Id", "Id of this Section", GH_ParamAccess.list, 10); pManager.AddTextParameter("Section Name", "Name", "Name of this Section", GH_ParamAccess.list, "New Section"); }
protected override void RegisterInputParams(GH_InputParamManager pManager) { pManager.AddBrepParameter("Brep", "B", "The brep from which to get faces", GH_ParamAccess.item); pManager.AddNumberParameter("Tolerance", "T", "The allowed tolerance from vertical for something to be counted as a top or bottom surface. Value from 0 to 1", GH_ParamAccess.item, 0.9); }
//This region overrides the typical component layout #endregion #region input and output protected override void RegisterInputParams(GH_InputParamManager pManager) { pManager.AddIntegerParameter("Load case", "LC", "Load case number (default 1)", GH_ParamAccess.item, 1); pManager.AddBrepParameter("Brep", "B", "(Optional) Brep. If no input the whole plane method will be used. If both Grid Plane Surface and Brep are inputted, this Brep will be projected onto the Grid Plane.", GH_ParamAccess.item); pManager.AddGenericParameter("Grid Plane Surface", "GPS", "Grid Plane Surface or Plane (optional). If no input here then the brep's best-fit plane will be used", GH_ParamAccess.item); pManager.AddTextParameter("Direction", "Di", "Load direction (default z)." + System.Environment.NewLine + "Accepted inputs are:" + System.Environment.NewLine + "x" + System.Environment.NewLine + "y" + System.Environment.NewLine + "z", GH_ParamAccess.item, "z"); pManager.AddIntegerParameter("Axis", "Ax", "Load axis (default Global). " + System.Environment.NewLine + "Accepted inputs are:" + System.Environment.NewLine + "0 : Global" + System.Environment.NewLine + "-1 : Local", GH_ParamAccess.item, 0); pManager.AddBooleanParameter("Projected", "Pj", "Projected (default not)", GH_ParamAccess.item, false); pManager.AddTextParameter("Name", "Na", "Load Name", GH_ParamAccess.item); pManager.AddNumberParameter("Value (" + Units.Force + "/" + Units.LengthLarge + "\xB2)", "V", "Load Value (" + Units.Force + "/" + Units.LengthLarge + "\xB2)", GH_ParamAccess.item); pManager[0].Optional = true; pManager[1].Optional = true; pManager[2].Optional = true; pManager[3].Optional = true; pManager[4].Optional = true; pManager[5].Optional = true; pManager[6].Optional = true; }
protected override void RegisterInputParams(GH_InputParamManager pManager) { pManager.AddBrepParameter("Geometry", "Geo", "Geometry", GH_ParamAccess.tree); pManager.AddTextParameter("Materials", "Mats", "Geometry material info", GH_ParamAccess.tree); pManager.AddIntegerParameter("Stories", "Sts", "Geometry story info", GH_ParamAccess.tree); pManager[2].Optional = true; }
protected override void RegisterInputParams(GH_InputParamManager pManager) { pManager.AddGenericParameter("Wire", "Wire", "Stirrup rebar material and type.", GH_ParamAccess.item); pManager.AddBrepParameter("Profile", "Profile", "Surface representing the profile of the stirrup in the host bar local coordinate system.", GH_ParamAccess.item); pManager.AddNumberParameter("Start", "Start", "Start x-position, of stirrup reinforcement, in host bar local coordinate system. [m]", GH_ParamAccess.item); pManager.AddNumberParameter("End", "End", "End x-position, of stirrup reinforcement, in host bar local coordinate system. [m]", GH_ParamAccess.item); pManager.AddNumberParameter("Spacing", "Spacing", "Parameter representing spacing of stirrups. [m]", GH_ParamAccess.item); }
protected override void RegisterInputParams(GH_InputParamManager pManager) { pManager.AddBrepParameter("Planar Brep", "Brp", "Planar Brep specifying the boundaries of the Cross Section", GH_ParamAccess.list); pManager.AddPlaneParameter("Plane", "Pln", "Construction Plane for this Section", GH_ParamAccess.list, Plane.WorldYZ); pManager.AddGenericParameter("Section Attributes", "SecAttr", "SOFiSTiK Cross Section Attributes", GH_ParamAccess.list); pManager[2].Optional = true; }
protected override void RegisterInputParams(GH_InputParamManager manager) { manager.AddBrepParameter("Brep", "B", string.Empty, GH_ParamAccess.item); manager[manager.AddBooleanParameter("Visible", "V", string.Empty, GH_ParamAccess.item, true)].Optional = true; manager[manager.AddParameter(new Parameters.Category(), "Subcategory", "S", string.Empty, GH_ParamAccess.item)].Optional = true; manager[manager.AddIntegerParameter("Visibility", "S", string.Empty, GH_ParamAccess.item, -1)].Optional = true; manager[manager.AddParameter(new Parameters.Material(), "Material", "M", string.Empty, GH_ParamAccess.item)].Optional = true; }
protected override void RegisterInputParams(GH_InputParamManager pManager) { base.RegisterInputParams(pManager); pManager.AddBrepParameter("Brep", "B", "Beam member geometry to clip with.", GH_ParamAccess.item); pManager.AddBooleanParameter("Male", "M", "Toggle between male and female type of joint.", GH_ParamAccess.item, false); pManager.AddBooleanParameter("Flip", "F", "Flip clipped part of beam geometry.", GH_ParamAccess.item, false); pManager.AddNumberParameter("Angle", "A", "Angle of v-cutter.", GH_ParamAccess.item, 30.0); pManager.AddNumberParameter("Depth", "D", "Depth of grooves.", GH_ParamAccess.item, 6.0); }
protected override void RegisterInputParams(GH_InputParamManager pManager) { pManager.AddBrepParameter("Brep", "Brep", "Brep / Surface Geometry", GH_ParamAccess.list); pManager.AddIntegerParameter("Number", "Number", "Identifier of structural area", GH_ParamAccess.list, 0); pManager.AddIntegerParameter("Group", "Group", "Group numbers", GH_ParamAccess.list, 0); pManager.AddNumberParameter("Thickness", "Thickness", "Thickness of structural area", GH_ParamAccess.list, 0.0); pManager.AddIntegerParameter("Material", "Material", "Material number", GH_ParamAccess.list, 0); pManager.AddIntegerParameter("ReinforcementMaterial", "ReinfMat", "Reinforcement material number", GH_ParamAccess.list, 0); pManager.AddVectorParameter("Dir x", "Dir x", "Direction of local x-axis", GH_ParamAccess.list, new Vector3d()); }
protected override void RegisterInputParams(GH_InputParamManager manager) { manager.AddBrepParameter("Brep", "B", "Brep to set its solid orientation", GH_ParamAccess.item); var param = manager[manager.AddIntegerParameter("Orientation", "O", "Outward=1, Inward=-1", GH_ParamAccess.item)]; if (param is Param_Integer orientation) { orientation.AddNamedValue("Outward", (int)Rhino.Geometry.BrepSolidOrientation.Outward); orientation.AddNamedValue("Inward", (int)Rhino.Geometry.BrepSolidOrientation.Inward); } }
protected override void RegisterInputParams(GH_InputParamManager pManager) { base.RegisterInputParams(pManager); pManager.AddBrepParameter("Brep", "B", "Surface as a Brep.", GH_ParamAccess.item); pManager.AddIntegerParameter("Side", "S", "Side of the surface to use for flank machining as a bitmask.", GH_ParamAccess.item, 0); pManager.AddBooleanParameter("Zigzag", "Z", "Alternate the cutting direction of each pass.", GH_ParamAccess.item, false); pManager.AddNumberParameter("PathExtension", "Pe", "Extend the path by an amount.", GH_ParamAccess.item, 0.0); pManager.AddNumberParameter("DepthExtension", "De", "Extend the depth of the rules by an amount.", GH_ParamAccess.item, 0.0); pManager.AddNumberParameter("MaxDepth", "Md", "Maximum depth of the cut.", GH_ParamAccess.item, 50.0); }
protected override void RegisterInputParams(GH_InputParamManager pManager) { pManager.AddBrepParameter("Brep", "Brep", "Brep / Surface Geometry", GH_ParamAccess.list); pManager.AddIntegerParameter("Number", "Number", "Identifier of structural area", GH_ParamAccess.list, 0); pManager.AddIntegerParameter("Group", "Group", "Group numbers", GH_ParamAccess.list, 0); pManager.AddNumberParameter("Thickness", "Thickness", "Thickness of structural area", GH_ParamAccess.list, 0.0); pManager.AddIntegerParameter("Material", "Material", "Material number", GH_ParamAccess.list, 0); pManager.AddIntegerParameter("ReinforcementMaterial", "ReinfMat", "Reinforcement material number", GH_ParamAccess.list, 0); pManager.AddVectorParameter("Dir x", "Dir x", "Direction of local x-axis", GH_ParamAccess.list, new Vector3d()); pManager.AddTextParameter("Alignment", "Alignment", "Alignment of the volume in relation to the surface area (Centered = default, Above, Below)", GH_ParamAccess.list, "Centered"); pManager.AddTextParameter("Mesh Options", "Mesh Options", "Mesh Options for the SOFiSTiK FE meshing (Automatic = default, Regular, Single Quad, Deactivate)", GH_ParamAccess.list, "Automatic"); pManager.AddNumberParameter("Element Size", "Element Size", "Size of FE elements [m]", GH_ParamAccess.list, 0.0); pManager.AddTextParameter("User Text", "User Text", "Custom User Text to be passed to the SOFiSTiK input", GH_ParamAccess.list, string.Empty); }
protected override void RegisterInputParams(GH_InputParamManager pManager) { pManager.AddBrepParameter("Surface", "S", "Surface to shrink", GH_ParamAccess.item); }
/// <summary> /// Registers all the input parameters for this component. /// </summary> protected override void RegisterInputParams(GH_InputParamManager pManager) { pManager.AddBrepParameter(RS.brepName, RS.brepNickname, RS.brepForEnvironmentDescription, GH_ParamAccess.item); pManager.AddVectorParameter("Border Extrution Direction", "D", "A vector indicating which direction to extrude the borders of the polysurface to create border walls for containment. If the zero vector is supplied, the default is to extrude each border point normal to the surface.", GH_ParamAccess.item, Vector3d.Zero); }
/// <summary> /// Registers all the input parameters for this component. /// </summary> protected override void RegisterInputParams(GH_InputParamManager pManager) { pManager.AddBrepParameter("Brep", "b", "Brep to explode", GH_ParamAccess.list); }
/// <summary> /// Registers all the input parameters for this component. /// </summary> protected override void RegisterInputParams(GH_InputParamManager pManager) { pManager.AddBrepParameter(RS.brepName, RS.brepNickname, RS.brepForEnvironmentDescription, GH_ParamAccess.item); }
protected override void RegisterInputParams(GH_InputParamManager manager) { manager.AddBrepParameter("Brep", "B", string.Empty, GH_ParamAccess.item); }
protected override void RegisterInputParams(GH_InputParamManager manager) { manager.AddBrepParameter("Brep", "B", "Brep to check for its solid orientation", GH_ParamAccess.item); }
protected override void RegisterInputParams(GH_InputParamManager manager) { manager.AddBrepParameter("Brep", "B", "Brep to match", GH_ParamAccess.item); base.RegisterInputParams(manager); }
protected override void RegisterInputParams(GH_InputParamManager manager) { manager.AddBrepParameter("Brep", "B", string.Empty, GH_ParamAccess.item); manager[manager.AddBooleanParameter("Void", "V", string.Empty, GH_ParamAccess.item, true)].Optional = true; }
protected override void RegisterInputParams(GH_InputParamManager pManager) { pManager.AddBrepParameter("Surfaces", "S", "The surfaces or polysurfaces to preview", GH_ParamAccess.item); pManager.AddIntegerParameter("Size", "S", "The size of the directional arrows to draw", GH_ParamAccess.item, 1); }
// :( //// This object MUST be static?? //static Dictionary<Type, Func<GH_InputParamManager, MACHINA_InputParameProps, int>> AddParameterFunctionMap = // new Dictionary<Type, Func<GH_InputParamManager, MACHINA_InputParameProps, int>>() //{ // //{ typeof (), (pm, p) => pm.AddAngleParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Arc), (pm, p) => pm.AddArcParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Boolean), (pm, p) => pm.AddBooleanParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Box), (pm, p) => pm.AddBoxParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Brep), (pm, p) => pm.AddBrepParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Circle), (pm, p) => pm.AddCircleParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Colour), (pm, p) => pm.AddColourParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Complex), (pm, p) => pm.AddComplexNumberParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Culture), (pm, p) => pm.AddCultureParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Curve), (pm, p) => pm.AddCurveParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Field), (pm, p) => pm.AddFieldParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_GenericObject), (pm, p) => pm.AddGenericParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Geometry), (pm, p) => pm.AddGeometryParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Group), (pm, p) => pm.AddGroupParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Integer), (pm, p) => pm.AddIntegerParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Interval2D), (pm, p) => pm.AddInterval2DParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Interval), (pm, p) => pm.AddIntervalParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Line), (pm, p) => pm.AddLineParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Matrix), (pm, p) => pm.AddMatrixParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_MeshFace), (pm, p) => pm.AddMeshFaceParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Mesh), (pm, p) => pm.AddMeshParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Number), (pm, p) => pm.AddNumberParameter(p.name, p.nickname, p.description, p.access) }, // //{ typeof (), (pm, p) => pm.AddParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_FilePath), (pm, p) => pm.AddPathParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Plane), (pm, p) => pm.AddPlaneParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Point), (pm, p) => pm.AddPointParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Rectangle), (pm, p) => pm.AddRectangleParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_ScriptVariable), (pm, p) => pm.AddScriptVariableParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Surface), (pm, p) => pm.AddSurfaceParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_String), (pm, p) => pm.AddTextParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Time), (pm, p) => pm.AddTimeParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Transform), (pm, p) => pm.AddTransformParameter(p.name, p.nickname, p.description, p.access) }, // { typeof (Param_Vector), (pm, p) => pm.AddVectorParameter(p.name, p.nickname, p.description, p.access) } //}; //// Wanted to do this programmatically with a dictionary of delegates, but couldn't really make it work... :( //AddParameterFunctionMap[input.dataType](pManager, input); protected void RegisterTypedParam(GH_InputParamManager pManager, GH_InputParamProps p, int index) { // I am so embarrased about having to do this... urgh X( if (p.defaultValue == null) { try { // Sorted by popularity order, estimated by my guts if (p.dataType == typeof(Param_Number)) { pManager.AddNumberParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Plane)) { pManager.AddPlaneParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Point)) { pManager.AddPointParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Vector)) { pManager.AddVectorParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_String)) { pManager.AddTextParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Boolean)) { pManager.AddBooleanParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_GenericObject)) { pManager.AddGenericParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Integer)) { pManager.AddIntegerParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_FilePath)) { pManager.AddPathParameter(p.name, p.nickname, p.description, p.access); } // I don't think Machina uses any of these so far... else if (p.dataType == typeof(Param_Arc)) { pManager.AddArcParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Box)) { pManager.AddBoxParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Brep)) { pManager.AddBrepParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Circle)) { pManager.AddCircleParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Colour)) { pManager.AddColourParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Complex)) { pManager.AddComplexNumberParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Culture)) { pManager.AddCultureParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Curve)) { pManager.AddCurveParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Field)) { pManager.AddFieldParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Geometry)) { pManager.AddGeometryParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Group)) { pManager.AddGroupParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Interval2D)) { pManager.AddInterval2DParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Interval)) { pManager.AddIntervalParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Line)) { pManager.AddLineParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Matrix)) { pManager.AddMatrixParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_MeshFace)) { pManager.AddMeshFaceParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Mesh)) { pManager.AddMeshParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Rectangle)) { pManager.AddRectangleParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_ScriptVariable)) { pManager.AddScriptVariableParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Surface)) { pManager.AddSurfaceParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Time)) { pManager.AddTimeParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Transform)) { pManager.AddTransformParameter(p.name, p.nickname, p.description, p.access); } else { this.AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "Cannot register parameter of type " + p.dataType); } } catch { this.AddRuntimeMessage(GH_RuntimeMessageLevel.Error, $"Something went wrong registering input parameter {p.dataType}"); } } else { try { // Sorted by popularity order, estimated by my guts if (p.dataType == typeof(Param_Number)) { pManager.AddNumberParameter(p.name, p.nickname, p.description, p.access, (double)p.defaultValue); } else if (p.dataType == typeof(Param_Plane)) { pManager.AddPlaneParameter(p.name, p.nickname, p.description, p.access, (Plane)p.defaultValue); } else if (p.dataType == typeof(Param_Point)) { pManager.AddPointParameter(p.name, p.nickname, p.description, p.access, (Point3d)p.defaultValue); } else if (p.dataType == typeof(Param_Vector)) { pManager.AddVectorParameter(p.name, p.nickname, p.description, p.access, (Vector3d)p.defaultValue); } else if (p.dataType == typeof(Param_String)) { pManager.AddTextParameter(p.name, p.nickname, p.description, p.access, (string)p.defaultValue); } else if (p.dataType == typeof(Param_Boolean)) { pManager.AddBooleanParameter(p.name, p.nickname, p.description, p.access, (bool)p.defaultValue); } else if (p.dataType == typeof(Param_GenericObject)) { pManager.AddGenericParameter(p.name, p.nickname, p.description, p.access); // generic objects don't accept default values... } else if (p.dataType == typeof(Param_Integer)) { pManager.AddIntegerParameter(p.name, p.nickname, p.description, p.access, (int)p.defaultValue); } else if (p.dataType == typeof(Param_FilePath)) { pManager.AddPathParameter(p.name, p.nickname, p.description, p.access); // no def value accepted } // I don't think Machina uses any of these so far... else if (p.dataType == typeof(Param_Arc)) { pManager.AddArcParameter(p.name, p.nickname, p.description, p.access, (Arc)p.defaultValue); } else if (p.dataType == typeof(Param_Box)) { pManager.AddBoxParameter(p.name, p.nickname, p.description, p.access, (Box)p.defaultValue); } else if (p.dataType == typeof(Param_Brep)) { pManager.AddBrepParameter(p.name, p.nickname, p.description, p.access); // no def value accepted } else if (p.dataType == typeof(Param_Circle)) { pManager.AddCircleParameter(p.name, p.nickname, p.description, p.access, (Circle)p.defaultValue); } else if (p.dataType == typeof(Param_Colour)) { pManager.AddColourParameter(p.name, p.nickname, p.description, p.access, (Color)p.defaultValue); } else if (p.dataType == typeof(Param_Complex)) { pManager.AddComplexNumberParameter(p.name, p.nickname, p.description, p.access, (GH_ComplexNumber)p.defaultValue); } else if (p.dataType == typeof(Param_Culture)) { pManager.AddCultureParameter(p.name, p.nickname, p.description, p.access, (CultureInfo)p.defaultValue); } else if (p.dataType == typeof(Param_Curve)) { pManager.AddCurveParameter(p.name, p.nickname, p.description, p.access); // no def value } else if (p.dataType == typeof(Param_Field)) { pManager.AddFieldParameter(p.name, p.nickname, p.description, p.access); // no def val } else if (p.dataType == typeof(Param_Geometry)) { pManager.AddGeometryParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Group)) { pManager.AddGroupParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Interval2D)) { pManager.AddInterval2DParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Interval)) { pManager.AddIntervalParameter(p.name, p.nickname, p.description, p.access, (Interval)p.defaultValue); } else if (p.dataType == typeof(Param_Line)) { pManager.AddLineParameter(p.name, p.nickname, p.description, p.access, (Line)p.defaultValue); } else if (p.dataType == typeof(Param_Matrix)) { pManager.AddMatrixParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_MeshFace)) { pManager.AddMeshFaceParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Mesh)) { pManager.AddMeshParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Rectangle)) { pManager.AddRectangleParameter(p.name, p.nickname, p.description, p.access, (Rectangle3d)p.defaultValue); } else if (p.dataType == typeof(Param_ScriptVariable)) { pManager.AddScriptVariableParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Surface)) { pManager.AddSurfaceParameter(p.name, p.nickname, p.description, p.access); } else if (p.dataType == typeof(Param_Time)) { pManager.AddTimeParameter(p.name, p.nickname, p.description, p.access, (DateTime)p.defaultValue); } else if (p.dataType == typeof(Param_Transform)) { pManager.AddTransformParameter(p.name, p.nickname, p.description, p.access); } else { this.AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "Cannot register parameter of type " + p.dataType); } } catch { this.AddRuntimeMessage(GH_RuntimeMessageLevel.Error, $"Something went wrong registering input parameter {p.dataType} with value {p.defaultValue}"); } } // If this last input is optional, flag it if (p.optional) { pManager[index].Optional = true; } }