Beispiel #1
0
 protected override void RegisterInputParams(GH_InputParamManager pManager)
 {
     pManager.AddTextParameter("Name", "T", "Tool name", GH_ParamAccess.item, "ToolExMachina");
     pManager.AddPlaneParameter("BasePlane", "BP", "Base Plane where the Tool will be attached to the Robot", GH_ParamAccess.item, Plane.WorldXY);
     pManager.AddPlaneParameter("TCPPlane", "TP", "Plane of the Tool Tip Center (TCP)", GH_ParamAccess.item, Plane.WorldXY);
     pManager.AddNumberParameter("Weight", "W", "Tool weight in Kg", GH_ParamAccess.item, 1);
 }
Beispiel #2
0
 protected override void RegisterInputParams(GH_InputParamManager pManager)
 {
     pManager.AddPlaneParameter("Bricks", "B", "Center planes of bricks", GH_ParamAccess.tree);
     pManager.AddTextParameter("Types", "T", "Types of bricks", GH_ParamAccess.tree);
     pManager.AddPointParameter("Corners", "C", "Corners of bricks", GH_ParamAccess.tree);
     pManager.AddPlaneParameter("SuckerCenter", "SC", "Center of sucker", GH_ParamAccess.item);
     pManager.AddPlaneParameter("SensorCenter", "SE", "Center of sensor", GH_ParamAccess.item);
     pManager.AddPlaneParameter("HomePlane", "HP", "Home planes of bricks", GH_ParamAccess.item);
     pManager.AddNumberParameter("Retreat", "R", "Retreat of sensor", GH_ParamAccess.item, 160);
 }
Beispiel #3
0
 protected override void RegisterInputParams(GH_InputParamManager pManager)
 {
     pManager.AddTextParameter("Name", "N", "Tool name", GH_ParamAccess.item, "DefaultGHTool");
     pManager.AddPlaneParameter("TCP", "P", "TCP plane", GH_ParamAccess.item, Plane.WorldXY);
     pManager.AddPlaneParameter("Calibration", "4", "Optional 4 point TCP calibration. Orient the tool in 4 different ways around the same point in space and input the 4 planes that correspond to the flange", GH_ParamAccess.list);
     pManager.AddNumberParameter("Weight", "W", "Tool weight in kg", GH_ParamAccess.item, 0.0);
     pManager.AddPointParameter("Centroid", "C", "Optional tool center of mass", GH_ParamAccess.item);
     pManager.AddMeshParameter("Mesh", "M", "Tool geometry", GH_ParamAccess.item);
     pManager[2].Optional = true;
     pManager[4].Optional = true;
     pManager[5].Optional = true;
 }
Beispiel #4
0
 protected override void RegisterInputParams(GH_InputParamManager pManager)
 {
     pManager.AddTextParameter("Name", "N", "Tool name", GH_ParamAccess.item, "DefaultGHTool");
     pManager.AddPlaneParameter("TCP", "P", "TCP plane", GH_ParamAccess.item, Plane.WorldXY);
     pManager.AddPlaneParameter("Calibration", "4", "Optional 4 point TCP calibration. Orient the tool in 4 different ways around the same point in space and input the 4 planes that correspond to the flange", GH_ParamAccess.list);
     pManager.AddNumberParameter("Weight", "W", "Tool weight in kg", GH_ParamAccess.item, 0.0);
     pManager.AddPointParameter("Centroid", "C", "Optional tool center of mass", GH_ParamAccess.item);
     pManager.AddMeshParameter("Mesh", "M", "Tool geometry", GH_ParamAccess.item);
     pManager[2].Optional = true;
     pManager[4].Optional = true;
     pManager[5].Optional = true;
 }
