Esempio n. 1
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);
        }
Esempio n. 2
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());
        }