Ejemplo n.º 1
0
        /// <summary>
        /// Transfinite curve constraint.
        /// </summary>
        /// <param name="tag"> ID of the underlying curve. </param>
        /// <param name="type"> Curve distribution type. </param>
        /// <param name="nodesCount"> Number of nodes to be uniformly placed nodes on the curve. </param>
        /// <param name="coef"> Geometrical progression with power Coef for node distribution when using Progression type. </param>
        /// <returns></returns>
        public static ITransfinite Curve(int tag, TransfiniteCurveType type, int nodesCount, double coef)
        {
            ITransfinite data = new ITransfinite();

            data.Dim         = 1;
            data.Tag         = tag;
            data.MethodType  = type.ToString();
            data.NodesNumber = nodesCount;
            data.Coef        = coef;

            return(data);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param>
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            int tag = -1;

            DA.GetData(0, ref tag);
            DA.GetData(1, ref count);
            DA.GetData(2, ref coef);

            ITransfinite data = new ITransfinite();

            data.Dim         = 1;
            data.Tag         = tag;
            data.MethodType  = type.ToString();
            data.NodesNumber = count;
            data.Coef        = coef;

            DA.SetData(0, data);
        }