Beispiel #5
0
 protected override void RegisterInputParams(GH_InputParamManager pManager)
 {
     pManager.AddPlaneParameter("Bricks", "B", "Center planes of bricks", GH_ParamAccess.tree);
     pManager.AddTextParameter("Types", "T", "Types of bricks", GH_ParamAccess.tree);
     pManager.AddPointParameter("Corners", "C", "Corners of bricks", GH_ParamAccess.tree);
     pManager.AddPlaneParameter("SuckerCenter", "SC", "Center of sucker", GH_ParamAccess.item);
     pManager.AddPlaneParameter("NozzleCenter", "NC", "Center of nozzle", GH_ParamAccess.item);
     pManager.AddPlaneParameter("HomePlane", "HP", "Home planes of bricks", GH_ParamAccess.item);
     pManager.AddNumberParameter("HorizontalBorder", "HB", "Horizontal border of mortar", GH_ParamAccess.item, 25);
     pManager.AddNumberParameter("VerticalBorder", "VB", "Vertical border of mortar", GH_ParamAccess.item, 25);
     pManager.AddNumberParameter("Gap", "G", "Gap of border", GH_ParamAccess.item, 25);
     pManager.AddNumberParameter("Retreat", "R", "Retreat of nozzle", GH_ParamAccess.item, 10);
 }
Beispiel #6
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        /// <param name="pManager">Use the pManager to register new parameters. pManager is never null.</param>
        protected override void RegisterInputParams(GH_InputParamManager pManager)
        {
            // set the message for this component.
            pManager.AddCurveParameter("Polylines", "P", "A list of polylines to offset", GH_ParamAccess.list);
            pManager.AddNumberParameter("Distance", "D", "Offset Distance", GH_ParamAccess.item);
            pManager.AddPlaneParameter("Plane", "Pln", "Plane to project the polylines to", GH_ParamAccess.item, default);


            pManager.AddNumberParameter("Tolerance", "T", "Tolerance: all floating point data beyond this precision will be discarded.", GH_ParamAccess.item, DocHelper.GetModelTolerance());
            //public enum ClosedFilletType { Round, Square, Miter }
            var cfParamIndex = pManager.AddIntegerParameter("ClosedFillet", "CF", "Closed fillet type (0 = Round, 1 = Square, 2 = Miter)", GH_ParamAccess.list, new List <int> {
                1
            });
            var cfParam = pManager[cfParamIndex] as Param_Integer;

            ParamHelper.AddEnumOptionsToParam <Polyline3D.ClosedFilletType>(cfParam);

            //public enum OpenFilletType { Round, Square, Butt }
            var ofParamIndex = pManager.AddIntegerParameter("OpenFillet", "OF", "Open fillet type (0 = Round, 1 = Square, 2 = Butt)", GH_ParamAccess.list, new List <int> {
                1
            });
            var ofParam = pManager[ofParamIndex] as Param_Integer;

            ParamHelper.AddEnumOptionsToParam <Polyline3D.OpenFilletType>(ofParam);

            pManager.AddNumberParameter("Miter", "M", "If closed fillet type of Miter is selected: the maximum extension of a curve is Distance * Miter", GH_ParamAccess.item, 2);
        }
Beispiel #7
0
        protected override void RegisterInputParams(GH_InputParamManager pManager)
        {
            pManager.AddMeshParameter("Meshes", "Meshes", "Meshes to include in the CFD domain",
                                      GH_ParamAccess.list);
            pManager.AddIntegerParameter("Domain Type", "Domain Type",
                                         "Domain type. Choose between: 0: 3D domain, 1: 2D domain.", GH_ParamAccess.item, 0);
            pManager.AddNumberParameter("Cell Size", "Cell Size", "Base Cell Size throughout the domain.", GH_ParamAccess.item);
            pManager.AddBooleanParameter("Align Bottom", "Align Bottom", "Sets whether the bottom of the domain should align with the bottom of the geometry or the domain should have the same center as the geometry.", GH_ParamAccess.item, true);
            pManager.AddBooleanParameter("Center XY", "Center XY", "centerXY", GH_ParamAccess.item, true);
            pManager.AddBooleanParameter("Square", "Square", "Whether the domain should be square or not.",
                                         GH_ParamAccess.item, true);
            pManager.AddNumberParameter("XY Scale", "XY Scale", "Scale in the X and Y directions", GH_ParamAccess.item,
                                        3);
            pManager.AddNumberParameter("XY Offset", "XY Offset", "Offset in the X and Y directions",
                                        GH_ParamAccess.item, 1.0);
            pManager.AddNumberParameter("Z Scale", "Z Scale", "Scale in the Z direction. Recommended value is 5m", GH_ParamAccess.item, 5.0);
            pManager.AddPlaneParameter("Plane", "Plane",
                                       "Plane for creating a 2D domain. Is not used if you create a 3D Domain", GH_ParamAccess.item);

            pManager[3].Optional = true;
            pManager[4].Optional = true;
            pManager[5].Optional = true;
            pManager[6].Optional = true;
            pManager[7].Optional = true;
            pManager[8].Optional = true;
            pManager[9].Optional = true;

            AddNamedValues(pManager[1] as Param_Integer, DomainTypes);
        }
