コード例 #1
0
        public override bool ShouldDisplay(ObjectPropertiesPageEventArgs e)
        {
            if (!e.Objects.Any())
            {
                return(false);
            }

            //check if a subsurface is selected.
            var selectedObj        = e.Objects.Last();
            var subObjes           = selectedObj.GetSelectedSubObjects();
            var isSelectedBrepFace = null != subObjes;

            if (isSelectedBrepFace)
            {
                var comIndex = subObjes.Last();
                if (comIndex.ComponentIndexType != Rhino.Geometry.ComponentIndexType.BrepFace)
                {
                    return(false);
                }

                var faceIndex      = comIndex.Index;
                var hostRoomObjRef = new ObjRef(selectedObj.Id);
                this._HBObjEntity = hostRoomObjRef.TryGetFaceEntity(comIndex);
                return(this._HBObjEntity.IsValid);
            }
            return(false);
        }
コード例 #2
0
        public override void UpdatePage(ObjectPropertiesPageEventArgs e)
        {
            var spheres = SpheresController.GetSpheres(e.Objects).ToList();

            if (spheres.Count != 0)
            {
                _control.SetData(spheres);
            }
        }
コード例 #3
0
        public override void UpdatePage(ObjectPropertiesPageEventArgs e)
        {
            var rectangles = RectanglesController.GetRectangles(e.Objects).ToList();

            if (rectangles.Count != 0)
            {
                _control.SetData(rectangles);
            }
        }
コード例 #4
0
        public override void UpdatePage(ObjectPropertiesPageEventArgs e)
        {
            if (!this._HBObjEntity.IsValid)
            {
                return;
            }

            if (this._HBObjEntity is RoomEntity rm)
            {
                this.panelUI.updateRoomPanel(rm);
            }
        }
コード例 #5
0
        public override void UpdatePage(ObjectPropertiesPageEventArgs e)
        {
            if (!this._HBObjEntity.IsValid)
            {
                return;
            }

            if (this._HBObjEntity is ShadeEntity apt)
            {
                this.panelUI.updateShadePanel(apt);
            }
        }
コード例 #6
0
        public override void UpdatePage(ObjectPropertiesPageEventArgs e)
        {
            if (!this._HBObjEntity.IsValid)
            {
                return;
            }

            if (this._HBObjEntity is FaceEntity face)
            {
                this.panelUI.updateFacePanel(face);
            }
        }
コード例 #7
0
        public override bool ShouldDisplay(ObjectPropertiesPageEventArgs e)
        {
            if (e.ObjectCount == 0)
            {
                return(false);
            }

            var spheres = SpheresController.GetSpheres(e.Objects).ToList();

            if (spheres.Count == 0)
            {
                return(false);
            }
            _control.SetData(spheres);
            return(true);
        }
コード例 #8
0
        public override bool ShouldDisplay(ObjectPropertiesPageEventArgs e)
        {
            if (RhinoDoc.ActiveDoc == null || RhinoDoc.ActiveDoc.Views.ActiveView == null)
            {
                return(false);
            }

            if (!RhinoCyclesCore.Core.RcCore.It.EngineSettings.AllowViewportSettingsOverride)
            {
                return(false);
            }

            var dm = RhinoDoc.ActiveDoc.Views.ActiveView.RealtimeDisplayMode as Viewport.RenderedViewport;

            return(dm != null);
        }
コード例 #9
0
        public override bool ShouldDisplay(ObjectPropertiesPageEventArgs e)
        {
            if (!e.Objects.Any())
            {
                return(false);
            }
            //if (e.ObjectCount !=1) return false;
            if (e.Objects.Count() != 1)
            {
                return(false);
            }

            var obj = e.Objects.Last();
            var ent = obj.Geometry.TryGetShadeEntity();

            this._HBObjEntity = ent;
            return(this._HBObjEntity.IsValid);
        }
コード例 #10
0
        public override bool ShouldDisplay(ObjectPropertiesPageEventArgs e)
        {
            var rc = false;

            // One object selected
            if (1 == e.ObjectCount)
            {
                rc = true;
            }
            else
            {
                // Multiple objects selected
                foreach (var rh_obj in e.Objects)
                {
                    rc = true;
                    break;
                }
            }
            return(rc);
        }
コード例 #11
0
        public override bool ShouldDisplay(ObjectPropertiesPageEventArgs e)
        {
            //reset
            _HBObjEntity = new RoomEntity();
            if (!e.Objects.Any())
            {
                return(false);
            }

            var roomEnts = e.Objects.Where(_ => _.Geometry.TryGetRoomEntity().IsValid);

            if (!roomEnts.Any())
            {
                return(false);
            }

            //var isApertureOnly = e.Objects.Count() == 1 && e.Objects[0].Geometry.TryGetApertureEntity().IsValid;
            //if (isApertureOnly)
            //    return false;

            this._HBObjEntity = roomEnts.First().Geometry.TryGetRoomEntity();
            return(this._HBObjEntity.IsValid);
        }
コード例 #12
0
 public override void UpdatePage(ObjectPropertiesPageEventArgs e)
 {
     // TODO...
 }
コード例 #13
0
 public override void UpdatePage(ObjectPropertiesPageEventArgs e)
 {
     Debug.WriteLine("SampleCsEtoPropertiesPage.UpdatePage()");
 }
コード例 #14
0
 public override bool ShouldDisplay(ObjectPropertiesPageEventArgs e)
 {
     Debug.WriteLine("SampleCsEtoPropertiesPage.ShouldDisplay()");
     return(true);
 }