/// <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; }
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); }
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); }
/// <summary> /// Create a revolved geometry /// </summary> /// <param name="coordinateFrame">A right-handed orthonormal frame of vectors</param> /// <param name="profileLoops">The profile loops to be revolved</param> /// <param name="startAngle">The start angle for the revolution</param> /// <param name="endAngle">The end angle for the revolution</param> /// <returns>The created solid</returns> private Solid CreateRevolved(Autodesk.Revit.DB.Frame coordinateFrame, List <CurveLoop> profileLoops, double startAngle, double endAngle) { return(GeometryCreationUtilities.CreateRevolvedGeometry(coordinateFrame, profileLoops, startAngle, endAngle)); }