Beispiel #8
0
 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");
 }
 /// <summary>
 /// Registers all the input parameters for this component.
 /// </summary>
 /// <param name="pManager">Use the pManager to register new parameters. pManager is never null.</param>
 protected override void RegisterInputParams(GH_InputParamManager pManager)
 {
     pManager.AddCurveParameter("Polyline", "Pl", "A list of polylines to offset", GH_ParamAccess.item);
     pManager.AddPointParameter("Point", "P", "Offset Distance", GH_ParamAccess.item);
     pManager.AddPlaneParameter("Plane", "Pln", "Plane to project the polylines to", GH_ParamAccess.item, default);
     pManager.AddNumberParameter("Tolerance", "T", "Tolerance: all floating point data beyond this precision will be discarded.", GH_ParamAccess.item, RhinoDoc.ActiveDoc.ModelAbsoluteTolerance);
 }
Beispiel #10
0
 /// <summary>
 /// Registers all the input parameters for this component.
 /// </summary>
 /// <param name="pManager">Use the pManager to register new parameters. pManager is never null.</param>
 protected override void RegisterInputParams(GH_InputParamManager pManager)
 {
     pManager.AddCurveParameter("A", "A", "The first polyline", GH_ParamAccess.item);
     pManager.AddCurveParameter("B", "B", "The second polyline", GH_ParamAccess.item);
     pManager.AddPlaneParameter("Plane", "Pln", "Plane to project the polylines to", GH_ParamAccess.item, default);
     pManager.AddNumberParameter("Tolerance", "T", "Tolerance: all floating point data beyond this precision will be discarded.", GH_ParamAccess.item, DocHelper.GetModelTolerance());
 }
Beispiel #11
0
        protected override void RegisterInputParams(GH_InputParamManager pManager)
        {
            pManager.AddPlaneParameter("Workplane", "WP", "Workplane for toolpath.", GH_ParamAccess.item, Plane.WorldXY);
            int res = pManager.AddGenericParameter("MachineTool", "MT", "Machine tool to use for this toolpath.", GH_ParamAccess.item);

            pManager[res].Optional = true;
        }
Beispiel #12
0
 protected override void RegisterInputParams(GH_InputParamManager manager)
 {
     manager.AddPlaneParameter("Position", "P", string.Empty, GH_ParamAccess.item);
     manager.AddParameter(new Parameters.ElementType(), "Type", "T", string.Empty, GH_ParamAccess.item);
     manager[manager.AddParameter(new Parameters.Element(), "Level", "L", string.Empty, GH_ParamAccess.item)].Optional = true;
     manager[manager.AddParameter(new Parameters.Element(), "Host", "H", string.Empty, GH_ParamAccess.item)].Optional  = true;
 }
Beispiel #13
0
 protected override void RegisterInputParams(GH_InputParamManager pManager)
 {
     pManager.AddPlaneParameter("Pl", "P", "Input Plane data.", GH_ParamAccess.tree);
     pManager[0].Optional = true;  // avoid "failed to collect data"
     pManager.AddNumberParameter("Epsilon", "E", "Precision threshold for coordinate comparison", GH_ParamAccess.item, 0.0001);
     pManager[1].Optional = true;
 }
        protected override void RegisterInputParams(GH_InputParamManager pManager)
        {
            List<bool> allFixed = new List<bool> { true, true, true, true, true, true };

            pManager.AddPointParameter("Position", "P", "Node position", GH_ParamAccess.item);
            pManager.AddBooleanParameter("Releases", "R", "Releases for the restraint. Should be a list of 6 bools. True = Fixed, False = Free. Defaults as all fixed.", GH_ParamAccess.list, allFixed);
            pManager.AddPlaneParameter("Orientation", "Pl", "Add an optional plane for node restraints", GH_ParamAccess.item, Plane.WorldXY);
        }
