Пример #1
0
        /// <summary>
        /// Internal constructor making a solid by revolve
        /// </summary>
        /// <param name="loop"></param>
        /// <param name="trans"></param>
        /// <param name="start">The start angle</param>
        /// <param name="end">The end angle</param>
        internal Solid(CurveLoop loop, Transform trans, double start, double end)
        {
            var loopList = new List<Autodesk.Revit.DB.CurveLoop> { loop };
            var thisFrame = new Autodesk.Revit.DB.Frame();
            thisFrame.Transform(trans);

            var result = GeometryCreationUtilities.CreateRevolvedGeometry(thisFrame, loopList, start, end);
            this.InternalSolid = result;
        }
Пример #2
0
        public override FScheme.Value Evaluate(FSharpList<FScheme.Value> args)
        {
            var cLoop = (Autodesk.Revit.DB.CurveLoop)((FScheme.Value.Container)args[0]).Item;
            var trf = (Transform)((FScheme.Value.Container)args[1]).Item;
            var start = ((FScheme.Value.Number)args[2]).Item;
            var end = ((FScheme.Value.Number)args[3]).Item;

            var loopList = new List<Autodesk.Revit.DB.CurveLoop> { cLoop };
            var thisFrame = new Autodesk.Revit.DB.Frame();
            thisFrame.Transform(trf);

            var result = GeometryCreationUtilities.CreateRevolvedGeometry(thisFrame, loopList, start, end);

            return FScheme.Value.NewContainer(result);
        }
Пример #3
0
        public override Value Evaluate(FSharpList<Value> args)
        {
            CurveLoop cLoop = (CurveLoop)((Value.Container)args[0]).Item;
            Transform trf = (Transform)((Value.Container)args[1]).Item;
            double sAngle =  ((Value.Number)args[2]).Item;
            double eAngle =  ((Value.Number)args[3]).Item;

            List<CurveLoop> loopList = new List<CurveLoop>();
            loopList.Add(cLoop);

            Autodesk.Revit.DB.Frame thisFrame = new Autodesk.Revit.DB.Frame();
            thisFrame.Transform(trf);

            Solid result = GeometryCreationUtilities.CreateRevolvedGeometry(thisFrame, loopList, sAngle, eAngle);

            solids.Add(result);

            return Value.NewContainer(result);
        }