Пример #1
0
        public override FScheme.Value Evaluate(FSharpList <FScheme.Value> args)
        {
            var min = (Autodesk.LibG.Vector)((FScheme.Value.Container)args[0]).Item;
            var max = (Autodesk.LibG.Vector)((FScheme.Value.Container)args[1]).Item;

            return(FScheme.Value.NewContainer(Domain2D.ByMinimumAndMaximum(min, max)));
        }
Пример #2
0
        public override Value Evaluate(FSharpList <Value> args)
        {
            BoundingBoxUV bbox = null;

            object arg0 = ((Value.Container)args[0]).Item;

            Autodesk.Revit.DB.Face f;

            var faceRef = arg0 as Reference;

            if (faceRef != null)
            {
                f = dynRevitSettings.Doc.Document.GetElement(faceRef.ElementId).GetGeometryObjectFromReference(faceRef) as Autodesk.Revit.DB.Face;
            }
            else
            {
                f = arg0 as Autodesk.Revit.DB.Face;
            }

            if (f != null)
            {
                bbox = f.GetBoundingBox();
            }

            var min = Vector.by_coordinates(bbox.Min.U, bbox.Min.V);
            var max = Vector.by_coordinates(bbox.Max.U, bbox.Max.V);

            return(Value.NewContainer(Domain2D.ByMinimumAndMaximum(min, max)));
        }