Beispiel #15
0
        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;
        }
Beispiel #16
0
 protected override void RegisterInputParams(GH_InputParamManager pManager)
 {
     pManager.AddPlaneParameter("Plane", "P", "Frame plane", GH_ParamAccess.item, Plane.WorldXY);
     pManager.AddIntegerParameter("Coupled mechanical group", "G", "Index of the mechanical group where the coupled mechanism or robot belongs, or -1 for no coupling.", GH_ParamAccess.item, -1);
     pManager.AddIntegerParameter("Coupled mechanism", "M", "Index of kinematically coupled mechanism or -1 for coupling of a robot in a multi robot cell. If input G is -1 this has no effect.", GH_ParamAccess.item, -1);
     pManager.AddTextParameter("Name", "N", "Optional name for the frame.", GH_ParamAccess.item);
     pManager[3].Optional = true;
 }
 protected override void RegisterInputParams(GH_InputParamManager pManager)
 {
     pManager.AddPlaneParameter("Plane", "P", "Base plane for spiral", GH_ParamAccess.item, Plane.WorldXY);
     pManager.AddNumberParameter("Inner Radius", "R0", "Inner radius for spiral", GH_ParamAccess.item, 1.0);
     pManager.AddNumberParameter("Outer Radius", "R1", "Outer radius for spiral", GH_ParamAccess.item, 10.0);
     pManager.AddIntegerParameter("Turns", "T", "Number of turns between radii", GH_ParamAccess.item, 10);
     pManager.AddIntegerParameter("AsyncLoops", "N", "Number of spins.", GH_ParamAccess.item, 50); // As per Sample_UslessCyclesComponent
 }
Beispiel #18
0
 protected override void RegisterInputParams(GH_InputParamManager pManager)
 {
     pManager.AddPointParameter("Origin", "O", "Distribution origin.", GH_ParamAccess.item, Point3d.Origin);
     pManager.AddGeometryParameter("Geometry", "G", "Geometry to distribute.", GH_ParamAccess.list);
     pManager.AddPlaneParameter("Geometry planes", "P", "Planes for each piece of geometry.", GH_ParamAccess.list);
     pManager.AddNumberParameter("XSpacing", "X", "Spacing in the X-direction.", GH_ParamAccess.item, 2000.0);
     pManager.AddNumberParameter("YSpacing", "Y", "Spacing in the Y-direction.", GH_ParamAccess.item, 1000.0);
     pManager.AddIntegerParameter("NumColumns", "N", "Number of columns in the distribution.", GH_ParamAccess.item, 4);
 }
Beispiel #19
0
        protected override void RegisterInputParams(GH_InputParamManager pManager)
        {
            List <bool> allFixed = new List <bool> {
                true, true, true, true, true, true
            };

            pManager.AddPointParameter("Position", "P", "Node position", GH_ParamAccess.item);
            pManager.AddBooleanParameter("Releases", "R", "Releases for the restraint. Should be a list of 6 bools. True = Fixed, False = Free. Defaults as all fixed.", GH_ParamAccess.list, allFixed);
            pManager.AddPlaneParameter("Orientation", "Pl", "Add an optional plane for node restraints", GH_ParamAccess.item, Plane.WorldXY);
        }
 void Inputs(GH_InputParamManager pManager)
 {
     pManager.AddPlaneParameter("Planes", "P", "Lists of target locations as planes.", GH_ParamAccess.tree);
     pManager.AddNumberParameter("Lengths", "L", "Raw values for external axis (extrusion amount per target)", GH_ParamAccess.tree);
     pManager.AddParameter(new ExtrusionAttributesParameter(), "Extrusion attributes", "A", "Extrusion attributes.", GH_ParamAccess.item);
     pManager.AddNumberParameter("Extrusion Factor", "F", "Extrusion factor.", GH_ParamAccess.item, 0.21);
     pManager.AddNumberParameter("Suck Back", "Sb", "Distance to extrude in reverse immediately after stopping the extrusion. To avoid dripping material.", GH_ParamAccess.item, 0);
     pManager.AddNumberParameter("Start Distance", "Sd", "Distance to extrude before the robot starts moving. To compensate for material not flowing immediately after starting the extrusion.", GH_ParamAccess.item, 0);
     pManager.AddNumberParameter("Test Loop", "L", "Distance for test loop.", GH_ParamAccess.item, 200);
 }
Beispiel #21
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        /// <param name="pManager">Use the pManager to register new parameters. pManager is never null.</param>
        protected override void RegisterInputParams(GH_InputParamManager pManager)
        {
            EvenOdd = EvenOdd;
            pManager.AddCurveParameter("A", "A", "The first polyline", GH_ParamAccess.list);
            pManager.AddCurveParameter("B", "B", "The first polyline", GH_ParamAccess.list);
            pManager[1].Optional = true;
            // ctIntersection, ctUnion, ctDifference, ctXor };
            pManager.AddIntegerParameter("BooleanType", "BT", "Type: (0: intersection, 1: union, 2: difference, 3: xor)", GH_ParamAccess.item, 0);

            pManager.AddPlaneParameter("Plane", "Pln", "Plane to project the polylines to", GH_ParamAccess.item, default);
            pManager.AddNumberParameter("Tolerance", "T", "Tolerance: all floating point data beyond this precision will be discarded.", GH_ParamAccess.item, RhinoDoc.ActiveDoc.ModelAbsoluteTolerance);
        }
Beispiel #22
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        /// <param name="pManager">Use the pManager to register new parameters. pManager is never null.</param>
        protected override void RegisterInputParams(GH_InputParamManager pManager)
        {
            EvenOdd = EvenOdd;
            pManager.AddCurveParameter("A", "A", "The first polyline", GH_ParamAccess.list);
            pManager.AddCurveParameter("B", "B", "The first polyline", GH_ParamAccess.list);
            pManager[1].Optional = true;
            // ctIntersection, ctUnion, ctDifference, ctXor };
            var btParamIndex = pManager.AddIntegerParameter("BooleanType", "BT", "Type: (0: intersection, 1: union, 2: difference, 3: xor)", GH_ParamAccess.item, 0);
            var btParam      = pManager[btParamIndex] as Param_Integer;

            ParamHelper.AddEnumOptionsToParam <BooleanClipType>(btParam);

            pManager.AddPlaneParameter("Plane", "Pln", "Plane to project the polylines to", GH_ParamAccess.item, default);
            pManager.AddNumberParameter("Tolerance", "T", "Tolerance: all floating point data beyond this precision will be discarded.", GH_ParamAccess.item, DocHelper.GetModelTolerance());
        }
Beispiel #23
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        /// <param name="pManager">Use the pManager to register new parameters. pManager is never null.</param>
        protected override void RegisterInputParams(GH_InputParamManager pManager)
        {
            // set the message for this component.
            pManager.AddCurveParameter("Polylines", "P", "A list of polylines to offset", GH_ParamAccess.list);
            pManager.AddNumberParameter("Distance", "D", "Offset Distance", GH_ParamAccess.item);
            pManager.AddPlaneParameter("Plane", "Pln", "Plane to project the polylines to", GH_ParamAccess.item, default);


            pManager.AddNumberParameter("Tolerance", "T", "Tolerance: all floating point data beyond this precision will be discarded.", GH_ParamAccess.item, RhinoDoc.ActiveDoc.ModelAbsoluteTolerance);
            //public enum ClosedFilletType { Round, Square, Miter }
            pManager.AddIntegerParameter("ClosedFillet", "CF", "Closed fillet type (0 = Round, 1 = Square, 2 = Miter)", GH_ParamAccess.list, new List <int> {
                1
            });
            ////public enum OpenFilletType { Round, Square, Butt }
            pManager.AddIntegerParameter("OpenFillet", "OF", "Open fillet type (0 = Round, 1 = Square, 2 = Butt)", GH_ParamAccess.list, new List <int> {
                1
            });
            pManager.AddNumberParameter("Miter", "M", "If closed fillet type of Miter is selected: the maximum extension of a curve is Distance * Miter", GH_ParamAccess.item, 2);
        }
Beispiel #24
0
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_InputParamManager pManager)
        {
            pManager.AddPointParameter("Start point A", "PtA", "Start point A", GH_ParamAccess.item);
            pManager.AddPointParameter("Start point B", "PtB", "Start point B", GH_ParamAccess.item);
            pManager.AddPlaneParameter("Working plane", "P", "Working plane of elastica", GH_ParamAccess.item);
            pManager.AddNumberParameter("Length", "L", "Curve length", GH_ParamAccess.item);
            pManager.AddNumberParameter("Width", "W", "Distance between point A and B", GH_ParamAccess.item);
            pManager.AddNumberParameter("Height", "H", "Height of curve", GH_ParamAccess.item);
            pManager.AddNumberParameter("Angle", "A", "Angle", GH_ParamAccess.item);
            pManager.AddNumberParameter("E modulus", "E", "Elastic modulus of curve", GH_ParamAccess.item);
            pManager.AddNumberParameter("Moment of inertia", "I", "Moment of inertia of curve", GH_ParamAccess.item);

            pManager[2].Optional = true;
            pManager[3].Optional = true;
            pManager[4].Optional = true;
            pManager[5].Optional = true;
            pManager[6].Optional = true;
            pManager[7].Optional = true;
            pManager[8].Optional = true;
        }
Beispiel #25
0
 protected override void RegisterInputParams(GH_InputParamManager pManager)
 {
     pManager.AddPlaneParameter("Plane", "P", "Plane to convert to euler, quaternion or axis angle values.", GH_ParamAccess.item);
     pManager.AddParameter(new RobotSystemParameter(), "Robot system", "R", "The robot system will select the orientation type (ABB = quaternions, KUKA = euler angles in degrees, UR = axis angles in radians). If this input is left unconnected, the 3D rotation will be expressed in quaternions.", GH_ParamAccess.item);
     pManager[1].Optional = true;
 }
Beispiel #26
0
 protected override void RegisterInputParams(GH_InputParamManager pManager)
 {
     pManager.AddPlaneParameter("Plane", "P", "Plane to convert to euler, quaternion or axis angle values.", GH_ParamAccess.item);
     pManager.AddParameter(new RobotSystemParameter(), "Robot system", "R", "The robot system will select the orientation type (ABB = quaternions, KUKA = euler angles in degrees, UR = axis angles in radians). If this input is left unconnected, the 3D rotation will be expressed in quaternions.", GH_ParamAccess.item);
     pManager[1].Optional = true;
 }
Beispiel #27
0
 protected override void RegisterInputParams(GH_InputParamManager pManager)
 {
     pManager.AddPlaneParameter("Plane", "P", "Floor plane", GH_ParamAccess.item, Rhino.Geometry.Plane.WorldXY);
     pManager.AddNumberParameter("Friction", "F", "Friction", GH_ParamAccess.item, 0.5);
     pManager.AddPointParameter("Particles", "P", "Particles", GH_ParamAccess.list);
 }
Beispiel #28
0
 protected override void RegisterInputParams(GH_InputParamManager pManager)
 {
     pManager.AddTextParameter("Name", "N", "Name of the Robot system", GH_ParamAccess.item);
     pManager.AddPlaneParameter("Base", "P", "Base plane", GH_ParamAccess.item, Plane.WorldXY);
     parameter = pManager[0];
 }
        // :(
        //// 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;
            }
        }
Beispiel #30
0
 protected override void RegisterInputParams(GH_InputParamManager pManager)
 {
     pManager.AddPlaneParameter("Plane", "P", "Frame plane", GH_ParamAccess.item, Plane.WorldXY);
     pManager.AddIntegerParameter("Coupled mechanical group", "G", "Index of the mechanical group where the coupled mechanism or robot belongs, or -1 for no coupling.", GH_ParamAccess.item, -1);
     pManager.AddIntegerParameter("Coupled mechanism", "M", "Index of kinematically coupled mechanism or -1 for coupling of a robot in a multi robot cell. If input G is -1 this has no effect.", GH_ParamAccess.item, -1);
 }
Beispiel #31
0
 protected override void RegisterInputParams(GH_InputParamManager pManager)
 {
     pManager.AddTextParameter("Name", "N", "Name of the Robot system", GH_ParamAccess.item);
     pManager.AddPlaneParameter("Base", "P", "Base plane", GH_ParamAccess.item, Plane.WorldXY);
     parameter = pManager[0];
 }
Beispiel #32
0
 protected override void RegisterInputParams(GH_InputParamManager manager)
 {
     manager.AddPlaneParameter("Plane", "P", string.Empty, GH_ParamAccess.item, Rhino.Geometry.Plane.WorldXY);
 }
Beispiel #33
0
 protected override void RegisterInputParams(GH_InputParamManager pManager)
 {
     pManager.AddPlaneParameter("Plane", "P", "Target Plane to transform to", GH_ParamAccess.item, Plane.WorldXY);
 }
Beispiel #34
0
 protected override void RegisterInputParams(GH_InputParamManager pManager)
 {
     pManager.AddPlaneParameter("Plane", "P", "Target spatial orientation", GH_ParamAccess.item, Plane.WorldXY);
 }
        /// <summary>
        /// Registers all the input parameters for this component.
        /// </summary>
        protected override void RegisterInputParams(GH_InputParamManager pManager)
        {
            IAction              action = (IAction)Activator.CreateInstance(ActionType, true);
            NicknameConverter    nC     = new NicknameConverter();
            IList <PropertyInfo> inputs = ActionBase.ExtractInputParameters(ActionType);

            foreach (PropertyInfo pInfo in inputs)
            {
                Type pType = pInfo.PropertyType;
                ActionInputAttribute inputAtt = ActionInputAttribute.ExtractFrom(pInfo);
                if (inputAtt != null && inputAtt.Parametric)
                {
                    string name        = pInfo.Name;
                    string nickname    = string.IsNullOrEmpty(inputAtt.ShortName) ? nC.Convert(pInfo.Name) : inputAtt.ShortName;
                    string description = inputAtt.CapitalisedDescription;
                    if (pType == typeof(double))
                    {
                        pManager.AddNumberParameter(name, nickname, description, GH_ParamAccess.item, (double)pInfo.GetValue(action, null));
                    }
                    else if (pType == typeof(int))
                    {
                        pManager.AddIntegerParameter(name, nickname, description, GH_ParamAccess.item, (int)pInfo.GetValue(action, null));
                    }
                    else if (pType == typeof(string))
                    {
                        pManager.AddTextParameter(name, nickname, description, GH_ParamAccess.item, (string)pInfo.GetValue(action, null));
                    }
                    else if (pType == typeof(bool))
                    {
                        //Special case when the input is a 'Write' toggle - default off!
                        pManager.AddBooleanParameter(name, nickname, description, GH_ParamAccess.item, name == "Write" ? false : (bool)pInfo.GetValue(action, null));
                    }
                    else if (pType == typeof(Vector))
                    {
                        pManager.AddPointParameter(name, nickname, description, GH_ParamAccess.item);
                    }
                    else if (typeof(IList <Vector>).IsAssignableFrom(pType)) //Vector list
                    {
                        pManager.AddPointParameter(name, nickname, description, GH_ParamAccess.list);
                    }
                    else if (pType.IsAssignableFrom(typeof(Plane)))
                    {
                        pManager.AddPlaneParameter(name, nickname, description, GH_ParamAccess.item, ToRC.Convert((Plane)pInfo.GetValue(action, null)));
                    }
                    else if (pType == typeof(Line))
                    {
                        pManager.AddLineParameter(name, nickname, description, GH_ParamAccess.item);
                    }
                    else if (pType == typeof(Angle))
                    {
                        pManager.AddAngleParameter(name, nickname, description, GH_ParamAccess.item, (Angle)pInfo.GetValue(action, null));
                    }
                    else if (typeof(Curve).IsAssignableFrom(pType))
                    {
                        pManager.AddCurveParameter(name, nickname, description, GH_ParamAccess.item);
                    }
                    else if (typeof(CurveCollection).IsAssignableFrom(pType))
                    {
                        pManager.AddCurveParameter(name, nickname, description, GH_ParamAccess.list);
                    }
                    else if (typeof(LinearElement).IsAssignableFrom(pType))
                    {
                        IGH_Param param = new LinearElementParam();
                        pManager.AddParameter(param, name, nickname, description, GH_ParamAccess.item);
                    }
                    else if (typeof(PanelElement).IsAssignableFrom(pType))
                    {
                        IGH_Param param = new PanelElementParam();
                        pManager.AddParameter(param, name, nickname, description, GH_ParamAccess.item);
                    }
                    else if (typeof(Element).IsAssignableFrom(pType))
                    {
                        IGH_Param param = new ElementParam();
                        pManager.AddParameter(param, name, nickname, description, GH_ParamAccess.item);
                    }
                    else if (typeof(LinearElementCollection).IsAssignableFrom(pType))
                    {
                        IGH_Param param = new LinearElementParam();
                        pManager.AddParameter(param, name, nickname, description, ParamAccess(inputAtt));
                    }
                    else if (typeof(PanelElementCollection).IsAssignableFrom(pType))
                    {
                        IGH_Param param = new PanelElementParam();
                        pManager.AddParameter(param, name, nickname, description, ParamAccess(inputAtt));
                    }
                    else if (typeof(ElementCollection).IsAssignableFrom(pType))
                    {
                        IGH_Param param = new ElementParam();
                        pManager.AddParameter(param, name, nickname, description, ParamAccess(inputAtt));
                    }
                    else if (pType == typeof(Node))
                    {
                        IGH_Param param = new NodeParam();
                        pManager.AddParameter(param, name, nickname, description, GH_ParamAccess.item);
                    }
                    else if (pType == typeof(NodeCollection))
                    {
                        IGH_Param param = new NodeParam();
                        pManager.AddParameter(param, name, nickname, description, ParamAccess(inputAtt));
                    }
                    else if (typeof(Nucleus.Model.Material).IsAssignableFrom(pType))
                    {
                        IGH_Param param = new MaterialParam();
                        pManager.AddParameter(param, name, nickname, description, GH_ParamAccess.item);
                    }
                    else if (typeof(MaterialCollection).IsAssignableFrom(pType))
                    {
                        IGH_Param param = new MaterialParam();
                        pManager.AddParameter(param, name, nickname, description, ParamAccess(inputAtt));
                    }
                    else if (typeof(SectionFamily).IsAssignableFrom(pType))
                    {
                        IGH_Param param = new SectionFamilyParam();
                        pManager.AddParameter(param, name, nickname, description, GH_ParamAccess.item);
                    }
                    else if (pType == typeof(Bool6D))
                    {
                        IGH_Param param = new Bool6DParam();
                        pManager.AddParameter(param, name, nickname, description, GH_ParamAccess.item);
                    }
                    else if (pType == typeof(FilePath))
                    {
                        pManager.AddTextParameter(name, nickname, description, GH_ParamAccess.item);
                    }
                    else if (pType == typeof(VertexGeometry))
                    {
                        pManager.AddGeometryParameter(name, nickname, description, GH_ParamAccess.item);
                    }
                    else if (pType == typeof(VertexGeometryCollection))
                    {
                        pManager.AddGeometryParameter(name, nickname, description, ParamAccess(inputAtt));
                    }
                    else if (pType == typeof(ActionTriggerInput))
                    {
                        pManager.AddGenericParameter(name, nickname, description, GH_ParamAccess.tree);
                    }
                    else if (pType == typeof(Direction))
                    {
                        pManager.AddTextParameter(name, nickname, description, GH_ParamAccess.item, pInfo.GetValue(action, null)?.ToString());
                    }
                    else if (pType == typeof(CoordinateSystemReference))
                    {
                        pManager.AddTextParameter(name, nickname, description, GH_ParamAccess.item, pInfo.GetValue(action, null)?.ToString());
                    }
                    else if (pType.IsEnum)
                    {
                        pManager.AddTextParameter(name, nickname, description, GH_ParamAccess.item, pInfo.GetValue(action, null)?.ToString());
                    }
                    else
                    {
                        pManager.AddGenericParameter(pInfo.Name, nickname, description, GH_ParamAccess.item);
                    }

                    if (inputAtt.Required == false)
                    {
                        pManager[pManager.ParamCount - 1].Optional = true;
                    }

                    //TODO
                }
            }
        }